mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
feat: edit locking transactions.
This commit is contained in:
@@ -23,14 +23,15 @@ function TransactionsLockingBodyJsx({
|
||||
// #withAlertsActions
|
||||
openAlert,
|
||||
}) {
|
||||
const {
|
||||
isTransactionLockingLoading,
|
||||
transactionLockingType,
|
||||
} = useTransactionsLockingContext();
|
||||
const { isTransactionLockingLoading, transactionLockingType } =
|
||||
useTransactionsLockingContext();
|
||||
|
||||
// Handle locking transactions.
|
||||
const handleLockingTransactions = (module) => {
|
||||
openDialog('locking-transactions', { module: module });
|
||||
const handleLockingTransactions = (module, {}, isEnabled) => {
|
||||
openDialog('locking-transactions', {
|
||||
isEnabled: isEnabled,
|
||||
module: module,
|
||||
});
|
||||
};
|
||||
// Handle unlocking transactions
|
||||
const handleUnlockTransactions = (module) => {
|
||||
@@ -49,6 +50,7 @@ function TransactionsLockingBodyJsx({
|
||||
transactionLockingType === 'partial' ? (
|
||||
<TransactionsLockingList
|
||||
onLock={handleLockingTransactions}
|
||||
onEditLock={handleLockingTransactions}
|
||||
onCancelLock={handleUnlockTransactions}
|
||||
onUnlockPartial={handleUnlockingPartial}
|
||||
onCancelUnlockPartial={handleCancelUnlockingPartail}
|
||||
|
||||
@@ -251,10 +251,10 @@ function TransactionsLockingItemActions() {
|
||||
} = useTransactionsLockingItemContext();
|
||||
|
||||
const handleLockClick = (event) => {
|
||||
safeInvoke(onLock, module, isEnabled, event);
|
||||
safeInvoke(onLock, module, event);
|
||||
};
|
||||
const handleEditBtn = (event) => {
|
||||
safeInvoke(onEditLock, module, event);
|
||||
safeInvoke(onEditLock, module, isEnabled, event);
|
||||
};
|
||||
const handleUnlockPartial = (event) => {
|
||||
safeInvoke(onUnlockPartial, module, event);
|
||||
@@ -401,7 +401,7 @@ export const TransLockingReason = styled.div`
|
||||
`;
|
||||
|
||||
const TransUnlockWrap = styled.div`
|
||||
padding-top: 10px;
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid #ddd;
|
||||
margin-top: 10px;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user