mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 07:10:33 +00:00
BIG-225 Add menu divider before delete on contextMenu.
This commit is contained in:
@@ -179,6 +179,7 @@ export const ActionsMenu = ({
|
|||||||
/>
|
/>
|
||||||
</Can>
|
</Can>
|
||||||
<Can I={ManualJournalAction.Delete} a={AbilitySubject.ManualJournal}>
|
<Can I={ManualJournalAction.Delete} a={AbilitySubject.ManualJournal}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
text={intl.get('delete_journal')}
|
text={intl.get('delete_journal')}
|
||||||
icon={<Icon icon="trash-16" iconSize={16} />}
|
icon={<Icon icon="trash-16" iconSize={16} />}
|
||||||
|
|||||||
@@ -271,6 +271,7 @@ function CashflowAccountContextMenu({
|
|||||||
</If>
|
</If>
|
||||||
</Can>
|
</Can>
|
||||||
<Can I={CashflowAction.Delete} a={AbilitySubject.Cashflow}>
|
<Can I={CashflowAction.Delete} a={AbilitySubject.Cashflow}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
text={intl.get('delete_account')}
|
text={intl.get('delete_account')}
|
||||||
icon={<Icon icon="trash-16" iconSize={16} />}
|
icon={<Icon icon="trash-16" iconSize={16} />}
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ export function ActionsMenu({
|
|||||||
</If>
|
</If>
|
||||||
</Can>
|
</Can>
|
||||||
<Can I={CustomerAction.Delete} a={AbilitySubject.Customer}>
|
<Can I={CustomerAction.Delete} a={AbilitySubject.Customer}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
icon={<Icon icon="trash-16" iconSize={16} />}
|
icon={<Icon icon="trash-16" iconSize={16} />}
|
||||||
text={intl.get('delete_customer')}
|
text={intl.get('delete_customer')}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import { Intent, Menu, MenuItem } from '@blueprintjs/core';
|
import { Intent, Menu, MenuItem, MenuDivider } from '@blueprintjs/core';
|
||||||
import clsx from 'classnames';
|
import clsx from 'classnames';
|
||||||
import { CLASSES } from '../../../../common/classes';
|
import { CLASSES } from '../../../../common/classes';
|
||||||
import { Can, FormatDateCell, Icon } from '../../../../components';
|
import { Can, FormatDateCell, Icon } from '../../../../components';
|
||||||
@@ -27,6 +27,7 @@ export function ActionsMenu({
|
|||||||
/>
|
/>
|
||||||
</Can>
|
</Can>
|
||||||
<Can I={PaymentMadeAction.Delete} a={AbilitySubject.PaymentMade}>
|
<Can I={PaymentMadeAction.Delete} a={AbilitySubject.PaymentMade}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
text={intl.get('invoice_transactions.action.delete_transaction')}
|
text={intl.get('invoice_transactions.action.delete_transaction')}
|
||||||
intent={Intent.DANGER}
|
intent={Intent.DANGER}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import { Intent, Menu, MenuItem } from '@blueprintjs/core';
|
import { Intent, Menu, MenuItem, MenuDivider } from '@blueprintjs/core';
|
||||||
import clsx from 'classnames';
|
import clsx from 'classnames';
|
||||||
import { CLASSES } from '../../../../common/classes';
|
import { CLASSES } from '../../../../common/classes';
|
||||||
import { FormatDateCell, Icon, Can } from '../../../../components';
|
import { FormatDateCell, Icon, Can } from '../../../../components';
|
||||||
@@ -27,6 +27,7 @@ export function ActionsMenu({
|
|||||||
/>
|
/>
|
||||||
</Can>
|
</Can>
|
||||||
<Can I={PaymentReceiveAction.Delete} a={AbilitySubject.PaymentReceive}>
|
<Can I={PaymentReceiveAction.Delete} a={AbilitySubject.PaymentReceive}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
text={intl.get('invoice_transactions.action.delete_transaction')}
|
text={intl.get('invoice_transactions.action.delete_transaction')}
|
||||||
intent={Intent.DANGER}
|
intent={Intent.DANGER}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import { Intent, Menu, MenuItem } from '@blueprintjs/core';
|
import { Intent, Menu, MenuItem, MenuDivider } from '@blueprintjs/core';
|
||||||
|
|
||||||
import clsx from 'classnames';
|
import clsx from 'classnames';
|
||||||
import { CLASSES } from '../../../../../common/classes';
|
import { CLASSES } from '../../../../../common/classes';
|
||||||
@@ -28,6 +28,7 @@ export function ActionsMenu({
|
|||||||
/>
|
/>
|
||||||
</Can>
|
</Can>
|
||||||
<Can I={BillAction.Delete} a={AbilitySubject.Bill}>
|
<Can I={BillAction.Delete} a={AbilitySubject.Bill}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
text={intl.get('invoice_transactions.action.delete_transaction')}
|
text={intl.get('invoice_transactions.action.delete_transaction')}
|
||||||
intent={Intent.DANGER}
|
intent={Intent.DANGER}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import { Intent, Menu, MenuItem } from '@blueprintjs/core';
|
import { Intent, Menu, MenuItem, MenuDivider } from '@blueprintjs/core';
|
||||||
|
|
||||||
import clsx from 'classnames';
|
import clsx from 'classnames';
|
||||||
import { CLASSES } from '../../../../../common/classes';
|
import { CLASSES } from '../../../../../common/classes';
|
||||||
@@ -28,6 +28,7 @@ export function ActionsMenu({
|
|||||||
/>
|
/>
|
||||||
</Can>
|
</Can>
|
||||||
<Can I={SaleEstimateAction.Delete} a={AbilitySubject.Estimate}>
|
<Can I={SaleEstimateAction.Delete} a={AbilitySubject.Estimate}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
text={intl.get('invoice_transactions.action.delete_transaction')}
|
text={intl.get('invoice_transactions.action.delete_transaction')}
|
||||||
intent={Intent.DANGER}
|
intent={Intent.DANGER}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import { Intent, Menu, MenuItem } from '@blueprintjs/core';
|
import { Intent, Menu, MenuItem, MenuDivider } from '@blueprintjs/core';
|
||||||
|
|
||||||
import clsx from 'classnames';
|
import clsx from 'classnames';
|
||||||
import { CLASSES } from '../../../../../common/classes';
|
import { CLASSES } from '../../../../../common/classes';
|
||||||
@@ -28,6 +28,7 @@ export function ActionsMenu({
|
|||||||
/>
|
/>
|
||||||
</Can>
|
</Can>
|
||||||
<Can I={SaleInvoiceAction.Delete} a={AbilitySubject.Invoice}>
|
<Can I={SaleInvoiceAction.Delete} a={AbilitySubject.Invoice}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
text={intl.get('invoice_transactions.action.delete_transaction')}
|
text={intl.get('invoice_transactions.action.delete_transaction')}
|
||||||
intent={Intent.DANGER}
|
intent={Intent.DANGER}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import { Intent, Menu, MenuItem } from '@blueprintjs/core';
|
import { Intent, Menu, MenuItem, MenuDivider } from '@blueprintjs/core';
|
||||||
|
|
||||||
import clsx from 'classnames';
|
import clsx from 'classnames';
|
||||||
import { CLASSES } from '../../../../../common/classes';
|
import { CLASSES } from '../../../../../common/classes';
|
||||||
@@ -28,6 +28,7 @@ export function ActionsMenu({
|
|||||||
/>
|
/>
|
||||||
</Can>
|
</Can>
|
||||||
<Can I={SaleReceiptAction.Edit} a={AbilitySubject.Receipt}>
|
<Can I={SaleReceiptAction.Edit} a={AbilitySubject.Receipt}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
text={intl.get('invoice_transactions.action.delete_transaction')}
|
text={intl.get('invoice_transactions.action.delete_transaction')}
|
||||||
intent={Intent.DANGER}
|
intent={Intent.DANGER}
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ export function ActionsMenu({
|
|||||||
/>
|
/>
|
||||||
</Can>
|
</Can>
|
||||||
<Can I={ExpenseAction.Delete} a={AbilitySubject.Expense}>
|
<Can I={ExpenseAction.Delete} a={AbilitySubject.Expense}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
icon={<Icon icon="trash-16" iconSize={16} />}
|
icon={<Icon icon="trash-16" iconSize={16} />}
|
||||||
text={intl.get('delete_expense')}
|
text={intl.get('delete_expense')}
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ export function ItemsActionMenuList({
|
|||||||
</If>
|
</If>
|
||||||
</Can>
|
</Can>
|
||||||
<Can I={ItemAction.Delete} a={AbilitySubject.Item}>
|
<Can I={ItemAction.Delete} a={AbilitySubject.Item}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
text={intl.get('delete_item')}
|
text={intl.get('delete_item')}
|
||||||
icon={<Icon icon="trash-16" iconSize={16} />}
|
icon={<Icon icon="trash-16" iconSize={16} />}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {
|
|||||||
Button,
|
Button,
|
||||||
Position,
|
Position,
|
||||||
MenuItem,
|
MenuItem,
|
||||||
|
MenuDivider,
|
||||||
Intent,
|
Intent,
|
||||||
} from '@blueprintjs/core';
|
} from '@blueprintjs/core';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
@@ -18,7 +19,6 @@ export function ActionMenuList({
|
|||||||
row: { original },
|
row: { original },
|
||||||
payload: { onEditCurrency, onDeleteCurrency },
|
payload: { onEditCurrency, onDeleteCurrency },
|
||||||
}) {
|
}) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Menu>
|
<Menu>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
@@ -26,6 +26,7 @@ export function ActionMenuList({
|
|||||||
text={intl.get('edit_currency')}
|
text={intl.get('edit_currency')}
|
||||||
onClick={safeCallback(onEditCurrency, original)}
|
onClick={safeCallback(onEditCurrency, original)}
|
||||||
/>
|
/>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
icon={<Icon icon="trash-16" iconSize={16} />}
|
icon={<Icon icon="trash-16" iconSize={16} />}
|
||||||
text={intl.get('delete_currency')}
|
text={intl.get('delete_currency')}
|
||||||
@@ -51,8 +52,6 @@ export const ActionsCell = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export function useCurrenciesTableColumns() {
|
export function useCurrenciesTableColumns() {
|
||||||
|
|
||||||
|
|
||||||
return useMemo(
|
return useMemo(
|
||||||
() => [
|
() => [
|
||||||
{
|
{
|
||||||
@@ -69,7 +68,7 @@ export function useCurrenciesTableColumns() {
|
|||||||
{
|
{
|
||||||
Header: intl.get('currency_sign'),
|
Header: intl.get('currency_sign'),
|
||||||
width: 120,
|
width: 120,
|
||||||
accessor: 'currency_sign'
|
accessor: 'currency_sign',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'actions',
|
id: 'actions',
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ export function ActionsMenu({
|
|||||||
onClick={safeCallback(onAllocateLandedCost, original)}
|
onClick={safeCallback(onAllocateLandedCost, original)}
|
||||||
/>
|
/>
|
||||||
<Can I={BillAction.Delete} a={AbilitySubject.Bill}>
|
<Can I={BillAction.Delete} a={AbilitySubject.Bill}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
text={intl.get('delete_bill')}
|
text={intl.get('delete_bill')}
|
||||||
intent={Intent.DANGER}
|
intent={Intent.DANGER}
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ export function ActionsMenu({
|
|||||||
</If>
|
</If>
|
||||||
</Can>
|
</Can>
|
||||||
<Can I={VendorCreditAction.Delete} a={AbilitySubject.VendorCredit}>
|
<Can I={VendorCreditAction.Delete} a={AbilitySubject.VendorCredit}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
text={intl.get('vendor_credits.action.delete_vendor_credit')}
|
text={intl.get('vendor_credits.action.delete_vendor_credit')}
|
||||||
intent={Intent.DANGER}
|
intent={Intent.DANGER}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ export function ActionsMenu({
|
|||||||
/>
|
/>
|
||||||
</Can>
|
</Can>
|
||||||
<Can I={PaymentMadeAction.Delete} a={AbilitySubject.PaymentMade}>
|
<Can I={PaymentMadeAction.Delete} a={AbilitySubject.PaymentMade}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
text={intl.get('delete_payment_made')}
|
text={intl.get('delete_payment_made')}
|
||||||
intent={Intent.DANGER}
|
intent={Intent.DANGER}
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ export function ActionsMenu({
|
|||||||
</If>
|
</If>
|
||||||
</Can>
|
</Can>
|
||||||
<Can I={CreditNoteAction.Delete} a={AbilitySubject.CreditNote}>
|
<Can I={CreditNoteAction.Delete} a={AbilitySubject.CreditNote}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
text={intl.get('credit_note.action.delete_credit_note')}
|
text={intl.get('credit_note.action.delete_credit_note')}
|
||||||
intent={Intent.DANGER}
|
intent={Intent.DANGER}
|
||||||
|
|||||||
@@ -137,6 +137,7 @@ export function ActionsMenu({
|
|||||||
/>
|
/>
|
||||||
</Can>
|
</Can>
|
||||||
<Can I={SaleEstimateAction.Delete} a={AbilitySubject.Estimate}>
|
<Can I={SaleEstimateAction.Delete} a={AbilitySubject.Estimate}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
text={intl.get('delete_estimate')}
|
text={intl.get('delete_estimate')}
|
||||||
intent={Intent.DANGER}
|
intent={Intent.DANGER}
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ export function ActionsMenu({
|
|||||||
/>
|
/>
|
||||||
</Can>
|
</Can>
|
||||||
<Can I={SaleInvoiceAction.Delete} a={AbilitySubject.Invoice}>
|
<Can I={SaleInvoiceAction.Delete} a={AbilitySubject.Invoice}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
text={intl.get('delete_invoice')}
|
text={intl.get('delete_invoice')}
|
||||||
intent={Intent.DANGER}
|
intent={Intent.DANGER}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ function PaymentReceiveForm({
|
|||||||
paymentReceiveNumberPrefix,
|
paymentReceiveNumberPrefix,
|
||||||
paymentReceiveNextNumber,
|
paymentReceiveNextNumber,
|
||||||
);
|
);
|
||||||
console.log(preferredDepositAccount, 'XX');
|
|
||||||
// Form initial values.
|
// Form initial values.
|
||||||
const initialValues = useMemo(
|
const initialValues = useMemo(
|
||||||
() => ({
|
() => ({
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ export function ActionsMenu({
|
|||||||
/>
|
/>
|
||||||
</Can>
|
</Can>
|
||||||
<Can I={PaymentReceiveAction.Delete} a={AbilitySubject.PaymentReceive}>
|
<Can I={PaymentReceiveAction.Delete} a={AbilitySubject.PaymentReceive}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
text={intl.get('delete_payment_receive')}
|
text={intl.get('delete_payment_receive')}
|
||||||
intent={Intent.DANGER}
|
intent={Intent.DANGER}
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ export function ActionsMenu({
|
|||||||
/>
|
/>
|
||||||
</Can>
|
</Can>
|
||||||
<Can I={SaleReceiptAction.Delete} a={AbilitySubject.Receipt}>
|
<Can I={SaleReceiptAction.Delete} a={AbilitySubject.Receipt}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
text={intl.get('delete_receipt')}
|
text={intl.get('delete_receipt')}
|
||||||
intent={Intent.DANGER}
|
intent={Intent.DANGER}
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ export function ActionsMenu({
|
|||||||
</If>
|
</If>
|
||||||
</Can>
|
</Can>
|
||||||
<Can I={VendorAction.Delete} a={AbilitySubject.Vendor}>
|
<Can I={VendorAction.Delete} a={AbilitySubject.Vendor}>
|
||||||
|
<MenuDivider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
icon={<Icon icon="trash-16" iconSize={16} />}
|
icon={<Icon icon="trash-16" iconSize={16} />}
|
||||||
text={intl.get('delete_vendor')}
|
text={intl.get('delete_vendor')}
|
||||||
|
|||||||
Reference in New Issue
Block a user