diff --git a/app/Views/batch_list.php b/app/Views/batch_list.php index 96d441b0..c7618915 100755 --- a/app/Views/batch_list.php +++ b/app/Views/batch_list.php @@ -1,4 +1,5 @@ diff --git a/app/Views/client_info.php b/app/Views/client_info.php index aeb052cf..046b78f5 100755 --- a/app/Views/client_info.php +++ b/app/Views/client_info.php @@ -10,11 +10,20 @@ + +
+
+
+
-
- -
- +
@@ -23,14 +32,19 @@

+ + + Client Basic Information - +

@@ -228,8 +242,9 @@
+
+
-
diff --git a/app/Views/client_list.php b/app/Views/client_list.php index 1934afb8..88e26a8c 100755 --- a/app/Views/client_list.php +++ b/app/Views/client_list.php @@ -205,6 +205,10 @@ table.dataTable thead th { Delete + + Open Client Details + +
@@ -257,6 +261,7 @@ table.dataTable thead th { diff --git a/app/Views/employee_data_list.php b/app/Views/employee_data_list.php index f02db90b..15df09cf 100755 --- a/app/Views/employee_data_list.php +++ b/app/Views/employee_data_list.php @@ -91,9 +91,9 @@ if ($emp_show_branch) { $emp_header_labels[] = 'Branch'; } $emp_header_labels = array_merge($emp_header_labels, [ - 'Name', 'EMP Code', 'Relationship', 'Gender', 'Email', 'Mobile', 'Date of Birth', - 'Policy name', 'Insurer name', 'TPA ID', 'Risk ID', 'Policy status', - '(₹)Sum Insured', '(₹)Premium', '(₹)Pro Rata Premium', '(₹)GST', 'Action', + 'Name ', 'EMP Code ', 'Relationship ', 'Gender ', 'Email', 'Mobile', 'Date of Birth', + 'Policy name ', 'Insurer name ', 'TPA ID ', 'Risk ID ', 'Policy status ', + '(₹)Sum Insured ', '(₹)Premium ', '(₹)Pro Rata Premium ', '(₹)GST ', 'Action ', ]); $emp_col_count = count($emp_header_labels); $emp_col_max_len = array_fill(0, $emp_col_count, 0); @@ -157,8 +157,20 @@ if (isset($employees)) { $emp_col_max_len[$emp_col_count - 6] = max($emp_col_max_len[$emp_col_count - 6], mb_strlen('Total')); $emp_col_min_px = array_fill(0, $emp_col_count, 80); $emp_col_max_px = array_fill(0, $emp_col_count, 360); -$emp_col_min_px[0] = 48; -$emp_col_max_px[0] = 72; +$emp_col_min_px[0] = 64; +$emp_col_max_px[0] = 88; + +$emp_dynamic_idx = 1; +if ($emp_show_client_branch || $emp_show_branch) { + $emp_col_min_px[$emp_dynamic_idx] = max($emp_col_min_px[$emp_dynamic_idx], 120); + $emp_col_max_px[$emp_dynamic_idx] = max($emp_col_max_px[$emp_dynamic_idx], 190); + $emp_dynamic_idx++; +} +$emp_col_min_px[$emp_dynamic_idx] = max($emp_col_min_px[$emp_dynamic_idx], 110); // Name +$emp_dynamic_idx++; +$emp_col_min_px[$emp_dynamic_idx] = max($emp_col_min_px[$emp_dynamic_idx], 100); // EMP Code +$emp_col_max_px[$emp_dynamic_idx] = max($emp_col_max_px[$emp_dynamic_idx], 140); + $emp_col_min_px[$emp_col_count - 1] = 72; $emp_col_max_px[$emp_col_count - 1] = 96; $emp_col_width_px = nhance_dt_column_widths_px($emp_header_labels, $emp_col_max_len, $emp_col_min_px, $emp_col_max_px); @@ -183,6 +195,11 @@ $gst_total = 0; vertical-align: middle; } + #employee-data-list-table, + #employee-data-list-table_wrapper .dataTables_scrollHead table, + #employee-data-list-table_wrapper .dataTables_scrollBody table { + table-layout: fixed !important; + } #employee-data-list-table tbody td:not(:last-child) { overflow: hidden; text-overflow: ellipsis; @@ -201,6 +218,15 @@ $gst_total = 0; font-size: 13px; line-height: 1.25; } + #employee-data-list-table_wrapper table.dataTable thead .sorting:before, + #employee-data-list-table_wrapper table.dataTable thead .sorting:after, + #employee-data-list-table_wrapper table.dataTable thead .sorting_asc:before, + #employee-data-list-table_wrapper table.dataTable thead .sorting_asc:after, + #employee-data-list-table_wrapper table.dataTable thead .sorting_desc:before, + #employee-data-list-table_wrapper table.dataTable thead .sorting_desc:after { + right: 0.55rem !important; + opacity: 1 !important; + }
@@ -213,7 +239,7 @@ $gst_total = 0;
- +
@@ -240,7 +266,7 @@ $gst_total = 0; - + @@ -344,29 +370,17 @@ $gst_total = 0; - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + +
S.No Policy status  (₹)Sum Insured  (₹)Premium (₹)Pro Rata
Premium 
(₹)Pro Rata Premium  (₹)GST  Action  
TotalTotal
diff --git a/app/Views/finance_team_list.php b/app/Views/finance_team_list.php index d80aaad5..e0661664 100644 --- a/app/Views/finance_team_list.php +++ b/app/Views/finance_team_list.php @@ -239,6 +239,7 @@
+ @@ -338,11 +340,7 @@ $(document).ready(function () { if (ticketsTable.length) { ticketsTable.DataTable({ - // 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 - dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right + dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + "<'row'<'col-sm-12'tr>>" + "<'row align-items-center'<'col-5 text-start'i><'col-7 d-flex justify-content-end align-items-center'<'me-2'l>p>>", lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], @@ -409,110 +407,23 @@ $(document).ready(function () { } else { console.error("Table not found."); } -}); - -$(document).ready(function() { - getURLParams() + getURLParams(); $('#client_id').select2(); $('#insurer_id').select2(); $('#policy_type_id').select2(); -}) - -function fetchEmpolyeeList(event) { - event.preventDefault(); // Prevent default action - - var start_date = $('#startDate').val(); - var end_date = $('#endDate').val(); - var client_id = $('#client_id').val(); - var insurer_id = $('#insurer_id').val(); - var policy_type_id = $('#policy_type_id').val(); - var date_type = $('#date_type').val(); - var issuer = $('#issuer').val(); - - console.log(start_date + '-' + end_date); - - var queryParams = { - start_date: start_date, - end_date: end_date, - client_id: client_id, - insurer_id: insurer_id, - policy_type_id: policy_type_id, - date_type: date_type, - issuer: issuer, - }; - - const queryString = objectToQueryString(queryParams); - const apiURL = $('#get-emp-list').attr('href') + "?" + queryString; - console.log(apiURL); - window.location.href = apiURL; -} - -function objectToQueryString(obj) { - return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&'); -} - -function getURLParams() { - const url = new URL(window.location.href); - const params = new URLSearchParams(url.search); - - const startDate = params.get('start_date') || 0; // Default to 0 if not found - const endDate = params.get('end_date') || 0; // Default to 0 if not found - const client_id = params.get('client_id') || 0; // Default to 0 if not found - const insurer_id = params.get('insurer_id') || 0; // Default to 0 if not found - const policy_type_id = params.get('policy_type_id') || 0; // Default to 0 if not found - const date_type = params.get('date_type') || 0; // Default to 0 if not found - const issuer = params.get('issuer') || 0; // Default to 0 if not found - - hideDateField(date_type) - - console.log('startDate', startDate) - console.log('endDate', endDate) - console.log('client_id', client_id) - console.log('insurer_id', insurer_id) - console.log('policy_type_id', policy_type_id) - console.log('date_type', date_type) - console.log('issuer', issuer) - - // Log the values or use them as needed - console.log('Start Date:', startDate); - console.log('End Date:', endDate); - - if (startDate != 0 && endDate != 0) { - setTimeout(function() { - $('#start_date').val(startDate) - $('#end_date').val(endDate) - $('#client_id').val(client_id).change() - $('#insurer_id').val(insurer_id).change() - $('#policy_type_id').val(policy_type_id).change() - $('#date_type').val(date_type) - $('#issuer').val(issuer) - }, 1000) - - } - -} - -$(function() { const url = new URL(window.location.href); const params = new URLSearchParams(url.search); - - // Get start and end dates from URL parameters, or use default values const startDateParam = params.get('start_date') || moment().subtract(29, 'days').format('DD-MM-YYYY'); const endDateParam = params.get('end_date') || moment().format('DD-MM-YYYY'); - - // Parse the dates to moment objects var start = moment(startDateParam, 'DD-MM-YYYY'); var end = moment(endDateParam, 'DD-MM-YYYY'); - // var start = moment().subtract(29, 'days'); - // var end = moment(); - - function cb(start, end) { - $('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY')); - $('#startDate').val(start.format('DD-MM-YYYY')); - $('#endDate').val(end.format('DD-MM-YYYY')); + function cb(startDate, endDate) { + $('#reportrange').html(startDate.format('D-MM-YYYY') + ' - ' + endDate.format('D-MM-YYYY')); + $('#startDate').val(startDate.format('DD-MM-YYYY')); + $('#endDate').val(endDate.format('DD-MM-YYYY')); } $('#reportrange').daterangepicker({ @@ -525,18 +436,24 @@ $(function() { 'Last 7 Days': [moment().subtract(6, 'days'), moment()], 'Last 30 Days': [moment().subtract(29, 'days'), moment()], 'This Month': [moment().startOf('month'), moment().endOf('month')], - 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month') - .endOf('month') - ] + 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')] } - }); + }, cb); - $(document).ready(function() { - getURLParams() - $('#client_id').select2(); - $('#insurer_id').select2(); - $('#policy_type_id').select2(); - }) + cb(start, end); + + $('#clear-filters').on('click', function() { + $('#client_id').val('0').change(); + $('#insurer_id').val('0').change(); + $('#policy_type_id').val('0').change(); + $('#date_type').val('0'); + $('#issuer').val('0'); + $('#date_div').hide(); + $('#reportrange').data('daterangepicker').setStartDate(moment().subtract(29, 'days')); + $('#reportrange').data('daterangepicker').setEndDate(moment()); + cb(moment().subtract(29, 'days'), moment()); + }); +}); function fetchEmpolyeeList(event) { event.preventDefault(); // Prevent default action @@ -568,7 +485,9 @@ $(function() { } function objectToQueryString(obj) { - return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&'); + return Object.keys(obj).map(function(key) { + return encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]); + }).join('&'); } function getURLParams() { @@ -599,78 +518,17 @@ $(function() { if (startDate != 0 && endDate != 0) { setTimeout(function() { - $('#start_date').val(startDate) - $('#end_date').val(endDate) - $('#client_id').val(client_id).change() - $('#insurer_id').val(insurer_id).change() - $('#policy_type_id').val(policy_type_id).change() - $('#date_type').val(date_type) - $('#issuer').val(issuer) - }, 1000) - + $('#startDate').val(startDate); + $('#endDate').val(endDate); + $('#client_id').val(client_id).change(); + $('#insurer_id').val(insurer_id).change(); + $('#policy_type_id').val(policy_type_id).change(); + $('#date_type').val(date_type); + $('#issuer').val(issuer); + }, 300); } - } - $(function() { - - const url = new URL(window.location.href); - const params = new URLSearchParams(url.search); - - // Get start and end dates from URL parameters, or use default values - const startDateParam = params.get('start_date') || moment().subtract(29, 'days').format('DD-MM-YYYY'); - const endDateParam = params.get('end_date') || moment().format('DD-MM-YYYY'); - - // Parse the dates to moment objects - var start = moment(startDateParam, 'DD-MM-YYYY'); - var end = moment(endDateParam, 'DD-MM-YYYY'); - - // var start = moment().subtract(29, 'days'); - // var end = moment(); - - function cb(start, end) { - $('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY')); - $('#startDate').val(start.format('DD-MM-YYYY')); - $('#endDate').val(end.format('DD-MM-YYYY')); - } - - $('#reportrange').daterangepicker({ - startDate: start, - endDate: end, - locale: { - format: 'DD-MM-YYYY' - }, - ranges: { - 'Today': [moment(), moment()], - 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], - 'Last 7 Days': [moment().subtract(6, 'days'), moment()], - 'Last 30 Days': [moment().subtract(29, 'days'), moment()], - 'This Month': [moment().startOf('month'), moment().endOf('month')], - 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month') - .endOf('month') - ] - } - }, cb); - - cb(start, end); - - $('#clear-filters').on('click', function() { - // Reset all select dropdowns to the first option - $('#client_id').val('0').change(); - $('#insurer_id').val('0').change(); - $('#policy_type_id').val('0').change(); - $('#date_type').val('0'); - $('#issuer').val('0'); - $('#date_div').hide() - - // Reset the date range picker to default - $('#reportrange').data('daterangepicker').setStartDate(moment().subtract(29, 'days')); - $('#reportrange').data('daterangepicker').setEndDate(moment()); - cb(start, end); // Update the displayed date range - }); - - }); - function hideDateField(input = null) { let val = $('#date_type').val(); diff --git a/app/Views/insurer_statement_list.php b/app/Views/insurer_statement_list.php index 17fa711a..e6d03e1a 100644 --- a/app/Views/insurer_statement_list.php +++ b/app/Views/insurer_statement_list.php @@ -614,6 +614,7 @@ $isl_col_width_px = nhance_dt_column_widths_px($isl_header_labels, $isl_col_max_ diff --git a/app/Views/kyc_list.php b/app/Views/kyc_list.php index ec621cd3..4ac46b93 100755 --- a/app/Views/kyc_list.php +++ b/app/Views/kyc_list.php @@ -138,7 +138,9 @@ $kyc_col_width_px = nhance_dt_column_widths_px($kyc_header_labels, $kyc_col_max_ + diff --git a/app/Views/pos_list.php b/app/Views/pos_list.php index 56af9add..08ebde41 100644 --- a/app/Views/pos_list.php +++ b/app/Views/pos_list.php @@ -639,6 +639,7 @@ $pos_col_width_px = nhance_dt_column_widths_px($pos_header_labels, $pos_col_max_ \ No newline at end of file diff --git a/app/Views/ticket_mail_template.php b/app/Views/ticket_mail_template.php index 87a29e55..96c9a30f 100644 --- a/app/Views/ticket_mail_template.php +++ b/app/Views/ticket_mail_template.php @@ -590,6 +590,7 @@ } \ No newline at end of file diff --git a/app/Views/tpa_list.php b/app/Views/tpa_list.php index 8b17f04c..7c6e345c 100755 --- a/app/Views/tpa_list.php +++ b/app/Views/tpa_list.php @@ -144,6 +144,7 @@ $tpa_col_width_px = nhance_dt_column_widths_px($tpa_header_labels, $tpa_col_max_