mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop
This commit is contained in:
@@ -46,6 +46,7 @@ export const TransactionLockingContent = ({
|
||||
onEditLock,
|
||||
onUnlockFull,
|
||||
onUnlockPartial,
|
||||
onCancle,
|
||||
}) => {
|
||||
const handleLockClick = (event) => {
|
||||
safeInvoke(onLock, module, event);
|
||||
@@ -60,6 +61,9 @@ export const TransactionLockingContent = ({
|
||||
const handleUnlockFull = (event) => {
|
||||
safeInvoke(onUnlockFull, module, event);
|
||||
};
|
||||
const handleCanclel = (event) => {
|
||||
safeInvoke(onCancle, module, event);
|
||||
};
|
||||
|
||||
return (
|
||||
<TransactionLockingWrapp isEnabled={isEnabled}>
|
||||
@@ -85,7 +89,7 @@ export const TransactionLockingContent = ({
|
||||
</TransLockingContent>
|
||||
|
||||
<TransLockingActions>
|
||||
<If condition={!isEnabled}>
|
||||
<If condition={!isEnabled && !isPartialUnlock}>
|
||||
<Button
|
||||
small={true}
|
||||
minimal={true}
|
||||
@@ -96,7 +100,7 @@ export const TransactionLockingContent = ({
|
||||
</Button>
|
||||
</If>
|
||||
|
||||
<If condition={isEnabled}>
|
||||
<If condition={isEnabled && !isPartialUnlock}>
|
||||
<Button
|
||||
small={true}
|
||||
minimal={true}
|
||||
@@ -110,6 +114,7 @@ export const TransactionLockingContent = ({
|
||||
content={
|
||||
<Menu>
|
||||
<MenuItem text="Full unlock" onClick={handleUnlockFull} />
|
||||
|
||||
<MenuItem
|
||||
text="Partial unlock"
|
||||
onClick={handleUnlockPartial}
|
||||
@@ -124,6 +129,17 @@ export const TransactionLockingContent = ({
|
||||
</Button>
|
||||
</Popover2>
|
||||
</If>
|
||||
|
||||
<If condition={isPartialUnlock}>
|
||||
<Button
|
||||
small={true}
|
||||
minimal={true}
|
||||
intent={Intent.PRIMARY}
|
||||
onClick={handleCanclel}
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
</If>
|
||||
</TransLockingActions>
|
||||
</TransLockingInner>
|
||||
</TransactionLockingWrapp>
|
||||
|
||||
Reference in New Issue
Block a user