fix: drawer before close and employee edit state

This commit is contained in:
puriphatt 2025-09-17 14:07:07 +07:00 • committed by Methapon2001
parent 5becbae369
commit 0ad017309f
4 changed files with 15 additions and 10 deletions

View file

@ -288,8 +288,10 @@ async function init() {
refTabCustomer.value?.openSpecificCustomer(route.query.id as string);
} else if (route.query.tab === 'employee') {
currentTab.value = 'employee';
if (route.query.id)
refTabEmployee.value?.openSpecificEmployee(route.query.id as string);
setTimeout(async () => {
if (route.query.id)
refTabEmployee.value?.openSpecificEmployee(route.query.id as string);
}, 150);
}
if (

View file

@ -1393,12 +1393,10 @@ export const useEmployeeForm = defineStore('form-employee', () => {
statusSave: true,
})),
),
employeeOtherInfo: structuredClone(
{
...payload.employeeOtherInfo,
statusSave: !!payload.employeeOtherInfo?.id ? true : false,
} || {},
),
employeeOtherInfo: structuredClone({
...(payload.employeeOtherInfo ?? {}),
statusSave: true,
}),
employeeWork: structuredClone(
payload.employeeWork?.length === 0
? state.value.dialogModal