CHANGE_new_theme_ui_fixes - VADIVEL J 2025-09-29

This commit is contained in:
vadivelJ96 2025-09-29 15:07:31 +05:30
commit 69a6d819cc
29 changed files with 2004 additions and 2309 deletions

View File

@ -137,8 +137,6 @@ class ThzController extends BaseController
public function ticketList() public function ticketList()
{ {
$data['tab_name'] = "Tickets";
$data['page_name'] = "Tickets";
try { try {
$returnType = strtolower($this->request->getGet('return_type') ?? 'api'); $returnType = strtolower($this->request->getGet('return_type') ?? 'api');
@ -166,7 +164,8 @@ class ThzController extends BaseController
// 3,4 remain person varannum. // 3,4 remain person varannum.
$data['client_list'] = $this->clientModel->getCreatedByUserName(); $data['client_list'] = $this->clientModel->getCreatedByUserName();
$data['ticket_type'] = $this->thzTypeModel->where('is_active', 1)->findAll(); $data['ticket_type'] = $this->thzTypeModel->where('is_active', 1)->findAll();
$data['tab_name'] = "Tickets";
$data['page_name'] = "Tickets";
return $this->loadLayout('thz_list', $data); return $this->loadLayout('thz_list', $data);
} }
@ -362,6 +361,9 @@ class ThzController extends BaseController
$result['ticket_type'] = $this->thzTypeModel->where('is_active', 1)->findAll(); $result['ticket_type'] = $this->thzTypeModel->where('is_active', 1)->findAll();
$result['tab_name'] = "Tickets";
$result['page_name'] = "Tickets";
return $this->loadLayout('thz_notes', $result); return $this->loadLayout('thz_notes', $result);
} }
} }

View File

@ -886,7 +886,7 @@ table.dataTable tbody td {
} }
], ],
paging: true, paging: true,
pageLength: 25, pageLength: 10,
language: { language: {
search: ` search: `
<div class="datatable-search-wrapper"> <div class="datatable-search-wrapper">

View File

@ -109,7 +109,7 @@
// ], // ],
buttons: [ buttons: [
{ {
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Create New Ticket </span>', text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
className: 'btn app-btn-primary mr-2', className: 'btn app-btn-primary mr-2',
action: function(e, dt, node, config) { action: function(e, dt, node, config) {
openTicket(); openTicket();

View File

@ -393,7 +393,7 @@
searchPlaceholder: "Search" searchPlaceholder: "Search"
}, },
paging: true, paging: true,
pageLength: 25, pageLength: 10,
ordering: false ordering: false
}); });
} else { } else {

View File

@ -260,7 +260,7 @@ table.dataTable thead th {
searchPlaceholder: "Search" searchPlaceholder: "Search"
}, },
paging: true, paging: true,
pageLength: 25, pageLength: 10,
order: [[0, 'desc']] order: [[0, 'desc']]
// scrollX: true, // scrollX: true,
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +

View File

@ -311,8 +311,8 @@ $(document).ready(function()
} }
}, },
{ {
text: '+ Create New Client', text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
className: 'btn-filter app-btn-primary buttons-html5', // custom class className: 'btn app-btn-primary mr-2',
action: function(e, dt, node, config) { action: function(e, dt, node, config) {
addClient(); addClient();
} }

View File

@ -196,7 +196,7 @@
] ]
}], }],
paging: true, paging: true,
pageLength: 25, pageLength: 10,
order: [ order: [
[0, 'desc'] [0, 'desc']
] ]

View File

@ -36,6 +36,7 @@
</div> </div>
</div> </div>
<div id="collapseOne">
<div id="file_table" class="card"> <div id="file_table" class="card">
<div class="card-body"> <div class="card-body">
<div class="row" style="padding-bottom: 10px;"> <div class="row" style="padding-bottom: 10px;">
@ -45,7 +46,7 @@
</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 nowrap"> <table data-custom-table-css="second-table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th>S.No&nbsp;</th> <th>S.No&nbsp;</th>
@ -63,6 +64,7 @@
</div><!-- end col --> </div><!-- end col -->
</div> </div>
</div> </div>
</div>
<script> <script>

View File

@ -598,7 +598,7 @@
"<'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: [{
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Create New Ticket </span>', text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
className: 'btn app-btn-primary mr-2', className: 'btn app-btn-primary mr-2',
action: function(e, dt, node, config) { action: function(e, dt, node, config) {
openTicket(); openTicket();

View File

@ -393,7 +393,7 @@ $(document).ready(function () {
searchPlaceholder: "Search" searchPlaceholder: "Search"
}, },
paging: true, paging: true,
pageLength: 25, pageLength: 10,
ordering: false ordering: false
}); });
} else { } else {

View File

@ -106,7 +106,7 @@ $(document).ready(function () {
searchPlaceholder: "Search..." searchPlaceholder: "Search..."
}, },
paging: true, paging: true,
pageLength: 25, pageLength: 10,
ordering: false, ordering: false,
buttons: [ buttons: [
{ {

View File

@ -356,11 +356,7 @@
// 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: [{

View File

@ -217,21 +217,6 @@
<i class="mdi mdi-magnify datatable-search-icon"></i> <i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`, </div>`,
searchPlaceholder: "Search" searchPlaceholder: "Search"
>>>>>>> 3e7d3426 (FIX_XL button and Search)
},
{
text: 'ADD',
className: 'btn btn-color',
action: function() {
window.location.href = "<?= base_url("master/insurer/create"); ?>";
}
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
}, },
paging: true, paging: true,
}); });

View File

