From 6b0256b83d97b2ecfedc05552e1c4937d918a5d9 Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Tue, 22 Jul 2025 18:43:49 +0530 Subject: [PATCH] Mail flow check : GWM --- app/Controllers/AuthController.php | 2 +- app/Controllers/PlanController.php | 10 ++++++---- app/Helpers/mail_helper.php | 2 ++ writable/pdf/trips/{trip_1.pdf => trip_15.pdf} | Bin writable/pdf/trips/{trip_25.pdf => trip_5.pdf} | Bin 5 files changed, 9 insertions(+), 5 deletions(-) rename writable/pdf/trips/{trip_1.pdf => trip_15.pdf} (100%) rename writable/pdf/trips/{trip_25.pdf => trip_5.pdf} (100%) diff --git a/app/Controllers/AuthController.php b/app/Controllers/AuthController.php index a9e9efd..e83c537 100644 --- a/app/Controllers/AuthController.php +++ b/app/Controllers/AuthController.php @@ -40,7 +40,7 @@ class AuthController extends ResourceController $this->provider = new Azure([ 'clientId' => "9af66888-eb85-48ec-b3a0-ba857734f52b", 'clientSecret' => "N2_8Q~FBEXtoZft2UgJ6FQZCh3ZIbJydYgxREbUb", - 'redirectUri' => "https://apitest.tripapprovaltool.com/tstat/authredirection", + 'redirectUri' => "https://apitest.tripapprovaltool.com/tstat/index.html#/authredirection", 'tenant' => "284bf2b6-6dd8-4b46-881c-de45fde35736", ]); $this->provider->scope = [ diff --git a/app/Controllers/PlanController.php b/app/Controllers/PlanController.php index 36a67c5..7773af7 100644 --- a/app/Controllers/PlanController.php +++ b/app/Controllers/PlanController.php @@ -1433,14 +1433,16 @@ class PlanController extends ResourceController public function url() { + echo '
';
+        sendPlanCreationMail(5);
+        print_r(getPlanApproverAction(5)); die;
+
         // echo '
';
         // print_r(getAllowedClassForUser(2,4)['hotel']); die;
 
-
         return $this->generatePlanPdf(53, true);
-die;
-        echo '
';
-        print_r(getPlanApproverAction(62)); die;
+        die;
+
         return send_email_agent(env('ORG_id') , 62);
         return updatePlanStatus(62);
 
diff --git a/app/Helpers/mail_helper.php b/app/Helpers/mail_helper.php
index a964093..1f9673c 100644
--- a/app/Helpers/mail_helper.php
+++ b/app/Helpers/mail_helper.php
@@ -45,6 +45,8 @@ if (!function_exists('sendPlanCreationMail')) {
             if ($value['is_action_done'] == 1) { continue; }
             // Skip if action is None
             if ($value['action'] === 'None') { continue; }
+            // skip with below condition
+            if($mailOn == 'send_mail_to_only_approver' && $action['parallel_process_from'] == 1){ continue; }
 
            if($value['action'] == 'Approval'){ $template = 'plan_creation_approval_notification_to_approver'; }else if($value['action'] == 'Notification'){ $template = 'plan_creation_notification_to_approver'; }
             
diff --git a/writable/pdf/trips/trip_1.pdf b/writable/pdf/trips/trip_15.pdf
similarity index 100%
rename from writable/pdf/trips/trip_1.pdf
rename to writable/pdf/trips/trip_15.pdf
diff --git a/writable/pdf/trips/trip_25.pdf b/writable/pdf/trips/trip_5.pdf
similarity index 100%
rename from writable/pdf/trips/trip_25.pdf
rename to writable/pdf/trips/trip_5.pdf