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