diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index 987bccf8..11e9f37f 100755 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -27,13 +27,88 @@ + +
Saved
-
+
+ +
+ +
+ +
@@ -308,6 +383,8 @@ // Get today's date var today = new Date(); + const showExpired = $('#chk-show-expired').is(':checked'); + var startDatePicker = flatpickr("#start_date", { dateFormat: "d-m-Y", defaultDate: today, @@ -412,37 +489,42 @@ var policy_name_data = `${item.policy_type_name ?? ''}` + ' - ' + `${item.policy_no ?? ''}`; + if(showExpired == false && checkDateStatus(item.policy_end_date) != 'Expired'){ + - - policyTable += ` - - - - - - - - - + + + + + + + + - - `; + // Conditionally render the delete option based on the role + if (role != 3 && role != 4) { + + policyTable += ` + Delete`; + } + + policyTable += ` + + + + + `; + + + } }); @@ -452,9 +534,11 @@ $('#table-client-policy').DataTable({ - paging: true, - searching: false, - // ordering: false + paging: true, + searching: true, + autoWidth: false, + responsive: true, + }); @@ -676,7 +760,9 @@ Rack Rate`; // Conditionally render the delete option based on the role - if (role !== 3 && role !== 4) { + if (role != 3 && role != 4) { + + policyTable += ` Delete`; } @@ -2286,4 +2372,144 @@ }, 2000); } - \ No newline at end of file + + + + + + +
${item.insurer_short} - ${item.insurer_branch_name}${policy_name_data}${item.branch_name ? item.branch_name : ' - '}${tpaValue}${(item.policy_start_date)} / ${(item.policy_end_date)}${checkDateStatus(item.policy_end_date, 1)} -
${item.insurer_short} - ${item.insurer_branch_name}${policy_name_data}${item.branch_name ? item.branch_name : ' - '}${tpaValue}${(item.policy_start_date)} / ${(item.policy_end_date)}${checkDateStatus(item.policy_end_date, 1)} + -