diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 9bcafd6e..8dea0d8a 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -2409,13 +2409,16 @@ class EmployeeRestController extends AdminController $client_id = $this->request->getGet('client_id') ?? null; - $data['claim_status'] = $this->claimStatusModel - ->select('id,ticket_type, display_name as claim_status') - ->where('is_active', 1) - ->where('display_name IS NOT NULL OR display_name <> ""') - ->whereIn('claim_status_id',[1,2,3,4]) - ->groupBy('display_name') - ->findAll(); + $data['claim_status'] = $this->claimStatusModel + ->select('id, ticket_type, display_name as claim_status') + ->where('is_active', 1) + ->groupStart() + ->where('display_name IS NOT NULL') + ->orWhere('display_name <>', '') + ->groupEnd() + ->whereIn('ticket_type', [1,2,3,4]) + ->groupBy('display_name') + ->findAll(); if (!empty($client_id)) { diff --git a/app/Controllers/MediAssistApiController.php b/app/Controllers/MediAssistApiController.php index da7b2b79..4fb227b2 100644 --- a/app/Controllers/MediAssistApiController.php +++ b/app/Controllers/MediAssistApiController.php @@ -704,7 +704,7 @@ class MediAssistApiController extends BaseController if (count($fileData)) { foreach ($fileData as $file) { - if (!empty($file['url'])) { + if (!empty($file['url']) && $file['file_type'] == 2) { $filename = basename($file['url']); $fileDir = WRITEPATH . 'uploads/claim_files/' . $filename; diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index 14600e38..2265bd1b 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -2326,6 +2326,10 @@ class RestAuthenticationController extends AdminController public function logout() { + return $this->respond([ + 'status' => true, + 'message' => 'Logged out successfully' + ], 200); $authHeader = $this->request->getHeaderLine('Authorization'); if (!$authHeader) { diff --git a/app/Views/ticket_edit_onbording.php b/app/Views/ticket_edit_onbording.php index 493735b3..857a2796 100644 --- a/app/Views/ticket_edit_onbording.php +++ b/app/Views/ticket_edit_onbording.php @@ -465,15 +465,23 @@ let ticket_master_id = $('#ticket_master_id').val(); console.log({ticket_master_id}); + if (!ticket_master_id) { + toastr.warning('Claim ID not found. Please ensure the form is loaded.', 'Warning'); + return; + } let requestData = { claim_id: ticket_master_id, }; let url = ''; + $('.loader').fadeIn(); + $('.loader-mask').fadeIn(); // Send AJAX request sendAjaxRequestForGlobal(url, 'GET', requestData, function(response) { + $('.loader').fadeOut(); + $('.loader-mask').delay(350).fadeOut('slow'); console.log('Data fetched successfully:', response); @@ -485,6 +493,8 @@ } }, function(xhr, status, error) { + $('.loader').fadeOut(); + $('.loader-mask').delay(350).fadeOut('slow'); console.error('Error fetching data:', error); console.error(xhr.responseText); toastr.error('An error occurred while saving docs.', 'Error');