refactor: change minimum age
This commit is contained in:
parent
401dbab1ca
commit
828eab36f2
3 changed files with 8 additions and 11 deletions
|
|
@ -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="
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue