From e39779f04f0dffebd9cd372507e63b3e8c4623c1 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Fri, 28 Feb 2025 15:11:23 +0530 Subject: [PATCH 1/8] CHANGE_AUTO_QUERY_RTE : RV --- app/Views/ticket_auto_query.php | 120 +++++++++++++++++--------------- app/Views/ticket_reply.php | 76 +++++++++++++------- 2 files changed, 116 insertions(+), 80 deletions(-) diff --git a/app/Views/ticket_auto_query.php b/app/Views/ticket_auto_query.php index 9c231002..519c17e9 100644 --- a/app/Views/ticket_auto_query.php +++ b/app/Views/ticket_auto_query.php @@ -9,31 +9,84 @@
- - +
+ placeholder="Enter Text"> - - + + +
+ +
+ - - - + \ No newline at end of file diff --git a/app/Views/ticket_reply.php b/app/Views/ticket_reply.php index fffb138d..3b6cb2a3 100644 --- a/app/Views/ticket_reply.php +++ b/app/Views/ticket_reply.php @@ -47,36 +47,61 @@ \ No newline at end of file From 8ad7ce567313f1f76d724ea1587f469f6fd53476 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Wed, 5 Mar 2025 12:26:42 +0530 Subject: [PATCH 7/8] CHANGE_BDS_CHANGES_AND_ENROLL_CHANGES : RV --- app/Controllers/ClientController.php | 3 + app/Models/EmployeeModel.php | 16 +- app/Models/PolicyTransactionModel.php | 3 +- app/Views/layout/header.php | 202 +++++++++--------- .../policy_transaction_inception_form.php | 39 +++- .../policy_transaction_inception_list.php | 13 +- 6 files changed, 170 insertions(+), 106 deletions(-) diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index 3d1ca91e..07fb963a 100755 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -4705,6 +4705,9 @@ class ClientController extends AdminController // $this->loadLayout('tat_report_band_wise_list', $reportData); // $data = $ticketModel->getTATReport(1); + // $empmodel = new EmployeeModel(); + // $data = $empmodel->getEmployeePolicy(348); + // dd($data); } // ------------------------------------------------------------------------------------------------------- diff --git a/app/Models/EmployeeModel.php b/app/Models/EmployeeModel.php index 14ec368d..57ac791b 100755 --- a/app/Models/EmployeeModel.php +++ b/app/Models/EmployeeModel.php @@ -149,7 +149,21 @@ class EmployeeModel extends Model { return $this->db->table('employee_polices') - ->select(' policy_type.long_name as Policy_Name , client_policy.policy_terms as Policy_Terms, client_policy.client_id as ClientId, client_policy.policy_id as PolicyId,client_policy.id as ClientPolicyId, client_policy.open_for_enrollment as OpenForEnrollment,client_policy.disclaimer,client_policy.policy_type_id , employee_polices.tpa_id as tpa_id , employee_polices.rand_string as rand_string') // Select all columns from both tables + ->select(' + policy_type.long_name as Policy_Name , + client_policy.policy_terms as Policy_Terms, + client_policy.client_id as ClientId, + client_policy.policy_id as PolicyId, + client_policy.id as ClientPolicyId, + CASE + WHEN client_policy.open_for_enrollment IS NULL THEN 0 + ELSE client_policy.open_for_enrollment + END AS OpenForEnrollment, + client_policy.disclaimer, + client_policy.policy_type_id , + employee_polices.tpa_id as tpa_id , + employee_polices.rand_string as rand_string + ', FALSE) // Select all columns from both tables ->join('client_policy', 'client_policy.id = employee_polices.client_policy_id') ->join('policy_type', 'policy_type.id = client_policy.policy_type_id') ->where('client_policy.policy_status', 1) diff --git a/app/Models/PolicyTransactionModel.php b/app/Models/PolicyTransactionModel.php index bb5f5954..e2a25cc6 100644 --- a/app/Models/PolicyTransactionModel.php +++ b/app/Models/PolicyTransactionModel.php @@ -607,7 +607,8 @@ class PolicyTransactionModel extends Model policy_type.policy_type, pt_co_share_details.agreed_amt AS amount, pt_co_share_details.bp_amt AS bp, - pt_co_share_details.tp_amt AS tp + pt_co_share_details.tp_amt AS tp, + clients.pan ') ->join('pt_co_share_details', 'policy_transaction.id = pt_co_share_details.pt_id', 'left') ->join('clients', 'clients.id = policy_transaction.client_id', 'left') diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index f26439e5..66d00a2a 100755 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -691,111 +691,121 @@ - + -
  • - - - 2 - Policy Transactions - - +
  • + + - + diff --git a/app/Views/policy_transaction_inception_form.php b/app/Views/policy_transaction_inception_form.php index 5b7ebdd3..6f61ded5 100644 --- a/app/Views/policy_transaction_inception_form.php +++ b/app/Views/policy_transaction_inception_form.php @@ -480,7 +480,7 @@ -
    +
    - +
    +
    +
    + +
    + +
    + +
    @@ -33,141 +58,136 @@ \ No newline at end of file diff --git a/app/Views/ticket_form_gmc.php b/app/Views/ticket_form_gmc.php index b23212e9..949f73ca 100644 --- a/app/Views/ticket_form_gmc.php +++ b/app/Views/ticket_form_gmc.php @@ -1,3 +1,17 @@ +
    " style="margin-right: 23px;"> @@ -73,9 +87,8 @@ + name="policy_no" placeholder="Policy Number">
    -
    +
    + + +
    +
    @@ -108,6 +128,20 @@
    + +
    +
    + + +
    +
    @@ -120,12 +154,12 @@
    @@ -145,12 +179,12 @@
    @@ -160,12 +194,12 @@
    @@ -347,12 +381,12 @@
    @@ -389,12 +423,23 @@ \ No newline at end of file diff --git a/app/Views/ticket_form_gpa.php b/app/Views/ticket_form_gpa.php index 627a3588..3181f9bf 100644 --- a/app/Views/ticket_form_gpa.php +++ b/app/Views/ticket_form_gpa.php @@ -68,6 +68,13 @@ name="emp_mail" required> +
    + + +
    +
    + + +
    +
    + + +
    +
    @@ -293,14 +317,22 @@ \ No newline at end of file diff --git a/app/Views/ticket_form_handler.php b/app/Views/ticket_form_handler.php index 487e885b..c39035a8 100644 --- a/app/Views/ticket_form_handler.php +++ b/app/Views/ticket_form_handler.php @@ -1,49 +1,49 @@ - \ No newline at end of file diff --git a/app/Views/view_rfq_non_eb.php b/app/Views/view_rfq_non_eb.php index 13ba40c8..9f1f071e 100644 --- a/app/Views/view_rfq_non_eb.php +++ b/app/Views/view_rfq_non_eb.php @@ -13,7 +13,8 @@ word-wrap: break-word; } - th,td { + th, + td { font-size: smaller !important; } @@ -28,13 +29,13 @@ th:nth-child(1), td:nth-child(1) { - width: 150px; + width: 110px; /* Adjust first column width */ } th:nth-child(2), td:nth-child(2) { - width: 550px; + width: 720px; /* Adjust first column width */ } @@ -173,7 +174,7 @@
    - +
    @@ -921,7 +922,7 @@ } ], "public_liability": [{ - table_type: "append", + table_type: "new", table_name: "Public Liability Coverage", table_id: "public_liability_addOnCoverage", table_editable: true, @@ -1897,9 +1898,101 @@ element.appendChild(icon); } - $('#saveRFQ').click( () => saveRFQ()); + $('#saveRFQ').click(() => saveRFQ()); + // $("#saveRFQ").click(function (){ + // console.log("Hello the save req button is clicked"); + // }) - function saveRFQ(){ - console.log("save rfq clicked"); + function saveRFQ() { + const rfqData = { + table_data: { + headers: [], + data: [] + } + }; + + // Get all tables + const tables = document.querySelectorAll('table'); + if (tables.length === 0) return; + + // Extract headers from the first table + const headerRow1 = tables[0].querySelector('thead tr:first-child'); + const headerRow2 = tables[0].querySelector('thead tr:last-child'); + const headers = []; + + headerRow1.querySelectorAll('th').forEach((th, index) => { + const parentHeader = th.textContent.trim(); + const subHeaders = []; + const subHeaderTh = headerRow2.children[index]; + if (subHeaderTh) { + subHeaders.push(subHeaderTh.textContent.trim()); + } + headers.push({ + parentHeader, + subHeaders + }); + }); + rfqData.table_data.headers = headers; + + // Process all tables + tables.forEach(table => { + const rows = table.querySelectorAll('tbody tr'); + rows.forEach(row => { + const cells = row.querySelectorAll('td'); + const rowData = { + SNO: '', + items: '', + data: [] + }; + + // Extract SNO (first cell) + if (cells[0]) { + rowData.SNO = cells[0].textContent.replace(/\D/g, '') || '1'; + } + + // Extract items (row ID) + rowData.items = row.id || ''; + + // Process each cell + cells.forEach((cell, cellIndex) => { + const header = headers[cellIndex]; + if (!header) return; + + const parentHeader = header.parentHeader; + const subHeader = header.subHeaders[0] || '-'; + + // Get displayed value + const value = cell.textContent.trim(); + + // Get input value (hidden field or checkbox state) + let inputValue = value; + const hiddenInput = cell.querySelector('input[type="hidden"]'); + if (hiddenInput) { + inputValue = hiddenInput.value; + } + + // Handle Action column checkboxes + if (parentHeader === 'Action') { + const qcrChecked = cell.querySelector('.qcr-checkbox')?.checked ?? false; + const clientChecked = cell.querySelector('.client-checkbox')?.checked ?? false; + inputValue = { + qcr: qcrChecked ? 1 : 0, + stc: clientChecked ? 1 : 0 + }; + } + + rowData.data.push({ + parentth: parentHeader, + subth: subHeader, + value, + input_value: inputValue + }); + }); + + rfqData.table_data.data.push(rowData); + }); + }); + + console.log(JSON.stringify(rfqData, null, 2)); } \ No newline at end of file