mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-29 05:26:13 +00:00
Signature: download signed doc if signed
This commit is contained in:
parent
3a959b7044
commit
86896a12e6
@ -347,9 +347,7 @@ const checkSignature = () => {
|
|||||||
return makeFetch("GET", url)
|
return makeFetch("GET", url)
|
||||||
.then((r) => {
|
.then((r) => {
|
||||||
signedState.value = r as SignedState;
|
signedState.value = r as SignedState;
|
||||||
if (signedState.value === "pending") {
|
|
||||||
checkForReady();
|
checkForReady();
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
signedState.value = "error";
|
signedState.value = "error";
|
||||||
@ -370,8 +368,8 @@ const stopTrySigning = () => {
|
|||||||
|
|
||||||
const checkForReady = () => {
|
const checkForReady = () => {
|
||||||
if (tryForReady > maxTryForReady) {
|
if (tryForReady > maxTryForReady) {
|
||||||
signedState.value = "error";
|
|
||||||
stopTrySigning();
|
stopTrySigning();
|
||||||
|
tryForReady = 0;
|
||||||
console.log("Reached the maximum number of tentative to try signing");
|
console.log("Reached the maximum number of tentative to try signing");
|
||||||
$toast.error(
|
$toast.error(
|
||||||
"Le nombre maximum de tentatives pour essayer de signer est atteint"
|
"Le nombre maximum de tentatives pour essayer de signer est atteint"
|
||||||
@ -393,7 +391,8 @@ const checkForReady = () => {
|
|||||||
} else {
|
} else {
|
||||||
stopTrySigning();
|
stopTrySigning();
|
||||||
if (signedState.value === "signed") {
|
if (signedState.value === "signed") {
|
||||||
//TODO recharger le document signé
|
userSignatureZone.value = null;
|
||||||
|
downloadAndOpen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -10,7 +10,7 @@ const appMessages = {
|
|||||||
you_are_going_to_sign: 'Vous allez signer le document',
|
you_are_going_to_sign: 'Vous allez signer le document',
|
||||||
signature_confirmation: 'Confirmation de la signature',
|
signature_confirmation: 'Confirmation de la signature',
|
||||||
sign: 'Signer',
|
sign: 'Signer',
|
||||||
choose_another_signature: 'Choisir une autre signature',
|
choose_another_signature: 'Choisir une autre zone de signature',
|
||||||
cancel: 'Annuler',
|
cancel: 'Annuler',
|
||||||
cancel_signing: 'Refuser de signer',
|
cancel_signing: 'Refuser de signer',
|
||||||
last_sign_zone: 'Zone de signature précédente',
|
last_sign_zone: 'Zone de signature précédente',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user