mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop
This commit is contained in:
@@ -12,6 +12,7 @@ import { useAccountReadEntriesColumns } from './utils';
|
||||
|
||||
import withDrawerActions from 'containers/Drawer/withDrawerActions';
|
||||
import { TableStyle } from '../../../common';
|
||||
import { useAppIntlContext } from 'components/AppIntlProvider';
|
||||
|
||||
/**
|
||||
* account drawer table.
|
||||
@@ -26,6 +27,8 @@ function AccountDrawerTable({ closeDrawer }) {
|
||||
const handleLinkClick = () => {
|
||||
closeDrawer(drawerName);
|
||||
};
|
||||
// Application intl context.
|
||||
const { isRTL } = useAppIntlContext();
|
||||
|
||||
return (
|
||||
<Card>
|
||||
@@ -42,7 +45,7 @@ function AccountDrawerTable({ closeDrawer }) {
|
||||
to={`/financial-reports/general-ledger`}
|
||||
onClick={handleLinkClick}
|
||||
>
|
||||
← {intl.get('view_more_transactions')}
|
||||
{isRTL ? '→' : '←'} {intl.get('view_more_transactions')}
|
||||
</Link>
|
||||
</TableFooter>
|
||||
</If>
|
||||
|
||||
@@ -3,7 +3,8 @@ import { Tab } from '@blueprintjs/core';
|
||||
import styled from 'styled-components';
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
import { Can, DrawerMainTabs } from 'components';
|
||||
import { useAbilityContext } from 'hooks/utils';
|
||||
import { DrawerMainTabs } from 'components';
|
||||
import {
|
||||
PaymentReceiveAction,
|
||||
AbilitySubject,
|
||||
@@ -18,6 +19,8 @@ import InvoiceDetailTab from './InvoiceDetailTab';
|
||||
* @returns {React.JSX}
|
||||
*/
|
||||
function InvoiceDetailsTabs() {
|
||||
const ability = useAbilityContext();
|
||||
|
||||
return (
|
||||
<DrawerMainTabs
|
||||
renderActiveTabPanelOnly={true}
|
||||
@@ -33,13 +36,16 @@ function InvoiceDetailsTabs() {
|
||||
id={'journal_entries'}
|
||||
panel={<InvoiceGLEntriesTable />}
|
||||
/>
|
||||
{/* <Can I={PaymentReceiveAction.View} a={AbilitySubject.PaymentReceive}> */}
|
||||
<Tab
|
||||
title={intl.get('payment_transactions')}
|
||||
id={'payment_transactions'}
|
||||
panel={<InvoicePaymentTransactionsTable />}
|
||||
/>
|
||||
{/* </Can> */}
|
||||
{ability.can(
|
||||
PaymentReceiveAction.View,
|
||||
AbilitySubject.PaymentReceive,
|
||||
) && (
|
||||
<Tab
|
||||
title={intl.get('payment_transactions')}
|
||||
id={'payment_transactions'}
|
||||
panel={<InvoicePaymentTransactionsTable />}
|
||||
/>
|
||||
)}
|
||||
</DrawerMainTabs>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -26,8 +26,6 @@ function InventoryAdjustmentList({
|
||||
<DashboardContentTable>
|
||||
<InventoryAdjustmentTable />
|
||||
</DashboardContentTable>
|
||||
|
||||
|
||||
</DashboardPageContent>
|
||||
</InventoryAdjustmentsProvider>
|
||||
);
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
FormattedMessage as T,
|
||||
AccountsSelectList,
|
||||
FieldRequiredHint,
|
||||
CardFooterActions,
|
||||
} from 'components';
|
||||
import { handleStringChange, inputIntent } from 'utils';
|
||||
import { ACCOUNT_TYPE } from 'common/accountTypes';
|
||||
@@ -229,14 +230,14 @@ export default function AccountantForm() {
|
||||
)}
|
||||
</FastField>
|
||||
|
||||
<div className={'card__footer'}>
|
||||
<CardFooterActions>
|
||||
<Button intent={Intent.PRIMARY} loading={isSubmitting} type="submit">
|
||||
<T id={'save'} />
|
||||
</Button>
|
||||
<Button disabled={isSubmitting} onClick={handleCloseClick}>
|
||||
<T id={'close'} />
|
||||
</Button>
|
||||
</div>
|
||||
</CardFooterActions>
|
||||
</Form>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import classNames from 'classnames';
|
||||
import { TimezonePicker } from '@blueprintjs/timezone';
|
||||
import { ErrorMessage, FastField } from 'formik';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { ListSelect, FieldRequiredHint } from 'components';
|
||||
@@ -242,14 +243,28 @@ export default function PreferencesGeneralForm({ isSubmitting }) {
|
||||
)}
|
||||
</FastField>
|
||||
|
||||
<div className={'card__footer'}>
|
||||
<CardFooterActions>
|
||||
<Button loading={isSubmitting} intent={Intent.PRIMARY} type="submit">
|
||||
<T id={'save'} />
|
||||
</Button>
|
||||
<Button onClick={handleCloseClick}>
|
||||
<T id={'close'} />
|
||||
</Button>
|
||||
</div>
|
||||
</CardFooterActions>
|
||||
</Form>
|
||||
);
|
||||
}
|
||||
|
||||
const CardFooterActions = styled.div`
|
||||
padding-top: 16px;
|
||||
border-top: 1px solid #e0e7ea;
|
||||
margin-top: 30px;
|
||||
|
||||
.bp3-button {
|
||||
min-width: 70px;
|
||||
|
||||
+ .bp3-button{
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -42,7 +42,7 @@ function GeneralFormPage({
|
||||
const initialValues = {
|
||||
...transformToForm(organization.metadata, defaultValues),
|
||||
};
|
||||
|
||||
// Handle the form submit.
|
||||
const handleFormSubmit = (values, { setSubmitting, resetForm }) => {
|
||||
// Handle request success.
|
||||
const onSuccess = (response) => {
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
AccountsSelectList,
|
||||
FieldRequiredHint,
|
||||
FormattedMessage as T,
|
||||
CardFooterActions
|
||||
} from 'components';
|
||||
import { inputIntent } from 'utils';
|
||||
import { ACCOUNT_PARENT_TYPE, ACCOUNT_TYPE } from 'common/accountTypes';
|
||||
@@ -135,14 +136,14 @@ export default function ItemForm() {
|
||||
)}
|
||||
</FastField>
|
||||
|
||||
<div className={'card__footer'}>
|
||||
<CardFooterActions>
|
||||
<Button intent={Intent.PRIMARY} loading={isSubmitting} type="submit">
|
||||
<T id={'save'} />
|
||||
</Button>
|
||||
<Button onClick={handleCloseClick} disabled={isSubmitting}>
|
||||
<T id={'close'} />
|
||||
</Button>
|
||||
</div>
|
||||
</CardFooterActions>
|
||||
</Form>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ function TransactionsLockingBodyJsx({
|
||||
const handleUnlockingPartial = (module) => {
|
||||
openDialog('unlocking-partial-transactions', { module: module });
|
||||
};
|
||||
// Handle cancel.
|
||||
// Handle cancel partial unlocking.
|
||||
const handleCancelUnlockingPartail = (module) => {
|
||||
openAlert('cancel-unlocking-partail', { module: module });
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user