Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
02e558c76a
@ -421,6 +421,10 @@ $routes->cli('cli/check_bounce_mail_cli', 'MasterController::testCheckBounceMail
|
||||
$routes->cli('cli/app_check_list', 'MasterController::appCheckList');
|
||||
$routes->cli('cli/new_gdrive_token', 'GoogleDriveController::generateNewGoogleDriveAccessToken');
|
||||
|
||||
//crone job
|
||||
$routes->cli('cli/enrollOpendAndClose', 'DashboardController::updatePolicyEnrollmentStatus');
|
||||
$routes->cli("cli/sendCroneRemainderMail", "DashboardController::sendCroneRemainderMail");
|
||||
|
||||
//Employee login api's
|
||||
$routes->post("/employeeRest/verifyEmployeeNumber", "RestAuthenticationController::verifyEmployeeWithMobileNumber");
|
||||
$routes->post("/employeeRest/getVerifiedUserData", "RestAuthenticationController::getVerifiedUserData");
|
||||
|
||||
@ -51,7 +51,7 @@ class EcardDownloadConversation extends Conversation
|
||||
$link = base_url().'/download-e-card/' . explode('#',$answer->getValue())[1].'/1';
|
||||
$this->say('Click here to downlad: <a href="'.$link.'" target="_blank">Ecard</a>');
|
||||
|
||||
$this->bot->startConversation(new EcardDownloadConversation()); // ✅ Restart the
|
||||
$this->bot->startConversation(new doYouWantToContinueConversation()); // ✅ Restart the
|
||||
|
||||
break;
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Controllers\Chatbot;
|
||||
|
||||
use App\Helpers\ChatbotHelper;
|
||||
use BotMan\BotMan\Messages\Conversations\Conversation;
|
||||
use BotMan\BotMan\Messages\Outgoing\Question;
|
||||
use BotMan\BotMan\Messages\Outgoing\Actions\Button;
|
||||
@ -28,24 +29,30 @@ class MainMenuConversation extends Conversation
|
||||
$this->bot->ask($question, function ($answer) {
|
||||
switch ($answer->getValue()) {
|
||||
case "ecard_download":
|
||||
$this->say("📄 Ecard Download Menu:");
|
||||
$this->bot->startConversation(new EcardDownloadConversation());
|
||||
|
||||
$message = ChatbotHelper::get_payload_data();
|
||||
$this->say($message);
|
||||
// $this->say("📄 Ecard Download Menu:");
|
||||
// $this->bot->startConversation(new EcardDownloadConversation());
|
||||
break;
|
||||
case "network_hospital":
|
||||
$this->say("🏥 Network Hospital Menu:");
|
||||
$this->say("🏥 Network Hospital Menu:");log_message('error','Network Hospital clicked');
|
||||
$this->bot->startConversation(new NetworkHospitalConversation());
|
||||
break;
|
||||
case "reimbursement_claim":
|
||||
$this->say("Reimbursement Claim Process selected. (Dummy Response)");
|
||||
// $this->say("Reimbursement Claim Process selected. (Dummy Response)");
|
||||
$this->bot->startConversation(new ReimbursementClaimProcessConversation());
|
||||
break;
|
||||
case "reimbursement_status":
|
||||
$this->say("Reimbursement Claim Status selected. (Dummy Response)");
|
||||
$this->bot->startConversation(new ReimbursementClaimStatusConversation());
|
||||
|
||||
break;
|
||||
case "new_policy":
|
||||
$this->say("New Policy selected. (Dummy Response)");
|
||||
$this->bot->startConversation(new policyConversation());
|
||||
break;
|
||||
case "renew_policy":
|
||||
$this->say("Renew Policy selected. (Dummy Response)");
|
||||
$this->bot->startConversation(new policyConversation());
|
||||
break;
|
||||
default:
|
||||
$this->say("Invalid selection. Please choose an option.");
|
||||
@ -54,4 +61,5 @@ class MainMenuConversation extends Conversation
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -7,8 +7,12 @@ use BotMan\BotMan\Messages\Conversations\Conversation;
|
||||
use BotMan\BotMan\Messages\Outgoing\Question;
|
||||
use BotMan\BotMan\Messages\Outgoing\Actions\Button;
|
||||
|
||||
use App\Helpers\ChatbotHelper;
|
||||
|
||||
class NetworkHospitalConversation extends Conversation
|
||||
{
|
||||
|
||||
|
||||
public function run()
|
||||
{
|
||||
$this->showHospitalMenu();
|
||||
@ -26,10 +30,20 @@ class NetworkHospitalConversation extends Conversation
|
||||
$this->bot->ask($question, function ($answer) {
|
||||
switch ($answer->getValue()) {
|
||||
case "search_city":
|
||||
$this->say("Searching by City... (Dummy Response)");
|
||||
$this->bot->ask("Enter the City Name",function ($response){
|
||||
// $cityName = $response->getText();
|
||||
$hospital_link = ChatbotHelper::getHospitalLink();
|
||||
$this->say("Searching for hospitals in .....");
|
||||
|
||||
$this->say('<a href="' . $hospital_link['network_hospitals'] . '" target="_blank">Click here for hospital details</a>');
|
||||
$this->bot->startConversation(new doYouWantToContinueConversation());
|
||||
});
|
||||
break;
|
||||
case "search_pincode":
|
||||
$this->say("Searching by Pincode... (Dummy Response)");
|
||||
$this->bot->ask("Enter the Pincode",function ($response){
|
||||
$pincode = $response->getText();
|
||||
$this->say("Searching for hospitals in ".$pincode.'.....');
|
||||
});
|
||||
break;
|
||||
case "go_back":
|
||||
$this->bot->startConversation(new MainMenuConversation());
|
||||
@ -41,4 +55,5 @@ class NetworkHospitalConversation extends Conversation
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
// namespace App\Conversations;
|
||||
namespace App\Controllers\Chatbot;
|
||||
|
||||
use BotMan\BotMan\Messages\Conversations\Conversation;
|
||||
use BotMan\BotMan\Messages\Outgoing\Question;
|
||||
use BotMan\BotMan\Messages\Outgoing\Actions\Button;
|
||||
|
||||
|
||||
class ReimbursementClaimProcessConversation extends Conversation
|
||||
{
|
||||
|
||||
|
||||
public function run()
|
||||
{
|
||||
$this->claimProcess();
|
||||
}
|
||||
|
||||
protected function claimProcess()
|
||||
{
|
||||
$question = Question::create("Do you Need Anything Else ?")
|
||||
->addButtons([
|
||||
Button::create("🔹 Yes I need some more Help")->value("yes"),
|
||||
Button::create("🔹 No, Thank You")->value("no"),
|
||||
// Button::create("◀️ Go Back")->value("go_back"),
|
||||
]);
|
||||
|
||||
$this->bot->ask($question, function ($answer) {
|
||||
switch ($answer->getValue()) {
|
||||
case "yes":
|
||||
|
||||
$this->say("Sure, How can I help you ");
|
||||
$this->bot->startConversation(new MainMenuConversation());
|
||||
break;
|
||||
case "no":
|
||||
$this->say("Thank you for your time! If you need anything else, feel free to reach out. Goodbye!");
|
||||
break;
|
||||
default:
|
||||
$this->say("Invalid selection. Please choose an option.");
|
||||
$this->askQuestion();
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
// namespace App\Conversations;
|
||||
namespace App\Controllers\Chatbot;
|
||||
|
||||
use BotMan\BotMan\Messages\Conversations\Conversation;
|
||||
use BotMan\BotMan\Messages\Outgoing\Question;
|
||||
use BotMan\BotMan\Messages\Outgoing\Actions\Button;
|
||||
|
||||
|
||||
class ReimbursementClaimStatusConversation extends Conversation
|
||||
{
|
||||
|
||||
|
||||
public function run()
|
||||
{
|
||||
$this->claimStatus();
|
||||
}
|
||||
|
||||
protected function claimStatus()
|
||||
{
|
||||
$question = Question::create("Do you Need Anything Else ?")
|
||||
->addButtons([
|
||||
Button::create("🔹 Yes I need some more Help")->value("yes"),
|
||||
Button::create("🔹 No, Thank You")->value("no"),
|
||||
// Button::create("◀️ Go Back")->value("go_back"),
|
||||
]);
|
||||
|
||||
$this->bot->ask($question, function ($answer) {
|
||||
switch ($answer->getValue()) {
|
||||
case "yes":
|
||||
|
||||
$this->say("Sure, How can I help you ");
|
||||
$this->bot->startConversation(new MainMenuConversation());
|
||||
break;
|
||||
case "no":
|
||||
$this->say("Thank you for your time! If you need anything else, feel free to reach out. Goodbye!");
|
||||
break;
|
||||
default:
|
||||
$this->say("Invalid selection. Please choose an option.");
|
||||
$this->askQuestion();
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
50
app/Controllers/Chatbot/commonPolicyOptionConversations.php
Normal file
50
app/Controllers/Chatbot/commonPolicyOptionConversations.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
// namespace App\Conversations;
|
||||
namespace App\Controllers\Chatbot;
|
||||
|
||||
use BotMan\BotMan\Messages\Conversations\Conversation;
|
||||
use BotMan\BotMan\Messages\Outgoing\Question;
|
||||
use BotMan\BotMan\Messages\Outgoing\Actions\Button;
|
||||
|
||||
use App\Helpers\ChatbotHelper;
|
||||
|
||||
class commonPolicyOptionConversations extends Conversation
|
||||
{
|
||||
|
||||
|
||||
public function run()
|
||||
{
|
||||
$this->policyOptions();
|
||||
}
|
||||
|
||||
protected function policyOptions()
|
||||
{
|
||||
$question = Question::create("Choose Policy Type:")
|
||||
->addButtons([
|
||||
Button::create("🔹 Upload Vehicle Details")->value("upload_vehicle_details"),
|
||||
Button::create("🔹 Talk to our Service Executive")->value("service_executive"),
|
||||
Button::create("◀️ Go Back")->value("go_back"),
|
||||
]);
|
||||
|
||||
$this->bot->ask($question, function ($answer) {
|
||||
switch ($answer->getValue()) {
|
||||
case "upload_vehicle_details":
|
||||
// $cityName = $response->getText();
|
||||
$this->bot->startConversation(new vehicleFormConversation());
|
||||
break;
|
||||
case "service_executive":
|
||||
$this->bot->startConversation(new serviceExecutiveConversation());
|
||||
break;
|
||||
case "go_back":
|
||||
$this->bot->startConversation(new MainMenuConversation());
|
||||
break;
|
||||
default:
|
||||
$this->say("Invalid selection. Please choose an option.");
|
||||
$this->policyOptions();
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
48
app/Controllers/Chatbot/doYouWantToContinueConversation.php
Normal file
48
app/Controllers/Chatbot/doYouWantToContinueConversation.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
// namespace App\Conversations;
|
||||
namespace App\Controllers\Chatbot;
|
||||
|
||||
use BotMan\BotMan\Messages\Conversations\Conversation;
|
||||
use BotMan\BotMan\Messages\Outgoing\Question;
|
||||
use BotMan\BotMan\Messages\Outgoing\Actions\Button;
|
||||
|
||||
use App\Helpers\ChatbotHelper;
|
||||
|
||||
class doYouWantToContinueConversation extends Conversation
|
||||
{
|
||||
|
||||
|
||||
public function run()
|
||||
{
|
||||
$this->askQuestion();
|
||||
}
|
||||
|
||||
protected function askQuestion()
|
||||
{
|
||||
$question = Question::create("Do you Need Anything Else ?")
|
||||
->addButtons([
|
||||
Button::create("🔹 Yes I need some more Help")->value("yes"),
|
||||
Button::create("🔹 No, Thank You")->value("no"),
|
||||
// Button::create("◀️ Go Back")->value("go_back"),
|
||||
]);
|
||||
|
||||
$this->bot->ask($question, function ($answer) {
|
||||
switch ($answer->getValue()) {
|
||||
case "yes":
|
||||
|
||||
$this->say("Sure, How can I help you ");
|
||||
$this->bot->startConversation(new MainMenuConversation());
|
||||
break;
|
||||
case "no":
|
||||
$this->say("Thank you for your time! If you need anything else, feel free to reach out. Goodbye!");
|
||||
break;
|
||||
default:
|
||||
$this->say("Invalid selection. Please choose an option.");
|
||||
$this->askQuestion();
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
50
app/Controllers/Chatbot/fourWheelerOptionsConversations.php
Normal file
50
app/Controllers/Chatbot/fourWheelerOptionsConversations.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
// namespace App\Conversations;
|
||||
namespace App\Controllers\Chatbot;
|
||||
|
||||
use BotMan\BotMan\Messages\Conversations\Conversation;
|
||||
use BotMan\BotMan\Messages\Outgoing\Question;
|
||||
use BotMan\BotMan\Messages\Outgoing\Actions\Button;
|
||||
|
||||
use App\Helpers\ChatbotHelper;
|
||||
|
||||
class fourWheelerOptionsConversations extends Conversation
|
||||
{
|
||||
|
||||
|
||||
public function run()
|
||||
{
|
||||
$this->show4WOptions();
|
||||
}
|
||||
|
||||
protected function show4WOptions()
|
||||
{
|
||||
$question = Question::create("Choose Policy Type:")
|
||||
->addButtons([
|
||||
Button::create("🔹 Comprehensive")->value("comp"),
|
||||
Button::create("🔹 Third-Party Only")->value("3p"),
|
||||
Button::create("◀️ Go Back")->value("go_back"),
|
||||
]);
|
||||
|
||||
$this->bot->ask($question, function ($answer) {
|
||||
switch ($answer->getValue()) {
|
||||
case "3p":
|
||||
// $cityName = $response->getText();
|
||||
$this->bot->startConversation(new commonPolicyOptionConversations());
|
||||
break;
|
||||
case "comp":
|
||||
$this->bot->startConversation(new commonPolicyOptionConversations());
|
||||
break;
|
||||
case "go_back":
|
||||
$this->bot->startConversation(new MainMenuConversation());
|
||||
break;
|
||||
default:
|
||||
$this->say("Invalid selection. Please choose an option.");
|
||||
$this->showHospitalMenu();
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
49
app/Controllers/Chatbot/hospitalPolicyConversation.php
Normal file
49
app/Controllers/Chatbot/hospitalPolicyConversation.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
// namespace App\Conversations;
|
||||
namespace App\Controllers\Chatbot;
|
||||
|
||||
use BotMan\BotMan\Messages\Conversations\Conversation;
|
||||
use BotMan\BotMan\Messages\Outgoing\Question;
|
||||
use BotMan\BotMan\Messages\Outgoing\Actions\Button;
|
||||
|
||||
use App\Helpers\ChatbotHelper;
|
||||
|
||||
class hospitalPolicyConversation extends Conversation
|
||||
{
|
||||
|
||||
|
||||
public function run()
|
||||
{
|
||||
$this->showMediclaimPolicyOptions();
|
||||
}
|
||||
|
||||
protected function showMediclaimPolicyOptions()
|
||||
{
|
||||
$question = Question::create("Choose Policy Type:")
|
||||
->addButtons([
|
||||
Button::create("🔹 Individual")->value("individual"),
|
||||
Button::create("🔹 Floater")->value("floater"),
|
||||
Button::create("◀️ Go Back")->value("go_back"),
|
||||
]);
|
||||
|
||||
$this->bot->ask($question, function ($answer) {
|
||||
switch ($answer->getValue()) {
|
||||
case "individual":
|
||||
$this->bot->startConversation(new commonPolicyOptionConversations());
|
||||
break;
|
||||
case "floater":
|
||||
$this->bot->startConversation(new commonPolicyOptionConversations());
|
||||
break;
|
||||
case "go_back":
|
||||
$this->bot->startConversation(new MainMenuConversation());
|
||||
break;
|
||||
default:
|
||||
$this->say("Invalid selection. Please choose an option.");
|
||||
$this->showHospitalMenu();
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
50
app/Controllers/Chatbot/medicalClaimOptionConversations.php
Normal file
50
app/Controllers/Chatbot/medicalClaimOptionConversations.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
// namespace App\Conversations;
|
||||
namespace App\Controllers\Chatbot;
|
||||
|
||||
use BotMan\BotMan\Messages\Conversations\Conversation;
|
||||
use BotMan\BotMan\Messages\Outgoing\Question;
|
||||
use BotMan\BotMan\Messages\Outgoing\Actions\Button;
|
||||
|
||||
use App\Helpers\ChatbotHelper;
|
||||
|
||||
class medicalClaimOptionConversations extends Conversation
|
||||
{
|
||||
|
||||
|
||||
public function run()
|
||||
{
|
||||
$this->showMediclaimOptions();
|
||||
}
|
||||
|
||||
protected function showMediclaimOptions()
|
||||
{
|
||||
$question = Question::create("Choose Policy Type:")
|
||||
->addButtons([
|
||||
Button::create("🔹 Individual")->value("individual"),
|
||||
Button::create("🔹 Floater")->value("floater"),
|
||||
Button::create("◀️ Go Back")->value("go_back"),
|
||||
]);
|
||||
|
||||
$this->bot->ask($question, function ($answer) {
|
||||
switch ($answer->getValue()) {
|
||||
case "individual":
|
||||
// $cityName = $response->getText();
|
||||
$this->bot->startConversation(new commonPolicyOptionConversations());
|
||||
break;
|
||||
case "floater":
|
||||
$this->bot->startConversation(new commonPolicyOptionConversations());
|
||||
break;
|
||||
case "go_back":
|
||||
$this->bot->startConversation(new MainMenuConversation());
|
||||
break;
|
||||
default:
|
||||
$this->say("Invalid selection. Please choose an option.");
|
||||
$this->showHospitalMenu();
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
55
app/Controllers/Chatbot/policyConversation.php
Normal file
55
app/Controllers/Chatbot/policyConversation.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
// namespace App\Conversations;
|
||||
namespace App\Controllers\Chatbot;
|
||||
|
||||
use BotMan\BotMan\Messages\Conversations\Conversation;
|
||||
use BotMan\BotMan\Messages\Outgoing\Question;
|
||||
use BotMan\BotMan\Messages\Outgoing\Actions\Button;
|
||||
|
||||
use App\Helpers\ChatbotHelper;
|
||||
|
||||
class policyConversation extends Conversation
|
||||
{
|
||||
|
||||
|
||||
public function run()
|
||||
{
|
||||
$this->showNewPolicy();
|
||||
}
|
||||
|
||||
protected function showNewPolicy()
|
||||
{
|
||||
$question = Question::create("Choose Policy Type:")
|
||||
->addButtons([
|
||||
Button::create("🏍️ 2 Wheeler")->value("2_wheeler"),
|
||||
Button::create("🚗 4 Wheeler")->value("4_wheeler"),
|
||||
Button::create("🩺 Medical Claim")->value("mediclaim"),
|
||||
Button::create("◀️ Go Back")->value("go_back"),
|
||||
]);
|
||||
|
||||
$this->bot->ask($question, function ($answer) {
|
||||
switch ($answer->getValue()) {
|
||||
case "2_wheeler":
|
||||
// $cityName = $response->getText();
|
||||
$this->bot->startConversation(new twoWheelerOptionsConversations());
|
||||
break;
|
||||
case "4_wheeler":
|
||||
$this->bot->startConversation(new fourWheelerOptionsConversations());
|
||||
break;
|
||||
case "mediclaim":
|
||||
$this->bot->startConversation(new medicalClaimOptionConversations());
|
||||
|
||||
break;
|
||||
case "go_back":
|
||||
$this->bot->startConversation(new MainMenuConversation());
|
||||
break;
|
||||
default:
|
||||
$this->say("Invalid selection. Please choose an option.");
|
||||
$this->showHospitalMenu();
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
60
app/Controllers/Chatbot/serviceExecutiveConversation.php
Normal file
60
app/Controllers/Chatbot/serviceExecutiveConversation.php
Normal file
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Chatbot;
|
||||
|
||||
use App\Helpers\ChatbotHelper;
|
||||
use BotMan\BotMan\Messages\Conversations\Conversation;
|
||||
use BotMan\BotMan\Messages\Outgoing\Question;
|
||||
use BotMan\BotMan\Messages\Outgoing\Actions\Button;
|
||||
|
||||
class serviceExecutiveConversation extends Conversation
|
||||
{
|
||||
protected $mobile_number;
|
||||
|
||||
public function run()
|
||||
{
|
||||
$this->askServiceExecutive();
|
||||
}
|
||||
|
||||
protected function askServiceExecutive()
|
||||
{
|
||||
$mobile = ChatbotHelper::getPhoneNumber(); // Assuming this fetches the user's phone number
|
||||
$question = Question::create("Is this Your Mobile Number: $mobile")
|
||||
->addButtons([
|
||||
Button::create("✅ Yes")->value("yes"),
|
||||
Button::create("❌ No")->value("no"),
|
||||
Button::create("◀️ Go Back")->value("go_back"),
|
||||
]);
|
||||
|
||||
$this->bot->ask($question, function ($answer) {
|
||||
switch ($answer->getValue()) {
|
||||
case "yes":
|
||||
$this->say("Our executive will call you at the earliest.");
|
||||
$this->bot->startConversation(new doYouWantToContinueConversation());
|
||||
break;
|
||||
|
||||
case "no":
|
||||
$this->ask('Enter Your Mobile Number?', function ($response) {
|
||||
$this->mobile_number = $response->getText();
|
||||
$this->bot->userStorage()->save([
|
||||
'mobile_number' => $this->mobile_number
|
||||
]);
|
||||
// Use 'use' to bring the class context into the closure
|
||||
$this->say("Our executive will call you at the earliest.");
|
||||
$this->bot->startConversation(new doYouWantToContinueConversation());
|
||||
});
|
||||
break;
|
||||
|
||||
case "go_back":
|
||||
$this->bot->startConversation(new MainMenuConversation());
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->say("Invalid selection. Please choose an option.");
|
||||
$this->askServiceExecutive();
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
50
app/Controllers/Chatbot/twoWheelerOptionsConversations.php
Normal file
50
app/Controllers/Chatbot/twoWheelerOptionsConversations.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
// namespace App\Conversations;
|
||||
namespace App\Controllers\Chatbot;
|
||||
|
||||
use BotMan\BotMan\Messages\Conversations\Conversation;
|
||||
use BotMan\BotMan\Messages\Outgoing\Question;
|
||||
use BotMan\BotMan\Messages\Outgoing\Actions\Button;
|
||||
|
||||
use App\Helpers\ChatbotHelper;
|
||||
|
||||
class twoWheelerOptionsConversations extends Conversation
|
||||
{
|
||||
|
||||
|
||||
public function run()
|
||||
{
|
||||
$this->show2WOptions();
|
||||
}
|
||||
|
||||
protected function show2WOptions()
|
||||
{
|
||||
$question = Question::create("Choose Policy Type:")
|
||||
->addButtons([
|
||||
Button::create("🔹 Third-Party")->value("3p"),
|
||||
Button::create("🔹 Comprehensive")->value("comp"),
|
||||
Button::create("◀️ Go Back")->value("go_back"),
|
||||
]);
|
||||
|
||||
$this->bot->ask($question, function ($answer) {
|
||||
switch ($answer->getValue()) {
|
||||
case "3p":
|
||||
// $cityName = $response->getText();
|
||||
$this->bot->startConversation(new commonPolicyOptionConversations());
|
||||
break;
|
||||
case "comp":
|
||||
$this->bot->startConversation(new commonPolicyOptionConversations());
|
||||
break;
|
||||
case "go_back":
|
||||
$this->bot->startConversation(new MainMenuConversation());
|
||||
break;
|
||||
default:
|
||||
$this->say("Invalid selection. Please choose an option.");
|
||||
$this->showHospitalMenu();
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
83
app/Controllers/Chatbot/vehicleFormConversation.php
Normal file
83
app/Controllers/Chatbot/vehicleFormConversation.php
Normal file
@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Chatbot;
|
||||
|
||||
use BotMan\BotMan\Messages\Conversations\Conversation;
|
||||
use BotMan\BotMan\Messages\Outgoing\Question;
|
||||
use BotMan\BotMan\Messages\Outgoing\Actions\Button;
|
||||
|
||||
class vehicleFormConversation extends Conversation
|
||||
{
|
||||
protected $vehicleName;
|
||||
protected $vehicleYOM;
|
||||
protected $vehicleEngineNo;
|
||||
protected $vehicleInvoiceNo;
|
||||
|
||||
public function run()
|
||||
{
|
||||
$this->askVehicleName();
|
||||
}
|
||||
|
||||
protected function askVehicleName()
|
||||
{
|
||||
$this->ask('Enter Vehicle Name ?', function ($response) {
|
||||
$this->vehicleName = $response->getText();
|
||||
if (empty($this->vehicleName)) {
|
||||
$this->say('Vehicle Name Cannot be Empty');
|
||||
return $this->askVehicleName(); // Re-ask if empty
|
||||
}
|
||||
$this->askVehicleYOM(); // Ask next question
|
||||
});
|
||||
}
|
||||
|
||||
protected function askVehicleYOM()
|
||||
{
|
||||
$this->ask('Enter Vehicle Year of Manufacture ?', function ($response) {
|
||||
$this->vehicleYOM = $response->getText();
|
||||
if (empty($this->vehicleYOM)) {
|
||||
$this->say('Vehicle Year of Manufacture Cannot be Empty');
|
||||
return $this->askVehicleYOM(); // Re-ask if empty
|
||||
}
|
||||
$this->askVehicleEngineNo(); // Ask next question
|
||||
});
|
||||
}
|
||||
|
||||
protected function askVehicleEngineNo()
|
||||
{
|
||||
$this->ask('Enter Vehicle Engine Number ?', function ($response) {
|
||||
$this->vehicleEngineNo = $response->getText();
|
||||
if (empty($this->vehicleEngineNo)) {
|
||||
$this->say('Vehicle Engine Number Cannot be Empty');
|
||||
return $this->askVehicleEngineNo(); // Re-ask if empty
|
||||
}
|
||||
$this->askVehicleInvoiceNo(); // Ask next question
|
||||
});
|
||||
}
|
||||
|
||||
protected function askVehicleInvoiceNo()
|
||||
{
|
||||
$this->ask('Enter Vehicle Invoice Number ?', function ($response) {
|
||||
$this->vehicleInvoiceNo = $response->getText();
|
||||
if (empty($this->vehicleInvoiceNo)) {
|
||||
$this->say('Vehicle Invoice Number Cannot be Empty');
|
||||
return $this->askVehicleInvoiceNo(); // Re-ask if empty
|
||||
}
|
||||
$this->storeVehicleData(); // Proceed to store the data
|
||||
});
|
||||
}
|
||||
|
||||
protected function storeVehicleData()
|
||||
{
|
||||
// Save all collected data to user storage
|
||||
$this->bot->userStorage()->save([
|
||||
'vehicle_name' => $this->vehicleName,
|
||||
'vehicle_yom' => $this->vehicleYOM,
|
||||
'vehicle_engine_no' => $this->vehicleEngineNo,
|
||||
'vehicle_invoice_no' => $this->vehicleInvoiceNo
|
||||
]);
|
||||
|
||||
$this->say('Vehicle Information Saved!');
|
||||
$this->bot->startConversation(new doYouWantToContinueConversation());
|
||||
|
||||
}
|
||||
}
|
||||
@ -54,10 +54,12 @@ class ChatbotControllerNew extends BaseController
|
||||
{
|
||||
// Start the Main Menu when user says "hi" or "start"
|
||||
$this->botman->hears('start|hi|hello', function (BotMan $bot) {
|
||||
$bot->reply('How how can i assit?');
|
||||
$bot->reply('Hi how can i assit?');
|
||||
$bot->startConversation(new MainMenuConversation());
|
||||
});
|
||||
|
||||
|
||||
|
||||
// $this->botman->hears('main_menu', function (BotMan $bot) {
|
||||
// BotService::sendMainOptions($bot);
|
||||
// });
|
||||
|
||||
@ -4176,7 +4176,21 @@ class ClientController extends AdminController
|
||||
->where('client_policy.id', $param)
|
||||
->findAll();
|
||||
|
||||
$dataForClientAndInsurer = [];
|
||||
$dataForClientAndInsurer = $this->clientPolicyModel
|
||||
->select("
|
||||
clients.id AS client_id,
|
||||
clients.client_name,
|
||||
insurers.id AS insurer_id,
|
||||
insurers.name AS insurer_name,
|
||||
tpa.id AS tpa_id,
|
||||
tpa.name AS tpa_name,
|
||||
")
|
||||
->join('clients', 'client_policy.client_id = clients.id', 'left')
|
||||
->join('insurers', 'client_policy.insurer_id = insurers.id', 'left')
|
||||
->join('tpa', 'client_policy.tpa_id = tpa.id', 'left')
|
||||
->where('client_policy.id', $param)
|
||||
->first();
|
||||
|
||||
$memberData = [];
|
||||
|
||||
// Respond based on the query result
|
||||
|
||||
@ -286,9 +286,11 @@ class DashboardController extends AdminController
|
||||
}
|
||||
|
||||
$myLogger->logme('error', 'enrollment_status function completed');
|
||||
$myLogger->logme('error', 'updated Open Enrollment Policy count : "'.count($openEnrollment).'" and Close Enrollment Policy count : "'.count($closeEnrollment).'"');
|
||||
|
||||
return $this->respond([
|
||||
'status' => true,
|
||||
'message' => 'updated Policy Enrollment Status',
|
||||
'message' => 'updated Open and Close Enrollment successfully',
|
||||
'open_policy_count' => count($openEnrollment),
|
||||
'close_policy_count' => count($closeEnrollment),
|
||||
'open_policy_ids' => $openEnrollment,
|
||||
|
||||
@ -98,7 +98,6 @@ class TicketController extends BaseController
|
||||
6 => "Trigger 6",
|
||||
7 => "Trigger 7"
|
||||
];
|
||||
|
||||
$this->placeHolders = [
|
||||
|
||||
'((ACM))' => 'acm',
|
||||
@ -109,6 +108,7 @@ class TicketController extends BaseController
|
||||
'((INSURED_NAME))' => 'insured_name',
|
||||
'((CLAIM_NO))' => 'claim_number',
|
||||
'((RELATIONSHIP))' => 'relationship',
|
||||
'((POLICY_TYPE))' => 'policy_type',
|
||||
];
|
||||
|
||||
$this->ticketMasterModel = new TicketMasterModel();
|
||||
@ -332,7 +332,7 @@ class TicketController extends BaseController
|
||||
if ($return_value) {
|
||||
//mail trigger part
|
||||
$mail_responce = $this->sendAutoMailTrigger($return_value);
|
||||
return $this->respond(['status' => true, 'code' => 200, 'data' => $ticket_data, "message" => "Claim created successfully", 'mail_responce' => $mail_responce], 200);
|
||||
return $this->respond(['status' => true, 'ticket_id' => $return_value, 'code' => 200, 'data' => $ticket_data, "message" => "Claim created successfully", 'mail_responce' => $mail_responce], 200);
|
||||
} else {
|
||||
return $this->respond(['status' => false, 'code' => 404, 'message' => 'Failed to create claim'], 200);
|
||||
}
|
||||
@ -502,6 +502,7 @@ class TicketController extends BaseController
|
||||
try {
|
||||
// Fetch Ticket Data
|
||||
$ticket_data = $this->ticketMasterModel->getTicketDataByTicketID($ticket_id);
|
||||
// print_r($ticket_data); die;
|
||||
|
||||
if (!$ticket_data) {
|
||||
$this->myLogger->logme('error', "No ticket data found for Ticket ID: $ticket_id");
|
||||
@ -512,6 +513,7 @@ class TicketController extends BaseController
|
||||
|
||||
// Fetch Email Template Data
|
||||
$template_data = $this->ticketMasterModel->getTemplateDataByTicketID($ticket_id);
|
||||
// print_r($template_data); die;
|
||||
|
||||
if (!$template_data) {
|
||||
$this->myLogger->logme('error', "No email template found for Claim Status ID: " . $ticket_data['claim_status_id']);
|
||||
@ -524,14 +526,18 @@ class TicketController extends BaseController
|
||||
$subject = $this->replacePlaceholders($template_data['subject'], $ticket_data);
|
||||
$message = $this->replacePlaceholders($template_data['mail_content'], $ticket_data);
|
||||
|
||||
// print_r($subject);
|
||||
// print_r($message);
|
||||
// die;
|
||||
|
||||
// Validate Essential Fields
|
||||
if (empty($ticket_data['emp_mail'])) {
|
||||
$this->myLogger->logme('error', "Employee email is missing for Ticket ID: $ticket_id");
|
||||
$this->myLogger->logme('error', "Employee email is missing for Ticket ID : '".$ticket_id ."'");
|
||||
return null;
|
||||
}
|
||||
|
||||
if (empty($subject) || empty($message)) {
|
||||
$this->myLogger->logme('error', "Generated email content is empty for Ticket ID: $ticket_id");
|
||||
$this->myLogger->logme('error', "Generated email content is empty for Ticket ID: '".$ticket_id ."'");
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -544,6 +550,8 @@ class TicketController extends BaseController
|
||||
'attachments' => []
|
||||
];
|
||||
|
||||
// print_r($mailData); die;
|
||||
|
||||
$this->myLogger->logme('error', "Final Email Data");
|
||||
|
||||
return $mailData;
|
||||
@ -559,10 +567,15 @@ class TicketController extends BaseController
|
||||
|
||||
if (!empty($ticket_data) && !empty($content)) {
|
||||
foreach ($this->placeHolders as $key => $value) {
|
||||
$replaceData = strtoupper($ticket_data[$value]) ?? '';
|
||||
|
||||
if ($value == "emp_code") {
|
||||
$replaceData = $ticket_data[$value] ?? '';
|
||||
}else if($value == "policy_type"){
|
||||
$replaceData = str_replace("Claim-", "", $this->ticketType[$ticket_data['ticket_type_id']] ?? "");
|
||||
}else{
|
||||
$replaceData = strtoupper($ticket_data[$value]) ?? '';
|
||||
}
|
||||
|
||||
$content = str_replace($key, $replaceData, $content);
|
||||
}
|
||||
}
|
||||
@ -576,8 +589,12 @@ class TicketController extends BaseController
|
||||
public function sendTrigger($mail_content)
|
||||
{
|
||||
$this->myLogger->logme('error', "Sending email with content");
|
||||
|
||||
$response = MailHelper::send_email($mail_content);
|
||||
if(!empty($mail_content)){
|
||||
$response = MailHelper::send_email($mail_content);
|
||||
}else{
|
||||
$response = ['status' => false, 'code' => 404, 'message' => "Mail not sent, mail data empty"];
|
||||
$this->myLogger->logme('error', "Mail not sent, mail data empty");
|
||||
}
|
||||
|
||||
$this->myLogger->logme('error', "Email sent response: " . json_encode($response));
|
||||
|
||||
@ -634,6 +651,7 @@ class TicketController extends BaseController
|
||||
$mail_responce = [];
|
||||
if (!empty($auto_mail_enable) && $auto_mail_enable['is_auto_mail'] == 1) {
|
||||
$mail_content = $this->constructMailContent($ticket_id);
|
||||
// print_r($mail_content); die;
|
||||
$mail_responce = $this->sendTrigger($mail_content);
|
||||
}elseif (!empty($auto_mail_enable) && $auto_mail_enable['is_auto_mail'] == 0 ){
|
||||
$this->myLogger->logme('error','Auto Mail Not Sent, Reason: Automail Not Enabled');
|
||||
|
||||
@ -5,6 +5,8 @@ namespace App\Helpers;
|
||||
|
||||
use App\Models\EmployeeModel;
|
||||
use App\Models\CDMasterModel;
|
||||
use App\Models\EmployeePolicyModel;
|
||||
use App\Models\TPAModel;
|
||||
|
||||
class ChatbotHelper
|
||||
{
|
||||
@ -19,9 +21,44 @@ class ChatbotHelper
|
||||
$client_branch_id = 126;
|
||||
$relationship ='Father';
|
||||
$EmployeeModel = new EmployeeModel();
|
||||
return $EmployeeModel->getEmpFamilybyEmpCode(emp_code: $emp_code,client_id: $client_id,emp_status: ['draft'],policy_status:['draft'],client_branch_id:[ $client_branch_id ],relationship:[$relationship]);
|
||||
return $EmployeeModel->getEmpFamilybyEmpCode(emp_code: $emp_code,client_id: $client_id,emp_status: ['draft'],policy_status:['draft'],client_branch_id:[ $client_branch_id ],relationship:[$relationship]);
|
||||
}
|
||||
|
||||
public static function getHospitalLink(){
|
||||
$client_policy_id = 336;
|
||||
$emp_id = 12288;
|
||||
$EmployeePolicyModel = new EmployeePolicyModel();
|
||||
return $EmployeePolicyModel->getHospitalLinkByPolicyandEmp(336,12288);
|
||||
}
|
||||
|
||||
public static function getPhoneNumber(){
|
||||
$emp_id = 12288;
|
||||
$EmployeeModel = new EmployeeModel();
|
||||
return $EmployeeModel->select('mobile')->where('id',$emp_id)->first()['mobile'];
|
||||
}
|
||||
|
||||
public static function get_payload_data(string $key = null)
|
||||
{
|
||||
// Get the request object using the service helper
|
||||
$request = service('request');
|
||||
|
||||
// Get the raw input (JSON or other data)
|
||||
$rawInput = $request->getBody();
|
||||
|
||||
// Check if the raw input is valid JSON
|
||||
$payload = json_decode($rawInput, true);
|
||||
|
||||
if (json_last_error() === JSON_ERROR_NONE) {
|
||||
// JSON is valid, return the requested key or the entire payload
|
||||
return $key ? ($payload[$key] ?? null) : $payload;
|
||||
} else {
|
||||
// JSON is invalid, fallback to raw input or POST data
|
||||
$payload = $request->getRawInput() ?: $request->getPost();
|
||||
return $key ? ($payload[$key] ?? null) : $payload;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -826,6 +826,7 @@ class EmployeePolicyModel extends Model
|
||||
employee_polices.rata_premimum as premium,
|
||||
employee_polices.claim_status,
|
||||
employee_polices.age_band,
|
||||
employee_polices.tpa_id,
|
||||
|
||||
|
||||
batch_data.emp_policy_id AS emp_policy_id,
|
||||
@ -1744,4 +1745,17 @@ class EmployeePolicyModel extends Model
|
||||
|
||||
return $result[0];
|
||||
}
|
||||
|
||||
public function getHospitalLinkByPolicyandEmp($client_policy_id,$emp_id){
|
||||
$data = $this->db->table('employee_polices')
|
||||
->select('tpa.network_hospitals')
|
||||
->where('client_policy_id', $client_policy_id)
|
||||
->where('employee_polices.is_active', 1)
|
||||
->join('tpa', 'tpa.id = employee_polices.tpa_id AND tpa.is_active = 1')
|
||||
->join('employees', 'employees.id = employee_polices.employee_id AND employees.id = ' . (int) $emp_id)
|
||||
->get()->getResultArray()[0];
|
||||
|
||||
// var_dump($this->db->getLastQuery());
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
@ -24,8 +24,8 @@
|
||||
var uid = Math.floor(100000 + Math.random() * 900000);
|
||||
console.log('CURRENT_USER' + uid);
|
||||
var botmanWidget = {
|
||||
chatServer: "https://localhost/PHP828APPS/ruc/nhance/chat", // Make sure this URL is correct
|
||||
frameEndpoint: 'https://localhost/PHP828APPS/ruc/nhance/widget', // This should match your CI4
|
||||
chatServer: `<?=base_url('chat')?>`, // Make sure this URL is correct
|
||||
frameEndpoint: `<?=base_url('widget')?>`, // This should match your CI4
|
||||
title: "Ask ஆதிரை",
|
||||
introMessage: "",
|
||||
bubbleBackground: "#007bff",
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<!-- Header Section -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-6 d-flex align-items-center">
|
||||
<h4 class="mb-0">Ticket</h4>
|
||||
<h4 class="mb-0">Claims</h4>
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
<a href="<?= base_url('ticket/list'); ?>" aria-label="Back to ticket list">
|
||||
|
||||
@ -63,20 +63,20 @@
|
||||
<div class="form-group col-md-3">
|
||||
<label for="client_name">Corporate Name<span class="text-danger"></span></label>
|
||||
<input type="hidden" id="client_id" name="client_id" value="<?= isset($ticket_data['client_id']) ? $ticket_data['client_id'] : '' ?>">
|
||||
<input type="text" class="form-control" id="client_name" placeholder="Client" value="<?= isset($ticket_data['client_name']) ? $ticket_data['client_name'] : '' ?>">
|
||||
<input type="text" class="form-control" id="client_name" placeholder="Client" value="<?= isset($ticket_data['client_name']) ? $ticket_data['client_name'] : '' ?>" readonly>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="insurer_id">Insurer<span class="text-danger"></span></label>
|
||||
<input type=hidden id="insurer_id" name="insurer_id" value="<?= isset($ticket_data['insurer_id']) ? $ticket_data['insurer_id'] : '' ?>">
|
||||
<input type=text class="form-control" id="insurer_name" placeholder="Insurer" value="<?= isset($ticket_data['insurer_name']) ? $ticket_data['insurer_name'] : '' ?>">
|
||||
<input type=text class="form-control" id="insurer_name" placeholder="Insurer" value="<?= isset($ticket_data['insurer_name']) ? $ticket_data['insurer_name'] : '' ?>" readonly>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="policy_no">Policy No<span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="policy_no"
|
||||
value="<?= isset($ticket_data['policy_no']) ? $ticket_data['policy_no'] : '' ?>"
|
||||
name="policy_no" readonly>
|
||||
name="policy_no">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
@ -127,6 +127,20 @@
|
||||
name="emp_name">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="emp_mobile">Employee Mobile No<span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="emp_mobile" placeholder="Enter EMP Mobile"
|
||||
value="<?= isset($ticket_data['emp_mobile']) ? $ticket_data['emp_mobile'] : '' ?>"
|
||||
name="emp_mobile">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="emp_mail">Employee Mail ID<span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="emp_mail" placeholder="Enter EMP Mail"
|
||||
value="<?= isset($ticket_data['emp_mail']) ? $ticket_data['emp_mail'] : '' ?>"
|
||||
name="emp_mail">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="date_of_join">Date of joining<span class="text-danger"></span></label>
|
||||
|
||||
@ -257,7 +257,16 @@ function toggleAccordion(id) {
|
||||
const content = document.getElementById(id);
|
||||
const arrow = document.querySelector(`#${id === 'mobileAccordion' ? 'mobileArrow' : 'clientBranchArrow'}`);
|
||||
|
||||
// Toggle the display of the accordion content
|
||||
// Define the other accordion to close
|
||||
const otherId = id === 'mobileAccordion' ? 'clientBranchAccordion' : 'mobileAccordion';
|
||||
const otherContent = document.getElementById(otherId);
|
||||
const otherArrow = document.querySelector(`#${id === 'mobileAccordion' ? 'clientBranchArrow' : 'mobileArrow'}`);
|
||||
|
||||
// Close the other accordion
|
||||
otherContent.classList.remove('show');
|
||||
otherArrow.classList.remove('rotate');
|
||||
|
||||
// Toggle the current accordion
|
||||
if (content.classList.contains('show')) {
|
||||
content.classList.remove('show');
|
||||
arrow.classList.remove('rotate');
|
||||
@ -267,6 +276,7 @@ function toggleAccordion(id) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function openFetchEmpDataodal() {
|
||||
var myModal = new bootstrap.Modal(document.getElementById('empDetailsModal'));
|
||||
myModal.show();
|
||||
@ -343,6 +353,7 @@ function appendBranch(data) {
|
||||
//append the clients policy data to the modal
|
||||
function appendPolicy(data) {
|
||||
|
||||
let ticket_type = $('#ticket_type_id').val();
|
||||
$('#emp_client_policy_data_list').empty();
|
||||
|
||||
$('#emp_client_policy_data_list').append($('<option>', {
|
||||
@ -351,12 +362,53 @@ function appendPolicy(data) {
|
||||
}));
|
||||
|
||||
$.each(data, function(index, item) {
|
||||
var option = $('<option>', {
|
||||
value: item.id,
|
||||
text: item.policy_type + '-' + item.policy_no,
|
||||
});
|
||||
|
||||
$('#emp_client_policy_data_list').append(option).select2();
|
||||
if(ticket_type == 1){
|
||||
|
||||
if(item.policy_type_id == 2 || item.policy_type_id == 3 || item.policy_type_id == 4 ||item.policy_type_id == 5) {
|
||||
var option = $('<option>', {
|
||||
value: item.id,
|
||||
text: item.policy_type + '-' + item.policy_no,
|
||||
});
|
||||
|
||||
$('#emp_client_policy_data_list').append(option).select2();
|
||||
}
|
||||
|
||||
}else if(ticket_type == 2){
|
||||
|
||||
if(item.policy_type_id == 1) {
|
||||
var option = $('<option>', {
|
||||
value: item.id,
|
||||
text: item.policy_type + '-' + item.policy_no,
|
||||
});
|
||||
|
||||
$('#emp_client_policy_data_list').append(option).select2();
|
||||
}
|
||||
|
||||
}else if(ticket_type == 3){
|
||||
|
||||
if(item.policy_type_id == 6) {
|
||||
var option = $('<option>', {
|
||||
value: item.id,
|
||||
text: item.policy_type + '-' + item.policy_no,
|
||||
});
|
||||
|
||||
$('#emp_client_policy_data_list').append(option).select2();
|
||||
}
|
||||
|
||||
}else if(ticket_type == 4){
|
||||
|
||||
if(item.policy_type == 7) {
|
||||
var option = $('<option>', {
|
||||
value: item.id,
|
||||
text: item.policy_type + '-' + item.policy_no,
|
||||
});
|
||||
|
||||
$('#emp_client_policy_data_list').append(option).select2();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
@ -428,6 +480,7 @@ function getEmpData(input) {
|
||||
if (response.status) {
|
||||
console.log(response.message, 'SUCCESS');
|
||||
appendEmployee(response.data, 'search_by_client_employee');
|
||||
setClientAndInsurerData(response.dataForClientAndInsurer);
|
||||
} else {
|
||||
toastr.warning(response.message, 'WARNING');
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ table.dataTable tbody td {
|
||||
placeholder="Template Name" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="emp_code">Policy Type</label>
|
||||
<select class="form-control" id="policy_type" name="ticket_type" required>
|
||||
<option value="">Select Policy Type</option>
|
||||
@ -144,7 +144,7 @@ table.dataTable tbody td {
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-2">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="trigger_type">Trigger Type</label>
|
||||
<select class="form-control" id="trigger_type" name="trigger_type" required>
|
||||
<option value="">Select status</option>
|
||||
@ -158,7 +158,7 @@ table.dataTable tbody td {
|
||||
</select> <input id="primaryKey" type="hidden">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<div class="form-group col-md-2">
|
||||
<div>
|
||||
<div id="statusSwitchWrapper" class="dt-switch-wrapper"
|
||||
style="padding-top: 40px;padding-left: 10px;">
|
||||
@ -480,7 +480,7 @@ function getMailTemplateData(id) {
|
||||
$('#template_name').val(res.data.template_name);
|
||||
$('#primaryKey').val(res.data.id);
|
||||
$('#policy_type').val(res.data.ticket_type).change();
|
||||
$('#trigger_type').val(res.data.ticket_type).change();
|
||||
$('#trigger_type').val(res.data.trigger_type).change();
|
||||
$('.jodit-wysiwyg').html(res.data.mail_content);
|
||||
|
||||
// Set the auto mail switch
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<!-- Email To Field -->
|
||||
<div class="form-group col-md-4">
|
||||
<label for="emp_mail_for_to">To</label>
|
||||
<input type="text" value="<?= isset($reply_data['emp_mail'])?$reply_data['emp_mail']:'' ?>" class="form-control" id="emp_mail_for_to" name="emp_mail" placeholder="Recipient email" readonly>
|
||||
<input type="text" value="<?= isset($ticket_data['emp_mail'])?$ticket_data['emp_mail']:'' ?>" class="form-control" id="emp_mail_for_to" name="emp_mail" placeholder="Recipient email" readonly>
|
||||
</div>
|
||||
|
||||
<!-- Subject Field -->
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
"psr/http-message": "^1.0",
|
||||
"psr/log": "^1.1",
|
||||
"slim/slim": "^4.13",
|
||||
"symfony/cache": "^7.2",
|
||||
"symfony/cache": "^6.0",
|
||||
"zircote/swagger-php": "^4.8"
|
||||
},
|
||||
"require-dev": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user