fix: แก้ type

This commit is contained in:
Net 2024-06-12 09:53:19 +07:00
parent 450b3e10bf
commit 627da99cf0
2 changed files with 3 additions and 2 deletions

View file

@ -671,6 +671,7 @@ async function assignFormData(data: Customer & { branch: CustomerBranch[] }) {
data.branch.forEach((v) => {
formData.value.customerBranch?.push({
id: v.id,
address: v.address,
addressEN: v.addressEN,
provinceId: v.province.id,

View file

@ -87,7 +87,7 @@ export type CustomerBranchCreate = {
};
export type CustomerCreate = {
customerBranch?: CustomerBranchCreate[];
customerBranch?: (CustomerBranchCreate & { id?: string })[];
taxNo?: string | null;
customerNameEN: string;
customerName: string;
@ -101,7 +101,7 @@ export type CustomerUpdate = {
customerType?: CustomerType;
customerName?: string;
customerNameEN?: string;
customerBranch?: CustomerBranchCreate[];
customerBranch?: (CustomerBranchCreate & { id?: string })[];
taxNo?: string | null;
image?: File;
};