CHANGE_CLAIMS_CR_AND_LIVE_SUPPORT : RV
This commit is contained in:
parent
149a70e5d1
commit
0e4e24fd7a
@ -545,6 +545,7 @@ $routes->group("/bdsReport", ["filter" => "authMVC"], function ($routes) {
|
|||||||
$routes->group("/ticket", ["filter" => "authMVC"], function ($routes) {
|
$routes->group("/ticket", ["filter" => "authMVC"], function ($routes) {
|
||||||
$routes->match( ['get', 'post'], 'list','TicketController::ticketList');
|
$routes->match( ['get', 'post'], 'list','TicketController::ticketList');
|
||||||
$routes->get('feedback-list','TicketController::feedbackList');
|
$routes->get('feedback-list','TicketController::feedbackList');
|
||||||
|
$routes->get('remove','TicketController::removeTicket');
|
||||||
$routes->get('new/(:any)','TicketController::ticket_form/$1');
|
$routes->get('new/(:any)','TicketController::ticket_form/$1');
|
||||||
$routes->post('create','TicketController::createTicket');
|
$routes->post('create','TicketController::createTicket');
|
||||||
$routes->post('update','TicketController::updateTicket');
|
$routes->post('update','TicketController::updateTicket');
|
||||||
|
|||||||
@ -44,6 +44,7 @@ use App\Models\ClientApiModel;
|
|||||||
|
|
||||||
use App\Controllers\EmpDataServiceController;
|
use App\Controllers\EmpDataServiceController;
|
||||||
use App\Controllers\GoogleDriveController;
|
use App\Controllers\GoogleDriveController;
|
||||||
|
use App\Controllers\PolicyTransactionController;
|
||||||
|
|
||||||
use App\Helpers\sendMailNotification;
|
use App\Helpers\sendMailNotification;
|
||||||
use App\Models\PTCOShareDetailsModel;
|
use App\Models\PTCOShareDetailsModel;
|
||||||
@ -4608,6 +4609,10 @@ class ClientController extends AdminController
|
|||||||
// $res = $empServiceController->excelFileDataValidation(['file_id' => '865']);
|
// $res = $empServiceController->excelFileDataValidation(['file_id' => '865']);
|
||||||
// $res = $empServiceController->employeesSIEnhanceProcess(['file_id' => '829']);
|
// $res = $empServiceController->employeesSIEnhanceProcess(['file_id' => '829']);
|
||||||
// $res = $empServiceController->employeeDisembark(['file_id' => '858']);
|
// $res = $empServiceController->employeeDisembark(['file_id' => '858']);
|
||||||
|
|
||||||
|
$policyTransactionController = new PolicyTransactionController();
|
||||||
|
// $res = $policyTransactionController->validateInsurerStatement(['file_id' => '17']);
|
||||||
|
// $res = $policyTransactionController->updateInsurerStatement(['file_id' => '22']);
|
||||||
// dd('-----', $res);
|
// dd('-----', $res);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2380,7 +2380,7 @@ class PolicyTransactionController extends BaseController
|
|||||||
if (($actual_bp_brokerage && $actual_bp_brokerage != 0 && $actual_bp_brokerage != "")) {
|
if (($actual_bp_brokerage && $actual_bp_brokerage != 0 && $actual_bp_brokerage != "")) {
|
||||||
$total_amt += $actual_bp_brokerage;
|
$total_amt += $actual_bp_brokerage;
|
||||||
//percentage reverse calculation
|
//percentage reverse calculation
|
||||||
if ($actual_bp_per == 0 || $actual_bp_per == "") {
|
if (($actual_bp_per == 0 || $actual_bp_per == 0) && !empty($actual_bp_amt)) {
|
||||||
$actual_bp_per = round(($actual_bp_brokerage / $actual_bp_amt) * 100, 2);
|
$actual_bp_per = round(($actual_bp_brokerage / $actual_bp_amt) * 100, 2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -2395,7 +2395,7 @@ class PolicyTransactionController extends BaseController
|
|||||||
if ($actual_tp_brokerage && $actual_tp_brokerage != 0 && $actual_tp_brokerage != "") {
|
if ($actual_tp_brokerage && $actual_tp_brokerage != 0 && $actual_tp_brokerage != "") {
|
||||||
$total_amt += $actual_tp_brokerage;
|
$total_amt += $actual_tp_brokerage;
|
||||||
//percentage reverse calculation
|
//percentage reverse calculation
|
||||||
if ($actual_tp_per == 0 || $actual_tp_per == "") {
|
if (($actual_tp_per == 0 || $actual_tp_per == "") && !empty($actual_tp_amt)) {
|
||||||
$actual_tp_per = ($actual_tp_brokerage / $actual_tp_amt) * 100;
|
$actual_tp_per = ($actual_tp_brokerage / $actual_tp_amt) * 100;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -2410,7 +2410,7 @@ class PolicyTransactionController extends BaseController
|
|||||||
if ($actual_tep_brokerage && $actual_tep_brokerage != 0 && $actual_tep_brokerage != "") {
|
if ($actual_tep_brokerage && $actual_tep_brokerage != 0 && $actual_tep_brokerage != "") {
|
||||||
$total_amt += $actual_tep_brokerage;
|
$total_amt += $actual_tep_brokerage;
|
||||||
//percentage reverse calculation
|
//percentage reverse calculation
|
||||||
if ($actual_tep_per == 0 || $actual_tep_per == "") {
|
if (($actual_tep_per == 0 || $actual_tep_per == "") && !empty($actual_tep_amt)) {
|
||||||
$actual_tep_per = ($actual_tep_brokerage / $actual_tep_amt) * 100;
|
$actual_tep_per = ($actual_tep_brokerage / $actual_tep_amt) * 100;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -955,9 +955,26 @@ class TicketController extends BaseController
|
|||||||
|
|
||||||
public function convertHtmlToText($html)
|
public function convertHtmlToText($html)
|
||||||
{
|
{
|
||||||
$dom = new DOMDocument();
|
if(!empty($html)){
|
||||||
@$dom->loadHTML($html);
|
$dom = new DOMDocument();
|
||||||
return strip_tags($dom->saveHTML());
|
@$dom->loadHTML($html);
|
||||||
|
return strip_tags($dom->saveHTML());
|
||||||
|
}else{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeTicket()
|
||||||
|
{
|
||||||
|
$ticket_id = $this->request->getGet('ticket_id');
|
||||||
|
if(!empty($ticket_id)){
|
||||||
|
$data['is_active'] = 0;
|
||||||
|
$this->ticketMasterModel->where('id', $ticket_id)->set($data)->update();
|
||||||
|
return $this->respond(['status' => true, 'code' => 200, 'message' => 'Claim removed successfully'], 200);
|
||||||
|
}else{
|
||||||
|
return $this->respond(['status' => false, 'code' => 404, 'message' => 'Failed to remove Claim'], 200);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---- Email Trigger Part----------------------------------------------------------------------------------------------
|
//---- Email Trigger Part----------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -1004,7 +1004,7 @@ maxDate.setDate(today.getDate() + 180);
|
|||||||
// Request failed, handle error
|
// Request failed, handle error
|
||||||
console.error("Request failed:", status, error);
|
console.error("Request failed:", status, error);
|
||||||
toastr.error('Something went wrong! Try later', 'Error');
|
toastr.error('Something went wrong! Try later', 'Error');
|
||||||
$('#uploadForm')[0].reset();
|
// $('#uploadForm')[0].reset();
|
||||||
$('.close').click()
|
$('.close').click()
|
||||||
$('.loader').fadeOut();
|
$('.loader').fadeOut();
|
||||||
$('.loader-mask').delay(10).fadeOut('slow');
|
$('.loader-mask').delay(10).fadeOut('slow');
|
||||||
|
|||||||
@ -180,7 +180,15 @@
|
|||||||
<!-- end first_data_points -->
|
<!-- end first_data_points -->
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
<h5>Claim Details <span><i id="infoIcon" class="fas fa-info-circle info-icon" title="Click for more details"></i></span></h5>
|
|
||||||
|
<div style="display: flex; align-items: center; gap: 10px;">
|
||||||
|
<h5 style="margin: 0;">
|
||||||
|
Claim Details
|
||||||
|
<i id="infoIcon" class="fas fa-info-circle info-icon" title="Click for more details" style="margin-left: 5px;"></i>
|
||||||
|
<?= isset($ticket_data['claim_number']) && !empty($ticket_data['claim_number']) ? '( Claim No : ' . $ticket_data['claim_number'] . ' )' : '' ?>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<!-- second_data_points -->
|
<!-- second_data_points -->
|
||||||
@ -594,6 +602,11 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$field = $('#approved_description')
|
||||||
|
$field.prop('required', false);
|
||||||
|
var $parentDiv = $field.closest("div");
|
||||||
|
$parentDiv.find("label[for='approved_description'] .text-danger").remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#claim_status_id').on('change', function() {
|
$('#claim_status_id').on('change', function() {
|
||||||
|
|||||||
@ -432,6 +432,12 @@
|
|||||||
} else if (value == 48 || value == 54 || value == 59) { // RETURNED
|
} else if (value == 48 || value == 54 || value == 59) { // RETURNED
|
||||||
$('.returned').show();
|
$('.returned').show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$field = $('#approved_description')
|
||||||
|
$field.prop('required', false);
|
||||||
|
var $parentDiv = $field.closest("div");
|
||||||
|
$parentDiv.find("label[for='approved_description'] .text-danger").remove();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#claim_status_id').on('change', function() {
|
$('#claim_status_id').on('change', function() {
|
||||||
|
|||||||
@ -109,12 +109,13 @@ table.dataTable tbody td {
|
|||||||
|
|
||||||
|
|
||||||
<th>TAT</th>
|
<th>TAT</th>
|
||||||
|
<th>ACTION</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php if (isset($ticket_data)) { ?>
|
<?php if (isset($ticket_data)) { ?>
|
||||||
<?php foreach($ticket_data as $index => $row){ ?>
|
<?php foreach($ticket_data as $index => $row){ ?>
|
||||||
<tr onclick="viewTicket(<?php echo $row['id']; ?>)" style="cursor: pointer;">
|
<tr data-id="<?= $row['id']; ?>" style="cursor: pointer;">
|
||||||
|
|
||||||
<td data-toggle="tooltip" data-placement="top"
|
<td data-toggle="tooltip" data-placement="top"
|
||||||
|
|
||||||
@ -216,6 +217,16 @@ table.dataTable tbody td {
|
|||||||
|
|
||||||
|
|
||||||
<td><?php echo $row['tat']; ?></td>
|
<td><?php echo $row['tat']; ?></td>
|
||||||
|
<td>
|
||||||
|
<div class="btn-group dropdown">
|
||||||
|
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
||||||
|
<div class="dropdown-menu dropdown-menu-right">
|
||||||
|
<a class="dropdown-item delete" data-id="<?= $row['id'];?>" onclick="removeClaim(this, '<?= htmlspecialchars($row['id'], ENT_QUOTES) ?>')">
|
||||||
|
<i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@ -294,4 +305,41 @@ function viewTicket(ticket_id){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function removeClaim(input, ticket_id) {
|
||||||
|
|
||||||
|
confirmActionSweertAlert("Do you want to delete this Claim?", "Yes, Proceed!", "No, Cancel").then((confirmed) => {
|
||||||
|
if (confirmed) {
|
||||||
|
let url = '<?= base_url('ticket/remove') ?>';
|
||||||
|
|
||||||
|
// Include `pt_id` in the AJAX request if necessary
|
||||||
|
let requestData = { ticket_id: ticket_id };
|
||||||
|
|
||||||
|
sendAjaxRequestForGlobal(url, 'GET', requestData, function(response) {
|
||||||
|
console.log('Data fetched successfully:', response);
|
||||||
|
|
||||||
|
if (response.status === true) {
|
||||||
|
toastr.success(response.message, 'SUCCESS');
|
||||||
|
window.location.reload();
|
||||||
|
} else {
|
||||||
|
toastr.warning(response.message, 'WARNING');
|
||||||
|
}
|
||||||
|
}, function(xhr, status, error) {
|
||||||
|
console.error('Error fetching data:', error);
|
||||||
|
console.error(xhr.responseText);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('click', 'tbody tr', function (e) {
|
||||||
|
// Exclude clicks on any elements inside the last column (actions)
|
||||||
|
if ($(e.target).closest('td').index() !== $(this).children('td').length - 1) {
|
||||||
|
const id = $(this).data('id');
|
||||||
|
console.log('Ticket ID', id)
|
||||||
|
viewTicket(id);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user