fix: fix errors.

This commit is contained in:
elforjani13
2021-12-16 21:11:21 +02:00
parent fcd1a8849d
commit 8390e5ea6b
7 changed files with 22 additions and 18 deletions

View File

@@ -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({});

View File

@@ -19,12 +19,14 @@ import BillDrawerCls from 'style/components/Drawers/BillDrawer.module.scss';
export default function BillDrawerDetails() {
const {
data: { transactions },
billId,
} = useBillDrawerContext();
return (
<div className={clsx(BillDrawerCls.root)}>
<DrawerMainTabs renderActiveTabPanelOnly={true} defaultSelectedTabId="details">
<DrawerMainTabs
renderActiveTabPanelOnly={true}
defaultSelectedTabId="details"
>
<Tab
title={intl.get('details')}
id={'details'}
@@ -38,7 +40,7 @@ export default function BillDrawerDetails() {
<Tab
title={intl.get('payment_transactions')}
id={'payment_transactions'}
panel={<BillPaymentTransactionTable billId={billId} />}
panel={<BillPaymentTransactionTable />}
/>
<Tab
title={intl.get('located_landed_cost')}

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { DataTable, Card } from 'components';
import { DataTable, Card, FormattedMessage as T } from 'components';
import { Button, Classes, NavbarGroup } from '@blueprintjs/core';
import { useLocatedLandedCostColumns, ActionsMenu } from './components';
@@ -31,16 +31,16 @@ function LocatedLandedCostTable({
const columns = useLocatedLandedCostColumns();
const { transactions, billId } = useBillDrawerContext();
// Handle the transaction delete action.
const handleDeleteTransaction = ({ id }) => {
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({
<Button
className={Classes.MINIMAL}
icon={<Icon icon="receipt-24" />}
text={'Allocate landed cost'}
text={<T id={'allocate_landed_coast'} />}
onClick={handleAllocateCostClick}
/>
</NavbarGroup>

View File

@@ -107,9 +107,7 @@ function PaymentMadeForm({
const onError = ({
response: {
error: {
data: { errors },
},
data: { errors },
},
}) => {
const getError = (errorType) => errors.find((e) => e.type === errorType);

View File

@@ -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,
);
}

View File

@@ -1,5 +1,5 @@
.dashboard__insider--expenses {
.dashboard__insider--expense-form {
padding-bottom: 64px;
.bigcapital-datatable {
.tbody {

View File

@@ -1,3 +1,6 @@
.dashboard__insider--make-journal-page {
padding-bottom: 64px;
}
.page-form--make-journal-entries{
$self: '.page-form';