mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
WIP / Feature & Fix Expense /Customer
This commit is contained in:
@@ -25,15 +25,31 @@ function Customer({
|
||||
requestFetchCustomers({}),
|
||||
);
|
||||
|
||||
const fetchCustomerDatails =useQuery(id && ['customer-detail',id],()=>requestFetchCustomers())
|
||||
const fetchCustomerDatails = useQuery(id && ['customer-detail', id], () =>
|
||||
requestFetchCustomers(),
|
||||
);
|
||||
|
||||
const handleFormSubmit = useCallback(
|
||||
(payload) => {
|
||||
payload.redirect && history.push('/customers');
|
||||
},
|
||||
[history],
|
||||
);
|
||||
|
||||
const handleCancel = useCallback(() => {
|
||||
history.goBack();
|
||||
}, [history]);
|
||||
|
||||
return (
|
||||
<DashboardInsider
|
||||
// formik={formik}
|
||||
loading={ fetchCustomerDatails.isFetching || fetchCustomers.isFetching}
|
||||
loading={fetchCustomerDatails.isFetching || fetchCustomers.isFetching}
|
||||
name={'customer-form'}
|
||||
>
|
||||
<CustomerForm customerId={id} />
|
||||
<CustomerForm
|
||||
onFormSubmit={handleFormSubmit}
|
||||
customerId={id}
|
||||
onCancelForm={handleCancel}
|
||||
/>
|
||||
</DashboardInsider>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user