MERGE_UAT_CLAIMS_LIVE_ISSSUE
This commit is contained in:
commit
1d6c80250b
@ -4539,8 +4539,8 @@ class EmployeeRestController extends AdminController
|
||||
// print_r($post_data); die;
|
||||
|
||||
|
||||
$Query = $this->clientPolicyModel
|
||||
->select("
|
||||
$Query = $this->clientPolicyModel
|
||||
->select("
|
||||
client_policy.id as client_policy_id ,
|
||||
client_policy.client_id as client_id,
|
||||
client_policy.policy_type_id as policy_type_id,
|
||||
@ -4553,14 +4553,14 @@ class EmployeeRestController extends AdminController
|
||||
DATE_FORMAT(client_policy.policy_end_date, '%d-%m-%Y') AS policy_expiry_date,
|
||||
CASE WHEN policy_type.allocg IN ('Non-EB', 'Marine') THEN 'Non-EB' ELSE 'EB' END as allocg
|
||||
", false)
|
||||
->join('policy_type', 'policy_type.id = client_policy.policy_type_id', 'left')
|
||||
->where('md5(client_policy.client_id)', $post_data['client_id'])
|
||||
->where('client_policy.client_branch_id', $post_data['client_branch_id'])
|
||||
->where('client_policy.is_active', 1);
|
||||
->join('policy_type', 'policy_type.id = client_policy.policy_type_id', 'left')
|
||||
->where('md5(client_policy.client_id)', $post_data['client_id'])
|
||||
->where('client_policy.client_branch_id', $post_data['client_branch_id'])
|
||||
->where('client_policy.is_active', 1);
|
||||
// ->where('client_policy.policy_status', $this->request->getGet('policy_status'))
|
||||
if(is_array($post_data['policy_id'])){
|
||||
if (is_array($post_data['policy_id'])) {
|
||||
$Query->whereIn('client_policy.id', $post_data['policy_id']);
|
||||
}else{
|
||||
} else {
|
||||
$Query->where('client_policy.id', $post_data['policy_id']);
|
||||
}
|
||||
$ClientPolicyData = $Query->first();
|
||||
@ -4590,9 +4590,9 @@ class EmployeeRestController extends AdminController
|
||||
}
|
||||
|
||||
return $this->respondCreated($responce);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
// return $this->failServerError($e->getMessage());
|
||||
log_message('error', 'Error in hrFileUpload: ' . $e->getMessage() . ' in file ' . $e->getFile() . ' on line ' . $e->getLine() . ' Trace: ' . $e->getTraceAsString());
|
||||
return $this->respondCreated(['status' => false, 'message' => $e->getMessage(), 'data' => []]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2321,8 +2321,8 @@ class TicketController extends BaseController
|
||||
->findAll();
|
||||
|
||||
foreach ($dataToSend['messages'] as &$message) {
|
||||
$mail_content_converted = $this->convertHtmlToText($message['mail_content']);
|
||||
$message['mail_content'] = $mail_content_converted;
|
||||
// $mail_content_converted = $this->convertHtmlToText($message['mail_content']);
|
||||
// $message['mail_content'] = $mail_content_converted;
|
||||
|
||||
$claimFiles = new ClaimFilesModel();
|
||||
$message["files_data"] = $claimFiles->where('is_active', 1)
|
||||
|
||||
@ -143,7 +143,7 @@ class AclFilter implements FilterInterface
|
||||
|
||||
$response = service('response');
|
||||
$response->setStatusCode(403);
|
||||
$response->setBody(view('errors/404', [
|
||||
$response->setBody(view('errors/403', [
|
||||
'message' => '403 Access denied - You do not have permission to access this resource'
|
||||
]));
|
||||
|
||||
|
||||
@ -164,6 +164,21 @@
|
||||
|
||||
<script>
|
||||
|
||||
const MAX_UPLOAD_PAYLOAD_BYTES = 25 * 1024 * 1024; // 25 MB
|
||||
|
||||
function getSelectedUploadPayloadSize() {
|
||||
let totalBytes = 0;
|
||||
$('#drive_file_upload_form input[type=file]').each(function () {
|
||||
if (!this.files || !this.files.length) {
|
||||
return;
|
||||
}
|
||||
for (let i = 0; i < this.files.length; i++) {
|
||||
totalBytes += this.files[i].size || 0;
|
||||
}
|
||||
});
|
||||
return totalBytes;
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
let ticket_id = $('#ticket_master_id').val();
|
||||
$('#ticket_id_url').val(ticket_id);
|
||||
@ -203,6 +218,12 @@
|
||||
return;
|
||||
}
|
||||
|
||||
const selectedPayloadBytes = getSelectedUploadPayloadSize();
|
||||
if (selectedPayloadBytes > MAX_UPLOAD_PAYLOAD_BYTES) {
|
||||
toastr.warning('Total selected file size must not exceed 25 MB.', 'Validation');
|
||||
return;
|
||||
}
|
||||
|
||||
form_action = '<?php echo base_url() . 'ticket/upload_url' ?>';
|
||||
|
||||
$('.loader').fadeIn();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user