From a27347bdc4e2d72ddb2ab37160bacc9125b929d6 Mon Sep 17 00:00:00 2001
From: "hamza.hramchi" <hamza.hramchi@xelians.fr>
Date: Tue, 21 Sep 2021 17:37:36 +0200
Subject: [PATCH] FIX #18322 TIME 0:25 do not reset the workflow after
 checking/unchecking the integration of the main document

---
 .../send-signature-book-action.component.ts                   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/frontend/app/actions/visa-send-signature-book-action/send-signature-book-action.component.ts b/src/frontend/app/actions/visa-send-signature-book-action/send-signature-book-action.component.ts
index cec9ff63c44..0511a6960ad 100644
--- a/src/frontend/app/actions/visa-send-signature-book-action/send-signature-book-action.component.ts
+++ b/src/frontend/app/actions/visa-send-signature-book-action/send-signature-book-action.component.ts
@@ -218,7 +218,9 @@ export class SendSignatureBookActionComponent implements AfterViewInit {
                 this.data.resource.integrations[integrationId] = !this.data.resource.integrations[integrationId];
                 await this.checkSignatureBook();
                 setTimeout(async () => {
-                    await this.appVisaWorkflow.loadWorkflow(this.data.resIds[0]);
+                    if (this.appVisaWorkflow.emptyWorkflow()) {
+                        await this.appVisaWorkflow.loadWorkflow(this.data.resIds[0]);
+                    }
                     this.loadWorkflowEntity();
                     if (!this.noResourceToProcess) {
                         this.checkWorkflowParameters(this.appVisaWorkflow.visaWorkflow.items);
-- 
GitLab