diff --git a/app/Controllers/Chatbot/medicalClaimFormConversations.php b/app/Controllers/Chatbot/medicalClaimFormConversations.php index d0d21e7e..da6bf3c5 100644 --- a/app/Controllers/Chatbot/medicalClaimFormConversations.php +++ b/app/Controllers/Chatbot/medicalClaimFormConversations.php @@ -246,7 +246,8 @@ class medicalClaimFormConversations extends Conversation $question = Question::create("Confirm all details:") ->addButtons([ Button::create("✅ Confirm")->value("confirm"), - Button::create("❌ Start Over")->value("restart"), + Button::create("🔁 Start Over")->value("restart"), + Button::create("❌ Cancel")->value('cancel') ]); $this->ask($question, function ($answer) use ($finalSummary) { @@ -271,6 +272,9 @@ class medicalClaimFormConversations extends Conversation ]); $this->run(); break; + case "cancel": + $this->bot->startConversation(new MainMenuConversation()); + break; default: $this->say("Invalid selection. Please choose an option."); $this->showSummary(); diff --git a/app/Controllers/Chatbot/vehicleFormConversation.php b/app/Controllers/Chatbot/vehicleFormConversation.php index 1595ae52..3bcf39fd 100644 --- a/app/Controllers/Chatbot/vehicleFormConversation.php +++ b/app/Controllers/Chatbot/vehicleFormConversation.php @@ -180,7 +180,8 @@ class vehicleFormConversation extends Conversation $question = Question::create("Confim your Details:") ->addButtons([ Button::create("✅ Confirm")->value("confirm"), - Button::create("❌ No")->value("no"), + Button::create("🔁 Start Over")->value("restart"), + Button::create("❌ Cancel")->value('cancel') ]); $this->bot->ask($question, function ($answer) use($vehicle_info) { $path = $this->bot->userStorage()->get('path'); @@ -201,8 +202,12 @@ class vehicleFormConversation extends Conversation $this->say("There was a problem while requesting for a quotation please try again later."); } break; - case "no": - $this->askVehicleName(); + case "restart": + $this->bot->startConversation(new vehicleFormConversation()); + break; + case "cancel": + $this->say("Redirecting you to main menu..."); + $this->bot->startConversation(new MainMenuConversation()); break; default: $this->say("Invalid selection. Please choose an option."); diff --git a/app/Helpers/ChatbotHelper.php b/app/Helpers/ChatbotHelper.php index 08fcbb83..e1f213d3 100644 --- a/app/Helpers/ChatbotHelper.php +++ b/app/Helpers/ChatbotHelper.php @@ -201,7 +201,7 @@ class ChatbotHelper $message = SELF::quotationRequestMailTemplate($data); $common = ['mail_type'=>'request_quotation_bot']; - $email_id = 'no-reply-otp@nhanceindia.in'; + $email_id = getenv('email.enquiryMail'); $res = MailHelper::send_email(['mail' => $email_id, 'subject' => 'Quotation Request Received from bot.', 'message' => $message,'common'=>$common]); $res = json_decode($res);