forked from verdnatura/salix-front
Clean props when switching between edit and create mode in WorkerTimeForm
This commit is contained in:
parent
b546b63352
commit
1fc6eed1d5
|
@ -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();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue