Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
9a7d46a066
@ -504,7 +504,7 @@ class TicketController extends BaseController
|
||||
$ticket_data = $this->ticketMasterModel->getTicketDataByTicketID($ticket_id);
|
||||
|
||||
if (!$ticket_data) {
|
||||
$this->myLogger->logme('ERROR', "No ticket data found for Ticket ID: $ticket_id");
|
||||
$this->myLogger->logme('error', "No ticket data found for Ticket ID: $ticket_id");
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -514,7 +514,7 @@ class TicketController extends BaseController
|
||||
$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']);
|
||||
$this->myLogger->logme('error', "No email template found for Claim Status ID: " . $ticket_data['claim_status_id']);
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -526,12 +526,12 @@ class TicketController extends BaseController
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
@ -548,7 +548,7 @@ class TicketController extends BaseController
|
||||
|
||||
return $mailData;
|
||||
} catch (\Exception $e) {
|
||||
$this->myLogger->logme('ERROR', "Exception in constructMailContent: " . $e->getMessage());
|
||||
$this->myLogger->logme('error', "Exception in constructMailContent: " . $e->getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -592,10 +592,24 @@ class TicketController extends BaseController
|
||||
$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']);
|
||||
$this->myLogger->logme('error', "No ACM mails found for Ticket ID: " . $mail_data['ticket_id']);
|
||||
$this->myLogger->logme('error', "Reply mail not send");
|
||||
return false;
|
||||
}
|
||||
|
||||
$ticket_data = $this->ticketMasterModel->getTicketDataByTicketID($mail_data['ticket_id']);
|
||||
|
||||
if (!$ticket_data) {
|
||||
$this->myLogger->logme('error', "No ticket data found for Ticket ID : " .$mail_data['ticket_id']);
|
||||
$this->myLogger->logme('error', "Reply mail not send");
|
||||
return null;
|
||||
}
|
||||
|
||||
if(!empty($mail_data)){
|
||||
$mail_data['mail_content'] = $this->replacePlaceholders($mail_data['mail_content'], $ticket_data);
|
||||
$mail_data['mail_subject'] = $this->replacePlaceholders($mail_data['mail_subject'], $ticket_data);
|
||||
}
|
||||
|
||||
$this->myLogger->logme('error', "Fetched ACM emails");
|
||||
|
||||
$emailData = [
|
||||
@ -616,11 +630,15 @@ class TicketController extends BaseController
|
||||
public function sendAutoMailTrigger($ticket_id)
|
||||
{
|
||||
$auto_mail_enable = $this->ticketMasterModel->getTemplateDataByTicketID($ticket_id);
|
||||
|
||||
// print_rr($auto_mail_enable);
|
||||
$mail_responce = [];
|
||||
if ($auto_mail_enable['is_auto_mail'] == 1) {
|
||||
if (!empty($auto_mail_enable) && $auto_mail_enable['is_auto_mail'] == 1) {
|
||||
$mail_content = $this->constructMailContent($ticket_id);
|
||||
$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');
|
||||
}else{
|
||||
$this->myLogger->logme('error','Auto Mail Not Sent, Reason: Mail Template Not Created');
|
||||
}
|
||||
|
||||
return $mail_responce;
|
||||
@ -649,9 +667,9 @@ class TicketController extends BaseController
|
||||
|
||||
-- Insured Employee ID Change
|
||||
old_insured_emp.name as old_insured_id_name,
|
||||
new_insured_emp.name as new_insured_id_name
|
||||
new_insured_emp.name as new_insured_id_name,
|
||||
|
||||
|
||||
ticket_master.ticket_type_id
|
||||
|
||||
FROM
|
||||
ticket_history th
|
||||
@ -665,6 +683,7 @@ class TicketController extends BaseController
|
||||
ON th.field_name = 'claim_status_id'
|
||||
AND th.old_value = old_status.id
|
||||
AND old_status.is_active = 1
|
||||
|
||||
LEFT JOIN ticket_claim_status new_status
|
||||
ON th.field_name = 'claim_status_id'
|
||||
AND th.new_value = new_status.id
|
||||
@ -685,6 +704,10 @@ class TicketController extends BaseController
|
||||
ON th.field_name = 'insured_emp_id'
|
||||
AND th.new_value = new_insured_emp.id
|
||||
|
||||
LEFT JOIN ticket_master as ticket_master
|
||||
on th.field_name = 'claim_type'
|
||||
AND th.ticket_id = ticket_master.id
|
||||
|
||||
|
||||
|
||||
WHERE
|
||||
@ -715,32 +738,35 @@ class TicketController extends BaseController
|
||||
$row['new_value'] = $new_new_value;
|
||||
} elseif ($row['field_name'] == 'priority') {
|
||||
$new_old_value = isset($priorityType[$row['old_value']]) ? $priorityType[$row['old_value']] : '-';
|
||||
$new_new_value = $priorityType[$row['new_value']];
|
||||
$new_new_value = isset($priorityType[$row['new_value']]) ? $priorityType[$row['new_value']] : '-';
|
||||
$row['old_value'] = $new_old_value;
|
||||
$row['new_value'] = $new_new_value;
|
||||
} elseif ($row['field_name'] == 'relationship') {
|
||||
$new_old_value = isset($relationshipType[$row['old_value']]) ? $relationshipType[$row['old_value']] : '-';
|
||||
$new_new_value = $relationshipType[$row['new_value']];
|
||||
$new_new_value = isset($relationshipType[$row['new_value']]) ? $relationshipType[$row['new_value']] : '-';
|
||||
$row['old_value'] = $new_old_value;
|
||||
$row['new_value'] = $new_new_value;
|
||||
} elseif ($row['field_name'] == 'mode_of_intimation') {
|
||||
$new_old_value = isset($modeOFIntimate[$row['old_value']]) ? $modeOFIntimate[$row['old_value']] : "-";
|
||||
$new_new_value = $modeOFIntimate[$row['new_value']];
|
||||
$new_new_value = isset($modeOFIntimate[$row['old_value']]) ? $modeOFIntimate[$row['old_value']] : "-";
|
||||
$row['old_value'] = $new_old_value;
|
||||
$row['new_value'] = $new_new_value;
|
||||
} elseif ($row['field_name'] == 'claim_type') {
|
||||
$new_old_value = isset($claim_type[$row['ticket_type_id']][$row['old_value']]) ? $claim_type[$row['ticket_type_id']][$row['old_value']] : '-';
|
||||
$new_new_value = isset($claim_type[$row['ticket_type_id']][$row['new_value']])?$claim_type[$row['ticket_type_id']][$row['new_value']]:'-';
|
||||
$row['old_value'] = $new_old_value;
|
||||
$row['new_value'] = $new_new_value;
|
||||
} elseif ($row['field_name'] == 'claim_type') {
|
||||
$new_old_value = isset($claim_type[$row['old_value']]) ? $claim_type[$row['old_value']] : '-';
|
||||
$new_new_value = $claim_type[$row['new_value']];
|
||||
$row['old_value'] = $new_old_value;
|
||||
$row['new_value'] = $new_new_value;
|
||||
} elseif ($row['field_name'] == 'claim_type') {
|
||||
$new_old_value = isset($claim_type[$row['old_value']]) ? $claim_type[$row['old_value']] : '-';
|
||||
$new_new_value = $claim_type[$row['new_value']];
|
||||
$new_new_value = isset($claim_type[$row['new_value']]) ? $claim_type[$row['new_value']] : '-';
|
||||
$row['old_value'] = $new_old_value;
|
||||
$row['new_value'] = $new_new_value;
|
||||
} else {
|
||||
$new_old_value = isset($row['old_value']) ? $row['old_value'] : '-';
|
||||
$new_new_value = isset($row['new_value']) ? $row['new_value'] : '-';
|
||||
$row['old_value'] = $new_old_value;
|
||||
$row['new_value'] = $new_new_value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -176,7 +176,7 @@
|
||||
if (isset($claim_type) && count($claim_type)) {
|
||||
foreach ($claim_type as $key => $value) {
|
||||
$selected = (isset($ticket_data) && $ticket_data['claim_type'] == $key) ? 'selected' : '';
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
echo "<option value='" . $key . "' $selected>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@ -194,7 +194,7 @@ table.dataTable tbody td {
|
||||
<?php foreach ($placeHolders as $value): ?>
|
||||
<?php // if($value == 'member_name' || $value == 'member_mobile' || $value == 'nhance_logo' || $value == 'client_logo' || $value == 'app_link' || $value == 'client_name'){ ?>member_mobile
|
||||
<?php $valueChange = str_replace('_', ' ', $value); $valueChange = ucwords($valueChange); ?>
|
||||
<option value="[[<?php echo $value; ?>]]"><?php echo $valueChange; ?>
|
||||
<option value="((<?php echo $value; ?>))"><?php echo $valueChange; ?>
|
||||
</option>
|
||||
<?php //} ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Subject Field -->
|
||||
<div class="form-group col-md-4">
|
||||
<div class="form-group col-md-8">
|
||||
<label for="mail_subject">Subject</label>
|
||||
<input type="text" class="form-control" value="<?= isset($reply_data['subject'])?$reply_data['subject']:'' ?>" id="mail_subject" name="mail_subject" placeholder="Mail subject">
|
||||
</div>
|
||||
@ -23,10 +23,10 @@
|
||||
<div class="form-group col-md-12">
|
||||
<select id="ticket_mail_customButton" class="form-control" style="border:none;right: 6px;width: auto;position: absolute;z-index: 1;top: 17px;height: 32px;float: right;">
|
||||
<option value="">PlaceHolders</option>
|
||||
<?php foreach ($placeHolders as $value): ?>
|
||||
<?php foreach ($placeHolders as $key => $value): ?>
|
||||
<!-- <?php // if($value == 'member_name' || $value == 'member_mobile' || $value == 'nhance_logo' || $value == 'client_logo' || $value == 'app_link' || $value == 'client_name'){ ?>member_mobile -->
|
||||
<?php $valueChange = str_replace('_', ' ', $value); $valueChange = ucwords($valueChange); ?>
|
||||
<option value="[[<?php echo $value; ?>]]"><?php echo $valueChange; ?></option>
|
||||
<option value="<?php echo $key; ?>"><?php echo $valueChange; ?></option>
|
||||
<?php //} ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user