@ -140,10 +140,6 @@
min-height: 100vh !important; min-height: 100vh !important;
} }
body[data-sidebar-size=condensed] .left-side-menu #sidebar-menu>ul>li>a i{
margin :0 px !important;
}
body .content-page { body .content-page {
margin-top: 90px !important; margin-top: 90px !important;
} }
@ -271,7 +267,7 @@
padding: 0 !important; padding: 0 !important;
height: 90% !important; height: 90% !important;
display: flex; display: flex;
flex-flow: column nowrap; flex-flow: column wrap;
} }
/* every <li> inside should be allowed to shrink */ /* every <li> inside should be allowed to shrink */
@ -291,6 +287,7 @@
min-height: 43px !important; min-height: 43px !important;
} }
.li-seperate { .li-seperate {
margin: 10px 0px; margin: 10px 0px;
} }
@ -303,16 +300,8 @@
padding: 8px !important; padding: 8px !important;
min-height: 43px !important; min-height: 43px !important;
} }
.li-seperate a img
{
margin-left:4px !important;
}
</style> </style>
<!-- rightbar --> <!-- rightbar -->
<style> <style>
.right-bar { .right-bar {
@ -346,12 +335,7 @@
#main_tile, #main_tile,
#mainMenuTiles { #mainMenuTiles {
font-size: 25px !important; font-size: 25px !important;
font-weight: 500 !important; font-weight: 600 !important;
color: #000 !important;
}
.chevron-left-dash{
color:#000;
} }
@ -471,23 +455,17 @@
font-size: 12px; font-size: 12px;
} }
.secondary-title {
.title-text { margin-left: 26px;
font-weight: 500; display: flex;
font-style: normal; align-items: center;
font-size: 30px;
line-height: 1;
letter-spacing: 0;
color: black;
} }
.sub-title-text { .secondary-title i {
font-weight: 500; font-size: 43px;
font-style: normal; }
font-size: 18px; .secondary-title span {
line-height: 1; position: relative;
letter-spacing: 0;
color: black;
} }
.font-color-black { .font-color-black {
@ -813,7 +791,7 @@
background: #FFFFFF !important; background: #FFFFFF !important;
padding: 12px; padding: 12px;
border-top: 0px solid #fff !important; border-top: 0px solid #fff !important;
border-bottom: 2px solid #F5FFFF !important; border-bottom: 2px solid #F0F0F0 !important;
font-weight: 400 !important; font-weight: 400 !important;
} }
</style> </style>
@ -1343,7 +1321,8 @@
<style> <style>
.card #collapseOne .card-body, .card #collapseOne .card-body,
.card #collapseTwo .card-body, .card #collapseTwo .card-body,
.card #collapseThree .card-body { .card #collapseThree .card-body,
.card #collapseFour .card-body {
background-color: #F5FFFF !important; background-color: #F5FFFF !important;
border: 2px solid #F5FFFF; border: 2px solid #F5FFFF;
border-radius: 10px; border-radius: 10px;
@ -1361,7 +1340,11 @@
.card #collapseThree .card-body input, .card #collapseThree .card-body input,
.card #collapseThree .card-body select, .card #collapseThree .card-body select,
.card #collapseThree .card-body textarea { .card #collapseThree .card-body textarea,
.card #collapseFour .card-body input,
.card #collapseFour .card-body select,
.card #collapseFour .card-body textarea {
background-color: #ffff !important; background-color: #ffff !important;
border-radius: 10px !important; border-radius: 10px !important;
box-shadow: 0px 2px 4px 0px #00000024 !important; box-shadow: 0px 2px 4px 0px #00000024 !important;
@ -1370,7 +1353,8 @@
.card #collapseOne .card-body input[type='file'], .card #collapseOne .card-body input[type='file'],
.card #collapseTwo .card-body input[type='file'], .card #collapseTwo .card-body input[type='file'],
.card #collapseThree .card-body input[type='file'] { .card #collapseThree .card-body input[type='file'],
.card #collapseFour .card-body input[type='file'] {
padding: 10px !important; padding: 10px !important;
background-color: white !important; background-color: white !important;
color: black !important; color: black !important;
@ -1379,7 +1363,8 @@
/* Apply to Select2 (single select) */ /* Apply to Select2 (single select) */
.card #collapseOne .card-body .select2-container .select2-selection--single, .card #collapseOne .card-body .select2-container .select2-selection--single,
.card #collapseTwo .card-body .select2-container .select2-selection--single, .card #collapseTwo .card-body .select2-container .select2-selection--single,
.card #collapseThree .card-body .select2-container .select2-selection--single { .card #collapseThree .card-body .select2-container .select2-selection--single,
.card #collapseFour .card-body .select2-container .select2-selection--single {
background-color: #ffff !important; background-color: #ffff !important;
border-radius: 10px !important; border-radius: 10px !important;
box-shadow: 0px 2px 4px 0px #00000024 !important; box-shadow: 0px 2px 4px 0px #00000024 !important;
@ -1393,7 +1378,8 @@
/* Apply to Select2 (multiple select) */ /* Apply to Select2 (multiple select) */
.card #collapseOne .card-body .select2-container .select2-selection--multiple, .card #collapseOne .card-body .select2-container .select2-selection--multiple,
.card #collapseTwo .card-body .select2-container .select2-selection--multiple, .card #collapseTwo .card-body .select2-container .select2-selection--multiple,
.card #collapseThree .card-body .select2-container .select2-selection--multiple { .card #collapseThree .card-body .select2-container .select2-selection--multiple,
.card #collapseFour .card-body .select2-container .select2-selection--multiple {
background-color: #ffff !important; background-color: #ffff !important;
border-radius: 10px !important; border-radius: 10px !important;
box-shadow: 0px 2px 4px 0px #00000024 !important; box-shadow: 0px 2px 4px 0px #00000024 !important;
@ -1686,8 +1672,7 @@
<li class="menu-logo"> <li class="menu-logo">
<a href="<?= base_url('/dashboard/view') ?>"> <a href="<?= base_url('/dashboard/view') ?>">
<img src="<?= base_url() . "public"; ?>/assets/images/Nhance_Favi.png" <img src="<?= base_url() . "public"; ?>/assets/images/Nhance_Favi.png" alt="Logo">
style="margin-left:2px;" alt="Logo">
</a> </a>
</li> </li>
@ -1695,7 +1680,7 @@
<li class="li-seperate" id="dashboard-li"> <li class="li-seperate" id="dashboard-li">
<a href="<?= base_url('/dashboard/view') ?>" class="img-inactive"> <a href="<?= base_url('/dashboard/view') ?>" class="img-inactive">
<i class="ri-dashboard-line" style="color:black; margin:4px;"></i> <i class="ri-dashboard-line" style="color:black;"></i>
<span style="color: #02a8b5;"> Dashboard </span> <span style="color: #02a8b5;"> Dashboard </span>
</a> </a>
</li> </li>
@ -1705,7 +1690,7 @@
<li class="li-seperate" id="clients-li"> <li class="li-seperate" id="clients-li">
<a href="<?= base_url('/client/list') ?>" class="img-inactive"> <a href="<?= base_url('/client/list') ?>" class="img-inactive">
<img style="border-radius: 5px;" <img style="border-radius: 5px;"
src="<?= base_url() . "public"; ?>/assets/images/clients_sb.png" alt="Logo" height="20"> src="<?= base_url() . "public"; ?>/assets/images/clients_sb.png" alt="Logo" height="24">
<span> Clients </span> <span> Clients </span>
</a> </a>
</li> </li>

View File

@ -454,7 +454,7 @@ document.addEventListener("DOMContentLoaded", function () {
searchPlaceholder: "Search" searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional) pageLength: 10, // Set default number of rows per page (optional)
// ordering: false, // ordering: false,
}); });
} else { } else {

View File

@ -225,114 +225,6 @@
<script> <script>
<<<<<<< HEAD
$(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
=======
$(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() {
// 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() { $(document).ready(function() {
var ticketsTable = $('#scroll-horizontal-datatable'); var ticketsTable = $('#scroll-horizontal-datatable');

View File

@ -202,7 +202,6 @@
<!-- 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 id="accordion_2" class="mb-0"> <div id="accordion_2" class="mb-0">
<label id="policyAccordion" class="m-1 d-flex justify-content-between align-items-center"> <label id="policyAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Endorsement</span> <span class="font-color-black">Endorsement</span>
@ -349,12 +348,8 @@
</div> </div>
</div> </div>
</div> </div>
<!-- </div> -->
</div> </div>
</div>
<!-- Premium Details --> <!-- Premium Details -->
<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">
@ -531,8 +526,8 @@
</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 mt-3 m-b-0" id="submitButton">
@ -1742,8 +1737,10 @@ function addInsurerColumn() {
// Update header // Update header
$('#insurerTable thead tr').append(` $('#insurerTable thead tr').append(`
<th> <th>
<span style="display:flex; justify-content:space-between; align-items:center;">
Insurer ${insurerCount} Insurer ${insurerCount}
${insurerCount > 1 ? `<a class="text-danger mdi mdi-delete delete-insurer" data-count="${insurerCount}" style="margin-left: 135px;"></a>` : ''} ${insurerCount > 1 ? `<a class="text-danger mdi mdi-delete delete-insurer" data-count="${insurerCount}" style="margin-left: 135px;"></a>` : ''}
</span>
</th> </th>
`); `);

View File

@ -296,14 +296,14 @@ table.dataTable thead th {
<div class="col-12" id="endorsement_list"> <div class="col-12" id="endorsement_list">
<div class="card"> <div class="card">
<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>
<!-- <div class="col-3" id="status_change" style="text-align: right; position: relative;top: 56px; left: 291px;"> <div class="col-3">
<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>
</div><!-- row --> </div> -->
<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>
@ -326,19 +326,19 @@ table.dataTable thead th {
<tbody> <tbody>
<?php foreach ($endorsement_data_list as $index => $row) { ?> <?php foreach ($endorsement_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><!-- Issuer --> <td><?php echo $issuer[$row['issuer']] ?: 'N/A'; ?></td><!-- Issuer -->
<td><?php echo $row['client_short_name']; ?></td><!-- Client --> <td><?php echo $row['client_short_name'] ?: 'N/A'; ?></td><!-- Client -->
<td><?php echo $row['client_branch_name']; ?></td><!-- Branch --> <td><?php echo $row['client_branch_name'] ?: 'N/A'; ?></td><!-- Branch -->
<td><?php echo $row['insurer_short_name']; ?></td><!-- Insurer --> <td><?php echo $row['insurer_short_name'] ?: 'N/A'; ?></td><!-- Insurer -->
<td><?php echo $row['policy_type']; ?></td><!-- Policy --> <td><?php echo $row['policy_type'] ?: 'N/A'; ?></td><!-- Policy -->
<td><?php echo $action_type[$row['action_type']]; ?></td> <td><?php echo $action_type[$row['action_type']] ?: 'N/A';?></td>
<td><?php echo $row['endorsement_no']; ?></td> <td><?php echo $row['endorsement_no'] ?: 'N/A'; ?></td>
<td><?php echo empty($row['data_received_date']) ? '' : date('d/m/Y', strtotime($row['data_received_date'])); ?></td> <td><?php echo empty($row['data_received_date']) ? 'N/A' : date('d/m/Y', strtotime($row['data_received_date'])); ?></td>
<td class="right-align-input"><?php echo $row['emp_count']; ?></td> <td class="right-align-input"><?php echo $row['emp_count'] ?: '0'; ?></td>
<td class="right-align-input"><?php echo $row['dependent_count']; ?></td> <td class="right-align-input"><?php echo $row['dependent_count'] ?: '0'; ?></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']) ? 'N/A' : date('d/m/Y', strtotime($row['policy_issue_date'])); ?></td>
<td><?php echo $policy_status[$row['status']]; ?></td> <td><?php echo $policy_status[$row['status']] ?: '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>
@ -487,22 +487,34 @@ table.dataTable thead th {
if (ticketsTable.length) { if (ticketsTable.length) {
ticketsTable.DataTable({ ticketsTable.DataTable({
scrollX: true, scrollX: true,
dom: "<'row'<'col-sm-6'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right dom: "<'row'<'col-sm-1'f><'col-sm-11 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: [
{
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();
},
attr: { id: 'btnAdd' }
},
{
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-Endorsement-List', title: 'Policy-Tranction-Endorsement-List',
exportOptions: { exportOptions: {
columns: ':not(:last-child)' columns: ':not(:last-child)'
}, },
}] }
}], ]
}
],
language: { language: {
search: ` search: `
<div class="datatable-search-wrapper"> <div class="datatable-search-wrapper">
@ -512,12 +524,13 @@ table.dataTable thead th {
searchPlaceholder: "Search" searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional) pageLength: 10, // Set default number of rows per page (optional)
ordering: false, ordering: false,
}); });
} else { } else {
console.error("Table not found."); console.error("Table not found.");
} }
$('#btnAdd').wrap('<div id="status_change"></div>');
}); });
// Date document ready // Date document ready

