Clean props when switching between edit and create mode in WorkerTimeForm
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
b546b63352
commit
1fc6eed1d5
|
@ -355,11 +355,11 @@ const getMailStates = async (date) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const showWorkerTimeForm = (propValue, formType) => {
|
const showWorkerTimeForm = (propValue, formType) => {
|
||||||
if (formType === 'edit') {
|
const isEditForm = formType === 'edit';
|
||||||
workerTimeFormProps.entryId = propValue;
|
|
||||||
} else {
|
workerTimeFormProps.entryId = isEditForm ? propValue : null;
|
||||||
workerTimeFormProps.dated = propValue;
|
workerTimeFormProps.dated = isEditForm ? null : propValue;
|
||||||
}
|
|
||||||
workerTimeFormDialogRef.value.show();
|
workerTimeFormDialogRef.value.show();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue