From 3b5e726fb6a5390a84d890257fb8bd32f7cfe98c Mon Sep 17 00:00:00 2001 From: Venba Date: Sat, 30 Mar 2024 11:45:28 +0000 Subject: [PATCH 1/7] CHANGE_CICD_DOCKER_IMG --- bitbucket-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index e905c2b3..d6dc568c 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -3,7 +3,7 @@ # This template allows you to validate your PHP application. # The workflow allows running tests and code linting on the default branch. -image: composer:2.0 +image: php:8.2-cli pipelines: From 0a2e97f2a5a55c77323a33a7b3630d375c4f9423 Mon Sep 17 00:00:00 2001 From: Venba Date: Sat, 30 Mar 2024 12:34:53 +0000 Subject: [PATCH 2/7] CHANGE_CICD_SCRIPT1 --- bitbucket-pipelines.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index d6dc568c..d922751c 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -10,10 +10,18 @@ pipelines: default: - parallel: - step: - name: Test + name: Initialize Git FTP + script: + - apt-get update + - apt-get -qq install git-ftp + - git ftp init -u $FTP_USERNAME -p $FTP_PASSWORD $FTP_URL + caches: + - composer + - step: + name: Deploy using Git FTP script: - apt-get update - apt-get -qq install git-ftp - git ftp push -u $FTP_USERNAME -p $FTP_PASSWORD $FTP_URL caches: - - composer \ No newline at end of file + - composer From 47659c4fa6aaf1977a8cc28912d863a53a7e4db0 Mon Sep 17 00:00:00 2001 From: Venba Date: Sat, 30 Mar 2024 12:39:22 +0000 Subject: [PATCH 3/7] CHANGE_CICD_SCRIPT2 --- bitbucket-pipelines.yml | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index d922751c..321823d4 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -8,20 +8,12 @@ image: php:8.2-cli pipelines: default: - - parallel: - - step: - name: Initialize Git FTP - script: - - apt-get update - - apt-get -qq install git-ftp - - git ftp init -u $FTP_USERNAME -p $FTP_PASSWORD $FTP_URL - caches: - - composer - - step: - name: Deploy using Git FTP - script: - - apt-get update - - apt-get -qq install git-ftp - - git ftp push -u $FTP_USERNAME -p $FTP_PASSWORD $FTP_URL - caches: - - composer + - step: + name: Initialize and Deploy using Git FTP + script: + - apt-get update + - apt-get -qq install git-ftp + - git ftp init -u $FTP_USERNAME -p $FTP_PASSWORD $FTP_URL + - git ftp push -u $FTP_USERNAME -p $FTP_PASSWORD $FTP_URL + caches: + - composer From cf3547333d9b8c46ee8df413db5fbf4bf1432deb Mon Sep 17 00:00:00 2001 From: aadhavan valli Date: Sat, 30 Mar 2024 18:18:39 +0530 Subject: [PATCH 4/7] FIX_CLIENT_POLICY_NAME_ADD_POLICY_TYPE_NAME : AADHAVAN --- app/Controllers/EmployeeRestController.php | 32 ++++++++++++---------- app/Models/ClientPolicyModel.php | 7 ++++- app/Views/client_basic_info.php | 6 ++-- app/Views/client_policy.php | 7 +++-- public/assets/api.yaml | 3 -- 5 files changed, 30 insertions(+), 25 deletions(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 973a5d3c..70abe646 100644 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -497,11 +497,13 @@ class EmployeeRestController extends AdminController try { $file = $this->request->getFile('file'); $client_id = $this->request->getPost('client_id'); - // $client_id = $this->request->getJSON('client_id'); $policy_id = $this->request->getPost('policy_id'); - $employee_id = $this->request->getPost('employee_id'); - // $policy_id = $this->request->getJSON('policy_id'); + $token = $this->request->headers()['Auth']->getValue(); + $decodedPayload = json_decode(base64_decode(explode('.', $token)[1]), true); + + // get the employee id from token + $employee_id = $decodedPayload['id']; $client_policy = $this->clientPolicyModel->where('id', $policy_id)->where('client_id', $client_id)->first(); @@ -586,18 +588,18 @@ class EmployeeRestController extends AdminController } $dataToInsert = []; $basic_cover_si= []; - if ($extra[9]) { - $new_array = []; - for ($i=0; $i < count($extra[9]); $i++) { - if ($sum_insured_amount_for_check_employee_2 != $extra[9][$i] || $sum_insured_amount_for_check_employee_1 != $extra[9][$i]) { - $new_array[] = $i+1; - } - } - if (count($new_array) > 0) { - $count =count($new_array); - return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "$count Employee Sum Insured is Not Match.. " , 'data' => $new_array], 200); - } - } + // if ($extra[9]) { + // $new_array = []; + // for ($i=0; $i < count($extra[9]); $i++) { + // if ($sum_insured_amount_for_check_employee_2 != $extra[9][$i] || $sum_insured_amount_for_check_employee_1 != $extra[9][$i]) { + // $new_array[] = $i+1; + // } + // } + // if (count($new_array) > 0) { + // $count =count($new_array); + // return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "$count Employee Sum Insured is Not Match.. " , 'data' => $new_array], 200); + // } + // } foreach ($extra['0'] as $index => $id) { $relation =''; if ($extra['5'][$index] === 'Mother' || $extra['5'][$index] === 'Father') { diff --git a/app/Models/ClientPolicyModel.php b/app/Models/ClientPolicyModel.php index 2ebafcc9..01bc2a2c 100644 --- a/app/Models/ClientPolicyModel.php +++ b/app/Models/ClientPolicyModel.php @@ -61,12 +61,14 @@ class ClientPolicyModel extends Model } public function getClientPolicyByClientId($client_id){ + return $this->db->table('client_policy') ->select('client_policy.*') ->select('insurers.name as insurer_name, insurers.short_name as insurer_short') ->select('tpa.name as tpa_name, tpa.short_name as tpa_short') - ->select('policies.name as policy_name') + ->select('policies.name as policy_name, policies.policy_type_id') + ->select('policy_type.policy_type as policy_type_name') ->select('insurer_branch.branch_name as insurer_branch_name, insurer_branch.branch_code as insurer_branch_code') ->select('tpa_branch.branch_name as tpa_branch_name, tpa_branch.branch_code as tpa_branch_code') ->join('insurers', 'insurers.id = client_policy.insurer_id') @@ -74,10 +76,13 @@ class ClientPolicyModel extends Model ->join('tpa', 'tpa.id = client_policy.tpa_id') ->join('tpa_branch', 'client_policy.tpa_branch_id = tpa_branch.id') ->join('policies', 'policies.id = client_policy.policy_id') + ->join('policy_type', 'policy_type.id = policies.policy_type_id') ->where('client_policy.client_id', $client_id) ->get() ->getResult(); + + } public function getPolicyPremium($policy_id){ diff --git a/app/Views/client_basic_info.php b/app/Views/client_basic_info.php index 9d562f2b..3f08c20a 100644 --- a/app/Views/client_basic_info.php +++ b/app/Views/client_basic_info.php @@ -105,13 +105,11 @@ input:checked + .slider:before {
- +
- +
diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index 9018586c..a4e893ab 100644 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -194,12 +194,15 @@ if (policy_PrimaryKey !== '') { var policyTable = ''; var data = ; - data.forEach(function(item) { + // console.log("----------------------------"); + + // console.log(item); + policyTable += ` ${item.insurer_short} - ${item.insurer_branch_name} - ${item.policy_name} + ${item.policy_name} (${item.policy_type_name}) ${item.tpa_short} - ${item.tpa_branch_code} ${rearrangeDateFormat(item.policy_start_date)} - ${rearrangeDateFormat(item.policy_end_date)} ${checkDateStatus(item.policy_end_date, 1)} diff --git a/public/assets/api.yaml b/public/assets/api.yaml index 4d3e8f7e..d8159bab 100644 --- a/public/assets/api.yaml +++ b/public/assets/api.yaml @@ -175,9 +175,6 @@ paths: policy_id: type: integer description: policy_id - employee_id: - type: integer - description: employee_id file: type: string format: binary From f8680e116223a5a14cec23ba2930bc8ef0a31d45 Mon Sep 17 00:00:00 2001 From: velz Date: Sat, 30 Mar 2024 18:41:53 +0530 Subject: [PATCH 5/7] CHANGE_SPELL_ISSUE --- app/Views/employee_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Views/employee_list.php b/app/Views/employee_list.php index db60f466..db203bcd 100644 --- a/app/Views/employee_list.php +++ b/app/Views/employee_list.php @@ -75,7 +75,7 @@ table.dataTable tbody td { Name/code Policy name - Insurar name + Insurer name TPA ID UHID ID Policy status From 17c8f1558fcca740dfb53c4833aee2b8b601c541 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Sat, 30 Mar 2024 18:44:54 +0530 Subject: [PATCH 6/7] FIX_KYC_AND_POLICY_MASTER_REDIRECT : RV --- app/Views/kyc_docs.php | 4 +- app/Views/policies.php | 86 +++++++++++++++++++++--------------------- 2 files changed, 47 insertions(+), 43 deletions(-) diff --git a/app/Views/kyc_docs.php b/app/Views/kyc_docs.php index 0ec33c05..6567df7c 100644 --- a/app/Views/kyc_docs.php +++ b/app/Views/kyc_docs.php @@ -324,6 +324,7 @@ $(document).ready(function () { function removeKYCDocs(element) { + var kyc_docs_id_for_reload = $('#kyc_type_id').val(); var id = element.getAttribute('data-id'); var form_action = '' + id; $.ajax({ @@ -338,7 +339,8 @@ $(document).ready(function () { if (res.status == true) { toastr.success('Remove Done!', 'success'); - location.reload(); + // location.reload(); + window.location.href = '' + kyc_docs_id_for_reload; } else { toastr.warning('Remove Not Done!', 'warning'); diff --git a/app/Views/policies.php b/app/Views/policies.php index 83560c37..6ae8f361 100644 --- a/app/Views/policies.php +++ b/app/Views/policies.php @@ -340,57 +340,58 @@ $(document).ready(function () { function loadPoliciesList() { var base_url = ''; - var insurer_branch_action = base_url + policy_type_PrimaryKey; + var insurer_branch_action = base_url + policy_type_PrimaryKey; - if ($('#policy_type_id').val() != '') { - - $('.loader').fadeIn(); - $('.loader-mask').fadeIn(); - $.ajax({ - url: insurer_branch_action, - type: 'GET', - success: function(response) { + if ($('#policy_type_id').val() != '') { + + $('.loader').fadeIn(); + $('.loader-mask').fadeIn(); + $.ajax({ + url: insurer_branch_action, + type: 'GET', + success: function(response) { - console.log("response", response); + console.log("response", response); - setTimeout(function() { - $('.loader').fadeOut(); - $('.loader-mask').delay(350).fadeOut('slow'); - }, 1000); - var branchTable = ''; - $.each(response.policies, function(index, item) { - console.log(item); - branchTable += ` - - ${item.insurer.name} - ${item.policy.name} - - - - - - `; - }); - $('#policies_list').append(branchTable); - }, - error: function(xhr, status, error) { - console.error(xhr.responseText); - console.error(status, error); + setTimeout(function() { + $('.loader').fadeOut(); + $('.loader-mask').delay(350).fadeOut('slow'); + }, 1000); + var branchTable = ''; + $.each(response.policies, function(index, item) { + console.log(item); + branchTable += ` + + ${item.insurer.name} + ${item.policy.name} + + + + + + `; + }); + $('#policies_list').append(branchTable); + }, + error: function(xhr, status, error) { + console.error(xhr.responseText); + console.error(status, error); - setTimeout(function() { - $('.loader').fadeOut(); - $('.loader-mask').delay(350).fadeOut('slow'); - toastr.warning('Something Wrong!', 'warning'); - }, 1000); - } - }); - } + setTimeout(function() { + $('.loader').fadeOut(); + $('.loader-mask').delay(350).fadeOut('slow'); + toastr.warning('Something Wrong!', 'warning'); + }, 1000); + } + }); + } } }); function removePolicies(element) { + var policy_id_for_reload = $('#policy_type_id').val() var id = element.getAttribute('data-id'); var form_action = '' + id; $.ajax({ @@ -407,7 +408,8 @@ function removePolicies(element) { // $('#branch_table').empty(); - location.reload(); + // location.reload(); + window.location.href = '' + policy_id_for_reload; } else { toastr.warning('Remove Not Done!', 'warning'); From 6e19a3485d51bb647cee81968b45b5a7024428cd Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Sat, 30 Mar 2024 18:55:46 +0530 Subject: [PATCH 7/7] FAET_ENDORSEMENTLIST --- app/Views/endorsement_list.php | 259 +++++++++++++++++++++++++++++++++ 1 file changed, 259 insertions(+) create mode 100644 app/Views/endorsement_list.php diff --git a/app/Views/endorsement_list.php b/app/Views/endorsement_list.php new file mode 100644 index 00000000..75e5509c --- /dev/null +++ b/app/Views/endorsement_list.php @@ -0,0 +1,259 @@ + + +
+
+
+
+
+ + + +
+
+
+ +
+
+
+
+ +
+
+
+
+
+ +
+
+
+ + +
+
+
+
+
+
+ + + +
+
+
+
+
+
+

Endorsement List

+
+ +
+ + + + + + + + + + + + + + + + + $employee) { ?> + + + + + + + + + + + + + + + + +
SNOName/codePolicy nameInsurar nameTPA IDUHID IDPolicy statusPremiumAction
( )active + +
+
+
+
+
+ + + + \ No newline at end of file