diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue index b8372e63c..bc4bfc544 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue @@ -347,9 +347,7 @@ const checkSignature = () => { return makeFetch("GET", url) .then((r) => { signedState.value = r as SignedState; - if (signedState.value === "pending") { - checkForReady(); - } + checkForReady(); }) .catch((error) => { signedState.value = "error"; @@ -370,8 +368,8 @@ const stopTrySigning = () => { const checkForReady = () => { if (tryForReady > maxTryForReady) { - signedState.value = "error"; stopTrySigning(); + tryForReady = 0; console.log("Reached the maximum number of tentative to try signing"); $toast.error( "Le nombre maximum de tentatives pour essayer de signer est atteint" @@ -393,7 +391,8 @@ const checkForReady = () => { } else { stopTrySigning(); if (signedState.value === "signed") { - //TODO recharger le document signé + userSignatureZone.value = null; + downloadAndOpen(); } } }; diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/index.ts b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/index.ts index 264622e72..77f2ee48c 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/index.ts +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/index.ts @@ -10,7 +10,7 @@ const appMessages = { you_are_going_to_sign: 'Vous allez signer le document', signature_confirmation: 'Confirmation de la signature', sign: 'Signer', - choose_another_signature: 'Choisir une autre signature', + choose_another_signature: 'Choisir une autre zone de signature', cancel: 'Annuler', cancel_signing: 'Refuser de signer', last_sign_zone: 'Zone de signature précédente',