refactor: change minimum age

This commit is contained in:
Net 2024-09-26 14:01:41 +07:00
parent 401dbab1ca
commit 828eab36f2
3 changed files with 8 additions and 11 deletions

View file

@ -714,17 +714,14 @@ watch(
currentFromDataEmployee.value.dateOfBirth,
'year',
);
if (currentFromDataEmployee.value.dateOfBirth && Number(age) < 18) {
if (currentFromDataEmployee.value.dateOfBirth && Number(age) < 15) {
dialog({
color: 'warning',
icon: 'mdi-alert',
title: t('dialog.title.youngWorker'),
actionText: t('dialog.action.ok'),
persistent: true,
cancelText: t('general.edit'),
message: t('dialog.message.youngWorker'),
action: async () => {
return;
},
cancel: async () => {
currentFromDataEmployee.value.dateOfBirth = null;
return;
@ -2303,7 +2300,7 @@ const emptyCreateDialog = ref(false);
employeeFormState.isEmployeeEdit = false;
employeeFormState.currentIndex = -1;
await fetchListEmployee();
await fetchListEmployee(true);
}
"
:show="