FIX_CLAIM_MODULE_OVERALL_WORKFLOW_SRI
This commit is contained in:
parent
970e2adaa2
commit
5f0390887a
@ -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;
|
||||
@ -748,6 +766,7 @@ class TicketController extends BaseController
|
||||
$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