0
0
Fork 0

Clean props when switching between edit and create mode in WorkerTimeForm

This commit is contained in:
William Buezas 2024-03-28 08:31:55 -03:00
parent b546b63352
commit 1fc6eed1d5
1 changed files with 5 additions and 5 deletions

View File

@ -355,11 +355,11 @@ const getMailStates = async (date) => {
};
const showWorkerTimeForm = (propValue, formType) => {
if (formType === 'edit') {
workerTimeFormProps.entryId = propValue;
} else {
workerTimeFormProps.dated = propValue;
}
const isEditForm = formType === 'edit';
workerTimeFormProps.entryId = isEditForm ? propValue : null;
workerTimeFormProps.dated = isEditForm ? null : propValue;
workerTimeFormDialogRef.value.show();
};