mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
Merge branch 'feature/tooltip-oneline' into develop
This commit is contained in:
45
src/config/interfaces.tsx
Normal file
45
src/config/interfaces.tsx
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
export enum ISidebarMenuItemType {
|
||||||
|
Label = 'label',
|
||||||
|
Link = 'link',
|
||||||
|
Group = 'group',
|
||||||
|
Overlay = 'overlay'
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ISidebarMenuItemOverlay extends ISidebarMenuItemCommon {
|
||||||
|
type: ISidebarMenuItemType.Overlay;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ISidebarMenuItemLink extends ISidebarMenuItemCommon {
|
||||||
|
text: string | JSX.Element;
|
||||||
|
href: string;
|
||||||
|
type: ISidebarMenuItemType.Link;
|
||||||
|
matchExact?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ISidebarMenuItemLabel extends ISidebarMenuItemCommon {
|
||||||
|
text?: string;
|
||||||
|
type: ISidebarMenuItemType.Label;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ISidebarMenuItemGroup extends ISidebarMenuItemCommon {
|
||||||
|
type: ISidebarMenuItemType.Group;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ISidebarMenuItemPermission {
|
||||||
|
subject: string;
|
||||||
|
ability: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ISidebarMenuItemCommon {
|
||||||
|
ability?: ISidebarMenuItemPermission | ISidebarMenuItemPermission[];
|
||||||
|
feature?: string;
|
||||||
|
disabled?: boolean;
|
||||||
|
children?: ISidebarMenuItem[];
|
||||||
|
onlySubscriptionExpired?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ISidebarMenuItem =
|
||||||
|
| ISidebarMenuItemLink
|
||||||
|
| ISidebarMenuItemLabel
|
||||||
|
| ISidebarMenuItemGroup
|
||||||
|
| ISidebarMenuItemOverlay;
|
||||||
@@ -19,6 +19,7 @@ export const useExpenseReadEntriesColumns = () => {
|
|||||||
{
|
{
|
||||||
Header: intl.get('expense_account'),
|
Header: intl.get('expense_account'),
|
||||||
accessor: 'expense_account.name',
|
accessor: 'expense_account.name',
|
||||||
|
Cell: TextOverviewTooltipCell,
|
||||||
width: 110,
|
width: 110,
|
||||||
disableSortBy: true,
|
disableSortBy: true,
|
||||||
textOverview: true,
|
textOverview: true,
|
||||||
|
|||||||
@@ -10,7 +10,10 @@ import { TableStyle } from '../../../common';
|
|||||||
* Manual journal drawer table.
|
* Manual journal drawer table.
|
||||||
*/
|
*/
|
||||||
export default function ManualJournalDrawerTable() {
|
export default function ManualJournalDrawerTable() {
|
||||||
|
// Retrieves the readonly manual journal entries columns.
|
||||||
const columns = useManualJournalEntriesColumns();
|
const columns = useManualJournalEntriesColumns();
|
||||||
|
|
||||||
|
// Manual journal drawer context.
|
||||||
const { manualJournal } = useManualJournalDrawerContext();
|
const { manualJournal } = useManualJournalDrawerContext();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -49,19 +49,19 @@ export const useManualJournalEntriesColumns = () => {
|
|||||||
() => [
|
() => [
|
||||||
{
|
{
|
||||||
Header: intl.get('account_name'),
|
Header: intl.get('account_name'),
|
||||||
|
Cell: TextOverviewTooltipCell,
|
||||||
accessor: 'account.name',
|
accessor: 'account.name',
|
||||||
width: 130,
|
width: 130,
|
||||||
disableSortBy: true,
|
disableSortBy: true,
|
||||||
textOverview: true,
|
textOverview: true,
|
||||||
className: 'account',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('contact'),
|
Header: intl.get('contact'),
|
||||||
accessor: 'contact.display_name',
|
accessor: 'contact.display_name',
|
||||||
width: 130,
|
Cell: TextOverviewTooltipCell,
|
||||||
|
width: 100,
|
||||||
disableSortBy: true,
|
disableSortBy: true,
|
||||||
textOverview: true,
|
textOverview: true,
|
||||||
className: 'contact',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('note'),
|
Header: intl.get('note'),
|
||||||
@@ -69,16 +69,15 @@ export const useManualJournalEntriesColumns = () => {
|
|||||||
Cell: TextOverviewTooltipCell,
|
Cell: TextOverviewTooltipCell,
|
||||||
disableSortBy: true,
|
disableSortBy: true,
|
||||||
textOverview: true,
|
textOverview: true,
|
||||||
className: 'note',
|
width: 100,
|
||||||
},
|
},
|
||||||
...(featureCan(Features.Branches)
|
...(featureCan(Features.Branches)
|
||||||
? [
|
? [
|
||||||
{
|
{
|
||||||
Header: intl.get('branch'),
|
Header: intl.get('branch'),
|
||||||
width: 130,
|
width: 100,
|
||||||
accessor: 'branch.name',
|
accessor: 'branch.name',
|
||||||
disableSortBy: true,
|
disableSortBy: true,
|
||||||
className: 'branch',
|
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
: []),
|
: []),
|
||||||
@@ -94,7 +93,6 @@ export const useManualJournalEntriesColumns = () => {
|
|||||||
disableSortBy: true,
|
disableSortBy: true,
|
||||||
textOverview: true,
|
textOverview: true,
|
||||||
formatNumber: { noZero: true },
|
formatNumber: { noZero: true },
|
||||||
className: 'credit',
|
|
||||||
align: 'right',
|
align: 'right',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -109,10 +107,9 @@ export const useManualJournalEntriesColumns = () => {
|
|||||||
textOverview: true,
|
textOverview: true,
|
||||||
disableSortBy: true,
|
disableSortBy: true,
|
||||||
formatNumber: { noZero: true },
|
formatNumber: { noZero: true },
|
||||||
className: 'debit',
|
|
||||||
align: 'right',
|
align: 'right',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[featureCan],
|
[],
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ import {
|
|||||||
Choose,
|
Choose,
|
||||||
} from '../../../components';
|
} from '../../../components';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the readonly warehouse transfer entries columns.
|
||||||
|
*/
|
||||||
export const useWarehouseTransferReadOnlyEntriesColumns = () => {
|
export const useWarehouseTransferReadOnlyEntriesColumns = () => {
|
||||||
const {
|
const {
|
||||||
warehouseTransfer: { entries },
|
warehouseTransfer: { entries },
|
||||||
@@ -50,6 +53,7 @@ export const useWarehouseTransferReadOnlyEntriesColumns = () => {
|
|||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Warehouses transfer details status.
|
* Warehouses transfer details status.
|
||||||
* @returns {React.JSX}
|
* @returns {React.JSX}
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ function VendorsBalanceSummaryProvider({ filter, ...props }) {
|
|||||||
const query = React.useMemo(() => transformFilterFormToQuery(filter), [
|
const query = React.useMemo(() => transformFilterFormToQuery(filter), [
|
||||||
filter,
|
filter,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Fetching vendors balance summary report based on the given query.
|
// Fetching vendors balance summary report based on the given query.
|
||||||
const {
|
const {
|
||||||
data: VendorBalanceSummary,
|
data: VendorBalanceSummary,
|
||||||
|
|||||||
Reference in New Issue
Block a user