diff --git a/app/Config/Routes.php b/app/Config/Routes.php
index e3685dd8..3aaaaabd 100755
--- a/app/Config/Routes.php
+++ b/app/Config/Routes.php
@@ -47,6 +47,7 @@ $routes->get("frontend_content", "AppContentManagementController::frontend_conte
// $routes->get('/', 'LoginController::index');
$routes->get('/test', 'Home::index');
$routes->get('/check_gemini', 'Home::check_Gemini');
+$routes->get('/check_gemini2', 'Home::check_gemini_2');
$routes->get('/login', 'LoginController::index'); ///auth/google
$routes->get('/loginPos', 'LoginController::loginPos'); //login POS team
$routes->post('/getVerifyPosMobileNo', 'LoginController::getVerifyPosMobileNo'); //Verify POS team mobile no
@@ -579,6 +580,7 @@ $routes->group("/bdsReport", ["filter" => "authMVC"], function ($routes) {
$routes->group("/ticket", ["filter" => "authMVC"], function ($routes) {
$routes->match( ['get', 'post'], 'list','TicketController::ticketList');
$routes->get('feedback-list','TicketController::feedbackList');
+ $routes->match(['get', 'post'], 'claim-upload','TicketController::claimDumpUpload');
$routes->get('remove','TicketController::removeTicket');
$routes->get('new/(:any)','TicketController::ticket_form/$1');
$routes->post('create','TicketController::createTicket');
@@ -614,7 +616,7 @@ $routes->post("retrieveWebhookDataClaim","ClientWebHooksController::pullData_cla
-//Third party Api Call
+//Third party ICICILombard Api Call
$routes->get('generateAuthToken','ICICILombardController::generateAuthToken');
$routes->get('createEnrollmentBatch','ICICILombardController::createEnrollmentBatch');
@@ -623,3 +625,17 @@ $routes->get('fetchUHIDDetails','ICICILombardController::fetchUHIDDetails');
$routes->get('testTracelog','TestBusinessController::a');
$routes->get("claimView", "EmployeeRestController::claimView");
+
+//Third party Vidal Api Call
+
+$routes->post('hospitalNetwork','VidalApiController::hospitalNetwork');
+$routes->post('eCardService','VidalApiController::eCardService');
+$routes->post('claimStatusCheck','VidalApiController::claimStatusCheck');
+$routes->post('newClaim','VidalApiController::newClaim');
+$routes->post('enrollment','VidalApiController::enrollment');
+
+
+$routes->post("ticketSave", "ThzController::ticketSave");
+$routes->post("ticketList", "ThzController::ticketList");
+$routes->post("ticketConversationSave", "ThzController::ticketConversationSave");
+$routes->post("ticketConversationList", "ThzController::ticketConversationList");
\ No newline at end of file
diff --git a/app/ControllerCleaners/ThzControllerCleaner.php b/app/ControllerCleaners/ThzControllerCleaner.php
new file mode 100644
index 00000000..5208921c
--- /dev/null
+++ b/app/ControllerCleaners/ThzControllerCleaner.php
@@ -0,0 +1,67 @@
+thzMasterModel = new ThzMasterModel();
+ $this->thzMasterNotesModel = new ThzMasterNotesModel();
+ }
+
+ public function index()
+ {
+ //
+ }
+
+ public function ticketCreation($data){
+
+ if(empty($data)){
+ return false;
+ }
+
+ $cleanedData = $data;
+
+ return $cleanedData;
+
+
+ }
+
+ public function ticketList($data){
+
+ if(empty($data)){
+ return false;
+ }
+
+ $cleanedData = $data;
+
+ return $cleanedData;
+
+ }
+
+ public function ticketConversation($data){
+
+ if(empty($data)){
+ return false;
+ }
+
+ $cleanedData = $data;
+
+ return $cleanedData;
+
+ }
+
+
+
+}
diff --git a/app/Controllers/Chatbot/EcardDownloadConversation.php b/app/Controllers/Chatbot/EcardDownloadConversation.php
index 1f303c13..a0a644a0 100644
--- a/app/Controllers/Chatbot/EcardDownloadConversation.php
+++ b/app/Controllers/Chatbot/EcardDownloadConversation.php
@@ -10,8 +10,11 @@ use App\Helpers\ChatbotHelper;
class EcardDownloadConversation extends Conversation
{
+ protected $buttonsData = [];
public function run()
{
+ $this->bot->types();
+ sleep(0.5);
$this->showEcardMenu();
}
@@ -22,6 +25,7 @@ class EcardDownloadConversation extends Conversation
$chat_session_info = get_chatbot_session_info();
$policy_list = ChatbotHelper::getListOfPolicies($chat_session_info);
$buttons = [];
+
$question = 'Choose Policy to Download Ecard:';
// log_message('error', ('policy_list : ' . json_encode($policy_list)));
@@ -34,20 +38,24 @@ class EcardDownloadConversation extends Conversation
// Button::create("๐น $policy['policy_name']")->value("$policy['emp_policy_id']"),
// Button::create("โ๏ธ Go Back")->value("go_back"),
// ]);
- $buttons[] = Button::create("๐น {$policy['policy_name']}")->value($policy['emp_policy_id'].'#'.$policy['rand_string']);
+ $this->buttonsData[$policy['emp_policy_id'].'#'.$policy['rand_string']] = ['response_text' => "๐น {$policy['policy_name']}"] ;
+ $buttons[] = Button::create("{$policy['policy_name']}")->value($policy['emp_policy_id'].'#'.$policy['rand_string']);
}
}
else
{
$question = 'No policy found';
}
+ $this->buttonsData['go_back'] = ['response_text' => 'โ๏ธ Go Back'] ;
$buttons = array_merge($buttons,[Button::create("โ๏ธ Go Back")->value("go_back")]);
$question = Question::create($question)
->addButtons($buttons);
-
- $this->bot->ask($question, function ($answer) {
+ $temp = $this->buttonsData;
+ $this->bot->ask($question, function ($answer) use ($temp) {
+ log_message('error', 'showEcardMenu answer received');
+ log_message('error', ($answer));
$selectedOption = $answer->getText();
- $this->say("You have selected {$selectedOption}");
+ $this->say("You have selected {$temp[$selectedOption]['response_text']}");
switch ($answer->getValue()) {
case "go_back":
$this->bot->startConversation(new MainMenuConversation());
diff --git a/app/Controllers/Home.php b/app/Controllers/Home.php
index 09d3dc19..cc084f72 100755
--- a/app/Controllers/Home.php
+++ b/app/Controllers/Home.php
@@ -7,6 +7,10 @@ use GeminiAPI\Client;
use GeminiAPI\Resources\ModelName;
use GeminiAPI\Resources\Parts\TextPart;
+use Mpdf\Mpdf;
+use PhpOffice\PhpSpreadsheet\IOFactory;
+use PhpOffice\PhpSpreadsheet\Shared\Date;
+
class Home extends PublicController
{
@@ -36,24 +40,300 @@ class Home extends PublicController
public function check_Gemini()
{
- try {
- $apiKey = 'AIzaSyBbx-uotRBqkYhqLpmD60420E_a0G0duP8';
- // Initialize the Gemini client
- $client = new Client($apiKey);
+ try {
+ $apiKey = 'AIzaSyBbx-uotRBqkYhqLpmD60420E_a0G0duP8';
+ // Initialize the Gemini client
+ $client = new Client($apiKey);
- // Send a prompt to the Gemini Pro model
- $response = $client->generativeModel(ModelName::GEMINI_PRO)->generateContent(
- new TextPart('Write a short, creative story about a knight and a dragon.')
- );
+ // Send a prompt to the Gemini Pro model
+ $response = $client->generativeModel(ModelName::GEMINI_PRO)->generateContent(
+ new TextPart('Write a short, creative story about a knight and a dragon.')
+ );
- // Display the generated text
- $data['gemini_response'] = $response->text();
- } catch (\Exception $e) {
- // Handle any errors that occur during the API call
- $data['gemini_response'] = 'An error occurred: ' . $e->getMessage();
- }
+ // Display the generated text
+ $data['gemini_response'] = $response->text();
+ } catch (\Exception $e) {
+ // Handle any errors that occur during the API call
+ $data['gemini_response'] = 'An error occurred: ' . $e->getMessage();
+ }
+
+ print_rr($data);
+ }
+
+ public function check_gemini_2()
+ {
+
+ // $this->convertToPdf();die();
+ // Replace with your actual Gemini API key
+ $apiKey = 'AIzaSyBbx-uotRBqkYhqLpmD60420E_a0G0duP8';
+
+ // The model to use and the API endpoint
+ $model = "gemini-pro";
+ $model = "gemini-2.5-flash";
+ // $model = "gemini-1.5-pro";
+ // $model = "gemini-1.5-pro";
+ $url = "https://generativelanguage.googleapis.com/v1beta/models/{$model}:generateContent?key={$apiKey}";
+
+ $filePath = 'C:\Users\Venba\Downloads\NIA MDU May-2025 (2).pdf';
+ $filePath = 'C:/Users/Venba/Desktop/ins stmts/NIC MDU June-2025 (1).pdf';
+ $filePath = 'C:/Users/Venba/Desktop/ins stmts/UIIC GR June-2025.pdf';
+ $filePath = 'C:/Users/Venba/Desktop/ins stmts/UIIC VLR June-2025 (2).xlsx';
+ $filePath = 'C:/Users/Venba/Desktop/ins stmts/pdf/2.pdf';
+ $filePath = 'C:\Users\Venba\Downloads\Raheja June-2025.csv';
+ // $filePath = 'C:/Users/Venba/Downloads/Raheja June-2025.pdf';
+ // $filePath = 'C:/Users/Venba/Desktop/ins stmts/ICICI Pru June-2025 (1).xlsx';
+ // $filePath = 'C:/Users/Venba/Desktop/ins stmts/Digit Life June-2025.xlsx';
+
+ // Check if the file exists
+ if (!file_exists($filePath)) {
+ die("Error: File not found at {$filePath}");
+ }
+
+ // Get the file's MIME type using the finfo extension
+ $finfo = finfo_open(FILEINFO_MIME_TYPE);
+ $mimeType = finfo_file($finfo, $filePath);
+ finfo_close($finfo);
+ // print_r($mimeType);die();
+ // Define supported inline MIME types
+ $supportedInlineMimeTypes = ['application/pdf','text/csv'];
+
+ // Read the file content and encode it to Base64
+ $fileContent = file_get_contents($filePath);
+ $base64Content = base64_encode($fileContent);
+ // The prompt you want to send to the model
+ $prompt = "give me a json with emp data like name,age,dob,mobile and email. only json not any explanations";
+ $prompt = "Read the following insurer monthly statement file and convert into JSON format as sample specified.attach statement items in 'items' key and if any other data available put it in 'meta'. Give me only JSON,not any explanations. If you find the same details like insured name, policy number,endorsement no,policy start date,policy end date group it as single policy and identify base premium, third party premium and terrorism premium.";
+ $prompt .= "{\'items\': [{\'sno\': 1, \'policy_no\': \'\', \'insured_name\': \'\', \'endorsement_no\': \'\', \'policy_start_date\': \'\', \'policy_end_date\': \'\', \'actual_base_premium_amount\': \'\', \'actual_third_party_premium_amount\': \'\', \'actual_terrorism_premium_amount\': \'\', \'actual_base_premium_percentage\': \'\', \'actual_third_party_premium_percentage\': \'\', \'actual_terrorism_premium_percentage\': \'\', \'actual_bp_brokerage_amount\': \'\', \'actual_tp_brokerage_amount\': \'\', \'actual_tep_brokerage_amount\': \'\', \'reward_amount\': \'\'}]}";
+
+ $payloadPart = null;
+
+ // The text part of the prompt
+ $text_part = [
+ "text" => $prompt
+ ];
+ // Conditionally handle the file upload based on MIME type
+ if (in_array($mimeType, $supportedInlineMimeTypes)) {
+ echo "Detected supported format inline MIME type ({$mimeType})";
+ // Handle PDF as inline data
+ $fileContent = file_get_contents($filePath);
+ $base64Content = base64_encode($fileContent);
+ $payloadPart = [
+ "inlineData" => [
+ "mimeType" => $mimeType,
+ "data" => $base64Content
+ ]
+ ];
+
+ $content_parts = [
+ "parts" => [
+ $text_part,
+ $payloadPart
+ ]
+ ];
+ } else {
+ // Handle Excel/CSV using the Files API
+ echo "Detected unsupported inline MIME type ({$mimeType}). Uploading via Files API...\n";
+ $fileInfo = $this->uploadFileToGemini($filePath, $apiKey); // Pass apiKey
+
+ print_r($fileInfo);
+ // The file part, using the URI from the Files API upload
+ $file_part = [
+ "fileData" => [
+ "fileUri" => $fileInfo['uri'],
+ "mimeType" => $fileInfo['mimeType']
+ ]
+ ];
+
+ // The full content array, containing both parts
+ $content_parts = [
+ "parts" => [
+ $text_part,
+ $file_part
+ ]
+ ];
+ }
+
+
+
+
+
+ // The final JSON payload
+ $data = [
+ "contents" => [
+ $content_parts
+ ]
+ ];
+
+ // Encode the data to a JSON string
+ $json_data = json_encode($data);
+
+ // Initialize cURL
+ $ch = curl_init($url);
+
+ // Set cURL options
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); // Set the Content-Type header
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data); // Set the JSON payload
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Return the response as a string
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Optional: to bypass SSL verification if needed (not recommended for production)
+
+ // Execute the cURL request and get the response
+ $response = curl_exec($ch);
+
+ // Check for cURL errors
+ if (curl_errno($ch)) {
+ echo 'cURL Error: ' . curl_error($ch);
+ }
+
+ // Close the cURL handle
+ curl_close($ch);
+
+ // Decode the JSON response
+ $responseData = json_decode($response, true);
+ echo '
';
+ print_r($responseData);
+ echo '';
+ // Check if the response contains generated text
+ if (isset($responseData['candidates'][0]['content']['parts'][0]['text'])) {
+ $generatedText = $responseData['candidates'][0]['content']['parts'][0]['text'];
+ echo "Generated Text: " . $generatedText;
+ } else {
+ echo "Error or no text generated. Response: " . $response;
+ }
- print_rr($data);
}
+
+
+// Function to upload a file to the Gemini Files API
+function uploadFileToGemini($filePath, $apiKey)
+{
+ // Define the URL for the Files API upload
+ $uploadUrl = "https://generativelanguage.googleapis.com/upload/v1beta/files?key={$apiKey}";
+
+ // Get file info
+ $finfo = finfo_open(FILEINFO_MIME_TYPE);
+ $fileMimeType = finfo_file($finfo, $filePath);
+ finfo_close($finfo);
+
+ $displayName = basename($filePath);
+
+ // Build the request body for the Files API
+ $fileUploadData = [
+ 'file' => [
+ 'display_name' => $displayName,
+ ],
+ ];
+ $jsonUploadData = json_encode($fileUploadData);
+
+ // Initialize cURL for the upload
+ $ch_upload = curl_init();
+ curl_setopt($ch_upload, CURLOPT_URL, $uploadUrl);
+ curl_setopt($ch_upload, CURLOPT_RETURNTRANSFER, true);
+ curl_setopt($ch_upload, CURLOPT_POST, true);
+
+ // Use CURLFile for multipart/form-data upload
+ $payload = [
+ 'metadata' => $jsonUploadData,
+ 'file' => new \CURLFile($filePath, $fileMimeType, $displayName),
+ ];
+
+ curl_setopt($ch_upload, CURLOPT_POSTFIELDS, $payload);
+ curl_setopt($ch_upload, CURLOPT_HTTPHEADER, [
+ 'X-Goog-Upload-Protocol: multipart',
+ ]);
+ curl_setopt($ch_upload, CURLOPT_SSL_VERIFYPEER, false); // Optional: not for production
+
+ // Execute the upload request
+ $uploadResponse = curl_exec($ch_upload);
+
+ if (curl_errno($ch_upload)) {
+ die('cURL Error (Files API): ' . curl_error($ch_upload));
+ }
+
+ curl_close($ch_upload);
+
+ $uploadResponseData = json_decode($uploadResponse, true);
+
+ // Check for a successful upload and return the file URI
+ if (!isset($uploadResponseData['file']['uri'])) {
+ die("Error uploading file. Response: " . $uploadResponse);
+ }
+
+ return [
+ 'uri' => $uploadResponseData['file']['uri'],
+ 'mimeType' => $fileMimeType
+ ];
+}
+
+
+public function convertToPdf($inputFile = null)
+ {
+ // 1. Load your Excel file
+ $inputFile = 'C:/Users/Venba/Desktop/ins stmts/Raheja June-2025.xlsx';
+ // $inputFile = 'C:/Users/Venba/Desktop/ins stmts/pdf/sample.pdf';
+ $spreadsheet = IOFactory::load($inputFile);
+
+ // 2. Initialize mPDF with proper configuration
+ $mpdf = new Mpdf([
+ 'mode' => 'utf-8',
+ 'format' => 'A4',
+ 'margin_header' => 5,
+ 'margin_footer' => 5,
+ 'orientation' => 'L',
+ 'default_font_size' => 18,
+ // 'default_font' => 'Arial'
+ ]);
+
+ // 3. Process each worksheet
+ foreach ($spreadsheet->getWorksheetIterator() as $worksheet) {
+ // Get HTML representation of the sheet
+ $html = $this->worksheetToHtml($worksheet);
+ // print_r($html);
+ // Add to PDF
+ $mpdf->AddPage();
+ $mpdf->WriteHTML($html);
+ }
+ $pdfPath = 'C:/Users/Venba/Desktop/ins stmts/pdf/2.pdf';
+ // $pdfPath = WRITEPATH.'tmp';
+ $mpdf->Output($pdfPath, \Mpdf\Output\Destination::FILE); // Save file on server
+ // 4. Output
+ // $mpdf->Output('financial_report.pdf', 'D');
+ }
+
+
+
+
+ protected function worksheetToHtml($worksheet)
+ {
+ // Customize this based on your needs
+ $html = '' . htmlspecialchars($worksheet->getTitle()) . '
';
+ $html .= '
';
+
+ foreach ($worksheet->getRowIterator() as $row) {
+ $html .= '';
+ $cellIterator = $row->getCellIterator();
+ $cellIterator->setIterateOnlyExistingCells(true);
+
+ foreach ($cellIterator as $cell) {
+ $value = $cell->getValue();
+
+ // โ
Detect and format Excel date cells
+ if (Date::isDateTime($cell)) {
+ $formattedValue = Date::excelToDateTimeObject($value)->format('Y-m-d');
+ } else {
+ $formattedValue = $cell->getCalculatedValue();
+ }
+
+ $html .= '| ' . htmlspecialchars($formattedValue) . ' | ';
+ }
+
+ $html .= '
';
+ }
+
+ $html .= '
';
+ return $html;
+ }
+
+
+
}
diff --git a/app/Controllers/LeadsController.php b/app/Controllers/LeadsController.php
index b1db3311..fc4a4e86 100644
--- a/app/Controllers/LeadsController.php
+++ b/app/Controllers/LeadsController.php
@@ -44,6 +44,8 @@ use Google\Service\FactCheckTools\Resource\Claims;
use GPBMetadata\Google\Type\Datetime;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
+use function PHPSTORM_META\type;
+
class LeadsController extends BaseController
{
use ResponseTrait;
@@ -773,7 +775,7 @@ class LeadsController extends BaseController
// dd($data);
if ($data['lead_data']['lead_form_type'] == 1) {
-
+ $data['demogrphy_html_data'] = $this->generateDemographyDataTable(['lead_id' => $id]);
$this->loadLayout('view_rfq.php', $data);
} else if ($data['lead_data']['lead_form_type'] == 2) {
@@ -961,7 +963,7 @@ class LeadsController extends BaseController
}
- private function reorderProposalsByInsurerTotal(array $data): array
+ public function reorderProposalsByInsurerTotal(array $data): array
{
if (!isset($data['premium_data']['data'])) return $data;
@@ -973,7 +975,7 @@ class LeadsController extends BaseController
foreach ($original as $key => $value) {
// Match only keys that look like 'Proposal X'
- if (preg_match('/^(Proposal\s+\d+|Existing Renewal|Existing Rollover)$/', $key)) {
+ if (preg_match('/^(Proposal\s+\d+|Existing Renewal|Existing Rollover)$/', $key)) {
// Get the insurer entry (not 'Quote Asked')
foreach ($value as $subKey => $subVal) {
if ($subKey !== 'Quote Asked' && isset($subVal['Total'])) {
@@ -994,6 +996,18 @@ class LeadsController extends BaseController
}
}
+ foreach ($proposals as $proposalKey => &$proposal) {
+ $quoteAsked = $proposal['Quote Asked']; // Keep Quote Asked separately
+ unset($proposal['Quote Asked']);
+
+ uasort($proposal, function ($a, $b) {
+ return $a['Total'] <=> $b['Total']; // Ascending by Total
+ });
+
+ // Add Quote Asked back at the top
+ $proposal = array_merge(['Quote Asked' => $quoteAsked], $proposal);
+ }
+
// Sort proposals by their insurer's total
uasort($proposals, function ($a, $b) {
$totalA = 0;
@@ -1028,9 +1042,48 @@ class LeadsController extends BaseController
return $data;
}
+ $porposalData = $data['premium_data']['data'];
$premiumProposals = array_keys($data['premium_data']['data']);
$filteredProposals = [];
+ //Reorder the Insurer based on the Premium data insurer
+ foreach ($porposalData as $key => $value) {
+
+ if(in_array($key, ['Particulars', ""])){
+ continue;
+ }
+
+ // Ensure the premium data is an array and not empty
+ if (!is_array($value) || empty($value)) {
+ continue;
+ }
+
+ // Step 1: Get the premium display_name order (excluding "Quote Asked")
+ $premiumOrder = array_keys(array_diff_key($value, ["Quote Asked" => ""]));
+
+ // Skip if no valid order found
+ if (empty($premiumOrder)) {
+ continue;
+ }
+
+ // usort($data['proposal_data']['over_all_column_data'][$key]['insurers'], function($a, $b) use ($premiumOrder) {
+ // return array_search($a['display_name'], $premiumOrder) - array_search($b['display_name'], $premiumOrder);
+ // });
+
+ // Step 2: Reorder proposal insurers based on premium order
+ usort($data['proposal_data']['over_all_column_data'][$key]['insurers'], function($a, $b) use ($premiumOrder) {
+ $posA = array_search($a['display_name'] ?? '', $premiumOrder);
+ $posB = array_search($b['display_name'] ?? '', $premiumOrder);
+
+ // If not found, push to the end
+ $posA = $posA === false ? PHP_INT_MAX : $posA;
+ $posB = $posB === false ? PHP_INT_MAX : $posB;
+
+ return $posA - $posB;
+ });
+
+ }
+
// Collect proposal keys that match the pattern "Proposal X"
foreach ($premiumProposals as $key) {
if (preg_match('/^(Proposal\s+\d+|Existing Renewal|Existing Rollover)$/', $key) && isset($data['proposal_data']['over_all_column_data'][$key])) {
@@ -1068,6 +1121,32 @@ class LeadsController extends BaseController
}
}
+ //Reorder the SubHeader of the Proposel
+ foreach ($sortedProposalOrder as $proposalKey => $proposalData) {
+ // Skip if insurers or subHeaders are missing
+ if (
+ !isset($proposalData['insurers']) ||
+ !is_array($proposalData['insurers']) ||
+ !isset($proposalHeaders[$proposalKey]['subHeaders']) ||
+ !is_array($proposalHeaders[$proposalKey]['subHeaders'])
+ ) {
+ continue;
+ }
+
+ // Keep "Quote Asked" fixed at index 0
+ $newSubHeaders = ["Quote Asked"];
+
+ // Add insurers in the sorted order
+ foreach ($proposalData['insurers'] as $insurer) {
+ if(in_array($insurer['display_name'], $proposalHeaders[$proposalKey]['subHeaders'])){
+ $newSubHeaders[] = $insurer['display_name'];
+ }
+ }
+
+ // Replace the subHeaders in the header array
+ $proposalHeaders[$proposalKey]['subHeaders'] = $newSubHeaders;
+ }
+
// dd($staticHeaders, $proposalHeaders, $sortedProposalOrder);
// Step 2: Reorder headers
@@ -1088,10 +1167,9 @@ class LeadsController extends BaseController
}
unset($value);
-
+ //merge the all headers
$reorderedHeaders = array_merge($staticHeaders, $reorderedHeaders, $actionHeader);
-
-
+
// Step 3: Reorder each row's `data` by matching parentth
foreach ($dataRows as $dataRowIndex => &$row) {
$staticData = [];
@@ -1137,6 +1215,12 @@ class LeadsController extends BaseController
}
unset($value);
+ //Reorder the Row Data based on the Insurer
+ $reorderedProposalData = $this->reorderProposalRowData($reorderedProposalData, $proposalHeaders);
+
+
+ // print_rr($reorderedProposalData); die;
+
$row['data'] = array_merge($staticData, $reorderedProposalData, $actionData);
}
@@ -1151,6 +1235,44 @@ class LeadsController extends BaseController
return $data;
}
+ private function reorderProposalRowData(array $proposalRowData, array $proposalHeaderData): array
+ {
+ $newRowData = [];
+
+ // Group rows by parentth
+ $groupedRows = [];
+ foreach ($proposalRowData as $row) {
+ if (!isset($row['parentth'])) {
+ continue; // skip invalid rows
+ }
+ $groupedRows[$row['parentth']][] = $row;
+ }
+
+ // Reorder each group's rows based on header subHeaders
+ foreach ($proposalHeaderData as $proposalKey => $headerInfo) {
+ if (
+ !isset($groupedRows[$proposalKey]) ||
+ !isset($headerInfo['subHeaders']) ||
+ !is_array($headerInfo['subHeaders'])
+ ) {
+ continue;
+ }
+
+ $order = $headerInfo['subHeaders'];
+ $rows = $groupedRows[$proposalKey];
+
+ // Sort whole rows according to subth position in $order
+ usort($rows, function ($a, $b) use ($order) {
+ return array_search($a['subth'], $order) - array_search($b['subth'], $order);
+ });
+
+ // Append sorted rows to final array
+ $newRowData = array_merge($newRowData, $rows);
+ }
+
+ return $newRowData;
+ }
+
private function renumberProposalKeys(array $input): array
{
$result = [];
@@ -1284,7 +1406,7 @@ class LeadsController extends BaseController
$lead_data = [
'Insured' => $rfq_data['client_name'],
'No of Employees at Inception' => $rfq_data['incept_emp_count'],
- 'Total Sum Insured at Inception ' => $rfq_data['total_si_at_incept'],
+ // 'Total Sum Insured at Inception ' => $rfq_data['total_si_at_incept'],
'Policy Period' => !empty($rfq_data['policy_start_date']) && !empty($rfq_data['policy_end_date']) ? date('d-m-Y', strtotime($rfq_data['policy_start_date'])) . ' to ' . date('d-m-Y', strtotime($rfq_data['policy_end_date'])) : "To be decided",
// 'Insurer' => $rfq_data['insurer_name'] ?? " - ",
// 'TPA' => $rfq_data['tpa_name'] ?? " - ",
@@ -1455,7 +1577,20 @@ class LeadsController extends BaseController
],
],
]);
- $subheader_count = array_sum(array_map(fn($header) => count($header['subHeaders']), $data['table_data']['headers']));
+
+ if($type == 2){
+ $subheader_count = array_sum(
+ array_map(
+ fn($header) => count(array_filter(
+ $header['subHeaders'],
+ fn($sub) => $sub !== "Quote Asked"
+ )),
+ $data['table_data']['headers']
+ )
+ );
+ }else{
+ $subheader_count = array_sum(array_map(fn($header) => count($header['subHeaders']), $data['table_data']['headers']));
+ }
if ($is_placement == false) {
$subheader_count = $subheader_count - 2;
@@ -1484,7 +1619,8 @@ class LeadsController extends BaseController
if ($type == 2) {
$subHeaderRow = $rowNumber + 1;
} else {
- $subHeaderRow = $rowNumber_for_remove_quote_asked;
+ // $subHeaderRow = $rowNumber_for_remove_quote_asked;
+ $subHeaderRow = $rowNumber + 1;
}
$columnLetter = 'A';
@@ -1505,6 +1641,13 @@ class LeadsController extends BaseController
if (!in_array($header['parentHeader'], ['Item Key', 'Action', 'Sno', 'Particulars'])) {
$header_actual_count++;
+
+ //Quote asked not showed in the QCR excel so some proposel has only one Quote Asked, So that case avoid the proposel name
+ $subHeaderCount = count($header['subHeaders'] ?? []) ?? 0;
+ if($subHeaderCount <= 1 && $type == 2 && $is_placement == false){
+ // print_rr($header);
+ continue;
+ }
}
if ($header['parentHeader'] === 'Sno') {
@@ -1525,7 +1668,14 @@ class LeadsController extends BaseController
}
$startColumn = $columnLetter; // Start of the current header range
- $subHeaderCount = count($header['subHeaders']); // Number of subheaders for this parent header
+ if($type == 2){
+ $subHeaderCount = count(array_filter($header['subHeaders'], function($subHeader) {
+ return $subHeader !== "Quote Asked";
+ }));
+ }else{
+ $subHeaderCount = count($header['subHeaders']); // Number of subheaders for this parent header
+ }
+
// Set parent header value
if ($is_placement == true && !in_array($header['parentHeader'], ['Particulars', 'S.No.'])) {
$sheet->setCellValue("{$startColumn}{$rowNumber}", "Terms");
@@ -1539,6 +1689,7 @@ class LeadsController extends BaseController
$sheet->setCellValue("{$startColumn}{$rowNumber}", "Proposal Terms " . $headerIndex);
}
}
+
$sheet->getStyle("{$startColumn}{$rowNumber}")->applyFromArray([
'font' => ['bold' => true],
'alignment' => [
@@ -1558,7 +1709,11 @@ class LeadsController extends BaseController
// Add subheaders
foreach ($header['subHeaders'] as $subHeader) {
- if ($type == 2 && $is_placement == false) {
+ if($type == 2 && in_array($subHeader, ['Quote Asked'])){
+ continue;
+ }
+
+ if ($is_placement == false) {
$sheet->setCellValue("{$columnLetter}{$subHeaderRow}", $subHeader);
}
@@ -1583,7 +1738,7 @@ class LeadsController extends BaseController
$length++;
}
}
-
+
if($header_actual_count == 1 && $type == 1){
$sheet->getColumnDimension('B')->setWidth(80);
}else{
@@ -1625,6 +1780,10 @@ class LeadsController extends BaseController
continue;
}
+ if($type == 2 && in_array($cellData['subth'], ['Quote Asked'])){
+ continue;
+ }
+
if ($cellData['parentth'] == 'Sno') {
$sheet->setCellValue("{$columnLetter}{$rowNumber}", $serial_no);
} else {
@@ -1651,7 +1810,7 @@ class LeadsController extends BaseController
//premium data
if ($type == 2) {
- if($is_placement == true){$columnLetterForPremium = "B";}else{$columnLetterForPremium = "C";}
+ if($is_placement == true){$columnLetterForPremium = "B";}else{$columnLetterForPremium = "B";}
$rowNumber += 2;
// Add premium data
@@ -1665,20 +1824,20 @@ class LeadsController extends BaseController
// $gstAmt = [$labelArray[1]];
// $total = [$labelArray[2]];
- if($is_placement == true){
+ // if($is_placement == true){
$premium[] = $labelArray[0];
$gstAmt[] = $labelArray[1];
$total[] = $labelArray[2];
- }
+ // }
foreach ($premiumData as $proposal => $insurers) {
if ($proposal != 'Particulars') {
foreach ($insurers as $insurer => $values) {
if($insurer == 'Quote Asked'){
- $premium[] = count($insurers ?? []) > 1 ? $labelArray[0] : "";
+ // $premium[] = count($insurers ?? []) > 1 ? $labelArray[0] : "";
// $gst[] = "";
- $gstAmt[] = count($insurers ?? []) > 1 ? $labelArray[1] : "";
- $total[] = count($insurers ?? []) > 1 ? $labelArray[2] : "";
+ // $gstAmt[] = count($insurers ?? []) > 1 ? $labelArray[1] : "";
+ // $total[] = count($insurers ?? []) > 1 ? $labelArray[2] : "";
}else{
$premium[] = formatIndianCurrency($values[$labelArray[0]]);
// $gst[] = $values[$labelArray[1]];
@@ -1912,7 +2071,7 @@ class LeadsController extends BaseController
return true;
}
- public function calculateMembersDemography($params)
+ public function calculateMembersDemography($params, $returnType = null)
{
$lead_id = $params['lead_id'];
$lead_data = $this->leadsModel->find($lead_id);
@@ -1921,87 +2080,102 @@ class LeadsController extends BaseController
if (!$lead_data) {
return ['status' => 'failed', 'message' => 'Lead data not found'];
}
- if ($lead_data['file_name']) {
- // $file_name_with_path = WRITEPATH . "/uploads/lead_files/NonPrintableCharacters.xlsx";
- //check physical file
- if (!file_exists($file_name_with_path)) {
- //file not found update status and reason
- $message = "Lead Physcial file not found";
- // echo $message;
- $this->myLogger->logme('error', ($message . ' for file ' . $file_name_with_path));
- return ['status' => 'failed', 'message' => 'no physical file'];
- }
+ try{
+ if ($lead_data['file_name']) {
+ // $file_name_with_path = WRITEPATH . "/uploads/lead_files/NonPrintableCharacters.xlsx";
- $spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($file_name_with_path);
-
- //get members data
- $members_sheet = $spreadsheet->getSheet(0);
- $highestRowAndColumn = $members_sheet->getHighestRowAndColumn();
- // dd($highestRowAndColumn);
- $uncleaned_members = $members_sheet->rangeToArray('A1:' . $highestRowAndColumn['column'] . $highestRowAndColumn['row']);
- $members = ExcelSanitizeHelper::sanitizeArrayData($uncleaned_members);
- //get age band data
- $age_band_sheet = $spreadsheet->getSheet(1);
- $highestRowAndColumn = $age_band_sheet->getHighestRowAndColumn();
- $age_band_data = $age_band_sheet->rangeToArray('A1:' . $highestRowAndColumn['column'] . $highestRowAndColumn['row']);
-
-
- //check age or dob column
- $members_heading = $members[0];
- $available_col = null;
- $col_index = null;
-
- if (in_array('age', array_map('strtolower', $members_heading))) {
- $available_col = 'age';
- $col_index = array_search('age', array_map('strtolower', $members_heading));
- } elseif (in_array('dob', array_map('strtolower', $members_heading))) {
- $available_col = 'dob';
- $col_index = array_search('dob', array_map('strtolower', $members_heading));
- }
-
- if ($available_col == null) {
- $message = 'No DOB or Age column ';
- $this->myLogger->logme('error', ($message . $file_name_with_path));
- return ['status' => 'failed', 'message' => $message];
- }
- try {
- $classifiers = $this->getDemographyData($members, $age_band_data, $members_heading, $available_col, $col_index);
- } catch (Exception $e) {
- return ['status' => 'fail', 'message' => $e->getMessage()];
- }
-
- try {
- $result = $this->generateClassifierSpreadsheet($classifiers, WRITEPATH . 'uploads/lead_files/');
- if ($result['success']) {
- $this->myLogger->logme('error', "Spreadsheet generated successfully!");
-
- echo "Location: " . $result['fullpath'] . "\n";
- echo "Filename: " . $result['filename'] . "\n";
- $filePaths = [
- ['file_path' => WRITEPATH . 'uploads/lead_files/' . $lead_data['file_name'], 'sheets' => [0, 1]],
- ['file_path' => WRITEPATH . '/uploads/lead_files/' . $result['filename'], 'sheets' => []],
- ];
- $outputPath = WRITEPATH . 'uploads/lead_files/' . $lead_data['file_name'];
- $result_merge = ExcelMergeHelper::mergeExcelFiles($filePaths, $outputPath);
- if ($result_merge) {
- // Call the delete function after the file is successfully created
- $deleteResponse = $this->deleteGeneratedFile($result['fullpath']);
-
- // Add delete message to response
- $response['deleteMessage'] = $deleteResponse['message'];
- return ['status' => 'success', 'message' => 'Member_Data Merged Suceesfully'];
- }
- } else {
- echo "Error generating spreadsheet: " . $result['error'];
+ //check physical file
+ if (!file_exists($file_name_with_path)) {
+ //file not found update status and reason
+ $message = "Lead Physcial file not found";
+ // echo $message;
+ $this->myLogger->logme('error', ($message . ' for file ' . $file_name_with_path));
+ return ['status' => 'failed', 'message' => 'no physical file'];
}
- } catch (Exception $e) {
- echo "Error: " . $e->getMessage();
- return ['status' => 'fail', 'message' => $e->getMessage()];
+
+ $spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($file_name_with_path);
+
+ //get members data
+ $members_sheet = $spreadsheet->getSheet(0);
+ $highestRowAndColumn = $members_sheet->getHighestRowAndColumn();
+ // dd($highestRowAndColumn);
+ $uncleaned_members = $members_sheet->rangeToArray('A1:' . $highestRowAndColumn['column'] . $highestRowAndColumn['row']);
+ $members = ExcelSanitizeHelper::sanitizeArrayData($uncleaned_members);
+ //get age band data
+ $age_band_sheet = $spreadsheet->getSheet(1);
+ $highestRowAndColumn = $age_band_sheet->getHighestRowAndColumn();
+ $age_band_data = $age_band_sheet->rangeToArray('A1:' . $highestRowAndColumn['column'] . $highestRowAndColumn['row']);
+
+
+ //check age or dob column
+ $members_heading = $members[0];
+ $available_col = null;
+ $col_index = null;
+
+ if (in_array('age', array_map('strtolower', $members_heading))) {
+ $available_col = 'age';
+ $col_index = array_search('age', array_map('strtolower', $members_heading));
+ } elseif (in_array('dob', array_map('strtolower', $members_heading))) {
+ $available_col = 'dob';
+ $col_index = array_search('dob', array_map('strtolower', $members_heading));
+ }
+
+ if ($available_col == null) {
+ $message = 'No DOB or Age column ';
+ $this->myLogger->logme('error', ($message . $file_name_with_path));
+ return ['status' => 'failed', 'message' => $message];
+ }
+
+ try {
+ $classifiers = $this->getDemographyData($members, $age_band_data, $members_heading, $available_col, $col_index);
+ } catch (Exception $e) {
+ return ['status' => 'fail', 'message' => $e->getMessage()];
+ }
+
+ //for this to view the demography in the RFQ and QCR page to using internal
+ if($returnType == "internal"){
+ return ['data' => $classifiers];
+ // print_rr($classifiers); die;
+ }
+
+
+ try {
+ $result = $this->generateClassifierSpreadsheet($classifiers, WRITEPATH . 'uploads/lead_files/');
+ if ($result['success']) {
+ $this->myLogger->logme('error', "Spreadsheet generated successfully!");
+
+ echo "Location: " . $result['fullpath'] . "\n";
+ echo "Filename: " . $result['filename'] . "\n";
+ $filePaths = [
+ ['file_path' => WRITEPATH . 'uploads/lead_files/' . $lead_data['file_name'], 'sheets' => [0, 1]],
+ ['file_path' => WRITEPATH . '/uploads/lead_files/' . $result['filename'], 'sheets' => []],
+ ];
+ $outputPath = WRITEPATH . 'uploads/lead_files/' . $lead_data['file_name'];
+ $result_merge = ExcelMergeHelper::mergeExcelFiles($filePaths, $outputPath);
+ if ($result_merge) {
+ // Call the delete function after the file is successfully created
+ $deleteResponse = $this->deleteGeneratedFile($result['fullpath']);
+
+ // Add delete message to response
+ $response['deleteMessage'] = $deleteResponse['message'];
+ return ['status' => 'success', 'message' => 'Member_Data Merged Suceesfully'];
+ }
+ } else {
+ echo "Error generating spreadsheet: " . $result['error'];
+ }
+ } catch (Exception $e) {
+ echo "Error: " . $e->getMessage();
+ return ['status' => 'fail', 'message' => $e->getMessage()];
+ }
+ } else {
+ $this->myLogger->logme('error', (' no file found ' . $file_name_with_path));
+ return ['status' => 'failed', 'message' => 'no file found'];
}
- } else {
- $this->myLogger->logme('error', (' no file found ' . $file_name_with_path));
- return ['status' => 'failed', 'message' => 'no file found'];
+
+ }catch(Exception $e){
+ $this->myLogger->logme("error", "Exception: " . $e->getMessage() . " --- Line: " . $e->getLine() . " --- Trace: " . $e->getTraceAsString());
+ return ['status' => 'fail', 'error' => "File not found / Wrong file"];
}
}
@@ -4668,4 +4842,55 @@ class LeadsController extends BaseController
return [];
}
+
+
+ public function generateDemographyDataTable($param)
+ {
+ $returnData = $this->calculateMembersDemography($param, "internal");
+
+ $html = "";
+
+ if (isset($returnData['data'])) {
+
+ $data = $returnData['data'];
+ foreach ($data as $category => $records) {
+ // Extract all column headers (age groups) dynamically
+ $allColumns = [];
+ foreach ($records as $person => $ages) {
+ $allColumns = array_merge($allColumns, array_keys($ages));
+ }
+ $allColumns = array_unique($allColumns);
+ $allColumns = array_values($allColumns); // reset index
+
+ $category = ucfirst($category);
+
+ // Start table with clean styling
+ $html .= "{$category}
";
+ $html .= "";
+
+ // Table header with light background
+ $html .= "";
+ $html .= "| Relation | ";
+ foreach ($allColumns as $col) {
+ $html .= "{$col} | ";
+ }
+ $html .= "
";
+
+ // Table rows with clean styling
+ foreach ($records as $relation => $ages) {
+ $html .= "";
+ $html .= "| {$relation} | ";
+ foreach ($allColumns as $col) {
+ $value = isset($ages[$col]) ? $ages[$col] : "-";
+ $html .= "{$value} | ";
+ }
+ $html .= "
";
+ }
+
+ $html .= "
";
+ }
+ }
+
+ return $html;
+ }
}
diff --git a/app/Controllers/PolicyTransactionController.php b/app/Controllers/PolicyTransactionController.php
index dddedd54..d6bc5167 100644
--- a/app/Controllers/PolicyTransactionController.php
+++ b/app/Controllers/PolicyTransactionController.php
@@ -35,6 +35,7 @@ use App\Models\COShareStmtDetailsModel;
use App\Models\BdsPlacementModel;
use Kint\Kint;
use App\Helpers\MailHelper;
+use App\Helpers\ExcelSanitizeHelper;
use Exception;
class PolicyTransactionController extends BaseController
@@ -2270,6 +2271,7 @@ class PolicyTransactionController extends BaseController
// dd($highestRowAndColumn);
$excel_data = $sheet->rangeToArray('A1:' . $highestRowAndColumn['column'] . $highestRowAndColumn['row']);
unset($excel_data[0]);
+ $excel_data = ExcelSanitizeHelper::sanitizeArrayData($excel_data);
// Kint::dump($excel_data);die();
//get no of line items and update in DB
$line_items = 0;
@@ -2384,6 +2386,7 @@ class PolicyTransactionController extends BaseController
// dd($highestRowAndColumn);
$excel_data = $sheet->rangeToArray('A1:' . $highestRowAndColumn['column'] . $highestRowAndColumn['row']);
unset($excel_data[0]);
+ $excel_data = ExcelSanitizeHelper::sanitizeArrayData($excel_data);
// dd($excel_data);
//get no of line items and update in DB
$line_items = count($excel_data);
diff --git a/app/Controllers/ThzController.php b/app/Controllers/ThzController.php
new file mode 100644
index 00000000..be2d0f5f
--- /dev/null
+++ b/app/Controllers/ThzController.php
@@ -0,0 +1,169 @@
+thzMasterModel = new ThzMasterModel();
+ $this->thzMasterNotesModel = new ThzMasterNotesModel();
+ $this->thzControllerCleaner = new ThzControllerCleaner();
+ }
+
+ public function index()
+ {
+ //
+ }
+
+ public function ticketSave(){
+
+ $data = $this->request->getJSON(true);
+
+ if (!empty($data['thz_id'])) {
+ $data['updated_by'] = get_session_userid();
+ $ticket_id = $data['thz_id'];
+ $text = "update";
+
+ $result = $this->thzMasterModel->where('thz_id', $ticket_id)->set($data)->update();
+ } else {
+ $data['created_by'] = get_session_userid();
+ $text = "create";
+
+ $result = $this->thzMasterModel->insert($data);
+ }
+
+ return $this->response->setJSON(([ 'status' => $result ? 'success' : 'error' ,
+ 'message' => $result ? "Ticket {$text}d successfully" : "Unable to {$text} ticket. Please try again." ]));
+
+
+
+
+ }
+
+
+ public function ticketList()
+ {
+
+ $returnType = strtolower($this->request->getGet('return_type') ?? 'api');
+
+ $data = $this->request->getJSON(true);
+
+ $tickets = $this->fetchTicketsBasedOnrole($data);
+
+
+
+ if ($returnType === 'api') {
+ if (empty($tickets)) {
+ return $this->response->setJSON([ 'status' => 'error','message' => 'No tickets found',])->setStatusCode(404);
+ }
+ }else{
+
+ $data['page_name'] = "Ticket List";
+ $data['ticket_data'] = $tickets;
+ $data['assigner'] = $this->userModel->where('is_active', 1)->findAll();
+ return $this->loadLayout('ticket_list_web', $data);
+ }
+
+
+
+ return $this->response->setJSON([
+ 'status' => 'success',
+ 'data' => $tickets,
+ ]);
+ }
+
+
+ public function ticketConversationSave(){
+
+ $data = $this->request->getJSON(true);
+
+ $result = $this->thzMasterNotesModel->insert($data);
+
+ if(empty($result)){
+ return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']));
+ }
+
+ return $this->response->setJSON((['status' => 'success', 'data' => $result]));
+
+
+ }
+
+ public function ticketConversationList(){
+
+ $data = $this->request->getJSON(true);
+
+ $thz_id = $data['thz_id'] ?? null;
+
+ $result = $this->thzMasterNotesModel->ticketConversationList($thz_id);
+
+ if(empty($result)){
+ return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']));
+ }
+
+ return $this->response->setJSON((['status' => 'success', 'data' => $result]));
+
+ }
+
+
+
+
+ /************************************************** PRIVATE FUNCTIONS ********************************************************/
+
+
+ private function checkGeneralUserOrEmployee($data){
+
+ if($data['empcode']){
+ return $data['empcode'];
+ } elseif ($data['mobile']) {
+ return $data['mobile'];
+ } elseif ($data['email']) {
+ return $data['email'];
+ } else {
+ return null;
+ }
+
+ }
+
+ private function fetchTicketsBasedOnrole(array $data): array
+ {
+ $id = $data['thz_id'] ?? null;
+ $assign_to = $data['assign_to'] ?? null;
+ $mobile = $data['mobile'] ?? null;
+
+ if (!empty($assign_to)) {
+ // Tickets assigned to a staff
+ return $this->thzMasterModel
+ ->where('assign_to', $assign_to)
+ ->findAll();
+ }
+
+ if (!empty($id) && !empty($mobile)) {
+ // Specific ticket by ID and mobile
+ return $this->thzMasterModel
+ ->where('thz_id', $id)
+ ->where('mobile', $mobile)
+ ->findAll();
+ }
+
+ // All tickets (e.g., for managers)
+ return $this->thzMasterModel->findAll();
+ }
+
+
+
+}
+
diff --git a/app/Controllers/TicketController.php b/app/Controllers/TicketController.php
index 5e119628..4c344c28 100644
--- a/app/Controllers/TicketController.php
+++ b/app/Controllers/TicketController.php
@@ -95,6 +95,7 @@ class TicketController extends BaseController
4 => "Smart Service Desk",
5 => "Direct to TPA"
];
+
$this->claimType = [
1 => [
1 => "Main Hospitalization",
@@ -829,11 +830,25 @@ class TicketController extends BaseController
$data['ticket_data'] = $ticket_data;
$data['acms'] = $this->employeeModel->getAcmUsingClientID($ticket_data['client_id']);
- $raw_json = $this->ticketMasterModel->getPolicyTermsJson($ticket_id) ;
-
- $decoded_top = json_decode($raw_json ?? "", true) ?? [];
- $data['policy_terms'] = $this->recursive_json_decode($decoded_top);
+ // do not remove this
+ // $raw_json = $this->ticketMasterModel->getPolicyTermsJson($ticket_id) ;
+ // $decoded_top = json_decode($raw_json ?? "", true) ?? [];
+ // $data['policy_terms'] = $this->recursive_json_decode($decoded_top);
+
+ $policy_data = $this->ticketMasterModel
+ ->select('client_policy.policy_terms')
+ ->join('client_policy', 'ticket_master.client_policy_id = client_policy.id')
+ ->where('client_policy.is_active', 1)
+ ->where('ticket_master.is_active', 1)
+ ->where('ticket_master.id', $ticket_id)
+ ->first();
+
+ if(isset($policy_data['policy_terms']) && !empty($policy_data['policy_terms'])){
+ $terms = json_decode($policy_data['policy_terms'], true);
+ $data['policy_terms'] = $this->convertTermsToDisplay($terms);
+ // print_rr($data); die;
+ }
return $this->loadLayout('ticket_edit_onbording', $data);
}
@@ -2232,7 +2247,8 @@ class TicketController extends BaseController
}
}
- public function recursive_json_decode($input) {
+ public function recursive_json_decode($input)
+ {
if (is_string($input)) {
$decoded = json_decode($input, true);
if (json_last_error() === JSON_ERROR_NONE) {
@@ -2251,6 +2267,182 @@ class TicketController extends BaseController
return $input;
}
+ function convertTermsToDisplay(array $data)
+ {
+ $result = [];
+
+ $LableKeys = [
+ "sum_insured" => "Sum Insured",
+ "family_floater" => "Family Floater",
+ "family_floaters" => "Family Floater Details",
+ "age_ratio" => "Age Ratio",
+ "is_payable_employee" => "Payable by Employee",
+ "waiverofpreexistingdiseases" => "Waivers of Pre Existing Diseases",
+ "waiverof1,2,3&4thyearexclusions" => "Waivers of 1, 2, 3 & 4th Year Exclusions",
+ "waiverof30dayswaitingperiod" => "Waivers of 30 Days Waiting Period",
+ "waiver_of_90_days_waiting_period" => "Waiver of 90 Days Waiting Period",
+ "waiver_of_other_waiting_periods" => "Waiver of Other Waiting Periods",
+ "maternity_benefit" => "Maternity Benefit",
+ "9monthwaitingperiodwaived" => "9 Month Waiting Period Waived",
+ "maternitycoverage" => "Maternity Coverage",
+ "twindelivery" => "Twin Delivery",
+ "well_baby_well_mother_expenses" => "Well Baby & Well Mother Expenses",
+ "preandpostnatal" => "Pre and Post Natal",
+ "infertility_treatment_coverage" => "Infertility Treatment Coverage",
+ "babyday1cover" => "Baby Day 1 Cover",
+ "coverfromthedateofjoining" => "Cover from the Date of Joining",
+ "mid_term_addition_of_new_born_newly_wedded_spouse" => "Mid Term Addition of New Born / Newly Wedded Spouse",
+ "prehospitalizationcover" => "Pre Hospitalization Cover",
+ "posthospitalizationcover" => "Post Hospitalization Cover",
+ "congenitaldiseasesinternal" => "Congenital Diseases - Internal",
+ "congenitaldiseasesexternal" => "Congenital Diseases - External",
+ "copayzonewisecopay" => "Co-Pay (Zone Wise)",
+ "roomrentlimit" => "Room Rent Limit",
+ "icu_limit" => "ICU Limit",
+ "proportionatedeductionclause" => "Proportionate Deduction Clause",
+ "ailmentcapping" => "Ailment Capping",
+ "ailment_capping_details" => "Ailment Capping Details",
+ "corporatebuffer" => "Corporate Buffer",
+ "non_admissible_contingency_corporate_buffer" => "Non-Admissible Contingency Corporate Buffer",
+ "ambulancecharges" => "Ambulance Charges",
+ "airambulance" => "Air Ambulance",
+ "reasonableandcustomarycharges" => "Reasonable and Customary Charges",
+ "daycaretreatment" => "Day Care Treatment",
+ "lasiksurgery" => "Lasik Surgery",
+ "ayudhtreatmentcover" => "Ayudh Treatment Cover",
+ "moderntreatmentsasperirdai" => "Modern Treatments as per IRDAI",
+ "opd_treatment" => "OPD Treatment",
+ "days_of_discharge" => "Days of Discharge",
+ "days_from_dod" => "Days from Date of Discharge",
+ "terrorism" => "Terrorism Cover",
+ "widower_cover" => "Widower Cover",
+ "breavement_cover" => "Breavement Cover",
+ "suminsuredenhancement" => "Sum Insured Enhancement",
+ "special_condition_label" => "Special Condition Label",
+ "special_condition_input" => "Special Condition Input"
+ ];
+
+ // // 1. Family Floaters
+ // $floatersMap = [
+ // 'self' => 'Self',
+ // 'spouse' => 'Spouse',
+ // 'childrens' => 'Childrens',
+ // 'parents' => 'Parents',
+ // 'parents-in-law' => 'Parents-in-law',
+ // 'either-parents-pil' => 'Either Parents/PIL',
+ // 'elders_count' => 'Elders'
+ // ];
+
+ // 1. Family Floaters
+ $floatersMap = [
+ 'self' => 'Self',
+ 'spouse' => 'Spouse',
+ 'childrens' => 'Childrens',
+ 'parents' => 'Parents',
+ 'parents-in-law' => 'Parents-in-law',
+ 'either-parents-pil' => 'Either Parents/PIL',
+ 'elders_count' => 'Total Elders Count'
+ ];
+
+ if(isset($data['family_floaters'])){
+ $floatersOutput = [];
+ foreach ($floatersMap as $key => $label) {
+ if (isset($data['family_floaters'][$key])) {
+ $val = $data['family_floaters'][$key];
+ $floatersOutput[] = "$label : " . ($val > 0 ? $val : 'No');
+ }
+ }
+ $data['family_floaters'] = implode(', ', $floatersOutput);
+ }
+
+ // 2. Age Ratio
+ if (!empty($data['age_ratio'])) {
+ $ageOutput = [];
+ foreach ($data['age_ratio'] as $person => $age) {
+ if (isset($age['min']) && isset($age['max'])) {
+ // $ageOutput[] = ucfirst($person) . " - Min : {$age['min']}, Max : {$age['max']}";
+ $ageOutput[] = "" . ucfirst($person) . " - Min : {$age['min']}, Max : {$age['max']}";
+ }
+ }
+ $data['age_ratio'] = implode(', ', $ageOutput);
+ }
+
+ // 3. Is Payable Employee
+ if (!empty($data['is_payable_employee'])) {
+ $payableOutput = [];
+ foreach ($data['is_payable_employee'] as $person => $status) {
+ // $payableOutput[] = ucfirst($person) . " : " . ($status ? 'Yes' : 'No');
+ $payableOutput[] = "" . ucfirst($person) . " : " . ($status ? 'Yes' : 'No');
+ }
+ $data['is_payable_employee'] = implode(', ', $payableOutput);
+ }
+
+ // 4. Remove the Enrollment display key
+ if(isset($data['enrollment_display_key'])){
+ unset($data['enrollment_display_key']);
+ }
+
+ // 5. Merge the Sum Insured value if the multiple sum insured exists
+ if(isset($data['multiple_sum_insured'])){
+ if(isset($data['sumInsured2'])){
+ $data['sumInsured2'] = $data['sumInsured2'] . ", " . implode(", ", $data['multiple_sum_insured']);
+ }else{
+ $data['sum_insured'] = $data['sum_insured'] . ", " . implode(", ", $data['multiple_sum_insured']);
+ }
+ unset($data['multiple_sum_insured']);
+ }
+
+ // 6. Add the special condition to key value pair
+
+ if(!empty($data['special_condition_label'])){
+ foreach ($data['special_condition_label'] as $key => $value) {
+ if($value != "" && $value != null) {
+ $data[$value] = $data['special_condition_input'][$key];
+ }
+ }
+ }//GMC
+
+ if(!empty($data['gpa_special_condition_label'])){
+ foreach ($data['gpa_special_condition_label'] as $key => $value) {
+ if($value != "" && $value != null) {
+ $data[$value] = $data['gpa_special_condition_input'][$key];
+ }
+ }
+ }//GPA
+
+ // 7. Remove the special condition keys
+ unset($data['special_condition_label']);
+ unset($data['special_condition_input']);
+ unset($data['gpa_special_condition_label']);
+ unset($data['gpa_special_condition_input']);
+
+ if(isset($data['sumInsured2'])){
+ $firstItem = ["Sum Insured" => $data['sumInsured2']];
+ unset($data['sumInsured2']);
+ $data = $firstItem + $data;
+ }
+
+ // 8. Change the key name to lable name
+ $result = [];
+ foreach ($data as $key => $value) {
+
+ // $label = isset($LableKeys[$key]) ? $LableKeys[$key] : $key;
+ if (isset($LableKeys[$key])) {
+ $label = $LableKeys[$key];
+ // echo "1";
+ } else {
+ // Handle camelCase first, then snake_case
+ $label = preg_replace('/(?request->getJSON(true);
+
+
+ helper('api');
+
+ $url = ''. getenv('VIDAL_API_BASE_URL').'/hospitalnetwork';
+ $method = 'POST';
+
+ $headers = [
+ 'Content-Type: application/json',
+ 'Authorization:'. getenv('VIDAL_API_KEY').'',
+ 'username:'. getenv('VIDAL_API_USERNAME').'',
+ 'password:'. getenv('VIDAL_API_PASSWORD').'',
+ 'policynumber:'. $postData['policyNo'] ?? '',
+ ];
+
+
+
+ $body = [];
+
+ $response = call_third_party_api($url, $method, $headers, $body);
+
+
+ if($response['status'] != true){
+ return $this->response->setJSON([
+ 'status' => false,
+ 'message' => 'Token generation failed.',
+ 'data' => $response
+ ]);
+ }
+
+ return $this->response->setJSON($response);
+
+ }
+
+ public function eCardService(){
+
+ $postData = $this->request->getJSON(true);
+
+ helper('api');
+
+ $url = ''. getenv('VIDAL_API_BASE_URL').'/ecardservice';
+ $method = 'POST';
+
+
+ $headers = [
+ 'Content-Type: application/json',
+ 'Authorization:'.getenv('VIDAL_API_KEY').'',
+ 'username:' .getenv('VIDAL_API_USERNAME').'',
+ 'password:' .getenv('VIDAL_API_PASSWORD').'',
+ 'PolicyNo:' .$postData['PolicyNo'] ?? '',
+ 'enrollmentNo:' .$postData['enrollmentNo'] ?? '',
+ ];
+
+ $body = [
+ ];
+
+ $response = call_third_party_api($url, $method, $headers, $body);
+
+ if($response['status'] != true){
+ return $this->response->setJSON([
+ 'status' => false,
+ 'message' => 'Token generation failed.',
+ 'data' => $response
+ ]);
+ }
+
+ return $this->response->setJSON($response);
+
+ }
+
+ public function claimStatusCheck(){
+
+ $postData = $this->request->getJSON(true);
+
+ helper('api');
+
+ $url = ''. getenv('VIDAL_API_BASE_URL').'/claimpreauthservice';
+ $method = 'POST';
+
+ $headers = [
+ 'Content-Type: application/json',
+ 'Authorization:' .getenv('VIDAL_API_KEY').'',
+ 'username:' .getenv('VIDAL_API_USERNAME').'',
+ 'password:' .getenv('VIDAL_API_PASSWORD').'',
+ 'PolicyNo:' .$postData['policyNo'] ?? '',
+ 'enrollmentNo:' .$postData['enrollmentNo'] ?? '',
+ 'empNo:' .$postData['empNo'] ?? '',
+ 'startdate:' .$postData['startdate'] ?? '',
+ 'enddate:' .$postData['enddate'] ?? '',
+ 'tpaclaimNo:' .$postData['tpaclaimNo'] ?? ''
+ ];
+
+ $body = [];
+
+ $response = call_third_party_api($url, $method, $headers, $body);
+
+ if($response['status'] != true){
+ return $this->response->setJSON([
+ 'status' => false,
+ 'message' => 'Token generation failed.',
+ 'data' => $response
+ ]);
+ }
+
+ return $this->response->setJSON($response);
+
+ }
+
+ public function newClaim(){
+
+ $postData = $this->request->getPost();
+
+ helper('api');
+
+ $url = ''. getenv('VIDAL_API_BASE_URL').'/submitClaim';
+ $method = 'POST';
+
+ $headers = [
+ 'Content-Type: multipart/form-data',
+ 'Authorization:' .getenv('VIDAL_API_KEY').'',
+ ];
+
+ $body = [
+ 'username:' .getenv('VIDAL_API_USERNAME').'',
+ 'password:' .getenv('VIDAL_API_PASSWORD').'',
+ 'PolicyNo:' .$postData['policyNo'] ?? '',
+ 'enrollmentId:' .$postData['enrollmentId'] ?? '',
+ 'typeOfClaim:' .$postData['typeOfClaim'] ?? '',
+ 'claimSubType:' .$postData['claimSubType'] ?? '',
+ 'requestedAmount:' .$postData['requestedAmount'] ?? '',
+ 'ailmentType:' .$postData['ailmentType'] ?? '',
+ 'admissionDate:' .$postData['admissionDate'] ?? '',
+ 'dischargeDate:' .$postData['dischargeDate'] ?? '',
+ 'hospitalName:' .$postData['hospitalName'] ?? '',
+ 'empanelmentNo:' .$postData['empanelmentNo'] ?? '',
+ 'documentType:' .$postData['documentType'] ?? '',
+ 'ailmentName:' .$postData['ailmentName'] ?? '',
+ 'hospitalAddress:' .$postData['hospitalAddress'] ?? '',
+ 'hospitalState:' .$postData['hospitalState'] ?? '',
+ 'hospitalCity:' .$postData['hospitalCity'] ?? '',
+ 'hospitalPinCode:' .$postData['hospitalPinCode'] ?? '',
+ 'hospitalPhoneNo:' .$postData['hospitalPhoneNo'] ?? ''
+ ];
+
+ $response = call_third_party_api($url, $method, $headers, $body);
+
+ if($response['status'] != true){
+ return $this->response->setJSON([
+ 'status' => false,
+ 'message' => 'Token generation failed.',
+ 'data' => $response
+ ]);
+ }
+
+ return $this->response->setJSON($response);
+
+ }
+
+
+ public function enrollment(){
+
+ $postData = $this->request->getJSON(true);
+
+ helper('api');
+
+ $url = ''. getenv('VIDAL_API_BASE_URL').'/enrollmendataservice';
+ $method = 'POST';
+
+ $headers = [
+ 'Content-Type: application/json',
+ 'Authorization:'. getenv('VIDAL_API_KEY').'',
+ 'username:' . getenv('VIDAL_API_USERNAME').'',
+ 'password:' . getenv('VIDAL_API_PASSWORD').'',
+ 'policyNo:' .$postData['policyNo'] ?? '',
+ 'startindex:' .$postData['startindex'] ?? '',
+ 'endindex:' .$postData['endindex'] ?? ''
+ ];
+
+ $body = [
+ ];
+
+ $response = call_third_party_api($url, $method, $headers, $body);
+
+
+ if($response['status'] != true){
+ return $this->response->setJSON([
+ 'status' => false,
+ 'message' => 'Token generation failed.',
+ 'data' => $response
+ ]);
+ }
+
+ return $this->response->setJSON($response);
+ }
+
+
+}
diff --git a/app/Models/PolicyTransactionModel.php b/app/Models/PolicyTransactionModel.php
index ba9b2fcd..c1249a7d 100644
--- a/app/Models/PolicyTransactionModel.php
+++ b/app/Models/PolicyTransactionModel.php
@@ -767,11 +767,17 @@ class PolicyTransactionModel extends Model
) AS unbilled_amt,
created_user.first_name as user_name,
CASE
- WHEN `pt_co_share_details`.`co_share_type` IN (0, 1) THEN `policy_transaction`.`policy_no`
- WHEN `pt_co_share_details`.`co_share_type` > 1 THEN `pt_co_share_details`.`follower_policy_no`
- ELSE `policy_transaction`.`policy_no` -- Default fallback
- END AS `policy_no`
-
+ WHEN pt_co_share_details.co_share_type IN (0, 1)
+ THEN policy_transaction.policy_no
+ WHEN pt_co_share_details.co_share_type > 1
+ THEN CASE
+ WHEN pt_co_share_details.follower_policy_no IS NULL
+ OR pt_co_share_details.follower_policy_no = ''
+ THEN policy_transaction.policy_no
+ ELSE pt_co_share_details.follower_policy_no
+ END
+ ELSE policy_transaction.policy_no
+ END AS policy_no
")
->join('pt_co_share_details', 'policy_transaction.id = pt_co_share_details.pt_id', 'left')
// ->join('insurer_statements', 'pt_co_share_details.statement_id = insurer_statements.id', 'left')
@@ -993,10 +999,17 @@ class PolicyTransactionModel extends Model
DATE_FORMAT(policy_transaction.created_at, '%d %b %Y %h:%i %p') AS created_at,
user_profiles.first_name as user_name,
CASE
- WHEN `pt_co_share_details`.`co_share_type` IN (0, 1) THEN `policy_transaction`.`policy_no`
- WHEN `pt_co_share_details`.`co_share_type` > 1 THEN `pt_co_share_details`.`follower_policy_no`
- ELSE `policy_transaction`.`policy_no` -- Default fallback
- END AS `policy_no`
+ WHEN pt_co_share_details.co_share_type IN (0, 1)
+ THEN policy_transaction.policy_no
+ WHEN pt_co_share_details.co_share_type > 1
+ THEN CASE
+ WHEN pt_co_share_details.follower_policy_no IS NULL
+ OR pt_co_share_details.follower_policy_no = ''
+ THEN policy_transaction.policy_no
+ ELSE pt_co_share_details.follower_policy_no
+ END
+ ELSE policy_transaction.policy_no
+ END AS policy_no
")
->join('pt_co_share_details', 'policy_transaction.id = pt_co_share_details.pt_id', 'left')
->join('clients', 'clients.id = policy_transaction.client_id', 'left')
@@ -1068,7 +1081,7 @@ class PolicyTransactionModel extends Model
{
// dd($start_date, $end_date, $client_id, $insurer_id, $policy_type_id, $date_type, $issuer, $status);
$builder = $this->db->table('policy_transaction')
- ->select('
+ ->select("
policy_transaction.*,
clients.short_name as client_short_name,
clients.client_code,
@@ -1077,11 +1090,18 @@ class PolicyTransactionModel extends Model
insurers.short_name AS insurer_short_name,
policy_type.policy_type ,
CASE
- WHEN `pt_co_share_details`.`co_share_type` IN (0, 1) THEN `policy_transaction`.`policy_no`
- WHEN `pt_co_share_details`.`co_share_type` > 1 THEN `pt_co_share_details`.`follower_policy_no`
- ELSE `policy_transaction`.`policy_no` -- Default fallback
- END AS `policy_no`
- ')
+ WHEN pt_co_share_details.co_share_type IN (0, 1)
+ THEN policy_transaction.policy_no
+ WHEN pt_co_share_details.co_share_type > 1
+ THEN CASE
+ WHEN pt_co_share_details.follower_policy_no IS NULL
+ OR pt_co_share_details.follower_policy_no = ''
+ THEN policy_transaction.policy_no
+ ELSE pt_co_share_details.follower_policy_no
+ END
+ ELSE policy_transaction.policy_no
+ END AS policy_no
+ ")
->join('pt_co_share_details', 'policy_transaction.id = pt_co_share_details.pt_id', 'left')
->join('clients', 'policy_transaction.client_id = clients.id', 'left')
->join('client_branch', 'policy_transaction.client_branch_id = client_branch.id', 'left')
@@ -1245,12 +1265,17 @@ class PolicyTransactionModel extends Model
2
) AS variance_amt,
CASE
- WHEN `pt_co_share_details`.`co_share_type` IN (0, 1) THEN `policy_transaction`.`policy_no`
- WHEN `pt_co_share_details`.`co_share_type` > 1 THEN `pt_co_share_details`.`follower_policy_no`
- ELSE `policy_transaction`.`policy_no` -- Default fallback
- END AS `policy_no`
-
-
+ WHEN pt_co_share_details.co_share_type IN (0, 1)
+ THEN policy_transaction.policy_no
+ WHEN pt_co_share_details.co_share_type > 1
+ THEN CASE
+ WHEN pt_co_share_details.follower_policy_no IS NULL
+ OR pt_co_share_details.follower_policy_no = ''
+ THEN policy_transaction.policy_no
+ ELSE pt_co_share_details.follower_policy_no
+ END
+ ELSE policy_transaction.policy_no
+ END AS policy_no
")
->join('pt_co_share_details', 'policy_transaction.id = pt_co_share_details.pt_id', 'left')
->join('insurer_statements', 'pt_co_share_details.statement_id = insurer_statements.id', 'left')
@@ -1348,10 +1373,17 @@ class PolicyTransactionModel extends Model
'pt_co_share_details.tep_amt',
'policy_transaction.status',
'CASE
- WHEN `pt_co_share_details`.`co_share_type` IN (0, 1) THEN `policy_transaction`.`policy_no`
- WHEN `pt_co_share_details`.`co_share_type` > 1 THEN `pt_co_share_details`.`follower_policy_no`
- ELSE `policy_transaction`.`policy_no` -- Default fallback
- END AS `policy_no`'
+ WHEN pt_co_share_details.co_share_type IN (0, 1)
+ THEN policy_transaction.policy_no
+ WHEN pt_co_share_details.co_share_type > 1
+ THEN CASE
+ WHEN pt_co_share_details.follower_policy_no IS NULL
+ OR pt_co_share_details.follower_policy_no = ""
+ THEN policy_transaction.policy_no
+ ELSE pt_co_share_details.follower_policy_no
+ END
+ ELSE policy_transaction.policy_no
+ END AS policy_no'
])
->join('pt_co_share_details', 'policy_transaction.id = pt_co_share_details.pt_id', 'left')
->join('clients', 'clients.id = policy_transaction.client_id', 'left')
@@ -1443,10 +1475,17 @@ class PolicyTransactionModel extends Model
pt_co_share_details.variance,
policy_transaction.status,
CASE
- WHEN `pt_co_share_details`.`co_share_type` IN (0, 1) THEN `policy_transaction`.`policy_no`
- WHEN `pt_co_share_details`.`co_share_type` > 1 THEN `pt_co_share_details`.`follower_policy_no`
- ELSE `policy_transaction`.`policy_no` -- Default fallback
- END AS `policy_no`
+ WHEN pt_co_share_details.co_share_type IN (0, 1)
+ THEN policy_transaction.policy_no
+ WHEN pt_co_share_details.co_share_type > 1
+ THEN CASE
+ WHEN pt_co_share_details.follower_policy_no IS NULL
+ OR pt_co_share_details.follower_policy_no = ''
+ THEN policy_transaction.policy_no
+ ELSE pt_co_share_details.follower_policy_no
+ END
+ ELSE policy_transaction.policy_no
+ END AS policy_no
")
->join('pt_co_share_details', 'policy_transaction.id = pt_co_share_details.pt_id', 'left')
->join('clients', 'clients.id = policy_transaction.client_id', 'left')
@@ -1554,11 +1593,18 @@ class PolicyTransactionModel extends Model
AND inv_payment_details.is_active = 1
),
2) AS outstanding_amount,
- CASE
- WHEN `pt_co_share_details`.`co_share_type` IN (0, 1) THEN `policy_transaction`.`policy_no`
- WHEN `pt_co_share_details`.`co_share_type` > 1 THEN `pt_co_share_details`.`follower_policy_no`
- ELSE `policy_transaction`.`policy_no` -- Default fallback
- END AS `policy_no`
+ CASE
+ WHEN pt_co_share_details.co_share_type IN (0, 1)
+ THEN policy_transaction.policy_no
+ WHEN pt_co_share_details.co_share_type > 1
+ THEN CASE
+ WHEN pt_co_share_details.follower_policy_no IS NULL
+ OR pt_co_share_details.follower_policy_no = ''
+ THEN policy_transaction.policy_no
+ ELSE pt_co_share_details.follower_policy_no
+ END
+ ELSE policy_transaction.policy_no
+ END AS policy_no
")
->join('pt_co_share_details', 'policy_transaction.id = pt_co_share_details.pt_id', 'left')
->join('insurer_statements', 'pt_co_share_details.statement_id = insurer_statements.id', 'left')
diff --git a/app/Models/ThzMasterModel.php b/app/Models/ThzMasterModel.php
new file mode 100644
index 00000000..410a84ba
--- /dev/null
+++ b/app/Models/ThzMasterModel.php
@@ -0,0 +1,42 @@
+ $thz_id ];
+
+ $result = $this->db->query($sql,$binds)->getResultArray() ;
+
+ return $result;
+
+ }
+
+
+}
diff --git a/app/Views/DashBoard.php b/app/Views/DashBoard.php
index 08e08855..b0cefc4e 100755
--- a/app/Views/DashBoard.php
+++ b/app/Views/DashBoard.php
@@ -171,79 +171,109 @@
margin: 0 5px 10px!important;
}
+ .nav-link{
+ color:black !important;
+ background-color: #D4F5F6 !important;
+ font-size: small;
+ padding:8px;
+ border-radius: 10px !important;
+ }
+ .nav-link.active-tab {
+ color: white !important;
+ background-color: #00999E !important;
+ font-size: small;
+ padding:8px;
+ border-radius: 10px !important;
+
+ }
+ .tab-content-styles{
+ background-color:#F4F4F4;
+ margin-right:20px;
+ border-radius:25px!important;
+ min-height: 70vh !important;
+ }
+
+
+Dashboard
+
-
-
-
+
-
+
+
+
@@ -257,7 +287,6 @@
-
+
+
+
+
+

+
+
+
+
+
+
+
+
+