mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 08:03:49 +00:00
Signature: download signed doc if signed
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user