mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
export default function Card({ className, children }) {
|
||||
return <CardRoot className={className}>{children}</CardRoot>;
|
||||
}
|
||||
|
||||
const CardRoot = styled.div`
|
||||
padding: 15px;
|
||||
margin: 15px;
|
||||
background: #fff;
|
||||
border: 1px solid #d2dce2;
|
||||
`;
|
||||
27
src/components/Card/index.js
Normal file
27
src/components/Card/index.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
export function Card({ className, children }) {
|
||||
return <CardRoot className={className}>{children}</CardRoot>;
|
||||
}
|
||||
|
||||
const CardRoot = styled.div`
|
||||
padding: 15px;
|
||||
margin: 15px;
|
||||
background: #fff;
|
||||
border: 1px solid #d2dce2;
|
||||
`;
|
||||
|
||||
export 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;
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -1,5 +1,5 @@
|
||||
import styled from 'styled-components';
|
||||
import Card from '../Card';
|
||||
import { Card } from '../Card';
|
||||
import DataTable from '../DataTable';
|
||||
|
||||
export const CommercialDocBox = styled(Card)`
|
||||
@@ -22,4 +22,4 @@ export const CommercialDocEntriesTable = styled(DataTable)`
|
||||
|
||||
export const CommercialDocFooter = styled.div`
|
||||
margin-top: 25px;
|
||||
`
|
||||
`;
|
||||
|
||||
@@ -54,7 +54,6 @@ import Postbox from './Postbox';
|
||||
import AccountsSuggestField from './AccountsSuggestField';
|
||||
import MaterialProgressBar from './MaterialProgressBar';
|
||||
import { MoneyFieldCell } from './DataTableCells';
|
||||
import Card from './Card';
|
||||
import AvaterCell from './AvaterCell';
|
||||
|
||||
import { ItemsMultiSelect } from './Items';
|
||||
@@ -92,6 +91,7 @@ export * from './Typo';
|
||||
export * from './TextStatus';
|
||||
export * from './Tags';
|
||||
export * from './CommercialDoc';
|
||||
export * from './Card';
|
||||
|
||||
const Hint = FieldHint;
|
||||
|
||||
@@ -158,7 +158,6 @@ export {
|
||||
MaterialProgressBar,
|
||||
MoneyFieldCell,
|
||||
ItemsMultiSelect,
|
||||
Card,
|
||||
AvaterCell,
|
||||
MoreMenuItems,
|
||||
};
|
||||
|
||||
@@ -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 });
|
||||
};
|
||||
|
||||
@@ -1645,9 +1645,9 @@
|
||||
"unlocking_partial_transactions.alert.cancel_message": "تم إلغاء فتح المعاملات الجزئي بنجاح.",
|
||||
"unlocking_partial_transactions.alert.message": "هل أنت متأكد تريد إلغاء قفل الجزئي لهذه الوحدة؟ ",
|
||||
"yes": "نعم",
|
||||
"transactions_locking.lock_all_transactions_at_once": "قفل جميع المعاملات دفعة واحدة →",
|
||||
"transactions_locking.lock_modules_individually": "قفل الوحدات بشكل فردي →",
|
||||
"transactions_locking_lock_all_transactions_at_once": "قفل جميع المعاملات دفعة واحدة .",
|
||||
"transactions_locking.lock_all_transactions_at_once": "قفل جميع المعاملات دفعة واحدة ←",
|
||||
"transactions_locking.lock_modules_individually": "قفل الوحدات بشكل فردي ←",
|
||||
"transactions_locking_lock_all_transactions_at_once": "قفل جميع المعاملات دفعة واحدة.",
|
||||
"transactions_locking.lock": "قفل",
|
||||
"transactions_locking.unlock": "الغاء القفل",
|
||||
"transactions_locking.full_unlock": "إلغاء القفل الكامل",
|
||||
|
||||
@@ -3,23 +3,6 @@
|
||||
// General page
|
||||
//---------------------------------
|
||||
.preferences-page__inside-content--general {
|
||||
.card {
|
||||
padding: 25px;
|
||||
|
||||
.card__footer {
|
||||
padding-top: 16px;
|
||||
border-top: 1px solid #e0e7ea;
|
||||
margin-top: 30px;
|
||||
|
||||
.bp3-button {
|
||||
min-width: 70px;
|
||||
|
||||
+ .bp3-button{
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bp3-form-group {
|
||||
max-width: 650px;
|
||||
|
||||
Reference in New Issue
Block a user