CHANGE_ hr file upload : GWM
@ -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
|
||||
@ -371,6 +372,9 @@ $routes->group("/util", ["filter" => "authMVC"], function ($routes) {
|
||||
$routes->get('viewHrAccessData', 'ClientController::viewHrAccessData');
|
||||
$routes->post('saveHrAccessData', 'ClientController::saveHrAccessData');
|
||||
$routes->get('removeLevelContacts', 'ClientController::removeLevelContacts');
|
||||
$routes->get('getClaimDumpFileErrorData', 'TicketController::getClaimDumpFileErrorData');
|
||||
$routes->get("claim_dump_excel_error/(:any)", "TicketController::getClaimDumpExcelFileErrors/$1");
|
||||
$routes->get("download_claim_dump_file/(:any)", "TicketController::downloadClaimDumpFile/$1");
|
||||
});
|
||||
|
||||
$routes->post("policy_tranction/sendInstallmentRemainderMail","PolicyTransactionController::sendInstallmentRemainderMail");
|
||||
@ -552,7 +556,13 @@ $routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) {
|
||||
$routes->get("claimView", "EmployeeRestController::claimView");
|
||||
$routes->get("exportCashDepositData", "EmployeeRestController::exportCashDepositData");
|
||||
|
||||
//hr file upload api's
|
||||
|
||||
//thz_master's
|
||||
$routes->post("ticketSave", "ThzController::ticketSave");
|
||||
$routes->get("ticketList", "ThzController::ticketList");
|
||||
$routes->post("ticketConversationSave", "ThzController::ticketConversationSave");
|
||||
$routes->get("ticketConversationList", "ThzController::ticketConversationList");
|
||||
|
||||
$routes->get("hrFileList", "EmployeeRestController::hrFileList");
|
||||
$routes->get("hrFileUploadMasters", "EmployeeRestController::hrFileUploadMasters");
|
||||
$routes->get("hrFileDownload", "EmployeeRestController::hrFileDownload");
|
||||
@ -645,4 +655,8 @@ $routes->post('newClaim','VidalApiController::newClaim');
|
||||
$routes->post('enrollment','VidalApiController::enrollment');
|
||||
|
||||
|
||||
$routes->post("ticketCreation", "ThzController::ticketCreation");
|
||||
$routes->post("ticketSave", "ThzController::ticketSave");
|
||||
$routes->get("ticketList", "ThzController::ticketList");
|
||||
$routes->post("ticketConversationSave", "ThzController::ticketConversationSave");
|
||||
$routes->get("ticketConversationList", "ThzController::ticketConversationList");
|
||||
$routes->post('ticketAutoFetchDetails',"ThzController::ticketAutoFetchDetails");
|
||||
@ -143,7 +143,11 @@ class ClientController extends AdminController
|
||||
|
||||
// Perform the query
|
||||
$builder = $db->table($table);
|
||||
$isDuplicate = $builder->where($field, $value)->where('is_active', 1)->countAllResults() > 0;
|
||||
if(is_array($value)){
|
||||
$isDuplicate = $builder->where($value)->where('is_active', 1)->countAllResults() > 0;
|
||||
}else{
|
||||
$isDuplicate = $builder->where($field, $value)->where('is_active', 1)->countAllResults() > 0;
|
||||
}
|
||||
|
||||
// Return the result
|
||||
return $this->response->setJSON(['isDuplicate' => $isDuplicate]);
|
||||
@ -5037,7 +5041,16 @@ class ClientController extends AdminController
|
||||
|
||||
// $employeeController = new EmployeeController();
|
||||
// $employeeController->truncateFileData('633');
|
||||
|
||||
|
||||
// ---------- TICKET SERVICE CONTROLLER --------------------------------------------------------------------------------
|
||||
|
||||
$ticketServiceController = new TicketServiceController();
|
||||
// $response = $ticketServiceController->claimDumpExcelFileFormatValidation(["file_id" => 3]);
|
||||
// $response = $ticketServiceController->claimDumpExcelFileDataValidation(["file_id" => 3]);
|
||||
// $response = $ticketServiceController->claimDumpOnBoardProcess(["file_id" => 3]);
|
||||
// $response = $ticketServiceController->extractExcelData("claims_dump_form_client.xlsx");
|
||||
// dd($response);
|
||||
|
||||
// ---------- EMP SERVICE CONTROLLER --------------------------------------------------------------------------------
|
||||
|
||||
$empServiceController = new EmployeeServiceController();
|
||||
@ -5054,18 +5067,18 @@ class ClientController extends AdminController
|
||||
// ---------- POLICY TRANSACTION CONTROLLER --------------------------------------------------------------------------------
|
||||
|
||||
$policyTransactionController = new PolicyTransactionController();
|
||||
// $res = $policyTransactionController->validateInsurerStatement(['file_id' => '17']);
|
||||
// $res = $policyTransactionController->validateInsurerStatement(['file_id' => '57']);
|
||||
// $res = $policyTransactionController->updateInsurerStatement(['file_id' => '22']);
|
||||
// dd('-----', $res);
|
||||
|
||||
// ----------EMP DATA SERVICE CONTROLLER--------------------------------------------------------------------------------
|
||||
|
||||
$batch_data = [
|
||||
'client_id' => 20,
|
||||
'client_branch_id' => 72,
|
||||
'client_policy_id' => 127,
|
||||
'client_id' => 51,
|
||||
'client_branch_id' => 40,
|
||||
'client_policy_id' => 63,
|
||||
'insurer_or_tpa' => "insurer",
|
||||
'event_type' => "deletion",
|
||||
'event_type' => "correction",
|
||||
'actions' => "export",
|
||||
'file_name' => "deletion_enhancement_test_file.xlsx",
|
||||
];
|
||||
@ -5132,25 +5145,30 @@ class ClientController extends AdminController
|
||||
// $EmpDataServiceController->cashDepositCalculationForDeletion($array);
|
||||
|
||||
// $result = $this->employeePolicyModel->getInceptionEmployeeDataForExportExcel($batch_data);
|
||||
// $result = $this->employeePolicyModel->getCorrectionEmployeesDataForExportExcel($batch_data);
|
||||
// dd(db_connect()->getLastQuery());
|
||||
|
||||
// ------------- LEADS CONTROLLER ----------------------------------------------------------
|
||||
|
||||
$LeadsController = new LeadsController();
|
||||
// $RFQModel = new RFQModel();
|
||||
$RFQModel = new RFQModel();
|
||||
|
||||
// $data = $RFQModel->where('is_active', 1)->where('lead_id', 40)->first();
|
||||
// // dd($data);
|
||||
// $data = $RFQModel->where('is_active', 1)->where('lead_id', 323)->orderBy('id', 'desc')->first();
|
||||
// $data = db_connect()->table('leads')->where('is_active', 1)->where('id', 326)->orderBy('id', 'desc')->get()->getResultArray();
|
||||
// dd($data);
|
||||
// $policy_type = 2;
|
||||
// $proposel_name = "Proposal 2";
|
||||
// $insurer_name = "ICICI-P-ICICI002-V1";
|
||||
// $jsonArray = json_decode($data['json'], true);
|
||||
// // dd($jsonArray);
|
||||
// dd($jsonArray);
|
||||
|
||||
// $returndata = $LeadsController->convertQCRJsonToPolicyTerms($jsonArray, $policy_type, $proposel_name, $insurer_name);
|
||||
// dd($returndata);
|
||||
|
||||
// $LeadsController->handleMemberDataGPATotalSumInsurerFromExcel(['lead_id' => 169]);
|
||||
// $res = $LeadsController->convertQCRJsonToPolicyTerms($jsonArray, $policy_type, $proposel_name, $insurer_name);
|
||||
// $res = $LeadsController->handleMemberDataGPATotalSumInsurerFromExcel(['lead_id' => 169]);
|
||||
// $res = $LeadsController->reorderProposalsByInsurerTotal($jsonArray);
|
||||
// $res = $LeadsController->calculateMembersDemography(['lead_id' => 326]);
|
||||
// $res = $LeadsController->generateDemographyDataTable(['lead_id' => 326]);
|
||||
// echo $res;
|
||||
// dd($res);
|
||||
|
||||
// -----------BDS REPORT CONTROLLER---------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@ -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 '<pre>';
|
||||
print_r($responseData);
|
||||
echo '<pre>';
|
||||
// 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 = '<h2>' . htmlspecialchars($worksheet->getTitle()) . '</h2>';
|
||||
$html .= '<table border="1" cellpadding="5">';
|
||||
|
||||
foreach ($worksheet->getRowIterator() as $row) {
|
||||
$html .= '<tr>';
|
||||
$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 .= '<td>' . htmlspecialchars($formattedValue) . '</td>';
|
||||
}
|
||||
|
||||
$html .= '</tr>';
|
||||
}
|
||||
|
||||
$html .= '</table>';
|
||||
return $html;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -143,6 +143,18 @@ class JobWorker extends AdminController
|
||||
'type' => 'CC', // Handler Category
|
||||
'handler' => 'App\Controllers\ClientController',
|
||||
],
|
||||
'claimDumpExcelFileFormatValidation' => [
|
||||
'type' => 'CC', // Handler Category
|
||||
'handler' => 'App\Controllers\TicketServiceController',
|
||||
],
|
||||
'claimDumpExcelFileDataValidation' => [
|
||||
'type' => 'CC', // Handler Category
|
||||
'handler' => 'App\Controllers\TicketServiceController',
|
||||
],
|
||||
'claimDumpOnBoardProcess' => [
|
||||
'type' => 'CC', // Handler Category
|
||||
'handler' => 'App\Controllers\TicketServiceController',
|
||||
],
|
||||
];
|
||||
|
||||
|
||||
|
||||
@ -2080,95 +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()];
|
||||
}
|
||||
|
||||
//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'];
|
||||
//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"];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -995,8 +995,16 @@ class PolicyTransactionController extends BaseController
|
||||
if ($id) {
|
||||
|
||||
$data['is_active'] = 0;
|
||||
$this->policyTransactionModel->where('id', $id)->set($data)->update();
|
||||
$this->PTCOShareDetailsModel->where('pt_id', $id)->set($data)->update();
|
||||
$policy_transaction_data = $this->policyTransactionModel->where('id', $id)->first();
|
||||
if($policy_transaction_data['policy_type_id'] > 7){
|
||||
|
||||
$this->policyTransactionModel->where('id', $id)->set($data)->update();
|
||||
$this->PTCOShareDetailsModel->where('pt_id', $id)->set($data)->update();
|
||||
$this->clientPolicyModel->where('id', $policy_transaction_data['client_policy_id'])->set($data)->update();
|
||||
}else{
|
||||
$this->policyTransactionModel->where('id', $id)->set($data)->update();
|
||||
$this->PTCOShareDetailsModel->where('pt_id', $id)->set($data)->update();
|
||||
}
|
||||
return $this->respond(['status' => true, 'code' => 200, 'message' => 'Policy Transaction removed successfully'], 200);
|
||||
} else {
|
||||
|
||||
|
||||
@ -3,11 +3,17 @@
|
||||
namespace App\Controllers;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Helpers\MailHelper;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
|
||||
use App\Models\ThzMasterModel;
|
||||
use App\Models\ThzMasterNotesModel;
|
||||
use App\ControllerCleaners\ThzControllerCleaner;
|
||||
use App\Models\UserModel;
|
||||
use App\Models\ClientPolicyModel;
|
||||
use App\Models\ClientModel;
|
||||
use App\Models\TicketMailTemplateModel;
|
||||
|
||||
|
||||
class ThzController extends BaseController
|
||||
{
|
||||
@ -17,11 +23,21 @@ class ThzController extends BaseController
|
||||
|
||||
protected $thzControllerCleaner;
|
||||
|
||||
protected $userModel;
|
||||
protected $clientPolicyModel;
|
||||
protected $clientModel;
|
||||
|
||||
protected $ticketMailTemplateModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->thzMasterModel = new ThzMasterModel();
|
||||
$this->thzMasterNotesModel = new ThzMasterNotesModel();
|
||||
$this->thzControllerCleaner = new ThzControllerCleaner();
|
||||
$this->thzMasterModel = new ThzMasterModel();
|
||||
$this->thzMasterNotesModel = new ThzMasterNotesModel();
|
||||
$this->thzControllerCleaner = new ThzControllerCleaner();
|
||||
$this->userModel = new UserModel();
|
||||
$this->clientPolicyModel = new ClientPolicyModel();
|
||||
$this->clientModel = new ClientModel();
|
||||
$this->ticketMailTemplateModel = new TicketMailTemplateModel();
|
||||
}
|
||||
|
||||
public function index()
|
||||
@ -29,140 +45,433 @@ class ThzController extends BaseController
|
||||
//
|
||||
}
|
||||
|
||||
public function ticketCreation(){
|
||||
public function ticketSave(){
|
||||
|
||||
$data = $this->request->getJSON(true);
|
||||
$data = $this->request->getPost();
|
||||
|
||||
$cleanedData = $this->thzControllerCleaner->ticketCreation($data);
|
||||
if (!empty($data['thz_id'])) {
|
||||
|
||||
$text = "update";
|
||||
$result = $this->updateTicket($data);
|
||||
$updateID = $data['thz_id'];
|
||||
|
||||
} else {
|
||||
|
||||
$text = "create";
|
||||
$insertID = $this->insertTicket($data);
|
||||
$result = true;
|
||||
|
||||
if ($cleanedData === false) {
|
||||
return $this->response->setJSON((['status' => 'error', 'message' => 'Invalid data given']));
|
||||
}
|
||||
|
||||
$result = $this->thzMasterModel->insert($cleanedData);
|
||||
$id = isset($insertID) && !empty($insertID) ? $insertID : $updateID ;
|
||||
|
||||
return $this->response->setJSON((['status' => 'success', 'message' => 'Ticket created successfully']));
|
||||
$emailNotificationResult = $this->ticketSaveNotification($data , $insertOrUpdate = $text , $id);
|
||||
|
||||
return $this->response->setJSON([
|
||||
'status' => $result ? 'success' : 'error',
|
||||
'message' => $result ? "Ticket {$text}d successfully " : "Unable to {$text} ticket. Please try again." ,
|
||||
'notification' => $emailNotificationResult ? 'Email Notification Success..!!' : 'Email Notification Failed..!!'
|
||||
])->setStatusCode($result ? 200 : 400);
|
||||
}
|
||||
|
||||
public function ticketList()
|
||||
{
|
||||
|
||||
public function ticketList(){
|
||||
|
||||
$data = $this->request->getJson(true);
|
||||
|
||||
$cleanedData = $this->thzControllerCleaner->ticketList($data);
|
||||
|
||||
if( $cleanedData === false ) {
|
||||
return $this->response->setJSON((['status' => 'error', 'message' => 'Invalid data given']));
|
||||
}
|
||||
|
||||
$id = $cleanedData['id'] ?? null;
|
||||
|
||||
if (empty($id)) {
|
||||
$result = $this->thzMasterModel->findAll();
|
||||
}
|
||||
|
||||
$result = $this->thzMasterModel->where('id',$id)->findAll();
|
||||
|
||||
if(empty($result)){
|
||||
return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']));
|
||||
}
|
||||
|
||||
return $this->response->setJSON((['status' => 'success', 'data' => $result]));
|
||||
$returnType = strtolower($this->request->getGet('return_type') ?? 'api');
|
||||
|
||||
|
||||
$data = $this->request->getGet();
|
||||
|
||||
$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['assignee'] = $this->userModel->where('is_active', 1)->whereIn('role', ['2', '3','4'])->findAll(); // enga 5-"head" and 1-"admin" assign pannvaga so dropdown la varakudhathu
|
||||
// 2,3,4 remain person varannum.
|
||||
$data['client_list'] = $this->clientModel->getCreatedByUserName();
|
||||
|
||||
return $this->loadLayout('thz_list', $data);
|
||||
}
|
||||
|
||||
return $this->response->setJSON([
|
||||
'status' => 'success',
|
||||
'data' => $tickets,
|
||||
])->setStatusCode(200);
|
||||
}
|
||||
|
||||
public function ticketConversationSave(){
|
||||
|
||||
$data = $this->request->getJson(true);
|
||||
$data = $this->request->getPost();
|
||||
|
||||
$cleanedData = $this->thzControllerCleaner->ticketList($data);
|
||||
|
||||
if( $cleanedData === false ) {
|
||||
return $this->response->setJSON((['status' => 'error', 'message' => 'Invalid data given']));
|
||||
}
|
||||
$data['notes_type'] = $data['notes_type'] ?? 'External' ;
|
||||
|
||||
$result = $this->thzMasterNotesModel->insert($data);
|
||||
|
||||
if(empty($result)){
|
||||
return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']));
|
||||
}
|
||||
if(empty($result)){
|
||||
return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(404);
|
||||
}
|
||||
|
||||
return $this->response->setJSON((['status' => 'success', 'data' => $result]));
|
||||
if($data['notes_type'] == "External"){
|
||||
$emailNotificationResult = $this->ticketConversationSaveNotification($data);
|
||||
}else{
|
||||
$emailNotificationResult = false ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return $this->response->setJSON([
|
||||
'status' => $result ? 'success' : 'error',
|
||||
'message' => $result ? "Ticket Notes created successfully" : "Unable to create ticket notes. Please try again." ,
|
||||
'notification' => $emailNotificationResult ? 'Email Notification Success..!!' : 'Email Notification Failed Or No Need..!!'
|
||||
])->setStatusCode($result ? 200 : 400);
|
||||
|
||||
}
|
||||
|
||||
public function ticketListForUser(){
|
||||
public function ticketAutoFetchDetails(){
|
||||
$data = $this->request->getPost();
|
||||
|
||||
$data = $this->request->getJson(true);
|
||||
$client_id = $data['client_id'];
|
||||
$mobile = $data['mobile'];
|
||||
|
||||
$cleanedData = $this->thzControllerCleaner->ticketList($data);
|
||||
if($client_id && $mobile){
|
||||
|
||||
$details = $this->thzMasterModel->ticketAutoFetchDetails($client_id ,$mobile);
|
||||
|
||||
if(empty($details)){
|
||||
return $this->response->setJSON((['status' => 'error', 'message' => 'No Data found']))->setStatusCode(400);
|
||||
}else{
|
||||
|
||||
if( $cleanedData === false ) {
|
||||
return $this->response->setJSON((['status' => 'error', 'message' => 'Invalid data given']));
|
||||
}
|
||||
$policyIds = array_column($details, 'policy_id');
|
||||
$policyIds = array_filter($policyIds);
|
||||
$clientPolicy = $this->clientPolicyModel->whereIn('id', $policyIds)->where('is_active', 1)->get()->getResultArray();
|
||||
$result['client_details'] = $details;
|
||||
$result['policy_details'] = empty($clientPolicy) ? [] : $clientPolicy ;
|
||||
|
||||
$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]));
|
||||
}
|
||||
}else{
|
||||
return $this->response->setJSON((['status' => 'error', 'message' => 'Client and Mobile Not found']))->setStatusCode(400);
|
||||
}
|
||||
|
||||
return $this->response->setJSON((['status' => 'success', 'data' => $result]))->setStatusCode(200);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function conversationListForUserPerTicket(){
|
||||
public function ticketConversationList(){
|
||||
|
||||
$data = $this->request->getJson(true);
|
||||
$data = $this->request->getGet();
|
||||
|
||||
$cleanedData = $this->thzControllerCleaner->ticketList($data);
|
||||
$returnType = strtolower($this->request->getGet('return_type') ?? 'api');
|
||||
|
||||
if( $cleanedData === false ) {
|
||||
return $this->response->setJSON((['status' => 'error', 'message' => 'Invalid data given']));
|
||||
}
|
||||
$thz_id = $data['thz_id'] ?? null;
|
||||
|
||||
$ticketType = $data['notes_type'] ?? 'External' ;
|
||||
|
||||
$thz_id = $cleanedData['thz_id'] ?? null;
|
||||
if($thz_id){
|
||||
$result['master'] = $this->thzMasterModel
|
||||
->select('thz_master.*, CONCAT(user_profiles.first_name, " ", user_profiles.last_name) as assignee_name')
|
||||
->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left')
|
||||
->where('thz_master.thz_id', $thz_id)
|
||||
->findAll();
|
||||
|
||||
$result = $this->thzMasterNotesModel->conversationListForUserPerTicket($thz_id);
|
||||
if(!empty($result['master'])){
|
||||
$notes = $this->thzMasterNotesModel->ticketConversationList($thz_id, $returnType );
|
||||
$result['notes'] = !empty($notes) ? $notes : [];
|
||||
}else{
|
||||
return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(400);
|
||||
}
|
||||
}else{
|
||||
return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(404);
|
||||
}
|
||||
|
||||
if(empty($result)){
|
||||
return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']));
|
||||
}
|
||||
|
||||
|
||||
if ($returnType === 'api') {
|
||||
return $this->response->setJSON((['status' => 'success', 'data' => $result]))->setStatusCode(200);
|
||||
}else{
|
||||
$toGetCreatedBy = $result['master'][0]['created_by'];
|
||||
$toGetPolicyId = (!empty($result['master'][0]['policy_id']) && strtolower($result['master'][0]['policy_id']) !== 'null')
|
||||
? $result['master'][0]['policy_id']
|
||||
: '';
|
||||
|
||||
return $this->response->setJSON((['status' => 'success', 'data' => $result]));
|
||||
$result['related_tickets'] = $this->thzMasterModel
|
||||
->select('thz_master.*, CONCAT(user_profiles.first_name, " ", user_profiles.last_name) as assignee_name')
|
||||
->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left')
|
||||
->where('thz_master.created_by', $toGetCreatedBy)
|
||||
->findAll();
|
||||
$result['assignee'] = $this->userModel->where('is_active', 1)->whereIn('role', ['2', '3','4'])->findAll(); // enga 5-"head" and 1-"admin" assign pannvaga so dropdown la varakudhathu
|
||||
// 2,3,4 remain person varannum.
|
||||
$result['policy_terms'] = $toGetPolicyId ? $this->getPolicyTerms($toGetPolicyId) : '';
|
||||
return $this->loadLayout('thz_notes', $result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function ticketListForAssignedStaff(){
|
||||
|
||||
}
|
||||
|
||||
public function conversationListForAssignedStaffPerTicket(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/************************************************** PRIVATE FUNCTIONS ********************************************************/
|
||||
|
||||
|
||||
private function checkGeneralUserOrEmployee($data){
|
||||
private function fetchTicketsBasedOnrole(array $data): array
|
||||
{
|
||||
// $id = $data['thz_id'] ?? null;
|
||||
$assign_to = $data['assign_to'] ?? null;
|
||||
$mobile = $data['mobile'] ?? null;
|
||||
|
||||
if($data['empcode']){
|
||||
return $data['empcode'];
|
||||
} elseif ($data['mobile']) {
|
||||
return $data['mobile'];
|
||||
} elseif ($data['email']) {
|
||||
return $data['email'];
|
||||
} else {
|
||||
return null;
|
||||
if (!empty($assign_to)) {
|
||||
// Tickets assigned to a staff
|
||||
return $this->thzMasterModel
|
||||
->select('thz_master.*, CONCAT(user_profiles.first_name, " ", user_profiles.last_name) as assignee_name')
|
||||
->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left')
|
||||
->where('thz_master.assign_to', $assign_to)
|
||||
->orderBy('thz_master.created_at','desc')
|
||||
->findAll();
|
||||
}
|
||||
|
||||
// if (!empty($id) && !empty($mobile)) {
|
||||
if (!empty($mobile)) {
|
||||
// Specific ticket by ID and mobile
|
||||
return $this->thzMasterModel
|
||||
->select('thz_master.*, CONCAT(user_profiles.first_name, " ", user_profiles.last_name) as assignee_name')
|
||||
->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left')
|
||||
// ->where('thz_id', $id)
|
||||
->where('thz_master.mobile', $mobile)
|
||||
->orderBy('thz_master.created_at','desc')
|
||||
->findAll();
|
||||
}
|
||||
|
||||
// All tickets (e.g., for managers)
|
||||
return $this->thzMasterModel
|
||||
->select('thz_master.*, CONCAT(user_profiles.first_name, " ", user_profiles.last_name) as assignee_name')
|
||||
->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left')
|
||||
->orderBy('thz_master.created_at','desc')
|
||||
->findAll();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private function ticketSaveNotification( $data , $insertOrUpdate , $id){
|
||||
|
||||
$user_email = $data['email'] ?? null;
|
||||
|
||||
$assignee_id = $data['assign_to'] ?? null;
|
||||
|
||||
$assignee_email = $this->findAssigneeEmail($assignee_id);
|
||||
|
||||
$emailToNotified = [
|
||||
'user_email' => $user_email,
|
||||
'assignee_email' => $assignee_email
|
||||
];
|
||||
|
||||
$ticketId = $id;
|
||||
|
||||
$result = $this->ticketSaveEmailNotificationBasedOnRole($emailToNotified , $insertOrUpdate , $ticketId , $data);
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
private function ticketConversationSaveNotification($data){
|
||||
|
||||
$thz_id = $data['thz_id'] ; // thz is alias of ticket
|
||||
|
||||
$data['subject'] = $this->findSubject($data['thz_id']);
|
||||
|
||||
$assignee_id = $this->findAssigneeId($data['thz_id']) ;
|
||||
|
||||
$user_email = $this->findUserEmail($data['thz_id']) ;
|
||||
|
||||
$assignee_email = $this->findAssigneeEmail($assignee_id) ?? '';
|
||||
|
||||
$sender_mail = $data['notes_by'] == "User" ? $user_email : $assignee_email ;
|
||||
$receiver_mail = $data['notes_by'] == "User" ? $assignee_email : $user_email ;
|
||||
|
||||
$templateName = "ticket_conversation_save_notification";
|
||||
|
||||
$to_email = $receiver_mail;
|
||||
|
||||
$ticketId = $thz_id;
|
||||
|
||||
$message = $data['notes'] ?? '';
|
||||
|
||||
$this->sendEmail( $templateName, $data , $to_email , $ticketId , $message);
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
private function findAssigneeEmail($assignee_id){
|
||||
|
||||
$row = $this->userModel->where('id', $assignee_id)->get()->getRow();
|
||||
$assigneeEmail = $row ? $row->email : null;
|
||||
return $assigneeEmail ? $assigneeEmail : "";
|
||||
|
||||
}
|
||||
|
||||
private function findAssigneeId($ticketId){
|
||||
$row = $this->thzMasterModel->where('thz_id', $ticketId)->get()->getRow();
|
||||
$assigneeId = $row ? $row->assign_to : null;
|
||||
return $assigneeId ? $assigneeId : 0 ;
|
||||
}
|
||||
|
||||
private function findUserEmail($ticket_id){
|
||||
$row = $this->thzMasterModel->where('thz_id', $ticket_id)->get()->getRow();
|
||||
$email = $row ? $row->email : null;
|
||||
return $email ? $email : " " ;
|
||||
}
|
||||
|
||||
private function findSubject($ticketId){
|
||||
$row = $this->thzMasterModel->where('thz_id', $ticketId)->get()->getRow();
|
||||
$subject = $row ? $row->subject : null;
|
||||
return $subject ? $subject : " " ;
|
||||
}
|
||||
|
||||
private function ticketSaveEmailNotificationBasedOnRole($emailToNotified , $insertOrUpdate , $ticketId , $data){
|
||||
|
||||
$user_email = $emailToNotified['user_email'] ?? null;
|
||||
$assignee_email = $emailToNotified['assignee_email'] ?? null;
|
||||
|
||||
|
||||
if (!empty($assignee_email)) {
|
||||
|
||||
switch ($insertOrUpdate) {
|
||||
|
||||
case 'update':
|
||||
|
||||
$this->sendEmail( 'ticket_save_update_assignee', $data ,$assignee_email , $ticketId ) ;
|
||||
|
||||
break;
|
||||
|
||||
case 'create':
|
||||
|
||||
$this->sendEmail( 'ticket_save_create_assignee', $data ,$assignee_email , $ticketId ) ;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
# code...
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!empty($user_email)) {
|
||||
|
||||
switch ($insertOrUpdate) {
|
||||
|
||||
case 'update':
|
||||
|
||||
if(empty($assignee_email)){
|
||||
$data['assigneeAndStatus'] = "Not Yet Assigned";
|
||||
$this->sendEmail( 'ticket_save_update_user', $data ,$user_email , $ticketId ) ;
|
||||
}else{
|
||||
$data['assigneeAndStatus'] = "Assigned With {$assignee_email}";
|
||||
$this->sendEmail( 'ticket_save_update_user', $data ,$user_email , $ticketId ) ;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'create':
|
||||
|
||||
if(empty($assignee_email)){
|
||||
$this->sendEmail( 'ticket_save_create_user_unassigned', $data ,$user_email , $ticketId ) ;
|
||||
}else{
|
||||
$data['assignee_email'] = $assignee_email ;
|
||||
$this->sendEmail( 'ticket_save_create_user_assigned', $data , $user_email , $ticketId ) ;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
# code...
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
private function updateTicket($data){
|
||||
|
||||
$data['updated_by'] = get_session_userid();
|
||||
$ticket_id = $data['thz_id'];
|
||||
$result = $this->thzMasterModel->where('thz_id', $ticket_id)->set($data)->update();
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
private function insertTicket($data)
|
||||
{
|
||||
$data['created_by'] = get_session_userid();
|
||||
$this->thzMasterModel->insert($data);
|
||||
|
||||
return $this->thzMasterModel->insertID(); // returns the inserted row's ID
|
||||
}
|
||||
|
||||
|
||||
private function sendEmail( $templateName, $data , $to_email , $ticketId , $message = ""){
|
||||
|
||||
$mailTemplate = $this->ticketMailTemplateModel->where('template_name',$templateName )->findAll()[0] ?? [];
|
||||
|
||||
if(empty($mailTemplate)){
|
||||
return ;
|
||||
}
|
||||
|
||||
$mailTemplate['subject'] = str_replace('%subject%', $data['subject'] ?? '', $mailTemplate['subject']);
|
||||
|
||||
$mailTemplate['mail_content'] = str_replace('%subject%', $data['subject'] ?? '', $mailTemplate['mail_content']);
|
||||
|
||||
$mailTemplate['mail_content'] = str_replace('%ticketId%', $ticketId ?? '', $mailTemplate['mail_content']);
|
||||
|
||||
$mailTemplate['mail_content'] = str_replace('%message%', $message ?? '', $mailTemplate['mail_content']);
|
||||
|
||||
$mailTemplate['mail_content'] = str_replace('%assignee_email%', $data['assignee_email'] ?? '', $mailTemplate['mail_content']);
|
||||
|
||||
$mailTemplate['mail_content'] = str_replace('%assigneeAndStatus%',$data['assigneeAndStatus'] ?? '' ,$mailTemplate['mail_content']);
|
||||
|
||||
$from_mail = "";
|
||||
$to_mail = $to_email;
|
||||
$cc_string = "";
|
||||
$subject = $mailTemplate['subject'] ;
|
||||
$message = $mailTemplate['mail_content'] ;
|
||||
$attachments = "";
|
||||
$reply_to = "";
|
||||
$bcc_string = "";
|
||||
|
||||
$res = MailHelper::send_email(['from_mail' => $from_mail, 'mail' => $to_mail , 'cc' => $cc_string, 'subject' => $subject, 'message' => $message, 'attachments' => $attachments, 'reply_to' => $reply_to, 'bcc' => $bcc_string]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function getPolicyTerms($client_policy_id)
|
||||
{
|
||||
$policy_data = $this->clientPolicyModel->where('is_active', 1)->where('id', $client_policy_id)->first();
|
||||
|
||||
$policy_terms = [];
|
||||
if(isset($policy_data['policy_terms']) && !empty($policy_data['policy_terms'])){
|
||||
|
||||
$raw_terms = json_decode($policy_data['policy_terms'] ?? [] , true) ?? [];
|
||||
|
||||
$ticketController = new TicketController();
|
||||
$policy_terms = $ticketController->convertTermsToDisplay($raw_terms);
|
||||
}
|
||||
|
||||
$data['policy_terms'] = $policy_terms;
|
||||
return view('view_policy_terms', $data);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -21,6 +21,7 @@ use App\Models\InsurerModel;
|
||||
use App\Models\EmployeeModel;
|
||||
use App\Models\TPAModel;
|
||||
use App\Models\ClaimFilesModel;
|
||||
use App\Models\ClaimDumpFileModel;
|
||||
|
||||
use DOMDocument;
|
||||
use Psr\Log\LoggerInterface;
|
||||
@ -60,6 +61,7 @@ class TicketController extends BaseController
|
||||
protected $insurerModel;
|
||||
protected $TPAModel;
|
||||
protected $claimFilesModel;
|
||||
protected $claimDumpFileModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@ -95,6 +97,7 @@ class TicketController extends BaseController
|
||||
4 => "Smart Service Desk",
|
||||
5 => "Direct to TPA"
|
||||
];
|
||||
|
||||
$this->claimType = [
|
||||
1 => [
|
||||
1 => "Main Hospitalization",
|
||||
@ -344,6 +347,7 @@ class TicketController extends BaseController
|
||||
$this->insurerModel = new InsurerModel();
|
||||
$this->TPAModel = new TPAModel();
|
||||
$this->claimFilesModel = new ClaimFilesModel();
|
||||
$this->claimDumpFileModel = new ClaimDumpFileModel();
|
||||
}
|
||||
|
||||
public function ticketList()
|
||||
@ -2382,17 +2386,20 @@ class TicketController extends BaseController
|
||||
}
|
||||
|
||||
// 5. Merge the Sum Insured value if the multiple sum insured exists
|
||||
if(isset($data['multiple_sum_insured'])){
|
||||
if($data['sumInsured2']){
|
||||
$data['sumInsured2'] = $data['sumInsured2'] . ", " . implode(", ", $data['multiple_sum_insured']);
|
||||
}else{
|
||||
$data['sum_insured'] = $data['sum_insured'] . ", " . implode(", ", $data['multiple_sum_insured']);
|
||||
if (isset($data['multiple_sum_insured'])) {
|
||||
|
||||
$multipleSumInsured = is_array($data['multiple_sum_insured']) ? $data['multiple_sum_insured'] : [$data['multiple_sum_insured']]; // force into array if string
|
||||
|
||||
if (isset($data['sumInsured2'])) {
|
||||
$data['sumInsured2'] .= ", " . implode(", ", $multipleSumInsured);
|
||||
} else {
|
||||
$data['sum_insured'] .= ", " . implode(", ", $multipleSumInsured);
|
||||
}
|
||||
|
||||
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) {
|
||||
@ -2444,6 +2451,154 @@ class TicketController extends BaseController
|
||||
}
|
||||
|
||||
|
||||
// -------- CLAIM DUMP UPLOAD ----------------------------------------------------------------------------------------------
|
||||
|
||||
public function claimDumpUpload()
|
||||
{
|
||||
$data['page_name'] = "Claim Dupm Upload";
|
||||
|
||||
if($this->request->is('get')){
|
||||
|
||||
$data['claim_dump_file_data'] = $this->claimDumpFileModel
|
||||
->select('
|
||||
claim_dump_files.id as file_id,
|
||||
claim_dump_files.file_name,
|
||||
claim_dump_files.status,
|
||||
claim_dump_files.created_at,
|
||||
up.first_name as user_name
|
||||
')
|
||||
->join('user_profiles as up', 'claim_dump_files.created_by = up.id', 'left')
|
||||
->where('claim_dump_files.is_active', 1)
|
||||
->findAll();
|
||||
|
||||
return $this->loadLayout('claim_dump_file_list', $data);
|
||||
|
||||
}else{
|
||||
|
||||
// print_r($this->request->getFile('claim_dump_list')); die;
|
||||
$filename = '';
|
||||
$fileSize = '';
|
||||
|
||||
//validate uploaded file
|
||||
$validated = $this->validate([
|
||||
'claim_dump_list' => [
|
||||
'uploaded[claim_dump_list]',
|
||||
'mime_in[claim_dump_list,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.oasis.opendocument.spreadsheet]',
|
||||
'max_size[claim_dump_list,16384]',
|
||||
],
|
||||
]);
|
||||
|
||||
if ($validated)
|
||||
{
|
||||
$avatar = $this->request->getFile('claim_dump_list');
|
||||
if (!$avatar) {
|
||||
$this->myLogger->logme("error", 'File not found');
|
||||
return $this->respond(['status' => false, 'code' => 400, 'message' => 'File not found'], 400);
|
||||
}
|
||||
|
||||
$is_moved = $avatar->move(WRITEPATH . 'uploads/claim_dump_excel/');
|
||||
|
||||
if ($is_moved) {
|
||||
$filename = $avatar->getName();
|
||||
$fileSize = $avatar->getSize(); // File size in bytes
|
||||
$fileSize = $fileSize / (1024 * 1024); // Convert to MB
|
||||
|
||||
$this->myLogger->logme("error", 'File move successful');
|
||||
|
||||
} else {
|
||||
$this->myLogger->logme("error", 'File move failed');
|
||||
return $this->respond(['status' => false, 'code' => 500, 'message' => 'File move failed'], 500);
|
||||
}
|
||||
|
||||
} else {
|
||||
$this->myLogger->logme("error", 'Upload failed Invalid file');
|
||||
return $this->respond(['status' => false, 'code' => 404, 'message' => 'Invalid file'], 404);
|
||||
}
|
||||
|
||||
|
||||
$status = 'inprogress';
|
||||
$insert_data = [
|
||||
'file_name' => $filename,
|
||||
'status' => $status
|
||||
];
|
||||
|
||||
$file_id = $this->claimDumpFileModel->insert($insert_data);
|
||||
$this->myLogger->logme("error", 'claim_dumb_file_id : {file_id}, uploaded success', ['file_id' => $file_id]);
|
||||
|
||||
//after file upload success than call the file formate validation in service controller
|
||||
$ticketServiceController = new TicketServiceController();
|
||||
// $response = $ticketServiceController->claimDumpExcelFileFormatValidation(["file_id" => $file_id]);
|
||||
$r = Jobs::addJob(['job_name' => 'claimDumpExcelFileFormatValidation', 'payload' => ['file_id' => $file_id]]);
|
||||
|
||||
return $this->respond(['status' => true, 'code' => 200, 'message' => 'File uploaded successfully. File being validated'], 200);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function getClaimDumpFileErrorData()
|
||||
{
|
||||
$file_id = $this->request->getGet('file_id');
|
||||
$file = $this->claimDumpFileModel->where('id', $file_id)->first();
|
||||
if (!isset($file)) {
|
||||
return $this->respond(['status' => false, 'code' => 404, 'message' => 'No data found'], 200);
|
||||
} else {
|
||||
return $this->respond(['status' => true, 'code' => 200, 'data' => $file['reason']], 200);
|
||||
}
|
||||
}
|
||||
|
||||
public function getClaimDumpExcelFileErrors($file_id)
|
||||
{
|
||||
// $file_id = $this->request->getGet('file_id');
|
||||
$ticketServiceController = new TicketServiceController();
|
||||
|
||||
// Render views and capture output
|
||||
$result = $ticketServiceController->getClaimExcelErrorData($file_id) ?? [];
|
||||
// dd($result);
|
||||
|
||||
if ($result != 0) {
|
||||
|
||||
$result['file_id'] = $file_id;
|
||||
echo view('excel_errors', $result);
|
||||
} else if ($result == 0) {
|
||||
|
||||
$data['message'] = 'File Not Found Physically';
|
||||
return view('errors/404', $data);
|
||||
} else {
|
||||
|
||||
echo view('errors/html/production');
|
||||
}
|
||||
}
|
||||
|
||||
public function downloadClaimDumpFile($file_id)
|
||||
{
|
||||
// $actionType = $this->request->getGet();
|
||||
$file_data = $this->claimDumpFileModel->where('id', $file_id)->first();
|
||||
$fileName = $file_data['file_name'];
|
||||
|
||||
$filePath = WRITEPATH . '/uploads/claim_dump_excel/' . $fileName;
|
||||
|
||||
try {
|
||||
|
||||
// Check if the file exists
|
||||
if (file_exists($filePath)) {
|
||||
// Set the appropriate MIME type
|
||||
$mimeType = mime_content_type($filePath);
|
||||
|
||||
// Send the file to the client for download
|
||||
return $this->response->download($filePath, null, $mimeType);
|
||||
} else {
|
||||
|
||||
$data['message'] = 'The Physical File Not Found';
|
||||
echo view('errors/404', $data);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
// Handle any exceptions
|
||||
$errorMessage = $e->getMessage();
|
||||
$this->myLogger->logme('error', $errorMessage);
|
||||
// You can return an error response here
|
||||
echo $errorMessage;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
1800
app/Controllers/TicketServiceController.php
Normal file
179
app/Helpers/claim_dump_helper.php
Normal file
@ -0,0 +1,179 @@
|
||||
<?php
|
||||
use App\Models\EmployeeModel;
|
||||
use App\Models\InsurerModel;
|
||||
use App\Models\TPAModel;
|
||||
use Kint\Kint;
|
||||
|
||||
if (!function_exists('check_client')) {
|
||||
function check_client($params)
|
||||
{
|
||||
$client_data = $params['client_data'] ?? [];
|
||||
$client_name = $params['client_name'] ?? "";
|
||||
// Kint::dump($client_name);
|
||||
|
||||
if (!empty($client_data)) {
|
||||
foreach ($client_data as $key => $value) {
|
||||
// Kint::dump($value['client_name'], $client_name);
|
||||
if(trim($value['client_name']) === trim($client_name)){
|
||||
return array('status' => true, 'client_id' => $value['id'], 'error' => '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array('status' => false, 'error' => 'This Client Name does not exist in the system');
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('check_insurer')) {
|
||||
function check_insurer($params)
|
||||
{
|
||||
$insurer_data = $params['insurer_data'] ?? [];
|
||||
$insurer_name = $params['insurer_name'] ?? "";
|
||||
if (!empty($insurer_data)) {
|
||||
foreach ($insurer_data as $key => $value) {
|
||||
if(trim($value['short_name']) === trim($insurer_name)){
|
||||
return array('status' => true, 'insuer_id' => $value['id'], 'error' => '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array('status' => false, 'error' => 'This Insurer does not exist in the system');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('check_tpa')) {
|
||||
function check_tpa($params)
|
||||
{
|
||||
$tpa_data = $params['tpa_data'] ?? [];
|
||||
$tpa_name = $params['tpa_name'] ?? "";
|
||||
if (!empty($tpa_data)) {
|
||||
foreach ($tpa_data as $key => $value) {
|
||||
if(trim($value['short_name']) === trim($tpa_name)){
|
||||
return array('status' => true, 'tpa_id' => $value['id'], 'error' => '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array('status' => false, 'error' => 'This TPA does not exist in the system');
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('check_status')) {
|
||||
function check_status($params)
|
||||
{
|
||||
$data = $params['data'] ?? [];
|
||||
$check_value = $params['value'] ?? "";
|
||||
if (!empty($data)) {
|
||||
foreach ($data as $key => $value) {
|
||||
// Kint::dump(strtolower(trim($value['claim_status'])), strtolower(trim($check_value)));
|
||||
if(strtolower(trim($value['claim_status'])) === strtolower(trim($check_value))){
|
||||
return array('status' => true, 'status_id' => $value['id'], 'error' => '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array('status' => false, 'error' => "This Status ('{$check_value}') does not exist in the system");
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('check_policy')) {
|
||||
function check_policy($params)
|
||||
{
|
||||
$data = $params['data'] ?? [];
|
||||
$client_id = $params['client_id'] ?? "";
|
||||
$check_value = $params['value'] ?? "";
|
||||
if (!empty($data)) {
|
||||
foreach ($data as $key => $value) {
|
||||
if($value['client_id'] === $client_id && trim($value['policy_no']) === trim($check_value)){
|
||||
return array('status' => true, 'status_id' => $value['id'], 'error' => '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array('status' => false, 'error' => "This Policy Number does not exist in the Client");
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('check_emp_and_insured')) {
|
||||
function check_emp_and_insured($params)
|
||||
{
|
||||
|
||||
$employee_modal = new EmployeeModel();
|
||||
$tpa_data = $employee_modal
|
||||
->join('employee_polices', 'employees.id = employee_polices.employee_id')
|
||||
->where('employees.client', $params['client_id'])
|
||||
->where('employees.name', $params['emp_name'])
|
||||
->where('employees.emp_code', $params['emp_code'])
|
||||
->where('employees.is_active', 1)
|
||||
->where('employees.emp_status !=', "truncated")
|
||||
->where('employee_polices.is_active', 1)
|
||||
->where('employees.status !=', "truncated")
|
||||
->first();
|
||||
|
||||
if (empty($tpa_data)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $tpa_data['id'];
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('dynamic_check_excel_date_format')) {
|
||||
|
||||
function dynamic_check_excel_date_format($dateString, $format = 'd/m/Y')
|
||||
{
|
||||
|
||||
if ($dateString == "") {
|
||||
return array('status' => true);
|
||||
}
|
||||
$date = DateTime::createFromFormat($format, $dateString);
|
||||
|
||||
if ($date && $date->format($format) == $dateString) {
|
||||
return array('status' => true);
|
||||
} else {
|
||||
|
||||
$res = validate_date_flexible($dateString, $format);
|
||||
if (!$res) {
|
||||
return array('status' => false, 'error' => "wrong date format: Expected {$format}({$res}) and received $dateString");
|
||||
} else {
|
||||
return array('status' => true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('validate_date_flexible')) {
|
||||
function validate_date_flexible($date, $format = 'm/d/Y')
|
||||
{
|
||||
// Create a DateTime from the given format
|
||||
$d = DateTime::createFromFormat($format, $date);
|
||||
if (!$d) return false;
|
||||
|
||||
// Compare normalized values (remove leading zeros)
|
||||
$original = preg_replace('/\b0+/', '', $date);
|
||||
$normalized = preg_replace('/\b0+/', '', $d->format($format));
|
||||
|
||||
return $original === $normalized;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('normalizeDate')) {
|
||||
function normalizeDate($dateString, $formats = ['d-m-Y', 'd/m/Y', 'm-d-Y', 'm/d/Y', 'Y-m-d'])
|
||||
{
|
||||
if (empty($dateString)) {
|
||||
return null; // keep null if no value
|
||||
}
|
||||
|
||||
foreach ($formats as $format) {
|
||||
$dt = DateTime::createFromFormat($format, trim($dateString));
|
||||
if ($dt && $dt->format($format) === trim($dateString)) {
|
||||
return $dt->format('Y-m-d'); // ✅ return in DB format
|
||||
}
|
||||
}
|
||||
|
||||
return null; // if no valid format found
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -267,7 +267,6 @@
|
||||
|
||||
|
||||
.right-bar {
|
||||
width: 300px;
|
||||
/* Adjust as needed */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
56
app/Models/ClaimDumpFileModel.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class ClaimDumpFileModel extends Model
|
||||
{
|
||||
protected $table = 'claim_dump_files';
|
||||
protected $primaryKey = 'id';
|
||||
protected $allowedFields = [
|
||||
"id",
|
||||
"file_name",
|
||||
"status",
|
||||
"reason",
|
||||
"created_by",
|
||||
"created_at",
|
||||
"updated_by",
|
||||
"updated_at",
|
||||
"is_active",
|
||||
];
|
||||
|
||||
// Callbacks
|
||||
protected $allowCallbacks = true;
|
||||
protected $beforeInsert = ["checkAndADDCreatedByValue"];
|
||||
protected $afterInsert = [];
|
||||
protected $beforeUpdate = ["checkAndUpdateUpdatedByValue"];
|
||||
protected $afterUpdate = [];
|
||||
protected $beforeFind = [];
|
||||
protected $afterFind = [];
|
||||
protected $beforeDelete = [];
|
||||
protected $afterDelete = [];
|
||||
|
||||
protected function checkAndADDCreatedByValue(array $data)
|
||||
{
|
||||
// Check if 'updated_by' value is null or empty
|
||||
if (empty($data['data']['created_by'])) {
|
||||
// Set 'updated_by' value to the current session user ID
|
||||
$data['data']['created_by'] = get_session_userid();
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function checkAndUpdateUpdatedByValue(array $data)
|
||||
{
|
||||
// Check if 'updated_by' value is null or empty
|
||||
if (empty($data['data']['updated_by'])) {
|
||||
// Set 'updated_by' value to the current session user ID
|
||||
$data['data']['updated_by'] = get_session_userid();
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
}
|
||||
@ -12,7 +12,7 @@ class ThzMasterModel extends Model
|
||||
protected $returnType = 'array';
|
||||
protected $useSoftDeletes = false;
|
||||
protected $protectFields = true;
|
||||
protected $allowedFields = ['name','mobile','email','empcode','policy_no','ticket_type','subject','message','status','assign_to','created_at','updated_at'];
|
||||
protected $allowedFields = ['name','mobile','email','empcode','policy_no','ticket_type','subject','message','status','assign_to','created_at','updated_at','created_by','updated_by' ,'client_id' ,'policy_id' ,'branch_id'];
|
||||
|
||||
protected bool $allowEmptyInserts = false;
|
||||
|
||||
@ -39,4 +39,22 @@ class ThzMasterModel extends Model
|
||||
protected $afterFind = [];
|
||||
protected $beforeDelete = [];
|
||||
protected $afterDelete = [];
|
||||
|
||||
public function ticketAutoFetchDetails($client_id ,$mobile){
|
||||
|
||||
$result = $this->db->table('employees e')
|
||||
->select('e.id, e.email_personal, e.client_id, e.client_branch_id as branch_id, e.mobile, e.emp_code, e.name, ep.client_policy_id as policy_id')
|
||||
->join('employee_polices ep', 'ep.employee_id = e.id AND ep.is_active = 1', 'left')
|
||||
->whereIn('e.emp_status', ['active', 'draft', 'enrolled'])
|
||||
->where('e.is_active', 1)
|
||||
->where('e.mobile', $mobile)
|
||||
->where('e.client_id', $client_id)
|
||||
->groupBy('e.client_id')
|
||||
->get()
|
||||
->getResultArray();
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ class ThzMasterNotesModel extends Model
|
||||
protected $returnType = 'array';
|
||||
protected $useSoftDeletes = false;
|
||||
protected $protectFields = true;
|
||||
protected $allowedFields = ['thz_id','notes','notes_by','created_by','created_at'];
|
||||
protected $allowedFields = ['thz_id','notes','notes_by','created_by','created_at','notes_type'];
|
||||
|
||||
protected bool $allowEmptyInserts = false;
|
||||
|
||||
@ -40,7 +40,7 @@ class ThzMasterNotesModel extends Model
|
||||
protected $beforeDelete = [];
|
||||
protected $afterDelete = [];
|
||||
|
||||
public function conversationListForUserPerTicket($thz_id){
|
||||
public function ticketConversationLists($thz_id){
|
||||
|
||||
|
||||
if(empty($thz_id)){
|
||||
@ -50,6 +50,7 @@ class ThzMasterNotesModel extends Model
|
||||
|
||||
|
||||
$sql = "SELECT
|
||||
thz_master.*,
|
||||
thz_master_notes.id,
|
||||
thz_master_notes.thz_id,
|
||||
thz_master_notes.notes,
|
||||
@ -60,6 +61,7 @@ class ThzMasterNotesModel extends Model
|
||||
thz_master_notes
|
||||
|
||||
Join thz_master ON thz_master.thz_id = :thz_id:
|
||||
|
||||
WHERE
|
||||
thz_master_notes.thz_id = :thz_id:
|
||||
ORDER BY
|
||||
@ -74,5 +76,42 @@ class ThzMasterNotesModel extends Model
|
||||
|
||||
}
|
||||
|
||||
public function ticketConversationList($thz_id , $returnType)
|
||||
{
|
||||
$ticketTypeFilter = "";
|
||||
|
||||
if ($returnType == 'api') {
|
||||
//user only see his message
|
||||
$ticketTypeFilter = "AND thz_master_notes.notes_type = 'External' ";
|
||||
}
|
||||
|
||||
$integer_ticket_id = (int)$thz_id;
|
||||
|
||||
$notes_sql = "SELECT
|
||||
thz_master_notes.*,
|
||||
CASE
|
||||
WHEN LOWER(thz_master_notes.notes_by) = 'staff'
|
||||
THEN CONCAT(user_profiles.first_name, ' ', user_profiles.last_name)
|
||||
WHEN LOWER(thz_master_notes.notes_by) = 'user'
|
||||
THEN thz_master.name
|
||||
ELSE thz_master_notes.notes_by
|
||||
END AS name
|
||||
FROM thz_master_notes
|
||||
LEFT JOIN user_profiles
|
||||
ON user_profiles.id = thz_master_notes.created_by
|
||||
AND LOWER(thz_master_notes.notes_by) = 'staff'
|
||||
LEFT JOIN thz_master
|
||||
ON thz_master.thz_id = thz_master_notes.thz_id
|
||||
AND LOWER(thz_master_notes.notes_by) = 'user'
|
||||
WHERE thz_master_notes.thz_id = ". $integer_ticket_id ."
|
||||
$ticketTypeFilter
|
||||
ORDER BY thz_master_notes.created_at DESC";
|
||||
|
||||
$result = $this->db->query($notes_sql)->getResultArray();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -76,7 +76,9 @@ class TicketMasterModel extends Model
|
||||
'emp_personal_mail',
|
||||
'client_policy_id',
|
||||
|
||||
'approved_description'
|
||||
'approved_description',
|
||||
'file_id',
|
||||
'denial_letter',
|
||||
|
||||
];
|
||||
|
||||
@ -883,8 +885,6 @@ class TicketMasterModel extends Model
|
||||
return $finalResults;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function getNotSettledbutApprovedCount($ticket_type)
|
||||
{
|
||||
// Fetch the approved and settled claim_status IDs
|
||||
@ -975,7 +975,198 @@ class TicketMasterModel extends Model
|
||||
return json_encode(['policy_terms' => null]);
|
||||
}
|
||||
|
||||
// ---------- CLAIM DUMP UPLOAD-------------------------------------------------------------------------------------------
|
||||
|
||||
public function getPolicyData($params)
|
||||
{
|
||||
$client_name = $params['client_name'] ?? null;
|
||||
$insurer_short_name = $params['insurer_short_name'] ?? null;
|
||||
$tpa_short_name = $params['tpa_short_name'] ?? null;
|
||||
$policy_no = $params['policy_no'] ?? null;
|
||||
|
||||
|
||||
$builder = $this->db->table('client_policy');
|
||||
$builder->select('client_policy.*');
|
||||
$builder->join('clients c', 'client_policy.client_id = c.id');
|
||||
$builder->join('insurers i', 'client_policy.insurer_id = i.id');
|
||||
$builder->join('tpa', 'client_policy.tpa_id = tpa.id and tpa.is_active = 1', 'left');
|
||||
$builder->where('c.is_active', 1);
|
||||
$builder->where('client_policy.is_active', 1);
|
||||
$builder->where('i.is_active', 1);
|
||||
$builder->where('c.client_name', trim($client_name));
|
||||
$builder->where('i.short_name', trim($insurer_short_name));
|
||||
if(!empty($tpa_short_name)){
|
||||
$builder->where('tpa.short_name', trim($tpa_short_name));
|
||||
}
|
||||
$builder->where('client_policy.policy_no', trim($policy_no));
|
||||
|
||||
$query = $builder->get();
|
||||
$result = $query->getResultArray();
|
||||
// dd($this->db->getLastQuery());
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getTheClaimDetails($params)
|
||||
{
|
||||
$client_name = $params['client_name'] ?? null;
|
||||
$policy_no = $params['policy_no'] ?? null;
|
||||
$insurer_short_name = $params['insurer_short_name'] ?? null;
|
||||
$tpa_short_name = $params['tpa_short_name'] ?? null;
|
||||
$emp_code = $params['emp_code'] ?? null;
|
||||
$emp_name = $params['emp_name'] ?? null;
|
||||
$insured_name = $params['insured_name'] ?? null;
|
||||
$claim_no = $params['claim_no'] ?? null;
|
||||
$tpa_no = $params['tpa_no'] ?? null;
|
||||
$relationship = $params['relationship'] ?? null;
|
||||
|
||||
$builder = $this->table('ticket_master');
|
||||
$builder->select('ticket_master.*');
|
||||
$builder->join('clients c', 'ticket_master.client_id = c.id');
|
||||
$builder->join('insurers i', 'ticket_master.insurer_id = i.id');
|
||||
$builder->join('tpa', 'ticket_master.tpa_id = tpa.id', 'left');
|
||||
$builder->where('c.is_active', 1);
|
||||
$builder->where('i.is_active', 1);
|
||||
$builder->where('tpa.is_active', 1);
|
||||
$builder->where('ticket_master.is_active', 1);
|
||||
|
||||
$builder->where('c.client_name', trim($client_name));
|
||||
$builder->where('i.short_name', trim($insurer_short_name));
|
||||
$builder->where('ticket_master.policy_no', trim($policy_no));
|
||||
$builder->where('ticket_master.emp_code', trim($emp_code));
|
||||
$builder->where('ticket_master.emp_name', trim($emp_name));
|
||||
$builder->where('ticket_master.insured_name', trim($insured_name));
|
||||
$builder->where('ticket_master.tpa_no', trim($tpa_no));
|
||||
$builder->where('ticket_master.claim_number', trim($claim_no));
|
||||
$builder->where('ticket_master.relationship', trim($relationship));
|
||||
|
||||
if(!empty($tpa_short_name)){
|
||||
$builder->where('tpa.short_name', trim($tpa_short_name));
|
||||
}
|
||||
|
||||
$query = $builder->get();
|
||||
$result = $query->getResultArray();
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
public function getEmployeeAndEmployeePolicyDetails($params)
|
||||
{
|
||||
$client_name = $params['client_name'] ?? null;
|
||||
$emp_code = $params['emp_code'] ?? null;
|
||||
$emp_name = $params['emp_name'] ?? null;
|
||||
$policy_no = $params['policy_no'] ?? null;
|
||||
$relationship = $params['relationship'] ?? null;
|
||||
$insured_name = $params['insured_name'] ?? null;
|
||||
|
||||
$client_name = "6-Eleven";
|
||||
$emp_code = "EMP0020K12";
|
||||
$emp_name = "Lokesh";
|
||||
$policy_no = "GMC-1999/2000/2021/2022";
|
||||
|
||||
|
||||
$builder = $this->db->table('employees e');
|
||||
$builder->select("
|
||||
e.id as emp_id,
|
||||
e.client_id,
|
||||
e.client_branch_id,
|
||||
e.emp_code,
|
||||
e.name as emp_name,
|
||||
e.mobile as emp_mobile,
|
||||
e.email_corporate as emp_mail,
|
||||
e.email_personal as emp_mail_personal,
|
||||
|
||||
ep.id as emp_policy_id,
|
||||
ep.tpa_id as tpa_no,
|
||||
|
||||
cp.id as client_policy_id,
|
||||
cp.insurer_id,
|
||||
cp.tpa_id,
|
||||
cp.policy_no,
|
||||
CASE
|
||||
WHEN cp.policy_type_id = 2 THEN 1
|
||||
WHEN cp.policy_type_id = 1 THEN 2
|
||||
WHEN cp.policy_type_id = 6 THEN 3
|
||||
WHEN cp.policy_type_id = 7 THEN 4
|
||||
ELSE NULL
|
||||
END AS ticket_type_id
|
||||
", false);
|
||||
$builder->join('employee_polices ep', 'e.id = ep.employee_id');
|
||||
$builder->join('clients c', 'e.client_id = c.id');
|
||||
$builder->join('client_policy cp', 'ep.client_policy_id = cp.id');
|
||||
|
||||
$builder->where('e.is_active', 1);
|
||||
$builder->where('ep.is_active', 1);
|
||||
$builder->where('c.is_active', 1);
|
||||
$builder->where('cp.is_active', 1);
|
||||
$builder->where('e.emp_code', trim($emp_code));
|
||||
$builder->where('e.name', trim($emp_name));
|
||||
$builder->where('c.client_name', trim($client_name));
|
||||
$builder->where('cp.policy_no', trim($policy_no));
|
||||
$builder->where('LOWER(e.relationship)', strtolower('self'));
|
||||
|
||||
$query = $builder->get();
|
||||
$result = $query->getResultArray();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getAcmUserDetails($params)
|
||||
{
|
||||
$acm_name = $params['acm_name'] ?? null;
|
||||
$acm_mobile = $params['acm_mobile'] ?? null;
|
||||
|
||||
if ($acm_mobile != null) {
|
||||
|
||||
$builder = $this->db->table('user_profiles');
|
||||
$builder->select("user_profiles.*");
|
||||
$builder->where('user_profiles.is_active', 1);
|
||||
$builder->where('user_profiles.mobile', trim($acm_mobile));
|
||||
$query = $builder->get();
|
||||
$result = $query->getResultArray();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getInsuredDetails($params)
|
||||
{
|
||||
$client_id = $params['client_id'] ?? null;
|
||||
$emp_code = $params['emp_code'] ?? null;
|
||||
$policy_id = $params['client_policy_id'] ?? null;
|
||||
$insured_name = $params['insured_name'] ?? null;
|
||||
|
||||
$builder = $this->db->table('employees e');
|
||||
$builder->select("
|
||||
e.id as emp_id,
|
||||
e.client_id,
|
||||
e.client_branch_id,
|
||||
e.emp_code,
|
||||
e.name as emp_name,
|
||||
e.mobile as emp_mobile,
|
||||
e.email_corporate as emp_mail,
|
||||
e.email_personal as emp_mail_personal,
|
||||
|
||||
ep.id as emp_policy_id,
|
||||
ep.tpa_id as tpa_no,
|
||||
");
|
||||
$builder->join('employee_polices ep', 'e.id = ep.employee_id');
|
||||
$builder->where('e.is_active', 1);
|
||||
$builder->where('ep.is_active', 1);
|
||||
$builder->where('e.emp_code', trim($emp_code));
|
||||
$builder->where('e.name', trim($insured_name));
|
||||
$builder->where('e.client_id', trim($client_id));
|
||||
$builder->where('ep.client_policy_id', trim($policy_id));
|
||||
|
||||
$query = $builder->get();
|
||||
$result = $query->getResultArray();
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
}
|
||||
|
||||
@ -171,79 +171,113 @@
|
||||
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;
|
||||
}
|
||||
|
||||
.active{
|
||||
color : white !important ;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<p style="color:black;font-size:x-large;margin-left:50px;margin-bottom:20px;"><b>Dashboard</b></p>
|
||||
|
||||
<?php if(in_array(get_role_id(), [1,2,3,4,5]) || (in_array(ENROLLMENT_TEAM_ID, user_team()) || in_array(CLAIMS_TEAM_ID, user_team()) || in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()))) { ?>
|
||||
|
||||
<div class="row" id="client_add" style="margin-top: -32px;">
|
||||
<div class="col-12">
|
||||
<!-- <div class="card"> -->
|
||||
<div class="card-body">
|
||||
<div class="row" style="padding-bottom: 10px;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<br>
|
||||
<ul class="nav nav-pills navtab-bg">
|
||||
|
||||
<?php if(in_array(get_role_id(), [1,2,3,5])) { ?>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="#pending-actions-dash-tab" data-toggle="tab" aria-expanded="false"
|
||||
class="nav-link px-3 py-2 active" id="pending_actions_tab">
|
||||
<span class="mr-1"><i class="mdi mdi-contacts"></i></span>
|
||||
<span class="d-none d-sm-inline-block">Pending Actions</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#enrollment-dash-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-2" id="enrollemnt_tab">
|
||||
<span class="mr-1"><i class="fa fa-file"></i></span>
|
||||
<span class="d-none d-sm-inline-block">Enrolment</span>
|
||||
<li class="nav-item d-flex justify-content-center align-items-center">
|
||||
<a href="#pending-actions-dash-tab" data-toggle="tab" aria-expanded="false"
|
||||
class="nav-link px-3 py-1 dash-anchor" id="pending_actions_tab">
|
||||
<img src="<?= base_url() . "public"; ?>/assets/images/inactive_pending_actions.png" alt="Logo" height="14" class="inactive_pending" >
|
||||
<img src="<?= base_url() . "public"; ?>/assets/images/active_pending_actions.png" alt="Logo" height="14"
|
||||
class="active_pending" style="display:none;">
|
||||
|
||||
<span class="d-none d-sm-inline-block dash-tab">Pending Actions</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if(in_array(get_role_id(), [1,2,3,5]) || (get_role_id() == 4 && in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()))) { ?>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="#bds-dash-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-2" id="bds_tab">
|
||||
<span class="mr-1"><i class="fa fa-file"></i></span>
|
||||
<span class="d-none d-sm-inline-block">BDS</span>
|
||||
<li class="nav-item d-flex justify-content-center align-items-center">
|
||||
<a href="#bds-dash-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-1 dash-anchor" id="bds_tab">
|
||||
<img src="<?= base_url() . "public"; ?>/assets/images/inactive_bds.png" alt="Logo" height="14" class="inactive_bds">
|
||||
<img src="<?= base_url() . "public"; ?>/assets/images/active_bds.png" alt="Logo" height="14"
|
||||
class="active_bds " style="display:none;">
|
||||
|
||||
<span class="d-none d-sm-inline-block dash-tab">BDS</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
<?php if ((get_role_id() == STAFF_ROLE_ID && in_array(CLAIMS_TEAM_ID,user_team())) || in_array(get_role_id(),[1,5])) :?>
|
||||
<?php
|
||||
$isActive = get_role_id() == STAFF_ROLE_ID && in_array(CLAIMS_TEAM_ID,user_team()) ? 'active show' : '';
|
||||
?>
|
||||
<li class="nav-item">
|
||||
<a href="#claims-dash-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-2 <?= $isActive?>" id="claims_tab">
|
||||
<span class="mr-1"><i class="fa fa-file-alt"></i> </span>
|
||||
<span class="d-none d-sm-inline-block">Claims</span>
|
||||
<li class="nav-item d-flex justify-content-center align-items-center">
|
||||
<a href="#claims-dash-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-1 dash-anchor" id="claims_tab">
|
||||
<img src="<?= base_url() . "public"; ?>/assets/images/inactive_claims.png" alt="Logo" height="14" class="inactive_claims">
|
||||
<img src="<?= base_url() . "public"; ?>/assets/images/active_claims.png" alt="Logo" height="14"
|
||||
class="active_claims " style="display:none;">
|
||||
|
||||
<span class="d-none d-sm-inline-block dash-tab">Claims</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php if ((get_role_id() == STAFF_ROLE_ID && in_array(ENROLLMENT_TEAM_ID,user_team())) || in_array(get_role_id(),[1,5])) :?>
|
||||
<?php
|
||||
$isActive = get_role_id() == STAFF_ROLE_ID && in_array(ENROLLMENT_TEAM_ID,user_team()) ? 'active show' : '';
|
||||
?>
|
||||
<li class="nav-item">
|
||||
<a href="#leads-dash-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-2 <?= $isActive?>" id="leads_tab">
|
||||
<span class="mr-1"><i class="fa fa-file-alt"></i> </span>
|
||||
<span class="d-none d-sm-inline-block">Leads and BDS Renewals</span>
|
||||
<li class="nav-item d-flex justify-content-center align-items-center ">
|
||||
<a href="#leads-dash-tab " data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-1 dash-anchor" id="leads_tab" >
|
||||
<img src="<?= base_url() . "public"; ?>/assets/images/inactive_leads_and_bds_renewal.png" alt="Logo" height="14" class="inactive_leads">
|
||||
<img src="<?= base_url() . "public"; ?>/assets/images/active_leads_and_bds_renewal.png" alt="Logo" height="14"
|
||||
class="active_leads " style="display:none;">
|
||||
|
||||
<span class="d-none d-sm-inline-block dash-tab">Leads and BDS Renewals</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<br>
|
||||
<div class="tab-content tab-content-styles">
|
||||
|
||||
<?php if ((get_role_id() == STAFF_ROLE_ID && in_array(CLAIMS_TEAM_ID,user_team())) || in_array(get_role_id(),[1,5])) :?>
|
||||
<?php include("claims_dash.php") ?>
|
||||
<?php endif; ?>
|
||||
@ -257,7 +291,6 @@
|
||||
|
||||
<?php if(in_array(get_role_id(), [1,2,3,5])) { ?>
|
||||
<?php include('endorsement_dash.php'); ?>
|
||||
<?php include('enrollment_dash.php'); ?>
|
||||
<?php } ?>
|
||||
<!--
|
||||
<?php // if(in_array(get_role_id(), [1,2,3,5]) || (get_role_id() == 4 && in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()))) { ?>
|
||||
@ -274,5 +307,91 @@
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('.nav-link').click(function(){
|
||||
|
||||
//image of tabs by default inactive before particular click
|
||||
$('.inactive_leads').show();
|
||||
$('.inactive_bds').show();
|
||||
$('.inactive_claims').show();
|
||||
$('.inactive_pending').show();
|
||||
|
||||
$('.active_leads').hide();
|
||||
$('.active_bds').hide();
|
||||
$('.active_claims').hide();
|
||||
$('.active_pending').hide();
|
||||
|
||||
// change bg color of tab
|
||||
$('.nav-link').removeClass('active-tab');
|
||||
$(this).addClass('active-tab');
|
||||
|
||||
// change active pic for the clicked tab
|
||||
// #leads-dash-tab
|
||||
let tab_name = $(this).attr('href').split('-')[0];
|
||||
tab_name = tab_name.replace('#', '');
|
||||
|
||||
console.log(tab_name);
|
||||
|
||||
switch (tab_name) {
|
||||
case "leads":
|
||||
$('.active_leads').show();
|
||||
$('.inactive_leads').hide();
|
||||
break;
|
||||
case "bds":
|
||||
$('.active_bds').show();
|
||||
$('.inactive_bds').hide();
|
||||
break;
|
||||
case "claims":
|
||||
$('.active_claims').show();
|
||||
$('.inactive_claims').hide();
|
||||
break;
|
||||
case "pending":
|
||||
$('.active_pending').show();
|
||||
$('.inactive_pending').hide();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//clear local storage
|
||||
|
||||
localStorage.clear();
|
||||
|
||||
let dashboardHistory = {};
|
||||
|
||||
let str = window.location.href ;
|
||||
str = str.endsWith('#') ? str.slice(0, -1) : str;
|
||||
|
||||
dashboardHistory['dashboard_url'] = str ;
|
||||
dashboardHistory['tab'] = $(this).attr('href'); // e.g. #leads-dash-tab
|
||||
dashboardHistory['tile_params'] = {};
|
||||
dashboardHistory['function_name'] = '';
|
||||
|
||||
localStorage.setItem('dashboardHistory', JSON.stringify(dashboardHistory));
|
||||
|
||||
history.pushState({}, '', str);
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).on('click', '.dash-anchor', function () {
|
||||
|
||||
// remove active class from all tabs
|
||||
$('.dash-tab').removeClass('active');
|
||||
|
||||
// add active only to the clicked one's child span
|
||||
$(this).find('.dash-tab').addClass('active');
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@ -223,6 +223,20 @@ table.dataTable tbody td {
|
||||
.text-danger {
|
||||
color: #dc3545;
|
||||
}
|
||||
|
||||
.btn-color{
|
||||
background-color: rgba(52, 174, 178, 1);
|
||||
color: white;
|
||||
border:1px solid rgba(52, 174, 178, 1);
|
||||
}
|
||||
|
||||
.btn-color:hover{
|
||||
background-color: rgba(41, 139, 142, 1);
|
||||
color: white;
|
||||
border:1px solid rgba(41, 139, 142, 1);
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<!-- End ADD and EDIT Page HTML -->
|
||||
@ -234,9 +248,6 @@ table.dataTable tbody td {
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">User List</h4>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 56px;">
|
||||
<button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="modal" data-target="#con-close-modal" data-placement="top" title="Add" data-trigger="hover">ADD</button>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="0" id="tickets-table">
|
||||
<thead class="bg-light">
|
||||
@ -372,7 +383,7 @@ table.dataTable tbody td {
|
||||
<!-- Tooltip container separate from trigger -->
|
||||
<div class="tooltip-container" id="tooltipContainer">
|
||||
<div class="tooltip" id="accessMatrixTooltip">
|
||||
<table class="tooltip-table">
|
||||
<table class="tooltip-table" style="color: black;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Team</th>
|
||||
@ -464,7 +475,7 @@ table.dataTable tbody td {
|
||||
|
||||
<div class="tooltip-container" id="roleTooltipContainer">
|
||||
<div class="tooltip" id="roleAccessMatrixTooltip">
|
||||
<table class="tooltip-table">
|
||||
<table class="tooltip-table" style="color: black;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Team</th>
|
||||
@ -520,7 +531,17 @@ table.dataTable tbody td {
|
||||
exportOptions: {
|
||||
columns: ':not(:last-child)'
|
||||
}
|
||||
},
|
||||
{
|
||||
text: 'ADD',
|
||||
className: 'btn-color',
|
||||
attr: {
|
||||
id: 'btnAdd',
|
||||
title: 'Add'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
],
|
||||
|
||||
|
||||
@ -541,14 +562,6 @@ table.dataTable tbody td {
|
||||
});
|
||||
|
||||
|
||||
$('#btnAdd').click(function(){
|
||||
$('#first_name').val('');
|
||||
$('#last_name').val('');
|
||||
$('#email').val('');
|
||||
$('#mobile').val('');
|
||||
$('#emp_code').val('');
|
||||
$('#UserForm').attr('action', '<?php echo base_url('/user/create');?>');
|
||||
})
|
||||
|
||||
|
||||
$('.close').click(function(){
|
||||
@ -815,3 +828,17 @@ table.dataTable tbody td {
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).on('click', '#btnAdd', function(){
|
||||
$('#first_name').val('');
|
||||
$('#last_name').val('');
|
||||
$('#email').val('');
|
||||
$('#mobile').val('');
|
||||
$('#emp_code').val('');
|
||||
$('#UserForm').attr('action', '<?php echo base_url('/user/create');?>');
|
||||
let myModal = new bootstrap.Modal(document.getElementById('con-close-modal'));
|
||||
myModal.show(); // open modal
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -1,9 +1,4 @@
|
||||
<style>
|
||||
|
||||
body{
|
||||
margin-top:20px;
|
||||
background:#FAFAFA;
|
||||
}
|
||||
.order-card {
|
||||
color: #fff;
|
||||
}
|
||||
@ -105,6 +100,7 @@ body{
|
||||
padding-bottom: 10px;
|
||||
padding-left: 25px;
|
||||
padding-right: 25px;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.order-card i {
|
||||
@ -123,6 +119,37 @@ body{
|
||||
margin-top: 0;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.inside-tab-content-div{
|
||||
display:flex;
|
||||
justify-content:flex-start !important;
|
||||
flex-flow: row wrap;
|
||||
|
||||
}
|
||||
|
||||
.dash-card{
|
||||
background-color:#F4FBFB !important;
|
||||
border-radius: 15px !important;
|
||||
border:2px solid #09B9BF;
|
||||
box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.1), 0px 4px 8px rgba(0, 0, 0, 0.2);
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
#bds-dash-tab{
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.span-color{
|
||||
color:#09B9BF !important;
|
||||
}
|
||||
|
||||
.financeStatusTile{margin-left:20px;}
|
||||
.financePendingTile{margin-left:20px;}
|
||||
|
||||
.businessPendingTile{margin-left:20px;}
|
||||
.businessStatusTile{margin-left:20px;}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<?php if((get_role_id() == 4 ) && (in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()))) { ?>
|
||||
@ -130,26 +157,32 @@ body{
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<div class="tab-pane <?= isset($add_active_calss) ? $add_active_calss : 'fade' ?>" id="bds-dash-tab" style="padding-right: 35px;">
|
||||
<div class="row">
|
||||
<div class="StatusTileHide" style="display: none; padding-bottom: 10px;padding-left: 17px">
|
||||
<a href="#" onclick="hide_status_show_pending_tile()" ><i class="fas fa-arrow-left"></i> Back to Overview</a>
|
||||
<div class="tab-pane <?= isset($add_active_calss) ? $add_active_calss : 'fade' ?>" id="bds-dash-tab" >
|
||||
|
||||
|
||||
<div class="row d-flex align-items-center">
|
||||
<div class="StatusTileHide" style="padding-left: 25px;">
|
||||
<a href="#" onclick="hide_status_show_pending_tile()" ><b><i class="mdi mdi-chevron-left mdi-36px"></i></b> </a>
|
||||
</div>
|
||||
<div class="StatusTileHide" style="display: none;padding-left: 30px;">
|
||||
<a href="#" id="mainMenuTiles">Current Tile : </a>
|
||||
<div class="StatusTileHide" style="display: none;padding-left: 15px;">
|
||||
<a href="#" id="mainMenuTiles">Current Tile : </a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<?php if (in_array(BUSINESS_TEAM_ID, user_team()) || in_array(MANAGEMENT_TEAM_ID, user_team())) { ?>
|
||||
<br>
|
||||
|
||||
<div class="col-md-4 col-xl-3 businessPendingTile">
|
||||
<div class="card bg-c-Pelorous order-card" onclick="show_business_status_tile(this)">
|
||||
|
||||
<div class="row">
|
||||
<div class="col inside-tab-content-div">
|
||||
<?php if (in_array(BUSINESS_TEAM_ID, user_team()) || in_array(MANAGEMENT_TEAM_ID, user_team())) { ?>
|
||||
|
||||
<div class=" businessPendingTile">
|
||||
<div class="card dash-card" onclick="show_business_status_tile(this)">
|
||||
<div class="card-block">
|
||||
<h6 class="m-b-20 font-15">Business Team Pending</h6>
|
||||
<h2 class="text-right"><i class="mdi mdi-playlist-check f-left"></i><span><?= $businessTeamCount ?></span></h2>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
<h4 class="mb-3" style="color:black;">Business Team Pending</h4>
|
||||
<h2>
|
||||
<span class="mb-3 span-color"><?= $businessTeamCount ?>
|
||||
</h2>
|
||||
<h6 > <span class="text-danger"> Team Action </span></h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -167,11 +200,18 @@ body{
|
||||
// Get the background color for the current tile
|
||||
$bgColor = $colorShades[$colorSetIndex][$shadeIndex];
|
||||
?>
|
||||
<div class="col-md-2 col-xl-1 businessStatusTile" style="display: none;">
|
||||
<div class="card order-card" style="background: <?= $bgColor ?>;" onclick="linkRedirectForBDS(this, 'B')">
|
||||
<h2 class="text-center"><span><?= count($value) ?></span></h2>
|
||||
<h6 class="m-b-20 font-15 text-center"><?= $policyStatus[$status] ?></h6>
|
||||
<div class=" businessStatusTile" style="display: none;">
|
||||
<div class="card dash-card">
|
||||
<div class="card-block" onclick="linkRedirectForBDS(this, 'B')">
|
||||
<h5 class="text-right">
|
||||
<span class="f-left" style="color:black;"><?= $policyStatus[$status] ?></span>
|
||||
|
||||
<span class="span-color"><?= count($value) ?></span>
|
||||
</h5>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
@ -183,13 +223,14 @@ body{
|
||||
|
||||
<?php if (in_array(FINANCE_TEAM_ID, user_team()) || in_array(MANAGEMENT_TEAM_ID, user_team())) { ?>
|
||||
|
||||
<div class="col-md-4 col-xl-3 financePendingTile">
|
||||
<div class="card bg-c-Pelorous2 order-card" onclick="show_finance_status_tile(this, 'F')">
|
||||
<div class=" financePendingTile">
|
||||
<div class="card dash-card" onclick="show_finance_status_tile(this, 'F')">
|
||||
<div class="card-block">
|
||||
<h6 class="m-b-20 font-15">Finance Team Pending</h6>
|
||||
<h2 class="text-right"><i class="mdi mdi-playlist-check f-left"></i><span><?= $financeTeamCount ?></span></h2>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
<h4 class="mb-3" style="color:black;">Finance Team Pending</h4>
|
||||
<h2>
|
||||
<span class="mb-3 span-color"><?= $financeTeamCount ?>
|
||||
</h2>
|
||||
<h6 > <span class="text-danger">Team Action</span></h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -207,11 +248,18 @@ body{
|
||||
// Get the background color for the current tile
|
||||
$bgColor = $colorShades[$colorSetIndex][$shadeIndex];
|
||||
?>
|
||||
<div class="col-md-2 col-xl-1 financeStatusTile" style="display: none;">
|
||||
<div class="card order-card" style="background: <?= $bgColor ?>;" onclick="linkRedirectForBDS(this, 'F')">
|
||||
<h2 class="text-center"><span><?= count($value) ?></span></h2>
|
||||
<h6 class="m-b-20 font-15 text-center"><?= $policyStatus[$status] ?></h6>
|
||||
<div class=" financeStatusTile" style="display: none;">
|
||||
<div class="card dash-card">
|
||||
<div class="card-block" onclick="linkRedirectForBDS(this, 'F')">
|
||||
<h5 class="text-right p-0">
|
||||
<span class="f-left" style="color:black;"><?= $policyStatus[$status] ?></span>
|
||||
|
||||
<span class="span-color"><?= count($value) ?></span>
|
||||
</h5>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
@ -220,7 +268,7 @@ body{
|
||||
?>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -244,15 +292,30 @@ function linkRedirectForBDS(input, team)
|
||||
|
||||
if(link){
|
||||
|
||||
window.open(link, '_blank');
|
||||
window.location.href = link;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function show_business_status_tile(){
|
||||
|
||||
let dashboardHistoryString = localStorage.getItem('dashboardHistory');
|
||||
|
||||
if (dashboardHistoryString){
|
||||
|
||||
let dashboardHistory = JSON.parse(dashboardHistoryString);
|
||||
|
||||
dashboardHistory['tile_params'] = { majorType: 0, minorType: 0 };
|
||||
dashboardHistory['function_name'] = 'show_business_status_tile';
|
||||
|
||||
localStorage.setItem('dashboardHistory', JSON.stringify(dashboardHistory));
|
||||
|
||||
|
||||
}
|
||||
|
||||
$('.businessStatusTile').show()
|
||||
$('.StatusTileHide').show()
|
||||
$("#mainMenuTiles").text("Viewing Details of Business Team Pending");
|
||||
$("#mainMenuTiles").text(" Business Team Pending");
|
||||
|
||||
$('.businessPendingTile').hide()
|
||||
$('.financePendingTile').hide()
|
||||
@ -261,12 +324,26 @@ function show_business_status_tile(){
|
||||
|
||||
function show_finance_status_tile(){
|
||||
|
||||
|
||||
let dashboardHistoryString = localStorage.getItem('dashboardHistory');
|
||||
|
||||
if (dashboardHistoryString){
|
||||
|
||||
let dashboardHistory = JSON.parse(dashboardHistoryString);
|
||||
|
||||
dashboardHistory['tile_params'] = { majorType: 0, minorType: 0 };
|
||||
dashboardHistory['function_name'] = 'show_finance_status_tile';
|
||||
|
||||
localStorage.setItem('dashboardHistory', JSON.stringify(dashboardHistory));
|
||||
|
||||
}
|
||||
|
||||
$('.financeStatusTile').show()
|
||||
$('.StatusTileHide').show()
|
||||
|
||||
$('.financePendingTile').hide()
|
||||
$('.businessPendingTile').hide()
|
||||
$("#mainMenuTiles").text("Viewing Details of Finance Team Pending");
|
||||
$("#mainMenuTiles").text("Finance Team Pending");
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -137,8 +137,8 @@ table.dataTable tbody td {
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control"
|
||||
style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<span></span> <i class="fa fa-caret-down"></i>
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
|
||||
@ -44,9 +44,7 @@ table.dataTable thead th {
|
||||
cursor: pointer !important;
|
||||
}
|
||||
|
||||
.addbtnStyle{
|
||||
margin-left: 20px !important;
|
||||
}
|
||||
|
||||
|
||||
.dataTables_filter {
|
||||
position: absolute;
|
||||
@ -231,7 +229,7 @@ table.dataTable thead th {
|
||||
},
|
||||
{
|
||||
text: 'Add',
|
||||
className: 'buttons-html5 addbtnStyle',
|
||||
className: 'buttons-html5 ',
|
||||
action: function (e, dt, node, config) {
|
||||
showCdMasterAddModal();
|
||||
}
|
||||
|
||||
@ -203,6 +203,28 @@ function setupMessageObserver() {
|
||||
return;
|
||||
}
|
||||
|
||||
const whiteSVG = `data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%'>
|
||||
<rect width='100%' height='100%' fill='white'/>
|
||||
</svg>`;
|
||||
|
||||
const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1" preserveAspectRatio="none"><rect width="1" height="1" fill="#ffffff"/></svg>`;
|
||||
const uri = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}`;
|
||||
// ✅ Change iframe body background here
|
||||
// doc.body.style.background = `url("${uri}") repeat center center fixed`;
|
||||
// // doc.body.style.background = "url('https://venbait.in/nhance/app/dev/assets/chat-bg.jpg')";
|
||||
// // doc.body.style.background = "cover";
|
||||
// doc.body.style.backgroundSize = "auto";
|
||||
// doc.documentElement.style.backgroundColor = '#ffffff';
|
||||
// doc.body.style.margin = "0"; // optional
|
||||
|
||||
doc.documentElement.style.backgroundImage = "none";
|
||||
doc.body.style.backgroundImage = "none";
|
||||
|
||||
// Optionally set plain white background
|
||||
doc.documentElement.style.backgroundColor = "#ffffff";
|
||||
doc.body.style.backgroundColor = "transparent";
|
||||
|
||||
|
||||
// Wait for the document to be ready
|
||||
const waitForElement = () => {
|
||||
const messageArea = doc.querySelector("#messageArea");
|
||||
@ -351,6 +373,10 @@ function setupMessageObserver() {
|
||||
height: 100% !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
iframe#body {
|
||||
background: none !important;
|
||||
}
|
||||
`;
|
||||
document.getElementsByTagName('head')[0].appendChild(style);
|
||||
}
|
||||
|
||||
330
app/Views/claim_dump_file_list.php
Normal file
@ -0,0 +1,330 @@
|
||||
<style>
|
||||
.reload:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-12" style="margin-left: 14px;max-width: 98%;">
|
||||
<div id="accordion1" class="mb-3">
|
||||
<div class="card mb-1">
|
||||
<h5 class="m-1">
|
||||
<a id="toggleIcon1" class="text-dark float-right" data-toggle="collapse" href="#collapseTwo"
|
||||
aria-expanded="true">
|
||||
<i id="icon1" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
|
||||
</a>
|
||||
</h5>
|
||||
<div id="collapseTwo" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion1">
|
||||
<div class="card-body">
|
||||
<form class="parsley-examples" id="claim-upload-form" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<div class="form-row" id="file_upload">
|
||||
<div class="form-group col-md-4">
|
||||
<label>Upload file</label>
|
||||
<!-- [ <a href="#" id="excel_download" data-toggle="tooltip" data-placement="top" title="Download Sample Excel">Sample Excel</a> ] -->
|
||||
<input type="file" name="claim_dump_list" id="claim_dump_list" accept=" application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel,application/vnd.oasis.opendocument.spreadsheet" required>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="form-group col-md-11">
|
||||
<div class="col-md-3">
|
||||
<button id="claim_form_submit_button" type="submit" class="btn btn-primary waves-effect waves-light justify-content-end">Upload</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row" style="padding-bottom: 10px;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Files</h4>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<table class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0" id="tickets-table">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th class="font-weight-medium">SNO</th>
|
||||
<th class="font-weight-medium">File name</th>
|
||||
<th class="font-weight-medium">User/Time</th>
|
||||
<th class="font-weight-medium">Status</th>
|
||||
<th class="font-weight-medium">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody class="font-12">
|
||||
<?php
|
||||
if (isset($claim_dump_file_data)) {
|
||||
foreach ($claim_dump_file_data as $key => $file) {
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><b><?php echo ($key + 1) ?></b></td>
|
||||
<td style="overflow: hidden;" class="reload truncate" data-toggle="tooltip" data-placement="top" title="<?php echo $file['file_name'] ?>">
|
||||
<?php echo $file['file_name'] ?>
|
||||
</td>
|
||||
<td><?php echo change_date_format($file['created_at'], 'Y-m-d H:i:s', 'd M Y h:i a') . ' by <strong>' . $file['user_name'] . '</strong>' ?> </td>
|
||||
<td>
|
||||
<?php if ($file['status'] == "failed") { ?>
|
||||
<?= $file['status'] ?> <span class='col-xl-3 col-lg-4 col-sm-6'>
|
||||
<!-- <a href="<?= base_url('util/claim_dump_excel_error/') . $file['file_id'] ?>" target="_blank" class='fe-alert-circle' data-err="<?= $file['file_id'] ?>"></a> -->
|
||||
<a href="#" class='fe-alert-circle' onclick="fetchFileError(<?= $file['file_id'] ?>)"></a>
|
||||
</span>
|
||||
<?php } else if ($file['status'] == "inprogress") { ?>
|
||||
<a data-id="<?= $file['status'] ?>" class="reload" href="#"><?= $file['status'] ?></a>
|
||||
<?php } else { ?>
|
||||
<?= $file['status'] ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group dropdown">
|
||||
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm"
|
||||
data-toggle="dropdown" aria-expanded="false"><i
|
||||
class="mdi mdi-dots-horizontal"></i></a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a target="_blank" class="dropdown-item" href="<?= base_url("util/download_claim_dump_file/") . $file['file_id']; ?>"><i class="mdi mdi-download mr-2 text-muted font-18 vertical-middle"></i>Download</a>
|
||||
<!-- <a data-id="<?php echo $file['file_id'] ?>" data-toggle="modal" data-target="#full-width-modal-emp-list" class="dropdown-item view_emp_list" href="#"><i class="mdi mdi-eye mr-2 text-muted font-18 vertical-middle"></i>View</a> -->
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }
|
||||
} ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- end col -->
|
||||
|
||||
<!-- Center modal content -->
|
||||
<div class="modal fade" id="cliam-dump-file-err-modal" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="myCenterModalLabel">File Rejected Reason</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div id="modal_body" class="modal-body">
|
||||
<div class="spinner-border text-primary" role="status" style="position: relative; left: 200px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// AJAX Form Submit Function
|
||||
$('#claim-upload-form').on('submit', function(e) {
|
||||
e.preventDefault(); // Prevent default form submission
|
||||
|
||||
// Get form data
|
||||
var formData = new FormData(this);
|
||||
var fileInput = $('#claim_dump_list')[0];
|
||||
|
||||
// Validate file type
|
||||
var allowedTypes = [
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
'application/vnd.ms-excel',
|
||||
'application/vnd.oasis.opendocument.spreadsheet'
|
||||
];
|
||||
|
||||
var selectedFile = fileInput.files[0];
|
||||
if (!allowedTypes.includes(selectedFile.type)) {
|
||||
alert('Please upload a valid Excel file (.xlsx, .xls, .ods)');
|
||||
return false;
|
||||
}
|
||||
|
||||
//form submit url;
|
||||
let url = `<?php echo base_url('ticket/claim-upload'); ?>`;
|
||||
|
||||
// Show loading state
|
||||
var submitButton = $('#claim_form_submit_button');
|
||||
var originalText = submitButton.text();
|
||||
submitButton.prop('disabled', true).text('Uploading...');
|
||||
|
||||
|
||||
// AJAX request
|
||||
$.ajax({
|
||||
url: url, // Your route URL
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false, // CRITICAL: Don't process the data
|
||||
contentType: false, // CRITICAL: Don't set content-type header
|
||||
cache: false,
|
||||
success: function(response) {
|
||||
|
||||
// Handle successful response
|
||||
console.log('Upload successful:', response);
|
||||
|
||||
if (response.status == true) {
|
||||
toastr.success(response.message, "SUCCESS");
|
||||
} else {
|
||||
toastr.error(response.message, "ERROR");
|
||||
}
|
||||
|
||||
// Reset form
|
||||
$('#claim-upload-form')[0].reset();
|
||||
window.location.reload();
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
// Handle error response
|
||||
console.error('Upload failed:', error);
|
||||
console.error('Upload failed:', error);
|
||||
},
|
||||
complete: function() {
|
||||
// Reset button state
|
||||
submitButton.prop('disabled', false).text(originalText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// File input change event for additional validation
|
||||
$('#claim_dump_list').on('change', function() {
|
||||
var fileInput = this;
|
||||
var file = fileInput.files[0];
|
||||
|
||||
if (file) {
|
||||
// Check file size (optional - set max size as needed, e.g., 10MB)
|
||||
var maxSize = 10 * 1024 * 1024; // 10MB in bytes
|
||||
if (file.size > maxSize) {
|
||||
toastr.warning('File size should not exceed 10MB');
|
||||
$(this).val(''); // Clear the input
|
||||
return false;
|
||||
}
|
||||
|
||||
// Display selected file name
|
||||
var fileName = file.name;
|
||||
if ($('#selected-file').length === 0) {
|
||||
$('<div id="selected-file" class="mt-2 text-muted"><small>Selected file: <span id="file-name"></span></small></div>')
|
||||
.insertAfter('#claim_dump_list');
|
||||
}
|
||||
$('#file-name').text(fileName);
|
||||
}
|
||||
});
|
||||
|
||||
$('body').on('click', '.reload', function() {
|
||||
status = this.getAttribute('data-id')
|
||||
console.log(status);
|
||||
if (status == 'inprogress') {
|
||||
window.location.reload(true);
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
function fetchFileError(file_id) {
|
||||
|
||||
var url = '<?php echo base_url('util/getClaimDumpFileErrorData/'); ?>';
|
||||
let requestData = { file_id: file_id };
|
||||
|
||||
var myModal = new bootstrap.Modal(document.getElementById('cliam-dump-file-err-modal'));
|
||||
myModal.show();
|
||||
|
||||
sendAjaxRequestForGlobal(url, 'GET', requestData, function(response) {
|
||||
console.log('Data fetched successfully:', response);
|
||||
|
||||
$('#modal_body').empty();
|
||||
if (response.status === true) {
|
||||
|
||||
var file_error_data = (JSON.parse(response.data));
|
||||
var file_error_html = "";
|
||||
|
||||
for (var key in file_error_data['error_summary']) {
|
||||
var err_id = parseInt(key);
|
||||
var err_count = file_error_data['error_summary'][key];
|
||||
switch (err_id) {
|
||||
case 0:
|
||||
file_error_html += "<strong>" + file_error_data['error_data'] + "</strong>";
|
||||
break;
|
||||
case 1:
|
||||
file_error_html += "<strong>Mandatory values missing</strong> <span class='badge badge-danger float-right'>" +
|
||||
err_count + "</span><br>";
|
||||
break;
|
||||
case 2:
|
||||
file_error_html += "<strong>Values not in expected format</strong> <span class='badge badge-danger float-right'>" +
|
||||
err_count + "</span><br>";
|
||||
break;
|
||||
case 3:
|
||||
file_error_html += "<strong>Field contains not allowed values</strong> <span class='badge badge-danger float-right'>" +
|
||||
err_count + "</span><br>";
|
||||
break;
|
||||
case 4:
|
||||
file_error_html += "<strong>Rule Conflict</strong> <span class='badge badge-danger float-right'>" +
|
||||
err_count + "</span><br>";
|
||||
break;
|
||||
case 5:
|
||||
file_error_html += "<strong>" + (file_error_data['error_data'] || 'Error data not available') + "</strong>";
|
||||
break;
|
||||
case 6:
|
||||
file_error_html += "<strong>" + (file_error_data['error_data'] || 'Error data not available') + "</strong>";
|
||||
break;
|
||||
case 7:
|
||||
file_error_html += "<strong>Claim already exist</strong> <span class='badge badge-danger float-right'>" +
|
||||
err_count + "</span><br>";
|
||||
break;
|
||||
case 8:
|
||||
file_error_html += "<strong>Policy not found</strong> <span class='badge badge-warning float-right'>" +
|
||||
err_count + "</span><br>";
|
||||
break;
|
||||
case 9:
|
||||
file_error_html += "<strong>Employee not found</strong> <span class='badge badge-danger float-right'>" +
|
||||
err_count + "</span><br>";
|
||||
break;
|
||||
case 10:
|
||||
file_error_html += "<strong>ACM not found</strong> <span class='badge badge-danger float-right'>" +
|
||||
err_count + "</span><br>";
|
||||
break;
|
||||
default:
|
||||
file_error_html += "<strong>Unknown error type</strong> <span class='badge badge-secondary float-right'>" +
|
||||
err_count + "</span><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
if (err_id != 5 && err_id != 6 && err_id != 0) {
|
||||
file_error_html += (file_error_html != "" ?
|
||||
"<a href ='<?php echo base_url('util/claim_dump_excel_error/') ?>" + file_id +
|
||||
"' target=_blank>click here to more details...</a>" : "");
|
||||
}
|
||||
|
||||
// console.log(file_error_html);
|
||||
$('#modal_body').append(file_error_html);
|
||||
|
||||
} else {
|
||||
console.log('Response status was false');
|
||||
$('#modal_body').append('<div class="alert alert-warning">No error data available.</div>');
|
||||
}
|
||||
|
||||
}, function(xhr, status, error) {
|
||||
console.error('Error fetching data:', error);
|
||||
console.error('Status:', status);
|
||||
console.error('Response:', xhr.responseText);
|
||||
|
||||
// Show error message to user
|
||||
$('#modal_body').empty().append(
|
||||
'<div class="alert alert-danger">Failed to fetch error data. Please try again.</div>'
|
||||
);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
$('.close').click(function(){
|
||||
$('#modal_body').empty()
|
||||
let html = `<div class="spinner-border text-primary" role="status" style="position: relative; left: 200px;"></div>`
|
||||
$('#modal_body').append(html);
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -1,8 +1,4 @@
|
||||
<style>
|
||||
body {
|
||||
margin-top: 20px;
|
||||
background: #FAFAFA;
|
||||
}
|
||||
|
||||
.order-card {
|
||||
color: #fff;
|
||||
@ -123,70 +119,103 @@
|
||||
margin-top: 0;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.inside-tab-content-div{
|
||||
display:flex;
|
||||
justify-content:flex-start !important;
|
||||
flex-flow: row wrap;
|
||||
|
||||
}
|
||||
|
||||
.claimTypeTile{
|
||||
margin-left:20px;
|
||||
}
|
||||
|
||||
.claimStatusTitle{margin-left:20px;}
|
||||
|
||||
.dash-card{
|
||||
background-color:#F4FBFB !important;
|
||||
border-radius:25px;
|
||||
border:2px solid #09B9BF;
|
||||
box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.1), 0px 4px 8px rgba(0, 0, 0, 0.2);
|
||||
min-width: 300px;
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
#claims-dash-tab{
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.span-color{
|
||||
color:#09B9BF !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<?php
|
||||
$isActive = get_role_id() == STAFF_ROLE_ID && in_array(CLAIMS_TEAM_ID,user_team()) ? 'active show' : '';
|
||||
?>
|
||||
<div class="tab-pane fade <?= $isActive ?>" id="claims-dash-tab">
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-xl-3 claimTypeTile">
|
||||
<div class="card bg-c-Pelorous order-card" onclick="hideAndShowTile(1,1)">
|
||||
<div class="card-block">
|
||||
<h6 class="m-b-20 font-15">GMC</h6>
|
||||
<h2 class="text-right"><i class="mdi mdi-playlist-check f-left"></i><span><?= isset($claim_data[1]['total']) ? $claim_data[1]['total'] : '0' ?></span></h2>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
<div class="col inside-tab-content-div">
|
||||
<div class="claimTypeTile">
|
||||
<div class="card dash-card" onclick="hideAndShowTile(1,1)">
|
||||
<div class="card-block">
|
||||
<h4 class="mb-3">GMC</h4>
|
||||
<h2 ><span class="span-color"><?= isset($claim_data[1]['total']) ? $claim_data[1]['total'] : '0' ?></span></h2>
|
||||
<h6><span class="text-danger">All GMC Records</span></h6>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class=" claimTypeTile">
|
||||
<div class="card dash-card" onclick="hideAndShowTile(1,2)">
|
||||
<div class="card-block">
|
||||
<h4 class="mb-3">GPA</h4>
|
||||
<h2 ><span class="span-color"><?= isset($claim_data[2]['total']) ? $claim_data[2]['total'] : '0' ?></span></h2>
|
||||
<h6><span class="text-danger">All GPA Records</span></h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-4 col-xl-3 claimTypeTile">
|
||||
<div class="card bg-c-Pelorous order-card" onclick="hideAndShowTile(1,2)">
|
||||
<div class="card-block">
|
||||
<h6 class="m-b-20 font-15">GPA</h6>
|
||||
<h2 class="text-right"><i class="mdi mdi-playlist-check f-left"></i><span><?= isset($claim_data[2]['total']) ? $claim_data[2]['total'] : '0' ?></span></h2>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
<div class=" claimTypeTile">
|
||||
<div class="card dash-card" onclick="hideAndShowTile(1,3)">
|
||||
<div class="card-block">
|
||||
<h4 class="mb-3">EDLI</h4>
|
||||
<h2 ><span class="span-color"><?= isset($claim_data[3]['total']) ? $claim_data[3]['total'] : '0' ?></span></h2>
|
||||
<h6><span class="text-danger">All EDLI Records</span></h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" claimTypeTile">
|
||||
<div class="card dash-card" onclick="hideAndShowTile(1,4)">
|
||||
<div class="card-block">
|
||||
<h4 class="mb-3">GTLI</h4>
|
||||
<h2 ><span class="span-color"><?= isset($claim_data[4]['total']) ? $claim_data[4]['total'] : '0' ?></span></h2>
|
||||
<h6><span class="text-danger">All GTLI Records</span></h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-xl-3 claimTypeTile">
|
||||
<div class="card bg-c-Pelorous order-card" onclick="hideAndShowTile(1,3)">
|
||||
<div class="card-block">
|
||||
<h6 class="m-b-20 font-15">EDLI</h6>
|
||||
<h2 class="text-right"><i class="mdi mdi-playlist-check f-left"></i><span><?= isset($claim_data[3]['total']) ? $claim_data[3]['total'] : '0' ?></span></h2>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-xl-3 claimTypeTile">
|
||||
<div class="card bg-c-Pelorous order-card" onclick="hideAndShowTile(1,4)">
|
||||
<div class="card-block">
|
||||
<h6 class="m-b-20 font-15">GTLI</h6>
|
||||
<h2 class="text-right"><i class="mdi mdi-playlist-check f-left"></i><span><?= isset($claim_data[4]['total']) ? $claim_data[4]['total'] : '0' ?></span></h2>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="goBack" style="padding-bottom: 10px;padding-left: 17px;">
|
||||
<a href="#" onclick="hideAndShowTile('2')" ><i class="fas fa-arrow-left"></i> Back to Overview<br></a>
|
||||
|
||||
|
||||
<div class="row d-flex align-items-center">
|
||||
<div class="goBack" style="padding-left: 25px;">
|
||||
<a href="#" onclick="hideAndShowTile('2')" ><b><i class="mdi mdi-chevron-left mdi-36px"></i></b> </a>
|
||||
</div>
|
||||
<div class="goBack" style="display: none;padding-left: 30px;">
|
||||
<div class="goBack" style="display: none;padding-left: 15px;">
|
||||
<a href="#" id="current_tile">Current Tile : </a>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col inside-tab-content-div">
|
||||
<?php
|
||||
$colorSetCount = count($colorShades); // Number of color sets
|
||||
$shadeCount = count($colorShades[0]); // Number of shades per set
|
||||
$index = 0;
|
||||
$colorSetCount = count($colorShades); // Number of color sets
|
||||
$shadeCount = count($colorShades[0]); // Number of shades per set
|
||||
$index = 0;
|
||||
?>
|
||||
|
||||
<?php foreach ($claim_data as $ticketTypeId => $statuses) : ?>
|
||||
@ -213,18 +242,32 @@ $isActive = get_role_id() == STAFF_ROLE_ID && in_array(CLAIMS_TEAM_ID,user_team(
|
||||
$truncatedStatus = strlen($formattedStatus) > 20 ? substr($formattedStatus, 0, 15) . '...' : $formattedStatus;
|
||||
$showTooltip = strlen($formattedStatus) > 20;
|
||||
?>
|
||||
<div class="col-md-2 col-xl-1 claimStatusTitle_<?= $ticketTypeId ?>" style="display: none;">
|
||||
<div class="card order-card" style="background: <?= $bgColor ?>;" onclick="linkRedirectForClaims(<?= $ticketTypeId ?>, '<?= $status ?>','<?= $statuses[$status . '_ids'] ?? '' ?>')">
|
||||
<h2 class="text-center"><span><?= $count ?></span></h2>
|
||||
<h6 class="m-b-20 font-15 text-center"
|
||||
<?= $showTooltip ? 'data-toggle="tooltip" title="' . htmlspecialchars($formattedStatus, ENT_QUOTES, 'UTF-8') . '"' : '' ?>>
|
||||
<?= $truncatedStatus ?>
|
||||
</h6>
|
||||
|
||||
<?php
|
||||
$formattedStatus = explode('-',$formattedStatus);
|
||||
?>
|
||||
|
||||
<div class="claimStatusTitle claimStatusTitle_<?=$ticketTypeId?>" style="display: none;">
|
||||
<div class="card dash-card" onclick="linkRedirectForClaims(<?= $ticketTypeId ?>, '<?= $status ?>','<?= $statuses[$status . '_ids'] ?? '' ?>')">
|
||||
<div class="card-block">
|
||||
<h5 class="text-right <?= isset($formattedStatus[1]) ? 'mt-1 mb-0':''?>">
|
||||
<span class="f-left" style="word-break: break-word; white-space: normal;">
|
||||
<?= htmlspecialchars($formattedStatus[0], ENT_QUOTES, 'UTF-8') ?>
|
||||
</span>
|
||||
<span class="span-color"><?= $count ?></span>
|
||||
<p class="text-left mt-1 mb-0" style="font-size: x-small !important;"><?= htmlspecialchars($formattedStatus[1]??'', ENT_QUOTES, 'UTF-8') ?></p>
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@ -239,6 +282,21 @@ $isActive = get_role_id() == STAFF_ROLE_ID && in_array(CLAIMS_TEAM_ID,user_team(
|
||||
|
||||
function hideAndShowTile(type, claimType = null) {
|
||||
|
||||
let dashboardHistoryString = localStorage.getItem('dashboardHistory');
|
||||
|
||||
if (dashboardHistoryString){
|
||||
|
||||
let dashboardHistory = JSON.parse(dashboardHistoryString);
|
||||
|
||||
dashboardHistory['tile_params'] = { majorType: type, minorType: claimType };
|
||||
dashboardHistory['function_name'] = 'hideAndShowTile';
|
||||
|
||||
localStorage.setItem('dashboardHistory', JSON.stringify(dashboardHistory));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (type == 1) {
|
||||
|
||||
$('.claimTypeTile').hide();
|
||||
@ -252,17 +310,25 @@ $isActive = get_role_id() == STAFF_ROLE_ID && in_array(CLAIMS_TEAM_ID,user_team(
|
||||
|
||||
if (type == 1 && claimType != null) {
|
||||
|
||||
if ($('.claimStatusTitle_' + claimType).length > 0) {
|
||||
console.log("Element exists!");
|
||||
} else {
|
||||
console.log("Element does NOT exist!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('.claimTypeTile').hide();
|
||||
$('.claimStatusTitle_' + claimType).show();
|
||||
$('.claimStatusTitle_'+claimType).show();
|
||||
|
||||
if (claimType == 1) {
|
||||
$('#current_tile').text("Viewing Details For : GMC");
|
||||
$('#current_tile').text(" GMC");
|
||||
} else if (claimType == 2) {
|
||||
$('#current_tile').text("Viewing Details For : GPA");
|
||||
$('#current_tile').text(" GPA");
|
||||
} else if (claimType == 3) {
|
||||
$('#current_tile').text("Viewing Details For : EDLI");
|
||||
$('#current_tile').text(" EDLI");
|
||||
} else if (claimType == 4) {
|
||||
$('#current_tile').text("Viewing Details For : GTLI");
|
||||
$('#current_tile').text(" GTLI");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -312,7 +378,6 @@ $isActive = get_role_id() == STAFF_ROLE_ID && in_array(CLAIMS_TEAM_ID,user_team(
|
||||
const form = document.createElement('form');
|
||||
form.method = 'POST';
|
||||
form.action = url;
|
||||
form.target = '_blank';
|
||||
|
||||
for (const key in data) {
|
||||
if (data.hasOwnProperty(key)) {
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right;">
|
||||
<a href="<?= base_url("client/list"); ?>"><i class="fas fa-arrow-left" style="font-size: 17px;"></i></a>
|
||||
<a href="<?= base_url("client/list"); ?>"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>
|
||||
</div>
|
||||
<!-- <div class="col-6" style="text-align: right; position: relative;top: 53px;">
|
||||
<a href="<?= base_url("client/client_deposit"); ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">ADD</a>
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
<style>
|
||||
.table th,
|
||||
.table td {
|
||||
|
||||
@ -271,7 +271,7 @@ body {
|
||||
<h4 style="position: relative;">Client Onboarding <?php if(isset($client)) {echo ' - ' . $client['client_name']; } ?></h4>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right;">
|
||||
<a href="<?= base_url("client/list"); ?>"><i class="fas fa-arrow-left" style="font-size: 17px;"></i></a>
|
||||
<a href="<?= base_url("client/list"); ?>"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -287,7 +287,7 @@ body {
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#KYC-DOC-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-2" id="kyc_tab">
|
||||
<span class="mr-1"><i class="fa fa-file"></i></span>
|
||||
<span class="mr-1"><i class="mdi mdi-file"></i></span>
|
||||
<span class="d-none d-sm-inline-block">KYC Docs</span>
|
||||
</a>
|
||||
</li>
|
||||
@ -318,7 +318,7 @@ body {
|
||||
<li class="nav-item">
|
||||
<a href="#hr-access-tab" data-toggle="tab" aria-expanded="false" class="nav-link px-3 py-2" id="hr_access_tab" onclick="appendHrAccessControllHtml(this)">
|
||||
<span class="mr-1"><i class="mdi mdi-book-open-page-variant"></i></span>
|
||||
<span class="d-none d-sm-inline-block">HR Access Controll</span>
|
||||
<span class="d-none d-sm-inline-block">HR Access Control</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
@ -357,7 +357,7 @@ body {
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body" id="hr_activity_history_append_area" style="position: relative;bottom: 50px;">
|
||||
<div class="card-body" id="hr_activity_history_append_area" style="padding-top:0; margin-top:0;">
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- end col -->
|
||||
@ -570,20 +570,17 @@ body {
|
||||
if (otherCard !== card) {
|
||||
const otherContent = otherCard.querySelector('.card-content');
|
||||
const otherIcon = otherCard.querySelector('.accordion-icon i');
|
||||
otherContent.classList.remove('active');
|
||||
otherIcon.classList.remove('fa-chevron-up');
|
||||
otherIcon.classList.add('fa-chevron-down');
|
||||
otherIcon.setAttribute('class', 'mdi mdi-chevron-down');
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// Toggle current accordion
|
||||
content.classList.toggle('active');
|
||||
if (content.classList.contains('active')) {
|
||||
icon.classList.remove('fa-chevron-down');
|
||||
icon.classList.add('fa-chevron-up');
|
||||
icon.classList.setAttribute('class', 'mdi mdi-chevron-up');
|
||||
} else {
|
||||
icon.classList.remove('fa-chevron-up');
|
||||
icon.classList.add('fa-chevron-down');
|
||||
icon.classList.setAttribute('class', 'mdi mdi-chevron-down');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -23,8 +23,8 @@
|
||||
<div class="tab-pane fade" id="police-tab">
|
||||
|
||||
<div class="row float-right" style="padding-bottom: 10px; position: relative;right: 13px;">
|
||||
<button type="button" id="BtnAdd" class="btn btn-primary waves-effect waves-light btnAdd btn-sm" style="position: relative;right: 10px;"><span class="fa fa-plus-square" aria-hidden="true" style="padding: 5px 10px;"></span>Add Policy</button>
|
||||
<button type="button" id="BtnAddSuccess" class="btn btn-success waves-effect waves-light BtnAddSuccess btn-sm" onclick="showModal()"><span class="fa fa-plus-square" aria-hidden="true" style="padding: 5px 10px;"></span>Add Policy From Lead</button>
|
||||
<button type="button" id="BtnAdd" class="btn btn-primary waves-effect waves-light btnAdd btn-sm" style="position: relative;right: 10px;"><span class="mdi mdi-plus-box-outline" aria-hidden="true" style="padding: 5px 10px;"></span>Add Policy</button>
|
||||
<button type="button" id="BtnAddSuccess" class="btn btn-success waves-effect waves-light BtnAddSuccess btn-sm" onclick="showModal()"><span class="mdi mdi-plus-box-outline" aria-hidden="true" style="padding: 5px 10px;"></span>Add Policy From Lead</button>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive" id="table_list">
|
||||
@ -669,7 +669,7 @@
|
||||
// Conditionally render the delete option based on the role
|
||||
if (role !== 3 && role !== 4) {
|
||||
policyTable += `
|
||||
<a href="#" data-id="${item.id}" id="${search_term}" data-typeid="${item.policy_type_id}" class="dropdown-item" onclick="removepolicy(this)"><i class="fa fa-trash mr-2 text-muted font-18 vertical-middle"></i>Delete</a>`;
|
||||
<a href="#" data-id="${item.id}" id="${search_term}" data-typeid="${item.policy_type_id}" class="dropdown-item" onclick="removepolicy(this)"><i class="mdi mdi-delete-outline mr-2 text-muted font-18 vertical-middle"></i>Delete</a>`;
|
||||
}
|
||||
|
||||
policyTable += `
|
||||
|
||||
@ -287,12 +287,12 @@
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="email">Email<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="email_corporate" placeholder="Enter Email" name="email_corporate" data-parsley-trigger="change" data-parsley-type="email" onchange="validateInput(this, 'employees', 'email_corporate')" required>
|
||||
<input type="text" class="form-control" id="email_corporate" placeholder="Enter Email" name="email_corporate" data-parsley-trigger="change" data-parsley-type="email" onkeyup="validateInput(this, 'employees', 'email_corporate')" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="mobile">Mobile Number<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="mobile" placeholder="Enter Mobile Number" name="mobile" onkeypress = "return onlyNumbers(event)" maxlength="10" minlength="10" onchange="validateInput(this, 'employees', 'mobile')" required>
|
||||
<input type="text" class="form-control" id="mobile" placeholder="Enter Mobile Number" name="mobile" onkeypress = "return onlyNumbers(event)" maxlength="10" minlength="10" onkeyup="validateInput(this, 'employees', 'mobile')" required>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -570,21 +570,53 @@
|
||||
});
|
||||
}
|
||||
|
||||
function validateInput(input, table, field){
|
||||
// function validateInput(input, table, field){
|
||||
|
||||
// let value = $(input).val();
|
||||
// let label = $(input).closest('.form-group').find('label').text().replace('*', '').trim();
|
||||
|
||||
// let message = "Value is duplicate!";
|
||||
// if(label){
|
||||
// message = label + " already exists!";
|
||||
// }
|
||||
|
||||
// checkDuplicateTableFieldValue(table, field, value, function(isDuplicate) {
|
||||
// if (isDuplicate) {
|
||||
// toastr.warning(message, 'WARNING');
|
||||
// $(input).val('')
|
||||
// }
|
||||
// });
|
||||
|
||||
// }
|
||||
|
||||
function validateInput(input, table, field) {
|
||||
|
||||
let emp_code = $('#emp_code_for_edit').val();
|
||||
let client_id = $('#clients').val();
|
||||
console.log("emp_code", emp_code);
|
||||
console.log("client_id", client_id);
|
||||
|
||||
let value = $(input).val();
|
||||
let label = $(input).closest('.form-group').find('label').text().replace('*', '').trim();
|
||||
|
||||
let message = "Value is duplicate!";
|
||||
if(label){
|
||||
if (label) {
|
||||
message = label + " already exists!";
|
||||
}
|
||||
|
||||
checkDuplicateTableFieldValue(table, field, value, function(isDuplicate) {
|
||||
let data = {};
|
||||
data["emp_code !="] = emp_code;
|
||||
data[field] = value;
|
||||
|
||||
console.log(data);
|
||||
|
||||
checkDuplicateTableFieldValue(table, field, data, function(isDuplicate) {
|
||||
if (isDuplicate) {
|
||||
toastr.warning(message, 'WARNING');
|
||||
$(input).val('')
|
||||
}
|
||||
$("#btnSubmit").prop('disabled', true);
|
||||
}else{
|
||||
$("#btnSubmit").prop('disabled', false);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
@ -597,108 +629,106 @@
|
||||
}
|
||||
var modalInstance; // Store the modal instance globally
|
||||
|
||||
function showModal() {
|
||||
var myModalEl = document.getElementById('emp_history_modal');
|
||||
modalInstance = new bootstrap.Modal(myModalEl, {
|
||||
backdrop: true, // Ensures the backdrop is shown
|
||||
keyboard: true // Allows closing with the Escape key
|
||||
});
|
||||
modalInstance.show();
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
if (modalInstance) {
|
||||
modalInstance.hide(); // Hide the modal and its backdrop
|
||||
// Manually remove backdrop if it's still visible
|
||||
setTimeout(function () {
|
||||
document.querySelector('.modal-backdrop').classList.remove('show');
|
||||
}, 150); // Wait for animation to finish
|
||||
function showModal() {
|
||||
var myModalEl = document.getElementById('emp_history_modal');
|
||||
modalInstance = new bootstrap.Modal(myModalEl, {
|
||||
backdrop: true, // Ensures the backdrop is shown
|
||||
keyboard: true // Allows closing with the Escape key
|
||||
});
|
||||
modalInstance.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function closeModal() {
|
||||
if (modalInstance) {
|
||||
modalInstance.hide(); // Hide the modal and its backdrop
|
||||
// Manually remove backdrop if it's still visible
|
||||
setTimeout(function () {
|
||||
document.querySelector('.modal-backdrop').classList.remove('show');
|
||||
}, 150); // Wait for animation to finish
|
||||
}
|
||||
}
|
||||
|
||||
function get_emp_history(input, emp_id) {
|
||||
$('.loader').fadeIn();
|
||||
$('.loader-mask').fadeIn();
|
||||
$('.loader').fadeIn();
|
||||
$('.loader-mask').fadeIn();
|
||||
|
||||
let url = '<?= base_url("employee/get_emp_history")?>';
|
||||
let requestData = { emp_id: emp_id };
|
||||
let url = '<?= base_url("employee/get_emp_history")?>';
|
||||
let requestData = { emp_id: emp_id };
|
||||
|
||||
sendAjaxRequestForGlobal(url, 'POST', requestData, function(response) {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
sendAjaxRequestForGlobal(url, 'POST', requestData, function(response) {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
|
||||
if (response.status === true) {
|
||||
console.log('response data length', response.data.emp_history.length);
|
||||
if (response.status === true) {
|
||||
console.log('response data length', response.data.emp_history.length);
|
||||
|
||||
// **Clear old data**
|
||||
$('#emp_history_content').html('');
|
||||
// **Clear old data**
|
||||
$('#emp_history_content').html('');
|
||||
|
||||
// **Check if data exists**
|
||||
if (response.data.emp_history.length > 0) {
|
||||
let historyTable = `
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table w-100">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Change</th>
|
||||
<th>User</th>
|
||||
<th>Date/Time</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
`;
|
||||
|
||||
// **Loop through the data dynamically**
|
||||
response.data.emp_history.forEach(row => {
|
||||
historyTable += `
|
||||
<tr>
|
||||
<td>${row.field_name}</td>
|
||||
<td>${row.old_value} => ${row.new_value}</td>
|
||||
<td>${row.created_by}</td>
|
||||
<td>${row.created_at}</td>
|
||||
</tr>
|
||||
// **Check if data exists**
|
||||
if (response.data.emp_history.length > 0) {
|
||||
let historyTable = `
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table w-100">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Change</th>
|
||||
<th>User</th>
|
||||
<th>Date/Time</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
`;
|
||||
});
|
||||
|
||||
historyTable += `
|
||||
</tbody>
|
||||
</table>
|
||||
// **Loop through the data dynamically**
|
||||
response.data.emp_history.forEach(row => {
|
||||
historyTable += `
|
||||
<tr>
|
||||
<td>${row.field_name}</td>
|
||||
<td>${row.old_value} => ${row.new_value}</td>
|
||||
<td>${row.created_by}</td>
|
||||
<td>${row.created_at}</td>
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
|
||||
historyTable += `
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
`;
|
||||
|
||||
// **Append to modal**
|
||||
$('#emp_history_content').append(historyTable);
|
||||
// **Append to modal**
|
||||
$('#emp_history_content').append(historyTable);
|
||||
} else {
|
||||
$('#emp_history_content').html('<p class="text-center text-muted">No history available.</p>');
|
||||
}
|
||||
|
||||
// **Show the modal**
|
||||
showModal();
|
||||
} else {
|
||||
$('#emp_history_content').html('<p class="text-center text-muted">No history available.</p>');
|
||||
let message = response.message;
|
||||
toastr.error(message, 'ERROR');
|
||||
}
|
||||
}, function(xhr, status, error) {
|
||||
console.error('Error fetching data:', error);
|
||||
console.error(xhr.responseText);
|
||||
toastr.error('An error occurred while fetching the report page.', 'ERROR');
|
||||
|
||||
// **Show the modal**
|
||||
showModal();
|
||||
} else {
|
||||
let message = response.message;
|
||||
toastr.error(message, 'ERROR');
|
||||
}
|
||||
}, function(xhr, status, error) {
|
||||
console.error('Error fetching data:', error);
|
||||
console.error(xhr.responseText);
|
||||
toastr.error('An error occurred while fetching the report page.', 'ERROR');
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
});
|
||||
}
|
||||
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
});
|
||||
}
|
||||
|
||||
// function closeModal(){
|
||||
// var myModalEl = document.getElementById('emp_history_modal');
|
||||
// var modalInstance = bootstrap.Modal.getInstance(myModalEl);
|
||||
// if (modalInstance) {
|
||||
// modalInstance.hide();
|
||||
// }
|
||||
// }
|
||||
// function closeModal(){
|
||||
// var myModalEl = document.getElementById('emp_history_modal');
|
||||
// var modalInstance = bootstrap.Modal.getInstance(myModalEl);
|
||||
// if (modalInstance) {
|
||||
// modalInstance.hide();
|
||||
// }
|
||||
// }
|
||||
|
||||
</script>
|
||||
|
||||
@ -1,9 +1,5 @@
|
||||
<style>
|
||||
|
||||
body{
|
||||
margin-top:20px;
|
||||
background:#FAFAFA;
|
||||
}
|
||||
.order-card {
|
||||
color: #fff;
|
||||
}
|
||||
@ -135,110 +131,205 @@ body{
|
||||
padding-left: 25px !important;
|
||||
padding-right: 25px !important;
|
||||
padding-top: 10px !important;
|
||||
padding-bottom: 35% !important;
|
||||
padding-bottom: 30px !important;
|
||||
|
||||
}
|
||||
|
||||
.modal-content{
|
||||
background-color: #F4F4F4 !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.inside-tab-content-div{
|
||||
display:flex;
|
||||
justify-content:flex-start !important;
|
||||
flex-flow: row wrap;
|
||||
|
||||
}
|
||||
|
||||
.dash-card{
|
||||
background-color:#F4FBFB !important;
|
||||
border-radius:25px;
|
||||
border:2px solid #09B9BF;
|
||||
box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.1), 0px 4px 8px rgba(0, 0, 0, 0.2);
|
||||
min-width: 250px !important;
|
||||
}
|
||||
|
||||
#pending-actions-dash-tab{
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.span-color{
|
||||
color:#09B9BF;
|
||||
}
|
||||
|
||||
.diff-span-color{
|
||||
color: #0EB96E !important;
|
||||
}
|
||||
|
||||
.endorsement-div{
|
||||
margin-left:20px;
|
||||
}
|
||||
|
||||
.custom-card{
|
||||
border-radius: 10px !important;
|
||||
background-color: white;
|
||||
box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.1), 0px 4px 8px rgba(0, 0, 0, 0.2);
|
||||
margin-bottom: 5px;
|
||||
padding : 5px 0px 5px 10px;
|
||||
border-left: 10px solid #09B9BF;
|
||||
}
|
||||
|
||||
#right-modal .modal-content {
|
||||
border-radius: 10px !important;
|
||||
overflow: hidden; /* optional, keeps children inside rounded corners */
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div class="tab-pane active show" id="pending-actions-dash-tab" style="/*padding-left: 35px;*/padding-right: 35px;">
|
||||
<div class="tab-pane active show" id="pending-actions-dash-tab" >
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-xl-3">
|
||||
<div data-toggle="modal" data-target="#right-modal" class="card bg-c-Pelorous order-card" onclick="getPendingActionClientDataForDashboard(this, 'Inception Pending', 'I')">
|
||||
<div class="card-block">
|
||||
<h6 class="m-b-20 font-15">Inception Pending</h6>
|
||||
<h2 class="text-right"><i class="mdi mdi-account-multiple-plus f-left"></i><span><?= $pendingActionsData['inception'] ?></span></h2>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
<div class="inside-tab-content-div">
|
||||
|
||||
<div class="endorsement-div">
|
||||
<div data-toggle="modal" data-target="#right-modal" class="card dash-card"
|
||||
onclick="getPendingActionClientDataForDashboard(this, 'Inception Pending', 'I')">
|
||||
<div class="card-block" >
|
||||
<h4 class="mb-3"><b>Inception Pending</b></h4>
|
||||
<h2>
|
||||
<span class="span-color"><?= $pendingActionsData['inception'] ?></span>
|
||||
</h2>
|
||||
<h6 > <span class="text-danger">Inception Action</span></h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-xl-3">
|
||||
<div data-toggle="modal" data-target="#right-modal" class="card bg-c-Pelorous2 order-card" onclick="getPendingActionClientDataForDashboard(this, 'Pending Insurer', 'insurer')">
|
||||
<div class="card-block">
|
||||
<h6 class="m-b-20 font-15">Pending Insurer</h6>
|
||||
<h2 class="text-right"><i class="mdi mdi-account-box f-left"></i><span><?= $pendingActionsData['uhid'] ?></span></h2>
|
||||
<p class="m-b-1">Exported <span class="f-right"><?= $pendingActionsData['uhid_export_count'] ?></span></p>
|
||||
<p class="m-b-1">Not Exported <span class="f-right"><?= $pendingActionsData['uhid_not_export_count'] ?></span></p>
|
||||
|
||||
<div class="endorsement-div">
|
||||
<div data-toggle="modal" data-target="#right-modal" class="card dash-card"
|
||||
onclick="getPendingActionClientDataForDashboard(this, 'Pending Insurer', 'insurer')">
|
||||
<div class=" card-block ">
|
||||
<h4 class="mb-3">Pending Insurer</h4>
|
||||
<h2 >
|
||||
<span class="span-color"><?= $pendingActionsData['uhid'] ?></span>
|
||||
</h2>
|
||||
<h6 class="text-right">
|
||||
<span class="diff-span-color f-left">Exported : <?= $pendingActionsData['uhid_export_count'] ?></span>
|
||||
<span class="text-danger">Not Exported : <?= $pendingActionsData['uhid_not_export_count'] ?></span>
|
||||
</h6>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-xl-3">
|
||||
<div data-toggle="modal" data-target="#right-modal" class="card bg-c-Pelorous3 order-card" onclick="getPendingActionClientDataForDashboard(this, 'Pending TPA', 'TPA')">
|
||||
<div class="card-block">
|
||||
<h6 class="m-b-20 font-15">Pending TPA</h6>
|
||||
<h2 class="text-right"><i class="mdi mdi-signal-variant f-left"></i><span><?= $pendingActionsData['tpa'] ?></span></h2>
|
||||
<p class="m-b-1">Exported <span class="f-right"><?= $pendingActionsData['tpa_export_count'] ?></span></p>
|
||||
<p class="m-b-1">Not Exported <span class="f-right"><?= $pendingActionsData['tpa_not_export_count'] ?></span></p>
|
||||
|
||||
<div class="endorsement-div">
|
||||
<div data-toggle="modal" data-target="#right-modal" class="card dash-card"
|
||||
onclick="getPendingActionClientDataForDashboard(this, 'Pending TPA', 'TPA')">
|
||||
<div class="card-block">
|
||||
<h4 class="mb-3">Pending TPA</h4>
|
||||
<h2>
|
||||
<span class="span-color"><?= $pendingActionsData['tpa'] ?></span>
|
||||
</h2>
|
||||
<h6 class="text-right">
|
||||
<span class="diff-span-color f-left">Exported : <?= $pendingActionsData['tpa_export_count'] ?></span>
|
||||
<span class="text-danger">Not Exported : <?= $pendingActionsData['tpa_not_export_count'] ?></span>
|
||||
</h6>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-xl-3">
|
||||
<div data-toggle="modal" data-target="#right-modal" class="card bg-c-Grenadier order-card" onclick="getPendingActionClientDataForDashboard(this, 'Correction Pending', 'C')">
|
||||
<div class="card-block">
|
||||
<h6 class="m-b-20 font-15">Correction Pending</h6>
|
||||
<h2 class="text-right"><i class="mdi mdi-account-edit f-left"></i><span><?= $pendingActionsData['correction'] ?></span></h2>
|
||||
<p class="m-b-1">Exported <span class="f-right"><?= $pendingActionsData['correction_export_count'] ?></span></p>
|
||||
<p class="m-b-1">Not Exported <span class="f-right"><?= $pendingActionsData['correction_not_export_count'] ?></span></p>
|
||||
|
||||
<div class="endorsement-div">
|
||||
<div data-toggle="modal" data-target="#right-modal" class="card dash-card"
|
||||
onclick="getPendingActionClientDataForDashboard(this, 'Correction Pending', 'C')">
|
||||
<div class="card-block">
|
||||
<h4 class="mb-3">Correction Pending</h4>
|
||||
<h2 >
|
||||
<span class="span-color"><?= $pendingActionsData['correction'] ?></span>
|
||||
</h2>
|
||||
<h6 class="tex-right">
|
||||
<span class="diff-span-color">Exported : <?= $pendingActionsData['correction_export_count'] ?></span>
|
||||
<span class="text-danger f-right">Not Exported : <?= $pendingActionsData['correction_not_export_count'] ?></span>
|
||||
</h6>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-xl-3">
|
||||
<div data-toggle="modal" data-target="#right-modal" class="card bg-c-Grenadier2 order-card" onclick="getPendingActionClientDataForDashboard(this, 'Deletion Pending', 'D')">
|
||||
<div class="card-block">
|
||||
<h6 class="m-b-20 font-15">Deletion Pending</h6>
|
||||
<h2 class="text-right"><i class="mdi mdi-account-multiple-minus f-left"></i><span><?= $pendingActionsData['deletion'] ?></span></h2>
|
||||
<p class="m-b-1">Exported <span class="f-right"><?= $pendingActionsData['deletion_export_count'] ?></span></p>
|
||||
<p class="m-b-1">Not Exported <span class="f-right"><?= $pendingActionsData['deletion_not_export_count'] ?></span></p>
|
||||
|
||||
<div class="endorsement-div">
|
||||
<div data-toggle="modal" data-target="#right-modal" class="card dash-card"
|
||||
onclick="getPendingActionClientDataForDashboard(this, 'Deletion Pending', 'D')">
|
||||
<div class="card-block">
|
||||
<h4 class="mb-3">Deletion Pending</h4>
|
||||
<h2 >
|
||||
<span class="span-color"><?= $pendingActionsData['deletion'] ?></span>
|
||||
</h2>
|
||||
<h6>
|
||||
<span class="diff-span-color">Exported : <?= $pendingActionsData['deletion_export_count'] ?></span>
|
||||
<span class="text-danger f-right">Not Exported : <?= $pendingActionsData['deletion_not_export_count'] ?></span>
|
||||
</h6>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-xl-3">
|
||||
<div data-toggle="modal" data-target="#right-modal" class="card bg-c-Grenadier3 order-card" onclick="getPendingActionClientDataForDashboard(this, 'SI Enhancement Pending', 'SI')">
|
||||
<div class="card-block">
|
||||
<h6 class="m-b-20 font-15">SI Enhancment Pending</h6>
|
||||
<h2 class="text-right"><i class="mdi mdi-account-convert f-left"></i><span><?= $pendingActionsData['si_enhancement'] ?></span></h2>
|
||||
<p class="m-b-1">Exported <span class="f-right"><?= $pendingActionsData['si_export_count'] ?></span></p>
|
||||
<p class="m-b-1">Not Exported <span class="f-right"><?= $pendingActionsData['si_not_export_count'] ?></span></p>
|
||||
|
||||
<div class="endorsement-div">
|
||||
<div data-toggle="modal" data-target="#right-modal" class="card dash-card"
|
||||
onclick="getPendingActionClientDataForDashboard(this, 'SI Enhancement Pending', 'SI')">
|
||||
<div class="card-block">
|
||||
<h4 class="mb-3">SI Enhancment </h4>
|
||||
<h2>
|
||||
<span class="span-color"><?= $pendingActionsData['si_enhancement'] ?></span>
|
||||
</h2>
|
||||
<h6>
|
||||
<span class="diff-span-color">Exported : <?= $pendingActionsData['si_export_count'] ?></span>
|
||||
<span class="text-danger f-right">Not Exported : <?= $pendingActionsData['si_not_export_count'] ?></span>
|
||||
</h6>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-xl-3">
|
||||
<div data-toggle="modal" data-target="#right-modal" class="card bg-c-SilverChalice order-card" onclick="getPendingActionClientDataForDashboard(this, 'Policy Renewal', 'policy')">
|
||||
<div class="card-block">
|
||||
<h6 class="m-b-20 font-15">Policy</h6>
|
||||
<h2 class="text-right"><i class="mdi mdi-autorenew f-left"></i><span><?= $pendingActionsData['PolicyRenewalData'] ?></span></h2>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
|
||||
<div class="endorsement-div">
|
||||
<div data-toggle="modal" data-target="#right-modal" class="card dash-card"
|
||||
onclick="getPendingActionClientDataForDashboard(this, 'Policy Renewal', 'policy')">
|
||||
<div class="card-block">
|
||||
<h4 class="mb-3">Policy</h4>
|
||||
<h2 >
|
||||
<span class="span-color"><?= $pendingActionsData['PolicyRenewalData'] ?></span>
|
||||
</h2>
|
||||
<h6 > <span class="text-danger">Policy Documents</span></h6>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-xl-3">
|
||||
<div class="card bg-c-SilverChalice2 order-card">
|
||||
<div class="card-block">
|
||||
<h6 class="m-b-20 font-15">Ticket</h6>
|
||||
<h2 class="text-right"><i class="mdi mdi-tag f-left"></i><span><?= $pendingActionsData['ticketData'] ?></span></h2>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
|
||||
<div class="endorsement-div">
|
||||
<div class="card dash-card">
|
||||
<div class="card-block">
|
||||
<h4 class="mb-3">Ticket</h4>
|
||||
<h2 >
|
||||
<span class="span-color"><?= $pendingActionsData['ticketData'] ?></span>
|
||||
</h2>
|
||||
<h6> <span class="text-danger">Support Tickets</span></h6>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Right modal content -->
|
||||
<div id="right-modal" class="modal fade" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-right">
|
||||
<div class="modal-dialog modal-lg modal-center" style="border-radius: 10px !important;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header border-0">
|
||||
<div class="modal-header border-0 pb-0" style="margin-left:10px;">
|
||||
<h4 class="modal-title" id="right-modalLabel">Modal Heading</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
@ -254,12 +345,18 @@ body{
|
||||
|
||||
function getPendingActionClientDataForDashboard(input, headerName, type)
|
||||
{
|
||||
$('#right-modal').modal('hide');
|
||||
$('.loader').fadeIn();
|
||||
$('.loader-mask').fadeIn();
|
||||
|
||||
console.log('hi')
|
||||
$(".modal-body").empty();
|
||||
var nodata = '<center>No data available</center>';
|
||||
$(".modal-body").html(nodata);
|
||||
|
||||
$("#right-modalLabel").html(headerName);
|
||||
$("#right-modalLabel").html(
|
||||
`<p style="font-size:25px;font-weight:600;">${headerName}</p>`
|
||||
);
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: '<?= base_url("util/featch_dashboard_data/") ?>' + type,
|
||||
type: "GET",
|
||||
@ -268,7 +365,8 @@ function getPendingActionClientDataForDashboard(input, headerName, type)
|
||||
|
||||
console.log('responce', res)
|
||||
console.log('responce', res.data)
|
||||
var table;
|
||||
// var table;
|
||||
var div;
|
||||
|
||||
var actions = 'inception';
|
||||
|
||||
@ -276,7 +374,9 @@ function getPendingActionClientDataForDashboard(input, headerName, type)
|
||||
var link = '<?=base_url()?>';
|
||||
|
||||
if (res.data.length !== 0) {
|
||||
table = `<table class="table table-striped table-sm table-centered mb-0"><tbody>`;
|
||||
// table = `<table class="table table-striped table-sm table-centered mb-0"><tbody>`;
|
||||
div = `<div class="row">`;
|
||||
|
||||
$.each(res.data, function(index, item) {
|
||||
|
||||
var Params = null;
|
||||
@ -350,22 +450,37 @@ function getPendingActionClientDataForDashboard(input, headerName, type)
|
||||
}
|
||||
console.log(link)
|
||||
|
||||
table += `<tr><td onclick="linkRedirect('${link}')">${item.client_name} - ${item.branch_name} - ${item.policy_name}</td></tr>`;
|
||||
// table += `<tr><td onclick="linkRedirect('${link}')">${item.client_name} - ${item.branch_name} - ${item.policy_name}</td></tr>`;
|
||||
div += `<div class="col-md-6 mb-2">
|
||||
<div class="custom-card" onclick="linkRedirect('${link}')">
|
||||
<h4 style="margin-bottom:5px;">${item.client_name}</h4>
|
||||
<h5>${item.branch_name} - ${item.policy_name} </h5>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
});
|
||||
table += "</tbody></table>";
|
||||
div += "</div>";
|
||||
} else {
|
||||
table = '<center>No data available</center>';
|
||||
// table = '<center>No data available</center>';
|
||||
div = '<center>No data available</center>';
|
||||
}
|
||||
|
||||
$(".modal-body").html(table);
|
||||
// $(".modal-body").html(table);
|
||||
$(".modal-body").append(div);
|
||||
|
||||
$('#right-modal').modal('show');
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
$(".modal-body").html(nodata);
|
||||
|
||||
},
|
||||
complete:function(){
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
console.log("Ajax call is completed ..!!");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -73,17 +73,17 @@
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<div id="categoryFilter_11">
|
||||
<a class="btn btn-primary waves-effect waves-light" onclick="fetchEmpolyeeList(event);" data-toggle="tooltip" data-placement="top" title="Search" id="get-emp-list"><i class="fa fa-search" aria-hidden="true"></i></a>
|
||||
<a class="btn btn-primary waves-effect waves-light" onclick="fetchEmpolyeeList(event);" data-toggle="tooltip" data-placement="top" title="Search" id="get-emp-list"><i class="mdi mdi-magnify" aria-hidden="true"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-0" style="margin-right: 15px; ">
|
||||
<div id="categoryFilter_12">
|
||||
<a class="btn btn-primary waves-effect waves-light" onclick="sendManualReminder(this)" data-toggle="tooltip" data-placement="top" title="Send Reminder"><i class="fa fa-bell" aria-hidden="true"></i></a>
|
||||
<a class="btn btn-primary waves-effect waves-light" onclick="sendManualReminder(this)" data-toggle="tooltip" data-placement="top" title="Send Reminder"><i class="mdi mdi-bell" aria-hidden="true"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-0">
|
||||
<div id="categoryFilter_13">
|
||||
<a class="btn btn-primary waves-effect waves-light" onclick="uploadEnrollmentFile(this)" data-toggle="tooltip" data-placement="top" title="Enrollment File Upload"><i class="fas fa-file-upload" ></i></a>
|
||||
<a class="btn btn-primary waves-effect waves-light" onclick="uploadEnrollmentFile(this)" data-toggle="tooltip" data-placement="top" title="Enrollment File Upload"><i class="mdi mdi-file-export" ></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -92,7 +92,7 @@
|
||||
<!-- <div class="row" style="margin-bottom: 44px;"> -->
|
||||
<div class="col-1 text-right view-status-btn" style="position: relative;bottom: 7px;">
|
||||
<button type="button" class="btn btn-link visa_status_button" onclick="toggleContent()" style="color: #000;" data-toggle="tooltip" data-placement="top" title="View Status Card">
|
||||
Status <i id="toggleIcon" class="fas fa-minus"></i>
|
||||
Status <i id="toggleIcon" class="mdi mdi-minus" style="background-color:white"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -454,25 +454,25 @@
|
||||
buttons: [
|
||||
{
|
||||
extend: 'copy',
|
||||
text: '<i class="fa fa-copy"></i>',
|
||||
text: '<i class="mdi mdi-content-copy"></i>',
|
||||
titleAttr: 'Copy',
|
||||
filename: 'Enrolment List'
|
||||
},
|
||||
{
|
||||
extend: 'print',
|
||||
text: '<i class="fa fa-print"></i>',
|
||||
text: '<i class="mdi mdi-printer"></i>',
|
||||
titleAttr: 'Print',
|
||||
filename: 'Enrolment List'
|
||||
},
|
||||
{
|
||||
extend: 'pdf',
|
||||
text: '<i class="fa fa-file-pdf"></i>',
|
||||
text: '<i class="mdi mdi-file-pdf"></i>',
|
||||
titleAttr: 'PDF',
|
||||
filename: 'Enrolment List'
|
||||
},
|
||||
{
|
||||
extend: 'csv',
|
||||
text: '<i class="fa fa-file-csv"></i>',
|
||||
text: '<i class="mdi mdi-file-document"></i>',
|
||||
titleAttr: 'CSV',
|
||||
filename: 'Enrolment List'
|
||||
}
|
||||
|
||||
@ -137,8 +137,8 @@ table.dataTable tbody td {
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control"
|
||||
style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<span></span> <i class="fa fa-caret-down"></i>
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
<p class="user-email"><?= $value['hr_mail'] ?></p>
|
||||
</div>
|
||||
<div class="accordion-icon">
|
||||
<i class="fas fa-chevron-down"></i>
|
||||
<i class="mdi mdi-chevron-down"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
@ -38,7 +38,7 @@
|
||||
value="1" <?php if (in_array(1, $value['allowed_pre_modules'] ?? [])) {
|
||||
echo 'checked';
|
||||
} ?>>
|
||||
<i class="fas fa-user-plus mr-2"></i>Pre enrollment
|
||||
<i class="mdi mdi-account-plus mr-2"></i>Pre enrollment
|
||||
</div>
|
||||
|
||||
<div class="<?= in_array(1, $value['allowed_pre_modules']) ? 'checkbox-group' : 'checkbox-group hidden' ?>" id="<?= 'user' . $key ?>-pre">
|
||||
@ -84,7 +84,7 @@
|
||||
value="2" <?php if (in_array(2, $value['allowed_post_modules'])) {
|
||||
echo 'checked';
|
||||
} ?>>
|
||||
<i class="fas fa-check-circle mr-2"></i>Active policies
|
||||
<i class="mdi mdi-check-circle mr-2"></i>Active policies
|
||||
</div>
|
||||
<div class="<?php if (in_array(2, $value['allowed_post_modules'])) {echo 'checkbox-group';} else {echo 'checkbox-group hidden';} ?>" id="<?= 'user' . $key ?>-active">
|
||||
|
||||
@ -128,7 +128,7 @@
|
||||
<div class="section-title">
|
||||
<input type="checkbox" class="main-checkbox"
|
||||
onchange="toggleSection(this, '<?= 'user' . $key ?>-cd')" name="<?= 'user' . $key ?>_modules" value="3" <?php if (in_array(3, $value['allowed_post_modules'])) { echo 'checked';} ?>>
|
||||
<i class="fas fa-file-alt mr-2"></i>CD statement
|
||||
<i class="mdi mdi-file mr-2"></i>CD statement
|
||||
</div>
|
||||
|
||||
<div class="<?php if (in_array(3, $value['allowed_post_modules'])) {echo 'checkbox-group';} else {echo 'checkbox-group hidden';} ?>" id="<?= 'user' . $key ?>-cd">
|
||||
@ -153,7 +153,7 @@
|
||||
<div class="section">
|
||||
<div class="section-title">
|
||||
<input type="checkbox" class="main-checkbox" name="<?= 'user' . $key ?>_modules" value="4" <?php if (in_array(4, $value['allowed_post_modules'])) {echo 'checked';} ?>>
|
||||
<i class="fas fa-clipboard-list mr-2"></i>Claims
|
||||
<i class="mdi mdi-clipboard-text mr-2"></i>Claims
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -27,8 +27,8 @@ table.dataTable tbody td {
|
||||
<div class="form-group col-md-3" id="date_div">
|
||||
<!-- <label>ActivityDate<span class="text-danger"></span></label> -->
|
||||
<div id="reportrange" class="form-control" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<span></span> <i class="fa fa-caret-down"></i>
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#KYC-DOC-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-2" id="kyc_tab">
|
||||
<span class="mr-1"><i class="fa fa-file"></i></span>
|
||||
<span class="mr-1"><i class="mdi mdi-file"></i></span>
|
||||
<span class="d-none d-sm-inline-block">Insurer or TPA Data</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@ -26,6 +26,19 @@
|
||||
color: #16181b !important;
|
||||
cursor: pointer !important;
|
||||
}
|
||||
|
||||
.btn-color{
|
||||
background-color: rgba(52, 174, 178, 1);
|
||||
color: white;
|
||||
border:1px solid rgba(52, 174, 178, 1);
|
||||
}
|
||||
|
||||
.btn-color:hover{
|
||||
background-color: rgba(41, 139, 142, 1);
|
||||
color: white;
|
||||
border:1px solid rgba(41, 139, 142, 1);
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="row" id="insurer_list">
|
||||
<div class="col-12">
|
||||
@ -35,9 +48,6 @@
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Insurer List</h4>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 56px;">
|
||||
<a href="<?= base_url("master/insurer/create"); ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">ADD</a>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="0"
|
||||
id="tickets-table">
|
||||
@ -182,6 +192,13 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
exportOptions: {
|
||||
columns: ':not(:last-child)'
|
||||
}
|
||||
},
|
||||
{
|
||||
text: 'ADD',
|
||||
className: 'btn btn-color',
|
||||
action: function () {
|
||||
window.location.href = "<?= base_url("master/insurer/create"); ?>";
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right;">
|
||||
<a href="<?= base_url("master/insurer/list"); ?>" >
|
||||
<i class="fas fa-arrow-left" style="font-size: 17px;"></i>
|
||||
<i class="mdi mdi-arrow-left" style="font-size: 17px;"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
@ -15,8 +15,8 @@
|
||||
<div class="form-group col-md-4" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<span></span> <i class="fa fa-caret-down"></i>
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate" value=<?= $default_start ?>>
|
||||
<input type="hidden" id="endDate" value=<?= $default_end ?>>
|
||||
|
||||
@ -26,6 +26,19 @@
|
||||
color: #16181b !important;
|
||||
cursor: pointer !important;
|
||||
}
|
||||
|
||||
.btn-color{
|
||||
background-color: rgba(52, 174, 178, 1);
|
||||
color: white;
|
||||
border:1px solid rgba(52, 174, 178, 1);
|
||||
}
|
||||
|
||||
.btn-color:hover{
|
||||
background-color: rgba(41, 139, 142, 1);
|
||||
color: white;
|
||||
border:1px solid rgba(41, 139, 142, 1);
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="row" id="kyc_list">
|
||||
<div class="col-12">
|
||||
@ -35,9 +48,6 @@
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">KYC List</h4>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 56px;">
|
||||
<a href="<?= base_url("master/kyc/create"); ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">ADD</a>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="0"
|
||||
id="tickets-table">
|
||||
@ -176,6 +186,13 @@
|
||||
exportOptions: {
|
||||
columns: ':not(:last-child)'
|
||||
}
|
||||
},
|
||||
{
|
||||
text: 'ADD',
|
||||
className: 'btn btn-color',
|
||||
action: function () {
|
||||
window.location.href = "<?= base_url("master/kyc/create"); ?>";
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ body {
|
||||
<h4 style="position: relative;">KYC Entity Type</h4>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right;">
|
||||
<a href="<?= base_url("master/kyc/list"); ?>" ><i class="fas fa-arrow-left" style="font-size: 17px;"></i> </a>
|
||||
<a href="<?= base_url("master/kyc/list"); ?>" ><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i> </a>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="nav nav-pills navtab-bg">
|
||||
|
||||
@ -6,24 +6,27 @@
|
||||
|
||||
|
||||
<!-- Footer Start -->
|
||||
<footer class="footer">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<script>
|
||||
document.write(new Date().getFullYear())
|
||||
</script> © NHANCE
|
||||
</div>
|
||||
<!-- <div class="col-md-6">
|
||||
<div class="text-md-right footer-links d-none d-sm-block">
|
||||
<a href="javascript:void(0);">About Us</a>
|
||||
<a href="javascript:void(0);">Help</a>
|
||||
<a href="javascript:void(0);">Contact Us</a>
|
||||
<div style="display: block;">
|
||||
<footer class="footer">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<script>
|
||||
document.write(new Date().getFullYear())
|
||||
</script> © NHANCE
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <div class="col-md-6">
|
||||
<div class="text-md-right footer-links d-none d-sm-block">
|
||||
<a href="javascript:void(0);">About Us</a>
|
||||
<a href="javascript:void(0);">Help</a>
|
||||
<a href="javascript:void(0);">Contact Us</a>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<!-- end Footer -->
|
||||
|
||||
</div>
|
||||
@ -930,6 +933,66 @@ function confirmActionSweertAlert(message = "Are you sure?", confirmText = "Yes,
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function restoreDashboardHistoryIfNeeded() {
|
||||
|
||||
const dashboardHistoryString = localStorage.getItem('dashboardHistory');
|
||||
|
||||
if (!dashboardHistoryString) {
|
||||
console.log("dashboardHistory not found");
|
||||
return;
|
||||
}
|
||||
|
||||
const dashboardHistory = JSON.parse(dashboardHistoryString);
|
||||
|
||||
if (window.location.href === dashboardHistory.dashboard_url) {
|
||||
const tabSelector = dashboardHistory.tab;
|
||||
if (tabSelector) {
|
||||
const tabElement = document.querySelector(`a[href="${tabSelector}"]`);
|
||||
if (tabElement) {
|
||||
tabElement.click();
|
||||
}
|
||||
}
|
||||
|
||||
const functionName = dashboardHistory.function_name;
|
||||
const params = dashboardHistory.tile_params;
|
||||
|
||||
if (functionName && typeof window[functionName] === 'function') {
|
||||
if(params.majorType == 0 && params.minorType == 0){
|
||||
window[functionName]();
|
||||
}else{
|
||||
window[functionName](params.majorType, params.minorType);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
console.log("inside location match");
|
||||
}
|
||||
}
|
||||
|
||||
// Run on popstate (back/forward buttons)
|
||||
window.addEventListener('popstate', restoreDashboardHistoryIfNeeded);
|
||||
|
||||
// Run on page load (refresh)
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
// slight delay ensures DOM/tab loads completely
|
||||
setTimeout(restoreDashboardHistoryIfNeeded, 100);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.img-inactive').on('click', function() {
|
||||
|
||||
$('.img-c').addClass('img-inactive');
|
||||
$(this).removeClass('.img-inactive');
|
||||
$(this).addClass('.img-active');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
936
app/Views/layout/footer_old.php
Normal file
@ -0,0 +1,936 @@
|
||||
</div> <!-- container -->
|
||||
|
||||
</div> <!-- content -->
|
||||
|
||||
<?php include(__DIR__ . '/../ticket_type_modal.php'); ?>
|
||||
|
||||
|
||||
<!-- Footer Start -->
|
||||
<footer class="footer">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<script>
|
||||
document.write(new Date().getFullYear())
|
||||
</script> © NHANCE
|
||||
</div>
|
||||
<!-- <div class="col-md-6">
|
||||
<div class="text-md-right footer-links d-none d-sm-block">
|
||||
<a href="javascript:void(0);">About Us</a>
|
||||
<a href="javascript:void(0);">Help</a>
|
||||
<a href="javascript:void(0);">Contact Us</a>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- end Footer -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- ============================================================== -->
|
||||
<!-- End Page content -->
|
||||
<!-- ============================================================== -->
|
||||
|
||||
|
||||
</div>
|
||||
<!-- END wrapper -->
|
||||
|
||||
<!-- Right Sidebar -->
|
||||
<div class="right-bar">
|
||||
<div class="h-100">
|
||||
<!-- Notifications Header -->
|
||||
<h6 class="font-weight-medium px-3 m-0 py-2 font-13 text-uppercase bg-light fixed-header">
|
||||
<i class="mdi mdi-message-text-outline font-22"></i>
|
||||
<span class="header-title">Notification</span>
|
||||
</h6>
|
||||
<div class="scrollable-content">
|
||||
<ul class="list-unstyled" id="messages-list">
|
||||
<!-- Notifications list items go here -->
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Pending Action Header -->
|
||||
<h6 class="font-weight-medium px-3 m-0 py-2 font-13 bg-light fixed-header">
|
||||
<i class="mdi mdi-format-list-checks font-22"></i>
|
||||
<span class="header-title">TO DOs</span>
|
||||
</h6>
|
||||
<div class="scrollable-content">
|
||||
<ul class="list-unstyled" id="messages-list-2">
|
||||
<!-- Pending action list items go here -->
|
||||
</ul>
|
||||
</div>
|
||||
</div> <!-- end simplebar -->
|
||||
</div>
|
||||
|
||||
<!-- /Right-bar -->
|
||||
|
||||
<!-- Right bar overlay-->
|
||||
<div class="rightbar-overlay"></div>
|
||||
|
||||
<!-- Vendor js -->
|
||||
<script src="<?= base_url() . "public"; ?>/assets/js/vendor.min.js"></script>
|
||||
|
||||
<!-- KNOB JS -->
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/jquery-knob/jquery.knob.min.js"></script>
|
||||
<!-- Apex js-->
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/apexcharts/apexcharts.min.js"></script>
|
||||
|
||||
<!-- third party js -->
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net/js/jquery.dataTables.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-bs4/js/dataTables.bootstrap4.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-responsive/js/dataTables.responsive.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-buttons-bs4/js/buttons.bootstrap4.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-buttons/js/buttons.html5.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-buttons/js/buttons.flash.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-buttons/js/buttons.print.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-select/js/dataTables.select.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/pdfmake/build/pdfmake.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/pdfmake/build/vfs_fonts.js"></script>
|
||||
<!-- third party js ends -->
|
||||
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/moment/min/moment.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/bootstrap-daterangepicker/daterangepicker.js"></script>
|
||||
|
||||
|
||||
<!-- Datatables init -->
|
||||
<!-- <script src="<?= base_url() . "public"; ?>/assets/js/pages/datatables.init.js"></script> -->
|
||||
|
||||
|
||||
<script src="<?= base_url() . "public"; ?>/assets/js/pages/tickets.init.js"></script>
|
||||
|
||||
<!-- Plugins js-->
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/admin-resources/jquery.vectormap/jquery-jvectormap-1.2.2.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-us-merc-en.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/parsleyjs/parsley.min.js"></script>
|
||||
|
||||
<!-- Dashboard init-->
|
||||
<script src="<?= base_url() . "public"; ?>/assets/js/pages/dashboard-analytics.init.js"></script>
|
||||
|
||||
<!-- Validation init js-->
|
||||
<script src="<?= base_url() . "public"; ?>/assets/js/pages/form-validation.init.js"></script>
|
||||
|
||||
<!-- App js -->
|
||||
<script src="<?= base_url() . "public"; ?>/assets/js/app.min.js"></script>
|
||||
|
||||
|
||||
<!-- Sweet Alert CDN -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap-multiselect@1.1.0/dist/js/bootstrap-multiselect.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.13/css/bootstrap-multiselect.css" />
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/toastr@2.1.4/toastr.min.js"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/toastr@2.1.4/build/toastr.min.css" rel="stylesheet">
|
||||
|
||||
<!-- flatpicker datepicker -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/flatpickr@4.6.13/dist/flatpickr.min.css" rel="stylesheet">
|
||||
<script src="https://cdn.jsdelivr.net/npm/flatpickr@4.6.13/dist/flatpickr.min.js"></script>
|
||||
|
||||
<!-- bootstrap datepicker -->
|
||||
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.10.0/js/bootstrap-datepicker.min.js"></script> -->
|
||||
|
||||
<script src="<?= base_url() . "public"; ?>/assets/js/pages/jquery.xeditable.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/js/form-xeditable.init.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/js/bootstrap-editable.min.js"></script>
|
||||
|
||||
<!-- Jodit Js -->
|
||||
<script src="<?= base_url() . "public"; ?>/assets/js/jodit.min.js"></script>
|
||||
|
||||
<!-- select2 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
|
||||
|
||||
|
||||
<script src="https://cdn.datatables.net/plug-ins/2.0.8/sorting/scientific.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.7.1/jszip.min.js"></script>
|
||||
|
||||
|
||||
<script>
|
||||
toastr.options = {
|
||||
"timeOut": 5000,
|
||||
"closeButton": true,
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
var pullNotificationCount = 0;
|
||||
var pendingActionCount = 0;
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
function fetchMessages() {
|
||||
|
||||
$.ajax({
|
||||
url: '<?= base_url('dashboard/get-notification') ?>',
|
||||
method: 'GET',
|
||||
success: function(response) {
|
||||
|
||||
// console.log('responce', response)
|
||||
|
||||
if(response.status == false){
|
||||
$('#notification_count').html('0')
|
||||
console.log('The session is not set correctly. ')
|
||||
return;
|
||||
}
|
||||
|
||||
let messagesList = $('#messages-list');
|
||||
messagesList.empty();
|
||||
|
||||
var html = "";
|
||||
|
||||
pullNotificationCount = response.message.length
|
||||
|
||||
|
||||
|
||||
localStorage.setItem('pullNotificationCount', pullNotificationCount)
|
||||
|
||||
response.message.forEach(message => {
|
||||
|
||||
// if (!message.is_read) {
|
||||
// unreadCount++;
|
||||
// }
|
||||
|
||||
var jasonDecodeData = JSON.parse(message.message_text)
|
||||
|
||||
var toast_body_css = 'background : #bfd7eb !important;';
|
||||
var toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
|
||||
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
|
||||
var toast_status_word = 'Success';
|
||||
|
||||
if (jasonDecodeData.msg_status == 'failure') {
|
||||
|
||||
toast_body_css = 'background : #fdcfcf !important;';
|
||||
toast_head_css = 'background-color : rgb(235 105 105 / 85%) !important; color :#000; border-bottom: 0;';
|
||||
toast_icon = 'mdi mdi-information mr-auto'
|
||||
toast_status_word = 'Failure';
|
||||
|
||||
} else if (jasonDecodeData.msg_status == 'success') {
|
||||
|
||||
toast_body_css = 'background : #bfd7eb !important;';
|
||||
toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
|
||||
toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto'
|
||||
toast_status_word = 'Success';
|
||||
}
|
||||
|
||||
var html = ` <li data-id="${message.id}" data-url="${jasonDecodeData.action_url != undefined && jasonDecodeData.action_url != "" ? jasonDecodeData.action_url : 'dashboard/view'}">
|
||||
<div class="p-3">
|
||||
<div class="toast fade show" role="alert" aria-live="assertive" aria-atomic="true" data-toggle="toast">
|
||||
<div class="toast-header " style="${toast_head_css}" >
|
||||
<strong class="${toast_icon}"> ${toast_status_word}</strong>
|
||||
<button type="button" class="ml-2 mb-1 close rm_msg" data-dismiss="toast" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="toast-body" style="${toast_body_css}">
|
||||
<strong>${jasonDecodeData.msg_title ? jasonDecodeData.msg_title : ''}</strong> <br><br>
|
||||
<small style="position: relative;bottom: 8px;">${jasonDecodeData.message_text}</small>
|
||||
<div class="toast-footer">
|
||||
<a href="#" class="redirect_page" data-toggle="tooltip" data-placement="bottom" title="Click Go to the Page"><small style="margin-right: 25px;position: relative;top: 2px;">${jasonDecodeData.action_url != undefined && jasonDecodeData.action_url != "" ? 'see more' : ''}</small></a>
|
||||
<small style="position: relative;top: 2px;left: 5px;font-size: 10px;">${formatDate(message.created_at)}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>`
|
||||
|
||||
|
||||
messagesList.append(html);
|
||||
$(function() {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
});
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(xhr.responseText); // Log the error response
|
||||
}
|
||||
});
|
||||
|
||||
let PNCount = parseInt(localStorage.getItem('pullNotificationCount'));
|
||||
let PACount = parseInt(localStorage.getItem('pendingActionCount'));
|
||||
|
||||
totalcount = PNCount + PACount
|
||||
$('#notification_count').html(totalcount);
|
||||
|
||||
}
|
||||
|
||||
function acknowledgeMessage(messageId) {
|
||||
$.ajax({
|
||||
url: '<?= base_url('dashboard/acknowledge-notification/') ?>' + messageId,
|
||||
method: 'GET',
|
||||
success: function(response) {
|
||||
fetchMessages();
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(xhr.responseText); // Log the error response
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('#messages-list').on('click', 'li', function(event) {
|
||||
|
||||
//console.log('messages-list click li')
|
||||
|
||||
if ($(event.target).closest('.rm_msg').length > 0) {
|
||||
|
||||
//console.log('.rm_msg')
|
||||
|
||||
let messageId = $(this).data('id');
|
||||
let url = $(this).data('url');
|
||||
acknowledgeMessage(messageId);
|
||||
|
||||
$(this).delay(300).fadeOut('slow', function() {
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
} else if ($(event.target).closest('.redirect_page').length > 0) {
|
||||
|
||||
//console.log('redirect_page')
|
||||
|
||||
let messageId = $(this).data('id');
|
||||
let url = $(this).data('url');
|
||||
//console.log('url : ', url)
|
||||
acknowledgeMessage(messageId);
|
||||
|
||||
window.location.href = '<?= base_url() ?>' + url;
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
// fetchMessages();
|
||||
|
||||
// setInterval(fetchMessages, 60000); // Fetch messages every sixty seconds
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
function fetchPendingAction() {
|
||||
|
||||
$.ajax({
|
||||
|
||||
url: '<?= base_url('dashboard/get-pending-action') ?>',
|
||||
method: 'GET',
|
||||
success: function(response) {
|
||||
|
||||
console.log(response);
|
||||
|
||||
if (response.length == 0) {
|
||||
|
||||
pendingActionCount = 0;
|
||||
localStorage.setItem('pendingActionCount', pendingActionCount);
|
||||
}
|
||||
|
||||
for (let key in response) {
|
||||
// console.log(response[key].length)
|
||||
// console.log('type', typeof response[key].length)
|
||||
// console.log('key', response[key])
|
||||
if(response[key].length != 'undefined' && response[key].length != undefined)
|
||||
{
|
||||
pendingActionCount = pendingActionCount + response[key].length;
|
||||
}
|
||||
}
|
||||
|
||||
console.log(pendingActionCount);
|
||||
|
||||
let messagesList = $('#messages-list-2');
|
||||
messagesList.empty();
|
||||
|
||||
|
||||
if (response.inception) {
|
||||
$.each(response.inception, function(index, item) {
|
||||
|
||||
var queryParams = {
|
||||
client_id: item.client_id,
|
||||
client_policy_id: item.client_policy_id,
|
||||
client_branch_id: item.branch_id,
|
||||
actions: 'inception'
|
||||
};
|
||||
|
||||
const queryString = objectToQueryString(queryParams);
|
||||
|
||||
var url = 'employee/upload?' + queryString
|
||||
////console.log(url)
|
||||
|
||||
|
||||
var toast_body_css = 'background : #bfd7eb !important;';
|
||||
var toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
|
||||
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
|
||||
var toast_status_word = 'Info';
|
||||
|
||||
if (!item.branch_name.toLowerCase().includes('branch')) {
|
||||
|
||||
//console.log(item.branch_name)
|
||||
item.branch_name += ' branch';
|
||||
}
|
||||
|
||||
////console.log(item.branch_name);
|
||||
|
||||
var toast_body_data = item.client_name + '( ' + item.branch_name + ' ) ' + ' - ' + item.policy_name;
|
||||
|
||||
////console.log(toast_body_data);
|
||||
|
||||
var html = ` <li data-id="" data-url="${url}">
|
||||
<div class="p-3">
|
||||
<div class="toast fade show" role="alert" aria-live="assertive" aria-atomic="true" data-toggle="toast">
|
||||
<div class="toast-header " style="${toast_head_css}" >
|
||||
<strong class="${toast_icon}"> ${toast_status_word}</strong>
|
||||
<button type="button" class="ml-2 mb-1 close rm_msg" data-dismiss="toast" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="toast-body" style="${toast_body_css}">
|
||||
<strong>Inception Pending</strong><br><br>
|
||||
<small style="position: relative;bottom: 8px;">${toast_body_data}</small>
|
||||
<div class="toast-footer">
|
||||
<a href="#" class="redirect_page" data-toggle="tooltip" data-placement="bottom" title="Click Go to the Page"><small style="margin-right: 142px;position: relative;top: 2px;">see more</small></a>
|
||||
<small style="position: relative;top: 2px;left: 5px;font-size: 10px;"></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>`
|
||||
|
||||
|
||||
messagesList.append(html);
|
||||
|
||||
});
|
||||
} else {
|
||||
console.log('response.inception is undefined or null');
|
||||
}
|
||||
|
||||
if (response.correction) {
|
||||
$.each(response.correction, function(index, item) {
|
||||
if (item.batch_export_count == 0 || item.batch_import_count == 0) {
|
||||
|
||||
|
||||
var queryParams = {
|
||||
client_id: item.client_id,
|
||||
client_branch_id: item.branch_id,
|
||||
event: 'correction',
|
||||
actions: 'export',
|
||||
insurer_or_tpa: 'tpa',
|
||||
};
|
||||
|
||||
const queryString = objectToQueryString(queryParams);
|
||||
|
||||
var url = 'employee/upload?' + queryString + '#KYC-DOC-tab'
|
||||
////console.log(url)
|
||||
|
||||
|
||||
var toast_body_css = 'background : #bfd7eb !important;';
|
||||
var toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
|
||||
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
|
||||
var toast_status_word = 'Info';
|
||||
|
||||
var title = 'Correction Pending';
|
||||
|
||||
|
||||
if (!item.branch_name.toLowerCase().includes('branch')) {
|
||||
|
||||
//console.log(item.branch_name)
|
||||
item.branch_name += ' branch';
|
||||
|
||||
}
|
||||
|
||||
////console.log(item.branch_name);
|
||||
|
||||
// if (item.batch_export_count > 0) {
|
||||
|
||||
// title = 'Correction Import Pending';
|
||||
// }
|
||||
|
||||
var toast_body_data = item.client_name + ' - ' + item.branch_name;
|
||||
////console.log(toast_body_data);
|
||||
|
||||
var html = ` <li data-id="" data-url="${url}">
|
||||
<div class="p-3">
|
||||
<div class="toast fade show" role="alert" aria-live="assertive" aria-atomic="true" data-toggle="toast">
|
||||
<div class="toast-header " style="${toast_head_css}" >
|
||||
<strong class="${toast_icon}"> ${toast_status_word}</strong>
|
||||
<button type="button" class="ml-2 mb-1 close rm_msg" data-dismiss="toast" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="toast-body" style="${toast_body_css}">
|
||||
<strong>${title}</strong><br><br>
|
||||
<small style="position: relative;bottom: 8px;">${toast_body_data}</small>
|
||||
<div class="toast-footer">
|
||||
<a href="#" class="redirect_page" data-toggle="tooltip" data-placement="bottom" title="Click Go to the Page"><small style="margin-right: 142px;position: relative;top: 2px;">see more</small></a>
|
||||
<small style="position: relative;top: 2px;left: 5px;font-size: 10px;"></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>`
|
||||
|
||||
|
||||
messagesList.append(html);
|
||||
|
||||
}
|
||||
});
|
||||
}else{
|
||||
console.log('response.correction is undefined or null');
|
||||
}
|
||||
|
||||
if (response.deletion) {
|
||||
$.each(response.deletion, function(index, item) {
|
||||
|
||||
if (item.batch_export_count == 0 || item.batch_import_count == 0) {
|
||||
|
||||
|
||||
var queryParams = {
|
||||
|
||||
client_id: item.client_id,
|
||||
client_policy_id: item.client_policy_id,
|
||||
client_branch_id: item.branch_id,
|
||||
event: 'deletion',
|
||||
actions: 'export',
|
||||
insurer_or_tpa: 'tpa',
|
||||
|
||||
};
|
||||
|
||||
const queryString = objectToQueryString(queryParams);
|
||||
|
||||
var url = 'employee/upload?' + queryString + '#KYC-DOC-tab'
|
||||
////console.log(url)
|
||||
|
||||
|
||||
var toast_body_css = 'background : #bfd7eb !important;';
|
||||
var toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
|
||||
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
|
||||
var toast_status_word = 'Info';
|
||||
var title = 'Deletion Pending';
|
||||
|
||||
|
||||
if (!item.branch_name.toLowerCase().includes('branch')) {
|
||||
|
||||
//console.log(item.branch_name)
|
||||
item.branch_name += ' branch';
|
||||
|
||||
}
|
||||
|
||||
////console.log(item.branch_name);
|
||||
|
||||
// if (item.batch_export_count > 0) {
|
||||
|
||||
// title = 'Deletion Import Pending';
|
||||
// }
|
||||
|
||||
var toast_body_data = item.client_name + '( ' + item.branch_name + ' ) ' + ' - ' + item.policy_name;
|
||||
////console.log(toast_body_data);
|
||||
|
||||
var html = ` <li data-id="" data-url="${url}">
|
||||
<div class="p-3">
|
||||
<div class="toast fade show" role="alert" aria-live="assertive" aria-atomic="true" data-toggle="toast">
|
||||
<div class="toast-header " style="${toast_head_css}" >
|
||||
<strong class="${toast_icon}"> ${toast_status_word}</strong>
|
||||
<button type="button" class="ml-2 mb-1 close rm_msg" data-dismiss="toast" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="toast-body" style="${toast_body_css}">
|
||||
<strong>${title}</strong><br><br>
|
||||
<small style="position: relative;bottom: 8px;">${toast_body_data}</small>
|
||||
<div class="toast-footer">
|
||||
<a href="#" class="redirect_page" data-toggle="tooltip" data-placement="bottom" title="Click Go to the Page"><small style="margin-right: 142px;position: relative;top: 2px;">see more</small></a>
|
||||
<small style="position: relative;top: 2px;left: 5px;font-size: 10px;"></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>`
|
||||
|
||||
|
||||
messagesList.append(html);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}else{
|
||||
console.log('response.deletion is undefined or null');
|
||||
|
||||
}
|
||||
|
||||
if (response.si_enhancement) {
|
||||
$.each(response.si_enhancement, function(index, item) {
|
||||
if (item.batch_export_count == 0 || item.batch_import_count == 0) {
|
||||
|
||||
|
||||
var queryParams = {
|
||||
client_id: item.client_id,
|
||||
client_policy_id: item.client_policy_id,
|
||||
client_branch_id: item.branch_id,
|
||||
event: 'si_enhancement',
|
||||
actions: 'export',
|
||||
insurer_or_tpa: 'tpa',
|
||||
};
|
||||
|
||||
const queryString = objectToQueryString(queryParams);
|
||||
|
||||
var url = 'employee/upload?' + queryString + '#KYC-DOC-tab'
|
||||
////console.log(url)
|
||||
|
||||
|
||||
var toast_body_css = 'background : #bfd7eb !important;';
|
||||
var toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
|
||||
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
|
||||
var toast_status_word = 'Info';
|
||||
var title = 'SI Enhancement Pending';
|
||||
|
||||
|
||||
if (!item.branch_name.toLowerCase().includes('branch')) {
|
||||
|
||||
//console.log(item.branch_name)
|
||||
item.branch_name += ' branch';
|
||||
|
||||
}
|
||||
|
||||
////console.log(item.branch_name);
|
||||
|
||||
// if (item.batch_export_count > 0) {
|
||||
|
||||
// title = 'SI Enhancement Import Pending';
|
||||
// }
|
||||
|
||||
var toast_body_data = item.client_name + '( ' + item.branch_name + ' ) ' + ' - ' + item.policy_name;
|
||||
////console.log(toast_body_data);
|
||||
|
||||
var html = ` <li data-id="" data-url="${url}">
|
||||
<div class="p-3">
|
||||
<div class="toast fade show" role="alert" aria-live="assertive" aria-atomic="true" data-toggle="toast">
|
||||
<div class="toast-header " style="${toast_head_css}" >
|
||||
<strong class="${toast_icon}"> ${toast_status_word}</strong>
|
||||
<button type="button" class="ml-2 mb-1 close rm_msg" data-dismiss="toast" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="toast-body" style="${toast_body_css}">
|
||||
<strong>${title}</strong><br><br>
|
||||
<small style="position: relative;bottom: 8px;">${toast_body_data}</small>
|
||||
<div class="toast-footer">
|
||||
<a href="#" class="redirect_page" data-toggle="tooltip" data-placement="bottom" title="Click Go to the Page"><small style="margin-right: 142px;position: relative;top: 2px;">see more</small></a>
|
||||
<small style="position: relative;top: 2px;left: 5px;font-size: 10px;"></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>`
|
||||
|
||||
|
||||
messagesList.append(html);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}else{
|
||||
console.log('response.si_enhancement is undefined or null');
|
||||
|
||||
}
|
||||
|
||||
if (response.tpa) {
|
||||
$.each(response.tpa, function(index, item) {
|
||||
if (item.batch_export_count == 0 || item.batch_import_count == 0) {
|
||||
|
||||
|
||||
var queryParams = {
|
||||
client_id: item.client_id,
|
||||
client_policy_id: item.client_policy_id,
|
||||
client_branch_id: item.branch_id,
|
||||
event: 'inception',
|
||||
insurer_or_tpa: 'tpa',
|
||||
actions: 'export',
|
||||
};
|
||||
|
||||
const queryString = objectToQueryString(queryParams);
|
||||
|
||||
var url = 'employee/upload?' + queryString + '#KYC-DOC-tab'
|
||||
////console.log(url)
|
||||
|
||||
|
||||
var toast_body_css = 'background : #bfd7eb !important;';
|
||||
var toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
|
||||
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
|
||||
var toast_status_word = 'Info';
|
||||
var title = 'TPA Pending';
|
||||
|
||||
if (!item.branch_name.toLowerCase().includes('branch')) {
|
||||
|
||||
//console.log(item.branch_name)
|
||||
item.branch_name += ' branch';
|
||||
|
||||
}
|
||||
|
||||
////console.log(item.branch_name);
|
||||
|
||||
// if (item.batch_export_count > 0) {
|
||||
|
||||
// title = 'TPA Import Pending';
|
||||
// }
|
||||
|
||||
var toast_body_data = item.client_name + '( ' + item.branch_name + ' ) ' + ' - ' + item.policy_name;
|
||||
////console.log(toast_body_data);
|
||||
|
||||
var html = ` <li data-id="" data-url="${url}">
|
||||
<div class="p-3">
|
||||
<div class="toast fade show" role="alert" aria-live="assertive" aria-atomic="true" data-toggle="toast">
|
||||
<div class="toast-header " style="${toast_head_css}" >
|
||||
<strong class="${toast_icon}"> ${toast_status_word}</strong>
|
||||
<button type="button" class="ml-2 mb-1 close rm_msg" data-dismiss="toast" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="toast-body" style="${toast_body_css}">
|
||||
<strong>${title}</strong><br><br>
|
||||
<small style="position: relative;bottom: 8px;">${toast_body_data}</small>
|
||||
<div class="toast-footer">
|
||||
<a href="#" class="redirect_page" data-toggle="tooltip" data-placement="bottom" title="Click Go to the Page"><small style="margin-right: 142px;position: relative;top: 2px;">see more</small></a>
|
||||
<small style="position: relative;top: 2px;left: 5px;font-size: 10px;"></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>`
|
||||
|
||||
|
||||
messagesList.append(html);
|
||||
|
||||
}
|
||||
});
|
||||
}else{
|
||||
console.log('response.tpa is undefined or null');
|
||||
|
||||
}
|
||||
|
||||
if (response.uhid) {
|
||||
$.each(response.uhid, function(index, item) {
|
||||
if (item.batch_export_count == 0 || item.batch_import_count == 0) {
|
||||
|
||||
var queryParams = {
|
||||
|
||||
client_id: item.client_id,
|
||||
client_policy_id: item.client_policy_id,
|
||||
client_branch_id: item.branch_id,
|
||||
event: 'inception',
|
||||
insurer_or_tpa: 'insurer',
|
||||
actions: 'export',
|
||||
};
|
||||
|
||||
const queryString = objectToQueryString(queryParams);
|
||||
|
||||
var url = 'employee/upload?' + queryString + '#KYC-DOC-tab'
|
||||
//console.log(url)
|
||||
|
||||
var toast_body_css = 'background : #bfd7eb !important;';
|
||||
var toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
|
||||
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
|
||||
var toast_status_word = 'Info';
|
||||
var title = 'Insurer Pending';
|
||||
|
||||
|
||||
if (!item.branch_name.toLowerCase().includes('branch')) {
|
||||
|
||||
//console.log(item.branch_name)
|
||||
item.branch_name += ' branch';
|
||||
|
||||
}
|
||||
|
||||
////console.log(item.branch_name);
|
||||
|
||||
// if (item.batch_export_count > 0) {
|
||||
|
||||
// title = 'Insurer Import Pending';
|
||||
// }
|
||||
|
||||
var toast_body_data = item.client_name + '( ' + item.branch_name + ' ) ' + ' - ' + item.policy_name;
|
||||
////console.log(toast_body_data);
|
||||
|
||||
var html = ` <li data-id="" data-url="${url}">
|
||||
<div class="p-3">
|
||||
<div class="toast fade show" role="alert" aria-live="assertive" aria-atomic="true" data-toggle="toast">
|
||||
<div class="toast-header " style="${toast_head_css}" >
|
||||
<strong class="${toast_icon}"> ${toast_status_word}</strong>
|
||||
<button type="button" class="ml-2 mb-1 close rm_msg" data-dismiss="toast" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="toast-body" style="${toast_body_css}">
|
||||
<strong>${title}</strong><br><br>
|
||||
<small style="position: relative;bottom: 8px;">${toast_body_data}</small>
|
||||
<div class="toast-footer">
|
||||
<a href="#" class="redirect_page" data-toggle="tooltip" data-placement="bottom" title="Click Go to the Page"><small style="margin-right: 142px;position: relative;top: 2px;">see more</small></a>
|
||||
<small style="position: relative;top: 2px;left: 5px;font-size: 10px;"></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>`
|
||||
|
||||
|
||||
messagesList.append(html);
|
||||
|
||||
}
|
||||
});
|
||||
}else{
|
||||
console.log('response.uhid is undefined or null');
|
||||
}
|
||||
localStorage.setItem('pendingActionCount', pendingActionCount)
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(xhr.responseText); // Log the error response
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
fetchPendingAction()
|
||||
|
||||
$('#messages-list-2').on('click', 'li', function(event) {
|
||||
|
||||
//console.log('messages-list-2 click li')
|
||||
|
||||
if ($(event.target).closest('.rm_msg').length > 0) {
|
||||
|
||||
//console.log('.rm_msg')
|
||||
|
||||
$(this).delay(300).fadeOut('slow', function() {
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
} else if ($(event.target).closest('.redirect_page').length > 0) {
|
||||
|
||||
//console.log('redirect_page')
|
||||
|
||||
let url = $(this).data('url');
|
||||
//console.log('url : ', url);
|
||||
|
||||
window.location.href = '<?= base_url() ?>' + url;
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
})
|
||||
|
||||
function objectToQueryString(obj) {
|
||||
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function formatDate(dateString)
|
||||
{
|
||||
// Parse the input date string
|
||||
let date = new Date(dateString);
|
||||
|
||||
// Define months array
|
||||
const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
||||
|
||||
// Extract day, month, year, hours, and minutes
|
||||
let day = date.getDate();
|
||||
let month = months[date.getMonth()];
|
||||
let year = date.getFullYear();
|
||||
let hours = date.getHours();
|
||||
let minutes = date.getMinutes();
|
||||
|
||||
// Convert hours to 12-hour format
|
||||
let period = hours >= 12 ? 'pm' : 'am';
|
||||
hours = hours % 12;
|
||||
hours = hours ? hours : 12; // Handle midnight (0 hours)
|
||||
|
||||
// Format the time string
|
||||
let timeString = ('0' + hours).slice(-2) + ':' + ('0' + minutes).slice(-2) + ' ' + period;
|
||||
|
||||
// Format the date string
|
||||
let formattedDate = day + '-' + month + '-' + year + ' ' + timeString;
|
||||
|
||||
return formattedDate;
|
||||
}
|
||||
|
||||
function printCurrentTime()
|
||||
{
|
||||
var now = new Date();
|
||||
var hours = now.getHours().toString().padStart(2, '0');
|
||||
var minutes = now.getMinutes().toString().padStart(2, '0');
|
||||
var seconds = now.getSeconds().toString().padStart(2, '0');
|
||||
var currentTime = hours + ':' + minutes + ':' + seconds;
|
||||
// console.log("Current Time:", currentTime);
|
||||
|
||||
return currentTime;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
function checkDuplicateTableFieldValue(tableName, fieldName, value, callback) {
|
||||
$.ajax({
|
||||
url: '<?= base_url('util/checkDuplicateTableFieldValue') ?>', // Adjust this to your endpoint in CodeIgniter
|
||||
type: 'POST',
|
||||
data: {
|
||||
table: tableName,
|
||||
field: fieldName,
|
||||
value: value
|
||||
},
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
if (typeof callback === 'function') {
|
||||
callback(response.isDuplicate); // Pass the result to the callback
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error('AJAX Error:', error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function sendAjaxRequestForGlobal(url, method, data = {}, successCallback = null, errorCallback = null) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: method,
|
||||
data: data,
|
||||
dataType: 'json', // Expected response type
|
||||
success: function(response) {
|
||||
// If a success callback is provided, call it with the response
|
||||
if (successCallback) {
|
||||
successCallback(response);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
// Handle errors if provided error callback
|
||||
if (errorCallback) {
|
||||
errorCallback(xhr, status, error);
|
||||
} else {
|
||||
console.error('AJAX Error:', error);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function confirmActionSweertAlert(message = "Are you sure?", confirmText = "Yes, Proceed!", cancelText = "Cancel", icon = "warning") {
|
||||
return Swal.fire({
|
||||
title: message,
|
||||
icon: icon,
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#3085d6",
|
||||
cancelButtonColor: "#d33",
|
||||
confirmButtonText: confirmText,
|
||||
cancelButtonText: cancelText
|
||||
}).then((result) => {
|
||||
return result.isConfirmed; // Returns true if confirmed, false otherwise
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
899
app/Views/layout/header_old.php
Normal file
@ -0,0 +1,899 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8" />
|
||||
<title><?= isset($page_name) ? $page_name : 'NHance'; ?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta content="" name="description" />
|
||||
<meta content="NHANCE" name="NHANCE" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
|
||||
|
||||
<!-- App favicon -->
|
||||
<link rel="shortcut icon" href="<?= base_url() . "public"; ?>/assets/images/Nhance_Favi.svg">
|
||||
|
||||
<!-- plugin css -->
|
||||
<link href="<?= base_url() . "public"; ?>/assets/libs/admin-resources/jquery.vectormap/jquery-jvectormap-1.2.2.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<!-- third party css -->
|
||||
<link href="<?= base_url() . "public"; ?>/assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?= base_url() . "public"; ?>/assets/libs/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?= base_url() . "public"; ?>/assets/libs/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?= base_url() . "public"; ?>/assets/libs/datatables.net-select-bs4/css//select.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
||||
<!-- third party css end -->
|
||||
|
||||
<!-- App css -->
|
||||
<link href="<?= base_url() . "public"; ?>/assets/css/bootstrap-creative.min.css" rel="stylesheet" type="text/css" id="bs-default-stylesheet" />
|
||||
<link href="<?= base_url() . "public"; ?>/assets/css/app-creative.min.css" rel="stylesheet" type="text/css" id="app-default-stylesheet" />
|
||||
|
||||
<link href="<?= base_url() . "public"; ?>/assets/css/bootstrap-creative-dark.min.css" rel="stylesheet" type="text/css" id="bs-dark-stylesheet" />
|
||||
<link href="<?= base_url() . "public"; ?>/assets/css/app-creative-dark.min.css" rel="stylesheet" type="text/css" id="app-dark-stylesheet" />
|
||||
|
||||
<!-- icons -->
|
||||
<link href="<?= base_url() . "public"; ?>/assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<link href="<?= base_url() . "public"; ?>/assets/libs/bootstrap-datepicker/css/bootstrap-datepicker.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?= base_url() . "public"; ?>/assets/libs/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet" type="text/css">
|
||||
<link href="<?= base_url() . "public"; ?>/assets/libs/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet" type="text/css">
|
||||
|
||||
|
||||
<!-- <link href="<?= base_url() . "public"; ?>/assets/css/bootstrap-material.min.css" rel="stylesheet" type="text/css" id="bs-default-stylesheet" /> -->
|
||||
<!-- <link href="<?= base_url() . "public"; ?>/assets/css/app-material.min.css" rel="stylesheet" type="text/css" id="app-default-stylesheet" /> -->
|
||||
|
||||
|
||||
<!-- <link href="<?= base_url() . "public"; ?>/assets/css/bootstrap-editable.css" rel="stylesheet" type="text/css" /> -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/remixicon/fonts/remixicon.css" rel="stylesheet">
|
||||
|
||||
<!-- Jodit Css -->
|
||||
<link href="<?= base_url() . "public"; ?>/assets/css/jodit.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
<!-- JQuery CDN -->
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
|
||||
<!-- Sweet Alert CDN -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.10.4/dist/sweetalert2.all.min.js"></script>
|
||||
|
||||
<!-- select2 -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js"></script>
|
||||
|
||||
<link rel="manifest" href="../manifest.json">
|
||||
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', function() {
|
||||
navigator.serviceWorker.register('../service-worker.js').then(function(registration) {
|
||||
// console.log('Service Worker registration successful with scope:', registration.scope);
|
||||
}, function(err) {
|
||||
// console.log('Service Worker registration failed:', err);
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.min.css" />
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script>
|
||||
<!-- srinivas -->
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap4-toggle@3.6.1/css/bootstrap4-toggle.min.css" rel="stylesheet">
|
||||
<script src="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap4-toggle@3.6.1/js/bootstrap4-toggle.min.js"></script>
|
||||
<script src="https://editor.unlayer.com/embed.js"></script>
|
||||
|
||||
<!-- MD5 Hash Start -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/blueimp-md5/2.19.0/js/md5.min.js"></script>
|
||||
|
||||
|
||||
<!-- MD5 Hash End -->
|
||||
|
||||
<!-- <script src="<?= base_url('public/unlayer/js/embed.js') . '' ?>"></script> -->
|
||||
<!-- srinivas -->
|
||||
<style>
|
||||
body[data-sidebar-size=condensed]:not([data-layout=compact]):not(.auth-fluid-pages) {
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
body[data-sidebar-size=condensed] .navbar-custom {
|
||||
left: 155px !important;
|
||||
}
|
||||
|
||||
body[data-sidebar-size=condensed] .logo-box {
|
||||
width: 155px !important;
|
||||
}
|
||||
|
||||
.navbar-custom {
|
||||
top: -10px !important;
|
||||
height: 61px !important;
|
||||
}
|
||||
|
||||
.logo-box {
|
||||
top: -10px !important;
|
||||
height: 61px !important;
|
||||
}
|
||||
|
||||
.content-page {
|
||||
padding: 80px 15px 65px 15px !important;
|
||||
}
|
||||
|
||||
/* Media query for small screens */
|
||||
@media screen and (min-width: 768px) {
|
||||
|
||||
/* Styles for screens with a minimum width of 768px (e.g., tablets and larger devices) */
|
||||
.navbar-custom .button-menu-mobile {
|
||||
display: none;
|
||||
/* Hide the button on larger screens */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.loader-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #00000069;
|
||||
z-index: 99999;
|
||||
}
|
||||
|
||||
.loader {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
font-size: 0;
|
||||
color: #00c9d0;
|
||||
display: inline-block;
|
||||
margin: -25px 0 0 -25px;
|
||||
text-indent: -9999em;
|
||||
-webkit-transform: translateZ(0);
|
||||
-ms-transform: translateZ(0);
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
.lead {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.loader div {
|
||||
background-color: #6ad9cf;
|
||||
display: inline-block;
|
||||
float: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
opacity: .5;
|
||||
border-radius: 50%;
|
||||
-webkit-animation: ballPulseDouble 2s ease-in-out infinite;
|
||||
animation: ballPulseDouble 2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.loader div:last-child {
|
||||
-webkit-animation-delay: -1s;
|
||||
animation-delay: -1s;
|
||||
}
|
||||
|
||||
@-webkit-keyframes ballPulseDouble {
|
||||
|
||||
0%,
|
||||
100% {
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0);
|
||||
}
|
||||
|
||||
50% {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes ballPulseDouble {
|
||||
|
||||
0%,
|
||||
100% {
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0);
|
||||
}
|
||||
|
||||
50% {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
.toast-success {
|
||||
background-color: #009688 !important;
|
||||
color: #FFFFFF !important;
|
||||
}
|
||||
|
||||
/* .dataTables_wrapper .text-right {
|
||||
position: relative;
|
||||
} */
|
||||
|
||||
.dataTables_wrapper .dt-buttons .buttons-csv,
|
||||
.dataTables_wrapper .dt-buttons .buttons-html5 {
|
||||
background-color: #02a8b5;
|
||||
color: #fff;
|
||||
border-color: #02a8b5;
|
||||
}
|
||||
|
||||
.dataTables_wrapper .dt-buttons .buttons-csv:hover,
|
||||
.dataTables_wrapper .dt-buttons .buttons-html5:hover {
|
||||
background-color: #028291;
|
||||
border-color: #028291;
|
||||
}
|
||||
|
||||
|
||||
.modal-full-width {
|
||||
width: 80% !important;
|
||||
/* width: 95% !important; */
|
||||
/* max-width: none; */
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
/* position: relative;
|
||||
flex: 1 1 auto; */
|
||||
padding: 2rem !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.text-danger-2 {
|
||||
font-style: italic;
|
||||
color: black !important;
|
||||
/* color: #02a8b5 !important; */
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* .form-group {
|
||||
margin-bottom: -0.2rem !important;
|
||||
}
|
||||
.form-row{
|
||||
width: 84%;
|
||||
} */
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.select2-container--default .select2-selection--single {
|
||||
height: 37px !important;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
line-height: 35px !important;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
top: 7px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.toast-body {
|
||||
padding: .75rem;
|
||||
background: aliceblue !important;
|
||||
}
|
||||
|
||||
#messages-list li {
|
||||
margin-top: 0;
|
||||
margin-bottom: -25px;
|
||||
/* Adjust this value to reduce the space */
|
||||
}
|
||||
|
||||
.toast-footer {
|
||||
text-align: right;
|
||||
color: #000;
|
||||
border-top: 1px solid aliceblue;
|
||||
margin-top: 11px;
|
||||
margin-bottom: -6px;
|
||||
}
|
||||
|
||||
|
||||
.right-bar {
|
||||
width: 300px;
|
||||
/* Adjust as needed */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fixed-header {
|
||||
position: relative;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
background-color: #f8f9fa !important;
|
||||
}
|
||||
|
||||
.scrollable-content {
|
||||
max-height: 42vh;
|
||||
overflow-y: auto;
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
/* Additional styles to enhance appearance */
|
||||
.header-title {
|
||||
position: relative;
|
||||
bottom: 5px;
|
||||
left: 60px;
|
||||
}
|
||||
|
||||
#app_content_management:hover {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
$(window).on('load', function() {
|
||||
setTimeout(function() {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').fadeOut('slow');
|
||||
}, 1000);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body class="loading" data-layout-mode="" data-layout='{"mode": "light", "width": "fluid", "menuPosition": "fixed", "sidebar": { "color": "light", "size": "condensed", "showuser": false}, "topbar": {"color": "dark"}, "showRightSidebarOnPageLoad": false}'></body>
|
||||
|
||||
<!-- Preloader -->
|
||||
<div class="loader-mask">
|
||||
<div class="loader">
|
||||
<img src="<?= base_url() . "public" ?>/assets/images/nhance-loader-fast.gif" height="40" width="40" alt="Loading...">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <img src="<?= base_url() . "public" ?>/assets/images/nhance-loader-fast.gif" height="40" width="40" alt="Loading..."> -->
|
||||
<!-- Begin page -->
|
||||
<div id="wrapper">
|
||||
|
||||
<!-- Topbar Start -->
|
||||
<div class="navbar-custom">
|
||||
<div class="container-fluid">
|
||||
<ul class="list-unstyled topnav-menu float-right mb-0">
|
||||
|
||||
<li class="d-none d-lg-block">
|
||||
<form class="app-search">
|
||||
<div class="app-search-box dropdown">
|
||||
<div class="input-group">
|
||||
<input type="search" class="form-control" placeholder="Search..." id="top-search">
|
||||
<div class="input-group-append">
|
||||
<button class="btn" type="submit">
|
||||
<i class="fe-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="dropdown-menu dropdown-lg" id="search-dropdown">
|
||||
<div class="dropdown-header noti-title">
|
||||
<h5 class="text-overflow mb-2">Found <span class="text-danger">09</span> results</h5>
|
||||
</div>
|
||||
|
||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
||||
<i class="fe-home mr-1"></i>
|
||||
<span>Analytics Report</span>
|
||||
</a>
|
||||
|
||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
||||
<i class="fe-aperture mr-1"></i>
|
||||
<span>How can I help you?</span>
|
||||
</a>
|
||||
|
||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
||||
<i class="fe-settings mr-1"></i>
|
||||
<span>User profile settings</span>
|
||||
</a>
|
||||
|
||||
<div class="dropdown-header noti-title">
|
||||
<h6 class="text-overflow mb-2 text-uppercase">Users</h6>
|
||||
</div>
|
||||
|
||||
<div class="notification-list">
|
||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
||||
<div class="media">
|
||||
<img class="d-flex mr-2 rounded-circle" src="<?= base_url() . "public"; ?>/assets/images/users/avatar-2.jpg" alt="Generic placeholder image" height="32">
|
||||
<div class="media-body">
|
||||
<h5 class="m-0 font-14">Erwin E. Brown</h5>
|
||||
<span class="font-12 mb-0">UI Designer</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
||||
<div class="media">
|
||||
<img class="d-flex mr-2 rounded-circle" src="<?= base_url() . "public"; ?>/assets/images/users/avatar-5.jpg" alt="Generic placeholder image" height="32">
|
||||
<div class="media-body">
|
||||
<h5 class="m-0 font-14">Jacob Deo</h5>
|
||||
<span class="font-12 mb-0">Developer</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div> -->
|
||||
</div>
|
||||
</form>
|
||||
</li>
|
||||
|
||||
<li class="dropdown notification-list topbar-dropdown">
|
||||
<a class="nav-link dropdown-toggle right-bar-toggle waves-effect waves-light">
|
||||
<i class="fe-bell noti-icon"></i>
|
||||
<span class="badge badge-danger rounded-circle noti-icon-badge" id="notification_count">0</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="dropdown notification-list topbar-dropdown">
|
||||
<a class="nav-link dropdown-toggle nav-user mr-0 waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
|
||||
<img src="<?php echo (get_userProfile() != null && !empty(get_userProfile())) ? get_userProfile() : base_url() . 'public/assets/images/avatar_2x.png'; ?>" alt="user-image" class="rounded-circle">
|
||||
<span class="pro-user-name ml-1" style="font-size: 16px;">
|
||||
<?= (isset(get_session_userdata()->first_name) ? get_session_userdata()->first_name : 'NOT SET') ?>
|
||||
<!-- <i class="mdi mdi-chevron-down"></i> -->
|
||||
</span>
|
||||
</a>
|
||||
<!--<div class="dropdown-menu dropdown-menu-right profile-dropdown ">
|
||||
<div class="dropdown-header noti-title">
|
||||
<h6 class="text-overflow m-0">Welcome !</h6>
|
||||
</div>
|
||||
|
||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
||||
<i class="ri-account-circle-line"></i>
|
||||
<span>My Account</span>
|
||||
</a>
|
||||
|
||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
||||
<i class="ri-settings-3-line"></i>
|
||||
<span>Settings</span>
|
||||
</a>
|
||||
|
||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
||||
<i class="ri-wallet-line"></i>
|
||||
<span>My Wallet <span class="badge badge-success float-right">3</span> </span>
|
||||
</a>
|
||||
|
||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
||||
<i class="ri-lock-line"></i>
|
||||
<span>Lock Screen</span>
|
||||
</a>
|
||||
|
||||
|
||||
<a href="<?= base_url('/logout'); ?>" class="dropdown-item notify-item">
|
||||
<i class="ri-logout-box-line"></i>
|
||||
<span>Logout</span>
|
||||
</a>
|
||||
|
||||
</div>-->
|
||||
</li>
|
||||
|
||||
<!-- <li class="dropdown notification-list">
|
||||
<a href="javascript:void(0);" class="nav-link right-bar-toggle waves-effect waves-light">
|
||||
<i class="fe-settings noti-icon"></i>
|
||||
</a>
|
||||
</li> -->
|
||||
|
||||
<li class="dropdown notification-list">
|
||||
<a href="<?= base_url('/logout'); ?>" class="nav-link waves-effect waves-light">
|
||||
<i class="ri-logout-box-r-line" style="font-size: 25px;"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- LOGO -->
|
||||
<div class="logo-box">
|
||||
<a href="https://localhost/nhance/dashboard/view" class="logo logo-dark text-center">
|
||||
<span class="logo-sm">
|
||||
<img src="<?= base_url() . "public"; ?>/assets/images/Nhance_Favi.svg" alt="" height="24">
|
||||
<!-- <span class="logo-lg-text-light">NHANCE</span> -->
|
||||
</span>
|
||||
<span class="logo-lg">
|
||||
<img src="<?= base_url() . "public"; ?>/assets/images/Nhance_Favi.svg" alt="" height="20">
|
||||
<!-- <span class="logo-lg-text-light">M</span> -->
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<a href="https://localhost/nhance/dashboard/view" class="logo logo-light text-center">
|
||||
<span class="logo-sm">
|
||||
<img src="<?= base_url() . "public"; ?>/assets/images/Nhance_Favi.svg" alt="" height="24">
|
||||
</span>
|
||||
<!-- <span class="logo-lg">
|
||||
<img src="<?= base_url() . "public"; ?>/assets/images/logo-light.png" alt="" height="20">
|
||||
</span> -->
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<ul class="list-unstyled topnav-menu topnav-menu-left m-0">
|
||||
<li>
|
||||
<button class="button-menu-mobile waves-effect waves-light">
|
||||
<i class="fe-menu"></i>
|
||||
</button>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<!-- Mobile menu toggle (Horizontal Layout)-->
|
||||
<a class="navbar-toggle nav-link" data-toggle="collapse" data-target="#topnav-menu-content">
|
||||
<div class="lines">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</div>
|
||||
</a>
|
||||
<!-- End mobile menu toggle-->
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end Topbar -->
|
||||
|
||||
<!-- ========== Left Sidebar Start ========== -->
|
||||
<div class="left-side-menu">
|
||||
|
||||
<!-- LOGO -->
|
||||
<div class="logo-box">
|
||||
<a href="<?= base_url('/dashboard/view') ?>" class="logo logo-dark text-center">
|
||||
<span class="logo-sm">
|
||||
<img src="<?= base_url() . "public"; ?>/assets/images/logo-sm-dark.png" alt="" height="24">
|
||||
<!-- <span class="logo-lg-text-light">nHance</span> -->
|
||||
</span>
|
||||
<span class="logo-lg">
|
||||
<img src="<?= base_url() . "public"; ?>/assets/images/logo-dark.png" alt="" height="20">
|
||||
<!-- <span class="logo-lg-text-light">N</span> -->
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<a href="<?= base_url('/dashboard/view') ?>" class="logo logo-light text-center">
|
||||
<span class="logo-sm">
|
||||
<img src="<?= base_url() . "public"; ?>/assets/images/nhance_white_logo.svg" alt="" width="130" height="30">
|
||||
</span>
|
||||
<!-- <span class="logo-lg">
|
||||
<img src="<?= base_url() . "public"; ?>./assets/images/logo-light.png" alt="" height="20">
|
||||
</span> -->
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="h-100" data-simplebar>
|
||||
<!--- Sidemenu -->
|
||||
<div id="sidebar-menu">
|
||||
<ul id="side-menu">
|
||||
|
||||
<li>
|
||||
<a href="<?= base_url('/dashboard/view') ?>">
|
||||
<i class="ri-dashboard-line"></i>
|
||||
<span> Dashboard </span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- client -->
|
||||
<?php if (in_array(get_role_id(), [1,2,3,5])) { ?>
|
||||
<li>
|
||||
<a href="<?= base_url('/client/list') ?>">
|
||||
<i class="mdi mdi-domain"></i>
|
||||
<span> Clients </span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<!-- Enrollment process -->
|
||||
<?php if (in_array(get_role_id(), [1,2,3,5]) || in_array(ENROLLMENT_TEAM_ID, user_team())) { ?>
|
||||
<li>
|
||||
<a href="#sidebarDashboards" data-toggle="collapse" class="waves-effect">
|
||||
<i class="fas fa-user-tie"></i>
|
||||
<span class="badge badge-success badge-pill float-right">2</span>
|
||||
<span> Action on Policies </span>
|
||||
</a>
|
||||
<div class="collapse" id="sidebarDashboards">
|
||||
<ul class="nav-second-level">
|
||||
|
||||
<li>
|
||||
<a href="<?= base_url('/employee/upload') ?>">View Inception</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/employee/list') ?>">View Members</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/employee/endorsement-list') ?>">View Endorsement</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/employee/enrollment-list') ?>">View Enrolment</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/employee/test_members_list') ?>">Test Members List</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<!-- Masters -->
|
||||
<?php if (get_role_id() == 1 || get_role_id() == 5) { ?>
|
||||
|
||||
<li>
|
||||
<a href="#sidebarDashboards" data-toggle="collapse" class="waves-effect">
|
||||
<i class="ri-database-2-line"></i>
|
||||
<span class="badge badge-success badge-pill float-right">2</span>
|
||||
<span> Masters </span>
|
||||
</a>
|
||||
<div class="collapse" id="sidebarDashboards">
|
||||
<ul class="nav-second-level">
|
||||
<li>
|
||||
<a href="<?= base_url('/master/insurer/list') ?>">Insurer</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/master/tpa/list') ?>">TPA</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/master/kyc/list') ?>">KYC</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/master/policy/list') ?>">Policy</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/master/cash_deposite/list') ?>">CD Master</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/master/vehicle/list') ?>">Vehicle Master</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/user/list') ?>"> Users </a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<!-- <li>
|
||||
<?php
|
||||
$sessionData = get_session_userdata();
|
||||
$currentUrl = base_url();
|
||||
$parsedUrl = parse_url($currentUrl);
|
||||
$baseUrl = $parsedUrl['scheme'] . '://' . $parsedUrl['host'] . '/';
|
||||
$hashedEmail = hash('sha256', $sessionData->email);
|
||||
$redirectUrl = getenv('helpdeskURL') . '/staff/login?' . http_build_query(['token' => $hashedEmail]);
|
||||
?>
|
||||
<a href="<?php echo $redirectUrl; ?>" target="_blank">
|
||||
<i class="mdi mdi-lifebuoy"></i>
|
||||
<span> Tickets </span>
|
||||
</a>
|
||||
</li> -->
|
||||
|
||||
<!-- Claims -->
|
||||
<?php if (in_array(get_role_id(), [1,2,3,5]) || in_array(CLAIMS_TEAM_ID, user_team())) { ?>
|
||||
<li>
|
||||
<a href="#sidebarDashboardsTicket" data-toggle="collapse" class="waves-effect">
|
||||
<i class="mdi mdi-lifebuoy"></i>
|
||||
<span class="badge badge-success badge-pill float-right">2</span>
|
||||
<span> Claims </span>
|
||||
</a>
|
||||
<div class="collapse" id="sidebarDashboardsTicket">
|
||||
<ul class="nav-second-level">
|
||||
<li>
|
||||
<a href="#" onclick="openTicketTypeAskModal()">New claim</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/ticket/list') ?>">Claim List</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/ticket/mail_template') ?>">Mail Template</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/ticket/ticket_reports') ?>">Claim Reports</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/ticket/feedback-list') ?>">Claim Feedback List</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<!-- leads -->
|
||||
<?php if (in_array(get_role_id(), [1,2,3,5]) || in_array(BUSINESS_SUPPORT_TEAM_ID, user_team()) || in_array(SALES_TEAM_ID, user_team())) { ?>
|
||||
<li>
|
||||
<a href="<?= base_url('/leads/list') ?>">
|
||||
<i class="mdi mdi-chart-bar"></i>
|
||||
<span> Leads </span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<!-- BDS -->
|
||||
<?php if ((get_role_id() == 1 || get_role_id() == 5) || (in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()) || in_array(POS_TEAM_ID, user_team()))) { ?>
|
||||
<li>
|
||||
<a href="#policyTransactions" data-toggle="collapse" class="waves-effect">
|
||||
<i class="mdi mdi-format-list-bulleted"></i>
|
||||
<span class="badge badge-success badge-pill float-right">2</span>
|
||||
<span> Policy Transactions </span>
|
||||
</a>
|
||||
<div class="collapse" id="policyTransactions">
|
||||
<ul class="nav-second-level">
|
||||
<li>
|
||||
<a href="#policyTransactionsSub" data-toggle="collapse" class="waves-effect">
|
||||
<i class="mdi mdi-format-list-bulleted"></i>
|
||||
<span>Policy Transactions</span>
|
||||
</a>
|
||||
<div class="collapse" id="policyTransactionsSub">
|
||||
<ul>
|
||||
|
||||
<?php if (in_array(get_role_id(), [1,5]) || (in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()) || in_array(POS_TEAM_ID, user_team()))) { ?>
|
||||
<li>
|
||||
<a href="<?= base_url('/policy_tranction/inception/list') ?>">Policy</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/policy_tranction/endorsement/list') ?>">Endorsement</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (in_array(get_role_id(), [1,5]) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(MANAGEMENT_TEAM_ID, user_team())) { ?>
|
||||
<li>
|
||||
<a href="<?= base_url('/policy_tranction/statement/list') ?>">Statement Upload</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<?php if ((get_role_id() == 1 || get_role_id() == 5) || (in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()) || in_array(POS_TEAM_ID, user_team()))) { ?>
|
||||
|
||||
<?php if (in_array(get_role_id(), [1,5]) || in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(POS_TEAM_ID, user_team()) ) { ?>
|
||||
<li>
|
||||
<a href="#policyReports" data-toggle="collapse" class="waves-effect">
|
||||
<i class="ri-file-chart-fill"></i>
|
||||
<span> Policy Reports </span>
|
||||
</a>
|
||||
<div class="collapse" id="policyReports">
|
||||
<ul class="nav-third-level">
|
||||
<li>
|
||||
<a href="<?= base_url('/policy_tranction/report/list') ?>">BDS</a>
|
||||
</li>
|
||||
<?php if (in_array(get_role_id(), [1,5]) || in_array(MANAGEMENT_TEAM_ID, user_team())) { ?>
|
||||
<li>
|
||||
<a href="<?= base_url('/policy_tranction/report/report-varience-list') ?>">Variance</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/policy_tranction/report/report-outstanding-list') ?>">Outstanding</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/bdsReport/irba_report') ?>">IRDA Reports</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/bdsReport/renewal_report') ?>">Renewal Reports</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/bdsReport/getTATReport') ?>">TAT Band Reports</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li>
|
||||
<a href="#policy_tat_report_type" data-toggle="collapse" class="waves-effect">
|
||||
<i class="ri-file-chart-fill"></i>
|
||||
<span> Policy TAT Reports </span>
|
||||
</a>
|
||||
<div class="collapse" id="policy_tat_report_type">
|
||||
<ul class="nav-third-level">
|
||||
<li>
|
||||
<a href="<?= base_url('/bdsReport/getMultiReport/1') ?>">TAT Band Wise</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="<?= base_url('/bdsReport/getMultiReport/2') ?>">ACM Status Wise</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/bdsReport/getMultiReport/3') ?>">ACM TAT Wise</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<?php if ((get_role_id() == 1 || get_role_id() == 5) || (in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()) )) { ?>
|
||||
<li>
|
||||
<a href="#policyPendingActions" data-toggle="collapse" class="waves-effect">
|
||||
<i class="mdi mdi-timer-sand"></i>
|
||||
<span> Policy Pending Actions </span>
|
||||
</a>
|
||||
<div class="collapse" id="policyPendingActions">
|
||||
<ul class="nav-third-level">
|
||||
<?php if (in_array(get_role_id(), [1,5]) || in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team())) { ?>
|
||||
<li>
|
||||
<a href="<?= base_url('/policy_tranction/report/report-finance-list') ?>">Finance Team</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (in_array(get_role_id(), [1,5]) || in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team())) { ?>
|
||||
<li>
|
||||
<a href="<?= base_url('/policy_tranction/report/report-business-list') ?>">Business Team</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ((get_role_id() == 1 || get_role_id() == 5) || (in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()) )) { ?>
|
||||
<li>
|
||||
<a href="#policyMasters" data-toggle="collapse" class="waves-effect">
|
||||
<i class="ri-database-2-line"></i>
|
||||
<span> Masters </span>
|
||||
</a>
|
||||
<div class="collapse" id="policyMasters">
|
||||
<ul class="nav-third-level">
|
||||
<li>
|
||||
<a href="<?= base_url('/master/cash_deposite/list') ?>">CD Master</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/master/vehicle/list') ?>">Vehicle Master</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ((get_role_id() == 1 || get_role_id() == 5) || (in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()))) { ?>
|
||||
<li>
|
||||
<a href="<?= base_url('/dmsSearch') ?>">
|
||||
<i class="ri-book-open-line"></i>
|
||||
<span> Documents</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<!-- Ad -->
|
||||
<?php if (in_array(get_role_id(), [1,2,3,5])) { ?>
|
||||
<li>
|
||||
<a id="app_content_management" href="#sidebarDashboardsmenu" data-toggle="collapse" class="waves-effect" style="color: grey;">
|
||||
<i class="fa fa-edit" aria-hidden="true"></i>
|
||||
<span class="badge badge-success badge-pill float-right">2</span>
|
||||
<span>App Content Mgmt</span>
|
||||
</a>
|
||||
<div class="collapse" id="sidebarDashboardsmenu">
|
||||
<ul class="nav-second-level">
|
||||
<li>
|
||||
<a href="<?= base_url('/add_image_index') ?>"> Advertisement Images </a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/frontend_content') ?>">Front-end Content</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li>
|
||||
<a id="user_manual" href="<?= base_url("autobookstackLogin") ?>" class="waves-effect" target="_blank" rel="noopener noreferrer">
|
||||
<i class="fa fa-info-circle" aria-hidden="true"></i>
|
||||
<span>User Manual</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- End Sidebar -->
|
||||
</div>
|
||||
<!-- Sidebar -left -->
|
||||
|
||||
</div>
|
||||
<!-- Left Sidebar End -->
|
||||
|
||||
<!-- ============================================================== -->
|
||||
<!-- Start Page Content here -->
|
||||
<!-- ============================================================== -->
|
||||
|
||||
<div class="content-page">
|
||||
<div class="content">
|
||||
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid"></div>
|
||||
@ -11,7 +11,7 @@
|
||||
<h5 class="m-1">
|
||||
<div class="row">
|
||||
<div class="col-md-6" style="position: relative;left: 17px;">
|
||||
<h4 style="text-align: left;">Lead Filter</h4>
|
||||
<h4 style="text-align: left; margin-left:30px;">Lead Filter</h4>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<a style="text-align: right;" id="toggleIcon" class="text-dark float-right"
|
||||
|
||||
@ -1,8 +1,4 @@
|
||||
<style>
|
||||
body {
|
||||
margin-top: 20px;
|
||||
background: #FAFAFA;
|
||||
}
|
||||
|
||||
.order-card {
|
||||
color: #fff;
|
||||
@ -123,129 +119,185 @@
|
||||
margin-top: 0;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.leadStatusTitle_1{margin-left:20px;}
|
||||
.leadStatusTitle_2{margin-left:20px;}
|
||||
|
||||
|
||||
.inside-tab-content-div{
|
||||
display:flex;
|
||||
justify-content:flex-start !important;
|
||||
flex-flow: row wrap;
|
||||
|
||||
}
|
||||
|
||||
.dash-card{
|
||||
background-color:#F4FBFB !important;
|
||||
border-radius:25px;
|
||||
border:2px solid #09B9BF;
|
||||
box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.1), 0px 4px 8px rgba(0, 0, 0, 0.2);
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
#leads-dash-tab{
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.span-color{
|
||||
color:#09B9BF !important;
|
||||
}
|
||||
|
||||
.leadTypeTile{
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
<?php
|
||||
$isActive = get_role_id() == STAFF_ROLE_ID && in_array(ENROLLMENT_TEAM_ID, user_team()) ? 'show active' : '';
|
||||
?>
|
||||
<div class="tab-pane fade <?= $isActive ?>" id="leads-dash-tab">
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-xl-3 leadTypeTile">
|
||||
<div class="card bg-c-Pelorous order-card" onclick="hide_and_show_tile(1,1)">
|
||||
<div class="card-block">
|
||||
<h6 class="m-b-20 font-15">Leads</h6>
|
||||
<h2 class="text-right"><i
|
||||
class="mdi mdi-playlist-check f-left"></i><span><?= isset($lead_data) ? $lead_data['total'] : 0 ?></span>
|
||||
</h2>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
<div class="col inside-tab-content-div">
|
||||
<div class="leadTypeTile">
|
||||
<div class="card dash-card" onclick="hide_and_show_tile(1,1)">
|
||||
<div class="card-block">
|
||||
<h4 class="mb-3">Leads</h4>
|
||||
<h2 ><span class="span-color"><?= isset($lead_data) ? $lead_data['total'] : 0 ?></span>
|
||||
</h2>
|
||||
<h6><span class="text-danger">Lead Tracker</span></h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 col-xl-3 leadTypeTile">
|
||||
<div class="card bg-c-Pelorous order-card" onclick="hide_and_show_tile(1,2)">
|
||||
<div class="card-block">
|
||||
<h6 class="m-b-20 font-15">BDS Renewals</h6>
|
||||
<h2 class="text-right"><i
|
||||
class="mdi mdi-playlist-check f-left"></i><span><?= isset($bds_renewal) ? $bds_renewal['total'] : 0 ?></span>
|
||||
</h2>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
<p class="m-b-1"> <span class="f-right"></span></p>
|
||||
<div class="leadTypeTile">
|
||||
<div class="card dash-card" onclick="hide_and_show_tile(1,2)">
|
||||
<div class="card-block">
|
||||
<h4 class="mb-3">BDS Renewals</h4>
|
||||
<h2 >
|
||||
<span class="span-color"><?= isset($bds_renewal) ? $bds_renewal['total'] : 0 ?></span>
|
||||
</h2>
|
||||
<h6><span class="text-danger">Renewal Tracker</span></h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="status_tile" style="padding-bottom: 10px;padding-left: 17px; ">
|
||||
<a href="#" onclick="hide_and_show_tile(2)"><i class="fas fa-arrow-left"></i> Back to Overview</a>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row d-flex align-items-center">
|
||||
<div class="status_tile" style="padding-left: 25px;">
|
||||
<a href="#" onclick="hide_and_show_tile('2')" ><b><i class="mdi mdi-chevron-left mdi-36px"></i></b> </a>
|
||||
</div>
|
||||
<div class="status_tile" style="padding-left: 30px;">
|
||||
<div class="status_tile" style="padding-left: 15px;">
|
||||
<a href="#" id="main_tile">Current Tile : </a>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<?php
|
||||
<div class="col inside-tab-content-div">
|
||||
<?php
|
||||
$colorSetCount = count($colorShades); // Number of color sets
|
||||
$shadeCount = count($colorShades[0]); // Number of shades per set
|
||||
$index = 0;
|
||||
foreach ($lead_data as $key => $value) : ?>
|
||||
<?php
|
||||
if ($key == "total" || $key == "won" || substr($key, -4) === "_ids") {
|
||||
continue;
|
||||
} // Skip the total key
|
||||
?>
|
||||
<?php
|
||||
// Initialize color set and shade indexes
|
||||
$colorSetIndex = floor($index / $shadeCount) % $colorSetCount; // Reset color set after each set
|
||||
$shadeIndex = $index % $shadeCount; // Cycle through shades within the set
|
||||
|
||||
$colorSetCount = count($colorShades); // Number of color sets
|
||||
$shadeCount = count($colorShades[0]); // Number of shades per set
|
||||
$index = 0;
|
||||
foreach ($lead_data as $key => $value) : ?>
|
||||
<?php
|
||||
if ($key == "total" || $key == "won" || substr($key, -4) === "_ids") {
|
||||
continue;
|
||||
} // Skip the total key
|
||||
?>
|
||||
<?php
|
||||
// Initialize color set and shade indexes
|
||||
$colorSetIndex = floor($index / $shadeCount) % $colorSetCount; // Reset color set after each set
|
||||
$shadeIndex = $index % $shadeCount; // Cycle through shades within the set
|
||||
// Get the background color for the current tile
|
||||
$bgColor = $colorShades[$colorSetIndex][$shadeIndex];
|
||||
?>
|
||||
<?php
|
||||
$formattedStatus = strlen($key) < 5 ? strtoupper($key) : ucwords(str_replace('_', ' ', $key));
|
||||
$truncatedStatus = strlen($formattedStatus) > 20 ? substr($formattedStatus, 0, 15) . '...' : $formattedStatus;
|
||||
$showTooltip = strlen($formattedStatus) > 20;
|
||||
?>
|
||||
<div class="leadStatusTitle_1" style="display: none;">
|
||||
<div class="card dash-card"
|
||||
onclick="linkRedirectForLeads('<?= esc(strtolower(str_replace(' ', '_', $key)), 'js') ?>','<?= $lead_data[$key . '_ids'] ?? '' ?>')">
|
||||
<div class="card-block">
|
||||
<h5 class="text-right">
|
||||
<span class="f-left"
|
||||
<?= $showTooltip ? 'data-toggle="tooltip" title="' . htmlspecialchars($formattedStatus, ENT_QUOTES, 'UTF-8') . '"' : '' ?>>
|
||||
<?= $truncatedStatus ?>
|
||||
</span>
|
||||
<span><?= $value ?></span>
|
||||
</h5>
|
||||
|
||||
</div>
|
||||
|
||||
// Get the background color for the current tile
|
||||
$bgColor = $colorShades[$colorSetIndex][$shadeIndex];
|
||||
?>
|
||||
<?php
|
||||
$formattedStatus = strlen($key) < 5 ? strtoupper($key) : ucwords(str_replace('_', ' ', $key));
|
||||
$truncatedStatus = strlen($formattedStatus) > 20 ? substr($formattedStatus, 0, 15) . '...' : $formattedStatus;
|
||||
$showTooltip = strlen($formattedStatus) > 20;
|
||||
?>
|
||||
<div class="col-md-2 col-xl-1 leadStatusTitle_1" style="display: none;">
|
||||
<div class="card order-card" style="background: <?= $bgColor ?>;"
|
||||
onclick="linkRedirectForLeads('<?= esc(strtolower(str_replace(' ', '_', $key)), 'js') ?>','<?= $lead_data[$key . '_ids'] ?? '' ?>')">
|
||||
<h2 class="text-center"><span><?= $value ?></span></h2>
|
||||
<h6 class="m-b-20 font-15 text-center"
|
||||
<?= $showTooltip ? 'data-toggle="tooltip" title="' . htmlspecialchars($formattedStatus, ENT_QUOTES, 'UTF-8') . '"' : '' ?>>
|
||||
<?= $truncatedStatus ?>
|
||||
</h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<?php
|
||||
$colorSetCount = count($colorShades); // Number of color sets
|
||||
$shadeCount = count($colorShades[0]); // Number of shades per set
|
||||
$index = 0;
|
||||
|
||||
foreach ($bds_renewal as $key => $value) : ?>
|
||||
<div class="col inside-tab-content-div">
|
||||
<?php
|
||||
if ($key == "total" || substr($key, -4) === "_ids") {
|
||||
continue;
|
||||
} // Skip the total key
|
||||
?>
|
||||
<?php
|
||||
// Initialize color set and shade indexes
|
||||
$colorSetIndex = floor($index / $shadeCount) % $colorSetCount; // Reset color set after each set
|
||||
$shadeIndex = $index % $shadeCount; // Cycle through shades within the set
|
||||
$colorSetCount = count($colorShades); // Number of color sets
|
||||
$shadeCount = count($colorShades[0]); // Number of shades per set
|
||||
$index = 0;
|
||||
|
||||
// Get the background color for the current tile
|
||||
$bgColor = $colorShades[$colorSetIndex][$shadeIndex];
|
||||
?>
|
||||
<?php
|
||||
$formattedStatus = strlen($key) < 5 ? strtoupper($key) : ucwords(str_replace('_', ' ', $key));
|
||||
$truncatedStatus = strlen($formattedStatus) > 20 ? substr($formattedStatus, 0, 15) . '...' : $formattedStatus;
|
||||
$showTooltip = strlen($formattedStatus) > 20;
|
||||
?>
|
||||
<div class="col-md-2 col-xl-1 leadStatusTitle_2" style="display: none;">
|
||||
foreach ($bds_renewal as $key => $value) : ?>
|
||||
<?php
|
||||
$policyIds = isset($bds_renewal[$key . '_ids'])
|
||||
? (is_array($bds_renewal[$key . '_ids'])
|
||||
? implode('_', $bds_renewal[$key . '_ids'])
|
||||
: str_replace(' ', '_', $bds_renewal[$key . '_ids']))
|
||||
: '';
|
||||
if ($key == "total" || substr($key, -4) === "_ids") {
|
||||
continue;
|
||||
} // Skip the total key
|
||||
?>
|
||||
<div class="card order-card" style="background: <?= $bgColor ?>;"
|
||||
onclick="linkRedirectForPolicy('<?= $policyIds ?>')">
|
||||
<h2 class="text-center"><span><?= $value ?></span></h2>
|
||||
<h6 class="m-b-20 font-15 text-center"
|
||||
<?= $showTooltip ? 'data-toggle="tooltip" title="' . htmlspecialchars($formattedStatus, ENT_QUOTES, 'UTF-8') . '"' : '' ?>>
|
||||
<?= $truncatedStatus ?>
|
||||
</h6>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
// Initialize color set and shade indexes
|
||||
$colorSetIndex = floor($index / $shadeCount) % $colorSetCount; // Reset color set after each set
|
||||
$shadeIndex = $index % $shadeCount; // Cycle through shades within the set
|
||||
|
||||
<?php endforeach ?>
|
||||
// Get the background color for the current tile
|
||||
$bgColor = $colorShades[$colorSetIndex][$shadeIndex];
|
||||
?>
|
||||
<?php
|
||||
$formattedStatus = strlen($key) < 5 ? strtoupper($key) : ucwords(str_replace('_', ' ', $key));
|
||||
$truncatedStatus = strlen($formattedStatus) > 20 ? substr($formattedStatus, 0, 15) . '...' : $formattedStatus;
|
||||
$showTooltip = strlen($formattedStatus) > 20;
|
||||
?>
|
||||
<div class="leadStatusTitle_2" style="display: none;">
|
||||
<?php
|
||||
$policyIds = isset($bds_renewal[$key . '_ids'])
|
||||
? (is_array($bds_renewal[$key . '_ids'])
|
||||
? implode('_', $bds_renewal[$key . '_ids'])
|
||||
: str_replace(' ', '_', $bds_renewal[$key . '_ids']))
|
||||
: '';
|
||||
?>
|
||||
<div class="card dash-card"
|
||||
onclick="linkRedirectForPolicy('<?= $policyIds ?>')">
|
||||
<div class="card-block">
|
||||
<h5 class="text-right">
|
||||
<span class="f-left"
|
||||
<?= $showTooltip ? 'data-toggle="tooltip" title="' . htmlspecialchars($formattedStatus, ENT_QUOTES, 'UTF-8') . '"' : '' ?>>
|
||||
<?= $truncatedStatus ?>
|
||||
</span>
|
||||
<span class="span-color"><?= $value ?></span>
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
@ -256,6 +308,24 @@ $isActive = get_role_id() == STAFF_ROLE_ID && in_array(ENROLLMENT_TEAM_ID, user_
|
||||
|
||||
function hide_and_show_tile(type, leadType = null) {
|
||||
|
||||
|
||||
let dashboardHistoryString = localStorage.getItem('dashboardHistory');
|
||||
|
||||
|
||||
if (dashboardHistoryString){
|
||||
|
||||
let dashboardHistory = JSON.parse(dashboardHistoryString);
|
||||
|
||||
dashboardHistory['tile_params'] = { majorType: type, minorType: leadType };
|
||||
dashboardHistory['function_name'] = 'hide_and_show_tile';
|
||||
|
||||
|
||||
localStorage.setItem('dashboardHistory', JSON.stringify(dashboardHistory));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (type == 1) {
|
||||
|
||||
$('.leadTypeTile').hide();
|
||||
@ -273,12 +343,12 @@ $isActive = get_role_id() == STAFF_ROLE_ID && in_array(ENROLLMENT_TEAM_ID, user_
|
||||
|
||||
if (type == 1 && leadType != null && leadType == 1) {
|
||||
$('.leadStatusTitle_1').show();
|
||||
$('#main_tile').text("Viewing Details For : Leads");
|
||||
$('#main_tile').text(" Leads");
|
||||
|
||||
}
|
||||
if (type == 1 && leadType != null && leadType == 2) {
|
||||
$('.leadStatusTitle_2').show();
|
||||
$("#main_tile").text("Viewing Details For : BDS Renewals");
|
||||
$("#main_tile").text(" BDS Renewals");
|
||||
|
||||
}
|
||||
|
||||
@ -311,7 +381,6 @@ $isActive = get_role_id() == STAFF_ROLE_ID && in_array(ENROLLMENT_TEAM_ID, user_
|
||||
const form = document.createElement('form');
|
||||
form.method = method;
|
||||
form.action = url;
|
||||
form.target = '_blank';
|
||||
|
||||
|
||||
for (const key in data) {
|
||||
|
||||
@ -132,8 +132,8 @@ table.dataTable tbody td {
|
||||
<label>Statement Month<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control"
|
||||
style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<span></span> <i class="fa fa-caret-down"></i>
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
|
||||
@ -138,8 +138,16 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="radio" id="familyFloaterYes" name="family_floater" class="family_floater" value="1"> Yes
|
||||
<input type="radio" id="familyFloaterNo" name="family_floater" class="family_floater" value="0" style="margin-left:10px">No
|
||||
|
||||
<input type="radio" id="familyFloaterYes" name="family_floater" class="family_floater" value="1">
|
||||
<label for="familyFloaterYes">Yes</label>
|
||||
|
||||
<br>
|
||||
|
||||
<input type="radio" id="familyFloaterNo" name="family_floater" class="family_floater" value="0" style="margin-left:10px">
|
||||
<label for="familyFloaterNo">No</label>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
@ -150,25 +158,25 @@
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 11%;"><span style="margin-right: 20px;">Self:</span></td>
|
||||
<td style="width: 11%;"><input type="checkbox" style="margin-right: 70px;"
|
||||
<td style="width: 11%;"><span style="margin-right:20px;color:black;">Self:</span></td>
|
||||
<td style="width: 11%;"><input type="checkbox" style="margin-right: 70px;color:black;"
|
||||
name="family_floaters[]" value="self" id="self" checked> </td>
|
||||
<td style="width: 28%;">
|
||||
<div class="self-age"><span style="margin-right: 20px;">Min Age:</span><input
|
||||
<div class="self-age"><span style="margin-right:20px;color:black;;">Min Age:</span><input
|
||||
class="underline-input min_age"
|
||||
value="<?php echo (isset($self_min_age) && $self_min_age > 0) ? $self_min_age : '18'; ?>"
|
||||
style="width: 35%;;" type="number" name="self_min_age" id="self_min_age"
|
||||
onchange="lowerIsEighteen(this)"></div>
|
||||
</td>
|
||||
<td style="width: 28%;">
|
||||
<div class="self-age"><span style="margin-right: 20px;">Max Age:</span><input
|
||||
<div class="self-age"><span style="margin-right:20px;color:black;">Max Age:</span><input
|
||||
class="underline-input max_age"
|
||||
value="<?php echo isset($self_max_age) ? $self_max_age : '60'; ?>"
|
||||
style="width: 35%;;" type="number" name="self_max_age" id="self_max_age"
|
||||
onchange="lowerIsEighteen(this)"></div>
|
||||
</td>
|
||||
<!-- <td style="width: 11%;"><span class="self-age"
|
||||
style="margin-right: 20px;font-size: 12px;">Is Payable by employee:</span></td>
|
||||
style="margin-right:20px;color:black;font-size: 12px;">Is Payable by employee:</span></td>
|
||||
<td style="width: 11%;"><input class="self-age" type="checkbox"
|
||||
style="margin-right: 70px;" name="is_payable_employee_for_self"
|
||||
id="is_payable_employee_for_self"> </td> -->
|
||||
@ -183,25 +191,25 @@
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 11%;"><span style="margin-right: 20px;">Spouse:</span></td>
|
||||
<td style="width: 11%;"><span style="margin-right:20px;color:black;">Spouse:</span></td>
|
||||
<td style="width: 11%;"><input type="checkbox" style="margin-right: 70px;"
|
||||
name="family_floaters[]" value="spouse" id="spouse"></td>
|
||||
<td style="width: 28%;">
|
||||
<div class="spouse-age"><span style="margin-right: 20px;">Min Age:</span><input
|
||||
<div class="spouse-age"><span style="margin-right:20px;color:black;">Min Age:</span><input
|
||||
class="underline-input min_age"
|
||||
value="<?php echo isset($spouse_min_age) ? $spouse_min_age : '18'; ?>"
|
||||
style="width: 35%;;" type="number" name="spouse_min_age" id="spouse_min_age"
|
||||
onchange="lowerIsEighteen(this)"></div>
|
||||
</td>
|
||||
<td style="width: 28%;">
|
||||
<div class="spouse-age"><span style="margin-right: 20px;">Max Age:</span><input
|
||||
<div class="spouse-age"><span style="margin-right:20px;color:black;">Max Age:</span><input
|
||||
class="underline-input max_age"
|
||||
value="<?php echo isset($spouse_max_age) ? $spouse_max_age : '60'; ?>"
|
||||
style="width: 35%;;" type="number" name="spouse_max_age" id="spouse_max_age"
|
||||
onchange="lowerIsEighteen(this)"></div>
|
||||
</td>
|
||||
<!-- <td style="width: 11%;"><span class="spouse-age"
|
||||
style="margin-right: 20px;font-size: 12px;">Is Payable by employee:</span></td>
|
||||
style="margin-right:20px;color:black;font-size: 12px;">Is Payable by employee:</span></td>
|
||||
<td style="width: 11%;"><input class="spouse-age" type="checkbox"
|
||||
style="margin-right: 70px;" name="is_payable_employee_for_spouse"
|
||||
id="is_payable_employee_for_spouse"> </td> -->
|
||||
@ -226,21 +234,21 @@
|
||||
</select>
|
||||
</td>
|
||||
<td style="width: 28%;">
|
||||
<div class="child-age"><span style="margin-right: 20px;">Min Age:</span><input
|
||||
<div class="child-age"><span style="margin-right:20px;color:black;">Min Age:</span><input
|
||||
class="underline-input min_age"
|
||||
value="<?php echo isset($child_min_age) ? $child_min_age : '0'; ?>"
|
||||
style="width: 35%;;" type="number" name="child_min_age" id="child_min_age"
|
||||
oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div>
|
||||
</td>
|
||||
<td style="width: 28%;">
|
||||
<div class="child-age"><span style="margin-right: 20px;">Max Age:</span><input
|
||||
<div class="child-age"><span style="margin-right:20px;color:black;">Max Age:</span><input
|
||||
class="underline-input max_age"
|
||||
value="<?php echo isset($child_max_age) ? $child_max_age : '25'; ?>"
|
||||
style="width: 35%;;" type="number" name="child_max_age" id="child_max_age"
|
||||
oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div>
|
||||
</td>
|
||||
<!-- <td style="width: 11%;"><span class="child-age"
|
||||
style="margin-right: 20px;font-size: 12px;">Is Payable by employee:</span></td>
|
||||
style="margin-right:20px;color:black;font-size: 12px;">Is Payable by employee:</span></td>
|
||||
<td style="width: 11%;"><input class="child-age" type="checkbox"
|
||||
style="margin-right: 70px;" name="is_payable_employee_for_child"
|
||||
id="is_payable_employee_for_child"> </td> -->
|
||||
@ -261,7 +269,7 @@
|
||||
<div style="margin-top:10px"></div>
|
||||
|
||||
<div style="margin-top:10px">
|
||||
<span for="family_floaters">Select Other Members:</span>
|
||||
<span for="family_floaters" style="color:black;">Select Other Members:</span>
|
||||
<select name="family_floaters[]" id="family_floaters" style="margin-left: 10px;">
|
||||
<option value="0">None</option>
|
||||
<option value="1P">Only one parent (Either Father / Mother)</option>
|
||||
@ -279,14 +287,14 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 22%;">
|
||||
<div class="other-member-age"><span style="margin-right: 20px;">Elders
|
||||
<div class="other-member-age"><span style="margin-right:20px;color:black;">Elders
|
||||
Count:</span><input class="underline-input" id="member_count"
|
||||
style="width: 30%; width: 30%;background: lightgray;" type="number"
|
||||
name="elder_member_count" id="member_count" readonly></div>
|
||||
</td>
|
||||
<td style="width: 28%;">
|
||||
<div class="other-member-age" style="margin-left: 32px;"><span
|
||||
style="margin-right: 20px;">Min Age:</span><input
|
||||
style="margin-right:20px;color:black;">Min Age:</span><input
|
||||
class="underline-input min_age"
|
||||
value="<?php echo isset($other_member_min_age) ? $other_member_min_age : '18'; ?>"
|
||||
style="width: 35%;;" type="number" class="underline-input min_age"
|
||||
@ -295,7 +303,7 @@
|
||||
</td>
|
||||
<td style="width: 28%;">
|
||||
<div class="other-member-age" style="margin-left: 17px;"><span
|
||||
style="margin-right: 20px;">Max Age:</span><input
|
||||
style="margin-right:20px;color:black;">Max Age:</span><input
|
||||
class="underline-input max_age"
|
||||
value="<?php echo isset($other_member_max_age) ? $other_member_max_age : '60'; ?>"
|
||||
style="width: 35%;;" type="number" class="underline-input max_age"
|
||||
@ -303,7 +311,7 @@
|
||||
onchange="lowerIsEighteen(this)"></div>
|
||||
</td>
|
||||
<!-- <td style="width: 11%;"><span class="other-member-age"
|
||||
style="margin-right: 20px;font-size: 12px;">Is Payable by employee:</span>
|
||||
style="margin-right:20px;color:black;font-size: 12px;">Is Payable by employee:</span>
|
||||
</td>
|
||||
<td style="width: 11%;"><input class="other-member-age" type="checkbox"
|
||||
style="margin-right: 70px;" name="is_payable_employee_for_elders"
|
||||
|
||||
@ -268,8 +268,8 @@ custom-dropdown-menu {
|
||||
<div class="form-group col-md-3" style="display: none;" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<span></span> <i class="fa fa-caret-down"></i>
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
|
||||
@ -836,7 +836,7 @@
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="new_vehicle_switch">New Vehicle</label>
|
||||
<input id="new_vehicle_switch" type="checkbox" name="new_vehicle" value="1" data-toggle="toggle" data-on="Yes" data-off="No" data-onstyle="info" data-offstyle="dark" data-style="border" data-width="218">
|
||||
<input id="new_vehicle_switch" type="checkbox" name="new_vehicle" value="1" data-toggle="toggle" data-on="Yes" data-off="No" data-onstyle="info" data-offstyle="primary" data-style="border" data-width="218">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
|
||||
@ -239,8 +239,8 @@ table.dataTable tbody td {
|
||||
<div class="form-group col-md-3" style="display: none;" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<span></span> <i class="fa fa-caret-down"></i>
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
@ -321,7 +321,7 @@ table.dataTable tbody td {
|
||||
<a class="dropdown-item btnEdit" data-id="<?= $row['id'];?>" onclick="getPolicyTransactionDataForEdit('<?= htmlspecialchars($row['id'], ENT_QUOTES) ?>')">
|
||||
<i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit
|
||||
</a>
|
||||
<a class="dropdown-item delete" data-id="<?= $row['id'];?>" onclick="removePolicyTransaction(this, '<?= htmlspecialchars($row['id'], ENT_QUOTES) ?>')">
|
||||
<a class="dropdown-item delete" data-id="<?= $row['id'];?>" onclick="removePolicyTransaction(this, '<?= htmlspecialchars($row['id'], ENT_QUOTES) ?>', <?= $row['policy_type_id'] ?>)">
|
||||
<i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete
|
||||
</a>
|
||||
</div>
|
||||
@ -1668,9 +1668,14 @@ function hideDateField(input = null)
|
||||
}
|
||||
}
|
||||
|
||||
function removePolicyTransaction(input, pt_id) {
|
||||
function removePolicyTransaction(input, pt_id, policy_type_id) {
|
||||
|
||||
confirmActionSweertAlert("Do you want to delete this transaction?", "Yes, Proceed!", "No, Cancel").then((confirmed) => {
|
||||
let string = "Do you want to delete this transaction?";
|
||||
if(policy_type_id > 7){
|
||||
string = "Do you want to delete this transaction? Deleting this will also remove the linked CRM policy entry.";
|
||||
}
|
||||
|
||||
confirmActionSweertAlert(string, "Yes, Proceed!", "No, Cancel").then((confirmed) => {
|
||||
if (confirmed) {
|
||||
let url = '<?= base_url('policy_tranction/inception/removePolicyTransaction/') ?>' + pt_id;
|
||||
|
||||
@ -1694,6 +1699,4 @@ function removePolicyTransaction(input, pt_id) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@ -39,7 +39,7 @@ body {
|
||||
<h4 style="position: relative;">Policy Type</h4>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right;">
|
||||
<a href="<?= base_url("master/policy/list"); ?>"><i class="fas fa-arrow-left" style="font-size: 17px;"></i> </a>
|
||||
<a href="<?= base_url("master/policy/list"); ?>"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i> </a>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="nav nav-pills navtab-bg">
|
||||
|
||||
@ -10,19 +10,19 @@
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#KYC-DOC-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-2" id="kyc_tab2">
|
||||
<span class="mr-1"><i class="fa fa-file"></i></span>
|
||||
<span class="mr-1"><i class="mdi mdi-file"></i></span>
|
||||
<span class="d-none d-sm-inline-block">KYC Docs</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item" id="hide_file_upload" style="display: none;">
|
||||
<a href="#fileupload" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-2" id="kyc_tab">
|
||||
<span class="mr-1"><i class="fa fa-file"></i></span>
|
||||
<span class="mr-1"><i class="mdi mdi-file"></i></span>
|
||||
<span class="d-none d-sm-inline-block">File Upload</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item" id="hide_vehicle_tab" style="display: none;">
|
||||
<a href="#vehicle-docs-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-2" id="vehicle_tab">
|
||||
<span class="mr-1"><i class="fa fa-file"></i></span>
|
||||
<span class="mr-1"><i class="mdi mdi-file"></i></span>
|
||||
<span class="d-none d-sm-inline-block">Vehicle Docs</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@ -16,8 +16,8 @@
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control"
|
||||
style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<span></span> <i class="fa fa-caret-down"></i>
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate" value=<?= $default_start ?>>
|
||||
<input type="hidden" id="endDate" value=<?= $default_end ?>>
|
||||
|
||||
@ -114,8 +114,8 @@
|
||||
<div class="form-group col-md-3" style="display: none;" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<span></span> <i class="fa fa-caret-down"></i>
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
|
||||
671
app/Views/thz_list.php
Normal file
@ -0,0 +1,671 @@
|
||||
<style>
|
||||
|
||||
/* Force DataTable to allow rounded corners */
|
||||
#scroll-horizontal-datatable {
|
||||
border-collapse: separate !important;
|
||||
border-spacing: 0 8px !important; /* space between rows */
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* HEADER */
|
||||
thead th {
|
||||
background-color: #00999E;
|
||||
color: #fff !important;
|
||||
border-top: 0px solid #fff !important;
|
||||
border-bottom: 0px solid #fff !important;
|
||||
}
|
||||
|
||||
/* .table thead th {
|
||||
vertical-align: bottom;
|
||||
border-bottom: 2px solid #fff;
|
||||
} */
|
||||
|
||||
/* Rounded header corners */
|
||||
thead th:first-child {
|
||||
border-top-left-radius: 15px !important;
|
||||
border-bottom-left-radius: 15px !important;
|
||||
}
|
||||
thead th:last-child {
|
||||
border-top-right-radius: 15px !important;
|
||||
border-bottom-right-radius: 15px !important;
|
||||
}
|
||||
|
||||
/* BODY ROWS */
|
||||
tbody td {
|
||||
background: #F5FFFF; /* apply bg to td not tr */
|
||||
padding: 12px;
|
||||
border-top: 1px solid #eee;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
/* Add shadow + spacing row "card" effect */
|
||||
tbody tr {
|
||||
/* box-shadow: 0 2px 5px rgba(0,0,0,0.08); */
|
||||
}
|
||||
|
||||
/* Rounded corners for first + last cell of each row */
|
||||
tbody tr td:first-child {
|
||||
border-top-left-radius: 15px !important;
|
||||
border-bottom-left-radius: 15px !important;
|
||||
}
|
||||
tbody tr td:last-child {
|
||||
border-top-right-radius: 15px !important;
|
||||
border-bottom-right-radius: 15px !important;
|
||||
}
|
||||
|
||||
/* Hover effect */
|
||||
#scroll-horizontal-datatable tbody tr:hover td {
|
||||
background-color: #e0e0e0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Search input with icon */
|
||||
.dataTables_filter {
|
||||
position: absolute;
|
||||
}
|
||||
.dataTables_filter input {
|
||||
padding-right: 30px;
|
||||
background: url('https://cdn.jsdelivr.net/npm/@mdi/svg/svg/magnify.svg') no-repeat right 8px center;
|
||||
background-size: 16px;
|
||||
}
|
||||
|
||||
/* Optional: control first column width */
|
||||
.table th:nth-child(1),
|
||||
.table td:nth-child(1) {
|
||||
max-width: 200px !important;
|
||||
min-width: 100px !important;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
|
||||
.maincard{
|
||||
margin-top:0 !important;
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
|
||||
.col-12 {
|
||||
|
||||
max-width: 98% !important;
|
||||
}
|
||||
|
||||
.dataTables_filter {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.dataTables_filter input {
|
||||
padding-right: 30px; /* space for icon */
|
||||
background: url('https://cdn.jsdelivr.net/npm/@mdi/svg/svg/magnify.svg') no-repeat right 8px center;
|
||||
background-size: 16px;
|
||||
}
|
||||
|
||||
.right-align-input {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</style>
|
||||
<style>
|
||||
/* .table th:nth-child(1),
|
||||
.table td:nth-child(1) {
|
||||
max-width: 200px !important;
|
||||
min-width: 100px !important;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
white-space: nowrap !important;
|
||||
} */
|
||||
|
||||
|
||||
td .text-muted {
|
||||
font-size: 0.85em; /* smaller than default */
|
||||
color: #6c757d !important; /* Bootstrap muted grey */
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body maincard">
|
||||
<div class="row" style="padding-bottom: 10px;" >
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Ticket List </h4>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Ticket No</th>
|
||||
<th>Name</th>
|
||||
<th>Policy Number</th>
|
||||
<th>Ticket Type</th>
|
||||
<th>Subject</th>
|
||||
<th>Status</th>
|
||||
<th>Assign To</th>
|
||||
<th>Created At</th>
|
||||
<th>Updated At</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (isset($ticket_data)) { ?>
|
||||
<?php foreach($ticket_data as $index => $row){ ?>
|
||||
|
||||
<tr data-id="<?= $row['thz_id']; ?>" style="cursor: pointer;">
|
||||
<td><?php echo $row['thz_id']; ?></td>
|
||||
<td>
|
||||
<?php echo $row['name']; ?>
|
||||
<span class="text-muted"><?php if (!empty($row['empcode'])): echo '('.$row['empcode'].')'; endif; ?></span><br>
|
||||
<span class="text-muted"><?php if (!empty($row['mobile'])): echo $row['mobile']; endif; ?></span>
|
||||
</td>
|
||||
<td><?php echo (!empty($row['policy_no']) && strtolower($row['policy_no']) !== 'null')
|
||||
? $row['policy_no']
|
||||
: 'N/A'; ?>
|
||||
</td>
|
||||
<td><?php echo $row['ticket_type']; ?></td>
|
||||
<td><?php echo $row['subject']; ?></td>
|
||||
<td><?php echo $row['status']; ?></td>
|
||||
<td><?php echo $row['assignee_name']; ?></td>
|
||||
<td>
|
||||
<?php if (!empty($row['created_at'])):
|
||||
$cdt = new DateTime($row['created_at']);
|
||||
echo $cdt->format('d/m/Y') . "<br><span class='time'>" . $cdt->format('h:i a') . "</span>";
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if (!empty($row['updated_at'])):
|
||||
$udt = new DateTime($row['updated_at']);
|
||||
echo $udt->format('d/m/Y') . "<br><span class='time'>" . $udt->format('h:i a') . "</span>";
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- end col -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="ticketModal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-xl" style="margin:5px auto!important;">
|
||||
<div class="modal-content">
|
||||
<form id="ticketForm">
|
||||
<!-- <div class="modal-header">
|
||||
<h4 class="modal-title" id="modalLabel">New Ticket</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div> -->
|
||||
<div class="modal-header flex-column">
|
||||
|
||||
<!-- first row -->
|
||||
<div class="d-flex w-100 justify-content-between align-items-center">
|
||||
<h4 class="modal-title mb-0" id="modalLabel">New Ticket</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
|
||||
<!-- second row -->
|
||||
<div class="form-row mt-3 w-100">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="client_id">Client</label>
|
||||
<select class="form-control" id="client_id" name="client_id">
|
||||
<option value="">Select Client</option>
|
||||
<?php if(isset($client_list)) { ?>
|
||||
<?php foreach ($client_list as $c) { ?>
|
||||
<option value="<?= $c->id ?>"><?= $c->client_name ?> (<?= $c->short_name ?>) </option>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5">
|
||||
<label for="mobile">Mobile<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="mobile"
|
||||
name="mobile" placeholder="Enter Mobile"
|
||||
pattern="^[0-9]{10}$" required
|
||||
title="Please enter a valid 10-digit mobile number">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-1" style="padding:27.5px 0 0 0;">
|
||||
<button type="button" class="btn btn-primary" style="padding: 0 10px !important; border-radius:13px;" onclick="getAutoFetchDetails()"><i class="mdi mdi-cached" style="font-size:24px; color:#fff !important;"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-body" style="padding-top: 15px !important;
|
||||
padding-bottom: 10px !important;">
|
||||
<div class="form-row">
|
||||
<input type="hidden" id="thz_id" name="thz_id">
|
||||
<input type="hidden" id="return_type" name="return_type">
|
||||
<input type="hidden" id="branch_id" name="branch_id">
|
||||
<input type="hidden" id="policy_id" name="policy_id">
|
||||
<input type="hidden" id="created_by" name="created_by" value="<?= get_session_userid(); ?>">
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="name">Name<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="Enter Name" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="email">Email Id<span class="text-danger">*</span></label>
|
||||
<input type="email" class="form-control" id="email"
|
||||
name="email" placeholder="Enter Email"
|
||||
required
|
||||
pattern="[^@\s]+@[^@\s]+\.[^@\s]+"
|
||||
title="Please enter a valid email address">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="empcode">Employee code</label>
|
||||
<input type="text" class="form-control" id="empcode" name="empcode" placeholder="Enter Employee code">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="ticket_type">Ticket Type<span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="ticket_type" name="ticket_type" required onchange="hideandshowpolicy()">
|
||||
<option value="">Select Ticket Type</option>
|
||||
<option value="Sales" selected >Sales</option>
|
||||
<option value="Service">Service</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4" id="policy_container">
|
||||
<label for="policy_no">Policy Number</label>
|
||||
<select class="form-control" id="policy_no" name="policy_no" onchange="changevalue()">
|
||||
<option value="" selected data-id="">Select Policy</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="form-group col-md-6">
|
||||
<label for="status">Status</label>
|
||||
<select class="form-control" id="status" name="status">
|
||||
<option value="">Select Status</option>
|
||||
<option value="Open">Open</option>
|
||||
<option value="In Progress">In Progress</option>
|
||||
<option value="Resolved">Resolved</option>
|
||||
<option value="Closed">Closed</option>
|
||||
</select>
|
||||
</div> -->
|
||||
|
||||
<!-- // enga 5-"head" and 1-"admin" assign pannvaga dropdown-data la varakudhathu. but dropdown display aganum
|
||||
// 2,3,4 dropdown data'va varannum but dropdown hide pannanum -->
|
||||
<?php if(in_array(get_role_id(), [1,5]) ) { ?>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="assign_to">Assign To</label>
|
||||
<select class="form-control" id="assign_to" name="assign_to">
|
||||
<option value="">Select Assign To</option>
|
||||
<?php if(isset($assignee)) { ?>
|
||||
<?php foreach ($assignee as $a) { ?>
|
||||
<option value="<?= $a['id']?>"><?= $a['emp_code'] ?> - <?= $a['first_name'] ?> <?= $a['last_name'] ?></option>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="subject">Subject<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="subject" name="subject" placeholder="Enter Subject" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="message">Message<span class="text-danger">*</span></label>
|
||||
<!-- <input type="text" class="form-control" id="message" name="message" placeholder="Enter Message"> -->
|
||||
<textarea class="form-control" id="message" name="message" placeholder="Enter Message" rows="4" required></textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary btn-border-radius mr-2 text-white" onclick="resetTicket()">Reset</button>
|
||||
<button type="button" class="btn btn-ternary btn-border-radius" onclick="submitTicket()">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal fade" id="AssignModal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="assignModalLabel">Ticket</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-row">
|
||||
<input type="hidden" id="hidden_thz_id" name="hidden_thz_id">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="modal_assignee">Assign To<span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="modal_assignee" name="modal_assignee" required>
|
||||
<option value="">Select Assign To</option>
|
||||
<?php if(isset($assignee)) { ?>
|
||||
<?php foreach ($assignee as $a) { ?>
|
||||
<option value="<?= $a['id']?>"><?= $a['emp_code'] ?> - <?= $a['first_name'] ?> <?= $a['last_name'] ?></option>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-ternary btn-border-radius" onclick="updateAssignTo()">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function openTicket(){
|
||||
var form = document.getElementById('ticketForm');
|
||||
form.reset();
|
||||
document.getElementById('thz_id').value = '';
|
||||
document.getElementById('modalLabel').innerText = "New Ticket";
|
||||
document.getElementById('return_type').innerText = "Web";
|
||||
var myModal = new bootstrap.Modal(document.getElementById('ticketModal'));
|
||||
myModal.show();
|
||||
}
|
||||
|
||||
function resetTicket(){
|
||||
var form = document.getElementById('ticketForm');
|
||||
form.reset();
|
||||
}
|
||||
|
||||
function submitTicket() {
|
||||
var form = document.getElementById('ticketForm');
|
||||
|
||||
// reset any old error styles
|
||||
form.classList.remove('was-validated');
|
||||
|
||||
var name = document.getElementById('name').value.trim();
|
||||
var mobile = document.getElementById('mobile').value.trim();
|
||||
var email = document.getElementById('email').value.trim();
|
||||
var ticketType = document.getElementById('ticket_type').value.trim();
|
||||
|
||||
// Validation checks
|
||||
if (name === "" || mobile === "" || email === "" || ticketType === "") {
|
||||
toastr.warning('Please fill all required fields.', 'warning');
|
||||
form.classList.add('was-validated');
|
||||
return;
|
||||
}
|
||||
|
||||
var mobilePattern = /^[0-9]{10}$/;
|
||||
if (!mobilePattern.test(mobile)) {
|
||||
toastr.warning('Please enter a valid 10-digit mobile number.', 'warning');
|
||||
document.getElementById('mobile').focus();
|
||||
return;
|
||||
}
|
||||
|
||||
var emailPattern = /^[^@\s]+@[^@\s]+\.[^@\s]+$/;
|
||||
if (!emailPattern.test(email)) {
|
||||
toastr.warning('Please enter a valid email address.', 'warning');
|
||||
document.getElementById('email').focus();
|
||||
return;
|
||||
}
|
||||
|
||||
var form = document.getElementById("ticketForm"); // your form ID
|
||||
var formData = new FormData(form);
|
||||
|
||||
$.ajax({
|
||||
url: "<?= base_url('ticketSave') ?>",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
if (response.status === "success") {
|
||||
toastr.success(response.message, 'success');
|
||||
$('#ticketModal').modal('hide');
|
||||
form.reset();
|
||||
window.location.href = "<?= base_url('ticketList?return_type=web') ?>";
|
||||
} else {
|
||||
toastr.error(response.message, 'error');
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
toastr.error("Something went wrong!", 'error');
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
function getAutoFetchDetails() {
|
||||
var client_id = document.getElementById('client_id').value.trim();
|
||||
var mobile = document.getElementById('mobile').value.trim();
|
||||
|
||||
// reset fields
|
||||
document.getElementById('name').value = "";
|
||||
document.getElementById('email').value = "";
|
||||
document.getElementById('empcode').value = "";
|
||||
document.getElementById('branch_id').value = "";
|
||||
document.getElementById('policy_id').value = "";
|
||||
|
||||
// reset select dropdown
|
||||
var policySelect = document.getElementById('policy_no');
|
||||
policySelect.innerHTML = '<option value="" data-id="">Select Policy</option>';
|
||||
|
||||
if (client_id === "") {
|
||||
toastr.warning('Please Select Client.', 'warning');
|
||||
return;
|
||||
}
|
||||
|
||||
if (mobile === "") {
|
||||
toastr.warning('Please Enter a mobile number.', 'warning');
|
||||
return;
|
||||
}
|
||||
|
||||
var mobilePattern = /^[0-9]{10}$/;
|
||||
if (!mobilePattern.test(mobile)) {
|
||||
toastr.warning('Please enter a valid 10-digit mobile number.', 'warning');
|
||||
document.getElementById('mobile').focus();
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "<?= base_url('ticketAutoFetchDetails') ?>",
|
||||
type: "POST",
|
||||
data: { client_id: client_id, mobile: mobile },
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
if (response.status === "success") {
|
||||
let client = response.data.client_details[0];
|
||||
let policies = response.data.policy_details;
|
||||
|
||||
document.getElementById('name').value = client.name || "";
|
||||
document.getElementById('email').value = client.email_personal || "";
|
||||
document.getElementById('empcode').value = client.emp_code || "";
|
||||
document.getElementById('branch_id').value = client.branch_id || "";
|
||||
|
||||
if (policies && policies.length > 0) {
|
||||
policies.forEach(function(p) {
|
||||
let opt = document.createElement("option");
|
||||
opt.value = p.policy_no;
|
||||
opt.text = p.policy_no;
|
||||
opt.setAttribute("data-id", p.id);
|
||||
policySelect.appendChild(opt);
|
||||
});
|
||||
|
||||
// If you want to auto-select the first real policy instead of "Select Policy"
|
||||
policySelect.value = policies[0].policy_no;
|
||||
document.getElementById('policy_no').value = policies[0].policy_no || "";
|
||||
document.getElementById('policy_id').value = policies[0].id;
|
||||
}
|
||||
} else {
|
||||
toastr.warning(response.message || "No details found.", 'warning');
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
toastr.error("Something went wrong!", 'error');
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function changevalue() {
|
||||
var select = document.getElementById('policy_no');
|
||||
var selectedOption = select.options[select.selectedIndex];
|
||||
var policyId = selectedOption.getAttribute("data-id");
|
||||
document.getElementById('policy_id').value = policyId || "";
|
||||
}
|
||||
|
||||
function hideandshowpolicy() {
|
||||
var select = document.getElementById('ticket_type').value;
|
||||
var policyContainer = document.getElementById('policy_container');
|
||||
|
||||
if (select === 'Service') {
|
||||
policyContainer.style.display = "block"; // show
|
||||
} else {
|
||||
policyContainer.style.display = "none"; // hide
|
||||
document.getElementById('policy_no').value = "";
|
||||
document.getElementById('policy_id').value = "";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
function updateAssignTo(){
|
||||
console.log('function called then call the api then refresh the updateAssignTo');
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<!-------------------------------------------------------------------------------------------------->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
// Initialize select2
|
||||
$("#client_id").select2();
|
||||
$("#ticket_type").select2();
|
||||
$("#status").select2();
|
||||
$("#assign_to").select2();
|
||||
$("#policy_no").select2();
|
||||
$("#modal_assignee").select2();
|
||||
hideandshowpolicy();
|
||||
|
||||
var ticketsTable = $('#scroll-horizontal-datatable');
|
||||
$('#scroll-horizontal-datatable_filter').prepend('<i class="mdi mdi-magnify"></i>');
|
||||
|
||||
if (ticketsTable.length) {
|
||||
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-plus"></i> Create New Ticket',
|
||||
className: 'btn btn-primary btn-border-radius text-white mr-2',
|
||||
attr: { style: "color:#fff !important;" },
|
||||
action: function(e, dt, node, config) {
|
||||
openTicket();
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'collection',
|
||||
text: ' Export <i class="mdi mdi-menu-down"></i>',
|
||||
className: 'btn btn-ternary btn-border-radius text-white',
|
||||
buttons: [
|
||||
{
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
title: 'ticket-List'
|
||||
},
|
||||
{
|
||||
extend: 'excel',
|
||||
text: ' Excel',
|
||||
title: 'ticket-List',
|
||||
exportOptions: {
|
||||
orthogonal: 'sort'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
language: {
|
||||
search: "_INPUT_",
|
||||
searchPlaceholder: "Search..."
|
||||
},
|
||||
paging: true,
|
||||
pageLength: 25,
|
||||
ordering: false,
|
||||
});
|
||||
|
||||
} else {
|
||||
console.error("Table Not found.");
|
||||
}
|
||||
});
|
||||
|
||||
function viewTicket(ticket_id){
|
||||
|
||||
// $('.loader').fadeIn();
|
||||
// $('.loader-mask').fadeIn();
|
||||
|
||||
let url = '<?= base_url('ticketConversationList?return_type=web&thz_id='); ?>' + ticket_id;
|
||||
window.location.href = url;
|
||||
|
||||
|
||||
}
|
||||
|
||||
function removeticket(input, ticket_id) {
|
||||
|
||||
confirmActionSweertAlert("Do you want to delete this ticket?", "Yes, Proceed!", "No, Cancel").then((confirmed) => {
|
||||
if (confirmed) {
|
||||
let url = '<?= base_url('ticket/remove') ?>';
|
||||
|
||||
// Include `pt_id` in the AJAX request if necessary
|
||||
let requestData = { ticket_id: ticket_id };
|
||||
|
||||
sendAjaxRequestForGlobal(url, 'GET', requestData, function(response) {
|
||||
console.log('Data fetched successfully:', response);
|
||||
|
||||
if (response.status === true) {
|
||||
toastr.success(response.message, 'SUCCESS');
|
||||
window.location.reload();
|
||||
} else {
|
||||
toastr.warning(response.message, 'WARNING');
|
||||
}
|
||||
}, function(xhr, status, error) {
|
||||
console.error('Error fetching data:', error);
|
||||
console.error(xhr.responseText);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
$(document).on('click', 'tbody tr', function (e) {
|
||||
// Exclude clicks on any elements inside the last column (actions)
|
||||
if ($(e.target).closest('td').index() !== $(this).children('td').length - 1) {
|
||||
const id = $(this).data('id');
|
||||
console.log('Ticket ID', id)
|
||||
viewTicket(id);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
471
app/Views/thz_notes.php
Normal file
@ -0,0 +1,471 @@
|
||||
<style>
|
||||
|
||||
.notes-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid #00aaff;
|
||||
border-radius: 6px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.notes-box textarea {
|
||||
flex: 1;
|
||||
border: none;
|
||||
outline: none;
|
||||
resize: none;
|
||||
padding: 8px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.icon-buttons {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.btn-icon {
|
||||
background: #008b8b;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-icon i {
|
||||
color: #ffffff !important;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.conversation-card{
|
||||
border-radius: 15px !important;
|
||||
box-shadow: 0 2px 4px 0 #00000040;
|
||||
}
|
||||
|
||||
.card-scroll{
|
||||
overflow-y:auto;
|
||||
height:440px;
|
||||
}
|
||||
.recard-scroll{
|
||||
overflow-y:auto;
|
||||
height:295px;
|
||||
}
|
||||
|
||||
.maincard{
|
||||
margin-top:0 !important;
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
|
||||
.conversation-card,
|
||||
.conversation-card .card-header,
|
||||
.conversation-card .card-body {
|
||||
background: #F5FFFF !important;
|
||||
}
|
||||
|
||||
.master-card{
|
||||
border-radius: 15px !important;
|
||||
box-shadow: 0 2px 4px 0 #00000040;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.related-ticket-card
|
||||
.related-ticket-card .card-header,
|
||||
.related-ticket-card .card-body {
|
||||
background: #F5FFFF !important;
|
||||
overflow-y:auto;
|
||||
box-shadow: 0 2px 4px 0 #00000040;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<div class="col-12">
|
||||
<div class="card ">
|
||||
<div class="card-body maincard">
|
||||
|
||||
<!-- Title -->
|
||||
<div class="row" id="notes-title" style="padding-bottom: 10px;">
|
||||
<!-- <div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;"><span onclick="history.back()"><i class="mdi mdi-chevron-left" style="font-size: 24px;"></i></span> Ticket ID-<?php echo $master[0]['thz_id']; ?></h4>
|
||||
</div> -->
|
||||
<h4 class="d-flex align-items-center" style="gap: 8px;">
|
||||
<span onclick="history.back()" style="cursor: pointer;">
|
||||
<i class="mdi mdi-chevron-left" style="font-size: 43px;"></i>
|
||||
</span>
|
||||
Ticket ID-<?= $master[0]['thz_id']; ?>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<!-- Body -->
|
||||
<div class="row" id="notes-body">
|
||||
|
||||
<!-- Left Details -->
|
||||
<div class="col-4" id="notes-body-left">
|
||||
<div class="card master-card" style="background:#F5FFFF;">
|
||||
<div class="card-header d-flex justify-content-between align-items-center" style="background:none; border:none;">
|
||||
<h5 class="mb-0">Details</h5>
|
||||
<a href="javascript:void(0);"
|
||||
onclick="openEditTicket()">
|
||||
<i class="mdi mdi-pencil"
|
||||
title="Edit"
|
||||
style="font-size:15px; color:#555; cursor:pointer; transition:0.2s;"
|
||||
onmouseover="this.style.color='#02a8b5'; this.style.fontSize='17px';"
|
||||
onmouseout="this.style.color='#555'; this.style.fontSize='15px';">
|
||||
</i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="card-body card-scroll" style="padding-left: 27px !important; background:#F5FFFF;">
|
||||
<div class="row mb-2 ml-o">
|
||||
<div class="col-5">Ticket ID</div>
|
||||
<div class="col-7 text-end"><?= $master[0]['thz_id'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-5">Name</div>
|
||||
<div class="col-7 text-end"><?= $master[0]['name'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-5">Mobile</div>
|
||||
<div class="col-7 text-end"><?= $master[0]['mobile'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-5">Policy Number</div>
|
||||
<div class="col-7 text-end">
|
||||
<?= (!empty($master[0]['policy_no']) && strtolower($master[0]['policy_no']) !== 'null')
|
||||
? '<u class="text-warning">
|
||||
<a href="javascript:void(0);"
|
||||
class="text-warning"
|
||||
data-toggle="modal"
|
||||
data-target="#PolicyModal"
|
||||
data-id="'.$master[0]['policy_id'].'">'
|
||||
.$master[0]['policy_no'].'
|
||||
</a>
|
||||
</u>'
|
||||
: 'N/A'; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-5">Assigned To</div>
|
||||
<div class="col-7 text-end"><?= $master[0]['assignee_name'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-5">Status</div>
|
||||
<div class="col-7 text-end"><?= $master[0]['status'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-5">Ticket Type</div>
|
||||
<div class="col-7 text-end"><?= $master[0]['ticket_type'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-5">Subject</div>
|
||||
<div class="col-7 text-end"><?= $master[0]['subject'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-5">Message</div>
|
||||
<div class="col-7 text-end"><?= $master[0]['message'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-5">Related Tickets</div>
|
||||
<div class="col-7 text-end">
|
||||
<u class="text-warning">
|
||||
<a href="javascript:void(0);"
|
||||
class="text-warning"
|
||||
data-toggle="modal"
|
||||
data-target="#relatedTicketModal"
|
||||
data-id="<?= $master[0]['created_by']; ?>">
|
||||
View
|
||||
</a>
|
||||
</u>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- add more fields -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Right Conversation -->
|
||||
|
||||
<div class="col-8">
|
||||
|
||||
<!-- Conversation Card -->
|
||||
<div class="card mb-3 conversation-card">
|
||||
<div class="card-header border-0">
|
||||
<h5 class="mb-0" style="font-size:15px;">Conversation</h5>
|
||||
<hr/>
|
||||
</div>
|
||||
|
||||
<div class="card-body pt-0 recard-scroll">
|
||||
<?php if(!empty($notes)): ?>
|
||||
<?php foreach($notes as $i => $conv): ?>
|
||||
|
||||
<!-- Top Row: Message + Badge -->
|
||||
<div class="d-flex justify-content-between align-items-start">
|
||||
<p class="mb-1 mr-4"><?= $conv['notes'] ?></p>
|
||||
<!-- <?php if(!empty($conv['notes_by'])): ?>
|
||||
<span class="badge bg-warning text-dark"><?= $conv['notes_by'] ?></span>
|
||||
<?php endif; ?> -->
|
||||
<?php if (!empty($conv['notes_type']) && $conv['notes_type'] === "Internal"): ?>
|
||||
<span class="badge bg-warning text-dark"><?= $conv['notes_type'] ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<!-- Bottom Row: Name + Date -->
|
||||
<div class="d-flex justify-content-between small text-muted">
|
||||
<span><i class="mdi mdi-account"></i> <?= $conv['name'] ?></span>
|
||||
<span><?= date("j F Y h:i a", strtotime($conv['created_at'])) ?></span>
|
||||
</div>
|
||||
|
||||
<?php echo $i < count($notes)-1 ? '<hr/>' : ''; ?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<div class="d-flex justify-content-center align-items-center" style="height: 100%;">
|
||||
<p class="text-center"><i>No Data Found</i></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Input Card -->
|
||||
<div class="card">
|
||||
<form id="conversationForm">
|
||||
<input type="hidden" id="notes_type" name="notes_type">
|
||||
<input type="hidden" id="thz_id" name="thz_id">
|
||||
<input type="hidden" id="notes_by" name="notes_by" value="Staff">
|
||||
<input type="hidden" id="created_by" name="created_by" value="<?= get_session_userid(); ?>">
|
||||
<div class="notes-box">
|
||||
<textarea class="form-control" id="notes" name="notes" placeholder="Write your notes here..."></textarea>
|
||||
<div class="icon-buttons">
|
||||
<!-- save btn means local - internal -->
|
||||
<button type="button" class="btn-icon" onclick="submitConverstionTicket('Internal')"><i class="mdi mdi-content-save"></i></button>
|
||||
<!-- mail btn means notify - external -->
|
||||
<button type="button" class="btn-icon" onclick="submitConverstionTicket('External')"><i class="mdi mdi-email"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> <!-- /notes-body -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="EditModal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<form id="ticketForm">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="EditModalLabel">Update</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="form-row">
|
||||
<input type="hidden" id="edit_thz_id" name="thz_id">
|
||||
<input type="hidden" id="updated_by" name="updated_by" value="<?= get_session_userid(); ?>">
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="ticket_type">Ticket Type<span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="ticket_type" name="ticket_type" required>
|
||||
<option value="">Select Ticket Type</option>
|
||||
<option value="Sales">Sales</option>
|
||||
<option value="Service">Service</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="status">Status</label>
|
||||
<select class="form-control" id="status" name="status">
|
||||
<option value="">Select Status</option>
|
||||
<option value="Open">Open</option>
|
||||
<option value="In Progress">In Progress</option>
|
||||
<option value="Resolved">Resolved</option>
|
||||
<option value="Closed">Closed</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- // enga 5-"head" and 1-"admin" assign pannvaga dropdown-data la varakudhathu. but dropdown display aganum
|
||||
// 2,3,4 dropdown data'va varannum but dropdown hide pannanum -->
|
||||
<?php if(in_array(get_role_id(), [1,5]) ) { ?>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="assign_to">Assign To</label>
|
||||
<select class="form-control" id="assign_to" name="assign_to">
|
||||
<option value="">Select Assign To</option>
|
||||
<?php if(isset($assignee)) { ?>
|
||||
<?php foreach ($assignee as $a) { ?>
|
||||
<option value="<?= $a['id']?>"><?= $a['emp_code'] ?> - <?= $a['first_name'] ?> <?= $a['last_name'] ?></option>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-ternary btn-border-radius" onclick="submitTicket()">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="relatedTicketModal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content" style="border-radius:15px;">
|
||||
|
||||
<div class="modal-header" style="border-bottom-width:0;">
|
||||
<h4 class="modal-title">Related Tickets</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body card-scroll" style="padding-top:5px!important;">
|
||||
|
||||
<?php foreach($related_tickets as $j => $rt): ?>
|
||||
<div class="card related-ticket-card mb-3">
|
||||
<div class="card-body" style="border-radius: 20px; padding:27px !important;">
|
||||
<div class="d-flex justify-content-between align-items-start">
|
||||
<h5 class="mb-1"><?php echo '# '.$rt['thz_id']." / ".$rt['ticket_type']; ?></h5>
|
||||
<small>
|
||||
<?php if (!empty($rt['created_at'])):
|
||||
$cdt = new DateTime($rt['created_at']);
|
||||
echo $cdt->format('d/m/Y') . "<span class='time'> " . $cdt->format('h:i a') . "</span>";
|
||||
endif;
|
||||
?></small>
|
||||
</div>
|
||||
<p class="mb-2"><?php echo $rt['subject']; ?></p>
|
||||
<small><span style="color: green !important;">Status: </span><?php echo $rt['status']; ?></small>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="PolicyModal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content" style="border-radius:15px;">
|
||||
|
||||
<div class="modal-header" style="border-bottom-width:0;">
|
||||
<h4 class="modal-title">Policy Terms</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body card-scroll" style="padding-top:5px!important;">
|
||||
<?php if(!empty($policy_terms)):
|
||||
echo $policy_terms;
|
||||
else: ?>
|
||||
<div class="d-flex justify-content-center align-items-center" style="height: 100%;">
|
||||
<p class="text-center"><i>No Data Found</i></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
// Initialize select2
|
||||
$("#ticket_type").select2();
|
||||
$("#status").select2();
|
||||
$("#assign_to").select2();
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
function openEditTicket() {
|
||||
var form = document.getElementById('ticketForm');
|
||||
form.reset();
|
||||
|
||||
var masterData = <?= json_encode($master[0]); ?>;
|
||||
console.log(masterData);
|
||||
|
||||
$("#edit_thz_id").val(masterData.thz_id);
|
||||
$("#ticket_type").val(masterData.ticket_type).trigger("change");
|
||||
$("#status").val(masterData.status).trigger("change");
|
||||
$("#assign_to").val(masterData.assign_to).trigger("change");
|
||||
|
||||
$("#EditModalLabel").text("Update #" + masterData.thz_id);
|
||||
|
||||
var myModal = new bootstrap.Modal(document.getElementById('EditModal'));
|
||||
myModal.show();
|
||||
}
|
||||
|
||||
|
||||
function submitTicket() {
|
||||
|
||||
var form = document.getElementById("ticketForm");
|
||||
var id = form.querySelector("[name='thz_id']").value;
|
||||
var formData = new FormData(form);
|
||||
|
||||
$.ajax({
|
||||
url: "<?= base_url('ticketSave') ?>",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
if (response.status === "success") {
|
||||
toastr.success(response.message, 'success');
|
||||
$('#ticketModal').modal('hide');
|
||||
form.reset();
|
||||
window.location.href = "<?= base_url('ticketConversationList?return_type=web&thz_id=') ?>" + id;
|
||||
} else {
|
||||
toastr.error(response.message, 'error');
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
toastr.error("Something went wrong!", 'error');
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function submitConverstionTicket(notetype) {
|
||||
|
||||
document.getElementById("notes_type").value = notetype;
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
document.getElementById("thz_id").value = urlParams.get('thz_id');
|
||||
var id = urlParams.get('thz_id');
|
||||
var form = document.getElementById("conversationForm");
|
||||
var formData = new FormData(form);
|
||||
|
||||
$.ajax({
|
||||
url: "<?= base_url('ticketConversationSave') ?>",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
if (response.status === "success") {
|
||||
toastr.success(response.message, 'success');
|
||||
form.reset();
|
||||
window.location.href = "<?= base_url('ticketConversationList?return_type=web&thz_id=') ?>" + id;
|
||||
} else {
|
||||
toastr.error(response.message, 'error');
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
toastr.error("Something went wrong!", 'error');
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@ -23,7 +23,7 @@
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="mb-3">
|
||||
<div class="text-muted"><i class="fa fa-calendar"></i> <?php echo (new DateTime($message['created_at']))->format('j F Y h:i a');?></div>
|
||||
<div class="text-muted"><i class="mdi mdi-calendar-blank"></i> <?php echo (new DateTime($message['created_at']))->format('j F Y h:i a');?></div>
|
||||
</div>
|
||||
<div id="msg_388" class="form-group">
|
||||
<p><?= $message['mail_content'] ?></p>
|
||||
@ -58,7 +58,7 @@
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="mb-3">
|
||||
<div class="text-muted"><i class="fa fa-calendar"></i> <?php echo (new DateTime($message['created_at']))->format('j F Y h:i a');?></div>
|
||||
<div class="text-muted"><i class="mdi mdi-calendar-blank"></i> <?php echo (new DateTime($message['created_at']))->format('j F Y h:i a');?></div>
|
||||
</div>
|
||||
<div id="msg_394" class="form-group">
|
||||
<p><?= $message['mail_content'] ?></p>
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
<a href="<?= base_url('ticket/list'); ?>" aria-label="Back to ticket list">
|
||||
<i class="fas fa-arrow-left" style="font-size: 17px;"></i>
|
||||
<i class="mdi mdi-arrow-left" style="font-size: 17px;"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
<a href="<?= base_url('ticket/list'); ?>" aria-label="Back to ticket list">
|
||||
<i class="fas fa-arrow-left" style="font-size: 17px;"></i>
|
||||
<i class="mdi mdi-arrow-left" style="font-size: 17px;"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -58,7 +58,7 @@
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="emp_code">Employee ID <span class="text-danger">*</span> <i class="fa fa-search text-danger"
|
||||
<label for="emp_code">Employee ID <span class="text-danger">*</span> <i class="mdi mdi-magnify text-danger"
|
||||
aria-hidden="true" onclick="openFetchEmpDataodal(this)"></i> <span
|
||||
class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="emp_code" placeholder="Enter Employee ID"
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
<a href="<?= base_url('ticket/list'); ?>" aria-label="Back to ticket list">
|
||||
<i class="fas fa-arrow-left" style="font-size: 17px;"></i>
|
||||
<i class="mdi mdi-arrow-left" style="font-size: 17px;"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -51,7 +51,7 @@
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="emp_code">Employee ID <span class="text-danger">*</span> <i class="fa fa-search text-danger"
|
||||
<label for="emp_code">Employee ID <span class="text-danger">*</span> <i class="mdi mdi-magnify text-danger"
|
||||
aria-hidden="true" onclick="openFetchEmpDataodal(this)"></i> <span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="emp_code" placeholder="Enter Employee ID"
|
||||
value="<?= isset($ticket_data['emp_code']) ? $ticket_data['emp_code'] : '' ?>"
|
||||
|
||||
@ -148,7 +148,7 @@ table.dataTable tbody td {
|
||||
if ($row['is_head_approved'] == 0) {
|
||||
echo $row['status'] . ' <i class="fa fa-exclamation-triangle" style="color:#cece00;" aria-hidden="true"></i>';
|
||||
} elseif ($row['is_head_approved'] == 1) {
|
||||
echo $row['status'] . ' <i class="fa fa-check-circle" style="color:green;" aria-hidden="true"></i>';
|
||||
echo $row['status'] . ' <i class="mdi mdi-check-circle" style="color:green;" aria-hidden="true"></i>';
|
||||
} elseif ($row['is_head_approved'] == 2) {
|
||||
echo $row['status'] . ' <i class="fa fa-times-circle" style="color:red;" aria-hidden="true"></i>';
|
||||
} else {
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
|
||||
.addbtnStyle {
|
||||
margin-left: 20px !important;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.custom-dropdown-menu {
|
||||
@ -51,6 +52,13 @@
|
||||
color: #16181b !important;
|
||||
cursor: pointer !important;
|
||||
}
|
||||
/* strongest, beats most parent rules and pasted styles on wrappers */
|
||||
.jodit-container .jodit-wysiwyg,
|
||||
.jodit-container .jodit-wysiwyg * {
|
||||
color: #000 !important;
|
||||
background-color: #fff !important; /* optional: ensure white background */
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="col-12">
|
||||
@ -279,6 +287,9 @@
|
||||
toolbarAdaptive: false,
|
||||
saveHeightInStorage: true,
|
||||
minHeight: 400,
|
||||
defaultStyle: {
|
||||
color: '#000000' // 👈 force black text
|
||||
},
|
||||
extraButtons: [{
|
||||
name: 'info',
|
||||
iconURL: '<?= base_url() . "public"; ?>/assets/images/image-solid.svg', // Replace with the actual icon URL
|
||||
|
||||
@ -15,8 +15,8 @@
|
||||
<div class="form-group col-md-4" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<span></span> <i class="fa fa-caret-down"></i>
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate" value=<?= $default_start ?>>
|
||||
<input type="hidden" id="endDate" value=<?= $default_end ?>>
|
||||
|
||||
@ -10,7 +10,8 @@
|
||||
<div id="accordion" class="mb-3">
|
||||
<div class="card mb-1">
|
||||
<h5 class="m-1">
|
||||
<div class="row">
|
||||
<br>
|
||||
<div class="row ml-4">
|
||||
<div class="col-md-6">
|
||||
<h4 style="text-align: left;">Claim Filter</h4>
|
||||
</div>
|
||||
|
||||
@ -25,7 +25,21 @@
|
||||
background-color: #f8f9fa !important;
|
||||
color: #16181b !important;
|
||||
cursor: pointer !important;
|
||||
} </style>
|
||||
}
|
||||
|
||||
.btn-color{
|
||||
background-color: rgba(52, 174, 178, 1);
|
||||
color: white;
|
||||
border:1px solid rgba(52, 174, 178, 1);
|
||||
}
|
||||
|
||||
.btn-color:hover{
|
||||
background-color: rgba(41, 139, 142, 1);
|
||||
color: white;
|
||||
border:1px solid rgba(41, 139, 142, 1);
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="row" id="tpa_list">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
@ -34,9 +48,6 @@
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">TPA List</h4>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 56px;">
|
||||
<a href="<?= base_url("master/tpa/create"); ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">ADD</a>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="0"
|
||||
id="tickets-table">
|
||||
@ -176,7 +187,15 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
exportOptions: {
|
||||
columns: ':not(:last-child)'
|
||||
}
|
||||
},
|
||||
{
|
||||
text: 'ADD',
|
||||
className: 'btn btn-color',
|
||||
action: function () {
|
||||
window.location.href = "<?= base_url("master/tpa/create"); ?>";
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ body {
|
||||
<h4 style="position: relative;">TPA</h4>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right;">
|
||||
<a href="<?= base_url("master/tpa/list"); ?>"><i class="fas fa-arrow-left" style="font-size: 17px;"></i> </a>
|
||||
<a href="<?= base_url("master/tpa/list"); ?>"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i> </a>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="nav nav-pills navtab-bg">
|
||||
|
||||
@ -124,8 +124,8 @@ table.dataTable tbody td {
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control"
|
||||
style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<span></span> <i class="fa fa-caret-down"></i>
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
|
||||
@ -48,6 +48,18 @@ table.dataTable tbody td {
|
||||
cursor: pointer !important;
|
||||
}
|
||||
|
||||
.btn-color{
|
||||
background-color: rgba(52, 174, 178, 1);
|
||||
color: white;
|
||||
border:1px solid rgba(52, 174, 178, 1);
|
||||
}
|
||||
|
||||
.btn-color:hover{
|
||||
background-color: rgba(41, 139, 142, 1);
|
||||
color: white;
|
||||
border:1px solid rgba(41, 139, 142, 1);
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="row" id="client_list">
|
||||
@ -58,10 +70,6 @@ table.dataTable tbody td {
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Vehicle Master List</h4>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 56px;">
|
||||
<button type="button" id="btnAdd" class="btn btn-primary"
|
||||
onclick="showModal('add')">ADD</button>
|
||||
</div>
|
||||
</div>
|
||||
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||
<thead class="bg-light">
|
||||
@ -461,7 +469,8 @@ $(document).ready(function() {
|
||||
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
buttons: [{
|
||||
buttons: [
|
||||
{
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
title: 'Vehicle-Master-List',
|
||||
@ -469,7 +478,19 @@ $(document).ready(function() {
|
||||
exportOptions: {
|
||||
columns: ':not(:last-child)'
|
||||
},
|
||||
}],
|
||||
},
|
||||
{
|
||||
text: 'ADD',
|
||||
className: 'btn-color',
|
||||
attr: {
|
||||
id: 'btnAdd',
|
||||
title: 'Add'
|
||||
},
|
||||
action: function () {
|
||||
showModal('add')
|
||||
}
|
||||
}
|
||||
],
|
||||
language: {
|
||||
search: "_INPUT_",
|
||||
searchPlaceholder: "Search..."
|
||||
|
||||
@ -86,7 +86,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12" style="text-align: right;">
|
||||
<a href="<?= base_url("client/deposit/$clientData->id"); ?>"><i class="fas fa-arrow-left"
|
||||
<a href="<?= base_url("client/deposit/$clientData->id"); ?>"><i class="mdi mdi-arrow-left"
|
||||
style="font-size: 17px;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -293,7 +293,7 @@
|
||||
onclick="checkTheTableDataChanged(3)">Send Insurer Mail</button>
|
||||
<?php } ?>
|
||||
<button id="submitPlacement" class="btn btn-primary" onclick="checkTheTableDataChanged(6)">Placement</button>
|
||||
<button id="viewDemography" class="btn btn-primary" onclick="viewDemography()">view Demography</button>
|
||||
<button id="viewDemography" class="btn btn-primary" onclick="viewDemography()">Demography</button>
|
||||
<input type="hidden" id="lead_id" name="lead_id" value="<?= isset($lead_id) ? $lead_id : '' ?>">
|
||||
<input type="hidden" id="rfq_primaryKey" name="rfq_primaryKey" value="<?= isset($rfq_data['id']) ? $rfq_data['id'] : '' ?>">
|
||||
<input type="hidden" id="qcr_count" value="<?= isset($qcr_count) ? $qcr_count : 0 ?>">
|
||||
@ -567,7 +567,7 @@
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="is_cd_switch">CD Entry</label>
|
||||
<input id="is_cd_switch" type="checkbox" name = "is_cd" value = "1" data-toggle="toggle" data-on="With CD" data-off="Without CD" data-onstyle="info" data-offstyle="dark" data-style="border" data-width="218" <?= isset($lead_data['is_cd']) && $lead_data['is_cd'] != 1 ? '' : 'checked' ?>>
|
||||
<input id="is_cd_switch" type="checkbox" name = "is_cd" value = "1" data-toggle="toggle" data-on="With CD" data-off="Without CD" data-onstyle="info" data-offstyle="primary" data-style="border" data-width="218" <?= isset($lead_data['is_cd']) && $lead_data['is_cd'] != 1 ? '' : 'checked' ?>>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
@ -591,7 +591,7 @@
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="is_installment_switch">Installment </label>
|
||||
<input id="is_installment_switch" type="checkbox" name = "is_installment" value = "1" data-toggle="toggle" data-on="With Installments" data-off="Without Installments" data-onstyle="info" data-offstyle="dark" data-style="border" data-width="218" <?= isset($lead_data['is_installment']) && $lead_data['is_installment'] == 1 ? 'checked' : '' ?>>
|
||||
<input id="is_installment_switch" type="checkbox" name = "is_installment" value = "1" data-toggle="toggle" data-on="With Installments" data-off="Without Installments" data-onstyle="info" data-offstyle="primary" data-style="border" data-width="218" <?= isset($lead_data['is_installment']) && $lead_data['is_installment'] == 1 ? 'checked' : '' ?>>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3" style="<?= (!empty($lead_data['is_installment']) && $lead_data['is_installment'] == 1) ? 'display: block;' : 'display: none;' ?>">
|
||||
@ -706,7 +706,7 @@
|
||||
if(isset($demogrphy_html_data) && !empty($demogrphy_html_data)){
|
||||
echo $demogrphy_html_data;
|
||||
}else{
|
||||
echo "<p style='text-align: center; color: #6c757d; font-style: italic;'>No Demography Data Found</p>";
|
||||
echo "<p style='text-align: center; color: #6c757d; font-style: italic;'>No Demography Data Found or Wrong File</p>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
@ -461,7 +461,7 @@
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="is_cd_switch">CD Entry</label>
|
||||
<input id="is_cd_switch" type="checkbox" name = "is_cd" value = "1" data-toggle="toggle" data-on="With CD" data-off="Without CD" data-onstyle="info" data-offstyle="dark" data-style="border" data-width="218" <?= isset($lead_data['is_cd']) && $lead_data['is_cd'] != 1 ? '' : 'checked' ?>>
|
||||
<input id="is_cd_switch" type="checkbox" name = "is_cd" value = "1" data-toggle="toggle" data-on="With CD" data-off="Without CD" data-onstyle="info" data-offstyle="primary" data-style="border" data-width="218" <?= isset($lead_data['is_cd']) && $lead_data['is_cd'] != 1 ? '' : 'checked' ?>>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
@ -485,7 +485,7 @@
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="is_installment_switch">Installemnt </label>
|
||||
<input id="is_installment_switch" type="checkbox" name = "is_installment" value = "1" data-toggle="toggle" data-on="With Installments" data-off="Without Installments" data-onstyle="info" data-offstyle="dark" data-style="border" data-width="218" style="height: 37.53px;" <?= isset($lead_data['is_installment']) && $lead_data['is_installment'] == 1 ? 'checked' : '' ?>>
|
||||
<input id="is_installment_switch" type="checkbox" name = "is_installment" value = "1" data-toggle="toggle" data-on="With Installments" data-off="Without Installments" data-onstyle="info" data-offstyle="primary" data-style="border" data-width="218" style="height: 37.53px;" <?= isset($lead_data['is_installment']) && $lead_data['is_installment'] == 1 ? 'checked' : '' ?>>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3" style="<?= (!empty($lead_data['is_installment']) && $lead_data['is_installment'] == 1) ? 'display: block;' : 'display: none;' ?>">
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
"google/apiclient": "^2.15.0",
|
||||
"kreait/firebase-php": "^7.0",
|
||||
"laminas/laminas-escaper": "^2.9",
|
||||
"mpdf/mpdf": "*",
|
||||
"php-amqplib/php-amqplib": "^2.8",
|
||||
"phpmailer/phpmailer": "^6.9",
|
||||
"phpoffice/phpspreadsheet": "^2.1",
|
||||
|
||||
BIN
public/assets/images/active_bds.png
Normal file
|
After Width: | Height: | Size: 537 B |
BIN
public/assets/images/active_claims.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
public/assets/images/active_leads_and_bds_renewal.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
public/assets/images/active_pending_actions.png
Normal file
|
After Width: | Height: | Size: 826 B |
BIN
public/assets/images/inactive_bds.png
Normal file
|
After Width: | Height: | Size: 664 B |
BIN
public/assets/images/inactive_claims.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
public/assets/images/inactive_leads_and_bds_renewal.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
public/assets/images/inactive_pending_actions.png
Normal file
|
After Width: | Height: | Size: 775 B |
@ -1 +1 @@
|
||||
$(document).ready(function(){$("#basicTree").jstree({core:{themes:{responsive:!1}},types:{default:{icon:"mdi mdi-folder-star text-warning"},file:{icon:"mdi mdi-file text-primary"}},plugins:["types"]}),$("#checkTree").jstree({core:{themes:{responsive:!1}},types:{default:{icon:"fa fa-folder text-warning"},file:{icon:"fa fa-file text-primary"}},plugins:["types","checkbox"]}),$("#dragTree").jstree({core:{check_callback:!0,themes:{responsive:!1}},types:{default:{icon:"fa fa-folder text-warning"},file:{icon:"fa fa-file text-primary"}},plugins:["types","dnd"]}),$("#ajaxTree").jstree({core:{check_callback:!0,themes:{responsive:!1},data:{url:function(e){return"#"===e.id?"../assets/data/ajax_roots.json":"../assets/data/ajax_children.json"},data:function(e){return{id:e.id}}}},types:{default:{icon:"fa fa-folder text-warning"},file:{icon:"fa fa-file text-primary"}},plugins:["contextmenu","dnd","search","state","types","wholerow"]})});
|
||||
$(document).ready(function(){$("#basicTree").jstree({core:{themes:{responsive:!1}},types:{default:{icon:"mdi mdi-folder-star text-warning"},file:{icon:"mdi mdi-file text-primary"}},plugins:["types"]}),$("#checkTree").jstree({core:{themes:{responsive:!1}},types:{default:{icon:"fa fa-folder text-warning"},file:{icon:"mdi mdi-file text-primary"}},plugins:["types","checkbox"]}),$("#dragTree").jstree({core:{check_callback:!0,themes:{responsive:!1}},types:{default:{icon:"fa fa-folder text-warning"},file:{icon:"mdi mdi-file text-primary"}},plugins:["types","dnd"]}),$("#ajaxTree").jstree({core:{check_callback:!0,themes:{responsive:!1},data:{url:function(e){return"#"===e.id?"../assets/data/ajax_roots.json":"../assets/data/ajax_children.json"},data:function(e){return{id:e.id}}}},types:{default:{icon:"fa fa-folder text-warning"},file:{icon:"mdi mdi-file text-primary"}},plugins:["contextmenu","dnd","search","state","types","wholerow"]})});
|
||||
@ -31,7 +31,7 @@
|
||||
<nav class="navbar navbar-expand-sm navbar-dark bg-dark" style="padding: 0; justify-content: space-between">
|
||||
<div class="container">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item" style="padding-left: 0"><a class="nav-link" href="/" style="color: #eeeeee"><i class="fa fa-calendar"></i> Date Range Picker</a></li>
|
||||
<li class="nav-item" style="padding-left: 0"><a class="nav-link" href="/" style="color: #eeeeee"><i class="mdi mdi-calendar-blank"></i> Date Range Picker</a></li>
|
||||
</ul>
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item"><a class="nav-link" href="https://www.improvely.com" style="color: #33beff"><i class="fa fa-chart-bar"></i> Improvely</a></li>
|
||||
@ -235,8 +235,8 @@
|
||||
<label>Produces:</label>
|
||||
|
||||
<div id="reportrange" class="pull-right" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<span></span> <i class="fa fa-caret-down"></i>
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
<nav class="navbar navbar-expand-sm navbar-dark bg-dark" style="padding: 0; justify-content: space-between">
|
||||
<div class="container">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item" style="padding-left: 0"><a class="nav-link" href="/" style="color: #eeeeee"><i class="fa fa-calendar"></i> Date Range Picker</a></li>
|
||||
<li class="nav-item" style="padding-left: 0"><a class="nav-link" href="/" style="color: #eeeeee"><i class="mdi mdi-calendar-blank"></i> Date Range Picker</a></li>
|
||||
</ul>
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item"><a class="nav-link" href="https://www.improvely.com" style="color: #33beff"><i class="fa fa-chart-bar"></i> Improvely</a></li>
|
||||
@ -235,8 +235,8 @@
|
||||
<label>Produces:</label>
|
||||
|
||||
<div id="reportrange" class="pull-right" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<span></span> <i class="fa fa-caret-down"></i>
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||