CHANGE_CLAIM_MODULE : RV
This commit is contained in:
parent
4c6b9f27f8
commit
dd40409463
@ -4253,23 +4253,7 @@ class ClientController extends AdminController
|
||||
|
||||
if(!empty($data) && count($data) > 0){
|
||||
|
||||
$memberData = $this->employeeModel
|
||||
->select("
|
||||
employees.id AS emp_id,
|
||||
employees.name AS emp_name,
|
||||
employees.emp_code,
|
||||
employees.mobile AS emp_mobile,
|
||||
employees.email_corporate AS emp_email,
|
||||
employees.relationship AS emp_relationship,
|
||||
employee_polices.uhid AS policy_no,
|
||||
employee_polices.tpa_id AS tpa_no
|
||||
")
|
||||
->join('employee_polices', 'employees.id = employee_polices.employee_id', 'left')
|
||||
->where('employees.is_active', 1)
|
||||
->where('employee_polices.is_active', 1)
|
||||
->where('employees.emp_code', $data['emp_code'])
|
||||
->groupBy('employees.id')
|
||||
->findAll();
|
||||
$memberData = $this->employeeModel->getEmployeeByEmployeeCode($data['emp_code']);
|
||||
|
||||
$acms = $this->clientRMModel
|
||||
->select('user_profiles.id, user_profiles.first_name')
|
||||
|
||||
@ -15,13 +15,14 @@ use App\Models\UserModel;
|
||||
use DOMDocument;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Kint\Kint;
|
||||
use App\Models\EmployeeModel;
|
||||
|
||||
use App\Helpers\MailHelper;
|
||||
|
||||
use CodeIgniter\API\ResponseTrait;
|
||||
|
||||
class TicketController extends BaseController
|
||||
{
|
||||
{
|
||||
use ResponseTrait;
|
||||
|
||||
protected $myLogger;
|
||||
@ -32,7 +33,7 @@ class TicketController extends BaseController
|
||||
protected $claimType;
|
||||
protected $claimStatus;
|
||||
protected $placeHolders;
|
||||
|
||||
|
||||
protected $clientModel;
|
||||
protected $ticketMasterModel;
|
||||
protected $ticketHistoryModel;
|
||||
@ -41,6 +42,7 @@ class TicketController extends BaseController
|
||||
protected $ticketNoteModel;
|
||||
protected $triggerType;
|
||||
protected $userModel;
|
||||
protected $employeeModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@ -50,11 +52,11 @@ class TicketController extends BaseController
|
||||
|
||||
$this->ticketType = [1 => "Claim-GMC", 2 => "Claim-GPA", 3 => "EDLI", 4 => "GTLI"];
|
||||
$this->priorityType = [
|
||||
1 => "Low",
|
||||
2 => "Medium",
|
||||
3 => "High",
|
||||
4 => "Urgent",
|
||||
5 => "Emergency",
|
||||
1 => "Low",
|
||||
2 => "Medium",
|
||||
3 => "High",
|
||||
4 => "Urgent",
|
||||
5 => "Emergency",
|
||||
6 => "Critical"
|
||||
];
|
||||
$this->relationshipType = [
|
||||
@ -68,9 +70,9 @@ class TicketController extends BaseController
|
||||
"mother-in-law" => "Mother-in-Law"
|
||||
];
|
||||
$this->modeOFIntimate = [
|
||||
1 => "In Person",
|
||||
2 => "Courier",
|
||||
3 => "Online Mode - Email",
|
||||
1 => "In Person",
|
||||
2 => "Courier",
|
||||
3 => "Online Mode - Email",
|
||||
4 => "Online Mode - To TPA"
|
||||
];
|
||||
$this->claimType = [
|
||||
@ -98,14 +100,15 @@ class TicketController extends BaseController
|
||||
];
|
||||
|
||||
$this->placeHolders = [
|
||||
|
||||
|
||||
'((ACM))' => 'acm',
|
||||
'((ACM_CONTACT))' => 'acm_mobile',
|
||||
'((EMPLOYEE_NAME)' => 'emp_name',
|
||||
'((EMPLOYEE_NAME))' => 'emp_name',
|
||||
'((EMPLOYEE_ID))' => 'emp_code',
|
||||
'((CORPORATE_NAME))' => 'client_name',
|
||||
'((INSURED_NAME]' => 'insured_emp_name',
|
||||
'((CLAIM_NO))' => 'claim_no',
|
||||
'((INSURED_NAME))' => 'insured_name',
|
||||
'((CLAIM_NO))' => 'claim_number',
|
||||
'((RELATIONSHIP))' => 'relationship',
|
||||
];
|
||||
|
||||
$this->ticketMasterModel = new TicketMasterModel();
|
||||
@ -116,20 +119,19 @@ class TicketController extends BaseController
|
||||
$this->ticketNoteModel = new TicketNoteModel();
|
||||
$this->ticketMessageModel = new TicketMessageModel();
|
||||
$this->userModel = new UserModel();
|
||||
|
||||
$this->employeeModel = new EmployeeModel();
|
||||
}
|
||||
|
||||
public function ticketList()
|
||||
{
|
||||
{
|
||||
if ($this->request->is('get')) {
|
||||
$data['page_name'] = "Claims";
|
||||
$data['ticket_type'] = $this->ticketType;
|
||||
$data['claim_status'] = $this->claimStatus->select('id,ticket_type,claim_status')->where('is_active',1)->findAll();
|
||||
$data['client_list'] = $this->clientModel->select('id,client_name')->where('is_active',1)->findAll();
|
||||
$data['claim_status'] = $this->claimStatus->select('id,ticket_type,claim_status')->where('is_active', 1)->findAll();
|
||||
$data['client_list'] = $this->clientModel->select('id,client_name')->where('is_active', 1)->findAll();
|
||||
|
||||
return $this->loadLayout('ticket_search', $data);
|
||||
|
||||
} else{
|
||||
} else {
|
||||
|
||||
$data['ticket_data'] = $this->ticketSearch();
|
||||
$html = view('ticket_list', $data);
|
||||
@ -149,16 +151,16 @@ class TicketController extends BaseController
|
||||
}
|
||||
// print_rr($where);
|
||||
$data = $this->ticketMasterModel
|
||||
->select('ticket_master.id, ticket_claim_status.claim_status as status,
|
||||
->select('ticket_master.id, ticket_claim_status.claim_status as status,
|
||||
ticket_master.claim_number as claim_no,ticket_master.tpa_id,ticket_master.emp_name,
|
||||
insurers.name as insurer_name, clients.client_name,
|
||||
DATE_FORMAT(ticket_master.created_at, "%d-%m-%Y") as tat')
|
||||
->join('insurers', 'insurers.id = ticket_master.insurer_id and insurers.is_active = 1', 'left')
|
||||
->join('clients', 'clients.id = ticket_master.client_id and clients.is_active = 1', 'left')
|
||||
->join('ticket_claim_status', 'ticket_claim_status.id = ticket_master.claim_status_id and ticket_claim_status.is_active = 1', 'left')
|
||||
->where('ticket_master.is_active', 1)
|
||||
->where($where)
|
||||
->findAll();
|
||||
->join('insurers', 'insurers.id = ticket_master.insurer_id and insurers.is_active = 1', 'left')
|
||||
->join('clients', 'clients.id = ticket_master.client_id and clients.is_active = 1', 'left')
|
||||
->join('ticket_claim_status', 'ticket_claim_status.id = ticket_master.claim_status_id and ticket_claim_status.is_active = 1', 'left')
|
||||
->where('ticket_master.is_active', 1)
|
||||
->where($where)
|
||||
->findAll();
|
||||
// print_rr($data);
|
||||
// log_message('error',' Claims Master Data '.json_encode($data));die();
|
||||
// print_rr($data);die();
|
||||
@ -168,62 +170,79 @@ class TicketController extends BaseController
|
||||
public function ticket_form($ticket_type)
|
||||
{
|
||||
$data = $this->ticket_form_data($ticket_type);
|
||||
// dd($data);
|
||||
return $this->loadLayout('ticket_form_handler', $data);
|
||||
}
|
||||
|
||||
public function ticket_form_data($ticket_type)
|
||||
{
|
||||
$data['ticket_form'] = 1;
|
||||
$data['ticket_type'] = $this->ticketType;
|
||||
$data['priorityType'] = $this->priorityType;
|
||||
$data['relationshipType'] = $this->relationshipType;
|
||||
$data['modeOFIntimate'] = $this->modeOFIntimate;
|
||||
{
|
||||
$this->myLogger->logme('error', "Fetching ticket form data for Ticket Type: $ticket_type");
|
||||
|
||||
$data['acms'] = db_connect()->table('user_profiles')
|
||||
->select('user_profiles.id, user_profiles.first_name')
|
||||
->where('user_profiles.is_active', 1)
|
||||
->where('user_profiles.role', 3)
|
||||
->get()
|
||||
->getResultArray();
|
||||
$data = [
|
||||
'ticket_form' => 1,
|
||||
'selected_ticket_type' => $ticket_type,
|
||||
'ticket_type' => $this->ticketType,
|
||||
'priorityType' => $this->priorityType,
|
||||
'relationshipType' => $this->relationshipType,
|
||||
'modeOFIntimate' => $this->modeOFIntimate
|
||||
];
|
||||
|
||||
$data['claim_status'] = $this->claimStatus
|
||||
->select('ticket_claim_status.*')
|
||||
->where('ticket_claim_status.is_active', 1)
|
||||
->where('ticket_claim_status.ticket_type', $ticket_type)
|
||||
->get()
|
||||
->getResultArray();
|
||||
|
||||
if($ticket_type == 1){
|
||||
$data['claim_type'] = $this->claimType[1];
|
||||
}else{
|
||||
$data['claim_type'] = $this->claimType[2];
|
||||
if($ticket_type == 2){
|
||||
switch ($ticket_type) {
|
||||
case 2:
|
||||
$data['ticket_form'] = 'GPA';
|
||||
}else if($ticket_type = 3){
|
||||
$data['ticket_form'] == 'EDLI';
|
||||
}else if($ticket_type = 4){
|
||||
break;
|
||||
case 3:
|
||||
$data['ticket_form'] = 'EDLI';
|
||||
break;
|
||||
case 4:
|
||||
$data['ticket_form'] = 'GTLI';
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Fetch ACM Users
|
||||
$db = db_connect();
|
||||
$data['acms'] = $db->table('user_profiles')
|
||||
->select('id, first_name')
|
||||
->where(['is_active' => 1, 'role' => 3])
|
||||
->get()
|
||||
->getResultArray();
|
||||
|
||||
// Fetch Claim Status
|
||||
$data['claim_status'] = $this->claimStatus
|
||||
->select('*')
|
||||
->where(['is_active' => 1, 'ticket_type' => $ticket_type])
|
||||
->get()
|
||||
->getResultArray();
|
||||
|
||||
if ($ticket_type == 1) {
|
||||
$data['claim_type'] = $this->claimType[1];
|
||||
} else {
|
||||
$data['claim_type'] = $this->claimType[2];
|
||||
}
|
||||
|
||||
$this->myLogger->logme('error', "Ticket form data fetched successfully for Ticket Type: $ticket_type");
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
public function view_ticket($ticket_id)
|
||||
{
|
||||
$ticket_data = $this->ticketMasterModel->where('id', $ticket_id)->where('is_active', 1)->first();
|
||||
// $ticket_data = $this->ticketMasterModel->where('id', $ticket_id)->where('is_active', 1)->first();
|
||||
$ticket_data = $this->ticketMasterModel->getTicketDataByTicketID($ticket_id);
|
||||
$ticket_data = $this->formatDateForClaim($ticket_data, 'd/m/Y');
|
||||
// dd($ticket_data);
|
||||
$template_data = $this->ticketMasterModel->getTemplateDataByTicketID($ticket_id);
|
||||
$template_data['mail_content'] = $this->replacePlaceholders($template_data['mail_content'], $ticket_data);
|
||||
$template_data['subject'] = $this->replacePlaceholders($template_data['subject'], $ticket_data);
|
||||
|
||||
$data = $this->ticket_form_data($ticket_data['ticket_type_id']);
|
||||
$data['ticket_data'] = $ticket_data;
|
||||
$data['reply_data'] = $this->ticketMasterModel
|
||||
->join('ticket_claim_status','ticket_master.claim_status_id = ticket_claim_status.id and ticket_claim_status.is_active = 1')
|
||||
->join('ticket_mail_template','ticket_claim_status.trigger_type = ticket_mail_template.trigger_type and ticket_claim_status.ticket_type = ticket_mail_template.ticket_type and ticket_mail_template.is_active = 1')
|
||||
->where('ticket_master.id',$ticket_id)
|
||||
->where('ticket_master.is_active',1)
|
||||
->first();
|
||||
$data['reply_data'] = $template_data;
|
||||
$data['placeHolders'] = $this->placeHolders;
|
||||
$data['message_data'] = $this->getTicketMessage($ticket_id);
|
||||
$data['view_ticket_page'] = [];
|
||||
$data['member_data'] = $this->employeeModel->getEmployeeByEmployeeCode($ticket_data['emp_code']);
|
||||
|
||||
// dd($data);
|
||||
|
||||
return $this->loadLayout('ticket_edit_onbording', $data);
|
||||
@ -232,244 +251,365 @@ class TicketController extends BaseController
|
||||
public function formatDateForClaim($ticket_data, $out_put_format = 'Y-m-d')
|
||||
{
|
||||
|
||||
if(empty($ticket_data['doa'])){
|
||||
if (empty($ticket_data['doa'])) {
|
||||
$ticket_data['doa'] = null;
|
||||
}else{
|
||||
} else {
|
||||
$ticket_data['doa'] = change_date_format($ticket_data['doa'], null, $out_put_format);
|
||||
}
|
||||
|
||||
if(empty($ticket_data['dod'])){
|
||||
if (empty($ticket_data['dod'])) {
|
||||
$ticket_data['dod'] = null;
|
||||
}else{
|
||||
} else {
|
||||
$ticket_data['dod'] = change_date_format($ticket_data['dod'], null, $out_put_format);
|
||||
}
|
||||
|
||||
if(empty($ticket_data['dob'])){
|
||||
if (empty($ticket_data['dob'])) {
|
||||
$ticket_data['dob'] = null;
|
||||
}else{
|
||||
} else {
|
||||
$ticket_data['dob'] = change_date_format($ticket_data['dob'], null, $out_put_format);
|
||||
}
|
||||
|
||||
if(empty($ticket_data['date_of_join'])){
|
||||
if (empty($ticket_data['date_of_join'])) {
|
||||
$ticket_data['date_of_join'] = null;
|
||||
}else{
|
||||
} else {
|
||||
$ticket_data['date_of_join'] = change_date_format($ticket_data['date_of_join'], null, $out_put_format);
|
||||
}
|
||||
|
||||
if(empty($ticket_data['date_of_incep'])){
|
||||
if (empty($ticket_data['date_of_incep'])) {
|
||||
$ticket_data['date_of_incep'] = null;
|
||||
}else{
|
||||
} else {
|
||||
$ticket_data['date_of_incep'] = change_date_format($ticket_data['date_of_incep'], null, $out_put_format);
|
||||
}
|
||||
|
||||
if(empty($ticket_data['date_of_accident'])){
|
||||
if (empty($ticket_data['date_of_accident'])) {
|
||||
$ticket_data['date_of_accident'] = null;
|
||||
}else{
|
||||
} else {
|
||||
$ticket_data['date_of_accident'] = change_date_format($ticket_data['date_of_accident'], null, $out_put_format);
|
||||
}
|
||||
|
||||
if(empty($ticket_data['date_of_death'])){
|
||||
if (empty($ticket_data['date_of_death'])) {
|
||||
$ticket_data['date_of_death'] = null;
|
||||
}else{
|
||||
} else {
|
||||
$ticket_data['date_of_death'] = change_date_format($ticket_data['date_of_death'], null, $out_put_format);
|
||||
}
|
||||
|
||||
if(empty($ticket_data['date_of_intimat'])){
|
||||
if (empty($ticket_data['date_of_intimat'])) {
|
||||
$ticket_data['date_of_intimat'] = null;
|
||||
}else{
|
||||
} else {
|
||||
$ticket_data['date_of_intimat'] = change_date_format($ticket_data['date_of_intimat'], null, $out_put_format);
|
||||
}
|
||||
|
||||
|
||||
return $ticket_data;
|
||||
}
|
||||
|
||||
public function createTicket()
|
||||
{
|
||||
{
|
||||
$ticket_data = $this->request->getPost();
|
||||
$ticket_data = $this->formatDateForClaim($ticket_data);
|
||||
// print_rr($ticket_data); die;
|
||||
|
||||
if($ticket_data){
|
||||
$return_value = $this->ticketMasterModel->insert($ticket_data);
|
||||
if($return_value){
|
||||
return $this->respond(['status' => true, 'code' => 200, 'data' => $ticket_data, "message" => "Claim created successfully"], 200);
|
||||
} else {
|
||||
return $this->respond(['status' => false, 'code' => 404, 'message' => 'Failed to create claim'], 200);
|
||||
}
|
||||
}else{
|
||||
if ($ticket_data) {
|
||||
$return_value = $this->ticketMasterModel->insert($ticket_data);
|
||||
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);
|
||||
} else {
|
||||
return $this->respond(['status' => false, 'code' => 404, 'message' => 'Failed to create claim'], 200);
|
||||
}
|
||||
} else {
|
||||
return $this->respond(['status' => false, 'code' => 404, 'message' => 'claim data not found'], 200);
|
||||
}
|
||||
}
|
||||
|
||||
public function updateTicket()
|
||||
{
|
||||
{
|
||||
$ticket_id = $this->request->getPost('ticket_master_id');
|
||||
$ticket_data = $this->request->getPost();
|
||||
$ticket_data = $this->formatDateForClaim($ticket_data);
|
||||
// print_rr($ticket_data); die;
|
||||
$old_ticket_data = $this->ticketMasterModel->where('id', $ticket_id)->where('is_active', 1)->first();
|
||||
|
||||
if($ticket_data){
|
||||
$return_value = $this->ticketMasterModel->where('id', $ticket_id)->set($ticket_data)->update();
|
||||
if($return_value){
|
||||
return $this->respond(['status' => true, 'code' => 200, 'data' => $ticket_data, "message" => "Claim updated successfully"], 200);
|
||||
} else {
|
||||
return $this->respond(['status' => false, 'code' => 404, 'message' => 'Failed to update claim'], 200);
|
||||
}
|
||||
}else{
|
||||
if ($ticket_data) {
|
||||
$return_value = $this->ticketMasterModel->where('id', $ticket_id)->set($ticket_data)->update();
|
||||
if ($return_value) {
|
||||
|
||||
//mail trigger part
|
||||
$mail_responce = $this->sendAutoMailTrigger($ticket_id);
|
||||
|
||||
return $this->respond(['status' => true, 'code' => 200, 'data' => $ticket_data, "message" => "Claim updated successfully", 'mail_responce' =>$mail_responce], 200);
|
||||
} else {
|
||||
return $this->respond(['status' => false, 'code' => 404, 'message' => 'Failed to update claim'], 200);
|
||||
}
|
||||
} else {
|
||||
return $this->respond(['status' => false, 'code' => 404, 'message' => 'claim data not found'], 200);
|
||||
}
|
||||
}
|
||||
|
||||
public function mailTemplate()
|
||||
{
|
||||
$data = [];
|
||||
$data['trigger_type'] = $this->triggerType;
|
||||
$data['policy_type'] = $this->ticketType;
|
||||
$data['placeHolders'] = $this->placeHolders;
|
||||
$data['ticket_data'] = $this->ticketMailTemplateModel->where('is_active',1)->findAll();
|
||||
$data['ticket_type'] = $this->ticketType;
|
||||
$data['trigger_type'] = $this->triggerType;
|
||||
return $this->loadLayout('ticket_mail_template', $data);
|
||||
$data = [];
|
||||
$data['trigger_type'] = $this->triggerType;
|
||||
$data['policy_type'] = $this->ticketType;
|
||||
$data['placeHolders'] = $this->placeHolders;
|
||||
$data['ticket_data'] = $this->ticketMailTemplateModel->where('is_active', 1)->findAll();
|
||||
$data['ticket_type'] = $this->ticketType;
|
||||
$data['trigger_type'] = $this->triggerType;
|
||||
return $this->loadLayout('ticket_mail_template', $data);
|
||||
}
|
||||
|
||||
public function crudTemplate($action){
|
||||
public function crudTemplate($action)
|
||||
{
|
||||
//action 1 is create. action 2 is edit and action 3 is delete
|
||||
if ($action == 1){
|
||||
if ($action == 1) {
|
||||
$received_data = $this->request->getPost();
|
||||
if (isset($received_data['id']) && $received_data['id'] != '' ){
|
||||
if (isset($received_data['id']) && $received_data['id'] != '') {
|
||||
$status = $this->ticketMailTemplateModel->save($received_data);
|
||||
if ($status){
|
||||
return $this->respond(['status'=> true],200);
|
||||
}else{
|
||||
return $this->respond(['status' => false],200);
|
||||
if ($status) {
|
||||
return $this->respond(['status' => true], 200);
|
||||
} else {
|
||||
return $this->respond(['status' => false], 200);
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
$status = $this->ticketMailTemplateModel->save($received_data);
|
||||
if ($status){
|
||||
return $this->respond(['status'=> true],200);
|
||||
}else{
|
||||
return $this->respond(['status' => false],200);
|
||||
if ($status) {
|
||||
return $this->respond(['status' => true], 200);
|
||||
} else {
|
||||
return $this->respond(['status' => false], 200);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
elseif ($action == 2){
|
||||
} elseif ($action == 2) {
|
||||
$table_id = (int)$this->request->getPost('id');
|
||||
$data = $this->ticketMailTemplateModel->where('id',$table_id)->where('is_active',1)->first();
|
||||
if ($data){
|
||||
return $this->respond(['status' => true,'data'=> $data],200);
|
||||
}else{
|
||||
return $this->respond(['status' => false],404);
|
||||
$data = $this->ticketMailTemplateModel->where('id', $table_id)->where('is_active', 1)->first();
|
||||
if ($data) {
|
||||
return $this->respond(['status' => true, 'data' => $data], 200);
|
||||
} else {
|
||||
return $this->respond(['status' => false], 404);
|
||||
}
|
||||
}
|
||||
elseif ($action == 3){
|
||||
} elseif ($action == 3) {
|
||||
$table_id = (int)$this->request->getPost('id');
|
||||
|
||||
|
||||
$sql = "update ticket_mail_template set is_active = 0 where id = $table_id ";
|
||||
$status = $this->ticketMailTemplateModel->query($sql);
|
||||
if($status){
|
||||
return $this->respond(['status'=> true],200);
|
||||
}else{
|
||||
return $this->respond(['status' => false],404);
|
||||
$status = $this->ticketMailTemplateModel->query($sql);
|
||||
if ($status) {
|
||||
return $this->respond(['status' => true], 200);
|
||||
} else {
|
||||
return $this->respond(['status' => false], 404);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function crudNote($action){
|
||||
public function crudNote($action)
|
||||
{
|
||||
// action = 1 is read, action 2 is insert/update
|
||||
if ($action == 1){
|
||||
if ($action == 1) {
|
||||
$ticket_master_id = $this->request->getPost('id');
|
||||
if (isset($ticket_master_id) && $ticket_master_id != ''){
|
||||
$data = $this->ticketNoteModel->where('is_active',1)->where('ticket_id',$ticket_master_id)->first();
|
||||
if ($data){
|
||||
return $this->respond(['status' => true, 'data' => $data],200);
|
||||
}else{
|
||||
return $this->respond(['status' => false],404);
|
||||
if (isset($ticket_master_id) && $ticket_master_id != '') {
|
||||
$data = $this->ticketNoteModel->where('is_active', 1)->where('ticket_id', $ticket_master_id)->first();
|
||||
if ($data) {
|
||||
return $this->respond(['status' => true, 'data' => $data], 200);
|
||||
} else {
|
||||
return $this->respond(['status' => false], 200);
|
||||
}
|
||||
}
|
||||
|
||||
}elseif ($action == 2){
|
||||
} elseif ($action == 2) {
|
||||
$data = $this->request->getPost();
|
||||
// if (isset($data['id']) && $data['id'] != ''){
|
||||
$status = $this->ticketNoteModel->save($data);
|
||||
$status = $this->ticketNoteModel->save($data);
|
||||
// }
|
||||
if ($status){
|
||||
return $this->respond(['status'=>true],200);
|
||||
}else{
|
||||
return $this->respond(['status'=>false],404);
|
||||
if ($status) {
|
||||
return $this->respond(['status' => true], 200);
|
||||
} else {
|
||||
return $this->respond(['status' => false], 200);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function saveReply(){
|
||||
public function saveReply()
|
||||
{
|
||||
|
||||
$received_data = $this->request->getPost();
|
||||
// print_r($received_data); die;
|
||||
$received_data['sender'] = 'staff';
|
||||
$status = $this->ticketMessageModel->save($received_data);
|
||||
if ($status){
|
||||
return $this->respond(['status' => true,'code'=>200],200);
|
||||
}else{
|
||||
return $this->respond(['status' => false,'code' => 404],404);
|
||||
$status = $this->ticketMessageModel->insert($received_data);
|
||||
if ($status) {
|
||||
$return = $this->sendReplyMessage($received_data);
|
||||
return $this->respond(['status' => true, 'code' => 200, 'return' => $return], 200);
|
||||
} else {
|
||||
return $this->respond(['status' => false, 'code' => 404], 404);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getTicketMessage($ticket_master_id){
|
||||
|
||||
public function getTicketMessage($ticket_master_id)
|
||||
{
|
||||
// log_message('error','Function called');die();
|
||||
// $ticket_master_id = $this->request->getPost('id');
|
||||
$user_id = get_session_userid();
|
||||
$logged_user = $this->userModel->select('first_name,last_name,profile')->where('id',$user_id)->first();
|
||||
$logged_user = $this->userModel->select('first_name,last_name,profile')->where('id', $user_id)->first();
|
||||
$dataToSend = [];
|
||||
$dataToSend['user_name'] = $logged_user['first_name'].' '.$logged_user['last_name'];
|
||||
$dataToSend['messages'] = $this->ticketMessageModel->where('is_active',1)
|
||||
->where('ticket_id',$ticket_master_id)->orderBy('created_at', 'DESC')
|
||||
->findAll();
|
||||
foreach ($dataToSend['messages'] as $message){
|
||||
$dataToSend['user_name'] = $logged_user['first_name'] . ' ' . $logged_user['last_name'];
|
||||
$dataToSend['messages'] = $this->ticketMessageModel->where('is_active', 1)
|
||||
->where('ticket_id', $ticket_master_id)->orderBy('created_at', 'DESC')
|
||||
->findAll();
|
||||
foreach ($dataToSend['messages'] as $message) {
|
||||
$mail_content_converted = $this->convertHtmlToText($message['mail_content']);
|
||||
$message['mail_content'] = $mail_content_converted;
|
||||
}
|
||||
$dataToSend['emp_name'] = $this->ticketMasterModel->select('emp_name')
|
||||
->where('id',$ticket_master_id)->where('is_active',1)
|
||||
->first()['emp_name'];
|
||||
->where('id', $ticket_master_id)->where('is_active', 1)
|
||||
->first()['emp_name'];
|
||||
// dd($dataToSend);
|
||||
if($dataToSend){
|
||||
if ($dataToSend) {
|
||||
return $dataToSend;
|
||||
}else{
|
||||
} else {
|
||||
$data = [];
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function convertHtmlToText($html) {
|
||||
public function convertHtmlToText($html)
|
||||
{
|
||||
$dom = new DOMDocument();
|
||||
@$dom->loadHTML($html);
|
||||
return strip_tags($dom->saveHTML());
|
||||
}
|
||||
|
||||
public function sendTringger($ticket_id = 13)
|
||||
{
|
||||
$ticket_data = $this->ticketMasterModel->where('id', $ticket_id)->where('is_active', 1)->first();
|
||||
|
||||
$template_data = $this->claimStatus
|
||||
->select('ticket_mail_template.*')
|
||||
->join('ticket_mail_template', 'ticket_mail_template.trigger_type = ticket_claim_status.trigger_type')
|
||||
->where('ticket_mail_template.is_ative', 1)
|
||||
->where('ticket_claim_status.is_ative', 1)
|
||||
->where('id', $ticket_data['claim_status_id'])
|
||||
->first();
|
||||
//---- Email Trigger Part----------------------------------------------------------------------------------------------
|
||||
|
||||
if(!empty($template_data)){
|
||||
$res = MailHelper::send_email(['mail' => $ticket_data['emp_email'], 'subject' => 'Mail Via Attachment Testing URL', 'message' => "",'attachments' => []]);
|
||||
public function constructMailContent($ticket_id)
|
||||
{
|
||||
$this->myLogger->logme('error', "Constructing mail content for Ticket ID: $ticket_id");
|
||||
|
||||
try {
|
||||
// Fetch Ticket Data
|
||||
$ticket_data = $this->ticketMasterModel->getTicketDataByTicketID($ticket_id);
|
||||
|
||||
if (!$ticket_data) {
|
||||
$this->myLogger->logme('ERROR', "No ticket data found for Ticket ID: $ticket_id");
|
||||
return null;
|
||||
}
|
||||
|
||||
$this->myLogger->logme('error', "Fetched ticket data: " . json_encode($ticket_data));
|
||||
|
||||
// Fetch Email Template Data
|
||||
$template_data = $this->ticketMasterModel->getTemplateDataByTicketID($ticket_id);
|
||||
|
||||
if (!$template_data) {
|
||||
$this->myLogger->logme('ERROR', "No email template found for Claim Status ID: " . $ticket_data['claim_status_id']);
|
||||
return null;
|
||||
}
|
||||
|
||||
$this->myLogger->logme('error', "Fetched email template: " . json_encode($template_data));
|
||||
|
||||
// Generate Email Content
|
||||
$subject = $this->replacePlaceholders($template_data['subject'], $ticket_data);
|
||||
$message = $this->replacePlaceholders($template_data['mail_content'], $ticket_data);
|
||||
|
||||
// Validate Essential Fields
|
||||
if (empty($ticket_data['emp_mail'])) {
|
||||
$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");
|
||||
return null;
|
||||
}
|
||||
|
||||
// Construct Mail Data
|
||||
$mailData = [
|
||||
'mail' => $ticket_data['emp_mail'],
|
||||
'subject' => $subject,
|
||||
'message' => $message,
|
||||
'cc' => $ticket_data['common_mails'] ?? '',
|
||||
'attachments' => []
|
||||
];
|
||||
|
||||
$this->myLogger->logme('error', "Final Email Data");
|
||||
|
||||
return $mailData;
|
||||
|
||||
} catch (\Exception $e) {
|
||||
$this->myLogger->logme('ERROR', "Exception in constructMailContent: " . $e->getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public function placeholderReplace($template_data, $ticket_data)
|
||||
|
||||
public function replacePlaceholders($content, $ticket_data)
|
||||
{
|
||||
$placeholders = $this->placeHolders;
|
||||
|
||||
$this->myLogger->logme('error', "Replacing placeholders in content");
|
||||
|
||||
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] ?? '';
|
||||
}
|
||||
$content = str_replace($key, $replaceData, $content);
|
||||
}
|
||||
}
|
||||
|
||||
$this->myLogger->logme('error', "Final content after placeholder replacement");
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
//mail send function
|
||||
public function sendTrigger($mail_content)
|
||||
{
|
||||
$this->myLogger->logme('error', "Sending email with content");
|
||||
|
||||
$response = MailHelper::send_email($mail_content);
|
||||
|
||||
$this->myLogger->logme('error', "Email sent response: " . json_encode($response));
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
//reply mail part
|
||||
public function sendReplyMessage($mail_data)
|
||||
{
|
||||
$this->myLogger->logme('error', "Preparing reply email for Ticket ID: " . $mail_data['ticket_id']);
|
||||
|
||||
$acm_mails = $this->ticketMasterModel->getTicketDataByTicketID($mail_data['ticket_id']);
|
||||
|
||||
if (!$acm_mails) {
|
||||
$this->myLogger->logme('ERROR', "No ACM mails found for Ticket ID: " . $mail_data['ticket_id']);
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->myLogger->logme('error', "Fetched ACM emails");
|
||||
|
||||
$emailData = [
|
||||
'mail' => $mail_data['emp_mail'],
|
||||
'subject' => $mail_data['mail_subject'],
|
||||
'message' => $mail_data['mail_content'],
|
||||
'common' => [],
|
||||
'cc' => $acm_mails['common_mails'],
|
||||
'attachments' => []
|
||||
];
|
||||
|
||||
$this->myLogger->logme('error', "Final Reply Email Data");
|
||||
|
||||
return $this->sendTrigger($emailData);
|
||||
}
|
||||
|
||||
}
|
||||
//auto mail part
|
||||
public function sendAutoMailTrigger($ticket_id)
|
||||
{
|
||||
$auto_mail_enable = $this->ticketMasterModel->getTemplateDataByTicketID($ticket_id);
|
||||
|
||||
$mail_responce = [];
|
||||
if($auto_mail_enable['is_auto_mail'] == 1){
|
||||
$mail_content = $this->constructMailContent($ticket_id);
|
||||
$mail_responce = $this->sendTrigger($mail_content);
|
||||
}
|
||||
|
||||
return $mail_responce;
|
||||
}
|
||||
|
||||
//---- End Email Trigger Part----------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -240,4 +240,25 @@ class EmployeeModel extends Model
|
||||
return $results;
|
||||
}
|
||||
|
||||
public function getEmployeeByEmployeeCode($emp_code)
|
||||
{
|
||||
return $this->select("
|
||||
employees.id AS emp_id,
|
||||
employees.name AS emp_name,
|
||||
employees.emp_code,
|
||||
employees.mobile AS emp_mobile,
|
||||
employees.email_corporate AS emp_email,
|
||||
employees.relationship AS emp_relationship,
|
||||
employee_polices.uhid AS policy_no,
|
||||
employee_polices.tpa_id AS tpa_no
|
||||
")
|
||||
->join('employee_polices', 'employees.id = employee_polices.employee_id', 'left')
|
||||
->where('employees.is_active', 1)
|
||||
->where('employee_polices.is_active', 1)
|
||||
->where('employees.emp_code', $emp_code)
|
||||
->groupBy('employees.id')
|
||||
->findAll();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -46,4 +46,6 @@ class TicketClaimStatusModel extends Model
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -86,4 +86,63 @@ class TicketMasterModel extends Model
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getTemplateDataByStatusID($claim_status_id)
|
||||
{
|
||||
|
||||
$template_data = $this->table('ticket_claim_status')
|
||||
->select('ticket_mail_template.*')
|
||||
->join('ticket_mail_template', 'ticket_mail_template.trigger_type = ticket_claim_status.trigger_type')
|
||||
->where('ticket_mail_template.is_active', 1)
|
||||
->where('ticket_claim_status.is_active', 1)
|
||||
->where('ticket_claim_status.id', $claim_status_id)
|
||||
->get()
|
||||
->getResultArray();
|
||||
|
||||
return $template_data;
|
||||
}
|
||||
|
||||
public function getTemplateDataByTicketID($ticket_id)
|
||||
{
|
||||
$template_data = $this
|
||||
->select("ticket_mail_template.*, ticket_master.emp_mail")
|
||||
->join('ticket_claim_status', 'ticket_master.claim_status_id = ticket_claim_status.id and ticket_claim_status.is_active = 1')
|
||||
->join('ticket_mail_template', '
|
||||
ticket_claim_status.trigger_type = ticket_mail_template.trigger_type
|
||||
and ticket_claim_status.ticket_type = ticket_mail_template.ticket_type
|
||||
and ticket_mail_template.is_active = 1')
|
||||
->where('ticket_master.id', $ticket_id)
|
||||
->where('ticket_master.is_active', 1)
|
||||
->first();
|
||||
|
||||
return $template_data;
|
||||
}
|
||||
|
||||
public function getTicketDataByTicketID($ticket_id)
|
||||
{
|
||||
$ticket_data = $this->select("
|
||||
ticket_master.*,
|
||||
|
||||
user_profiles.first_name as acm,
|
||||
user_profiles.mobile as acm_mobile,
|
||||
user_profiles.email as acm_email,
|
||||
|
||||
clients.common_mails,
|
||||
clients.client_name,
|
||||
|
||||
insurers.name as insurer_name,
|
||||
tpa.name as tpa_name
|
||||
")
|
||||
->join('clients', 'ticket_master.client_id = clients.id', 'left')
|
||||
->join('insurers', 'ticket_master.insurer_id = insurers.id', 'left')
|
||||
->join('tpa', 'ticket_master.tpa_id = tpa.id', 'left')
|
||||
->join('user_profiles', 'ticket_master.acm_id = user_profiles.id', 'left')
|
||||
->where('ticket_master.id', $ticket_id)
|
||||
->where('ticket_master.is_active', 1)
|
||||
->first();
|
||||
|
||||
return $ticket_data;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -78,11 +78,53 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="member_data_modal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="myCenterModalLabel"></h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="acm_id">Insured Member<span class="text-danger"></span></label>
|
||||
<select class="form-control" onchange="setMemberData(this)">
|
||||
<option value="0">Select Insured Member</option>
|
||||
<?php if (!empty($member_data)) : ?>
|
||||
<?php foreach ($member_data as $value) : ?>
|
||||
<option value="<?= isset($value['emp_code']) ? $value['emp_code'] : '' ?>"
|
||||
data-empID="<?= isset($value['emp_id']) ? $value['emp_id'] : '' ?>"
|
||||
data-empName="<?= isset($value['emp_name']) ? htmlspecialchars($value['emp_name'], ENT_QUOTES, 'UTF-8') : '' ?>"
|
||||
data-policyNo="<?= isset($value['policy_no']) ? $value['policy_no'] : '' ?>"
|
||||
data-tpaNo="<?= isset($value['tpa_no']) ? $value['tpa_no'] : '' ?>"
|
||||
data-relationship="<?= isset($value['emp_relationship']) ? htmlspecialchars($value['emp_relationship'], ENT_QUOTES, 'UTF-8') : '' ?>">
|
||||
<?= isset($value['emp_name']) && isset($value['emp_relationship'])
|
||||
? htmlspecialchars($value['emp_name'] . ' - ' . $value['emp_relationship'], ENT_QUOTES, 'UTF-8')
|
||||
: 'Unknown Member' ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-primary close" data-dismiss="modal" aria-label="Close">Submit</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="ticket_conversation_div">
|
||||
<?php include("ticket_conversation.php") ?>
|
||||
</div>
|
||||
|
||||
<?php //include("ticket_form_handler.php") ?>
|
||||
|
||||
<script>
|
||||
|
||||
function submitClaimForm(event, form) {
|
||||
|
||||
event.preventDefault();
|
||||
@ -116,7 +158,7 @@ function submitClaimForm(event, form) {
|
||||
toastr.error(response.message, 'ERROR');
|
||||
}
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
@ -129,5 +171,32 @@ function submitClaimForm(event, form) {
|
||||
});
|
||||
}
|
||||
|
||||
function openFetchEmpDataodal() {
|
||||
var myModal = new bootstrap.Modal(document.getElementById('member_data_modal'));
|
||||
myModal.show();
|
||||
}
|
||||
|
||||
function setMemberData(input) {
|
||||
|
||||
var selectedOption = $(input).find(':selected');
|
||||
|
||||
// Retrieve the data-* attributes
|
||||
var empId = selectedOption.data('empid');
|
||||
var empName = selectedOption.data('empname');
|
||||
var policyNo = selectedOption.data('policyno');
|
||||
var tpaNo = selectedOption.data('tpano');
|
||||
var relationship = selectedOption.data('relationship');
|
||||
|
||||
$('#tpa_no').val(tpaNo);
|
||||
$('#insured_emp_id').val(empId);
|
||||
$('#insured_name').val(empName);
|
||||
$('#policy_no').val(policyNo);
|
||||
|
||||
$('#relationship option').each(function() {
|
||||
if ($(this).text() === relationship) {
|
||||
$(this).prop('selected', true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
@ -26,7 +26,7 @@
|
||||
<div class="form-group col-md-3">
|
||||
<label for="claim_status">Status<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="claim_status_id" name="claim_status_id">
|
||||
<option value="0">Select status</option>
|
||||
<!-- <option value="0">Select status</option> -->
|
||||
<?php
|
||||
if (isset($claim_status) && count($claim_status)) {
|
||||
foreach ($claim_status as $key => $value) {
|
||||
@ -41,7 +41,7 @@
|
||||
<div class="form-group col-md-3">
|
||||
<label for="priority">Priority<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="priority" name="priority">
|
||||
<option value="0">Select Priority</option>
|
||||
<!-- <option value="0">Select Priority</option> -->
|
||||
<?php
|
||||
if (isset($priorityType) && count($priorityType)) {
|
||||
foreach ($priorityType as $key => $value) {
|
||||
@ -56,7 +56,7 @@
|
||||
<div class="form-group col-md-3">
|
||||
<label for="acm_id">Account Manager<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="acm_id" name="acm_id">
|
||||
<option value="0">Select Account Manager</option>
|
||||
<!-- <option value="0">Select Account Manager</option> -->
|
||||
<?php
|
||||
if (isset($acms) && count($acms)) {
|
||||
foreach ($acms as $key => $value) {
|
||||
@ -156,7 +156,7 @@
|
||||
<label for="mode_of_intimation"> Mode of Intimation <span
|
||||
class="text-danger"></span></label>
|
||||
<select class="form-control" id="mode_of_intimation" name="mode_of_intimation">
|
||||
<option value="0">Select Mode</option>
|
||||
<!-- <option value="0">Select Mode</option> -->
|
||||
<?php
|
||||
if (isset($modeOFIntimate) && count($modeOFIntimate)) {
|
||||
foreach ($modeOFIntimate as $key => $value) {
|
||||
@ -171,7 +171,7 @@
|
||||
<div class="form-group col-md-3">
|
||||
<label for="claim_type"> Claim Type <span class="text-danger"></span></label>
|
||||
<select class="form-control" id="claim_type" name="claim_type">
|
||||
<option value="0">Select claim Type</option>
|
||||
<!-- <option value="0">Select claim Type</option> -->
|
||||
<?php
|
||||
if (isset($claim_type) && count($claim_type)) {
|
||||
foreach ($claim_type as $key => $value) {
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
<div class="form-group col-md-3">
|
||||
<label for="claim_status">Status<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="claim_status_id" name="claim_status_id">
|
||||
<option value="0">Select status</option>
|
||||
<!-- <option value="0">Select status</option> -->
|
||||
<?php
|
||||
if (isset($claim_status) && count($claim_status)) {
|
||||
foreach ($claim_status as $key => $value) {
|
||||
@ -48,7 +48,7 @@
|
||||
<div class="form-group col-md-3">
|
||||
<label for="acm_id">Account Manager<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="acm_id" name="acm_id">
|
||||
<option value="0">Select Account Manager</option>
|
||||
<!-- <option value="0">Select Account Manager</option> -->
|
||||
<?php
|
||||
if (isset($acms) && count($acms)) {
|
||||
foreach ($acms as $key => $value) {
|
||||
@ -86,7 +86,7 @@
|
||||
if (isset($ticket_type) && count($ticket_type)) {
|
||||
foreach ($ticket_type as $key => $value) {
|
||||
if($key != 1){
|
||||
$selected = (isset($ticket_data) && $ticket_data['ticket_type_id'] == $key) ? 'selected' : '';
|
||||
$selected = (isset($ticket_data) && $ticket_data['ticket_type_id'] == $key) ? 'selected' : ((isset($selected_ticket_type) && $selected_ticket_type == $key) ? 'selected' : '');
|
||||
echo "<option value='" . $key . "' $selected>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
@ -98,7 +98,7 @@
|
||||
<div class="form-group col-md-3">
|
||||
<label for="claim_type"> Claim Type <span class="text-danger"></span></label>
|
||||
<select class="form-control" id="claim_type" name="claim_type">
|
||||
<option value="0">Select claim Type</option>
|
||||
<!-- <option value="0">Select claim Type</option> -->
|
||||
<?php
|
||||
if (isset($claim_type) && count($claim_type)) {
|
||||
foreach ($claim_type as $key => $value) {
|
||||
|
||||
@ -43,11 +43,12 @@
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
if ($ticket_form == 1) {
|
||||
include('ticket_form_gmc.php');
|
||||
} else {
|
||||
include('ticket_form_gpa.php');
|
||||
if(!isset($view_ticket_page)){
|
||||
if ($selected_ticket_type == 1) {
|
||||
include('ticket_form_gmc.php');
|
||||
} else {
|
||||
include('ticket_form_gpa.php');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -364,7 +365,7 @@ function submitClaimForm(event, form) {
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
const formAction = '<?= base_url("ticket/create"); ?>';
|
||||
const formAction = '<?= isset($view_ticket_page) ? base_url("ticket/update") : base_url("ticket/create"); ?>';
|
||||
|
||||
// Show loader
|
||||
$('.loader').fadeIn();
|
||||
@ -574,10 +575,10 @@ function appendACMS(data) {
|
||||
|
||||
$('#acm_id').empty();
|
||||
|
||||
$('#acm_id').append($('<option>', {
|
||||
value: '0',
|
||||
text: 'Select Account Manager'
|
||||
}));
|
||||
// $('#acm_id').append($('<option>', {
|
||||
// value: '0',
|
||||
// text: 'Select Account Manager'
|
||||
// }));
|
||||
|
||||
$.each(data, function(index, item) {
|
||||
var option = $('<option>', {
|
||||
|
||||
@ -70,7 +70,7 @@ $(document).ready(function() {
|
||||
};
|
||||
|
||||
const editor = Jodit.make("#ticket_mail_editor", editorConfig);
|
||||
var mail_content = '<?=isset($reply_data['mail_content'])?$reply_data['mail_content']:'' ?>';
|
||||
var mail_content = `<?=isset($reply_data['mail_content'])?$reply_data['mail_content']:'' ?>`;
|
||||
$('.jodit-wysiwyg').html(mail_content);
|
||||
|
||||
let lastActiveField = null;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user