mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
feat: Delete Stripe pamyent connection
This commit is contained in:
@@ -124,10 +124,11 @@ function StripePaymentMethod() {
|
||||
)}
|
||||
</Group>
|
||||
<Group spacing={10}>
|
||||
<Button small onClick={handleEditBtnClick}>
|
||||
Edit
|
||||
</Button>
|
||||
|
||||
{isAccountActive && (
|
||||
<Button small onClick={handleEditBtnClick}>
|
||||
Edit
|
||||
</Button>
|
||||
)}
|
||||
{!isAccountCreated && (
|
||||
<Button intent={Intent.PRIMARY} small onClick={handleSetUpBtnClick}>
|
||||
Set it Up
|
||||
|
||||
@@ -20,7 +20,7 @@ export const useDeletePaymentMethod = (
|
||||
return useMutation<void, Error, DeletePaymentMethodValues>(
|
||||
({ paymentMethodId }) => {
|
||||
return apiRequest
|
||||
.delete(`/payment-methods/${paymentMethodId}`)
|
||||
.delete(`/payment-services/${paymentMethodId}`)
|
||||
.then((res) => res.data);
|
||||
},
|
||||
{ ...options },
|
||||
|
||||
@@ -91,9 +91,11 @@ export const useDrawerActions = () => {
|
||||
};
|
||||
|
||||
export const useAlertActions = () => {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
return {
|
||||
openAlert: useDispatchAction(openAlert),
|
||||
closeAlert: useDispatchAction(closeAlert),
|
||||
openAlert: (name, payload) => dispatch(openAlert(name, payload)),
|
||||
closeAlert: (name, payload) => dispatch(closeAlert(name, payload)),
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user