mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feat: remove more actions button in datatables.
This commit is contained in:
@@ -6,7 +6,6 @@ import {
|
||||
StatusAccessor,
|
||||
DateAccessor,
|
||||
AmountAccessor,
|
||||
ActionsCell,
|
||||
} from './components';
|
||||
|
||||
/**
|
||||
@@ -65,14 +64,6 @@ export const useManualJournalsColumns = () => {
|
||||
width: 125,
|
||||
className: 'created_at',
|
||||
},
|
||||
{
|
||||
id: 'actions',
|
||||
Header: '',
|
||||
Cell: ActionsCell,
|
||||
className: 'actions',
|
||||
width: 50,
|
||||
disableResizing: true,
|
||||
},
|
||||
],
|
||||
[],
|
||||
);
|
||||
|
||||
@@ -125,19 +125,20 @@ export const transformErrors = (resErrors, { setErrors, errors }) => {
|
||||
setEntriesErrors(error.indexes, 'contact_id', 'error');
|
||||
}
|
||||
if ((error = getError(ERROR.ENTRIES_SHOULD_ASSIGN_WITH_CONTACT))) {
|
||||
if (error.meta.contact_type === 'customer') {
|
||||
if (error.meta.find(meta => meta.contact_type === 'customer')) {
|
||||
toastMessages.push(
|
||||
formatMessage({
|
||||
id: 'receivable_accounts_should_assign_with_customers',
|
||||
}),
|
||||
);
|
||||
}
|
||||
if (error.meta.contact_type === 'vendor') {
|
||||
if (error.meta.find(meta => meta.contact_type === 'vendor')) {
|
||||
toastMessages.push(
|
||||
formatMessage({ id: 'payable_accounts_should_assign_with_vendors' }),
|
||||
);
|
||||
}
|
||||
setEntriesErrors(error.meta.indexes, 'contact_id', 'error');
|
||||
const indexes = error.meta.map((meta => meta.indexes)).flat();
|
||||
setEntriesErrors(indexes, 'contact_id', 'error');
|
||||
}
|
||||
if ((error = getError(ERROR.JOURNAL_NUMBER_ALREADY_EXISTS))) {
|
||||
newErrors = setWith(
|
||||
@@ -153,7 +154,7 @@ export const transformErrors = (resErrors, { setErrors, errors }) => {
|
||||
if (toastMessages.length > 0) {
|
||||
AppToaster.show({
|
||||
message: toastMessages.map((message) => {
|
||||
return <div>- {message}</div>;
|
||||
return <div>{message}</div>;
|
||||
}),
|
||||
intent: Intent.DANGER,
|
||||
});
|
||||
|
||||
@@ -201,14 +201,6 @@ export function useBillsTableColumns() {
|
||||
width: 90,
|
||||
className: 'reference_no',
|
||||
},
|
||||
{
|
||||
id: 'actions',
|
||||
Header: '',
|
||||
Cell: ActionsCell,
|
||||
className: 'actions',
|
||||
width: 50,
|
||||
disableResizing: true,
|
||||
},
|
||||
],
|
||||
[formatMessage],
|
||||
);
|
||||
|
||||
@@ -118,15 +118,6 @@ export function usePaymentMadesTableColumns() {
|
||||
width: 140,
|
||||
className: 'reference',
|
||||
},
|
||||
|
||||
{
|
||||
id: 'actions',
|
||||
Header: '',
|
||||
Cell: ActionsCell,
|
||||
className: 'actions',
|
||||
width: 50,
|
||||
disableResizing: true,
|
||||
},
|
||||
],
|
||||
[formatMessage],
|
||||
);
|
||||
|
||||
@@ -203,15 +203,7 @@ export function useEstiamtesTableColumns() {
|
||||
accessor: 'reference',
|
||||
width: 90,
|
||||
className: 'reference',
|
||||
},
|
||||
{
|
||||
id: 'actions',
|
||||
Header: '',
|
||||
Cell: ActionsCell,
|
||||
className: 'actions',
|
||||
width: 50,
|
||||
disableResizing: true,
|
||||
},
|
||||
}
|
||||
],
|
||||
[formatMessage],
|
||||
);
|
||||
|
||||
@@ -221,14 +221,6 @@ export function useInvoicesTableColumns() {
|
||||
width: 90,
|
||||
className: 'reference_no',
|
||||
},
|
||||
{
|
||||
id: 'actions',
|
||||
Header: '',
|
||||
Cell: ActionsCell,
|
||||
className: 'actions',
|
||||
width: 50,
|
||||
disableResizing: true,
|
||||
},
|
||||
],
|
||||
[formatMessage],
|
||||
);
|
||||
|
||||
@@ -127,15 +127,7 @@ export function usePaymentReceivesColumns() {
|
||||
accessor: 'reference_no',
|
||||
width: 140,
|
||||
className: 'reference_no',
|
||||
},
|
||||
{
|
||||
id: 'actions',
|
||||
Header: '',
|
||||
Cell: ActionsCell,
|
||||
className: 'actions',
|
||||
width: 50,
|
||||
disableResizing: true,
|
||||
},
|
||||
}
|
||||
],
|
||||
[formatMessage],
|
||||
);
|
||||
|
||||
@@ -146,14 +146,6 @@ export function useReceiptsTableColumns() {
|
||||
width: 140,
|
||||
className: 'reference_no',
|
||||
},
|
||||
{
|
||||
id: 'actions',
|
||||
Header: '',
|
||||
Cell: ActionsCell,
|
||||
className: 'actions',
|
||||
width: 50,
|
||||
disableResizing: true,
|
||||
},
|
||||
],
|
||||
[formatMessage],
|
||||
);
|
||||
|
||||
@@ -127,15 +127,7 @@ export function useVendorsTableColumns() {
|
||||
accessor: BalanceAccessor,
|
||||
className: 'receivable_balance',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
id: 'actions',
|
||||
Cell: ActionsCell,
|
||||
className: 'actions',
|
||||
width: 70,
|
||||
disableResizing: true,
|
||||
disableSortBy: true,
|
||||
},
|
||||
}
|
||||
],
|
||||
[formatMessage],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user