mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
fix: transaction locking handling
This commit is contained in:
@@ -64,12 +64,11 @@ export default function useApiRequest() {
|
||||
setGlobalErrors({ too_many_requests: true });
|
||||
}
|
||||
if (status === 400) {
|
||||
if (
|
||||
data.errors.find(
|
||||
(error) => error.type === 'TRANSACTIONS_DATE_LOCKED',
|
||||
)
|
||||
) {
|
||||
setGlobalErrors({ transactionsLocked: { ...lockedError.data } });
|
||||
const lockedError = data.errors.find(
|
||||
(error) => error.type === 'TRANSACTIONS_DATE_LOCKED',
|
||||
);
|
||||
if (lockedError) {
|
||||
setGlobalErrors({ transactionsLocked: { ...lockedError.payload } });
|
||||
}
|
||||
if (
|
||||
data.errors.find(
|
||||
|
||||
Reference in New Issue
Block a user