View File

@ -141,6 +141,22 @@
font-size: 24px; font-size: 24px;
} }
/** 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="tab-pane fade active show" id="form"> <div class="tab-pane fade active show" id="form">
@ -184,15 +200,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 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">
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
</a> </a>
</h4> </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">
<label for="email"> Policy Type <span class="text-danger">*</span></label> <label for="email"> Policy Type <span class="text-danger">*</span></label>
@ -284,6 +303,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@ -297,16 +317,18 @@
<!-- Pre sales Row --> <!-- Pre sales Row -->
<div class="row" id="pre_sales_row"> <div class="row" id="pre_sales_row">
<div class="col-md-12"> <div class="col-md-12">
<div class="form-section">
<div id="accordion_1" class="mb-0">
<div class="card mb-0">
<h4 class="m-1">Pre Sales
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseTwo" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h4>
<div id="collapseTwo" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion_1">
<div id="accordion_1" class="mb-0">
<label id="policyAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Pre Sales</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-1">
<div id="collapseTwo" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion_1">
<div class="card-body">
<div class="row" id="policyholdernamediv" style="display: none;"> <div class="row" id="policyholdernamediv" style="display: none;">
<div class="form-group col-md-3"> <div class="form-group col-md-3">
<label for="bp_igst">Policyholder Name</label> <label for="bp_igst">Policyholder Name</label>
@ -498,21 +520,25 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- sales Row --> <!-- sales Row -->
<div class="row" id="sales_row" style="display: none;"> <div class="row" id="sales_row" style="display: none;">
<div class="col-md-12"> <div class="col-md-12">
<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">Sales <span class="font-color-black">Sales</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">
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
</a> </a>
</h4> </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="base_policy_id" style="display: none;"> <div class="form-group col-md-3" id="base_policy_id" style="display: none;">
@ -652,20 +678,27 @@
</div> </div>
</div> </div>
<hr> </div>
</div>
</div>
</div> <!-- accordion_2 div closed here -->
</div><!-- 1st col-md-12 div closed here -->
<!-- Premium Details --> <!-- Premium Details -->
<div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="form-section">
<div id="accordion_3" class="mb-0"> <div id="accordion_3" 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">Premium Details <span class="font-color-black">Premium Details</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseFour" aria-expanded="true"> <a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseFour"
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i> aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
</a> </a>
</h4> </label>
<div class="card mb-0">
<div id="collapseFour" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion_3"> <div id="collapseFour" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion_3">
<div class="card-body">
<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">
<!-- <label for="setInsurerCount">Insurer Count : </label> --> <!-- <label for="setInsurerCount">Insurer Count : </label> -->
@ -681,7 +714,7 @@
</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>Premium Details</th>
@ -821,22 +854,18 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div> <!-- insurerTableContainer div closed here-->
</div> </div>
</div> <!-- collapseFour div closed here -->
</div> </div>
</div> </div> <!-- accordion_3 div closed here -->
</div> </div> <!-- 2nd col-md-12 closed here -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="form-group text-right m-b-0" id="submitButton"> </div> <!-- sales_row div closed here -->
<div class="form-group text-right mt-1 m-b-0" id="submitButton">
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" <button type="submit" class="btn btn-primary waves-effect waves-light mr-1"
id="btnSubmit">Submit</button> id="btnSubmit">Submit</button>
</div> </div>
@ -4086,8 +4115,10 @@
// Update header // Update header
$('#insurerTable thead tr').append(` $('#insurerTable thead tr').append(`
<th> <th>
<span style="display:flex; justify-content:space-between; align-items:center;">
Insurer ${insurerCount} Insurer ${insurerCount}
${insurerCount > 1 ? `<a data-count="${insurerCount}" class="text-danger mdi mdi-delete delete-insurer" style="margin-left: 135px;"></a>` : ''} ${insurerCount > 1 ? `<a data-count="${insurerCount}" class="text-danger mdi mdi-delete delete-insurer" style="margin-left: 135px;"></a>` : ''}
</span>
</th> </th>
`); `);

View File

@ -27,8 +27,7 @@
} }
.column-header { .column-header {
margin-right: 10px; margin-right: 10px; /* Adjust this value as needed */
/* Adjust this value as needed */
} }
.form-section { .form-section {
@ -46,7 +45,6 @@
.addbtnStyle{ .addbtnStyle{
margin-left: 20px !important; margin-left: 20px !important;
} }
.custom-dropdown-menu { .custom-dropdown-menu {
display: none; display: none;
position: absolute; position: absolute;
@ -135,10 +133,20 @@
.slider.round:before { .slider.round:before {
border-radius: 50%; border-radius: 50%;
} }
#inception_filter{
margin-bottom:-20px !important;
margin-left:30px !important;
}
#inception_list{
margin-left:20px !important;
}
</style> </style>
<div class="col-12" id="inception_filter"> <div class="row" id="inception_filter">
<div class="card-body"> <div class="col-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">
@ -153,7 +161,7 @@
<div class="form-group"> <div class="form-group">
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-3">
<label for="client_branch">Client<span class="text-danger"></span></label> <label for="client_branch">Client<span class="text-danger"></span></label>
<select class="form-control" id="client_id_for_search" name="client_id" > <select class="form-control" id="client_id_for_search" name="client_id" >
<option value="0">Select Client</option> <option value="0">Select Client</option>
@ -167,7 +175,7 @@
</select> </select>
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-3">
<label for="addon_policy"> Insurer <span id="base_danger" class="text-danger"></span></label> <label for="addon_policy"> Insurer <span id="base_danger" class="text-danger"></span></label>
<select class="form-control" id="insurer_id_for_search" name="insurer_id" > <select class="form-control" id="insurer_id_for_search" name="insurer_id" >
<option value="0" selected>Select Insurer</option> <option value="0" selected>Select Insurer</option>
@ -177,7 +185,7 @@
</select> </select>
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-3">
<label for="email"> Policy Type <span class="text-danger"></span></label> <label for="email"> Policy Type <span class="text-danger"></span></label>
<select class="form-control" id="policy_type_for_search" name="policy_type_id" > <select class="form-control" id="policy_type_for_search" name="policy_type_id" >
<option value="0">Select Policy Type</option> <option value="0">Select Policy Type</option>
@ -205,7 +213,7 @@
</select> </select>
</div> --> </div> -->
<div class="form-group col-md-4"> <div class="form-group col-md-3">
<label for="email"> Status <span class="text-danger"></span></label> <label for="email"> Status <span class="text-danger"></span></label>
<select class="form-control" id="policy_status_for_search" name="policy_type_id" > <select class="form-control" id="policy_status_for_search" name="policy_type_id" >
<option value="0">Select Status</option> <option value="0">Select Status</option>
@ -219,7 +227,13 @@
</select> </select>
</div> </div>
<div class="form-group col-md-4"> </div>
<div class="form-row">
<div class="form-group col-md-3">
<label>Date Type<span class="text-danger"></span></label> <label>Date Type<span class="text-danger"></span></label>
<select class="form-control" id="date_type" name="date_type" onchange="hideDateField()"> <select class="form-control" id="date_type" name="date_type" onchange="hideDateField()">
<option value="0">Select Date Type</option> <option value="0">Select Date Type</option>
@ -233,20 +247,27 @@
</select> </select>
</div> </div>
<div class="form-group col-md-4" style="display: none;" id="date_div"> <div class="form-group col-md-3" style="display: none;" id="date_div">
<label>Date<span class="text-danger"></span></label> <label>Date<span class="text-danger"></span></label>
<div class="input-icon"> <div id="reportrange" class="form-control" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;"> <i class="mdi mdi-calendar-blank"></i>&nbsp;
<i class="mdi mdi-calendar-blank-outline additional-icon"></i> <span></span> <i class="mdi mdi-menu-down"></i>
</div> </div>
<input type="hidden" id="startDate"> <input type="hidden" id="startDate">
<input type="hidden" id="endDate"> <input type="hidden" id="endDate">
</div> </div>
</div> </div>
<div class="form-group text-right m-b-0"> <div class="form-row">
<div class="form-group col-md-12 text-right m-b-0">
<a href="<?= base_url("/policy_tranction/inception/list"); ?>" class="btn btn-secondary" id="clear-filters">Clear</a> <a href="<?= base_url("/policy_tranction/inception/list"); ?>" class="btn btn-secondary" id="clear-filters">Clear</a>
<a href="<?= base_url("/policy_tranction/inception/list"); ?>" class="btn btn-primary" id="get-emp-list" onclick="fetchEmpolyeeList(event);">Submit</a> <a href="<?= base_url("/policy_tranction/inception/list"); ?>" class="btn btn-primary" id="get-emp-list" onclick="fetchEmpolyeeList(event);">Submit</a>
</div> </div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -254,69 +275,39 @@
</div> </div>
</div> </div>
</div> <div class="row" id="inception_list">
<div class="col-12">
<div class="col-12" id="inception_list">
<div class="card"> <div class="card">
<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;">Policy List</h4> <h4 style="position: relative;">Policy List</h4>
</div> </div>
<div class="table-responsive">
<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> -->
</div>
</div>
<div>
<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> <th><div class="column-header">S.No.</div></th>
<div class="column-header">S.No&nbsp;</div> <th><div class="column-header">Issuer</div></th>
</th> <th><div class="column-header">Business Type</div></th>
<th> <th><div class="column-header">Client Type</div></th>
<div class="column-header">Issuer&nbsp;</div> <th><div class="column-header">Client / Branch</div></th>
</th> <th><div class="column-header">Insurer</div></th>
<th> <th><div class="column-header">Policy</div></th>
<div class="column-header">Business Type&nbsp;</div> <th><div class="column-header">Policy No</div></th>
</th> <th><div class="column-header">Policy Issue Date</div></th>
<th> <th><div class="column-header">D.O.C</div></th>
<div class="column-header">Client Type&nbsp;</div> <th><div class="column-header">D.O.E</div></th>
</th> <th><div class="column-header">No of Insured</div></th>
<th> <th><div class="column-header">No of Dependents</div></th>
<div class="column-header">Client / Branch&nbsp;</div> <th><div class="column-header">Status</div></th>
</th> <th><div class="column-header">User</div></th>
<th> <th><div class="column-header">Action</div></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> </tr>
</thead> </thead>
@ -324,24 +315,18 @@
<?php foreach($inception_data_list as $index => $row){ ?> <?php foreach($inception_data_list as $index => $row){ ?>
<tr> <tr>
<td class="text-center"><?php echo $index+1; ?></td> <td class="text-center"><?php echo $index+1; ?></td>
<td><?php echo $issuer[$row['issuer']] ?: 'N/A'; ?></td> <td><?php echo $issuer[$row['issuer']]; ?></td>
<td><?php echo $issuing_type[$row['issue_type']] ?: 'N/A'; ?></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']] ?? 'N/A'; ?></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'] ?: 'N/A'; ?></td> <td><?php echo $row['insurer_short_name'] ?: 'N/A'; ?></td>
<td><?php echo $row['policy_type'] ?: 'N/A'; ?></td> <td><?php echo $row['policy_type'] ?: 'N/A'; ?></td>
<td><?php echo $row['policy_no'] ?: 'N/A'; ?></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']) ? 'N/A' : 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']) ? 'N/A' : 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']) ? 'N/A' : date('d/m/Y', strtotime($row['policy_end_date'])); ?></td>
<!-- <td class="right-align-input"><?php echo $row['emp_count'] ?: 'N/A'; ?></td> <td class="right-align-input"><?php echo $row['emp_count'] ?: '0'; ?></td>
<td class="right-align-input"><?php echo $row['dependent_count'] ?: 'N/A'; ?></td> --> <td class="right-align-input"><?php echo $row['dependent_count'] ?: '0'; ?></td>
<td class="<?= ($row['emp_count'] !== '' && $row['emp_count'] !== null) ? 'right-align-input' : 'text-center'; ?>">
<?= ($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 $policy_status[$row['status']] ?: 'N/A'; ?></td>
<td><?php echo $row['user_name'] ?: 'N/A'; ?></td> <td><?php echo $row['user_name'] ?: 'N/A'; ?></td>
<td> <td>
@ -365,8 +350,7 @@
</div> </div>
</div> </div>
</div><!-- end col --> </div><!-- end col -->
</div>
<!-- end table row --> <!-- end table row -->
@ -399,6 +383,7 @@
</div> </div>
</div> </div>
<script> <script>
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
const table = document.getElementById("tickets-table"); const table = document.getElementById("tickets-table");
@ -478,9 +463,7 @@
activeDropdown.style.display = 'none'; activeDropdown.style.display = 'none';
activeDropdown = null; activeDropdown = null;
} }
}, { }, { once: true });
once: true
});
}); });
}); });
@ -495,6 +478,7 @@
</script> </script>
<script> <script>
var client_list = ''; // local variable for storing the client branch list var client_list = ''; // local variable for storing the client branch list
var branch_list = ''; // local variable for storing the client branch list var branch_list = ''; // local variable for storing the client branch list
var policy_list = ''; // local variable for storing the client policy list var policy_list = ''; // local variable for storing the client policy list
@ -577,32 +561,11 @@
if (ticketsTable.length) { if (ticketsTable.length) {
ticketsTable.DataTable({ ticketsTable.DataTable({
scrollX: true, scrollX: true,
dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right dom: "<'row'<'col-sm-1'f><'col-sm-11 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',
// 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>', text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
className: 'btn app-btn-primary mr-2', className: 'btn app-btn-primary mr-2',
action: function (e, dt, node, config) { action: function (e, dt, node, config) {
@ -613,12 +576,17 @@
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>',
className: 'app-btn-primary ', className: 'app-btn-primary ',
title: 'Policy-Tranction-Inception-List', title: 'Policy-Tranction-Inception-List',
}] exportOptions: {
columns: ':not(:last-child)'
},
}
]
} }
], ],
language: { language: {
@ -630,7 +598,7 @@
searchPlaceholder: "Search" searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional) pageLength: 10, // Set default number of rows per page (optional)
// ordering: false, // ordering: false,
}); });
} else { } else {
@ -709,237 +677,8 @@
//-------------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------------
function hide_list_show_add() { 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');
}
}
});
}
// 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();
}
}
],
language: {
search: "_INPUT_",
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') $('#page_title').text('Add Policy')
$('#inception_form_id')[0].reset(); $('#inception_form_id')[0].reset();
$('#client_id').val('').change().prop('disabled', false); $('#client_id').val('').change().prop('disabled', false);
@ -968,7 +707,8 @@
$('.branchdiv').show(); $('.branchdiv').show();
} }
function show_list_hide_add() { function show_list_hide_add()
{
$('#pt_onboarding').hide() $('#pt_onboarding').hide()
$('#inception_list').show() $('#inception_list').show()
$('#inception_filter').show(); $('#inception_filter').show();
@ -977,7 +717,8 @@
count = 0 count = 0
} }
function getClientAndBranchAndPolicy() { function getClientAndBranchAndPolicy(appendStatus = true)
{
$.ajax({ $.ajax({
url: '<?= base_url("/util/getClientAndBranchAndPolicy") ?>', url: '<?= base_url("/util/getClientAndBranchAndPolicy") ?>',
type: "GET", type: "GET",
@ -985,15 +726,21 @@
success: function(res) { success: function(res) {
console.log('getClientAndBranchAndPolicy', res); console.log('getClientAndBranchAndPolicy', res);
if(res.status == true){ if(res.status == true){
client_list = res.client_data; client_list = res.client_data;
branch_list = res.branch_data; branch_list = res.branch_data;
policy_list = res.policy_data; policy_list = res.policy_data;
vehicle_list = res.vehicle_data; vehicle_list = res.vehicle_data;
unit_list = res.unit_data; unit_list = res.unit_data;
if(appendStatus == true){
appendClients(res.client_data); appendClients(res.client_data);
appendVehicles(res.vehicle_data); appendVehicles(res.vehicle_data);
appendOwner(client_list) // appendOwner(client_list)
}
}else{ }else{
console.log('No data found'); console.log('No data found');
} }
@ -1006,7 +753,8 @@
}); });
} }
function appendClients(data) { function appendClients(data, client_id = null)
{
$('#client_id').empty(); $('#client_id').empty();
$('#client_id').append($('<option>', { $('#client_id').append($('<option>', {
@ -1035,11 +783,16 @@
class: item.client_type == 1 ? 'group' : item.client_type == 2 ? 'individual' : '' class: item.client_type == 1 ? 'group' : item.client_type == 2 ? 'individual' : ''
}); });
if (client_id == item.id) {
option.attr('selected', true);
}
$('#client_id').append(option); $('#client_id').append(option);
}); });
} }
function appendVehicles(data, vehicle_id) { function appendVehicles(data, vehicle_id = null)
{
$('#vehicle_no').empty(); $('#vehicle_no').empty();
$('#vehicle_no').append($('<option>', { $('#vehicle_no').append($('<option>', {
@ -1067,7 +820,8 @@
}); });
} }
function appendBranch(data) { function appendBranch(data, branch_id = null)
{
$('#client_branch_id').empty(); $('#client_branch_id').empty();
@ -1082,11 +836,17 @@
value: item.id, value: item.id,
text: item.branch_name text: item.branch_name
}); });
if (branch_id == item.id) {
option.attr('selected', true);
}
$('#client_branch_id').append(option); $('#client_branch_id').append(option);
}); });
} }
function appendRenewalPolicies(data) { function appendRenewalPolicies(data)
{
console.log('appendRenewalPolicies', data); console.log('appendRenewalPolicies', data);
console.log('appendRenewalPolicies', $('#source_client_policy_id')); console.log('appendRenewalPolicies', $('#source_client_policy_id'));
@ -1199,7 +959,8 @@
// } // }
// } // }
function getPolicyDetailsByPolicyId(input) { function getPolicyDetailsByPolicyId(input)
{
var policy_id = $(input).val() var policy_id = $(input).val()
if(policy_id){ if(policy_id){
@ -1222,7 +983,8 @@
} }
} }
function addHTMLInput(data = null) { function addHTMLInput(data = null)
{
const container = document.getElementById('dynamic-form-container'); const container = document.getElementById('dynamic-form-container');
const newRow = document.createElement('div'); const newRow = document.createElement('div');
newRow.className = 'form-row dynamic-form-row'; newRow.className = 'form-row dynamic-form-row';
@ -1248,7 +1010,8 @@
} }
} }
function removeHTMLInput(element) { function removeHTMLInput(element)
{
const container = document.getElementById('dynamic-form-container'); const container = document.getElementById('dynamic-form-container');
const rows = container.querySelectorAll('.dynamic-form-row'); const rows = container.querySelectorAll('.dynamic-form-row');
@ -1258,7 +1021,8 @@
} }
} }
function appendBasePolicyList(data, select = null) { function appendBasePolicyList(data, select = null)
{
console.log('---------------------------------------------------------------') console.log('---------------------------------------------------------------')
console.log('first') console.log('first')
console.log('---------------------------------------------------------------') console.log('---------------------------------------------------------------')
@ -1281,7 +1045,8 @@
}); });
} }
function appendUnits(data) { function appendUnits(data)
{
$('#units').empty() $('#units').empty()
$('#units').append($('<option>', { $('#units').append($('<option>', {
value: '', value: '',
@ -1305,12 +1070,14 @@
}); });
} }
function fileupload(input) { function fileupload(input)
{
var myModal = new bootstrap.Modal(document.getElementById('file_upload')); var myModal = new bootstrap.Modal(document.getElementById('file_upload'));
myModal.show(); myModal.show();
} }
function logSelectedIds() { function logSelectedIds()
{
var selectedIds = []; var selectedIds = [];
$('.row-select:checked').each(function() { $('.row-select:checked').each(function() {
selectedIds.push($(this).data('id')); selectedIds.push($(this).data('id'));
@ -1320,7 +1087,8 @@
} }
function appendFileTableBody(data) { function appendFileTableBody(data)
{
console.log(data); console.log(data);
$('#table_bd').empty(); $('#table_bd').empty();
@ -1355,7 +1123,8 @@
}); });
} }
function checkInputs() { function checkInputs()
{
let isValid = true; let isValid = true;
// Iterate through each dynamic row // Iterate through each dynamic row
@ -1388,11 +1157,13 @@
return isValid; return isValid;
} }
function validateForm() { function validateForm()
{
return checkInputs(); // Call checkInputs before form submission return checkInputs(); // Call checkInputs before form submission
} }
function addHTMLInputForVehicleFileUpload(data = null) { function addHTMLInputForVehicleFileUpload(data = null)
{
const container = document.getElementById('dynamic-form-container-for-vehicle-file-upload'); const container = document.getElementById('dynamic-form-container-for-vehicle-file-upload');
const newRow = document.createElement('div'); const newRow = document.createElement('div');
newRow.className = 'form-row dynamic-form-row'; newRow.className = 'form-row dynamic-form-row';
@ -1418,7 +1189,8 @@
} }
} }
function appendVehicleFileTableBody(data) { function appendVehicleFileTableBody(data)
{
console.log(data); console.log(data);
// Clear the table body // Clear the table body
@ -1455,7 +1227,8 @@
}); });
} }
function removeHTMLInputForVehicleFileUpload(element) { function removeHTMLInputForVehicleFileUpload(element)
{
const container = document.getElementById('dynamic-form-container-for-vehicle-file-upload'); const container = document.getElementById('dynamic-form-container-for-vehicle-file-upload');
const rows = container.querySelectorAll('.dynamic-form-row'); const rows = container.querySelectorAll('.dynamic-form-row');
@ -1483,24 +1256,39 @@
$('#policy_holder_name').val(client_name); $('#policy_holder_name').val(client_name);
let status = $('#policy_status').val();
if(client_id == 'add_client') { if(client_id == 'add_client') {
if ($('#client_type').val()) { // if($('#client_type').val()){
$('#client_id').val('').change(); // $('#client_id').val('').change();
if ($('#client_type').val() == 2) { // if($('#client_type').val() == 2){
$('#short_name').closest('.form-group').hide(); // $('#short_name').closest('.form-group').hide();
$('#short_name').removeAttr('required'); // $('#short_name').removeAttr('required');
} else { // } else {
$('#short_name').closest('.form-group').show(); // $('#short_name').closest('.form-group').show();
$('#short_name').attr('required', 'required'); // $('#short_name').attr('required', 'required');
} // }
// var myModal = new bootstrap.Modal(document.getElementById('upload_enrollment_model'));
// myModal.show();
// }else{
// $('#client_id').val('').change();
// toastr.warning('Please select the client type', 'WARNING')
// }
appendClientForm();
$(this).val('').select2();
$('#pre_sales_row').hide();
$('#sales_row').hide();
$('#submitButton').hide();
var myModal = new bootstrap.Modal(document.getElementById('upload_enrollment_model'));
myModal.show();
}else{ }else{
$('#client_id').val('').change(); $('#pre_sales_row').show();
toastr.warning('Please select the client type', 'WARNING') $('#submitButton').show();
if(status == "completed"){
$('#sales_row').show();
} }
} }
@ -1739,7 +1527,8 @@
if(policy_list != '' && branch_id != '') { if(policy_list != '' && branch_id != '') {
console.log(policy_list[branch_id]); console.log(policy_list[branch_id]);
let data = policy_list[branch_id]; let data = policy_list[branch_id];
if (issue_type == 2) { if(issue_type == 2)
{
appendRenewalPolicies(data); appendRenewalPolicies(data);
} }
} }
@ -1747,7 +1536,8 @@
//-------------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------------
function formatDateforpolicy(dateStr) { function formatDateforpolicy(dateStr)
{
let dateParts = dateStr.split('-'); let dateParts = dateStr.split('-');
let year = dateParts[0]; let year = dateParts[0];
@ -1760,16 +1550,19 @@
return date; return date;
} }
function onlyNumbers(event) { function onlyNumbers(event)
{
var charcode; var charcode;
charcode = event.which || event.keyCode; charcode = event.which || event.keyCode;
if (charcode >= 48 && charcode <= 57 || charcode == 46) return true; if (charcode >= 48 && charcode <= 57 || charcode == 46) return true;
return false; return false;
} }
</script> </script>
<script> <script>
$(document).ready(function() { $(document).ready(function() {
// getURLParams() // getURLParams()
$('#client_id_for_search').select2(); $('#client_id_for_search').select2();
@ -1777,7 +1570,8 @@
$('#policy_type_for_search').select2(); $('#policy_type_for_search').select2();
}) })
function fetchEmpolyeeList(event) { function fetchEmpolyeeList(event)
{
event.preventDefault(); // Prevent default action event.preventDefault(); // Prevent default action
var start_date = $('#startDate').val(); var start_date = $('#startDate').val();
@ -1810,7 +1604,8 @@
window.location.href = apiURL; window.location.href = apiURL;
} }
function objectToQueryString(obj) { function objectToQueryString(obj)
{
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&'); return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
} }
@ -1876,7 +1671,7 @@
// var end = moment(); // var end = moment();
function cb(start, end) { function cb(start, end) {
$('#reportrange').html(start.format('D/MM/YYYY') + ' - ' + end.format('D/MM/YYYY')); $('#reportrange span').html(start.format('D/MM/YYYY') + ' - ' + end.format('D/MM/YYYY'));
$('#startDate').val(start.format('DD/MM/YYYY')); $('#startDate').val(start.format('DD/MM/YYYY'));
$('#endDate').val(end.format('DD/MM/YYYY')); $('#endDate').val(end.format('DD/MM/YYYY'));
} }
@ -1914,7 +1709,8 @@
}); });
function hideDateField(input = null) { function hideDateField(input = null)
{
let val = $('#date_type').val(); let val = $('#date_type').val();
if(input){ if(input){
@ -1940,9 +1736,7 @@
let url = '<?= base_url('policy_tranction/inception/removePolicyTransaction/') ?>' + pt_id; let url = '<?= base_url('policy_tranction/inception/removePolicyTransaction/') ?>' + pt_id;
// Include `pt_id` in the AJAX request if necessary // Include `pt_id` in the AJAX request if necessary
let requestData = { let requestData = { pt_id: pt_id };
pt_id: pt_id
};
sendAjaxRequestForGlobal(url, 'GET', requestData, function(response) { sendAjaxRequestForGlobal(url, 'GET', requestData, function(response) {
console.log('Data fetched successfully:', response); console.log('Data fetched successfully:', response);
@ -1960,4 +1754,5 @@
} }
}); });
} }
</script> </script>

