mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
feat: handle transactions locking request error.
This commit is contained in:
@@ -86,7 +86,7 @@ function MoneyInForm({
|
||||
});
|
||||
})
|
||||
.finally(() => {
|
||||
setSubmitting(true);
|
||||
setSubmitting(false);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ function MoneyOutForm({
|
||||
});
|
||||
})
|
||||
.finally(() => {
|
||||
setSubmitting(true);
|
||||
setSubmitting(false);
|
||||
});
|
||||
};
|
||||
return (
|
||||
|
||||
@@ -53,9 +53,11 @@ function GlobalErrors({
|
||||
);
|
||||
}
|
||||
if (globalErrors.transactionsLocked) {
|
||||
const lockedToDate =
|
||||
globalErrors.transactionsLocked.formatted_locked_to_date;
|
||||
|
||||
AppToaster.show({
|
||||
message:
|
||||
'Transactions before 13 Dec 2021 has been locked. Hence action cannot be performed.',
|
||||
message: `Transactions before ${lockedToDate} has been locked. Hence action cannot be performed.`,
|
||||
intent: Intent.DANGER,
|
||||
onDismiss: () => {
|
||||
globalErrorsSet({ transactionsLocked: false });
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import React from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
import { Intent } from '@blueprintjs/core';
|
||||
import styled from 'styled-components';
|
||||
import * as R from 'ramda';
|
||||
@@ -11,6 +10,7 @@ import {
|
||||
Join,
|
||||
Paragraph,
|
||||
FormattedMessage as T,
|
||||
AlertDesc
|
||||
} from 'components';
|
||||
import { TransactionsLockingProvider } from './TransactionsLockingProvider';
|
||||
import {
|
||||
@@ -258,4 +258,8 @@ const LockAllAlert = styled(Alert)`
|
||||
margin-bottom: 0;
|
||||
margin-top: 20px;
|
||||
background: transparent;
|
||||
|
||||
${AlertDesc} {
|
||||
color: #1f3255;
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -213,7 +213,7 @@ const TransactionLockingWrapp = styled.div`
|
||||
${(props) =>
|
||||
props.isEnabled &&
|
||||
`
|
||||
border-color: #fe9f9e;
|
||||
border-color: #fc8483;
|
||||
|
||||
${TransLockingIcon} {
|
||||
color: #ff8282;
|
||||
|
||||
Reference in New Issue
Block a user