From 78850228127416b23e3dbfe641780743a3a6095f Mon Sep 17 00:00:00 2001
From: Guillaume Heurtier <guillaume.heurtier@maarch.org>
Date: Tue, 14 Jan 2020 15:53:11 +0100
Subject: [PATCH] FEAT #10633 TIME 0:20 added reject visa + interrupt visa
 actions in front

---
 migration/19.12/1912.sql                    |  2 +-
 src/frontend/app/actions/actions.service.ts | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/migration/19.12/1912.sql b/migration/19.12/1912.sql
index 9dc55986f8d..ef2e646f49f 100644
--- a/migration/19.12/1912.sql
+++ b/migration/19.12/1912.sql
@@ -85,7 +85,7 @@ where group_id in (
 -- /!\ Do not move : update actions AFTER all updates on groupbasket
 DELETE FROM actions WHERE component = 'viewDoc' OR action_page in ('view', 'validate_mail', 'process', 'visa_mail');
 
-UPDATE actions SET component = 'rejectVisaBackToPrevious' WHERE action_page = 'rejection_visa_previous';
+UPDATE actions SET component = 'rejectVisaBackToPreviousAction' WHERE action_page = 'rejection_visa_previous';
 UPDATE actions SET component = 'redirectInitiatorEntityAction' WHERE action_page = 'redirect_visa_entity';
 UPDATE actions SET component = 'rejectVisaBackToPreviousAction' WHERE action_page = 'rejection_visa_previous';
 UPDATE actions SET component = 'rejectVisaBackToRedactorAction' WHERE action_page = 'rejection_visa_redactor';
diff --git a/src/frontend/app/actions/actions.service.ts b/src/frontend/app/actions/actions.service.ts
index 53a9fe63983..c7d6bfb0ab5 100644
--- a/src/frontend/app/actions/actions.service.ts
+++ b/src/frontend/app/actions/actions.service.ts
@@ -566,4 +566,16 @@ export class ActionsService {
     signatureBookAction(options: any = null) {
         this.router.navigate([`/signatureBook/users/${this.currentUserId}/groups/${this.currentGroupId}/baskets/${this.currentBasketId}/resources/${this.currentResIds}`]);
     }
+
+    rejectVisaBackToPreviousAction(options: any = null) {
+        this.confirmAction(options);
+    }
+
+    rejectVisaBackToRedactorAction(options: any = null) {
+        this.confirmAction(options);
+    }
+
+    interruptVisaAction(options: any = null) {
+        this.confirmAction(options);
+    }
 }
-- 
GitLab