CHANGE_CLINET_RM_BATCH_LIST : RV

This commit is contained in:
VENKATESHWARAN 2025-03-31 14:22:15 +05:30
parent 4826f71a71
commit 4b64bbb088
5 changed files with 55 additions and 16 deletions

View File

@ -361,12 +361,13 @@ class EmployeeController extends AdminController
batch_files.client_branch_id, batch_files.client_branch_id,
CASE CASE
WHEN batch_files.status = 'partially success' THEN WHEN batch_files.status = 'partially success' OR batch_files.status = 'in-progress-partially' THEN
batch_files.error_data batch_files.error_data
ELSE ELSE
error_data = null NULL
END AS error_data, END AS error_data,
clients.short_name as client_short_name, clients.short_name as client_short_name,
client_branch.branch_name, client_branch.branch_name,
client_policy.policy_no, client_policy.policy_no,

View File

@ -29,6 +29,7 @@ class ExcelSanitizeHelper
$cleanData[$key] = self::sanitizeArrayData($value); // Recursive call for nested arrays $cleanData[$key] = self::sanitizeArrayData($value); // Recursive call for nested arrays
} elseif (is_string($value)) { } elseif (is_string($value)) {
// Remove non-printable characters and trim whitespace from strings // Remove non-printable characters and trim whitespace from strings
$value = str_replace("\u00a0", " ", $value);
$cleanData[$key] = trim(preg_replace(self::$nonPrintablePattern, '', $value)); $cleanData[$key] = trim(preg_replace(self::$nonPrintablePattern, '', $value));
} else { } else {
$cleanData[$key] = $value; // Keep non-string/non-array data as is $cleanData[$key] = $value; // Keep non-string/non-array data as is

View File

@ -665,3 +665,15 @@ if (!function_exists('check_pay_by_employee_or_company')) {
} }
if (!function_exists('is_json_string')) {
function is_json_string($string)
{
if (!is_string($string)) {
return false;
}
$decoded = json_decode($string, true);
return (json_last_error() === JSON_ERROR_NONE && is_array($decoded));
}
}

View File

@ -90,6 +90,17 @@
   
<?php } ?> <?php } ?>
<?php } else if ($file['status'] == 'in-progress-partially') { ?>
<?php echo $file['status']; ?>
<?php if (!is_json_string($file['error_data'])) { ?>
<a class="fe-alert-circle" style="color: #000;" data-toggle="tooltip"
data-placement="top" title="<?= $file['error_data'] ?>"></a>
&nbsp;
<?php } ?>
<?php } else if ($file['status'] == 'failed-1') { ?> <?php } else if ($file['status'] == 'failed-1') { ?>
failed <a class="fe-alert-circle" style="color: #000;" data-toggle="tooltip" failed <a class="fe-alert-circle" style="color: #000;" data-toggle="tooltip"

View File

@ -71,13 +71,10 @@ $(document).ready(function(){
$('#client_rm_edit').hide() $('#client_rm_edit').hide()
$('#account_manager').multiselect({ $('#account_manager').prop('disabled', true);
nonSelectedText: 'Select Account Manager',
enableFiltering: false, $("textarea.select2-search__field").attr('rows', '1');
enableCaseInsensitiveFiltering: false, $("textarea.select2-search__field").css('resize', 'none');
includeSelectAllOption : false,
buttonWidth:'100%'
});
var data = <?= isset($client_relation) ? json_encode($client_relation) : '[]' ?>; var data = <?= isset($client_relation) ? json_encode($client_relation) : '[]' ?>;
@ -94,10 +91,16 @@ $(document).ready(function(){
} }
}); });
$('#account_manager').multiselect('refresh');
$('#account_manager').select2({
placeholder: "Select Account Manager",
}).prop('disabled', true);
$("textarea.select2-search__field").attr('rows', '1');
$("textarea.select2-search__field").css('resize', 'none');
$('#head').prop('disabled', true); $('#head').prop('disabled', true);
$('#manager').prop('disabled', true); $('#manager').prop('disabled', true);
$('#account_manager').multiselect('disable');
} }
@ -172,14 +175,25 @@ $(document).ready(function(){
$('#manager').prop('disabled', !isDisabled); $('#manager').prop('disabled', !isDisabled);
if (isDisabled) { if (isDisabled) {
$('#account_manager').multiselect('enable'); $('#account_manager').select2({
placeholder: "Select Account Manager",
}).prop('disabled', false);
$('#client_rm_btnSubmit').show(); $('#client_rm_btnSubmit').show();
$(this).html('<span id="rm_icons" class="fa fa-times-circle"></span> Close Edit '); $(this).html('<span id="rm_icons" class="fa fa-times-circle"></span> Close Edit ');
} else { } else {
$('#account_manager').multiselect('disable'); $('#account_manager').select2({
placeholder: "Select Account Manager"
}).prop('disabled', true);
$('#client_rm_btnSubmit').hide(); $('#client_rm_btnSubmit').hide();
$(this).html('<span id="rm_icons" class="mdi mdi-lead-pencil"></span> Edit '); $(this).html('<span id="rm_icons" class="mdi mdi-lead-pencil"></span> Edit ');
} }
$("textarea.select2-search__field").attr('rows', '1');
$("textarea.select2-search__field").css('resize', 'none');
}); });