Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
velz 2025-07-03 12:53:00 +05:30
commit 04d6cfe7dc
3 changed files with 34 additions and 7 deletions

View File

@ -358,6 +358,7 @@ $routes->group("/util", ["filter" => "authMVC"], function ($routes) {
$routes->get('getPolicyTypeFields', 'LeadsController::getPolicyTypeFields');
$routes->get('removeMultiFile', 'LeadsController::removeMultiFile');
$routes->get('removeInstallments', 'LeadsController::removeInstallments');
$routes->get('constructHrAccessData', 'ClientController::constructHrAccessData');
});
$routes->post("policy_tranction/sendInstallmentRemainderMail","PolicyTransactionController::sendInstallmentRemainderMail");
@ -540,6 +541,7 @@ $routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) {
$routes->get("getEmployeeActiveOrInactivePolicy", "EmployeeRestController::getEmployeeActiveOrInactivePolicy");
$routes->get("sendPushNotification", "EmployeeRestController::sendPushNotification");
$routes->post("sendEmail", "EmployeeRestController::send_email");
$routes->get("getPolicyLevelEmployeeSummaryData", "EmployeeRestController::getPolicyLevelEmployeeSummaryData");
$routes->get("getBackToEnrolledDetails", "EmployeeRestController::getBackToEnrolledDetails");

View File

@ -5821,7 +5821,8 @@ class ClientController extends AdminController
return $id;
}
private function reorderProposalsByInsurerTotal(array $data): array {
private function reorderProposalsByInsurerTotal(array $data): array
{
Kint::dump($data);
if (!isset($data['premium_data']['data'])) return $data;
@ -5884,7 +5885,8 @@ class ClientController extends AdminController
return $data;
}
private function reorderProposalDataByPremiumOrder(array $data): array {
private function reorderProposalDataByPremiumOrder(array $data): array
{
if (!isset($data['premium_data']['data'], $data['proposal_data']['over_all_column_data'])) {
return $data;
}
@ -5906,7 +5908,8 @@ class ClientController extends AdminController
return $data;
}
private function reorderProposalInHeaderAndData(array $data): array {
private function reorderProposalInHeaderAndData(array $data): array
{
// Kint::dump($data);
$tableData = $data['table_data'];
@ -6006,7 +6009,8 @@ class ClientController extends AdminController
return $data;
}
private function renumberProposalKeys(array $input): array {
private function renumberProposalKeys(array $input): array
{
$result = [];
$counter = 1;
@ -6021,7 +6025,9 @@ class ClientController extends AdminController
return $result;
}
public function saveApiData(){
public function saveApiData()
{
$receivedData = $this->request->getPost();
@ -6041,7 +6047,8 @@ class ClientController extends AdminController
}
public function sendToken(){
public function sendToken()
{
$client_id = $this->request->getGet('client_id');
@ -6054,6 +6061,17 @@ class ClientController extends AdminController
}
}
// ---------------------------------------------------------------------------------------------------
public function constructHrAccessData()
{
$html = view('hr_access_controll');
return $this->respond([
'status' => true,
'code' => 200,
'data' => $html
], 200);
}
}

View File

@ -33,6 +33,7 @@ use App\Models\TicketClaimStatusModel;
use App\Models\TicketMasterModel;
use App\Models\TicketMessageModel;
use App\Models\HRAccessControlModel;
use App\Models\InsurerModel;
@ -85,6 +86,7 @@ class EmployeeRestController extends AdminController
protected $ticketController;
protected $hrAccessControlModel;
protected $insurerModel;
public function __construct()
@ -115,6 +117,7 @@ class EmployeeRestController extends AdminController
$this->ticketController = new TicketController();
$this->hrAccessControlModel = new HRAccessControlModel();
$this->insurerModel = new InsurerModel();
}
@ -2313,7 +2316,7 @@ class EmployeeRestController extends AdminController
$ClientPolicyData = $this->clientPolicyModel->select('client_policy.id as client_policy_id , client_policy.client_id as client_id, client_policy.policy_type_id as policy_type_id, client_policy.is_addon as is_addon , client_policy.open_for_enrollment as OpenForEnrollment , client_policy.inception_type as inception_type ')
$ClientPolicyData = $this->clientPolicyModel->select('client_policy.id as client_policy_id , client_policy.client_id as client_id, client_policy.policy_type_id as policy_type_id, client_policy.is_addon as is_addon , client_policy.open_for_enrollment as OpenForEnrollment , client_policy.inception_type as inception_type, client_policy.policy_no as policy_no, client_policy.insurer_id as insurer_id ')
->where('client_policy.client_id', $this->request->getGet('client_id') )
->where('client_policy.client_branch_id', $this->request->getGet('client_branch_id') )
->where('client_policy.is_active', 1 )
@ -2327,8 +2330,12 @@ class EmployeeRestController extends AdminController
foreach ($ClientPolicyData as $key => $value)
{
$policyTypeData = $this->policyTypeModel->where('id',$value['policy_type_id'])->get()->getRow();
$insurerData = $this->insurerModel->where('id',$value['insurer_id'])->get()->getRow();
$value['type'] = $policyTypeData->policy_type;
$value['policy_name'] = $policyTypeData->long_name;
$value['insurer_name'] = $insurerData->name;
$value['insurer_short_name'] = $insurerData->short_name;
$employeeDetails = $this->employeePolicyModel->getEmployeePolicy( client_id:$value['client_id'],policy_id: $value['client_policy_id'],status:0,branch_id:$this->request->getGet('client_branch_id'));
// dd($employeeDetails);
$activeCount = 0;