fix: edit sub branch get 404
This commit is contained in:
parent
62269efbb6
commit
515409955a
1 changed files with 2 additions and 2 deletions
|
|
@ -455,6 +455,7 @@ async function fetchBranchById(id: string) {
|
|||
permitIssueDate: new Date(res.permitIssueDate),
|
||||
permitNo: res.permitNo,
|
||||
};
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -551,7 +552,7 @@ async function triggerEdit(
|
|||
typeBranch: 'headOffice' | 'subBranch',
|
||||
code?: string,
|
||||
) {
|
||||
await fetchBranchById(id);
|
||||
const currentRecord = await fetchBranchById(id);
|
||||
await fetchImageList(id, formData.value.selectedImage || '');
|
||||
|
||||
formTypeBranch.value = typeBranch;
|
||||
|
|
@ -570,7 +571,6 @@ async function triggerEdit(
|
|||
|
||||
currentId.value = id;
|
||||
|
||||
const currentRecord = branchData.value.result.find((x) => x.id === id);
|
||||
|
||||
if (!currentRecord) return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue