fix adding new customer to folder

This commit is contained in:
OxSaitama 2023-09-26 17:23:25 +02:00
parent c040edb22a
commit c64118bf12

View File

@ -211,7 +211,7 @@ class AddClientToFolderClass extends BasePage<IPropsClass, IState> {
contact: values,
});
if (!customer.uid) return;
customersToLink?.push({ customer: { uid: customer.uid } } as Partial<Customer>);
customersToLink?.push({ uid: customer.uid } as Partial<Customer>);
}
if (customersToLink) {
@ -220,7 +220,7 @@ class AddClientToFolderClass extends BasePage<IPropsClass, IState> {
return Customer.hydrate<Customer>(customer);
}),
});
console.log(body);
await Folders.getInstance().put(this.props.selectedFolderUid, body);
this.props.router.push(`/folders/${this.props.selectedFolderUid}`);
}