diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index b5d1706c..55dbc147 100755 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -903,7 +903,7 @@ class ClientController extends AdminController { $this->myLogger->logme('error', 'Edit Client Onboarding function called'); - $headerData['tab_name'] = 'Edit Client Onboarding'; + $headerData['tab_name'] = 'Clients'; $headerData['page_name'] = 'Clients'; $editData['RM'] = $this->userModel->where('is_active', 1)->findAll(); diff --git a/app/Controllers/RuleImportController.php b/app/Controllers/RuleImportController.php index 3a6c53e4..9eb95d35 100644 --- a/app/Controllers/RuleImportController.php +++ b/app/Controllers/RuleImportController.php @@ -759,6 +759,7 @@ class RuleImportController extends AdminController public function ruleList($id) { + $data['tab_name'] = "Rule Manager"; $data['page_name'] = "Rule Manager"; $data['departments'] = $this->departments; $data['commission_file_id'] = $id; diff --git a/app/Views/DashBoard.php b/app/Views/DashBoard.php index d09b90c7..5e2b1ee1 100755 --- a/app/Views/DashBoard.php +++ b/app/Views/DashBoard.php @@ -170,7 +170,7 @@ #client_add .tab-content-styles{ background-color:#F4F4F4; margin-right:20px; - margin-top:0px !important; + margin-top:12px !important; /** margin-top:0px !important; */ border-radius:25px!important; min-height: 70vh !important; } diff --git a/app/Views/batch_list.php b/app/Views/batch_list.php index 7b1b0f6f..f368adcd 100755 --- a/app/Views/batch_list.php +++ b/app/Views/batch_list.php @@ -67,28 +67,54 @@ padding: 4px 12px; font-size: 12px; } + +/* Keep DataTable controls aligned like reference UI */ +#tpa_variation_modal .dataTables_wrapper .dt-top { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 6px; +} + +#tpa_variation_modal .dataTables_wrapper .dt-bottom { + display: flex; + justify-content: flex-end; + align-items: center; + margin-top: 6px; +} + +#tpa_variation_modal .dataTables_wrapper .dt-top .dataTables_length, +#tpa_variation_modal .dataTables_wrapper .dt-top .dataTables_filter, +#tpa_variation_modal .dataTables_wrapper .dt-bottom .dataTables_paginate { + float: none; + margin: 0; +} + +#tpa_variation_modal .dataTables_wrapper .dt-top .dataTables_filter { + text-align: right; +} /* Compact table + buttons (NHance) */ -#datatable-buttons thead th, -#datatable-buttons tbody td { +#tickets-table thead th, +#tickets-table tbody td { padding: 5px 11px !important; font-size: 13px; line-height: 1.25; } /* Action dropdown toggle in rows */ -#datatable-buttons .dropdown-toggle.btn-sm { +#tickets-table .dropdown-toggle.btn-sm { padding: 4px 9px !important; font-size: 13px; line-height: 1.2; } /* DataTables toolbar buttons (Export/Filter/Clear Filter) */ -#datatable-buttons_wrapper .dt-buttons .btn { +#tickets-table_wrapper .dt-buttons .btn { padding: 6px 13px !important; font-size: 13px; } -#datatable-buttons_wrapper .dt-buttons .btn .btn-custom { +#tickets-table_wrapper .dt-buttons .btn .btn-custom { font-size: 13px; } @@ -104,10 +130,10 @@
- +
- + @@ -489,9 +515,8 @@ renderVariationTable('#not_in_tpa_table', notInTpa, tpaVariationColumns.not_in_tpa); renderVariationTable('#need_to_review_table', reviewData, tpaVariationColumns.need_to_review); - initVariationDataTable('#not_in_nhance_table'); - initVariationDataTable('#not_in_tpa_table'); - initVariationDataTable('#need_to_review_table'); + const activeId = $('#tpaVariationTabs .nav-link.active').attr('id') || 'not-in-nhance-tab'; + adjustVariationTableByTabId(activeId); } function showTPAVariationModal() { @@ -506,18 +531,85 @@ updateTPAProceedButton($activeTab.attr('id')); } - function initVariationDataTable(tableSelector) { - const $table = $(tableSelector); - - $table.DataTable({ + function getVariationDataTableConfig() { + return { + dom: "<'dt-top'lf>" + + "rt" + + "<'dt-bottom'p>", pageLength: 20, lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], searching: true, paging: true, ordering: false, - info: true, - autoWidth: false + info: false, + autoWidth: false, + language: { + search: ` +
+ _INPUT_ + + +
`, + searchPlaceholder: "Search" + } + }; + } + + function bindVariationSearchIcons($table) { + const $wrapper = $table.closest('.dataTables_wrapper'); + const $searchInput = $wrapper.find('.dataTables_filter input'); + const $magnify = $wrapper.find('.datatable-search-icon'); + const $clear = $wrapper.find('.datatable-clear-icon'); + + if (!$searchInput.length) { + return; + } + + $searchInput.off('input.variationSearch').on('input.variationSearch', function () { + const hasValue = !!$(this).val(); + $magnify.toggle(!hasValue); + $clear.toggle(hasValue); }); + + $clear.off('click.variationSearch').on('click.variationSearch', function () { + $searchInput.val('').trigger('input').trigger('keyup'); + }); + + const hasInitialValue = !!$searchInput.val(); + $magnify.toggle(!hasInitialValue); + $clear.toggle(hasInitialValue); + } + + function initVariationDataTable(tableSelector) { + const $table = $(tableSelector); + if (!$table.length) { + return; + } + + if (!$.fn.DataTable.isDataTable($table)) { + $table.DataTable(getVariationDataTableConfig()); + } + + const dt = $table.DataTable(); + dt.columns.adjust().draw(false); + bindVariationSearchIcons($table); + } + + function adjustVariationTableByTabId(tabId) { + const tabToTableMap = { + 'not-in-nhance-tab': '#not_in_nhance_table', + 'not-in-tpa-tab': '#not_in_tpa_table', + 'need-to-review-tab': '#need_to_review_table' + }; + + const tableSelector = tabToTableMap[tabId]; + if (!tableSelector) { + return; + } + + initVariationDataTable(tableSelector); } function destroyVariationDataTable(tableSelector) { @@ -550,13 +642,25 @@ $(document).ready(function() { - // Update proceed button label/visibility on tab change + // Update proceed button label/visibility and ensure datatable is rendered on tab change $('#tpaVariationTabs a[data-toggle="tab"]').on('shown.bs.tab', function (e) { const activeId = $(e.target).attr('id'); updateTPAProceedButton(activeId); + adjustVariationTableByTabId(activeId); }); - $('#datatable-buttons').DataTable({ + $('#tpa_variation_modal').on('shown.bs.modal', function () { + const activeId = $('#tpaVariationTabs .nav-link.active').attr('id') || 'not-in-nhance-tab'; + adjustVariationTableByTabId(activeId); + }); + + $('#tpa_variation_modal').on('hidden.bs.modal', function () { + destroyVariationDataTable('#not_in_nhance_table'); + destroyVariationDataTable('#not_in_tpa_table'); + destroyVariationDataTable('#need_to_review_table'); + }); + + const batchListTable = $('#tickets-table').DataTable({ dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right "<'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]], @@ -591,19 +695,35 @@ ], language: { search: ` -
- _INPUT_ - - -
`, +
+ _INPUT_ + + +
`, searchPlaceholder: "Search", emptyTable: '
No Data found
' }, - paging: true + autoWidth: false, + paging: true, + responsive: false }); + // Keep TH and TD widths in sync after any table redraw (search/sort/paginate). + batchListTable.on('draw.dt', function () { + batchListTable.columns.adjust(); + }); + + $(window).on('resize', function () { + batchListTable.columns.adjust(); + }); + + // Initial alignment after DataTable renders buttons/filter layout. + setTimeout(function () { + batchListTable.columns.adjust(); + }, 0); + }); // Function to format a number in Indian Rupees format diff --git a/app/Views/client_basic_info.php b/app/Views/client_basic_info.php index 2227c841..d2bae3a3 100755 --- a/app/Views/client_basic_info.php +++ b/app/Views/client_basic_info.php @@ -1,4 +1,52 @@ + + + + + +
+ /assets/images/errors/403_illustration.jpeg" alt="403 access denied"> +

ACCESS DENIED

+

+ +

+ Go Back +
+ + + \ No newline at end of file diff --git a/app/Views/errors/404.php b/app/Views/errors/404.php index 69c6d42e..7bb7897f 100755 --- a/app/Views/errors/404.php +++ b/app/Views/errors/404.php @@ -15,7 +15,7 @@ @@ -160,16 +112,14 @@ -
-
-
-

-
-
-
- -
- +
+ /assets/images/errors/404_illustration.jpg" alt="404 page not found illustration"> +

PAGE NOT FOUND

+

+ +

+ Go Back +
\ No newline at end of file diff --git a/app/Views/errors/404_old.php b/app/Views/errors/404_old.php new file mode 100755 index 00000000..69c6d42e --- /dev/null +++ b/app/Views/errors/404_old.php @@ -0,0 +1,175 @@ + + + + + + + <?= isset($page_name) ? $page_name : 'NHance'; ?> + + + + + + + /assets/images/Nhance_Favi.svg"> + + + + + + + + +
+
+
+

+
+
+
+ +
+ + + + \ No newline at end of file diff --git a/app/Views/file_list.php b/app/Views/file_list.php index ca52b04d..759cdba6 100755 --- a/app/Views/file_list.php +++ b/app/Views/file_list.php @@ -220,6 +220,7 @@ + Allowed: XLS, XLSX. Size : 25MB Dimension : 100 X 100 diff --git a/app/Views/hr_file_upload.php b/app/Views/hr_file_upload.php index 51f008b4..62979743 100644 --- a/app/Views/hr_file_upload.php +++ b/app/Views/hr_file_upload.php @@ -1,9 +1,57 @@ @@ -117,7 +165,8 @@ -
S.No S.No  Batch Code  File Name  Client 
+
@@ -155,6 +204,7 @@
+
@@ -180,6 +230,7 @@ + Allowed: XLS, XLSX. Size : 25MB Dimension : 100 X 100 @@ -276,13 +327,26 @@ tbody = `No records found`; } - $("#hr_tickets_table tbody").html(tbody); + if (window.hrFileTableInstance) { + window.hrFileTableInstance.clear(); + $("#hr_tickets_table tbody").html(tbody); + window.hrFileTableInstance.rows.add($("#hr_tickets_table tbody tr")).draw(); + window.hrFileTableInstance.columns.adjust().draw(false); + } else { + $("#hr_tickets_table tbody").html(tbody); + } }, error: function (xhr, status, error) { console.error("Error:", error); - $("#hr_tickets_table tbody").html( - `Something went wrong` - ); + const errorRow = `Something went wrong`; + if (window.hrFileTableInstance) { + window.hrFileTableInstance.clear(); + $("#hr_tickets_table tbody").html(errorRow); + window.hrFileTableInstance.rows.add($("#hr_tickets_table tbody tr")).draw(); + window.hrFileTableInstance.columns.adjust().draw(false); + } else { + $("#hr_tickets_table tbody").html(errorRow); + } }, }); }); @@ -357,8 +421,27 @@ // ---------------------------------------------------------------------------------------------- // for datatable + window.hrFileTableInstance = window.hrFileTableInstance || null; + function fixHrUploadTableHeaderWidth() { + const $wrapper = $('#hr_tickets_table_wrapper'); + if (!$wrapper.length) { + return; + } + $wrapper.find('.dataTables_scrollHeadInner, .dataTables_scrollHeadInner table, .dataTables_scrollBody table') + .css('width', '100%'); + + if (window.hrFileTableInstance) { + window.hrFileTableInstance.columns.adjust().draw(false); + } + } + $(document).ready(function() { - $('#hr_tickets_table').DataTable({ + if (window.hrFileTableInstance) { + return; + } + window.hrFileTableInstance = $('#hr_tickets_table').DataTable({ + scrollX: false, + autoWidth: false, // dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + // "<'row'<'col-sm-12'tr>>" + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", @@ -396,7 +479,20 @@ emptyTable: '
No Data found
' }, paging: true, + ordering: false, }); + $('.dataTables_filter input').css({ + 'background': '#F0F0F0', + 'border': 'none', + 'border-radius': '8px', + 'padding-right': '34px' + }); + + setTimeout(fixHrUploadTableHeaderWidth, 0); + }); + + $(document).on('shown.bs.tab shown.bs.collapse shown.bs.modal', function() { + setTimeout(fixHrUploadTableHeaderWidth, 50); }); //for initialize the file upload for the files table diff --git a/app/Views/insurer_branch.php b/app/Views/insurer_branch.php index e5456255..aea9c8c6 100755 --- a/app/Views/insurer_branch.php +++ b/app/Views/insurer_branch.php @@ -10,6 +10,17 @@ margin-top: 5px; color: #6c757d; } + +.field-error { + color: #dc3545; + font-size: 12px; + margin-top: 4px; + display: block; +} + +.is-invalid { + border-color: #dc3545 !important; +}
@@ -120,12 +135,12 @@