mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-12 10:50:31 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
802f7cc442 | ||
|
|
5f0700b5e5 | ||
|
|
48348da663 | ||
|
|
b32abc0417 |
@@ -3,6 +3,7 @@ import { MenuItem, Button } from '@blueprintjs/core';
|
||||
import { Select } from '@blueprintjs/select';
|
||||
import * as R from 'ramda';
|
||||
import classNames from 'classnames';
|
||||
import intl from 'react-intl-universal'
|
||||
|
||||
import { MenuItemNestedText, FormattedMessage as T } from 'components';
|
||||
import { filterAccountsByQuery } from './utils';
|
||||
@@ -16,7 +17,7 @@ const createNewItemRenderer = (query, active, handleClick) => {
|
||||
return (
|
||||
<MenuItem
|
||||
icon="add"
|
||||
text={`Create "${query}"`}
|
||||
text={intl.get('list.create', { value: `"${query}"` })}
|
||||
active={active}
|
||||
onClick={handleClick}
|
||||
/>
|
||||
|
||||
@@ -18,7 +18,7 @@ const createNewItemRenderer = (query, active, handleClick) => {
|
||||
return (
|
||||
<MenuItem
|
||||
icon="add"
|
||||
text={`Create "${query}"`}
|
||||
text={intl.get('list.create', { value: `"${query}"` })}
|
||||
active={active}
|
||||
onClick={handleClick}
|
||||
/>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
import { MenuItem } from '@blueprintjs/core';
|
||||
|
||||
// Filter Contact List
|
||||
@@ -34,7 +35,7 @@ export const createNewItemRenderer = (query, active, handleClick) => {
|
||||
return (
|
||||
<MenuItem
|
||||
icon="add"
|
||||
text={`Create "${query}"`}
|
||||
text={intl.get('list.create', { value: `"${query}"` })}
|
||||
active={active}
|
||||
shouldDismissPopover={false}
|
||||
onClick={handleClick}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { MenuItem } from '@blueprintjs/core';
|
||||
import { Suggest } from '@blueprintjs/select';
|
||||
import classNames from 'classnames';
|
||||
import * as R from 'ramda';
|
||||
|
||||
import intl from 'react-intl-universal';
|
||||
import { CLASSES } from 'common/classes';
|
||||
|
||||
import { FormattedMessage as T } from 'components';
|
||||
@@ -24,7 +24,7 @@ const createNewItemRenderer = (query, active, handleClick) => {
|
||||
return (
|
||||
<MenuItem
|
||||
icon="add"
|
||||
text={`Create "${query}"`}
|
||||
text={intl.get('list.create', { value: `"${query}"` })}
|
||||
active={active}
|
||||
shouldDismissPopover={false}
|
||||
onClick={handleClick}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import intl from 'react-intl-universal';
|
||||
import * as R from 'ramda';
|
||||
import { isEmpty } from 'lodash';
|
||||
|
||||
export const transformApiErrors = (errors) => {
|
||||
const fields = {};
|
||||
@@ -42,12 +43,18 @@ const mergeWithAccount = R.curry((transformed, account) => {
|
||||
};
|
||||
});
|
||||
|
||||
/**
|
||||
* Default account payload transformer.
|
||||
*/
|
||||
const defaultPayloadTransform = () => ({});
|
||||
|
||||
/**
|
||||
* Defined payload transformers.
|
||||
*/
|
||||
function getConditions() {
|
||||
return [
|
||||
['edit', transformEditMode],
|
||||
['edit'],
|
||||
['new_child', transformEditMode],
|
||||
['NEW_ACCOUNT_DEFINED_TYPE', transformNewAccountDefinedType],
|
||||
];
|
||||
}
|
||||
@@ -59,9 +66,13 @@ export const transformAccountToForm = (account, payload) => {
|
||||
const conditions = getConditions();
|
||||
|
||||
const results = conditions.map((condition) => {
|
||||
const transformer = !isEmpty(condition[1])
|
||||
? condition[1]
|
||||
: defaultPayloadTransform;
|
||||
|
||||
return [
|
||||
condition[0] === payload.action ? R.T : R.F,
|
||||
mergeWithAccount(condition[1](payload)),
|
||||
mergeWithAccount(transformer(payload)),
|
||||
];
|
||||
});
|
||||
return R.cond(results)(account);
|
||||
|
||||
@@ -73,6 +73,10 @@ export default function CustomerDetailsHeader() {
|
||||
label={<T id={'customer.drawer.label.currency'} />}
|
||||
children={customer?.currency_code}
|
||||
/>
|
||||
<DetailItem
|
||||
label={<T id={'customer.drawer.label.note'} />}
|
||||
children={defaultTo(customer?.note, '--')}
|
||||
/>
|
||||
</DetailsMenu>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -15,7 +15,8 @@ export default function QuickWriteVendorDrawerContent({ displayName }) {
|
||||
<React.Fragment>
|
||||
<DrawerHeaderContent
|
||||
name="quick-create-customer"
|
||||
title={"Create a new vendor"}
|
||||
title={<T id={'create_a_new_vendor'} />}
|
||||
|
||||
/>
|
||||
<DrawerBody>
|
||||
<QuickVendorFormDrawer displayName={displayName} />
|
||||
|
||||
@@ -68,6 +68,11 @@ export default function VendorDetailsHeader() {
|
||||
label={<T id={'vendor.drawer.label.currency'} />}
|
||||
children={vendor?.currency_code}
|
||||
/>
|
||||
<DetailItem
|
||||
label={<T id={'vendor.drawer.label.note'} />}
|
||||
children={defaultTo(vendor?.note, '--')}
|
||||
|
||||
/>
|
||||
</DetailsMenu>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1322,6 +1322,7 @@
|
||||
"customer.drawer.label.opening_balance": "الرصيد الافتتاحي",
|
||||
"customer.drawer.label.opening_balance_at": "الرصيد الافتتاحي في",
|
||||
"customer.drawer.label.currency": "العملة",
|
||||
"customer.drawer.label.note": "ملاحظة",
|
||||
"vendor.drawer.label.outstanding_payable": "مستحف الدفع",
|
||||
"vendor.drawer.label.vendor": "اسم المورد",
|
||||
"vendor.drawer.label.unused_credits": "الرصيد الدائن",
|
||||
@@ -1331,6 +1332,7 @@
|
||||
"vendor.drawer.label.opening_balance": "الرصيد الافتتاحي",
|
||||
"vendor.drawer.label.opening_balance_at": "الرصيد الافتتاحي في",
|
||||
"vendor.drawer.label.currency": "العملة",
|
||||
"vendor.drawer.label.note": "ملاحظة",
|
||||
"vendor.drawer.action.edit_vendor": "تعديل المورد",
|
||||
"vendor.drawer.action.delete": "حذف",
|
||||
"vendor.drawer.action.new_transaction": "معاملة جديدة",
|
||||
@@ -1479,5 +1481,6 @@
|
||||
"sms_notification.estimate_details.type": "تفاصيل فاتورة عرض الاسعار",
|
||||
"sms_notification.payment_details.type": "شكر علي عملية الدفع",
|
||||
"sms_notification.receipt_details.type": "تفاصيل إيصال البيع",
|
||||
"personal": "المحمول"
|
||||
"personal": "المحمول",
|
||||
"list.create":"إضافة {value}"
|
||||
}
|
||||
@@ -1295,6 +1295,7 @@
|
||||
"customer.drawer.label.opening_balance": "Opening balance",
|
||||
"customer.drawer.label.opening_balance_at": "Opening balance at",
|
||||
"customer.drawer.label.currency": "Currency code",
|
||||
"customer.drawer.label.note": "Note",
|
||||
"vendor.drawer.label.outstanding_payable": "Outstanding payable",
|
||||
"vendor.drawer.label.vendor": "Vendor name",
|
||||
"vendor.drawer.label.unused_credits": "Unused Credits",
|
||||
@@ -1304,6 +1305,7 @@
|
||||
"vendor.drawer.label.opening_balance": "Opening balance",
|
||||
"vendor.drawer.label.opening_balance_at": "Opening balance at",
|
||||
"vendor.drawer.label.currency": "Currency",
|
||||
"vendor.drawer.label.note": "Note",
|
||||
"vendor.drawer.action.edit_vendor": "Edit vendor",
|
||||
"vendor.drawer.action.delete": "Delete",
|
||||
"vendor.drawer.action.new_transaction": "New transaction",
|
||||
@@ -1400,7 +1402,7 @@
|
||||
"cash_flow_drawer.label_transaction_type": "Transaction type",
|
||||
"cash_flow.drawer.label_transaction_no": "Transaction number",
|
||||
"cash_flow.drawer.label_transaction": "Cash flow Transaction {number}",
|
||||
"cash_flow.transactions.no_results": "There are no deposit/withdrawal transactions on the current account.",
|
||||
"cash_flow.account_transactions.no_results": "There are no deposit/withdrawal transactions on the current account.",
|
||||
"cash_flow_balance_in": "Balance in {name}",
|
||||
"cash_flow.accounts.no_results": "There are no cashflow accounts with current filter criteria.",
|
||||
"cash_flow_money_in": "Money In",
|
||||
@@ -1466,5 +1468,6 @@
|
||||
"sms_notification.estimate_details.type": "Sale estimate details",
|
||||
"sms_notification.payment_details.type": "Payment receive thank you.",
|
||||
"sms_notification.receipt_details.type": "Sale receipt details",
|
||||
"personal": "Personal"
|
||||
"personal": "Personal",
|
||||
"list.create":"Create {value}"
|
||||
}
|
||||
@@ -21,12 +21,12 @@ export default [
|
||||
loader: () => import('containers/Authentication/ResetPassword'),
|
||||
}),
|
||||
},
|
||||
// {
|
||||
// path: `${BASE_URL}/invite/:token/accept`,
|
||||
// component: LazyLoader({
|
||||
// loader: () => import('containers/Authentication/InviteAccept'),
|
||||
// }),
|
||||
// },
|
||||
{
|
||||
path: `${BASE_URL}/invite/:token/accept`,
|
||||
component: LazyLoader({
|
||||
loader: () => import('containers/Authentication/InviteAccept'),
|
||||
}),
|
||||
},
|
||||
{
|
||||
path: `${BASE_URL}/register`,
|
||||
component: LazyLoader({
|
||||
|
||||
Reference in New Issue
Block a user