View File

@ -413,7 +413,7 @@ $(document).ready(function() {
searchPlaceholder: "Search" searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional) pageLength: 10, // Set default number of rows per page (optional)
ordering: false, ordering: false,
"footerCallback": function(row, data, start, end, display) { "footerCallback": function(row, data, start, end, display) {
var api = this.api(); var api = this.api();

View File

@ -193,7 +193,7 @@ $(document).ready(function() {
searchPlaceholder: "Search..." searchPlaceholder: "Search..."
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional) pageLength: 10, // Set default number of rows per page (optional)
ordering: false, ordering: false,
}); });
} else { } else {

View File

@ -16,11 +16,6 @@ table.dataTable tbody td {
position: absolute; position: absolute;
} }
.highlight {
border: 2px solid red;
background-color: #ffe6e6;
}
.column-header { .column-header {
margin-right: 10px; margin-right: 10px;
} }
@ -31,8 +26,6 @@ table.dataTable tbody td {
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
} }
/* Modeal class */
</style> </style>
<style> <style>
@ -44,8 +37,6 @@ table.dataTable tbody td {
</style> </style>
<div class="row" id="ticket_list"> <div class="row" id="ticket_list">
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">
@ -85,8 +76,8 @@ table.dataTable tbody td {
<td class="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) > 18)
? htmlspecialchars(substr($subject, 0, 50)) . "..." ? htmlspecialchars(substr($subject, 0, 18)) . "..."
: htmlspecialchars($subject); : htmlspecialchars($subject);
?> ?>
</td> </td>
@ -334,7 +325,7 @@ 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: [
{ {
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Create New Ticket </span>', text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
className: 'btn app-btn-primary mr-2', className: 'btn app-btn-primary mr-2',
action: function(e, dt, node, config) { action: function(e, dt, node, config) {
openTicket(); openTicket();
@ -350,17 +341,6 @@ table.dataTable tbody td {
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 ', className: 'app-btn-primary ',
title: 'Tickets', title: 'Tickets',
exportOptions: {
format: {
body: function (data, row, column, node) {
// Replace <br> with a space
data = data.replace(/<br\s*\/?>/gi, " ");
// Remove any other HTML tags
data = data.replace(/<[^>]*>?/gm, "");
return data.trim();
}
}
}
}, },
{ {
extend: 'excel', extend: 'excel',
@ -383,7 +363,7 @@ table.dataTable tbody td {
searchPlaceholder: "Search" searchPlaceholder: "Search"
}, },
paging: true, paging: true,
pageLength: 25, pageLength: 10,
order: [[0, 'desc']] order: [[0, 'desc']]
}); });
} else { } else {
@ -428,8 +408,8 @@ table.dataTable tbody td {
var ticketType = document.getElementById('ticket_type').value.trim(); var ticketType = document.getElementById('ticket_type').value.trim();
// Validation checks // Validation checks
if (name === "" || mobile === "" || email === "" || ticketType === "") { if (message.length === 0) {
toastr.warning('Please fill all required fields.', 'Warning'); toastr.error('Message cannot be empty', 'Warning');
form.classList.add('was-validated'); form.classList.add('was-validated');
return; return;
} }
@ -440,6 +420,12 @@ table.dataTable tbody td {
return; return;
} }
if (subject.length === 0) {
toastr.error('Subject cannot be empty', 'Warning');
form.classList.add('was-validated');
return;
}
if (subject.length > 150) { if (subject.length > 150) {
toastr.error('Subject cannot exceed 150 characters', 'Warning'); toastr.error('Subject cannot exceed 150 characters', 'Warning');
form.classList.add('was-validated'); form.classList.add('was-validated');
@ -460,6 +446,12 @@ table.dataTable tbody td {
return; return;
} }
if (name === "" || mobile === "" || email === "" || ticketType === "" || subject === "" || message === "") {
toastr.warning('Please fill all required fields.', 'Warning');
form.classList.add('was-validated');
return;
}
var form = document.getElementById("ticketForm"); // your form ID var form = document.getElementById("ticketForm"); // your form ID
var formData = new FormData(form); var formData = new FormData(form);

View File

@ -1,5 +1,4 @@
<style> <style>
.notes-box { .notes-box {
display: flex; display: flex;
align-items: center; align-items: center;
@ -15,13 +14,12 @@
resize: none; resize: none;
padding: 8px; padding: 8px;
font-size: 14px; font-size: 14px;
} background-color: transparent !important;
textarea {
background-color: white !important;
border-radius: 0px !important; border-radius: 0px !important;
box-shadow: 0px 0px 0px 0px white !important; box-shadow: 0px 0px 0px 0px transparent !important;
border-color: white !important; border-color: transparent !important;
} }
.icon-buttons { .icon-buttons {
display: flex; display: flex;
gap: 6px; gap: 6px;
@ -77,10 +75,12 @@ textarea {
.conversation-card, .conversation-card,
.conversation-card .card-header, .conversation-card .card-header,
.conversation-card .card-body { .conversation-card .card-body {
background: #F5FFFF !important; background: #F5FFFF !important;
} }
.conversation-card{
box-shadow: 0 2px 4px 0 #00000040;
border-radius : 15px !important;
}
.master-card{ .master-card{
border-radius: 15px !important; border-radius: 15px !important;
box-shadow: 0 2px 4px 0 #00000040; box-shadow: 0 2px 4px 0 #00000040;
@ -134,33 +134,24 @@ hr{
} }
</style> </style>
<div class="row" id="notespage">
<h3 class="secondary-title">
<a href="#" onclick="history.back(); return false;">
<i class="mdi mdi-chevron-left" title="Back"></i>
</a>
<span>Ticket ID - <?= $master[0]['thz_id']; ?></span>
</h3>
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">
<div class="card-body maincard"> <div class="card-body">
<!-- Title -->
<div class="row" id="notes-title" style="padding-bottom: 10px;">
<!-- <div class="col-6" style="align-self: center;">
<h4 style="position: relative;"><span onclick="history.back()"><i class="mdi mdi-chevron-left" style="font-size: 24px;"></i></span> Ticket ID-<?php echo $master[0]['thz_id']; ?></h4>
</div> -->
<h4 class="d-flex align-items-center" style="gap: 8px;">
<span onclick="history.back()" style="cursor: pointer;">
<i class="mdi mdi-chevron-left" style="font-size: 43px;"></i>
</span>
<span class="title-text ">Ticket ID-<?= $master[0]['thz_id']; ?></span>
</h4>
</div>
<!-- Body -->
<div class="row" id="notes-body"> <div class="row" id="notes-body">
<!-- Left Details --> <!-- Left Details -->
<div class="col-5" id="notes-body-left"> <div class="col-5" id="notes-body-left">
<div class="card master-card" style="background:#F5FFFF;"> <div class="card master-card" style="background:#F5FFFF; border-radius: 15px;">
<div class="card-header d-flex justify-content-between align-items-center" style="background:none; border:none;"> <div class="card-header d-flex justify-content-between align-items-center" style="background:none; border:none;">
<p class="sub-title-text mb-0">Details</p> <h3 class="mb-0">Details</h3>
<?php if($master[0]['status'] !== "Closed") : ?> <?php if($master[0]['status'] !== "Closed") : ?>
<a href="javascript:void(0);" onclick="openEditTicket()"> <a href="javascript:void(0);" onclick="openEditTicket()">
<i class="mdi mdi-pencil edit-icon" title="Edit"></i> <i class="mdi mdi-pencil edit-icon" title="Edit"></i>
@ -173,22 +164,22 @@ hr{
</a> </a>
<?php endif; ?> <?php endif; ?>
</div> </div>
<div class="card-body card-scroll sub-title-text " style="padding:0 27px !important; background:#F5FFFF;"> <div class="card-body card-scroll " style="padding:0 27px !important; background:#F5FFFF; border-radius: 15px !important;">
<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 font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['thz_id'];?></div> <div class="col-8 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 font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['name'];?></div> <div class="col-8 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 font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['mobile'];?></div> <div class="col-8 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 font-color-black" style="font-weight: 500 !important;"> <div class="col-8 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="font-color-black"> ? '<u class="font-color-black">
<a href="javascript:void(0);" <a href="javascript:void(0);"
@ -205,11 +196,11 @@ 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 font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['assignee_name'];?></div> <div class="col-8 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 font-color-black text-end " style="font-weight: 500 !important;"> <div class="col-8 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="font-color-black"> ? '<u class="font-color-black">
<a href="javascript:void(0);" <a href="javascript:void(0);"
@ -226,19 +217,19 @@ 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 font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['ticket_type'];?></div> <div class="col-8 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 font-color-black text-end " style="font-weight: 500 !important; text-align: justify;"><?= $master[0]['subject'];?></div> <div class="col-8 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 font-color-black text-end " style="font-weight: 500 !important; text-align: justify;"><?= $master[0]['message'];?></div> <div class="col-8 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>
<div class="col-8 app-text text-end " style="font-weight: 500 !important;"> <div class="col-8 text-end " style="font-weight: 500 !important;">
<u class="text-warning"> <u class="text-warning">
<a href="javascript:void(0);" <a href="javascript:void(0);"
class="text-warning" class="text-warning"
@ -256,24 +247,21 @@ hr{
</div> </div>
</div> </div>
</div> </div>
<!-- Right Conversation --> <!-- Right Conversation -->
<div class="col-7" id="notes-body-right">
<div class="col-7">
<!-- Conversation Card --> <!-- Conversation Card -->
<div class="card mb-3 conversation-card"> <div class="card mb-3 conversation-card" style="background:#F5FFFF; border-radius: 15px !important;">
<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; border-radius: 15px !important;">
<p class="sub-title-text font-color-black" >Conversation</p> <h3 class="font-color-black" >Conversation</h3>
</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; border-radius: 15px !important;">
<?php if(!empty($notes)): ?> <?php if(!empty($notes)): ?>
<?php foreach($notes as $i => $conv): ?> <?php foreach($notes as $i => $conv): ?>
<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 font-color-black "> <div class="d-flex justify-content-between align-items-start 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>
@ -321,21 +309,24 @@ hr{
<small id="messageCounter" class="form-text text-muted text-end text-right">0/1500</small> <small id="messageCounter" class="form-text text-muted text-end text-right">0/1500</small>
</form> </form>
</div> </div>
</div> </div>
</div> <!-- /notes-body --> </div>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="modal fade font-color-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"
data-backdrop="static"
data-keyboard="false"
data-bs-backdrop="static"
data-bs-keyboard="false">
<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">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title title-text" id="EditModalLabel" style="font-size:27px !important">Update</h4> <h4 class="modal-title title-text" id="EditModalLabel" style="font-size:27px !important">Update</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true" data-bs-dismiss="modal">×</button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
@ -344,7 +335,7 @@ hr{
<input type="hidden" id="updated_by" name="updated_by" value="<?= get_session_userid(); ?>"> <input type="hidden" id="updated_by" name="updated_by" value="<?= get_session_userid(); ?>">
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<label for="ticket_type" class="sub-title-text ">Ticket Type<span class="text-danger">*</span></label> <label for="ticket_type">Ticket Type<span class="text-danger">*</span></label>
<select class="form-control" id="ticket_type" name="ticket_type" required> <select class="form-control" id="ticket_type" name="ticket_type" required>
<option value="">Select Ticket Type</option> <option value="">Select Ticket Type</option>
<!-- <option value="Sales">Sales</option> <!-- <option value="Sales">Sales</option>
@ -361,7 +352,7 @@ hr{
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<label for="status" class="sub-title-text ">Status</label> <label for="status">Status</label>
<select class="form-control" id="status" name="status"> <select class="form-control" id="status" name="status">
<option value="">Select Status</option> <option value="">Select Status</option>
<option value="Open">Open</option> <option value="Open">Open</option>
@ -375,7 +366,7 @@ hr{
// 2,3,4 dropdown data'va varannum but dropdown hide pannanum --> // 2,3,4 dropdown data'va varannum but dropdown hide pannanum -->
<?php if(in_array(get_role_id(), [1,5]) ) { ?> <?php if(in_array(get_role_id(), [1,5]) ) { ?>
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<label for="assign_to" class="sub-title-text ">Assign To</label> <label for="assign_to">Assign To</label>
<select class="form-control" id="assign_to" name="assign_to"> <select class="form-control" id="assign_to" name="assign_to">
<option value="">Select Assign To</option> <option value="">Select Assign To</option>
<?php if(isset($assignee)) { ?> <?php if(isset($assignee)) { ?>
@ -404,7 +395,7 @@ hr{
<div class="modal-header" style="border-bottom-width:0;"> <div class="modal-header" style="border-bottom-width:0;">
<h4 class="modal-title title-text " style="font-size:27px !important">Related Tickets</h4> <h4 class="modal-title title-text " style="font-size:27px !important">Related Tickets</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true" data-bs-dismiss="modal">×</button>
</div> </div>
<div class="modal-body card-scroll" style="padding-top:5px!important;"> <div class="modal-body card-scroll" style="padding-top:5px!important;">
@ -451,7 +442,7 @@ hr{
<div class="modal-header" style="border-bottom-width:0;"> <div class="modal-header" style="border-bottom-width:0;">
<h4 class="modal-title title-text ">Policy Terms</h4> <h4 class="modal-title title-text ">Policy Terms</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true" data-bs-dismiss="modal">×</button>
</div> </div>
<div class="modal-body card-scroll" style="padding-top:5px!important;"> <div class="modal-body card-scroll" style="padding-top:5px!important;">
@ -476,7 +467,7 @@ hr{
<div class="modal-header" style="border-bottom-width:0;"> <div class="modal-header" style="border-bottom-width:0;">
<h4 class="modal-title title-text ">Status History</h4> <h4 class="modal-title title-text ">Status History</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true" data-bs-dismiss="modal">×</button>
</div> </div>
<div class="modal-body card-scroll history-container" style="padding:5px 11px 11px 11px!important;"> <div class="modal-body card-scroll history-container" style="padding:5px 11px 11px 11px!important;">
@ -486,15 +477,12 @@ hr{
</div> </div>
</div> </div>
<script> <script>
$(document).ready(function() { $(document).ready(function() {
// Initialize select2 // Initialize select2
$("#ticket_type").select2(); $("#ticket_type, #status, #assign_to").select2();
$("#status").select2();
$("#assign_to").select2();
const messageInput = document.getElementById("notes"); const messageInput = document.getElementById("notes");
const messageCounter = document.getElementById("messageCounter"); const messageCounter = document.getElementById("messageCounter");
@ -510,18 +498,33 @@ hr{
} }
}); });
const btn = document.querySelector("button[onclick='submitTicket()']");
$("#ticket_type, #status, #assign_to").on('change', function() {
if (btn.disabled) {
btn.disabled = false;
btn.innerText = "Save";
}
});
}); });
function openEditTicket() { function openEditTicket() {
var form = document.getElementById('ticketForm'); var form = document.getElementById('ticketForm');
form.reset(); form.reset();
form.classList.remove('was-validated'); // remove Bootstrap validation styling
var btn = document.querySelector("button[onclick='submitTicket()']");
btn.disabled = false;
btn.innerText = "Save";
var masterData = <?= json_encode($master[0]); ?>; var masterData = <?= json_encode($master[0]); ?>;
console.log(masterData); console.log(masterData);
$("#edit_thz_id").val(masterData.thz_id); $("#edit_thz_id").val(masterData.thz_id);
// $("#updated_by").val("<?= get_session_userid(); ?>");
$("#ticket_type").val(masterData.ticket_type).trigger("change"); $("#ticket_type").val(masterData.ticket_type).trigger("change");
$("#status").val(masterData.status).trigger("change"); $("#status").val(masterData.status).trigger("change");
$("#assign_to").val(masterData.assign_to).trigger("change"); $("#assign_to").val(masterData.assign_to).trigger("change");
@ -640,11 +643,11 @@ function statusHistory(thzId) {
<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="bg-light"> <thead class="bg-light">
<tr> <tr>
<th class="app-text app-text-white">S.No</th> <th class="app-text-white">S.No</th>
<th class="app-text app-text-white">Old Status</th> <th class="app-text-white">Old Status</th>
<th class="app-text app-text-white">New Status</th> <th class="app-text-white">New Status</th>
<th class="app-text app-text-white">Updated By</th> <th class="app-text-white">Updated By</th>
<th class="app-text app-text-white">Date/Time</th> <th class="app-text-white">Date/Time</th>
</tr> </tr>
</thead> </thead>
<tbody class="app-table-body"> <tbody class="app-table-body">

View File

@ -145,7 +145,7 @@ $(document).ready(function() {
searchPlaceholder: "Search" searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional) pageLength: 10, // Set default number of rows per page (optional)
ordering: false, ordering: false,
}); });
} else { } else {

View File

@ -294,7 +294,7 @@ $(document).ready(function() {
// ], // ],
buttons: [ buttons: [
{ {
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Create New Claim </span>', text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
className: 'btn app-btn-primary mr-2', className: 'btn app-btn-primary mr-2',
action: function(e, dt, node, config) { action: function(e, dt, node, config) {
openTicketTypeAskModal() openTicketTypeAskModal()
@ -332,7 +332,7 @@ $(document).ready(function() {
searchPlaceholder: "Search" searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional) pageLength: 10, // Set default number of rows per page (optional)
ordering: false, ordering: false,
}); });
} else { } else {

View File

@ -273,7 +273,7 @@
searchPlaceholder: "Search" searchPlaceholder: "Search"
}, },
paging: true, // Enable pagination paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional) pageLength: 10, // Set default number of rows per page (optional)
ordering: false, ordering: false,
}); });
} else { } else {

View File

@ -36,6 +36,7 @@
</div> </div>
</div> </div>
<div id="collapseOne">
<div id="vehicle_file_table" class="card"> <div id="vehicle_file_table" class="card">
<div class="card-body"> <div class="card-body">
<div class="row" style="padding-bottom: 10px;"> <div class="row" style="padding-bottom: 10px;">
@ -45,7 +46,7 @@
</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 nowrap"> <table data-custom-table-css="second-table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th>S.No&nbsp;</th> <th>S.No&nbsp;</th>
@ -62,6 +63,7 @@
</div> </div>
</div><!-- end col --> </div><!-- end col -->
</div> </div>
</div>
</div> </div>

View File

@ -517,7 +517,7 @@ $(document).ready(function() {
searchPlaceholder: "Search" searchPlaceholder: "Search"
}, },
paging: true, paging: true,
pageLength: 25, pageLength: 10,
order: [[0, 'desc']] order: [[0, 'desc']]
}); });
}); });