FIX_CHATBOT_MAIL_AND_CANCEL_IN_FORM
This commit is contained in:
parent
392362fb0d
commit
4d9a4025c3
@ -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();
|
||||
|
||||
@ -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.");
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user