mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
fix: fix errors.
This commit is contained in:
@@ -7,7 +7,8 @@ import {
|
|||||||
useJournal,
|
useJournal,
|
||||||
useCreateJournal,
|
useCreateJournal,
|
||||||
useEditJournal,
|
useEditJournal,
|
||||||
useSettings
|
useSettings,
|
||||||
|
useSettingsManualJournals
|
||||||
} from 'hooks/query';
|
} from 'hooks/query';
|
||||||
|
|
||||||
const MakeJournalFormContext = createContext();
|
const MakeJournalFormContext = createContext();
|
||||||
@@ -40,7 +41,7 @@ function MakeJournalProvider({ journalId, ...props }) {
|
|||||||
const { mutateAsync: editJournalMutate } = useEditJournal();
|
const { mutateAsync: editJournalMutate } = useEditJournal();
|
||||||
|
|
||||||
// Loading the journal settings.
|
// Loading the journal settings.
|
||||||
const { isLoading: isSettingsLoading } = useSettings();
|
const { isLoading: isSettingsLoading } = useSettingsManualJournals();
|
||||||
|
|
||||||
// Submit form payload.
|
// Submit form payload.
|
||||||
const [submitPayload, setSubmitPayload] = useState({});
|
const [submitPayload, setSubmitPayload] = useState({});
|
||||||
|
|||||||
@@ -19,12 +19,14 @@ import BillDrawerCls from 'style/components/Drawers/BillDrawer.module.scss';
|
|||||||
export default function BillDrawerDetails() {
|
export default function BillDrawerDetails() {
|
||||||
const {
|
const {
|
||||||
data: { transactions },
|
data: { transactions },
|
||||||
billId,
|
|
||||||
} = useBillDrawerContext();
|
} = useBillDrawerContext();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={clsx(BillDrawerCls.root)}>
|
<div className={clsx(BillDrawerCls.root)}>
|
||||||
<DrawerMainTabs renderActiveTabPanelOnly={true} defaultSelectedTabId="details">
|
<DrawerMainTabs
|
||||||
|
renderActiveTabPanelOnly={true}
|
||||||
|
defaultSelectedTabId="details"
|
||||||
|
>
|
||||||
<Tab
|
<Tab
|
||||||
title={intl.get('details')}
|
title={intl.get('details')}
|
||||||
id={'details'}
|
id={'details'}
|
||||||
@@ -38,7 +40,7 @@ export default function BillDrawerDetails() {
|
|||||||
<Tab
|
<Tab
|
||||||
title={intl.get('payment_transactions')}
|
title={intl.get('payment_transactions')}
|
||||||
id={'payment_transactions'}
|
id={'payment_transactions'}
|
||||||
panel={<BillPaymentTransactionTable billId={billId} />}
|
panel={<BillPaymentTransactionTable />}
|
||||||
/>
|
/>
|
||||||
<Tab
|
<Tab
|
||||||
title={intl.get('located_landed_cost')}
|
title={intl.get('located_landed_cost')}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
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 { Button, Classes, NavbarGroup } from '@blueprintjs/core';
|
||||||
|
|
||||||
import { useLocatedLandedCostColumns, ActionsMenu } from './components';
|
import { useLocatedLandedCostColumns, ActionsMenu } from './components';
|
||||||
@@ -31,16 +31,16 @@ function LocatedLandedCostTable({
|
|||||||
const columns = useLocatedLandedCostColumns();
|
const columns = useLocatedLandedCostColumns();
|
||||||
const { transactions, billId } = useBillDrawerContext();
|
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.
|
// Handle allocate landed cost button click.
|
||||||
const handleAllocateCostClick = () => {
|
const handleAllocateCostClick = () => {
|
||||||
openDialog('allocate-landed-cost', { billId });
|
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.
|
// Handle from transaction link click.
|
||||||
const handleFromTransactionClick = (original) => {
|
const handleFromTransactionClick = (original) => {
|
||||||
const { from_transaction_type, from_transaction_id } = original;
|
const { from_transaction_type, from_transaction_id } = original;
|
||||||
@@ -64,7 +64,7 @@ function LocatedLandedCostTable({
|
|||||||
<Button
|
<Button
|
||||||
className={Classes.MINIMAL}
|
className={Classes.MINIMAL}
|
||||||
icon={<Icon icon="receipt-24" />}
|
icon={<Icon icon="receipt-24" />}
|
||||||
text={'Allocate landed cost'}
|
text={<T id={'allocate_landed_coast'} />}
|
||||||
onClick={handleAllocateCostClick}
|
onClick={handleAllocateCostClick}
|
||||||
/>
|
/>
|
||||||
</NavbarGroup>
|
</NavbarGroup>
|
||||||
|
|||||||
@@ -107,10 +107,8 @@ function PaymentMadeForm({
|
|||||||
|
|
||||||
const onError = ({
|
const onError = ({
|
||||||
response: {
|
response: {
|
||||||
error: {
|
|
||||||
data: { errors },
|
data: { errors },
|
||||||
},
|
},
|
||||||
},
|
|
||||||
}) => {
|
}) => {
|
||||||
const getError = (errorType) => errors.find((e) => e.type === errorType);
|
const getError = (errorType) => errors.find((e) => e.type === errorType);
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ export function useSettingsReceipts(props) {
|
|||||||
export function useSettingsManualJournals(props) {
|
export function useSettingsManualJournals(props) {
|
||||||
return useSettingsQuery(
|
return useSettingsQuery(
|
||||||
[t.SETTING, t.SETTING_MANUAL_JOURNALS],
|
[t.SETTING, t.SETTING_MANUAL_JOURNALS],
|
||||||
{ group: 'sale_receipts' },
|
{ group: 'manual_journals' },
|
||||||
props,
|
props,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
.dashboard__insider--expenses {
|
.dashboard__insider--expense-form {
|
||||||
|
padding-bottom: 64px;
|
||||||
.bigcapital-datatable {
|
.bigcapital-datatable {
|
||||||
|
|
||||||
.tbody {
|
.tbody {
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
.dashboard__insider--make-journal-page {
|
||||||
|
padding-bottom: 64px;
|
||||||
|
}
|
||||||
|
|
||||||
.page-form--make-journal-entries{
|
.page-form--make-journal-entries{
|
||||||
$self: '.page-form';
|
$self: '.page-form';
|
||||||
|
|||||||
Reference in New Issue
Block a user