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({