CHANGE_UI_Issues - VADIVEL J 2025-09-25

This commit is contained in:
vadivelJ96 2025-09-25 12:19:38 +05:30
commit 95704465b4
59 changed files with 6984 additions and 4632 deletions

View File

@ -354,6 +354,7 @@ table.dataTable tbody td {
</div> </div>
</div> --> </div> -->
<table data-custom-table-css="table" class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="1" id="user-table"> <table data-custom-table-css="table" class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="1" id="user-table">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th class="font-weight-medium">Name</th> <th class="font-weight-medium">Name</th>
@ -391,15 +392,15 @@ table.dataTable tbody td {
</table> </table>
<!-- <table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap text-custom-black text-custom app-datatable"> <!-- <table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap text-custom-black text-custom app-datatable">
<thead class="app-table-head"> <thead class="bg-light">
<tr> <tr>
<th>Ticket ID</th> <th>Ticket ID</th>
<th class="app-text-left">Name</th> <th class="text-left">Name</th>
<th>Policy Number</th> <th>Policy Number</th>
<th>Ticket Type</th> <th>Ticket Type</th>
<th>Subject</th> <th>Subject</th>
<th>Status</th> <th>Status</th>
<th class="app-text-left">Assign To</th> <th class="text-left">Assign To</th>
<th>Created At</th> <th>Created At</th>
<th>Updated At</th> <th>Updated At</th>
</tr> </tr>
@ -409,18 +410,18 @@ table.dataTable tbody td {
<?php foreach($ticket_data as $index => $row){ ?> <?php foreach($ticket_data as $index => $row){ ?>
<tr data-id="<?= $row['thz_id']; ?>" style="cursor: pointer;"> <tr data-id="<?= $row['thz_id']; ?>" style="cursor: pointer;">
<td class="app-text-right"><?php echo $row['thz_id']; ?></td> <td class="text-right"><?php echo $row['thz_id']; ?></td>
<td class="app-text-left"> <td class="text-left">
<?php echo $row['name']; ?> <?php echo $row['name']; ?>
<span class="text-custom-grey"><?php if (!empty($row['empcode'])): echo '('.$row['empcode'].')'; endif; ?></span><br> <span class="text-custom-grey"><?php if (!empty($row['empcode'])): echo '('.$row['empcode'].')'; endif; ?></span><br>
<span class="text-custom-grey"><?php if (!empty($row['mobile'])): echo $row['mobile']; endif; ?></span> <span class="text-custom-grey"><?php if (!empty($row['mobile'])): echo $row['mobile']; endif; ?></span>
</td> </td>
<td class="app-text-center"><?php echo (!empty($row['policy_no']) && strtolower($row['policy_no']) !== 'null') <td class="text-center"><?php echo (!empty($row['policy_no']) && strtolower($row['policy_no']) !== 'null')
? $row['policy_no'] ? $row['policy_no']
: 'N/A'; ?> : 'N/A'; ?>
</td> </td>
<td class="app-text-center"><?php echo $row['ticket_type'] ? $row['ticket_type'] : '-'; ?></td> <td class="text-center"><?php echo $row['ticket_type'] ? $row['ticket_type'] : '-'; ?></td>
<td class="app-text-center wrap" title="<?php echo htmlspecialchars($row['subject']); ?>"> <td class="text-center wrap" title="<?php echo htmlspecialchars($row['subject']); ?>">
<?php <?php
$subject = $row['subject'] ? $row['subject'] : 'N/A'; $subject = $row['subject'] ? $row['subject'] : 'N/A';
echo (strlen($subject) > 50) echo (strlen($subject) > 50)
@ -428,9 +429,9 @@ table.dataTable tbody td {
: htmlspecialchars($subject); : htmlspecialchars($subject);
?> ?>
</td> </td>
<td class="app-text-center"><?php echo $row['status'] ? $row['status'] : '-' ; ?></td> <td class="text-center"><?php echo $row['status'] ? $row['status'] : '-' ; ?></td>
<td class="app-text-left"><?php echo $row['assignee_name'] ? $row['assignee_name'] : '-'; ?></td> <td class="text-left"><?php echo $row['assignee_name'] ? $row['assignee_name'] : '-'; ?></td>
<td class="app-text-left"> <td class="text-left">
<?php if (!empty($row['created_at'])): <?php if (!empty($row['created_at'])):
$cd = date("j F Y", strtotime($row['created_at'])); $cd = date("j F Y", strtotime($row['created_at']));
$ct = date("h:i a", strtotime($row['created_at'])); $ct = date("h:i a", strtotime($row['created_at']));
@ -438,7 +439,7 @@ table.dataTable tbody td {
endif; endif;
?> ?>
</td> </td>
<td class="app-text-left"> <td class="text-left">
<?php if (!empty($row['updated_at'])): <?php if (!empty($row['updated_at'])):
$ud = date("j F Y", strtotime($row['updated_at'])); $ud = date("j F Y", strtotime($row['updated_at']));
$ut = date("h:i a", strtotime($row['updated_at'])); $ut = date("h:i a", strtotime($row['updated_at']));
@ -1442,7 +1443,7 @@ table.dataTable tbody td {
hour12: false hour12: false
}; };
let uploaded = date.toLocaleString('en-GB', options).replace(',', ''); let uploaded = date.toLocaleString('en-GB', options).replace(',', '');
let color = file.incentive_file_name ? "app-text-success" : "app-text-black"; let color = file.incentive_file_name ? "app-text-success" : "font-color-black";
let download_url = "<?= base_url('user/download-incentive-file/') ?>" + encodeURIComponent(file.id); let download_url = "<?= base_url('user/download-incentive-file/') ?>" + encodeURIComponent(file.id);
let im = file.incentive_month; let im = file.incentive_month;
@ -1453,10 +1454,10 @@ table.dataTable tbody td {
<div class="d-flex align-items-center justify-content-between border rounded p-2 bg-white"> <div class="d-flex align-items-center justify-content-between border rounded p-2 bg-white">
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<div class="file-icon-box d-flex align-items-center justify-content-center"> <div class="file-icon-box d-flex align-items-center justify-content-center">
<i class="mdi mdi-file-document-outline app-text-black" style="font-size: 24px;"></i> <i class="mdi mdi-file-document-outline font-color-black" style="font-size: 24px;"></i>
</div> </div>
<div class="ml-2"> <div class="ml-2">
<div class="font-weight-bold app-text-black small text-truncate" <div class="font-weight-bold font-color-black small text-truncate"
title="${file.incentive_file_name}" title="${file.incentive_file_name}"
style="max-width: 265px;"> style="max-width: 265px;">
${file.incentive_file_name} ${file.incentive_file_name}

View File

@ -28,20 +28,20 @@
<table data-custom-table-css="table" id="datatable-buttons" class="table table-hover m-0 table-centered dt-responsive w-100"> <table data-custom-table-css="table" id="datatable-buttons" class="table table-hover m-0 table-centered dt-responsive w-100">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th class="font-weight-medium">SNO</th> <th class="font-weight-medium">S.No&nbsp;</th>
<th class="font-weight-medium">Batch Code</th> <th class="font-weight-medium">Batch Code&nbsp;</th>
<th class="font-weight-medium">File Name</th> <th class="font-weight-medium">File Name&nbsp;</th>
<th class="font-weight-medium">Client</th> <th class="font-weight-medium">Client&nbsp;</th>
<th class="font-weight-medium">Client Branch</th> <th class="font-weight-medium">Client Branch&nbsp;</th>
<th class="font-weight-medium">Client Policy</th> <th class="font-weight-medium">Client Policy&nbsp;</th>
<th class="font-weight-medium">Event Type</th> <th class="font-weight-medium">Event Type&nbsp;</th>
<th class="font-weight-medium">Insurer/ TPA</th> <th class="font-weight-medium">Insurer/ TPA&nbsp;</th>
<th class="font-weight-medium">Action</th> <th class="font-weight-medium">Action&nbsp;</th>
<th class="font-weight-medium">Count</th> <th class="font-weight-medium">Count&nbsp;</th>
<th class="font-weight-medium">()Amount</th> <th class="font-weight-medium">()Amount&nbsp;</th>
<th class="font-weight-medium">User/Time</th> <th class="font-weight-medium">User/Time&nbsp;</th>
<th class="font-weight-medium">Status</th> <th class="font-weight-medium">Status&nbsp;</th>
<th class="font-weight-medium">Action</th> <th class="font-weight-medium">Action&nbsp;</th>
</tr> </tr>
</thead> </thead>
@ -52,7 +52,7 @@
?> ?>
<tr> <tr>
<td><b><?php echo ($key + 1) ?></b></td> <td class="text-center"><b><?php echo ($key + 1) ?></b></td>
<td><?php echo $file['batch_code'] ?></td> <td><?php echo $file['batch_code'] ?></td>
<td style="overflow: hidden;" class="reload truncate" data-toggle="tooltip" data-placement="top" title="<?php echo $file['file_name'] ?>"> <td style="overflow: hidden;" class="reload truncate" data-toggle="tooltip" data-placement="top" title="<?php echo $file['file_name'] ?>">
<?php echo $file['file_name']?> <?php echo $file['file_name']?>
@ -213,21 +213,39 @@
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", "<'row'<'col-sm-5'i><'col-sm-7'p>>",
// buttons: [{
// extend: 'csv',
// text: 'CSV',
// title: 'Batch List',
// className: 'my_class',
// }],
// initComplete: function(settings, json) {
// $('.my_class').css({
// position: "relative",
// left: "50px"
// });
// },
buttons: [{ buttons: [{
extend: 'csv', extend: 'collection',
text: 'CSV', text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
title: 'Batch List', className: 'btn app-btn-secondary ',
className: 'my_class', buttons: [
}], {
initComplete: function(settings, json) { extend: 'csv',
$('.my_class').css({ text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
position: "relative", title: 'Batch List',
left: "50px" className: 'app-btn-primary ',
}); }
}, ]
}
],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true paging: true
}); });

View File

@ -112,8 +112,12 @@
} }
], ],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, paging: true,
pageLength: 10, pageLength: 10,

View File

@ -23,7 +23,7 @@ table.dataTable tbody td {
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th> <th>
<div class="column-header">S.No.</div> <div class="column-header">S.No&nbsp;</div>
</th> </th>
<th> <th>
<div class="column-header">Renewal Month</div> <div class="column-header">Renewal Month</div>
@ -135,8 +135,12 @@ $(document).ready(function() {
} }
], ],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 20, // Set default number of rows per page (optional) pageLength: 20, // Set default number of rows per page (optional)

View File

@ -75,22 +75,35 @@ table.dataTable tbody td {
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [ buttons: [
{ {
extend: 'csv', extend: 'collection',
text: 'CSV', text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
title: 'Insurer-Wise-Report-List', className: 'btn app-btn-secondary ',
}, buttons: [
{ {
extend: 'excel', extend: 'csv',
text: 'Excel', text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
title: 'Insurer-Wise-Report-List', className: 'app-btn-primary ',
exportOptions: { title: 'Insurer-Wise-Report-List',
orthogonal: 'sort' },
}, {
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'Insurer-Wise-Report-List',
exportOptions: {
orthogonal: 'sort'
},
className: 'app-btn-primary ',
}
]
} }
], ],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional) pageLength: 10, // Set default number of rows per page (optional)

View File

@ -75,22 +75,35 @@ table.dataTable tbody td {
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [ buttons: [
{ {
extend: 'csv', extend: 'collection',
text: 'CSV', text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
title: 'Bap-Wise-Report-List', className: 'btn app-btn-secondary ',
}, buttons: [
{ {
extend: 'excel', extend: 'csv',
text: 'Excel', text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
title: 'Bap-Wise-Report-List', className: 'app-btn-primary ',
exportOptions: { title: 'Bap-Wise-Report-List',
orthogonal: 'sort' },
}, {
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
exportOptions: {
orthogonal: 'sort'
},
className: 'app-btn-primary ',
title: 'Bap-Wise-Report-List',
}
]
} }
], ],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional) pageLength: 10, // Set default number of rows per page (optional)

View File

@ -94,22 +94,54 @@
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", "<'row'<'col-sm-5'i><'col-sm-7'p>>",
// buttons: [
// {
// extend: 'csv',
// text: 'CSV',
// title: 'BDS TAT BAND WISE DATA',
// },
// {
// extend: 'excel',
// text: 'Excel',
// title: 'BDS TAT BAND WISE DATA',
// },
// ],
buttons: [ buttons: [
{ {
extend: 'csv', text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Create New Ticket </span>',
text: 'CSV', className: 'btn app-btn-primary mr-2',
title: 'BDS TAT BAND WISE DATA', action: function(e, dt, node, config) {
openTicket();
}
}, },
{ {
extend: 'excel', extend: 'collection',
text: 'Excel', text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
title: 'BDS TAT BAND WISE DATA', className: 'btn app-btn-secondary ',
}, buttons: [
{
extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'BDS TAT BAND WISE DATA',
},
{
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'BDS TAT BAND WISE DATA',
className: 'app-btn-primary ',
}
]
}
], ],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, paging: true,
pageLength: 10, pageLength: 10,

View File

@ -187,40 +187,40 @@
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap"> <table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th>S.No</th> <th>S.No&nbsp;</th>
<th>Client Name</th> <th>Client Name&nbsp;</th>
<th>Insurer</th> <th>Insurer&nbsp;</th>
<th>Policy</th> <th>Policy&nbsp;</th>
<th>Policy No</th> <th>Policy No&nbsp;</th>
<th>Endorsement No</th> <th>Endorsement No&nbsp;</th>
<th>Event Type</th> <th>Event Type&nbsp;</th>
<th>Action</th> <th>Action</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php if (isset($business_list)) { ?> <?php if (isset($business_list)) { ?>
<?php foreach ($business_list as $index => $row) { ?> <?php foreach($business_list as $index => $row){ ?>
<tr> <tr>
<td><?= $index + 1 ?></td> <td class="text-center"><?= $index + 1 ?></td>
<td><?php echo $row['client_name']; ?></td> <td><?php echo $row['client_name']; ?></td>
<td><?php echo $row['insurer_name']; ?></td> <td><?php echo $row['insurer_name']; ?></td>
<td><?php echo $row['policy_type']; ?></td> <td><?php echo $row['policy_type']; ?></td>
<td><?php echo $row['policy_no']; ?></td> <td><?php echo $row['policy_no']; ?></td>
<td><?php echo $row['endorsement_no']; ?></td> <td><?php echo $row['endorsement_no']; ?></td>
<td><?php echo $row['action_type_full']; ?></td> <td><?php echo $row['action_type_full']; ?></td>
<td> <td>
<div class="btn-group dropdown"> <div class="btn-group dropdown">
<a href="javascript: void(0);" <a href="javascript: void(0);"
class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"
aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a> aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
<div class="dropdown-menu dropdown-menu-right"> <div class="dropdown-menu dropdown-menu-right">
<a href=" <a href="
<?php <?php
if ($row['action_type'] == 'I') { if ($row['action_type'] == 'I') {
echo base_url("/policy_tranction/inception/list") . '?pt_id=' . $row['policy_trns_id']; echo base_url("/policy_tranction/inception/list") . '?pt_id=' . $row['policy_trns_id'];
} else { } else {
echo base_url("/policy_tranction/endorsement/list") . '?pt_id=' . $row['policy_trns_id']; echo base_url("/policy_tranction/endorsement/list") . '?pt_id=' . $row['policy_trns_id'];
} }
?>" id="get-policy-list" class="dropdown-item btnEdit"> ?>" id="get-policy-list" class="dropdown-item btnEdit">
<i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit <i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit
</a> </a>
@ -333,68 +333,191 @@
<script> <script>
// Datatable document ready // Datatable document ready
$(document).ready(function() { $(document).ready(function() {
var ticketsTable = $('#scroll-horizontal-datatable');
var ticketsTable = $('#scroll-horizontal-datatable'); if (ticketsTable.length) {
ticketsTable.DataTable({
if (ticketsTable.length) { dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
ticketsTable.DataTable({ "<'row'<'col-sm-12'tr>>" +
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
"<'row'<'col-sm-12'tr>>" + buttons: [
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector {
buttons: [{
extend: 'collection', extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>', text: '<span class="btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ', className: 'btn app-btn-secondary',
buttons: [{ buttons: [
{
extend: 'csv', extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>', text: '<i class="mdi mdi-file-delimited"></i><span class="btn-custom"> CSV </span>',
title: 'Policy-Tranction-BDS-List', title: 'Policy-Tranction-BDS-List'
}, },
{ {
extend: 'excel', extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>', text: '<i class="mdi mdi-file-excel"></i><span class="btn-custom"> EXCEL </span>',
title: 'Policy-Tranction-BDS-List', title: 'Policy-Tranction-BDS-List',
customize: function(xlsx) { customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml']; var sheet = xlsx.xl.worksheets['sheet1.xml'];
var total = 0; var total = 0;
// Find cells in column AB (28th column in Excel) // Sum values in column AB (28th column)
$('row c[r^="AB"]', sheet).each(function() { $('row c[r^="AB"]', sheet).each(function() {
var value = parseFloat($('v', this) var value = parseFloat($('v', this).text());
.text()); // Get the value inside the cell
if (!isNaN(value)) { if (!isNaN(value)) {
total += value; total += value;
} }
}); });
// Get the last row index and append the total row // Get last row index and append total row
var lastRow = $('row:last', sheet); var lastRow = $('row:last', sheet);
var rowIndex = parseInt(lastRow.attr('r')) + var rowIndex = parseInt(lastRow.attr('r')) + 2;
2; // Find the next row index
var totalRow = '<row r="' + rowIndex + '">' + var totalRow =
'<c t="inlineStr" r="AA' + rowIndex + '<row r="' + rowIndex + '">' +
'"><is><t>Total</t></is></c>' + // Insert "Total" in AA '<c t="inlineStr" r="AA' + rowIndex + '"><is><t>Total</t></is></c>' +
'<c t="n" r="AB' + rowIndex + '"><v>' + total.toFixed(2) + '<c t="n" r="AB' + rowIndex + '"><v>' + total.toFixed(2) + '</v></c>' +
'</v></c>' + // Insert sum in AB
'</row>'; '</row>';
// Append the new total row to the sheet
$(sheet).find('sheetData').append(totalRow); $(sheet).find('sheetData').append(totalRow);
} }
} }
] ]
}], }
language: { ],
search: "_INPUT_", language: {
searchPlaceholder: "Search..." search: `
}, <div class="datatable-search-wrapper">
paging: true, // Enable pagination _INPUT_
pageLength: 25, // Set default number of rows per page (optional) <i class="mdi mdi-magnify datatable-search-icon"></i>
ordering: false, </div>`,
}); searchPlaceholder: "Search"
} else { },
console.error("Table not found."); paging: true,
pageLength: 25,
ordering: false
});
} else {
console.error("Table not found.");
}
});
$(document).ready(function() {
getURLParams()
$('#client_id').select2();
$('#insurer_id').select2();
$('#policy_type_id').select2();
})
function fetchEmpolyeeList(event) {
event.preventDefault(); // Prevent default action
var start_date = $('#startDate').val();
var end_date = $('#endDate').val();
var client_id = $('#client_id').val();
var insurer_id = $('#insurer_id').val();
var policy_type_id = $('#policy_type_id').val();
var date_type = $('#date_type').val();
var issuer = $('#issuer').val();
console.log(start_date + '-' + end_date);
var queryParams = {
start_date: start_date,
end_date: end_date,
client_id: client_id,
insurer_id: insurer_id,
policy_type_id: policy_type_id,
date_type: date_type,
issuer: issuer,
};
const queryString = objectToQueryString(queryParams);
const apiURL = $('#get-emp-list').attr('href') + "?" + queryString;
console.log(apiURL);
window.location.href = apiURL;
}
function objectToQueryString(obj) {
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
}
function getURLParams() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
const startDate = params.get('start_date') || 0; // Default to 0 if not found
const endDate = params.get('end_date') || 0; // Default to 0 if not found
const client_id = params.get('client_id') || 0; // Default to 0 if not found
const insurer_id = params.get('insurer_id') || 0; // Default to 0 if not found
const policy_type_id = params.get('policy_type_id') || 0; // Default to 0 if not found
const date_type = params.get('date_type') || 0; // Default to 0 if not found
const issuer = params.get('issuer') || 0; // Default to 0 if not found
hideDateField(date_type)
console.log('startDate', startDate)
console.log('endDate', endDate)
console.log('client_id', client_id)
console.log('insurer_id', insurer_id)
console.log('policy_type_id', policy_type_id)
console.log('date_type', date_type)
console.log('issuer', issuer)
// Log the values or use them as needed
console.log('Start Date:', startDate);
console.log('End Date:', endDate);
if (startDate != 0 && endDate != 0) {
setTimeout(function() {
$('#start_date').val(startDate)
$('#end_date').val(endDate)
$('#client_id').val(client_id).change()
$('#insurer_id').val(insurer_id).change()
$('#policy_type_id').val(policy_type_id).change()
$('#date_type').val(date_type)
$('#issuer').val(issuer)
}, 1000)
}
}
$(function() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
// Get start and end dates from URL parameters, or use default values
const startDateParam = params.get('start_date') || moment().subtract(29, 'days').format('DD-MM-YYYY');
const endDateParam = params.get('end_date') || moment().format('DD-MM-YYYY');
// Parse the dates to moment objects
var start = moment(startDateParam, 'DD-MM-YYYY');
var end = moment(endDateParam, 'DD-MM-YYYY');
// var start = moment().subtract(29, 'days');
// var end = moment();
function cb(start, end) {
$('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
$('#startDate').val(start.format('DD-MM-YYYY'));
$('#endDate').val(end.format('DD-MM-YYYY'));
}
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
locale: { format: 'DD-MM-YYYY' },
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month')
.endOf('month')
]
} }
}); });

View File

@ -68,23 +68,23 @@ table.dataTable thead th {
</div> --> </div> -->
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap text-custom-black text-custom app-datatable"> <table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap text-custom-black text-custom app-datatable">
<thead class="app-table-head"> <thead class="bg-light">
<tr> <tr>
<th class="font-weight-medium">S.No.</th> <th class="font-weight-medium">S.No&nbsp;</th>
<th class="font-weight-medium">Client Name</th> <th class="font-weight-medium">Client Name&nbsp;</th>
<th class="font-weight-medium">Insurer Name</th> <th class="font-weight-medium">Insurer Name&nbsp;</th>
<th class="font-weight-medium">Insurer Branch Name</th> <th class="font-weight-medium">Insurer Branch Name&nbsp;</th>
<th class="font-weight-medium">Opening Date</th> <th class="font-weight-medium">Opening Date&nbsp;</th>
<th class="font-weight-medium">CD Account No</th> <th class="font-weight-medium">CD Account No&nbsp;</th>
<th class="font-weight-medium">Opening Amount</th> <th class="font-weight-medium">Opening Amount&nbsp;</th>
<th class="font-weight-medium">Date/User</th> <th class="font-weight-medium">Date/User&nbsp;</th>
<th class="font-weight-medium">Action</th> <th class="font-weight-medium">Action&nbsp;</th>
</tr> </tr>
</thead> </thead>
<tbody class="app-table-body"> <tbody class="app-table-body">
<?php foreach($CD_Master_Data as $index => $row){ ?> <?php foreach($CD_Master_Data as $index => $row){ ?>
<tr> <tr>
<td><?= $index + 1; ?></td> <td class="text-center"><?= $index + 1; ?></td>
<td><?php echo $row['client_name']; ?>( <?= $row['short_name'] ?> )</td> <td><?php echo $row['client_name']; ?>( <?= $row['short_name'] ?> )</td>
<td><?php echo $row['insurer_name']; ?></td> <td><?php echo $row['insurer_name']; ?></td>
<td><?php echo $row['insurer_branch_name']; ?></td> <td><?php echo $row['insurer_branch_name']; ?></td>
@ -234,7 +234,6 @@ table.dataTable thead th {
{ {
extend: 'csv', extend: 'csv',
title: 'CD-Master-List', title: 'CD-Master-List',
className: 'my_class',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>', text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary my_class', className: 'app-btn-primary my_class',
exportOptions: { exportOptions: {
@ -252,6 +251,14 @@ table.dataTable thead th {
] ]
} }
], ],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, paging: true,
pageLength: 25, pageLength: 25,
order: [[0, 'desc']] order: [[0, 'desc']]

View File

@ -71,7 +71,7 @@
<table data-custom-table-css="table" class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0" id="tickets-table"> <table data-custom-table-css="table" class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0" id="tickets-table">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th class="font-weight-medium">SNO</th> <th class="font-weight-medium">S.No&nbsp;</th>
<th class="font-weight-medium">File name</th> <th class="font-weight-medium">File name</th>
<th class="font-weight-medium">User/Time</th> <th class="font-weight-medium">User/Time</th>
<th class="font-weight-medium">Status</th> <th class="font-weight-medium">Status</th>
@ -86,7 +86,7 @@
?> ?>
<tr> <tr>
<td><b><?php echo ($key + 1) ?></b></td> <td class="text-center"><b><?php echo ($key + 1) ?></b></td>
<td style="overflow: hidden;" class="reload truncate" data-toggle="tooltip" data-placement="top" title="<?php echo $file['file_name'] ?>"> <td style="overflow: hidden;" class="reload truncate" data-toggle="tooltip" data-placement="top" title="<?php echo $file['file_name'] ?>">
<?php echo $file['file_name'] ?> <?php echo $file['file_name'] ?>
</td> </td>
@ -297,8 +297,12 @@
} }
], ],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 15, // Set default number of rows per page (optional) pageLength: 15, // Set default number of rows per page (optional)

