mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: add cancel unlocking alert.
This commit is contained in:
@@ -1,30 +1,26 @@
|
||||
import React from 'react';
|
||||
import { DialogContent } from 'components';
|
||||
import {
|
||||
useCancelLockingTransaction,
|
||||
useCancelUnlockingPartialTransactions,
|
||||
} from 'hooks/query';
|
||||
import { useCancelLockingTransaction } from 'hooks/query';
|
||||
|
||||
const UnlockingTransactionsContext = React.createContext();
|
||||
|
||||
/**
|
||||
* Unlocking transactions form provider.
|
||||
*/
|
||||
function UnlockingTransactionsFormProvider({ moduleName, dialogName, ...props }) {
|
||||
function UnlockingTransactionsFormProvider({
|
||||
moduleName,
|
||||
dialogName,
|
||||
...props
|
||||
}) {
|
||||
// Cancle locking transactions mutations.
|
||||
const { mutateAsync: cancelLockingTransactionMutate } =
|
||||
useCancelLockingTransaction();
|
||||
|
||||
// Cancel unlocking partial transactions mutations.
|
||||
const { mutateAsync: cancelUnLockingPartialTransactionMutate } =
|
||||
useCancelUnlockingPartialTransactions();
|
||||
|
||||
// State provider.
|
||||
const provider = {
|
||||
dialogName,
|
||||
moduleName,
|
||||
cancelLockingTransactionMutate,
|
||||
cancelUnLockingPartialTransactionMutate,
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user