mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
fix: fix errors.
This commit is contained in:
@@ -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({});
|
||||
|
||||
@@ -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')}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -107,9 +107,7 @@ function PaymentMadeForm({
|
||||
|
||||
const onError = ({
|
||||
response: {
|
||||
error: {
|
||||
data: { errors },
|
||||
},
|
||||
data: { errors },
|
||||
},
|
||||
}) => {
|
||||
const getError = (errorType) => errors.find((e) => e.type === errorType);
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.dashboard__insider--expenses {
|
||||
|
||||
.dashboard__insider--expense-form {
|
||||
padding-bottom: 64px;
|
||||
.bigcapital-datatable {
|
||||
|
||||
.tbody {
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
.dashboard__insider--make-journal-page {
|
||||
padding-bottom: 64px;
|
||||
}
|
||||
|
||||
.page-form--make-journal-entries{
|
||||
$self: '.page-form';
|
||||
|
||||
Reference in New Issue
Block a user