View File

@ -56,10 +56,10 @@
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap"> <table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th>S.No</th> <th>S.No&nbsp;</th>
<th>Docs Name</th> <th>Docs Name&nbsp;</th>
<th>File Name</th> <th>File Name&nbsp;</th>
<th>Action</th> <th>Action&nbsp;</th>
</tr> </tr>
</thead> </thead>
<tbody id="table_bd"> <tbody id="table_bd">
@ -274,7 +274,7 @@ function create_url_list(data) {
data.forEach((item, index) => { data.forEach((item, index) => {
html += ` html += `
<tr> <tr>
<td>${index + 1}</td> <td class="text-center">${index + 1}</td>
<td>${item.doc_name}</td> <td>${item.doc_name}</td>
<td><a href="${item.url}" target="_blank">${item.url}</a></td> <td><a href="${item.url}" target="_blank">${item.url}</a></td>
<td> <td>

View File

@ -88,10 +88,24 @@
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", "<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [ buttons: [
{ extend: 'csv', text: 'CSV', title: 'Insurer-Wise-Report-List' }, {
{ extend: 'excel', text: 'Excel', title: 'Insurer-Wise-Report-List', exportOptions: { orthogonal: 'sort' } } extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{ extend: 'csv', text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>', title: 'Insurer-Wise-Report-List', className: 'app-btn-primary ' },
{ extend: 'excel', text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>', title: 'Insurer-Wise-Report-List', className: 'app-btn-primary ', exportOptions: { orthogonal: 'sort' } }
],
}
], ],
language: { search: "_INPUT_", searchPlaceholder: "Search..." }, language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, paging: true,
pageLength: 10, pageLength: 10,
ordering: false ordering: false

View File

@ -86,10 +86,24 @@
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", "<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [ buttons: [
{ extend: 'csv', text: 'CSV', title: 'Insurer-Wise-Report-List' }, {
{ extend: 'excel', text: 'Excel', title: 'Insurer-Wise-Report-List', exportOptions: { orthogonal: 'sort' } } extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{ extend: 'csv', text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>', title: 'Insurer-Wise-Report-List',className: 'app-btn-primary ' },
{ extend: 'excel', text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>', title: 'Insurer-Wise-Report-List',className: 'app-btn-primary ', exportOptions: { orthogonal: 'sort' } }
]
}
], ],
language: { search: "_INPUT_", searchPlaceholder: "Search..." }, language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, paging: true,
pageLength: 10, pageLength: 10,
ordering: false ordering: false

View File

@ -16,14 +16,13 @@
<a href="<?= base_url("client/client_deposit"); ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">ADD</a> <a href="<?= base_url("client/client_deposit"); ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">ADD</a>
</div> --> </div> -->
</div> </div>
<table data-custom-table-css="table" class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="0" <table data-custom-table-css="table" class="table mb-0 nowrap w-100 table-centered" cellspacing="0" id="tickets-table">
id="tickets-table">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th class="font-weight-medium">Insurer Name</th> <th class="font-weight-medium">Insurer Name&nbsp;</th>
<th class="font-weight-medium">Insurer Branch Name</th> <th class="font-weight-medium">Insurer Branch Name&nbsp;</th>
<th class="font-weight-medium">CD Account Number</th> <th class="font-weight-medium">CD Account Number&nbsp;</th>
<th class="font-weight-medium">Current Balance</th> <th class="font-weight-medium">Current Balance&nbsp;</th>
<th class="font-weight-medium">Action</th> <th class="font-weight-medium">Action</th>
</tr> </tr>
</thead> </thead>
@ -70,31 +69,43 @@
$(document).ready(function() { $(document).ready(function() {
$('#tickets-table').DataTable({ $('#tickets-table').DataTable({
// dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>",
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>", dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>",
buttons: [{ buttons: [
extend: 'csv', {
text: 'CSV', extend: 'collection',
title: 'Client Deposit Details - ' + ' <?php echo $clientName[0]['client_name'];?>', text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'my_class', className: 'btn app-btn-secondary ',
exportOptions: { buttons: [
columns: ':not(:last-child)' {
}, extend: 'csv',
}, text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
{ title: 'Client Deposit Details - ' + ' <?php echo $clientName[0]['client_name'];?>',
extend: 'pdf', className: 'app-btn-primary ',
text: 'PDF', exportOptions: {
title: 'Client Deposit Details - ' + ' <?php echo $clientName[0]['client_name'];?>', columns: ':not(:last-child)'
exportOptions: { },
columns: ':not(:last-child)' },
}, {
} extend: 'pdf',
], text: '<i class="mdi mdi-file-pdf " ></i><span class=" btn-custom"> PDF </span>',
title: 'Client Deposit Details - ' + ' <?php echo $clientName[0]['client_name'];?>',
exportOptions: {
columns: ':not(:last-child)'
},
className: 'app-btn-primary ',
}
]
}
],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
}, _INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
}); });

View File

@ -1,49 +1,15 @@
<style> <style> .card-body{ margin-top: 0px !important; } </style>
#kyc_table #tbody td,
#other_docs_table tbody td
{
background-color: white !important;
}
#kyc_table #tbody tr ,
#other_docs_table tbody tr
{
box-shadow: 0px 2px 4px 0px #00000024;
background-color: white;
border-radius: 10px;
}
#kyc_table #tbody tr:hover td ,
#other_docs_table tr:hover td
{
background-color: #e0e0e0 !important;
}
#KYC-DOC-tab .card-body ,
#other_docs_table .card-body
{
background-color: #F5FFFF !important;
border-radius: 10px;
box-shadow: 0px 4px 4px 0px #00000040;
}
#KYC-DOC-tab thead{
padding: 15px !important;
}
</style>
<div class="tab-pane fade" id="KYC-DOC-tab"> <div class="tab-pane fade" id="KYC-DOC-tab">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="card"> <div class="card" id="collapseOne">
<div class="card-body"> <div class="card-body">
<div class="table-responsive"> <div class="table-responsive">
<table data-custom-table-css="table" id="kyc_table" class="table table-sm mb-0"> <table data-custom-table-css="second-table" id="kyc_table" class="table table-sm mb-0">
<thead> <thead>
<tr> <tr>
<th>S.no</th> <th>S. No</th>
<th>Document Name</th> <th>Document Name</th>
<th>Status</th> <th>Status</th>
<th>Action</th> <th>Action</th>
@ -63,7 +29,7 @@
<div class="row" id="others"> <div class="row" id="others">
<div class="col-12"> <div class="col-12">
<div class="card" style="margin-left: 12px;margin-right: -12px;"> <div class="card" id="collapseOne" style="margin-left: 12px;margin-right: -12px;">
<div class="card-body"> <div class="card-body">
<h3>Additional Documents</h3> <h3>Additional Documents</h3>
<form role="form" class="parsley-examples" method="post" id="kyc_form" <form role="form" class="parsley-examples" method="post" id="kyc_form"
@ -101,10 +67,10 @@
</div> <!-- end row --> </div> <!-- end row -->
<div class="col-lg-12" id="other_docs_table"> <div class="col-lg-12" id="other_docs_table">
<div class="card"> <div class="card" id="collapseOne">
<div class="card-body"> <div class="card-body">
<div class="table-responsive"> <div class="table-responsive">
<table data-custom-table-css="table" id="kyc_table" class="table table-sm mb-0"> <table data-custom-table-css="second-table" id="kyc_table" class="table table-sm mb-0">
<thead> <thead>
<tr> <tr>
<th>Document Name</th> <th>Document Name</th>

View File

@ -85,21 +85,20 @@ table.dataTable thead th {
<a href="<?= base_url("client/create"); ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">Add</a> <a href="<?= base_url("client/create"); ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">Add</a>
</div> --> </div> -->
<!-- </div>--> <!-- </div>-->
<table data-custom-table-css="table" class="table table-sm m-0 table-centered dt-responsive nowrap w-100" cellspacing="0" <table data-custom-table-css="table" class="table mb-0 nowrap" cellspacing="0" id="tickets-table">
id="tickets-table">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th class="font-weight-medium">S.No</th> <th class="font-weight-medium">S.No&nbsp;</th>
<th class="font-weight-medium">Client Name</th> <th class="font-weight-medium">Client Name&nbsp;</th>
<th class="font-weight-medium">Account Manager</th> <th class="font-weight-medium">Account Manager&nbsp;</th>
<th class="font-weight-medium">Action</th> <th class="font-weight-medium">Action&nbsp;</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php foreach($clientList as $index => $row){ ?> <?php foreach($clientList as $index => $row){ ?>
<tr > <tr >
<td><?=$index+1?></td> <td class="text-center"><?=$index+1?></td>
<td class="client_info" data-id="<?php echo $row->id; ?>"><?php echo $row->client_name; ?> ( <?php echo $row->short_name; ?> ) </td> <td class="client_info" data-id="<?php echo $row->id; ?>"><?php echo $row->client_name; ?> ( <?php echo $row->short_name; ?> ) </td>
<td> <td>
<?php $account_managers = ''; ?> <?php $account_managers = ''; ?>
@ -108,7 +107,9 @@ table.dataTable thead th {
<?php $account_managers .= $client->account_manager . ', '; ?> <?php $account_managers .= $client->account_manager . ', '; ?>
<?php endif; ?> <?php endif; ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php echo rtrim($account_managers, ', '); ?> <?php
$account_managers = rtrim($account_managers, ', ');
echo $account_managers !== '' ? $account_managers : 'N/A'; ?>
</td> </td>
<td> <td>
<div class="btn-group dropdown"> <div class="btn-group dropdown">
@ -302,7 +303,6 @@ $(document).ready(function()
"<'row'<'col-sm-5'i><'col-sm-7'p>>", "<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [ buttons: [
{ {
text: 'Add From Lead', text: 'Add From Lead',
className: 'btn-filter add-from-lead', // custom class className: 'btn-filter add-from-lead', // custom class
@ -312,27 +312,28 @@ $(document).ready(function()
}, },
{ {
text: '+ Create New Client', text: '+ Create New Client',
className: 'btn-filter buttons-html5', // custom class className: 'btn-filter app-btn-primary buttons-html5', // custom class
action: function(e, dt, node, config) { action: function(e, dt, node, config) {
addClient(); addClient();
} }
}, },
{ {
extend: 'csv', extend: 'collection',
text: 'CSV', text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
title: 'ClientList', className: 'btn app-btn-secondary ',
className: 'my_class', buttons: [
exportOptions: { {
columns: ':not(:last-child)' extend: 'csv',
}, text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
} title: 'Client-List',
], className: 'app-btn-primary ',
exportOptions: {
initComplete: function() { columns: ':not(:last-child)'
$('.btn-filter') },
.removeClass('btn-secondary') }
.addClass('btn btn-primary'); ]
}, }
],
language: { language: {
search: ` search: `
<div class="datatable-search-wrapper"> <div class="datatable-search-wrapper">

View File

@ -111,31 +111,33 @@
</div> </div>
<div class="table-responsive" style="overflow-x: auto;"> <div class="table-responsive" style="overflow-x: auto;">
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100"> <table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100">
<thead class="bg-light"> <thead class="bg-light">
<tr>
<th>S.No&nbsp;</th>
<th>Doc name&nbsp;</th>
<th>File name&nbsp;</th>
<th>Action&nbsp;</th>
</tr>
</thead>
<tbody>
<?php if (isset($files)) { ?>
<?php foreach($files as $index => $row){ ?>
<tr> <tr>
<th>S.No</th> <td class="text-center"><?= $index + 1 ?></td>
<th>Doc name</th> <td><?php echo $row['doc_name']; ?></td>
<th>File name</th> <td><?php echo $row['file_name']; ?></td>
<th>Action</th> <td>
</tr> <a id="download_1"
</thead> data-id="1"
<tbody> class="mdi mdi-download"
<?php if (isset($files)) { ?> style="font-size: 18px;"
<?php foreach ($files as $index => $row) { ?> target="_blank"
<tr> href="<?= base_url("/downloadGdriveFile?client_id=" . $row['client_id'] . "&file_type=" . $row['file_type'] . "&file_name=" . $row['file_name']."&client_policy_id=".$row['client_policy_id']); ?>">
<td><?= $index + 1 ?></td> </a>
<td><?php echo $row['doc_name']; ?></td> </td>
<td><?php echo $row['file_name']; ?></td>
<td>
<a id="download_1"
data-id="1"
class="mdi mdi-download"
style="font-size: 18px;"
target="_blank"
href="<?= base_url("/downloadGdriveFile?client_id=" . $row['client_id'] . "&file_type=" . $row['file_type'] . "&file_name=" . $row['file_name'] . "&client_policy_id=" . $row['client_policy_id']); ?>">
</a>
</td>
</tr> </tr>
<?php } ?> <?php } ?>

View File

@ -48,10 +48,10 @@
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap"> <table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th>S.No</th> <th>S.No&nbsp;</th>
<th>Docs Name</th> <th>Docs Name&nbsp;</th>
<th>File Name</th> <th>File Name&nbsp;</th>
<th>Action</th> <th>Action&nbsp;</th>
</tr> </tr>
</thead> </thead>
<tbody id="table_bd"> <tbody id="table_bd">

View File

@ -92,33 +92,33 @@
<table data-custom-table-css="table" class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table"> <table data-custom-table-css="table" class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th class="font-weight-medium">SNO</th> <th class="font-weight-medium">S.No&nbsp;</th>
<?php if (isset($getData)) { <?php if (isset($getData)) {
if ($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?> if ($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?>
<th class="font-weight-medium">Client/Branch</th> <th class="font-weight-medium">Client/Branch&nbsp;</th>
<?php } <?php }
if ($getData['client_id'] != '0' && $getData['branch_id'] == '0') { ?> if ($getData['client_id'] != '0' && $getData['branch_id'] == '0') { ?>
<th class="font-weight-medium">Branch</th> <th class="font-weight-medium">Branch&nbsp;</th>
<?php } } ?> <?php } } ?>
<th class="font-weight-medium">Name</th> <th class="font-weight-medium">Name&nbsp;</th>
<th class="font-weight-medium">EMP Code</th> <th class="font-weight-medium">EMP Code&nbsp;</th>
<th class="font-weight-medium">Relationship</th> <th class="font-weight-medium">Relationship&nbsp;</th>
<th class="font-weight-medium">Gender</th> <th class="font-weight-medium">Gender&nbsp;</th>
<th class="font-weight-medium">Email</th> <th class="font-weight-medium">Email&nbsp;</th>
<th class="font-weight-medium">Mobile</th> <th class="font-weight-medium">Mobile&nbsp;</th>
<th class="font-weight-medium">Date of Birth</th> <th class="font-weight-medium">Date of Birth&nbsp;</th>
<th class="font-weight-medium">Policy name</th> <th class="font-weight-medium">Policy name&nbsp;</th>
<th class="font-weight-medium">Insurer name</th> <th class="font-weight-medium">Insurer name&nbsp;</th>
<th class="font-weight-medium">TPA ID</th> <th class="font-weight-medium">TPA ID&nbsp;</th>
<th class="font-weight-medium">Risk ID</th> <th class="font-weight-medium">Risk ID&nbsp;</th>
<th class="font-weight-medium">Policy status</th> <th class="font-weight-medium">Policy status&nbsp;</th>
<th class="font-weight-medium">()Sum Insured</th> <th class="font-weight-medium">()Sum Insured&nbsp;</th>
<th class="font-weight-medium">()Premium</th> <th class="font-weight-medium">()Premium&nbsp;</th>
<th class="font-weight-medium" id="rata_premium" data-toggle="tooltip" data-placement="top">()Pro Rata <br> Premium</th> <th class="font-weight-medium" id="rata_premium" data-toggle="tooltip" data-placement="top">()Pro Rata <br> Premium&nbsp;</th>
<th class="font-weight-medium" id="gst" data-toggle="tooltip" data-placement="top">()GST</th> <th class="font-weight-medium" id="gst" data-toggle="tooltip" data-placement="top">()GST&nbsp;</th>
<th class="font-weight-medium" > Action </th> <th class="font-weight-medium" > Action &nbsp;</th>
</tr> </tr>
</thead> </thead>
@ -129,7 +129,7 @@
$gst_total = 0; $gst_total = 0;
foreach ($employees as $key => $employee) { ?> foreach ($employees as $key => $employee) { ?>
<tr> <tr>
<td><b><?php echo ($key + 1); ?></b></td> <td class="text-center"><b><?php echo ($key + 1); ?></b></td>
<?php if (isset($getData)) { <?php if (isset($getData)) {
if ($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?> if ($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?>
@ -343,18 +343,34 @@
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{ buttons: [
extend: 'csv', {
text: 'CSV', extend: 'collection',
title: 'Member-List', text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
},{ className: 'btn app-btn-secondary ',
extend: 'excel', buttons: [
text: 'Excel', {
title: 'Member-List', extend: 'csv',
}], text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'Member-List',
},
{
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
className: 'app-btn-primary ',
title: 'Member-List',
}
]
}
],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 25 // Set default number of rows per page (optional) pageLength: 25 // Set default number of rows per page (optional)

View File

@ -11,6 +11,7 @@ option:disabled {
<div class="col-xl-12"> <div class="col-xl-12">
<div id="accordion1" class="mb-3"> <div id="accordion1" class="mb-3">
<div class="card mb-1"> <div class="card mb-1">
<h4 class="m-1"> <h4 class="m-1">
<span>Filters</span> <span>Filters</span>
<a id="toggleIcon1" class="text-dark float-right" data-toggle="collapse" href="#collapseTwo" <a id="toggleIcon1" class="text-dark float-right" data-toggle="collapse" href="#collapseTwo"
@ -18,6 +19,15 @@ option:disabled {
<i id="icon1" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i> <i id="icon1" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a> </a>
</h4> </h4>
<!-- <label id="filterAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Filters</span>
<a id="toggleIcon1" class="text-dark float-right" data-toggle="collapse" href="#collapseTwo"
aria-expanded="true">
<i id="icon1" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</label> -->
<div id="collapseTwo" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion1"> <div id="collapseTwo" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion1">
<div class="card-body"> <div class="card-body">
<!-- <div class="text-center"> --> <!-- <div class="text-center"> -->

View File

@ -20,11 +20,12 @@
<div class="col-xl-12"> <div class="col-xl-12">
<div id="accordion" class="mb-3"> <div id="accordion" class="mb-3">
<div class="card mb-1"> <div class="card mb-1">
<h5 class="m-1"> <label id="filterAccordion" class="m-1 d-flex justify-content-between align-items-center">
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true"> <span class="font-color-black">Filters</span>
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i> <a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true">
</a> <i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</h5> </a>
</label>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion"> <div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body"> <div class="card-body">
<!-- <div class="text-center"> --> <!-- <div class="text-center"> -->
@ -90,7 +91,7 @@
<table data-custom-table-css="table" class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0" id="tickets-table"> <table data-custom-table-css="table" class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0" id="tickets-table">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th class="font-weight-medium">SNO</th> <th class="font-weight-medium">S.No&nbsp;</th>
<th class="font-weight-medium">Name/code</th> <th class="font-weight-medium">Name/code</th>
<th class="font-weight-medium">Policy name</th> <th class="font-weight-medium">Policy name</th>
<th class="font-weight-medium">Endorsement ID</th> <th class="font-weight-medium">Endorsement ID</th>
@ -108,7 +109,7 @@
foreach ($employees as $key => $employee) { ?> foreach ($employees as $key => $employee) { ?>
<tr> <tr>
<td><b><?php echo ($key + 1) ?></b></td> <td class="text-center"><b><?php echo ($key + 1) ?></b></td>
<td><?php echo $employee['name'] ?>( <?php echo $employee['emp_code'] ?> )</td> <td><?php echo $employee['name'] ?>( <?php echo $employee['emp_code'] ?> )</td>
<!-- <td><?php echo isset($employee['policy_name']) ? $employee['policy_name'] : '' ?> - <?php echo isset($employee['policy_no']) ? $employee['policy_no'] : '' ?> - <?php echo isset($employee['policy_type']) ? $employee['policy_type'] : '' ?></td> --> <!-- <td><?php echo isset($employee['policy_name']) ? $employee['policy_name'] : '' ?> - <?php echo isset($employee['policy_no']) ? $employee['policy_no'] : '' ?> - <?php echo isset($employee['policy_type']) ? $employee['policy_type'] : '' ?></td> -->
<td><?php echo isset($employee['policy_type']) ? $employee['policy_type'] : '' ?> - <?php echo isset($employee['policy_no']) ? $employee['policy_no'] : '' ?></td> <td><?php echo isset($employee['policy_type']) ? $employee['policy_type'] : '' ?> - <?php echo isset($employee['policy_no']) ? $employee['policy_no'] : '' ?></td>
@ -593,24 +594,53 @@
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", "<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [{ buttons: [
extend: 'csv', {
text: 'CSV', text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Create New Ticket </span>',
title: 'Endorsement-List', className: 'btn app-btn-primary mr-2',
className: 'my_class', action: function(e, dt, node, config) {
exportOptions: { openTicket();
columns: ':not(:last-child)',
format: {
body: function (data, row, column, node) {
// Convert data to string to avoid scientific notation in CSV
if (!isNaN(data) && parseFloat(data) > 1e20) {
return `'${data}`;
}
return data.toString();// Ensures all data is treated as strings
} }
},
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
},
{
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
exportOptions: {
orthogonal: 'sort'
},
className: 'app-btn-primary ',
}
]
} }
} ],
}], // buttons: [{
// extend: 'csv',
// text: 'CSV',
// title: 'Endorsement-List',
// className: 'my_class',
// exportOptions: {
// columns: ':not(:last-child)',
// format: {
// body: function (data, row, column, node) {
// // Convert data to string to avoid scientific notation in CSV
// if (!isNaN(data) && parseFloat(data) > 1e20) {
// return `'${data}`;
// }
// return data.toString();// Ensures all data is treated as strings
// }
// }
// }
// }],
initComplete: function(settings, json) { initComplete: function(settings, json) {
$('.my_class').css({ $('.my_class').css({
"position": "relative", "position": "relative",
@ -618,8 +648,12 @@
}); });
}, },
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, paging: true,
// pagingType: 'full_numbers' // pagingType: 'full_numbers'

View File

@ -220,7 +220,7 @@
<table data-custom-table-css="table" class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0" id="tickets-table"> <table data-custom-table-css="table" class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0" id="tickets-table">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th class="font-weight-medium">SNO</th> <th class="font-weight-medium">S.No&nbsp;</th>
<th class="font-weight-medium">Name</th> <th class="font-weight-medium">Name</th>
<th class="font-weight-medium">Emp Code</th> <th class="font-weight-medium">Emp Code</th>
<th class="font-weight-medium">Relationship</th> <th class="font-weight-medium">Relationship</th>
@ -488,32 +488,69 @@
$('#client_policy_id').select2(); $('#client_policy_id').select2();
var table = $('#tickets-table').DataTable({ var table = $('#tickets-table').DataTable({
dom: 'fBrtip', dom: 'fBrtip',
// buttons: [
// {
// extend: 'copy',
// text: '<i class="mdi mdi-content-copy"></i>',
// titleAttr: 'Copy',
// filename: 'Enrolment List'
// },
// {
// extend: 'print',
// text: '<i class="mdi mdi-printer"></i>',
// titleAttr: 'Print',
// filename: 'Enrolment List'
// },
// {
// extend: 'pdf',
// text: '<i class="mdi mdi-file-pdf"></i>',
// titleAttr: 'PDF',
// filename: 'Enrolment List'
// },
// {
// extend: 'csv',
// text: '<i class="mdi mdi-file-document"></i>',
// titleAttr: 'CSV',
// filename: 'Enrolment List'
// }
// ],
buttons: [ buttons: [
{ {
extend: 'copy', extend: 'collection',
text: '<i class="mdi mdi-content-copy"></i>', text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
titleAttr: 'Copy', className: 'btn app-btn-secondary ',
filename: 'Enrolment List' buttons: [
}, {
{ extend: 'copy',
extend: 'print', text: '<i class="mdi mdi-content-copy"></i>',
text: '<i class="mdi mdi-printer"></i>', titleAttr: 'Copy',
titleAttr: 'Print', filename: 'Enrolment List'
filename: 'Enrolment List' className: 'app-btn-primary ',
}, },
{ {
extend: 'pdf', extend: 'csv',
text: '<i class="mdi mdi-file-pdf"></i>', text: '<i class="mdi mdi-file-document"></i>',
titleAttr: 'PDF', titleAttr: 'CSV',
filename: 'Enrolment List' filename: 'Enrolment List'
}, className: 'app-btn-primary ',
{ },
extend: 'csv', {
text: '<i class="mdi mdi-file-document"></i>', extend: 'print',
titleAttr: 'CSV', text: '<i class="mdi mdi-printer"></i>',
filename: 'Enrolment List' titleAttr: 'Print',
} filename: 'Enrolment List'
], className: 'app-btn-primary ',
},
{
extend: 'pdf',
text: '<i class="mdi mdi-file-pdf"></i>',
titleAttr: 'PDF',
filename: 'Enrolment List'
className: 'app-btn-primary ',
}
]
}
],
initComplete: function() { initComplete: function() {
// Add custom class to the print button // Add custom class to the print button
$('.buttons-print').addClass('buttons-html5'); $('.buttons-print').addClass('buttons-html5');

View File

@ -19,19 +19,18 @@
</div> </div>
</div> </div>
<table data-custom-table-css="table" class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0" <table data-custom-table-css="table" class="table mb-0 nowrap w-100 table-centered" cellspacing="0" id="tickets-table">
id="tickets-table">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th class="font-weight-medium">SNO</th> <th class="font-weight-medium">S.No&nbsp;</th>
<th class="font-weight-medium">File name</th> <th class="font-weight-medium">File name&nbsp;</th>
<th class="font-weight-medium">Client</th> <th class="font-weight-medium">Client&nbsp;</th>
<th class="font-weight-medium">Client Branch</th> <th class="font-weight-medium">Client Branch&nbsp;</th>
<th class="font-weight-medium">Policy</th> <th class="font-weight-medium">Policy&nbsp;</th>
<th class="font-weight-medium">Event</th> <th class="font-weight-medium">Event&nbsp;</th>
<th class="font-weight-medium">User/Time</th> <th class="font-weight-medium">User/Time&nbsp;</th>
<th class="font-weight-medium">Status</th> <th class="font-weight-medium">Status&nbsp;</th>
<th class="font-weight-medium">Action</th> <th class="font-weight-medium">Action&nbsp;</th>
</tr> </tr>
</thead> </thead>
@ -45,7 +44,7 @@
?> ?>
<tr> <tr>
<td><b><?php echo ($key + 1) ?></b></td> <td class="text-center"><b><?php echo ($key + 1) ?></b></td>
<td style="overflow: hidden;" class="reload truncate" data-toggle="tooltip" data-placement="top" title="<?php echo $file['file_name'] ?>"> <td style="overflow: hidden;" class="reload truncate" data-toggle="tooltip" data-placement="top" title="<?php echo $file['file_name'] ?>">
<?php echo $file['file_name']?> <?php echo $file['file_name']?>
</td> </td>
@ -461,28 +460,57 @@ $('body').on('click', '.reload', function() {
$(document).ready(function() { $(document).ready(function() {
$('#tickets-table').DataTable({ $('#tickets-table').DataTable({
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", "<'row'<'col-sm-5'i><'col-sm-7'p>>",
"buttons": [{ buttons: [{
"extend": 'csv', extend: 'collection',
"text": 'CSV', text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
"title": 'Employee-Upload-List', className: 'btn app-btn-secondary ',
"className": 'my_class', buttons: [
"exportOptions": { {
"columns": ':not(:last-child)' extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
title: 'Employee-Upload-List',
className: 'app-btn-primary ',
exportOptions: {
columns: ':not(:last-child)'
},
}
]
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
}], // "buttons": [{
"initComplete": function(settings, json) { // "extend": 'csv',
$('.my_class').css({ // "text": 'CSV',
"position": "relative", // "title": 'Employee-Upload-List',
"left": "79px" // "className": 'my_class',
}); // "exportOptions": {
}, // "columns": ':not(:last-child)'
language: { // },
search: "_INPUT_", // }],
searchPlaceholder: "Search..." // "initComplete": function(settings, json) {
}, // $('.my_class').css({
// "position": "relative",
// "left": "79px"
// });
// },
// language: {
// search: "_INPUT_",
// searchPlaceholder: "Search..."
// },
paging: true, paging: true,
}); });

View File

@ -184,14 +184,14 @@
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap"> <table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th>S.No</th> <th>S.No&nbsp;</th>
<th>Client Name</th> <th>Client Name&nbsp;</th>
<th>Insurer</th> <th>Insurer&nbsp;</th>
<th>Policy</th> <th>Policy&nbsp;</th>
<th>Policy No</th> <th>Policy No&nbsp;</th>
<th>Endorsement No</th> <th>Endorsement No&nbsp;</th>
<th>Event Type</th> <th>Event Type&nbsp;</th>
<th>Action</th> <th>Action&nbsp;</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -331,36 +331,37 @@
<script> <script>
// Datatable document ready // Datatable document ready
$(document).ready(function() { $(document).ready(function () {
var ticketsTable = $('#scroll-horizontal-datatable');
var ticketsTable = $('#scroll-horizontal-datatable'); if (ticketsTable.length) {
ticketsTable.DataTable({
if (ticketsTable.length) { dom:
ticketsTable.DataTable({ "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector buttons: [
buttons: [{ {
extend: 'collection', extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>', text: '<span class="btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ', className: 'btn app-btn-secondary',
buttons: [{ buttons: [
{
extend: 'csv', extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>', text: '<i class="mdi mdi-file-delimited"></i><span class="btn-custom"> CSV </span>',
title: 'Policy-Tranction-BDS-List', title: 'Policy-Tranction-BDS-List'
}, },
{ {
extend: 'excel', extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>', text: '<i class="mdi mdi-file-excel"></i><span class="btn-custom"> EXCEL </span>',
title: 'Policy-Tranction-BDS-List', title: 'Policy-Tranction-BDS-List',
customize: function(xlsx) { customize: function (xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml']; var sheet = xlsx.xl.worksheets['sheet1.xml'];
var total = 0; var total = 0;
// Find cells in column AB (28th column in Excel) // Find cells in column AB (28th column in Excel)
$('row c[r^="AB"]', sheet).each(function() { $('row c[r^="AB"]', sheet).each(function () {
var value = parseFloat($('v', this) var value = parseFloat($('v', this).text());
.text()); // Get the value inside the cell
if (!isNaN(value)) { if (!isNaN(value)) {
total += value; total += value;
} }
@ -368,13 +369,12 @@
// Get the last row index and append the total row // Get the last row index and append the total row
var lastRow = $('row:last', sheet); var lastRow = $('row:last', sheet);
var rowIndex = parseInt(lastRow.attr('r')) + var rowIndex = parseInt(lastRow.attr('r')) + 2;
2; // Find the next row index
var totalRow = '<row r="' + rowIndex + '">' + var totalRow =
'<c t="inlineStr" r="AA' + rowIndex + '<row r="' + rowIndex + '">' +
'"><is><t>Total</t></is></c>' + // Insert "Total" in AA '<c t="inlineStr" r="AA' + rowIndex + '"><is><t>Total</t></is></c>' +
'<c t="n" r="AB' + rowIndex + '"><v>' + total.toFixed(2) + '<c t="n" r="AB' + rowIndex + '"><v>' + total.toFixed(2) + '</v></c>' +
'</v></c>' + // Insert sum in AB
'</row>'; '</row>';
// Append the new total row to the sheet // Append the new total row to the sheet
@ -382,17 +382,142 @@
} }
} }
] ]
}], }
language: { ],
search: "_INPUT_", language: {
searchPlaceholder: "Search..." search: `
}, <div class="datatable-search-wrapper">
paging: true, // Enable pagination _INPUT_
pageLength: 25, // Set default number of rows per page (optional) <i class="mdi mdi-magnify datatable-search-icon"></i>
ordering: false, </div>`,
}); searchPlaceholder: "Search"
} else { },
console.error("Table not found."); paging: true,
pageLength: 25,
ordering: false
});
} else {
console.error("Table not found.");
}
});
$(document).ready(function() {
getURLParams()
$('#client_id').select2();
$('#insurer_id').select2();
$('#policy_type_id').select2();
})
function fetchEmpolyeeList(event) {
event.preventDefault(); // Prevent default action
var start_date = $('#startDate').val();
var end_date = $('#endDate').val();
var client_id = $('#client_id').val();
var insurer_id = $('#insurer_id').val();
var policy_type_id = $('#policy_type_id').val();
var date_type = $('#date_type').val();
var issuer = $('#issuer').val();
console.log(start_date + '-' + end_date);
var queryParams = {
start_date: start_date,
end_date: end_date,
client_id: client_id,
insurer_id: insurer_id,
policy_type_id: policy_type_id,
date_type: date_type,
issuer: issuer,
};
const queryString = objectToQueryString(queryParams);
const apiURL = $('#get-emp-list').attr('href') + "?" + queryString;
console.log(apiURL);
window.location.href = apiURL;
}
function objectToQueryString(obj) {
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
}
function getURLParams() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
const startDate = params.get('start_date') || 0; // Default to 0 if not found
const endDate = params.get('end_date') || 0; // Default to 0 if not found
const client_id = params.get('client_id') || 0; // Default to 0 if not found
const insurer_id = params.get('insurer_id') || 0; // Default to 0 if not found
const policy_type_id = params.get('policy_type_id') || 0; // Default to 0 if not found
const date_type = params.get('date_type') || 0; // Default to 0 if not found
const issuer = params.get('issuer') || 0; // Default to 0 if not found
hideDateField(date_type)
console.log('startDate', startDate)
console.log('endDate', endDate)
console.log('client_id', client_id)
console.log('insurer_id', insurer_id)
console.log('policy_type_id', policy_type_id)
console.log('date_type', date_type)
console.log('issuer', issuer)
// Log the values or use them as needed
console.log('Start Date:', startDate);
console.log('End Date:', endDate);
if (startDate != 0 && endDate != 0) {
setTimeout(function() {
$('#start_date').val(startDate)
$('#end_date').val(endDate)
$('#client_id').val(client_id).change()
$('#insurer_id').val(insurer_id).change()
$('#policy_type_id').val(policy_type_id).change()
$('#date_type').val(date_type)
$('#issuer').val(issuer)
}, 1000)
}
}
$(function() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
// Get start and end dates from URL parameters, or use default values
const startDateParam = params.get('start_date') || moment().subtract(29, 'days').format('DD-MM-YYYY');
const endDateParam = params.get('end_date') || moment().format('DD-MM-YYYY');
// Parse the dates to moment objects
var start = moment(startDateParam, 'DD-MM-YYYY');
var end = moment(endDateParam, 'DD-MM-YYYY');
// var start = moment().subtract(29, 'days');
// var end = moment();
function cb(start, end) {
$('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
$('#startDate').val(start.format('DD-MM-YYYY'));
$('#endDate').val(end.format('DD-MM-YYYY'));
}
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
locale: { format: 'DD-MM-YYYY' },
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month')
.endOf('month')
]
} }
}); });

View File

@ -44,6 +44,10 @@ table.dataTable tbody td {
box-shadow: 0px 2px 4px 0px #00000024 !important; box-shadow: 0px 2px 4px 0px #00000024 !important;
} }
#hr_activity_history_append_area tbody tr {
background-color: transparent !important;
}
</style> </style>
<!-- <div class="row" style="position: relative;left: 250px;top: 55px;"> <!-- <div class="row" style="position: relative;left: 250px;top: 55px;">
@ -60,7 +64,7 @@ table.dataTable tbody td {
</div> </div>
</div> --> </div> -->
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap flex-grow"> <table data-custom-table-css="second-table" id="scroll-horizontal-datatable" class="table w-100 nowrap flex-grow">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th>S. No</th> <th>S. No</th>
@ -93,6 +97,7 @@ $(document).ready(function () {
if (ticketsTable.length) { if (ticketsTable.length) {
var table = ticketsTable.DataTable({ var table = ticketsTable.DataTable({
scrollX: true, scrollX: true,
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", "<'row'<'col-sm-5'i><'col-sm-7'p>>",
@ -120,6 +125,17 @@ $(document).ready(function () {
] ]
}); });
// run after DataTable is ready
$('.dataTables_filter input').css({
'background': '#F0F0F0',
'border': 'none',
'border-radius': '8px',
'padding-right': '35px'
}).wrap('<div style="position:relative; display:inline-block;"></div>')
.after('<i class="mdi mdi-magnify" ' +
'style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>');
// Attach submit handler separately so it works // Attach submit handler separately so it works
$(document).on("click", "#submitBtn", function () { $(document).on("click", "#submitBtn", function () {
appendHrActivityHistoryHtml(this, true); appendHrActivityHistoryHtml(this, true);

View File

@ -10,12 +10,26 @@
<div class="col-xl-12"> <div class="col-xl-12">
<div id="accordion" class="mb-3"> <div id="accordion" class="mb-3">
<div class="card mb-1"> <div class="card mb-1">
<h4 class="m-1"> <h4 class="m-1">
<span>Filters</span> <span>Filters</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true"> <a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i> <i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a> </a>
</h4> </h4>
<!-- <h5 class="m-1">
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h5>
<label id="filterAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Filters</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</label> -->
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion"> <div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body"> <div class="card-body">
<!-- <div class="text-center"> --> <!-- <div class="text-center"> -->
@ -104,15 +118,15 @@
id="hr_tickets_table"> id="hr_tickets_table">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th class="font-weight-medium">SNO</th> <th class="font-weight-medium">S.No&nbsp;</th>
<th class="font-weight-medium">File name</th> <th class="font-weight-medium">File name&nbsp;</th>
<th class="font-weight-medium">Client</th> <th class="font-weight-medium">Client&nbsp;</th>
<th class="font-weight-medium">Client Branch</th> <th class="font-weight-medium">Client Branch&nbsp;</th>
<th class="font-weight-medium">Policy</th> <th class="font-weight-medium">Policy&nbsp;</th>
<th class="font-weight-medium">Event</th> <th class="font-weight-medium">Event&nbsp;</th>
<th class="font-weight-medium">User/Time</th> <th class="font-weight-medium">User/Time&nbsp;</th>
<th class="font-weight-medium">Status</th> <th class="font-weight-medium">Status&nbsp;</th>
<th class="font-weight-medium">Action</th> <th class="font-weight-medium">Action&nbsp;</th>
</tr> </tr>
</thead> </thead>
@ -342,27 +356,37 @@
// for datatable // for datatable
$(document).ready(function() { $(document).ready(function() {
$('#hr_tickets_table').DataTable({ $('#hr_tickets_table').DataTable({
<<<<<<< HEAD
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
=======
dom: "<'row'<'col-sm-1'f><'col-sm-11 text-right'B>>" +
>>>>>>> 3e7d3426 (FIX_XL button and Search)
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", "<'row'<'col-sm-5'i><'col-sm-7'p>>",
"buttons": [{ buttons: [{
"extend": 'csv', extend: 'collection',
"text": 'CSV', text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
"title": 'Employee-Upload-List', className: 'btn app-btn-secondary ',
"className": 'my_class', buttons: [
"exportOptions": { {
"columns": ':not(:last-child)' extend: 'csv',
}, text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
}], title: 'Employee-Upload-List',
"initComplete": function(settings, json) { className: 'app-btn-primary ',
$('.my_class').css({ exportOptions: {
"position": "relative", columns: ':not(:last-child)'
"left": "79px" },
}); }
}, ]
}
],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, paging: true,
}); });

View File

@ -80,19 +80,19 @@
<thead class=""> <thead class="">
<tr> <tr>
<th>S.NO</th> <th>S.NO&nbsp;</th>
<th>Policy Type</th> <th>Policy Type&nbsp;</th>
<th>Event Type</th> <th>Event Type&nbsp;</th>
<th>Upload/Download</th> <th>Upload/Download&nbsp;</th>
<th>Template</th> <th>Template&nbsp;</th>
<th>Action</th> <th>Action&nbsp;</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php if(isset($insurer_templete_list)){ ?> <?php if(isset($insurer_templete_list)){ ?>
<?php foreach($insurer_templete_list as $key => $value ){ ?> <?php foreach($insurer_templete_list as $key => $value ){ ?>
<tr> <tr>
<td><?= $key+1; ?></td> <td class="text-center"><?= $key+1; ?></td>
<td><?= $value['policy_type']; ?></td> <td><?= $value['policy_type']; ?></td>
<td><?= $events[$value['event_name']]; ?></td> <td><?= $events[$value['event_name']]; ?></td>
<td><?= $value['type_name'] == 'import' ? 'Upload' : 'Download'; ?></td> <td><?= $value['type_name'] == 'import' ? 'Upload' : 'Download'; ?></td>

View File

@ -181,17 +181,43 @@
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$('#tickets-table').DataTable({ $('#tickets-table').DataTable({
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", "<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [{ buttons: [
extend: 'csv', {
text: 'CSV', text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
title: 'InsurerList', className: 'btn app-btn-primary mr-2',
exportOptions: { action: function() {
columns: ':not(:last-child)' window.location.href = "<?= base_url("master/insurer/create"); ?>";
} }
},
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'InsurerList',
exportOptions: {
columns: ':not(:last-child)'
}
}
]
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
>>>>>>> 3e7d3426 (FIX_XL button and Search)
}, },
{ {
text: 'ADD', text: 'ADD',

View File

@ -10,12 +10,21 @@
<div class="col-xl-12"> <div class="col-xl-12">
<div id="accordion" class="mb-3"> <div id="accordion" class="mb-3">
<div class="card mb-1"> <div class="card mb-1">
<h4 class="m-1"> <h4 class="m-1">
<span>Filters</span> <span>Filters</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true"> <a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i> <i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a> </a>
</h4> </h4>
<!-- <label id="filterAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Filters</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</label> -->
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion"> <div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body"> <div class="card-body">
<!-- <div class="text-center"> --> <!-- <div class="text-center"> -->
@ -49,7 +58,7 @@
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form- group col-md-4">
<label>Insurer/TPA Data<span class="text-danger">*</span></label> <br /> <label>Insurer/TPA Data<span class="text-danger">*</span></label> <br />
<select name="insurer_or_tpa" class="form-control" id="insurer_or_tpa" required> <select name="insurer_or_tpa" class="form-control" id="insurer_or_tpa" required>
<option value="">Select</option> <option value="">Select</option>

View File

@ -205,24 +205,37 @@ $(document).ready(function() {
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{ buttons: [
extend: 'csv', {
text: 'CSV', extend: 'collection',
title: 'IRDA-BAP-CLIENT-List', text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
}, className: 'btn app-btn-secondary ',
{ buttons: [
extend: 'excel', {
text: 'Excel', extend: 'csv',
title: 'IRDA-BAP-CLIENT-List', text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
exportOptions: { className: 'app-btn-primary ',
orthogonal: 'sort' title: 'IRDA-BAP-CLIENT-List',
}, },
} {
extend: 'excel',
], text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'IRDA-BAP-CLIENT-List',
exportOptions: {
orthogonal: 'sort'
},
className: 'app-btn-primary ',
}
]
}
],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 20, // Set default number of rows per page (optional) pageLength: 20, // Set default number of rows per page (optional)

View File

@ -238,62 +238,128 @@ $(document).ready(function() {
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{ // buttons: [{
extend: 'csv', // extend: 'csv',
text: 'CSV', // text: 'CSV',
title: 'IRDA-BAP-INSURER-List', // title: 'IRDA-BAP-INSURER-List',
}, // },
{ // {
extend: 'excel', // extend: 'excel',
text: 'Excel', // text: 'Excel',
title: 'IRDA-BAP-INSURER-List', // title: 'IRDA-BAP-INSURER-List',
customize: function(xlsx) { // customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml']; // var sheet = xlsx.xl.worksheets['sheet1.xml'];
var total = 0; // var total = 0;
// Find cells in column AB (28th column in Excel) // // Find cells in column AB (28th column in Excel)
$('row c[r^="AB"]', sheet).each(function() { // $('row c[r^="AB"]', sheet).each(function() {
var value = parseFloat($('v', this) // var value = parseFloat($('v', this)
.text()); // Get the value inside the cell // .text()); // Get the value inside the cell
if (!isNaN(value)) { // if (!isNaN(value)) {
total += value; // total += value;
} // }
}); // });
// Get the last row index and append the total row // // Get the last row index and append the total row
var lastRow = $('row:last', sheet); // var lastRow = $('row:last', sheet);
var rowIndex = parseInt(lastRow.attr('r')) + // var rowIndex = parseInt(lastRow.attr('r')) +
2; // Find the next row index // 2; // Find the next row index
var totalRow = '<row r="' + rowIndex + '">' + // var totalRow = '<row r="' + rowIndex + '">' +
'<c t="inlineStr" r="AA' + rowIndex + // '<c t="inlineStr" r="AA' + rowIndex +
'"><is><t>Total</t></is></c>' + // Insert "Total" in AA // '"><is><t>Total</t></is></c>' + // Insert "Total" in AA
'<c t="n" r="AB' + rowIndex + '"><v>' + total.toFixed(2) + // '<c t="n" r="AB' + rowIndex + '"><v>' + total.toFixed(2) +
'</v></c>' + // Insert sum in AB // '</v></c>' + // Insert sum in AB
'</row>'; // '</row>';
// Append the new total row to the sheet // // Append the new total row to the sheet
$(sheet).find('sheetData').append(totalRow); // $(sheet).find('sheetData').append(totalRow);
}, // },
exportOptions: { // exportOptions: {
orthogonal: 'sort' // orthogonal: 'sort'
}, // },
customizeData: function(data) { // customizeData: function(data) {
for (var i = 0; i < data.body.length; i++) { // for (var i = 0; i < data.body.length; i++) {
for (var j = 0; j < data.body[i].length; j++) { // for (var j = 0; j < data.body[i].length; j++) {
// Check if the column is the 9th index (10th column) // // Check if the column is the 9th index (10th column)
if (j === 9) { // if (j === 9) {
data.body[i][j] = '\u200C' + data.body[i][j]; // data.body[i][j] = '\u200C' + data.body[i][j];
} // }
} // }
} // }
// }
// }
// ],
buttons: [
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'IRDA-BAP-INSURER-List',
},
{
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
className: 'app-btn-primary ',
title: 'IRDA-BAP-INSURER-List',
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
var total = 0;
// Find cells in column AB (28th column in Excel)
$('row c[r^="AB"]', sheet).each(function() {
var value = parseFloat($('v', this)
.text()); // Get the value inside the cell
if (!isNaN(value)) {
total += value;
}
});
// Get the last row index and append the total row
var lastRow = $('row:last', sheet);
var rowIndex = parseInt(lastRow.attr('r')) +
2; // Find the next row index
var totalRow = '<row r="' + rowIndex + '">' +
'<c t="inlineStr" r="AA' + rowIndex +
'"><is><t>Total</t></is></c>' + // Insert "Total" in AA
'<c t="n" r="AB' + rowIndex + '"><v>' + total.toFixed(2) +
'</v></c>' + // Insert sum in AB
'</row>';
// Append the new total row to the sheet
$(sheet).find('sheetData').append(totalRow);
},
exportOptions: {
orthogonal: 'sort'
},
customizeData: function(data) {
for (var i = 0; i < data.body.length; i++) {
for (var j = 0; j < data.body[i].length; j++) {
// Check if the column is the 9th index (10th column)
if (j === 9) {
data.body[i][j] = '\u200C' + data.body[i][j];
}
}
}
}
}
]
} }
],
}
],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 20, // Set default number of rows per page (optional) pageLength: 20, // Set default number of rows per page (optional)

View File

@ -78,62 +78,128 @@ $(document).ready(function() {
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{ // buttons: [{
extend: 'csv', // extend: 'csv',
text: 'CSV', // text: 'CSV',
title: 'IRDA-BAP-CLIENT-List', // title: 'IRDA-BAP-CLIENT-List',
}, // },
{ // {
extend: 'excel', // extend: 'excel',
text: 'Excel', // text: 'Excel',
title: 'IRDA-BAP-CLIENT-List', // title: 'IRDA-BAP-CLIENT-List',
customize: function(xlsx) { // customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml']; // var sheet = xlsx.xl.worksheets['sheet1.xml'];
var total = 0; // var total = 0;
// Find cells in column AB (28th column in Excel) // // Find cells in column AB (28th column in Excel)
$('row c[r^="AB"]', sheet).each(function() { // $('row c[r^="AB"]', sheet).each(function() {
var value = parseFloat($('v', this) // var value = parseFloat($('v', this)
.text()); // Get the value inside the cell // .text()); // Get the value inside the cell
if (!isNaN(value)) { // if (!isNaN(value)) {
total += value; // total += value;
} // }
}); // });
// Get the last row index and append the total row // // Get the last row index and append the total row
var lastRow = $('row:last', sheet); // var lastRow = $('row:last', sheet);
var rowIndex = parseInt(lastRow.attr('r')) + // var rowIndex = parseInt(lastRow.attr('r')) +
2; // Find the next row index // 2; // Find the next row index
var totalRow = '<row r="' + rowIndex + '">' + // var totalRow = '<row r="' + rowIndex + '">' +
'<c t="inlineStr" r="AA' + rowIndex + // '<c t="inlineStr" r="AA' + rowIndex +
'"><is><t>Total</t></is></c>' + // Insert "Total" in AA // '"><is><t>Total</t></is></c>' + // Insert "Total" in AA
'<c t="n" r="AB' + rowIndex + '"><v>' + total.toFixed(2) + // '<c t="n" r="AB' + rowIndex + '"><v>' + total.toFixed(2) +
'</v></c>' + // Insert sum in AB // '</v></c>' + // Insert sum in AB
'</row>'; // '</row>';
// Append the new total row to the sheet // // Append the new total row to the sheet
$(sheet).find('sheetData').append(totalRow); // $(sheet).find('sheetData').append(totalRow);
}, // },
exportOptions: { // exportOptions: {
orthogonal: 'sort' // orthogonal: 'sort'
}, // },
customizeData: function(data) { // customizeData: function(data) {
for (var i = 0; i < data.body.length; i++) { // for (var i = 0; i < data.body.length; i++) {
for (var j = 0; j < data.body[i].length; j++) { // for (var j = 0; j < data.body[i].length; j++) {
// Check if the column is the 9th index (10th column) // // Check if the column is the 9th index (10th column)
if (j === 9) { // if (j === 9) {
data.body[i][j] = '\u200C' + data.body[i][j]; // data.body[i][j] = '\u200C' + data.body[i][j];
} // }
} // }
} // }
// }
// }
// ],
buttons: [
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'IRDA-BAP-CLIENT-List',
},
{
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'IRDA-BAP-CLIENT-List',
className: 'app-btn-primary ',
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
var total = 0;
// Find cells in column AB (28th column in Excel)
$('row c[r^="AB"]', sheet).each(function() {
var value = parseFloat($('v', this)
.text()); // Get the value inside the cell
if (!isNaN(value)) {
total += value;
}
});
// Get the last row index and append the total row
var lastRow = $('row:last', sheet);
var rowIndex = parseInt(lastRow.attr('r')) +
2; // Find the next row index
var totalRow = '<row r="' + rowIndex + '">' +
'<c t="inlineStr" r="AA' + rowIndex +
'"><is><t>Total</t></is></c>' + // Insert "Total" in AA
'<c t="n" r="AB' + rowIndex + '"><v>' + total.toFixed(2) +
'</v></c>' + // Insert sum in AB
'</row>';
// Append the new total row to the sheet
$(sheet).find('sheetData').append(totalRow);
},
exportOptions: {
orthogonal: 'sort'
},
customizeData: function(data) {
for (var i = 0; i < data.body.length; i++) {
for (var j = 0; j < data.body[i].length; j++) {
// Check if the column is the 9th index (10th column)
if (j === 9) {
data.body[i][j] = '\u200C' + data.body[i][j];
}
}
}
}
}
]
} }
],
}
],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional) pageLength: 10, // Set default number of rows per page (optional)

View File

@ -175,31 +175,44 @@
$(document).ready(function(){ $(document).ready(function(){
$('#tickets-table').DataTable({ $('#tickets-table').DataTable({
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>" , "<'row'<'col-sm-5'i><'col-sm-7'p>>" ,
buttons: [ buttons: [
{ {
extend: 'csv', text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
text: 'CSV', className: 'btn app-btn-primary mr-2',
title: 'KYCList', action: function(e, dt, node, config) {
exportOptions: { window.location.href = "<?= base_url("master/kyc/create"); ?>";
columns: ':not(:last-child)' }
} },
}, {
{ extend: 'collection',
text: 'ADD', text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn btn-color', className: 'btn app-btn-secondary ',
action: function () { buttons: [
window.location.href = "<?= base_url("master/kyc/create"); ?>"; {
} extend: 'csv',
} text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
], className: 'app-btn-primary ',
title: 'KYCList',
exportOptions: {
columns: ':not(:last-child)'
}
}
]
}
],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true , paging: true ,
}); });

View File

@ -233,6 +233,7 @@
min-height: 43px !important; min-height: 43px !important;
} }
.li-seperate{ .li-seperate{
margin:10px 0px; margin:10px 0px;
} }
@ -455,26 +456,11 @@
color: black; color: black;
} }
.app-text-left {
text-align: left !important;
}
.app-text-right {
text-align: right !important;
}
.app-text-center {
text-align: center !important;
}
.app-text-white { .app-text-white {
color: #ffffff !important; color: #ffffff !important;
} }
.app-text-black {
color: #000000 !important;
}
.app-text-grey { .app-text-grey {
color: #5D5D5D !important; color: #5D5D5D !important;
} }
@ -720,7 +706,8 @@
<!-- table section starts --> <!-- table section starts -->
<style> <style>
table[data-custom-table-css="table"] thead th { table[data-custom-table-css="table"] thead th,
table[data-custom-table-css="second-table"] thead th {
background-color: #00999E; background-color: #00999E;
color: #fff !important; color: #fff !important;
border-top: 0px solid #fff !important; border-top: 0px solid #fff !important;
@ -738,31 +725,37 @@
font-weight: 400 !important; font-weight: 400 !important;
} }
table[data-custom-table-css="table"] thead th:first-child { table[data-custom-table-css="table"] thead th:first-child ,
table[data-custom-table-css="second-table"] thead th:first-child {
border-top-left-radius: 15px !important; border-top-left-radius: 15px !important;
border-bottom-left-radius: 15px !important; border-bottom-left-radius: 15px !important;
} }
table[data-custom-table-css="table"] thead th:last-child { table[data-custom-table-css="table"] thead th:last-child ,
table[data-custom-table-css="second-table"] thead th:last-child {
border-top-right-radius: 15px !important; border-top-right-radius: 15px !important;
border-bottom-right-radius: 15px !important; border-bottom-right-radius: 15px !important;
} }
table[data-custom-table-css="table"] tbody tr td:first-child { table[data-custom-table-css="table"] tbody tr td:first-child ,
table[data-custom-table-css="second-table"] tbody tr td:first-child {
border-top-left-radius: 15px !important; border-top-left-radius: 15px !important;
border-bottom-left-radius: 15px !important; border-bottom-left-radius: 15px !important;
} }
table[data-custom-table-css="table"] tbody tr td:last-child { table[data-custom-table-css="table"] tbody tr td:last-child ,
table[data-custom-table-css="second-table"] tbody tr td:last-child {
border-top-right-radius: 15px !important; border-top-right-radius: 15px !important;
border-bottom-right-radius: 15px !important; border-bottom-right-radius: 15px !important;
} }
table[data-custom-table-css="table"] tbody tr:hover td { table[data-custom-table-css="table"] tbody tr:hover td ,
table[data-custom-table-css="second-table"] tbody tr:hover td {
background-color: #e0e0e0; background-color: #e0e0e0;
} }
table[data-custom-table-css="table"] { table[data-custom-table-css="table"] ,
table[data-custom-table-css="second-table"] {
border-collapse: separate !important; border-collapse: separate !important;
border-spacing: 0 8px !important; border-spacing: 0 8px !important;
width: 100% !important; width: 100% !important;
@ -775,6 +768,21 @@
table[data-custom-table="table"] thead.bg-light tr[role="row"]{ table[data-custom-table="table"] thead.bg-light tr[role="row"]{
display:none !important; display:none !important;
} }
table[data-custom-table-css="table"] thead.bg-light {
background-color: transparent !important;
}
/* ========== SECOND TABLE (white rows) ========== */
table[data-custom-table-css="second-table"] tbody td {
background: #FFFFFF !important;
padding: 12px;
border-top: 0px solid #fff !important;
border-bottom: 2px solid #F5FFFF !important;
font-weight: 400 !important;
}
</style> </style>
<!-- Datatable section starts --> <!-- Datatable section starts -->
@ -1494,14 +1502,12 @@
<style> <style>
.dataTables_scrollBody thead.bg-light tr .dataTables_scrollBody thead.bg-light tr
, .dataTables_scrollBody thead.app-table-head tr
{ {
visibility: collapse !important; /* hides + removes row space */ visibility: collapse !important; /* hides + removes row space */
height: 0 !important; height: 0 !important;
} }
.dataTables_scrollBody thead.bg-light th .dataTables_scrollBody thead.bg-light th
, .dataTables_scrollBody thead.app-table-head tr
{ {
padding: 0 !important; padding: 0 !important;
margin: 0 !important; margin: 0 !important;

View File

@ -160,23 +160,23 @@ table.dataTable tbody td {
</div> </div>
<div> <div>
<div class="table-responsive"> <div class="table-responsive">
<table data-custom-table-css="table" class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table"> <table data-custom-table-css="table" class="table mb-0 nowrap w-100 table-centered" cellspacing="0" id="tickets-table">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th><div class="column-header">S.No.</div></th> <th><div class="column-header">S.No&nbsp;</div></th>
<th><div class="column-header">Lead Type</div></th> <th><div class="column-header">Lead Type &nbsp;</div></th>
<th><div class="column-header">Issuer</div></th> <th><div class="column-header">Issuer &nbsp;</div></th>
<th><div class="column-header">Client Type</div></th> <th><div class="column-header">Client Type &nbsp;</div></th>
<th><div class="column-header">Client / Branch</div></th> <th><div class="column-header">Client / Branch &nbsp;</div></th>
<th><div class="column-header">Entity Type</div></th> <th><div class="column-header">Entity Type &nbsp;</div></th>
<th><div class="column-header">Branch Name</div></th> <th><div class="column-header">Branch Name &nbsp;</div></th>
<th><div class="column-header">Branch Code</div></th> <th><div class="column-header">Branch Code &nbsp;</div></th>
<th><div class="column-header">Contact Person Name</div></th> <th><div class="column-header">Contact Person Name &nbsp;</div></th>
<th><div class="column-header">Contact Person Mobile</div></th> <th><div class="column-header">Contact Person Mobile &nbsp;</div></th>
<th><div class="column-header">Policy Type</div></th> <th><div class="column-header">Policy Type &nbsp;</div></th>
<th><div class="column-header">Status</div></th> <th><div class="column-header">Status &nbsp;</div></th>
<th><div class="column-header">Action</div></th> <th><div class="column-header">Action &nbsp;</div></th>
</tr> </tr>
</thead> </thead>
@ -184,7 +184,7 @@ table.dataTable tbody td {
<?php if(isset($lead_data_list)) { ?> <?php if(isset($lead_data_list)) { ?>
<?php foreach($lead_data_list as $index => $row){ ?> <?php foreach($lead_data_list as $index => $row){ ?>
<tr> <tr>
<td><?php echo $index + 1; ?></td> <td class="text-center"><?php echo $index + 1; ?></td>
<td><?php echo $lead_type[$row['lead_type']] ?? '-'; ?></td> <td><?php echo $lead_type[$row['lead_type']] ?? '-'; ?></td>
<td><?php echo $issuer[$row['issuer']] ?? '-'; ?></td> <td><?php echo $issuer[$row['issuer']] ?? '-'; ?></td>
<td><?php echo $client_type[$row['client_type']] ?? '-'; ?></td> <td><?php echo $client_type[$row['client_type']] ?? '-'; ?></td>
@ -215,7 +215,7 @@ table.dataTable tbody td {
</a> </a>
<?php } ?> <?php } ?>
<?php } ?> <?php } ?>
<a class="dropdown-item btnHistory app-text-black" <a class="dropdown-item btnHistory font-color-black"
data-id="<?= $row['id']; ?>" data-id="<?= $row['id']; ?>"
title="Click to view Mail History"> title="Click to view Mail History">
<i class="mdi mdi-history mr-2 text-muted font-18 vertical-middle"></i>Email History <i class="mdi mdi-history mr-2 text-muted font-18 vertical-middle"></i>Email History
@ -420,26 +420,38 @@ document.addEventListener("DOMContentLoaded", function () {
dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [ buttons: [
{ {
extend: 'csv', text: 'Add',
text: 'CSV', className: 'btn app-btn-primary mr-2',
title: 'Policy-Tranction-Inception-List', action: function(e, dt, node, config) {
exportOptions: { openLeadTypeAskModal();
columns: ':not(:last-child)' }
}, },
},
{ {
text: 'Add', extend: 'collection',
className: 'buttons-html5 addbtnStyle', text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
action: function (e, dt, node, config) { className: 'btn app-btn-secondary ',
openLeadTypeAskModal(); buttons: [
{
extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
title: 'Policy-Tranction-Inception-List',
className: 'app-btn-primary ',
exportOptions: {
columns: ':not(:last-child)'
},
}
]
} }
}
], ],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional) pageLength: 25, // Set default number of rows per page (optional)
@ -501,14 +513,14 @@ document.addEventListener("DOMContentLoaded", function () {
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th><div class="column-header">S.No.</div></th> <th><div class="column-header">S.No&nbsp;</div></th>
<th><div class="column-header">From Mail</div></th> <th><div class="column-header">From Mail&nbsp;</div></th>
<th><div class="column-header">To Mail</div></th> <th><div class="column-header">To Mail&nbsp;</div></th>
<th><div class="column-header">BCC</div></th> <th><div class="column-header">BCC&nbsp;</div></th>
<th><div class="column-header">CC</div></th> <th><div class="column-header">CC&nbsp;</div></th>
<th><div class="column-header">Type</div></th> <th><div class="column-header">Type&nbsp;</div></th>
<th><div class="column-header">Status</div></th> <th><div class="column-header">Status&nbsp;</div></th>
<th><div class="column-header">Date/Time</div></th> <th><div class="column-header">Date/Time&nbsp;</div></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@ -23,16 +23,16 @@ table.dataTable tbody td {
<table data-custom-table-css="table" class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table"> <table data-custom-table-css="table" class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th>S.No.</th> <th>S.No&nbsp;</th>
<th>Log File</th> <th>Log File&nbsp;</th>
<th>Actions</th> <th>Actions&nbsp;</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php if (!empty($logs)): ?> <?php if (!empty($logs)): ?>
<?php foreach ($logs as $index => $log): ?> <?php foreach ($logs as $index => $log): ?>
<tr> <tr>
<td><?= $index + 1 . '.' ?></td> <td class="text-center"><?= $index + 1 . '.' ?></td>
<td><?= esc($log) ?></td> <td><?= esc($log) ?></td>
<td> <td>
<a href="<?= base_url('util/view_log/' . urlencode($log)) ?>">View</a> | <a href="<?= base_url('util/view_log/' . urlencode($log)) ?>">View</a> |

View File

@ -171,22 +171,24 @@
</div> </div>
</div> </div>
<div class="table-responsive"> <div class="table-responsive">
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap"> <table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th>S.No</th> <th>S.No&nbsp;</th>
<!-- <th>Client Name</th> --> <!-- <th>Client Name</th> -->
<th>Insurer</th> <th>Insurer&nbsp;</th>
<th>Insurer<br> Branch</th> <th>Insurer<br> Branch&nbsp;</th>
<th>Statement<br> Month</th> <th>Statement<br> Month&nbsp;</th>
<th>Statement<br> No</th> <th>Statement<br> No&nbsp;</th>
<th>Invoice No</th> <th>Invoice No&nbsp;</th>
<th>Invoice Status</th> <th>Invoice Status&nbsp;</th>
<th>Invoice Date</th> <th>Invoice Date&nbsp;</th>
<th>Invoice Amount</th> <th>Invoice Amount&nbsp;</th>
<th>Realization <br>Amount</th> <th>Realization <br>Amount&nbsp;</th>
<th>Outstanding <br>Amount</th> <th>Outstanding <br>Amount&nbsp;</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -196,14 +198,14 @@
if (isset($outstanting_list)) { ?> if (isset($outstanting_list)) { ?>
<?php foreach ($outstanting_list as $index => $row) { ?> <?php foreach ($outstanting_list as $index => $row) { ?>
<tr> <tr>
<td><?= $index + 1 ?></td> <td class="text-center"><?= $index + 1 ?></td>
<td><?php echo $row['short_name']; ?></td> <td><?php echo $row['short_name']; ?></td>
<td><?php echo $row['branch_name']; ?></td> <td><?php echo $row['branch_name']; ?></td>
<td><?php echo change_date_format($row['month'], 'Y-m-d', 'Y-m') ?></td> <td><?php echo change_date_format($row['month'],'Y-m-d','Y-m') ?></td>
<td><?php echo $row['stmt_sno']; ?></td> <td><?php echo $row['stmt_sno']; ?></td>
<td><?php echo $row['invoice_no']; ?></td> <td><?php echo $row['invoice_no']; ?></td>
<td class="center-align-input"><?php echo isset($row['invoice_status']) ? $row['invoice_status'] : ' - '; ?></td> <td class="center-align-input"><?php echo isset($row['invoice_status']) ? $row['invoice_status'] : ' - '; ?></td>
<td><?php echo change_date_format($row['invoice_date'], 'Y-m-d', 'd-M-Y'); ?></td> <td><?php echo change_date_format($row['invoice_date'],'Y-m-d','d-M-Y'); ?></td>
<td class="right-align-input"><?php echo isset($row['invoice_amount']) ? $row['invoice_amount'] : '0.00'; ?></td> <td class="right-align-input"><?php echo isset($row['invoice_amount']) ? $row['invoice_amount'] : '0.00'; ?></td>
<td class="right-align-input"><?php echo isset($row['total_paid']) ? $row['total_paid'] : '0.00'; ?></td> <td class="right-align-input"><?php echo isset($row['total_paid']) ? $row['total_paid'] : '0.00'; ?></td>
<td class="right-align-input"><?php echo isset($row['outstanding_amount']) ? $row['outstanding_amount'] : '0.00'; ?></td> <td class="right-align-input"><?php echo isset($row['outstanding_amount']) ? $row['outstanding_amount'] : '0.00'; ?></td>
@ -223,11 +225,99 @@
<script> <script>
<<<<<<< HEAD
$(document).ready(function() { $(document).ready(function() {
$('#collapseOne').on('show.bs.collapse', function() { $('#collapseOne').on('show.bs.collapse', function() {
// When open // When open
$('#icon').removeClass('mdi-chevron-down').addClass('mdi-chevron-up'); $('#icon').removeClass('mdi-chevron-down').addClass('mdi-chevron-up');
$('#filterAccordion').removeAttr("style"); // remove custom bg/border when open $('#filterAccordion').removeAttr("style"); // remove custom bg/border when open
=======
$(document).ready(function () {
$('#collapseOne').on('show.bs.collapse', function () {
// When open
$('#icon').removeClass('mdi-chevron-down').addClass('mdi-chevron-up');
$('#filterAccordion').removeAttr("style"); // remove custom bg/border when open
});
$('#collapseOne').on('hide.bs.collapse', function () {
// When closed
$('#icon').removeClass('mdi-chevron-up').addClass('mdi-chevron-down');
// $('#filterAccordion').css({
// "background-color": "#F5FFFF",
// "border": "2px solid #F5FFFF",
// "border-radius": "10px",
// "box-shadow": "0px 4px 4px 0px #00000040"
// });
});
});
// Datatable document ready
$(document).ready(function() {
var ticketsTable = $('#scroll-horizontal-datatable');
if (ticketsTable.length) {
ticketsTable.DataTable({
scrollX: true,
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [{
extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
title: 'Policy-Tranction-BDS-List',
},
{
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'Policy-Tranction-BDS-List',
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
var total = 0;
// Find cells in column AB (28th column in Excel)
$('row c[r^="AB"]', sheet).each(function() {
var value = parseFloat($('v', this)
.text()); // Get the value inside the cell
if (!isNaN(value)) {
total += value;
}
});
// Get the last row index and append the total row
var lastRow = $('row:last', sheet);
var rowIndex = parseInt(lastRow.attr('r')) +
2; // Find the next row index
var totalRow = '<row r="' + rowIndex + '">' +
'<c t="inlineStr" r="AA' + rowIndex +
'"><is><t>Total</t></is></c>' + // Insert "Total" in AA
'<c t="n" r="AB' + rowIndex + '"><v>' + total.toFixed(2) +
'</v></c>' + // Insert sum in AB
'</row>';
// Append the new total row to the sheet
$(sheet).find('sheetData').append(totalRow);
}
}
]
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination
pageLength: 25 // Set default number of rows per page (optional)
>>>>>>> 3e7d3426 (FIX_XL button and Search)
}); });
$('#collapseOne').on('hide.bs.collapse', function() { $('#collapseOne').on('hide.bs.collapse', function() {

View File

@ -98,6 +98,22 @@
color: #000; color: #000;
} }
/** newly implemented */
#insurerTable thead th:first-child {
border-top: 0px solid #fff !important;
border-bottom: 0px solid #fff !important;
background-color: transparent !important;
}
#insurerTable tbody td {
border-top: 0px solid #fff !important;
border-bottom: 0px solid #fff !important;
background-color: transparent !important;
}
#insurerTable th{
color: black !important;
background-color: transparent !important;
}
</style> </style>
<div class="row" id="endorsement_form" style="display: none;"> <div class="row" id="endorsement_form" style="display: none;">
@ -129,15 +145,18 @@
<div class="row"> <div class="row">
<!-- Section 1 --> <!-- Section 1 -->
<div class="col-md-12"> <div class="col-md-12">
<div class="form-section"> <!-- <div class="form-section"> -->
<div id="accordion_0" class="mb-0"> <div id="accordion_0" class="mb-0">
<div class="card mb-0"> <label id="policyAccordion" class="m-1 d-flex justify-content-between align-items-center">
<h4 class="m-1">Client Details <span class="font-color-black">Client Details</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true"> <a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i> aria-expanded="true">
</a> <i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
</h4> </a>
</label>
<div class="card mb-1">
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion_0"> <div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion_0">
<div class="card-body">
<div class="row"> <div class="row">
<div class="form-group col-md-3"> <div class="form-group col-md-3">
@ -172,25 +191,29 @@
</div> </div>
</div> </div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> <!-- </div> -->
</div> </div>
</div> </div>
<!-- sales Row --> <!-- sales Row -->
<div class="row" id="sales_row"> <div class="row" id="sales_row">
<div class="col-md-12"> <div class="col-md-12">
<div class="form-section"> <!-- <div class="form-section"> -->
<div id="accordion_2" class="mb-0"> <div id="accordion_2" class="mb-0">
<div class="card mb-0"> <label id="policyAccordion" class="m-1 d-flex justify-content-between align-items-center">
<h4 class="m-1">Endorsement <span class="font-color-black">Endorsement</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseThree" aria-expanded="true"> <a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseThree"
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i> aria-expanded="true">
</a> <i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
</h4> </a>
</label>
<div class="card mb-1">
<div id="collapseThree" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion_2"> <div id="collapseThree" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion_2">
<div class="card-body">
<div class="row"> <div class="row">
<div class="form-group col-md-3" id="tpa_endorse_div"> <div class="form-group col-md-3" id="tpa_endorse_div">
@ -302,40 +325,49 @@
<input id="install_due_date" type="text" class="form-control" name="install_due_date" placeholder="DD/MM/YYYY"> <input id="install_due_date" type="text" class="form-control" name="install_due_date" placeholder="DD/MM/YYYY">
</div> </div>
<div class="form-group col-md-3"> <!-- <div class="form-group col-md-3">
<label class="switch" style="position: relative;top: 32px;left: 20px;"> <label class="switch" style="position: relative;top: 32px;left: 20px;">
<input id="policy_with_corr" type="checkbox" name="policy_with_corr"> <input id="policy_with_corr" type="checkbox" name="policy_with_corr">
<span class="slider round" style="height: 27px;"></span> <span class="slider round" style="height: 27px;"></span>
</label> </label>
<label for="policy_with_corr" style="position: relative;top: 33px;left: 25px;"> Policy with Correction</label> <label for="policy_with_corr" style="position: relative;top: 33px;left: 25px;"> Policy with Correction</label>
</div> </div> -->
<div class="form-group col-md-3"> <!-- <div class="form-group col-md-3">
<label class="switch" style="position: relative;top: 32px;left: 20px;"> <label class="switch" style="position: relative;top: 32px;left: 20px;">
<input id="is_cd_reduce_from_bds" type="checkbox" name="is_cd_reduce_from_bds"> <input id="is_cd_reduce_from_bds" type="checkbox" name="is_cd_reduce_from_bds">
<span class="slider round" style="height: 27px;"></span> <span class="slider round" style="height: 27px;"></span>
</label> </label>
<label for="is_cd_reduce_from_bds" style="position: relative;top: 33px;left: 25px;">Make Entry in CD &nbsp;&nbsp; <i class="mdi mdi-information-outline" data-toggle="tooltip" title="Enabling this will affect ( Credit/Debit ) the CD transaction. ( GMC, GPA, EDLI and GTLI, CD transaction from CRM )"></i></label> <label for="is_cd_reduce_from_bds" style="position: relative;top: 33px;left: 25px;">Make Entry in CD &nbsp;&nbsp; <i class="mdi mdi-information-outline" data-toggle="tooltip" title="Enabling this will affect ( Credit/Debit ) the CD transaction. ( GMC, GPA, EDLI and GTLI, CD transaction from CRM )"></i></label>
</div> </div> -->
</div> </div>
<hr> </div>
</div>
</div>
</div>
<!-- </div> -->
</div>
</div>
<!-- Premium Details --> <!-- Premium Details -->
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="form-section"> <!-- <div class="form-section"> -->
<div id="accordion_3" class="mb-0"> <div id="accordion_3" class="mb-0">
<label id="policyAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Premium Details</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseTwo"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</label>
<div class="card mb-0"> <div class="card mb-0">
<h4 class="m-1">Premium Details <div id="collapseTwo" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion_3">
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseFour" aria-expanded="true"> <div class="card-body">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h4>
<div id="collapseFour" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion_3">
<div class="row d-none" id="add_more_row"> <div class="row d-none" id="add_more_row">
<div class="col-md-2"> <div class="col-md-2">
<input type="number" id="setInsurerCount" class="form-control" placeholder="Enter count"> <input type="number" id="setInsurerCount" class="form-control" placeholder="Enter count">
@ -349,10 +381,10 @@
</div> </div>
<div id="insurerTableContainer" style="overflow: auto;"> <div id="insurerTableContainer" style="overflow: auto;">
<table data-custom-table-css="table" class="table table-bordered co_share_table" id="insurerTable"> <table data-custom-table-css="table" class="table co_share_table" id="insurerTable">
<thead> <thead>
<tr> <tr>
<th>Premium Details</th> <th><span class="font-color-black">Premium Details</span></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -363,13 +395,14 @@
<td>Is Leader?</td> <td>Is Leader?</td>
</tr> </tr>
<tr id="table_tr_33"> <tr id="table_tr_34">
<td>CD Acc No</td> <td>CD Acc No</td>
</tr> </tr>
<tr id="table_tr_34"> <tr id="table_tr_37">
<td>CD Amount</td> <td>CD Amount</td>
</tr> </tr>
<tr id="table_tr_35"> <tr id="table_tr_35">
<td>Follower Policy No</td> <td>Follower Policy No</td>
</tr> </tr>
@ -493,20 +526,16 @@
</table> </table>
</div> </div>
</div> </div>
</div>
</div> </div>
</div> </div>
</div> <!-- </div> -->
</div> </div>
</div> </div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="form-group text-right mt-3 m-b-0" id="submitButton">
<div class="form-group text-right m-b-0" id="submitButton">
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnSubmit">Submit</button> <button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnSubmit">Submit</button>
</div> </div>
@ -602,20 +631,32 @@ $(document).ready(function(){
var end_date = $(this).find('option:selected').attr('data-ed'); var end_date = $(this).find('option:selected').attr('data-ed');
var policy_type_id = $(this).find('option:selected').attr('data-ptid'); var policy_type_id = $(this).find('option:selected').attr('data-ptid');
if(policy_type_id == 1 || policy_type_id == 2 || policy_type_id == 3 || policy_type_id == 4 || policy_type_id == 5 || policy_type_id == 6 || policy_type_id == 7){ // if(policy_type_id == 1 || policy_type_id == 2 || policy_type_id == 3 || policy_type_id == 4 || policy_type_id == 5 || policy_type_id == 6 || policy_type_id == 7){
$('#is_cd_reduce_from_bds').prop('disabled',true).prop('checked', false) // $('#is_cd_reduce_from_bds').prop('disabled',true).prop('checked', false)
}else{ // }else{
$('#is_cd_reduce_from_bds').prop('disabled',false) // $('#is_cd_reduce_from_bds').prop('disabled',false)
} // }
if( policy_type_id > 7 ){ if( policy_type_id > 7 ){
$('#tpa_endorse_div').hide(); $('#tpa_endorse_div').hide();
$('#no_of_insured_endorse_div').hide(); $('#table_tr_34').show();
$('#no_of_dependents_endorse_div').hide(); $('#table_tr_37').show();
}else{ }else{
$('#tpa_endorse_div').show(); $('#tpa_endorse_div').show();
$('#table_tr_34').hide();
$('#table_tr_37').hide();
}
if(policy_type_id == 2 || policy_type_id == 3 || policy_type_id == 4 || policy_type_id == 5){
$('#no_of_insured_endorse_div').show(); $('#no_of_insured_endorse_div').show();
$('#no_of_dependents_endorse_div').show(); $('#no_of_dependents_endorse_div').show();
}else if(policy_type_id == 1 || policy_type_id == 6 || policy_type_id == 7) {
$('#no_of_insured_endorse_div').show();
$('#no_of_dependents_endorse_div').hide();
}else{
$('#no_of_insured_endorse_div').hide();
$('#no_of_dependents_endorse_div').hide();
} }
@ -822,8 +863,13 @@ $('#client_type').on('change', function() {
if (selectedClientType == 2) { if (selectedClientType == 2) {
$('.branchdiv').hide(); $('.branchdiv').hide();
$('#table_tr_34').hide();
$('#table_tr_37').hide();
} else { } else {
$('.branchdiv').show(); $('.branchdiv').show();
$('#table_tr_34').show();
$('#table_tr_37').show();
} }
console.log('selectedClientType', selectedClientType); console.log('selectedClientType', selectedClientType);
@ -850,8 +896,14 @@ $('#client_type').on('change', function() {
} }
$('#client_policy_id').empty().append($('<option>', {
value: '',
text: 'Select Policy'
}))
// Initialize or refresh Select2 for both dropdowns // Initialize or refresh Select2 for both dropdowns
$('#client_id').select2(); $('#client_id').select2();
$('#client_policy_id').select2();
}); });
$('#endorsement_no').on('change', function(){ $('#endorsement_no').on('change', function(){
@ -968,11 +1020,11 @@ function getPolicyTransactionDataForEndorsementEdit(input){
$('#policy_with_corr').prop('checked', false); $('#policy_with_corr').prop('checked', false);
} }
if (res.data.is_cd_reduce_from_bds == 1) { // if (res.data.is_cd_reduce_from_bds == 1) {
$('#is_cd_reduce_from_bds').prop('checked', true).prop('checked', false); // $('#is_cd_reduce_from_bds').prop('checked', true).prop('checked', false);
} else { // } else {
$('#is_cd_reduce_from_bds').prop('checked', false); // $('#is_cd_reduce_from_bds').prop('checked', false);
} // }
if (res.data.action_type == 'policy_instalment') { if (res.data.action_type == 'policy_instalment') {
$('.install_due_date_div').show() $('.install_due_date_div').show()
@ -990,11 +1042,11 @@ function getPolicyTransactionDataForEndorsementEdit(input){
addInsurerColumn(); addInsurerColumn();
} }
if(res.data.policy_type_id == 1 || res.data.policy_type_id == 2 || res.data.policy_type_id == 3 || res.data.policy_type_id == 4 || res.data.policy_type_id == 5 || res.data.policy_type_id == 6 || res.data.policy_type_id == 7){ // if(res.data.policy_type_id == 1 || res.data.policy_type_id == 2 || res.data.policy_type_id == 3 || res.data.policy_type_id == 4 || res.data.policy_type_id == 5 || res.data.policy_type_id == 6 || res.data.policy_type_id == 7){
$('#is_cd_reduce_from_bds').prop('disabled',true).prop('checked', false); // $('#is_cd_reduce_from_bds').prop('disabled',true).prop('checked', false);
}else{ // }else{
$('#is_cd_reduce_from_bds').prop('disabled',false); // $('#is_cd_reduce_from_bds').prop('disabled',false);
} // }
}else{ }else{

View File

@ -298,11 +298,11 @@ table.dataTable thead th {
<div class="card-body"> <div class="card-body">
<div class="row" style="margin-bottom:1rem;"> <div class="row" style="margin-bottom:1rem;">
<div class="col-6" style="align-self: center;"> <div class="col-6" style="align-self: center;">
<h4 style="position: relative;">Endorsement List</h4> <!-- <h4 style="position: relative;">Endorsement List</h4> -->
</div><!-- col-6 --> </div><!-- col-6 -->
<div class="col-3" id="status_change" style="text-align: right; position: relative;top: 56px; left: 291px;"> <!-- <div class="col-3" id="status_change" style="text-align: right; position: relative;top: 56px; left: 291px;">
<button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" onclick="hide_list_show_add()">Add</button> <button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" onclick="hide_list_show_add()">Add</button>
</div><!-- col-3 --> </div> col-3 -->
</div><!-- row --> </div><!-- row -->
<table data-custom-table-css="table" class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table"> <table data-custom-table-css="table" class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table">
<thead class="bg-light"> <thead class="bg-light">
@ -504,8 +504,12 @@ table.dataTable thead th {
}] }]
}], }],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional) pageLength: 25, // Set default number of rows per page (optional)

File diff suppressed because it is too large Load Diff

View File

@ -265,6 +265,29 @@
<div class="col-6" style="align-self: center;"> <div class="col-6" style="align-self: center;">
<h4 style="position: relative;">Policy List </h4> <h4 style="position: relative;">Policy List </h4>
</div> </div>
<div>
<table data-custom-table-css="table" class="table mb-0 nowrap w-100 table-centered" cellspacing="0" id="tickets-table">
<thead class="bg-light">
<tr>
<th><div class="column-header">S.No&nbsp;</div></th>
<th><div class="column-header">Issuer&nbsp;</div></th>
<th><div class="column-header">Business Type&nbsp;</div></th>
<th><div class="column-header">Client Type&nbsp;</div></th>
<th><div class="column-header">Client / Branch&nbsp;</div></th>
<th><div class="column-header">Insurer&nbsp;</div></th>
<th><div class="column-header">Policy&nbsp;</div></th>
<th><div class="column-header">Policy No&nbsp;</div></th>
<th><div class="column-header">Policy Issue Date&nbsp;</div></th>
<th><div class="column-header">D.O.C&nbsp;</div></th>
<th><div class="column-header">D.O.E&nbsp;</div></th>
<th><div class="column-header">No of Insured&nbsp;</div></th>
<th><div class="column-header">No of Dependents&nbsp;</div></th>
<th><div class="column-header">Status&nbsp;</div></th>
<th><div class="column-header">User&nbsp;</div></th>
<th><div class="column-header">Action</div></th>
</tr>
</thead>
<div class="col-3" id="status_change" style="text-align: right; position: relative;top: 56px; left: 291px;"> <div class="col-3" id="status_change" style="text-align: right; position: relative;top: 56px; left: 291px;">
<!-- <button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" onclick="hide_list_show_add();">Add</button> --> <!-- <button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" onclick="hide_list_show_add();">Add</button> -->
@ -328,21 +351,27 @@
<tbody> <tbody>
<?php foreach ($inception_data_list as $index => $row) { ?> <?php foreach ($inception_data_list as $index => $row) { ?>
<tr> <tr>
<td><?php echo $index + 1; ?></td> <td class="text-center"><?php echo $index+1; ?></td>
<td><?php echo $issuer[$row['issuer']]; ?></td> <td><?php echo $issuer[$row['issuer']] ?: 'N/A'; ?></td>
<td><?php echo $issuing_type[$row['issue_type']]; ?></td> <td><?php echo $issuing_type[$row['issue_type']] ?: 'N/A'; ?></td>
<td><?php echo $client_type[$row['client_type']] ?? '-'; ?></td> <td><?php echo $client_type[$row['client_type']] ?? '-'; ?></td>
<td><?php echo $row['client_type'] == 2 ? $row['client_name'] . " - " . (!empty($row['pan']) ? $row['pan'] : 'N/A') : $row['client_short_name'] . ' - ' . $row['client_branch_name']; ?></td> <td><?php echo $row['client_type'] == 2 ? $row['client_name'] . " - " . (!empty($row['pan']) ? $row['pan'] : 'N/A') : $row['client_short_name'] . ' - ' . $row['client_branch_name']; ?></td>
<td><?php echo $row['insurer_short_name']; ?></td> <td><?php echo $row['insurer_short_name'] ?: 'N/A'; ?></td>
<td><?php echo $row['policy_type']; ?></td> <td><?php echo $row['policy_type'] ?: 'N/A'; ?></td>
<td><?php echo $row['policy_no']; ?></td> <td><?php echo $row['policy_no'] ?: 'N/A'; ?></td>
<td><?php echo empty($row['policy_issue_date']) ? '' : date('d/m/Y', strtotime($row['policy_issue_date'])); ?></td> <td><?php echo empty($row['policy_issue_date']) ? '' : date('d/m/Y', strtotime($row['policy_issue_date'])); ?></td>
<td><?php echo empty($row['policy_issue_date']) ? '' : date('d/m/Y', strtotime($row['policy_start_date'])); ?></td> <td><?php echo empty($row['policy_issue_date']) ? '' : date('d/m/Y', strtotime($row['policy_start_date'])); ?></td>
<td><?php echo empty($row['policy_issue_date']) ? '' : date('d/m/Y', strtotime($row['policy_end_date'])); ?></td> <td><?php echo empty($row['policy_issue_date']) ? '' : date('d/m/Y', strtotime($row['policy_end_date'])); ?></td>
<td class="right-align-input"><?php echo $row['emp_count']; ?></td> <!-- <td class="right-align-input"><?php echo $row['emp_count'] ?: 'N/A'; ?></td>
<td class="right-align-input"><?php echo $row['dependent_count']; ?></td> <td class="right-align-input"><?php echo $row['dependent_count'] ?: 'N/A'; ?></td> -->
<td><?php echo $policy_status[$row['status']]; ?></td> <td class="<?= ($row['emp_count'] !== '' && $row['emp_count'] !== null) ? 'right-align-input' : 'text-center'; ?>">
<td><?php echo $row['user_name']; ?></td> <?= ($row['emp_count'] !== '' && $row['emp_count'] !== null) ? $row['emp_count'] : 'N/A'; ?>
</td>
<td class="<?= ($row['dependent_count'] !== '' && $row['dependent_count'] !== null) ? 'right-align-input' : 'text-center'; ?>">
<?= ($row['dependent_count'] !== '' && $row['dependent_count'] !== null) ? $row['dependent_count'] : 'N/A'; ?>
</td>
<td><?php echo $policy_status[$row['status']] ?: 'N/A'; ?></td>
<td><?php echo $row['user_name'] ?: 'N/A'; ?></td>
<td> <td>
<div class="btn-group dropdown"> <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> <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>
@ -509,11 +538,268 @@
var clientId = $('#client_id').val(); var clientId = $('#client_id').val();
var clientBranchId = $('#client_branch_id').val(); var clientBranchId = $('#client_branch_id').val();
if (!clientId || !clientBranchId) { if (!clientId || !clientBranchId) {
// Disable all input, select, textarea, and button elements, including policy_no and insurer_id // Disable all input, select, textarea, and button elements, including policy_no and insurer_id
$('#inception_form_id').find(':input, select, textarea, button').not('#client_id, #client_branch_id').prop('disabled', true).addClass('disabled-field'); $('#inception_form_id').find(':input, select, textarea, button').not('#client_id, #client_branch_id').prop('disabled', true).addClass('disabled-field');
} else { } else {
$('#inception_form_id').find(':input, select, textarea, button').not('#client_id, #client_branch_id').prop('disabled', false).removeClass('disabled-field'); $('#inception_form_id').find(':input, select, textarea, button').not('#client_id, #client_branch_id').prop('disabled', false).removeClass('disabled-field');
}
}
// Check on page load
// checkAndDisableFields();
// // Check whenever these fields are updated
// $('#client_id, #client_branch_id').on('change keyup', function() {
// checkAndDisableFields();
// });
// Attach event handler to show toastr if user clicks on any disabled field
$('#inception_form_id').on('click', '.disabled-field', function(e) {
e.preventDefault();
toastr.warning('Please select Client and Client Branch before filling out the form.');
});
});
// select2 document ready
$(document).ready(function(){
getClientAndBranchAndPolicy()
addHTMLInput();
addHTMLInputForVehicleFileUpload()
<?php if (session()->has('create_failed')) : ?>
toastr.error('<?= session()->getFlashdata('create_failed') ?>', 'Failed');
<?php endif; ?>
<?php if (session()->has('update_failed')) : ?>
toastr.error('<?= session()->getFlashdata('update_failed') ?>', 'Failed');
<?php endif; ?>
<?php if (session()->has('create_success')) : ?>
toastr.success('<?= session()->getFlashdata('create_success') ?>', 'success');
<?php endif; ?>
<?php if (session()->has('update_success')) : ?>
toastr.success('<?= session()->getFlashdata('update_success') ?>', 'success');
<?php endif; ?>
$('#client_id').select2();
$('#client_branch_id').select2();
$('#insurer_branch').select2();
$('#tpa').select2();
$('#base_policy').select2();
$('#source_client_policy_id').select2();
$('#sales_generated_by').select2();
$('#serviced_by').select2();
$('#policy_type_id').select2();
$('#ppteam').select2();
})
// Datatable document ready
$(document).ready(function() {
var ticketsTable = $('#tickets-table');
if (ticketsTable.length) {
ticketsTable.DataTable({
scrollX: true,
dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
// buttons: [
// {
// extend: 'collection',
// text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
// className: 'btn app-btn-secondary ',
// buttons: [
// {
// extend: 'csv',
// text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
// title: 'Policy-Tranction-Inception-List',
// exportOptions: {
// columns: ':not(:last-child)'
// },
// } ]},
// {
// text: 'Add',
// className: 'buttons-html5 addbtnStyle',
// action: function (e, dt, node, config) {
// hide_list_show_add();
// }
// }
// ],
buttons: [
{
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
className: 'btn app-btn-primary mr-2',
action: function(e, dt, node, config) {
hide_list_show_add();
}
},
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'Policy-Tranction-Inception-List',
}
]
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional)
// ordering: false,
});
} else {
console.error("Table not found.");
}
});
// Date document ready
$(document).ready(function(){
var today = new Date();
var opening_date = flatpickr("#opening_date", {
dateFormat: "d/m/Y",
allowInput: false
});
var policy_start_date = flatpickr("#policy_start_date", {
dateFormat: "d/m/Y",
defaultDate: today,
allowInput: false,
onChange: function(selectedDates, dateStr, instance) {
var policy_end_date = new Date(selectedDates[0]);
policy_end_date.setFullYear(policy_end_date.getFullYear() + 1);
policy_end_date.setDate(policy_end_date.getDate() - 1); // Set end date to last day of selected year
policy_end_datePicker.setDate(policy_end_date);
// Calculate renewal date (one month before the end date)
var renewal_date = new Date(policy_end_date);
// renewal_date.setMonth(renewal_date.getMonth() - 1);
renewal_datePicker.setDate(renewal_date); // Set renewal date
}
});
// Calculate the end date (today + 1 year)
var closeDate = new Date(today);
closeDate.setFullYear(closeDate.getFullYear() + 1);
closeDate.setDate(closeDate.getDate() - 1); // Set end date to last day of next year
var policy_end_datePicker = flatpickr("#policy_end_date", {
dateFormat: "d/m/Y",
defaultDate: closeDate,
allowInput: false
});
var renewal_datePicker = flatpickr("#renewal_date", {
dateFormat: "d/m/Y",
allowInput: false
});
var month = flatpickr("#month", {
dateFormat: "M/Y", // Format as month and year
allowInput: false, // Disable manual input
});
var policy_issue_date = flatpickr("#policy_issue_date", {
dateFormat: "d/m/Y", // Format as day-month-year
allowInput: false, // Disable manual input
onChange: function(selectedDates, dateStr, instance) {
// Get the selected date
var selectedDate = new Date(selectedDates[0]);
// Format the selected date to "M-Y"
var formattedMonth = flatpickr.formatDate(selectedDate, "M/Y");
// Set the value of the #month input
month.setDate(formattedMonth);
}
});
})
//--------------------------------------------------------------------------------------------------------
function hide_list_show_add()
{
$('#page_title').text('Add Policy')
$('#inception_form_id')[0].reset();
$('#client_id').val('').change().prop('disabled', false);
$('#tpa').val('').change().prop('disabled', false);
$('#client_id_for_edit').val('');
$('#policy_tranction_primarykey').val('');
$('#client_policy_id').val('');
$('#client_branch_id').val('').change().prop('disabled', false);
$('#insurer_id').val('');
$('#cd_ac_no').empty().prop('disabled', false);
$('#policy_no').val('').change().prop('disabled', false);
$('#source_client_policy_id').val('').prop('disabled', false);
$('#policy_end_date').prop('disabled', false);
$('#policy_start_date').prop('disabled', false);
$('#client_type').prop('disabled', false);
$('#policy_type_id').prop('disabled', false);
$('#invoice_no_div').hide()
$('.current_date').hide()
$('#invoice_no').attr('required', false)
$('#pt_onboarding').show()
$('#inception_list').hide()
$('#inception_filter').hide()
$('#policyholdernamediv').hide();
$('.branchdiv').show();
}
function show_list_hide_add()
{
$('#pt_onboarding').hide()
$('#inception_list').show()
$('#inception_filter').show();
$('#nav_pills').empty()
$('#tab_content').empty()
count = 0
}
function getClientAndBranchAndPolicy()
{
$.ajax({
url: '<?= base_url("/util/getClientAndBranchAndPolicy") ?>',
type: "GET",
dataType: 'json',
success: function(res) {
console.log('getClientAndBranchAndPolicy', res);
if(res.status == true){
client_list = res.client_data;
branch_list = res.branch_data;
policy_list = res.policy_data;
vehicle_list = res.vehicle_data;
unit_list = res.unit_data;
appendClients(res.client_data);
appendVehicles(res.vehicle_data);
appendOwner(client_list)
}else{
console.log('No data found');
} }
} }

View File

@ -98,27 +98,25 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php if (is_array($policyList)) { <?php if(is_array($policyList)) {foreach($policyList as $row){ ?>
foreach ($policyList as $row) { ?> <tr>
<tr> <td><?php echo $row['policy_type'] ?: 'N/A'; ?> </td>
<td><?php echo $row['policy_type']; ?> </td> <td><?php echo $row['long_name'] ?: 'N/A'; ?> </td>
<td><?php echo $row['long_name']; ?> </td> <td><?php echo $row['bap'] ?: 'N/A'; ?></td>
<td><?php echo $row['bap']; ?></td> <td><?php echo $row['allocg'] ?: 'N/A'; ?></td>
<td><?php echo $row['allocg']; ?></td> <td><?php echo $row['alloci'] ?: 'N/A'; ?></td>
<td><?php echo $row['alloci']; ?></td> <td>
<td> <div class="btn-group dropdown">
<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>
<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">
<div class="dropdown-menu dropdown-menu-right"> <a class="dropdown-item" href="<?= base_url("master/policy/list/"); ?><?= $row['id'];?>"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
<a class="dropdown-item" href="<?= base_url("master/policy/list/"); ?><?= $row['id']; ?>"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a> <a class="dropdown-item" data-id="<?= $row['id'];?>" onclick="removePolciyType(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
<a class="dropdown-item" data-id="<?= $row['id']; ?>" onclick="removePolciyType(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a> </div>
</div> </div>
</div> </td>
</td> </tr>
</tr> <?php }}?>
<?php }
} ?>
</tbody> </tbody>
</table> </table>
@ -216,27 +214,51 @@
<script> <script>
$(document).ready(function() { $(document).ready(function(){
$('#tickets-table').DataTable({ $('#tickets-table').DataTable({
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", "<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [{ // buttons: [
extend: 'csv', // {
text: 'CSV', // extend: 'csv',
title: 'PolicyTypeList', // text: 'CSV',
exportOptions: { // title: 'PolicyTypeList',
columns: ':not(:last-child)' // exportOptions: {
} // columns: ':not(:last-child)'
}], // }
// }
// ],
buttons: [
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'PolicyTypeList',
exportOptions: {
columns: ':not(:last-child)'
}
}
]
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true ,
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
},
paging: true,
}); });
}) })

View File

@ -117,25 +117,25 @@ table.dataTable tbody td {
<?php foreach($report_list as $index => $row){ ?> <?php foreach($report_list as $index => $row){ ?>
<tr> <tr>
<td><?= $index + 1 ?></td> <td><?= $index + 1 ?></td>
<td><?php echo $row['user_name']; ?></td> <td><?php echo $row['user_name'] ?: 'N/A'; ?></td>
<td><?php echo $row['policy_issue_month']; ?></td> <td><?php echo $row['policy_issue_month'] ?: 'N/A'; ?></td>
<td><?php echo $row['revenue_type']; ?></td> <td><?php echo $row['revenue_type'] ?: 'N/A'; ?></td>
<td><?php echo $row['client_type']; ?></td> <td><?php echo $row['client_type'] ?: 'N/A'; ?></td>
<td><?php echo $row['client_name']; ?></td> <td><?php echo $row['client_name'] ?: 'N/A'; ?></td>
<td><?php echo $row['action_type']; ?></td> <td><?php echo $row['action_type'] ?: 'N/A'; ?></td>
<td><?php echo $row['policy_type']; ?></td> <td><?php echo $row['policy_type'] ?: 'N/A'; ?></td>
<td><?php echo $row['bap']; ?></td> <td><?php echo $row['bap'] ?: 'N/A'; ?></td>
<td><?php echo $row['vehicle_no'] ?? 'N.A'; ?></td> <td><?php echo $row['vehicle_no'] ?: 'N/A'; ?></td>
<td><?php echo $row['policy_no']; ?></td> <td><?php echo $row['policy_no'] ?: 'N/A'; ?></td>
<td><?php echo $row['endorsement_no']; ?></td> <td><?php echo $row['endorsement_no'] ?: 'N/A'; ?></td>
<td><?php echo $row['insurer_name']; ?> </td> <td><?php echo $row['insurer_name'] ?: 'N/A'; ?> </td>
<td><?php echo $row['insurer_branch_name']; ?></td> <td><?php echo $row['insurer_branch_name'] ?: 'N/A'; ?></td>
<td><?php echo $row['tpa_name']; ?></td> <td><?php echo $row['tpa_name']; ?></td>
<td><?php echo empty($row['endorse_eff_date']) ? '' : date('d/m/Y', strtotime($row['endorse_eff_date'])) ?></td> <td><?php echo empty($row['endorse_eff_date']) ? 'N/A' : date('d/m/Y', strtotime($row['endorse_eff_date'])) ?></td>
<td><?php echo empty($row['policy_start_date']) ? '' : date('d/m/Y', strtotime($row['policy_start_date'])); ?></td> <td><?php echo empty($row['policy_start_date']) ? 'N/A' : date('d/m/Y', strtotime($row['policy_start_date'])); ?></td>
<td><?php echo empty($row['policy_end_date']) ? '' : date('d/m/Y', strtotime($row['policy_end_date'])); ?></td> <td><?php echo empty($row['policy_end_date']) ? 'N/A' : date('d/m/Y', strtotime($row['policy_end_date'])); ?></td>
<td><?php echo $row['ref']; ?></td> <td><?php echo $row['ref'] ?: 'N/A'; ?></td>
<td><?php echo $row['remarks']; ?></td> <td><?php echo $row['remarks'] ?: 'N/A'; ?></td>
<td class="right-align-input"><?php echo $row['bp_amt']; ?></td> <td class="right-align-input"><?php echo $row['bp_amt']; ?></td>
<td class="right-align-input"><?php echo $row['tp_or_ter']; ?></td> <td class="right-align-input"><?php echo $row['tp_or_ter']; ?></td>
<td class="right-align-input"><?php echo $row['premium_wo_gst']; ?></td> <td class="right-align-input"><?php echo $row['premium_wo_gst']; ?></td>
@ -405,8 +405,12 @@ $(document).ready(function() {
} }
], ],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional) pageLength: 25, // Set default number of rows per page (optional)

View File

@ -103,17 +103,17 @@
<table data-custom-table-css="table" class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0" id="tickets-table"> <table data-custom-table-css="table" class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0" id="tickets-table">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th class="font-weight-medium">SNO</th> <th class="font-weight-medium">S.No&nbsp;</th>
<th class="font-weight-medium">Policy number</th> <th class="font-weight-medium">Policy number&nbsp;</th>
<th class="font-weight-medium">Endorsement Number</th> <th class="font-weight-medium">Endorsement Number&nbsp;</th>
<th class="font-weight-medium">Description</th> <th class="font-weight-medium">Description&nbsp;</th>
<th class="font-weight-medium">Client</th> <th class="font-weight-medium">Client&nbsp;</th>
<th class="font-weight-medium">Insurer name</th> <th class="font-weight-medium">Insurer name&nbsp;</th>
<th class="font-weight-medium">Agent</th> <th class="font-weight-medium">Agent&nbsp;</th>
<th class="font-weight-medium">Mananger</th> <th class="font-weight-medium">Mananger&nbsp;</th>
<th class="font-weight-medium">Created At</th> <th class="font-weight-medium">Created At&nbsp;</th>
<th class="font-weight-medium">Status</th> <th class="font-weight-medium">Status&nbsp;</th>
<th class="font-weight-medium">Action</th> <th class="font-weight-medium">Action&nbsp;</th>
</tr> </tr>
</thead> </thead>
@ -163,7 +163,7 @@
<div class="modal fade app-text-black " id="centermodal" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static"> <div class="modal fade font-color-black " id="centermodal" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static">
<div class="modal-dialog modal-dialog-centered"> <div class="modal-dialog modal-dialog-centered">
<div class="modal-content"> <div class="modal-content">
<form id="retailEndorsementForm"> <form id="retailEndorsementForm">
@ -335,24 +335,51 @@
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", "<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [{ // buttons: [{
extend: 'csv', // extend: 'csv',
text: 'CSV', // text: 'CSV',
title: 'Retail-Endorsement-List', // title: 'Retail-Endorsement-List',
className: 'my_class', // className: 'my_class',
exportOptions: { // exportOptions: {
columns: ':not(:last-child)', // columns: ':not(:last-child)',
format: { // format: {
body: function (data, row, column, node) { // body: function (data, row, column, node) {
// Convert data to string to avoid scientific notation in CSV // // Convert data to string to avoid scientific notation in CSV
if (!isNaN(data) && parseFloat(data) > 1e20) { // if (!isNaN(data) && parseFloat(data) > 1e20) {
return `'${data}`; // return `'${data}`;
} // }
return data.toString();// Ensures all data is treated as strings // return data.toString();// Ensures all data is treated as strings
} // }
// }
// }
// }],
buttons: [
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'Retail-Endorsement-List',
exportOptions: {
columns: ':not(:last-child)',
format: {
body: function (data, row, column, node) {
// Convert data to string to avoid scientific notation in CSV
if (!isNaN(data) && parseFloat(data) > 1e20) {
return `'${data}`;
}
return data.toString();// Ensures all data is treated as strings
}
}
}
},
]
} }
} ],
}],
initComplete: function(settings, json) { initComplete: function(settings, json) {
$('.my_class').css({ $('.my_class').css({
"position": "relative", "position": "relative",
@ -360,8 +387,12 @@
}); });
}, },
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, paging: true,
// pagingType: 'full_numbers' // pagingType: 'full_numbers'

View File

@ -100,21 +100,45 @@
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{ // buttons: [{
extend: 'csv', // extend: 'csv',
text: 'CSV', // text: 'CSV',
title: 'TAT BAND WISE DATA', // title: 'TAT BAND WISE DATA',
}, // },
// {
// extend: 'excel',
// text: 'Excel',
// title: 'TAT BAND WISE DATA',
// }
// ],
buttons: [
{ {
extend: 'excel', extend: 'collection',
text: 'Excel', text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
title: 'TAT BAND WISE DATA', className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'TAT BAND WISE DATA',
},
{
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
className: 'app-btn-primary ',
title: 'TAT BAND WISE DATA',
}
]
} }
], ],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional) pageLength: 10, // Set default number of rows per page (optional)

View File

@ -138,22 +138,22 @@ th:first-child, td:first-child {
<table data-custom-table-css="table" class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table"> <table data-custom-table-css="table" class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th><input type="checkbox" id="selectAll" onclick="toggleAll(this)"></th> <th><input type="checkbox" id="selectAll" onclick="toggleAll(this)">&nbsp;</th>
<th class="font-weight-medium">SNO</th> <th class="font-weight-medium">S.No&nbsp;</th>
<?php if (isset($getData)) { <?php if (isset($getData)) {
if ($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?> if ($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?>
<th class="font-weight-medium">Client/Branch</th> <th class="font-weight-medium">Client/Branch&nbsp;</th>
<?php } <?php }
if ($getData['client_id'] != '0' && $getData['branch_id'] == '0') { ?> if ($getData['client_id'] != '0' && $getData['branch_id'] == '0') { ?>
<th class="font-weight-medium">Branch</th> <th class="font-weight-medium">Branch&nbsp;</th>
<?php } } ?> <?php } } ?>
<th class="font-weight-medium">Name</th> <th class="font-weight-medium">Name&nbsp;</th>
<th class="font-weight-medium">EMP Code</th> <th class="font-weight-medium">EMP Code&nbsp;</th>
<th class="font-weight-medium">Relationship</th> <th class="font-weight-medium">Relationship&nbsp;</th>
<th class="font-weight-medium">Gender</th> <th class="font-weight-medium">Gender&nbsp;</th>
<th class="font-weight-medium">Date of Birth</th> <th class="font-weight-medium">Date of Birth&nbsp;</th>
<th class="font-weight-medium">Existing Policy Count</th> <th class="font-weight-medium">Existing Policy Count&nbsp;</th>
<!-- <th class="font-weight-medium">Policy name</th> <!-- <th class="font-weight-medium">Policy name</th>
<th class="font-weight-medium">Insurer name</th> <th class="font-weight-medium">Insurer name</th>
<th class="font-weight-medium">TPA ID</th> <th class="font-weight-medium">TPA ID</th>
@ -557,8 +557,12 @@ document.addEventListener("DOMContentLoaded", function () {
className:"unmapEmployees" className:"unmapEmployees"
}], }],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 25 // Set default number of rows per page (optional) pageLength: 25 // Set default number of rows per page (optional)

View File

@ -45,15 +45,15 @@ table.dataTable td.wrap {
</div> </div>
<div> <div>
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap text-custom-black text-custom app-datatable"> <table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap text-custom-black text-custom app-datatable">
<thead class="app-table-head"> <thead class="bg-light">
<tr> <tr>
<th>Ticket ID</th> <th>Ticket ID</th>
<th class="app-text-left">Name</th> <th class="text-left">Name</th>
<th>Policy Number</th> <th>Policy Number</th>
<th>Ticket Type</th> <th>Ticket Type</th>
<th>Subject</th> <th>Subject</th>
<th>Status</th> <th>Status</th>
<th class="app-text-left">Assign To</th> <th class="text-left">Assign To</th>
<th>Created At</th> <th>Created At</th>
<th>Updated At</th> <th>Updated At</th>
</tr> </tr>
@ -63,18 +63,18 @@ table.dataTable td.wrap {
<?php foreach($ticket_data as $index => $row){ ?> <?php foreach($ticket_data as $index => $row){ ?>
<tr data-id="<?= $row['thz_id']; ?>" style="cursor: pointer;"> <tr data-id="<?= $row['thz_id']; ?>" style="cursor: pointer;">
<td class="app-text-right"><?php echo $row['thz_id']; ?></td> <td class="text-right"><?php echo $row['thz_id']; ?></td>
<td class="app-text-left"> <td class="text-left">
<?php echo $row['name']; ?> <?php echo $row['name']; ?>
<span class="text-custom-grey"><?php if (!empty($row['empcode'])): echo '('.$row['empcode'].')'; endif; ?></span><br> <span class="text-custom-grey"><?php if (!empty($row['empcode'])): echo '('.$row['empcode'].')'; endif; ?></span><br>
<span class="text-custom-grey"><?php if (!empty($row['mobile'])): echo $row['mobile']; endif; ?></span> <span class="text-custom-grey"><?php if (!empty($row['mobile'])): echo $row['mobile']; endif; ?></span>
</td> </td>
<td class="app-text-center"><?php echo (!empty($row['policy_no']) && strtolower($row['policy_no']) !== 'null') <td class="text-center"><?php echo (!empty($row['policy_no']) && strtolower($row['policy_no']) !== 'null')
? $row['policy_no'] ? $row['policy_no']
: 'N/A'; ?> : 'N/A'; ?>
</td> </td>
<td class="app-text-center"><?php echo $row['ticket_type'] ? $row['ticket_type'] : '-'; ?></td> <td class="text-center"><?php echo $row['ticket_type'] ? $row['ticket_type'] : '-'; ?></td>
<td class="app-text-center wrap" title="<?php echo htmlspecialchars($row['subject']); ?>"> <td class="text-center wrap" title="<?php echo htmlspecialchars($row['subject']); ?>">
<?php <?php
$subject = $row['subject'] ? $row['subject'] : 'N/A'; $subject = $row['subject'] ? $row['subject'] : 'N/A';
echo (strlen($subject) > 50) echo (strlen($subject) > 50)
@ -82,9 +82,9 @@ table.dataTable td.wrap {
: htmlspecialchars($subject); : htmlspecialchars($subject);
?> ?>
</td> </td>
<td class="app-text-center"><?php echo $row['status'] ? $row['status'] : '-' ; ?></td> <td class="text-center"><?php echo $row['status'] ? $row['status'] : '-' ; ?></td>
<td class="app-text-left"><?php echo $row['assignee_name'] ? $row['assignee_name'] : '-'; ?></td> <td class="text-left"><?php echo $row['assignee_name'] ? $row['assignee_name'] : '-'; ?></td>
<td class="app-text-left"> <td class="text-left">
<?php if (!empty($row['created_at'])): <?php if (!empty($row['created_at'])):
$cd = date("j F Y", strtotime($row['created_at'])); $cd = date("j F Y", strtotime($row['created_at']));
$ct = date("h:i a", strtotime($row['created_at'])); $ct = date("h:i a", strtotime($row['created_at']));
@ -92,7 +92,7 @@ table.dataTable td.wrap {
endif; endif;
?> ?>
</td> </td>
<td class="app-text-left"> <td class="text-left">
<?php if (!empty($row['updated_at'])): <?php if (!empty($row['updated_at'])):
$ud = date("j F Y", strtotime($row['updated_at'])); $ud = date("j F Y", strtotime($row['updated_at']));
$ut = date("h:i a", strtotime($row['updated_at'])); $ut = date("h:i a", strtotime($row['updated_at']));
@ -244,7 +244,7 @@ table.dataTable td.wrap {
<!-- <div class="form-group col-md-12 "> <!-- <div class="form-group col-md-12 ">
<label for="subject">Subject<span class="text-danger">*</span></label> <label for="subject">Subject<span class="text-danger">*</span></label>
<small id="subjectCounter" class="form-text text-muted app-text-right">0/150</small> <small id="subjectCounter" class="form-text text-muted text-right">0/150</small>
</div> --> </div> -->
<div class="form-group col-md-12 "> <div class="form-group col-md-12 ">
<div class="d-flex justify-content-between"> <div class="d-flex justify-content-between">
@ -257,7 +257,7 @@ table.dataTable td.wrap {
<div class="form-group col-md-12 "> <div class="form-group col-md-12 ">
<div class="d-flex justify-content-between"> <div class="d-flex justify-content-between">
<label for="message">Message<span class="text-danger">*</span></label> <label for="message">Message<span class="text-danger">*</span></label>
<small id="messageCounter" class="form-text text-muted text-end app-text-right">0/1500</small> <small id="messageCounter" class="form-text text-muted text-end text-right">0/1500</small>
</div> </div>
<!-- <input type="text" class="form-control" id="message" name="message" placeholder="Enter Message"> --> <!-- <input type="text" class="form-control" id="message" name="message" placeholder="Enter Message"> -->
<textarea class="form-control" id="message" name="message" placeholder="Enter Message" rows="3" required maxlength="1500"></textarea> <textarea class="form-control" id="message" name="message" placeholder="Enter Message" rows="3" required maxlength="1500"></textarea>

View File

@ -176,23 +176,23 @@ hr{
<div class="card-body card-scroll sub-title-text " style="padding:0 27px !important; background:#F5FFFF;"> <div class="card-body card-scroll sub-title-text " style="padding:0 27px !important; background:#F5FFFF;">
<div class="row mb-2 ml-o"> <div class="row mb-2 ml-o">
<div class="col-4 app-subtitle app-text-grey ">Ticket ID</div> <div class="col-4 app-subtitle app-text-grey ">Ticket ID</div>
<div class="col-8 app-text app-text-black text-end " style="font-weight: 500 !important;"><?= $master[0]['thz_id'];?></div> <div class="col-8 app-text font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['thz_id'];?></div>
</div> </div>
<div class="row mb-2"> <div class="row mb-2">
<div class="col-4 app-subtitle app-text-grey ">Name</div> <div class="col-4 app-subtitle app-text-grey ">Name</div>
<div class="col-8 app-text app-text-black text-end " style="font-weight: 500 !important;"><?= $master[0]['name'];?></div> <div class="col-8 app-text font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['name'];?></div>
</div> </div>
<div class="row mb-2"> <div class="row mb-2">
<div class="col-4 app-subtitle app-text-grey ">Mobile</div> <div class="col-4 app-subtitle app-text-grey ">Mobile</div>
<div class="col-8 app-text app-text-black text-end " style="font-weight: 500 !important;"><?= $master[0]['mobile'];?></div> <div class="col-8 app-text font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['mobile'];?></div>
</div> </div>
<div class="row mb-2"> <div class="row mb-2">
<div class="col-4 app-subtitle app-text-grey ">Policy Number</div> <div class="col-4 app-subtitle app-text-grey ">Policy Number</div>
<div class="col-8 app-text text-end app-text-black" style="font-weight: 500 !important;"> <div class="col-8 app-text text-end font-color-black" style="font-weight: 500 !important;">
<?= (!empty($master[0]['policy_no']) && strtolower($master[0]['policy_no']) !== 'null') <?= (!empty($master[0]['policy_no']) && strtolower($master[0]['policy_no']) !== 'null')
? '<u class="app-text-black"> ? '<u class="font-color-black">
<a href="javascript:void(0);" <a href="javascript:void(0);"
class="app-text-black" class="font-color-black"
data-toggle="modal" data-toggle="modal"
data-target="#PolicyModal" data-target="#PolicyModal"
title="Click to view Policy Terms" title="Click to view Policy Terms"
@ -205,15 +205,15 @@ hr{
</div> </div>
<div class="row mb-2"> <div class="row mb-2">
<div class="col-4 app-subtitle app-text-grey ">Assigned To</div> <div class="col-4 app-subtitle app-text-grey ">Assigned To</div>
<div class="col-8 app-text app-text-black text-end " style="font-weight: 500 !important;"><?= $master[0]['assignee_name'];?></div> <div class="col-8 app-text font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['assignee_name'];?></div>
</div> </div>
<div class="row mb-2"> <div class="row mb-2">
<div class="col-4 app-subtitle app-text-grey ">Status</div> <div class="col-4 app-subtitle app-text-grey ">Status</div>
<div class="col-8 app-text app-text-black text-end " style="font-weight: 500 !important;"> <div class="col-8 app-text font-color-black text-end " style="font-weight: 500 !important;">
<?= (!empty($master[0]['status']) && strtolower($master[0]['status']) !== 'null') <?= (!empty($master[0]['status']) && strtolower($master[0]['status']) !== 'null')
? '<u class="app-text-black"> ? '<u class="font-color-black">
<a href="javascript:void(0);" <a href="javascript:void(0);"
class="app-text-black" class="font-color-black"
onclick="statusHistory('.$master[0]['thz_id'].')" onclick="statusHistory('.$master[0]['thz_id'].')"
data-toggle="modal" data-toggle="modal"
data-target="#StatusModal" data-target="#StatusModal"
@ -226,15 +226,15 @@ hr{
</div> </div>
<div class="row mb-2"> <div class="row mb-2">
<div class="col-4 app-subtitle app-text-grey ">Ticket Type</div> <div class="col-4 app-subtitle app-text-grey ">Ticket Type</div>
<div class="col-8 app-text app-text-black text-end " style="font-weight: 500 !important;"><?= $master[0]['ticket_type'];?></div> <div class="col-8 app-text font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['ticket_type'];?></div>
</div> </div>
<div class="row mb-2"> <div class="row mb-2">
<div class="col-4 app-subtitle app-text-grey ">Subject</div> <div class="col-4 app-subtitle app-text-grey ">Subject</div>
<div class="col-8 app-text app-text-black text-end " style="font-weight: 500 !important; text-align: justify;"><?= $master[0]['subject'];?></div> <div class="col-8 app-text font-color-black text-end " style="font-weight: 500 !important; text-align: justify;"><?= $master[0]['subject'];?></div>
</div> </div>
<div class="row mb-2"> <div class="row mb-2">
<div class="col-4 app-subtitle app-text-grey ">Message</div> <div class="col-4 app-subtitle app-text-grey ">Message</div>
<div class="col-8 app-text app-text-black text-end " style="font-weight: 500 !important; text-align: justify;"><?= $master[0]['message'];?></div> <div class="col-8 app-text font-color-black text-end " style="font-weight: 500 !important; text-align: justify;"><?= $master[0]['message'];?></div>
</div> </div>
<div class="row mb-2"> <div class="row mb-2">
<div class="col-4 app-subtitle app-text-grey ">Related Tickets</div> <div class="col-4 app-subtitle app-text-grey ">Related Tickets</div>
@ -264,7 +264,7 @@ hr{
<!-- Conversation Card --> <!-- Conversation Card -->
<div class="card mb-3 conversation-card"> <div class="card mb-3 conversation-card">
<div class="card-header d-flex justify-content-between align-items-center" style="background:none; border:none; padding-bottom: 0px;"> <div class="card-header d-flex justify-content-between align-items-center" style="background:none; border:none; padding-bottom: 0px;">
<p class="sub-title-text app-text-black" >Conversation</p> <p class="sub-title-text font-color-black" >Conversation</p>
</div> </div>
<div class="card-body recard-scroll" style="padding:0 27px !important; margin:0 !important; background:#F5FFFF;"> <div class="card-body recard-scroll" style="padding:0 27px !important; margin:0 !important; background:#F5FFFF;">
<?php if(!empty($notes)): ?> <?php if(!empty($notes)): ?>
@ -273,7 +273,7 @@ hr{
<div style="border:none; padding: 0px; margin: 0px;"> <div style="border:none; padding: 0px; margin: 0px;">
<hr/> <hr/>
<!-- Top Row: Message + Badge --> <!-- Top Row: Message + Badge -->
<div class="d-flex justify-content-between align-items-start app-text app-text-black "> <div class="d-flex justify-content-between align-items-start app-text font-color-black ">
<p class="mb-1 ml-0 mr-0 " style="font-weight: 400 !important;"><?= $conv['notes'] ?></p> <p class="mb-1 ml-0 mr-0 " style="font-weight: 400 !important;"><?= $conv['notes'] ?></p>
<!-- <?php if(!empty($conv['notes_by'])): ?> <!-- <?php if(!empty($conv['notes_by'])): ?>
<span class="badge bg-warning text-dark"><?= $conv['notes_by'] ?></span> <span class="badge bg-warning text-dark"><?= $conv['notes_by'] ?></span>
@ -318,7 +318,7 @@ hr{
<button type="button" class="btn-icon" onclick="submitConverstionTicket('External', this)"><i class="mdi mdi-email"></i></button> <button type="button" class="btn-icon" onclick="submitConverstionTicket('External', this)"><i class="mdi mdi-email"></i></button>
</div> </div>
</div> </div>
<small id="messageCounter" class="form-text text-muted text-end app-text-right">0/1500</small> <small id="messageCounter" class="form-text text-muted text-end text-right">0/1500</small>
</form> </form>
</div> </div>
@ -329,7 +329,7 @@ hr{
</div> </div>
</div> </div>
<div class="modal fade app-text-black " id="EditModal" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal fade font-color-black " id="EditModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered"> <div class="modal-dialog modal-dialog-centered">
<div class="modal-content"> <div class="modal-content">
<form id="ticketForm"> <form id="ticketForm">
@ -638,7 +638,7 @@ function statusHistory(thzId) {
let table = ` let table = `
<div class="table-responsive"> <div class="table-responsive">
<table data-custom-table-css="table" class="table w-100 nowrap text-custom-black text-custom app-datatable"> <table data-custom-table-css="table" class="table w-100 nowrap text-custom-black text-custom app-datatable">
<thead class="app-table-head"> <thead class="bg-light">
<tr> <tr>
<th class="app-text app-text-white">S.No</th> <th class="app-text app-text-white">S.No</th>
<th class="app-text app-text-white">Old Status</th> <th class="app-text app-text-white">Old Status</th>

View File

@ -63,10 +63,10 @@ table.dataTable tbody td {
<?php if (isset($feedback_data)) { ?> <?php if (isset($feedback_data)) { ?>
<?php foreach($feedback_data as $data){ ?> <?php foreach($feedback_data as $data){ ?>
<tr onclick="viewFeedbackForm(<?php echo $data['id']; ?>)"> <tr onclick="viewFeedbackForm(<?php echo $data['id']; ?>)">
<td><?php echo $data['claim_number']; ?></td> <td><?php echo $data['claim_number'] ?: 'N/A'; ?></td>
<td><?php echo $data['emp_code']; ?></td> <td><?php echo $data['emp_code'] ?: 'N/A'; ?></td>
<td><?php echo $data['emp_name']; ?></td> <td><?php echo $data['emp_name'] ?: 'N/A'; ?></td>
<td><?php echo $data['client_name']; ?></td> <td><?php echo $data['client_name'] ?: 'N/A'; ?></td>
</tr> </tr>
<?php } ?> <?php } ?>
<?php } ?> <?php } ?>
@ -98,23 +98,51 @@ $(document).ready(function() {
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{ // buttons: [{
extend: 'csv', // extend: 'csv',
text: 'CSV', // text: 'CSV',
title: 'Claim-List', // title: 'Claim-List',
}, // },
{ // {
extend: 'excel', // extend: 'excel',
text: 'Excel', // text: 'Excel',
title: 'claim-List', // title: 'claim-List',
exportOptions: { // exportOptions: {
orthogonal: 'sort' // orthogonal: 'sort'
}, // },
}, // },
], // ],
buttons: [
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'Claim-List',
},
{
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
exportOptions: {
orthogonal: 'sort'
},
title: 'claim-List',
className: 'app-btn-primary ',
}
]
}
],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional) pageLength: 25, // Set default number of rows per page (optional)

View File

@ -60,9 +60,13 @@ if (ticketsTable.length) {
// ], // ],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
}, _INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional) pageLength: 10, // Set default number of rows per page (optional)
ordering: false, ordering: false,

View File

@ -54,17 +54,17 @@ table.dataTable tbody td {
</div> </div>
<div class="table-responsive"> <div class="table-responsive">
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap"> <table data-custom-table-css="table" class="table mb-0 nowrap w-100 table-centered" cellspacing="0" id="scroll-horizontal-datatable">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th>Status</th> <th>Status&nbsp;</th>
<th>Policy Type</th> <th>Policy Type&nbsp;</th>
<th>Claim number</th> <th>Claim number&nbsp;</th>
<th>TPA ID</th> <th>TPA ID&nbsp;</th>
<th>Emp ID</th> <th>Emp ID&nbsp;</th>
<th>Emp name</th> <th>Emp name&nbsp;</th>
<th>Insured Name</th> <th>Insured Name&nbsp;</th>
<th>Corporate name</th> <th>Corporate name&nbsp;</th>
<th style="display: none;">ACM</th> <th style="display: none;">ACM</th>
<th style="display: none;">Insurer</th> <th style="display: none;">Insurer</th>
@ -161,13 +161,13 @@ table.dataTable tbody td {
</span> </span>
</td> </td>
<td><?php echo str_replace("Claim-", "", $ticket_type[$row['ticket_type_id']] ?? ""); ?></td> <td><?php echo str_replace("Claim-", "", $ticket_type[$row['ticket_type_id']] ?? 'N/A'); ?></td>
<td><?php echo $row['claim_no']; ?></td> <td><?php echo $row['claim_no'] ?: 'N/A' ; ?></td>
<td><?php echo $row['tpa_no']; ?></td> <td><?php echo $row['tpa_no'] ?: 'N/A'; ?></td>
<td><?php echo $row['emp_code']; ?></td> <td><?php echo $row['emp_code'] ?: 'N/A'; ?></td>
<td><?php echo $row['emp_name']; ?></td> <td><?php echo $row['emp_name'] ?: 'N/A'; ?></td>
<td><?php echo $row['insured_name']; ?></td> <td><?php echo $row['insured_name'] ?: 'N/A'; ?></td>
<td><?php echo $row['short_name']; ?></td> <td><?php echo $row['short_name'] ?: 'N/A'; ?></td>
<td style="display: none;"><?php echo $row['acm_name']; ?></td> <td style="display: none;"><?php echo $row['acm_name']; ?></td>
<td style="display: none;"><?php echo $row['insurer_name']; ?></td> <td style="display: none;"><?php echo $row['insurer_name']; ?></td>
@ -271,31 +271,66 @@ $(document).ready(function() {
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{ // buttons: [{
extend: 'csv', // extend: 'csv',
text: 'CSV', // text: 'CSV',
title: 'Claim-List', // title: 'Claim-List',
}, // },
{ // {
extend: 'excel', // extend: 'excel',
text: 'Excel', // text: 'Excel',
title: 'claim-List', // title: 'claim-List',
exportOptions: { // exportOptions: {
orthogonal: 'sort' // orthogonal: 'sort'
}, // },
}, // },
{ // {
text: 'New Claim', // text: 'New Claim',
className: 'buttons-html5 addbtnStyle', // className: 'buttons-html5 addbtnStyle',
action: function(e, dt, node, config) { // action: function(e, dt, node, config) {
openTicketTypeAskModal() // openTicketTypeAskModal()
} // }
} // }
], // ],
buttons: [
{
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Create New Claim </span>',
className: 'btn app-btn-primary mr-2',
action: function(e, dt, node, config) {
openTicketTypeAskModal()
}
},
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'Claim-List',
},
{
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'claim-List',
exportOptions: {
orthogonal: 'sort'
},
className: 'app-btn-primary ',
}
]
}
],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
}, _INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional) pageLength: 25, // Set default number of rows per page (optional)
ordering: false, ordering: false,

View File

@ -265,8 +265,12 @@
} }
}], }],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional) pageLength: 25, // Set default number of rows per page (optional)

View File

@ -446,7 +446,7 @@ $(document).ready(function () {
if (data.length === 0) { if (data.length === 0) {
tpaBranchTableInsert += ` tpaBranchTableInsert += `
<tr> <tr>
<td colspan="3" class="text-center app-text-black">No data available in table</td> <td colspan="3" class="text-center font-color-black">No data available in table</td>
</tr> </tr>
`; `;
} else { } else {
@ -575,7 +575,7 @@ $(document).ready(function () {
if (data.length === 0) { if (data.length === 0) {
branchTable += ` branchTable += `
<tr> <tr>
<td colspan="3" class="text-center app-text-black ">No data available in table</td> <td colspan="3" class="text-center font-color-black ">No data available in table</td>
</tr> </tr>
`; `;
} else { } else {

View File

@ -177,31 +177,38 @@
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$('#tickets-table').DataTable({
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + $('#tickets-table').DataTable({
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", "<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [{ buttons: [
extend: 'csv', {
text: 'CSV', text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
title: 'TPAList', className: 'btn app-btn-primary mr-2',
exportOptions: { action: function () {
columns: ':not(:last-child)' window.location.href = "<?= base_url("master/tpa/create"); ?>";
} }
}, },
{ {
text: 'ADD', extend: 'collection',
className: 'btn btn-color', text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
action: function() { className: 'btn app-btn-secondary ',
window.location.href = "<?= base_url("master/tpa/create"); ?>"; buttons: [
} {
} extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
], title: 'TPAList',
className: 'app-btn-primary ',
exportOptions: {
language: { columns: ':not(:last-child)'
search: ` }
}
]
}
],
language: {
search: `
<div class="datatable-search-wrapper"> <div class="datatable-search-wrapper">
_INPUT_ _INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i> <i class="mdi mdi-magnify datatable-search-icon"></i>

View File

@ -198,8 +198,50 @@
</tbody> </tbody>
</table> </table>
<div> </div>
</div> <div class="table-responsive">
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light">
<tr>
<th>S.No&nbsp;</th>
<th>Client&nbsp;</th>
<th>Client Branch&nbsp;</th>
<th>Insurer&nbsp;</th>
<th>Insurer Branch&nbsp;</th>
<th>Policy&nbsp;</th>
<th>Endorsement No&nbsp;</th>
<th>Premium&nbsp;</th>
<th>Statement Premium&nbsp;</th>
<th>Premium Variance&nbsp;</th>
<th>Expected Amount&nbsp;</th>
<th>Statement Amount&nbsp;</th>
<th>Variance&nbsp;</th>
</tr>
</thead>
<tbody>
<?php if (isset($varience_list)) { ?>
<?php foreach($varience_list as $index => $row){ ?>
<tr>
<td class="text-center"><?= $index + 1 ?></td>
<td><?php echo $row['client_name']; ?></td>
<td><?php echo $row['client_branch_name']; ?></td>
<td><?php echo $row['insurer_name']; ?></td>
<td><?php echo $row['insurer_branch_name']; ?></td>
<td><?php echo $row['policy_type'] .' - '. $row['policy_no']; ?></td>
<td><?php echo $row['endorsement_no']; ?></td>
<td class="right-align-input"><?php echo $row['original_premium']; ?></td>
<td class="right-align-input"><?php echo isset($row['statement_premium']) ? $row['statement_premium'] : '0.00'; ?></td>
<td class="right-align-input"><?php echo $row['premium_variance_amt']; ?></td>
<td class="right-align-input"><?php echo $row['exp_amt']; ?></td>
<td class="right-align-input"><?php echo isset($row['statement_amount']) ? $row['statement_amount'] : '0.00'; ?></td>
<td class="right-align-input"><?php echo isset($row['variance_amt']) ? $row['variance_amt'] : '0.00'; ?></td>
</tr>
<?php } ?>
<?php } ?>
</tbody>
</table>
<div>
</div> </div>
</div><!-- end col --> </div><!-- end col -->
</div> </div>
@ -265,18 +307,246 @@
// Append the new total row to the sheet // Append the new total row to the sheet
$(sheet).find('sheetData').append(totalRow); $(sheet).find('sheetData').append(totalRow);
} }
} }
] ]
}], }],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 25 // Set default number of rows per page (optional) pageLength: 25 // Set default number of rows per page (optional)
}); });
} else { } else {
console.error("Table not found."); console.error("Table not found.");
}
});
$(document).ready(function() {
getClientAndBranchAndPolicy()
getURLParams()
$('#client_id').select2();
$('#client_branch_id').select2();
$('#insurer_id').select2();
$('#insurer_branch_id').select2();
$('#client_policy_id').select2();
$('#policy_type_id').select2();
})
function fetchEmpolyeeList(event)
{
event.preventDefault(); // Prevent default action
var start_date = $('#startDate').val();
var end_date = $('#endDate').val();
var client_id = $('#client_id').val();
var insurer_id = $('#insurer_id').val();
var policy_type_id = $('#policy_type_id').val();
var date_type = $('#date_type').val();
var issuer = $('#issuer').val();
var client_branch_id = $('#client_branch_id').val();
var insurer_branch_id = $('#insurer_branch_id').val();
var client_policy_id = $('#client_policy_id').val();
console.log(start_date + '-' + end_date);
var queryParams = {
start_date: start_date,
end_date: end_date,
client_id: client_id,
insurer_id: insurer_id,
policy_type_id: policy_type_id,
date_type: date_type,
issuer: issuer,
client_branch_id: client_branch_id,
insurer_branch_id: insurer_branch_id,
client_policy_id: client_policy_id,
};
const queryString = objectToQueryString(queryParams);
const apiURL = $('#get-emp-list').attr('href') + "?" + queryString;
console.log(apiURL);
window.location.href = apiURL;
}
function objectToQueryString(obj) {
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
}
function getURLParams()
{
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
const startDate = params.get('start_date') || 0; // Default to 0 if not found
const endDate = params.get('end_date') || 0; // Default to 0 if not found
const client_id = params.get('client_id') || 0; // Default to 0 if not found
const insurer_id = params.get('insurer_id') || 0; // Default to 0 if not found
const policy_type_id = params.get('policy_type_id') || 0; // Default to 0 if not found
const date_type = params.get('date_type') || 0; // Default to 0 if not found
const issuer = params.get('issuer') || 0; // Default to 0 if not found
const client_branch_id = params.get('client_branch_id') || 0; // Default to 0 if not found
const insurer_branch_id = params.get('insurer_branch_id') || 0; // Default to 0 if not found
const client_policy_id = params.get('client_policy_id') || 0; // Default to 0 if not found
hideDateField(date_type)
console.log('startDate', startDate)
console.log('endDate', endDate)
console.log('client_id', client_id)
console.log('insurer_id', insurer_id)
console.log('policy_type_id', policy_type_id)
console.log('date_type', date_type)
console.log('issuer', issuer)
console.log('client_branch_id', client_branch_id)
console.log('insurer_branch_id', insurer_branch_id)
console.log('client_policy_id', client_policy_id)
// Log the values or use them as needed
console.log('Start Date:', startDate);
console.log('End Date:', endDate);
if (startDate != 0 && endDate != 0) {
setTimeout(function(){
$('#start_date').val(startDate)
$('#end_date').val(endDate)
$('#client_id').val(client_id).change()
$('#insurer_id').val(insurer_id).change()
$('#policy_type_id').val(policy_type_id).change()
$('#date_type').val(date_type)
$('#issuer').val(issuer)
setTimeout(function(){
$('#client_branch_id').val(client_branch_id).change()
$('#insurer_branch_id').val(insurer_branch_id).change()
setTimeout(function(){
$('#client_policy_id').val(client_policy_id).change();
}, 1000);
}, 2000)
},2000)
}
}
$(function() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
// Get start and end dates from URL parameters, or use default values
const startDateParam = params.get('start_date') || moment().subtract(29, 'days').format('DD-MM-YYYY');
const endDateParam = params.get('end_date') || moment().format('DD-MM-YYYY');
// Parse the dates to moment objects
var start = moment(startDateParam, 'DD-MM-YYYY');
var end = moment(endDateParam, 'DD-MM-YYYY');
// var start = moment().subtract(29, 'days');
// var end = moment();
function cb(start, end) {
$('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
$('#startDate').val(start.format('DD-MM-YYYY'));
$('#endDate').val(end.format('DD-MM-YYYY'));
}
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
locale: { format: 'DD-MM-YYYY' },
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month')
.endOf('month')
]
}
}, cb);
cb(start, end);
$('#clear-filters').on('click', function() {
// Reset all select dropdowns to the first option
$('#client_id').val('0').change();
$('#insurer_id').val('0').change();
$('#policy_type_id').val('0').change();
$('#date_type').val('0');
$('#issuer').val('0');
$('#date_div').hide()
// Reset the date range picker to default
$('#reportrange').data('daterangepicker').setStartDate(moment().subtract(29, 'days'));
$('#reportrange').data('daterangepicker').setEndDate(moment());
cb(start, end); // Update the displayed date range
});
});
function hideDateField(input = null) {
let val = $('#date_type').val();
if (input) {
val = input;
}
if (val != 0) {
$('#date_div').show()
} else {
$('#date_div').hide()
}
}
function sendPolicyTransactionID(event, pt_id) {
event.preventDefault(); // Prevent default action
console.log(pt_id);
var queryParams = {
pt_id: pt_id,
};
const queryString = objectToQueryString(queryParams);
const apiURL = $('#get-policy-list').attr('href') + "?" + queryString;
console.log(apiURL);
window.location.href = apiURL;
}
// -------------------------------------------------------------------------------------------------
//featch client, client branch, insurer, insurer branch and client policy list data
function getClientAndBranchAndPolicy()
{
$.ajax({
url: '<?= base_url("/util/getClientAndBranchAndPolicy") ?>',
type: "GET",
dataType: 'json',
success: function(res) {
console.log('getClientAndBranchAndPolicy', res);
if(res.status == true){
client_list = res.client_data;
branch_list = res.branch_data;
policy_list = res.policy_data;
insurer_list = res.insurer_data;
insurer_branch_list = res.insurer_branch_data;
appendClients(res.client_data);
appendInsurer(res.insurer_data);
}else{
console.log('No data found');
}
},
error: function(xhr, status, error) {
console.error(xhr.responseText);
console.error(status, error);
>>>>>>> 3e7d3426 (FIX_XL button and Search)
} }
}); });

View File

@ -48,10 +48,10 @@
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap"> <table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th>S.No</th> <th>S.No&nbsp;</th>
<th>Docs Name</th> <th>Docs Name&nbsp;</th>
<th>File Name</th> <th>File Name&nbsp;</th>
<th>Action</th> <th>Action&nbsp;</th>
</tr> </tr>
</thead> </thead>
<tbody id="vehicle_table_bd"> <tbody id="vehicle_table_bd">

View File

@ -74,27 +74,27 @@ table.dataTable tbody td {
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap"> <table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th class="font-weight-medium">S.No.</th> <th class="font-weight-medium">S.No&nbsp;</th>
<th class="font-weight-medium">Owner Type</th> <th class="font-weight-medium">Owner Type&nbsp;</th>
<th class="font-weight-medium">Owner Name</th> <th class="font-weight-medium">Owner Name&nbsp;</th>
<th class="font-weight-medium">RC Book No</th> <th class="font-weight-medium">RC Book No&nbsp;</th>
<th class="font-weight-medium">Vehicle No</th> <th class="font-weight-medium">Vehicle No&nbsp;</th>
<th class="font-weight-medium">Vehicle type</th> <th class="font-weight-medium">Vehicle type&nbsp;</th>
<th class="font-weight-medium">Description</th> <th class="font-weight-medium">Description&nbsp;</th>
<th class="font-weight-medium">Action</th> <th class="font-weight-medium">Action&nbsp;</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php foreach($vehicle_Master_Data as $index => $row){ ?> <?php foreach($vehicle_Master_Data as $index => $row){ ?>
<tr> <tr>
<td><?php echo $index+1; ?></td> <td class="text-center"><?php echo $index+1; ?></td>
<td><?php echo $row['owner_type']; ?></td> <td><?php echo $row['owner_type'] ?: 'N/A'; ?></td>
<td><?php echo $row['owner_name']; ?></td> <td><?php echo $row['owner_name'] ?: 'N/A'; ?></td>
<td><?php echo $row['rc']; ?></td> <td><?php echo $row['rc'] ?: 'N/A'; ?></td>
<td><?php echo $row['vehicle_no']; ?></td> <td><?php echo $row['vehicle_no'] ?: 'N/A'; ?></td>
<td><?php echo $row['vehicle_type']; ?></td> <td><?php echo $row['vehicle_type'] ?: 'N/A'; ?></td>
<td><?php echo $vehicle_des[$row['description']] ?? ""; ?></td> <td><?php echo $vehicle_des[$row['description']] ?? "N/A"; ?></td>
<td> <td>
<div class="btn-group dropdown"> <div class="btn-group dropdown">
<a href="javascript: void(0);" <a href="javascript: void(0);"
@ -508,6 +508,14 @@ $(document).ready(function() {
] ]
} }
], ],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, paging: true,
pageLength: 25, pageLength: 25,
order: [[0, 'desc']] order: [[0, 'desc']]

View File

@ -258,51 +258,101 @@
dom: "<'row'<'col-sm-2'f><'col-sm-10 text-right'B>>" + dom: "<'row'<'col-sm-2'f><'col-sm-10 text-right'B>>" +
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", "<'row'<'col-sm-5'i><'col-sm-7'p>>",
// buttons: [
// {
// text: '+ add',
// className: 'btn btn-primary buttons-html5',
// action: function () {
// var myModal = new bootstrap.Modal(document.getElementById('addTransactionModal'));
// myModal.show();
// }
// }
// ,
// {
// extend: 'csv',
// text: 'CSV',
// title: 'CD TransactionDetails',
// exportOptions: {
// columns: ''
// }
// },
// {
// extend: 'pdf',
// text: 'PDF',
// title: 'TransactionDetails',
// exportOptions: {
// columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
// format: {
// body: function (data, row, column, node) {
// return data.replace(/<.*?>/g, '');
// }
// }
// },
// customize: function (doc) {
// doc.pageOrientation = 'landscape';
// doc.styles.tableHeader.alignment = 'left';
// doc.defaultStyle.alignment = 'left';
// doc.content[1].table.widths = [
// '9%', '9%', '8%', '9%', '10%',
// '9%', '9%', '9%', '9%', '11%', '8%'
// ];
// }
// }
// ],
buttons: [ buttons: [
{ {
text: '+ add', text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
className: 'btn btn-primary buttons-html5', className: 'btn app-btn-primary mr-2',
action: function () { action: function () {
var myModal = new bootstrap.Modal(document.getElementById('addTransactionModal')); var myModal = new bootstrap.Modal(document.getElementById('addTransactionModal'));
myModal.show(); myModal.show();
} }
}
,
{
extend: 'csv',
text: 'CSV',
title: 'CD TransactionDetails',
exportOptions: {
columns: ''
}
}, },
{ {
extend: 'pdf', extend: 'collection',
text: 'PDF', text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
title: 'TransactionDetails', className: 'btn app-btn-secondary ',
exportOptions: { buttons: [
columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], {
format: { extend: 'csv',
body: function (data, row, column, node) { text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
return data.replace(/<.*?>/g, ''); title: 'CD TransactionDetails',
exportOptions: { columns: '' },
className: 'app-btn-primary ',
},
{
extend: 'pdf',
text: 'PDF',
text: '<i class="mdi mdi-file-pdf" ></i><span class=" btn-custom"> EXCEL </span>',
title: 'TransactionDetails',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
format: {
body: function (data, row, column, node) {
return data.replace(/<.*?>/g, '');
}
}
},
customize: function (doc) {
doc.pageOrientation = 'landscape';
doc.styles.tableHeader.alignment = 'left';
doc.defaultStyle.alignment = 'left';
doc.content[1].table.widths = [
'9%', '9%', '8%', '9%', '10%',
'9%', '9%', '9%', '9%', '11%', '8%'
];
} }
} }
}, ]
customize: function (doc) {
doc.pageOrientation = 'landscape';
doc.styles.tableHeader.alignment = 'left';
doc.defaultStyle.alignment = 'left';
doc.content[1].table.widths = [
'9%', '9%', '8%', '9%', '10%',
'9%', '9%', '9%', '9%', '11%', '8%'
];
}
} }
], ],
language: { language: {
search: "_INPUT_", search: `
searchPlaceholder: "Search..." <div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
}, },
ordering: false, ordering: false,
paging: true paging: true

View File

@ -349,7 +349,7 @@
<table id="rfqTable" class="table table-bordered mt-3"> <table id="rfqTable" class="table table-bordered mt-3">
<thead> <thead>
<tr> <tr>
<th class="sticky no-border" style="border-right: 2px solid rgb(0, 123, 255) !important; border-left: 2px solid rgb(0, 123, 255) !important; border-top: 2px solid rgb(0, 123, 255) !important; min-width: 72px !important;"><span class="key_name" style="display: none;">Sno</span><span class="display_name">S.No.</span></th> <th class="sticky no-border" style="border-right: 2px solid rgb(0, 123, 255) !important; border-left: 2px solid rgb(0, 123, 255) !important; border-top: 2px solid rgb(0, 123, 255) !important; min-width: 72px !important;"><span class="key_name" style="display: none;">Sno</span><span class="display_name">S.No&nbsp;</span></th>
<th class="hidden no-border" style="border-right: 2px solid rgb(0, 123, 255) !important;">Item Key</th> <th class="hidden no-border" style="border-right: 2px solid rgb(0, 123, 255) !important;">Item Key</th>
<th class="sticky no-border" style="border-top: 2px solid rgb(0, 123, 255) !important; border-right: 2px solid rgb(0, 123, 255) !important;">Particulars</th> <th class="sticky no-border" style="border-top: 2px solid rgb(0, 123, 255) !important; border-right: 2px solid rgb(0, 123, 255) !important;">Particulars</th>
<th class="sticky no-border" style="background-color: white !important;" contenteditable="false" id="first_proposel_title" ><span class="key_name" style="display: none;">Proposal 1</span><span class="display_name">Proposal Coverage 1</span> <th class="sticky no-border" style="background-color: white !important;" contenteditable="false" id="first_proposel_title" ><span class="key_name" style="display: none;">Proposal 1</span><span class="display_name">Proposal Coverage 1</span>
@ -4714,7 +4714,7 @@ function jsonToTable(json) {
} else { } else {
if(["Sno"].includes(header.parentHeader)){ if(["Sno"].includes(header.parentHeader)){
let snoKeyName = header.parentHeader; let snoKeyName = header.parentHeader;
let snoDisplayName = "S.No."; let snoDisplayName = "S.No";
parentTh.innerHTML = ` <span class="key_name" style="display: none;">${snoKeyName}</span><span class="display_name">${snoDisplayName}</span>`; parentTh.innerHTML = ` <span class="key_name" style="display: none;">${snoKeyName}</span><span class="display_name">${snoDisplayName}</span>`;
}else{ }else{
parentTh.innerText = header.parentHeader; parentTh.innerText = header.parentHeader;