refactor: handle mode

This commit is contained in:
Thanaphon Frappet 2024-12-06 15:33:03 +07:00
parent d90d392cfc
commit 0090190bcd

View file

@ -422,7 +422,6 @@ async function fetchBranchById(id: string) {
const resAttachment = await branchStore.fetchListAttachment(res.id);
if (resAttachment) {
currentAttachmentList.value = await Promise.all(
resAttachment.map(async (v) => {
return {
@ -782,7 +781,6 @@ async function onSubmit(submitSelectedItem?: boolean) {
id: res.id,
code: res.code,
};
formType.value = 'view';
}
await fetchList({ tree: true, pageSize: 99999, withHead: true });
@ -830,6 +828,8 @@ async function onSubmit(submitSelectedItem?: boolean) {
},
});
}
formType.value = 'view';
}
const _stats = await branchStore.stats();
@ -1702,6 +1702,7 @@ watch(currentHq, () => {
</div>
</div>
<!-- add Branch -->
<DialogForm
hide-footer
ref="formDialogRef"