From 8390e5ea6b06d38c1d9f75f2b82a58912dcef13e Mon Sep 17 00:00:00 2001
From: elforjani13 <39470382+elforjani13@users.noreply.github.com>
Date: Thu, 16 Dec 2021 21:11:21 +0200
Subject: [PATCH] fix: fix errors.
---
.../Accounting/MakeJournal/MakeJournalProvider.js | 5 +++--
.../Drawers/BillDrawer/BillDrawerDetails.js | 8 +++++---
.../Drawers/BillDrawer/LocatedLandedCostTable.js | 14 +++++++-------
.../PaymentMades/PaymentForm/PaymentMadeForm.js | 4 +---
src/hooks/query/settings.js | 2 +-
src/style/pages/Expense/PageForm.scss | 4 ++--
src/style/pages/ManualJournal/MakeJournal.scss | 3 +++
7 files changed, 22 insertions(+), 18 deletions(-)
diff --git a/src/containers/Accounting/MakeJournal/MakeJournalProvider.js b/src/containers/Accounting/MakeJournal/MakeJournalProvider.js
index 2241ff28c..e382c1661 100644
--- a/src/containers/Accounting/MakeJournal/MakeJournalProvider.js
+++ b/src/containers/Accounting/MakeJournal/MakeJournalProvider.js
@@ -7,7 +7,8 @@ import {
useJournal,
useCreateJournal,
useEditJournal,
- useSettings
+ useSettings,
+ useSettingsManualJournals
} from 'hooks/query';
const MakeJournalFormContext = createContext();
@@ -40,7 +41,7 @@ function MakeJournalProvider({ journalId, ...props }) {
const { mutateAsync: editJournalMutate } = useEditJournal();
// Loading the journal settings.
- const { isLoading: isSettingsLoading } = useSettings();
+ const { isLoading: isSettingsLoading } = useSettingsManualJournals();
// Submit form payload.
const [submitPayload, setSubmitPayload] = useState({});
diff --git a/src/containers/Drawers/BillDrawer/BillDrawerDetails.js b/src/containers/Drawers/BillDrawer/BillDrawerDetails.js
index 0385670a4..987cd77fb 100644
--- a/src/containers/Drawers/BillDrawer/BillDrawerDetails.js
+++ b/src/containers/Drawers/BillDrawer/BillDrawerDetails.js
@@ -19,12 +19,14 @@ import BillDrawerCls from 'style/components/Drawers/BillDrawer.module.scss';
export default function BillDrawerDetails() {
const {
data: { transactions },
- billId,
} = useBillDrawerContext();
return (
-
+
}
+ panel={}
/>
{
- openAlert('bill-located-cost-delete', { BillId: id });
- };
-
// Handle allocate landed cost button click.
const handleAllocateCostClick = () => {
openDialog('allocate-landed-cost', { billId });
};
+ // Handle the transaction delete action.
+ const handleDeleteTransaction = ({ id }) => {
+ openAlert('bill-located-cost-delete', { BillId: id });
+ };
+
// Handle from transaction link click.
const handleFromTransactionClick = (original) => {
const { from_transaction_type, from_transaction_id } = original;
@@ -64,7 +64,7 @@ function LocatedLandedCostTable({
}
- text={'Allocate landed cost'}
+ text={}
onClick={handleAllocateCostClick}
/>
diff --git a/src/containers/Purchases/PaymentMades/PaymentForm/PaymentMadeForm.js b/src/containers/Purchases/PaymentMades/PaymentForm/PaymentMadeForm.js
index 15771db31..5e9f04151 100644
--- a/src/containers/Purchases/PaymentMades/PaymentForm/PaymentMadeForm.js
+++ b/src/containers/Purchases/PaymentMades/PaymentForm/PaymentMadeForm.js
@@ -107,9 +107,7 @@ function PaymentMadeForm({
const onError = ({
response: {
- error: {
- data: { errors },
- },
+ data: { errors },
},
}) => {
const getError = (errorType) => errors.find((e) => e.type === errorType);
diff --git a/src/hooks/query/settings.js b/src/hooks/query/settings.js
index 4575307aa..bc28b9e57 100644
--- a/src/hooks/query/settings.js
+++ b/src/hooks/query/settings.js
@@ -95,7 +95,7 @@ export function useSettingsReceipts(props) {
export function useSettingsManualJournals(props) {
return useSettingsQuery(
[t.SETTING, t.SETTING_MANUAL_JOURNALS],
- { group: 'sale_receipts' },
+ { group: 'manual_journals' },
props,
);
}
diff --git a/src/style/pages/Expense/PageForm.scss b/src/style/pages/Expense/PageForm.scss
index 102a3819e..6aaf1fade 100644
--- a/src/style/pages/Expense/PageForm.scss
+++ b/src/style/pages/Expense/PageForm.scss
@@ -1,5 +1,5 @@
-.dashboard__insider--expenses {
-
+.dashboard__insider--expense-form {
+ padding-bottom: 64px;
.bigcapital-datatable {
.tbody {
diff --git a/src/style/pages/ManualJournal/MakeJournal.scss b/src/style/pages/ManualJournal/MakeJournal.scss
index d10c11380..1490e7642 100644
--- a/src/style/pages/ManualJournal/MakeJournal.scss
+++ b/src/style/pages/ManualJournal/MakeJournal.scss
@@ -1,3 +1,6 @@
+.dashboard__insider--make-journal-page {
+ padding-bottom: 64px;
+}
.page-form--make-journal-entries{
$self: '.page-form';