fix: แก้ไข เเล้วเปลี่ยนสถานะเป็น ACTIVE
This commit is contained in:
parent
88b84396da
commit
dcbc1b7080
2 changed files with 4 additions and 2 deletions
|
|
@ -743,7 +743,7 @@ async function onSubmitEdit(id: string) {
|
|||
if (!formData.value) return;
|
||||
|
||||
const tempValue: CustomerUpdate = {
|
||||
status: 'ACTIVE',
|
||||
status: formData.value.status,
|
||||
customerType: formData.value.customerType,
|
||||
customerName: formData.value.customerName,
|
||||
customerNameEN: formData.value.customerNameEN,
|
||||
|
|
@ -752,6 +752,8 @@ async function onSubmitEdit(id: string) {
|
|||
personName: formData.value.personName,
|
||||
};
|
||||
|
||||
if(tempValue.status === 'CREATED') delete tempValue['status']
|
||||
|
||||
await editById(id, tempValue);
|
||||
infoDrawer.value = false;
|
||||
fetchListCustomer();
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ export type CustomerCreate = {
|
|||
};
|
||||
|
||||
export type CustomerUpdate = {
|
||||
status?: 'ACTIVE' | 'INACTIVE';
|
||||
status?: Status;
|
||||
customerType?: CustomerType;
|
||||
customerName?: string;
|
||||
customerNameEN?: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue