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

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

View File

@ -29,6 +29,7 @@ class ExcelSanitizeHelper
$cleanData[$key] = self::sanitizeArrayData($value); // Recursive call for nested arrays
} elseif (is_string($value)) {
// Remove non-printable characters and trim whitespace from strings
$value = str_replace("\u00a0", " ", $value);
$cleanData[$key] = trim(preg_replace(self::$nonPrintablePattern, '', $value));
} else {
$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 } 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') { ?>
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()
$('#account_manager').multiselect({
nonSelectedText: 'Select Account Manager',
enableFiltering: false,
enableCaseInsensitiveFiltering: false,
includeSelectAllOption : false,
buttonWidth:'100%'
});
$('#account_manager').prop('disabled', true);
$("textarea.select2-search__field").attr('rows', '1');
$("textarea.select2-search__field").css('resize', 'none');
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);
$('#manager').prop('disabled', true);
$('#account_manager').multiselect('disable');
}
@ -172,14 +175,25 @@ $(document).ready(function(){
$('#manager').prop('disabled', !isDisabled);
if (isDisabled) {
$('#account_manager').multiselect('enable');
$('#account_manager').select2({
placeholder: "Select Account Manager",
}).prop('disabled', false);
$('#client_rm_btnSubmit').show();
$(this).html('<span id="rm_icons" class="fa fa-times-circle"></span> Close Edit ');
} else {
$('#account_manager').multiselect('disable');
$('#account_manager').select2({
placeholder: "Select Account Manager"
}).prop('disabled', true);
$('#client_rm_btnSubmit').hide();
$(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');
});