mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
fix: resource advanced view filter.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
|
||||
import { IDynamicListFilterDTO } from 'interfaces/DynamicFilter';
|
||||
|
||||
export interface IAccountDTO {
|
||||
name: string,
|
||||
@@ -12,4 +12,8 @@ export interface IAccount {
|
||||
code: string,
|
||||
description: string,
|
||||
accountTypeNumber: number,
|
||||
};
|
||||
};
|
||||
|
||||
export interface IAccountsFilter extends IDynamicListFilterDTO {
|
||||
stringifiedFilterRoles?: string,
|
||||
};
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
|
||||
// Contact Interfaces.
|
||||
|
||||
import { IDynamicListFilter } from "./DynamicFilter";
|
||||
|
||||
// ----------------------------------
|
||||
export interface IContactAddress {
|
||||
billingAddress1: string,
|
||||
@@ -167,4 +170,16 @@ export interface IVendorEditDTO extends IContactAddressDTO {
|
||||
|
||||
note?: string,
|
||||
active?: boolean,
|
||||
};
|
||||
|
||||
export interface IVendorsFilter extends IDynamicListFilter {
|
||||
stringifiedFilterRoles?: string,
|
||||
page?: number,
|
||||
pageSize?: number,
|
||||
};
|
||||
|
||||
export interface ICustomerFilter extends IDynamicListFilter {
|
||||
stringifiedFilterRoles?: string,
|
||||
page?: number,
|
||||
pageSize?: number,
|
||||
};
|
||||
20
server/src/interfaces/DynamicFilter.ts
Normal file
20
server/src/interfaces/DynamicFilter.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
export interface IDynamicFilter {
|
||||
setTableName(tableName: string): void;
|
||||
buildQuery(): void;
|
||||
}
|
||||
|
||||
export interface IFilterRole {
|
||||
fieldKey: string,
|
||||
value: string,
|
||||
condition?: string,
|
||||
index?: number,
|
||||
comparator?: string,
|
||||
};
|
||||
|
||||
export interface IDynamicListFilterDTO {
|
||||
customViewId?: number,
|
||||
filterRoles?: IFilterRole[],
|
||||
columnSortBy: string,
|
||||
sortOrder: string,
|
||||
}
|
||||
@@ -1,7 +1,17 @@
|
||||
|
||||
import { IDynamicListFilter } from 'interfaces/DynamicFilter';
|
||||
|
||||
export interface IItem{
|
||||
id: number,
|
||||
name: string,
|
||||
type: string,
|
||||
}
|
||||
}
|
||||
|
||||
export interface IItemsService {
|
||||
|
||||
}
|
||||
|
||||
export interface IItemsFilter extends IDynamicListFilter {
|
||||
stringifiedFilterRoles?: string,
|
||||
page?: number,
|
||||
pageSize?: number,
|
||||
};
|
||||
22
server/src/interfaces/Resource.ts
Normal file
22
server/src/interfaces/Resource.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
|
||||
export interface IResource {
|
||||
id: number,
|
||||
key: string,
|
||||
}
|
||||
|
||||
export interface IResourceField {
|
||||
labelName: string,
|
||||
key: string,
|
||||
dataType: string,
|
||||
helpText?: string | null,
|
||||
default?: string,
|
||||
predefined: boolean,
|
||||
active: boolean,
|
||||
builtin: boolean,
|
||||
columnable: boolean,
|
||||
index: number,
|
||||
dataResource: string,
|
||||
resourceId: number,
|
||||
options: any;
|
||||
}
|
||||
24
server/src/interfaces/View.ts
Normal file
24
server/src/interfaces/View.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
export interface IView {
|
||||
id: number,
|
||||
name: string,
|
||||
predefined: boolean,
|
||||
resourceId: number,
|
||||
favourite: boolean,
|
||||
rolesLogicRxpression: string,
|
||||
};
|
||||
|
||||
export interface IViewRole {
|
||||
id: number,
|
||||
fieldId: number,
|
||||
index: number,
|
||||
comparator: string,
|
||||
value: string,
|
||||
viewId: number,
|
||||
};
|
||||
|
||||
export interface IViewHasColumn {
|
||||
viewId: number,
|
||||
fieldId: number,
|
||||
index: number,
|
||||
}
|
||||
@@ -1,153 +1,22 @@
|
||||
import { IInventoryTransaction, IInventoryLotCost } from './InventoryTransaction';
|
||||
import {
|
||||
IBillPaymentEntry,
|
||||
IBillPayment,
|
||||
IBillPaymentOTD,
|
||||
} from './BillPayment';
|
||||
import { IInventoryCostMethod } from './InventoryCostMethod';
|
||||
import { IItemEntry } from './ItemEntry';
|
||||
import { IItem } from './Item';
|
||||
import { ILicense, ILicensesFilter } from './License';
|
||||
import { IItemCategory, IItemCategoryOTD } from './ItemCategory';
|
||||
import {
|
||||
IPaymentModel,
|
||||
ILicensePaymentModel,
|
||||
IPaymentMethod,
|
||||
ILicensePaymentMethod,
|
||||
IPaymentContext,
|
||||
} from './Payment';
|
||||
import {
|
||||
ISaleInvoice,
|
||||
ISaleInvoiceOTD,
|
||||
} from './SaleInvoice';
|
||||
import {
|
||||
IPaymentReceive,
|
||||
IPaymentReceiveOTD,
|
||||
} from './PaymentReceive';
|
||||
import {
|
||||
ISaleEstimate,
|
||||
ISaleEstimateOTD,
|
||||
} from './SaleEstimate';
|
||||
import {
|
||||
IRegisterDTO,
|
||||
} from './Register';
|
||||
import {
|
||||
ISystemUser,
|
||||
ISystemUserDTO,
|
||||
IInviteUserInput,
|
||||
} from './User';
|
||||
import {
|
||||
IMetadata,
|
||||
IMetaQuery,
|
||||
IMetableStore,
|
||||
IMetableStoreStorage,
|
||||
} from './Metable';
|
||||
import {
|
||||
IOptionDTO,
|
||||
IOptionsDTO,
|
||||
} from './Options';
|
||||
import {
|
||||
IAccount,
|
||||
IAccountDTO,
|
||||
} from './Account';
|
||||
import {
|
||||
IJournalEntry,
|
||||
IJournalPoster,
|
||||
TEntryType,
|
||||
IAccountChange,
|
||||
IAccountsChange,
|
||||
} from './Journal';
|
||||
import {
|
||||
IContactAddress,
|
||||
IContact,
|
||||
IContactNewDTO,
|
||||
IContactEditDTO,
|
||||
ICustomer,
|
||||
ICustomerNewDTO,
|
||||
ICustomerEditDTO,
|
||||
} from './Contact';
|
||||
import {
|
||||
IExpense,
|
||||
IExpenseCategory,
|
||||
IExpenseDTO,
|
||||
IExpenseCategoryDTO,
|
||||
IExpensesService,
|
||||
} from './Expenses';
|
||||
import {
|
||||
ITenant,
|
||||
ITenantDBManager,
|
||||
ITenantManager,
|
||||
ISystemService,
|
||||
} from './Tenancy';
|
||||
|
||||
export {
|
||||
IAccount,
|
||||
IAccountDTO,
|
||||
|
||||
IBillPaymentEntry,
|
||||
IBillPayment,
|
||||
IBillPaymentOTD,
|
||||
|
||||
IInventoryTransaction,
|
||||
IInventoryLotCost,
|
||||
IInventoryCostMethod,
|
||||
IItemEntry,
|
||||
IItem,
|
||||
ILicense,
|
||||
ILicensesFilter,
|
||||
IItemCategory,
|
||||
IItemCategoryOTD,
|
||||
|
||||
IPaymentModel,
|
||||
IPaymentMethod,
|
||||
IPaymentContext,
|
||||
ILicensePaymentModel,
|
||||
ILicensePaymentMethod,
|
||||
|
||||
ISaleInvoice,
|
||||
ISaleInvoiceOTD,
|
||||
|
||||
ISaleEstimate,
|
||||
ISaleEstimateOTD,
|
||||
|
||||
IPaymentReceive,
|
||||
IPaymentReceiveOTD,
|
||||
|
||||
IRegisterDTO,
|
||||
ISystemUser,
|
||||
ISystemUserDTO,
|
||||
IInviteUserInput,
|
||||
|
||||
IMetadata,
|
||||
IMetaQuery,
|
||||
IMetableStore,
|
||||
IMetableStoreStorage,
|
||||
|
||||
IOptionDTO,
|
||||
IOptionsDTO,
|
||||
|
||||
IJournalEntry,
|
||||
IJournalPoster,
|
||||
TEntryType,
|
||||
IAccountChange,
|
||||
IAccountsChange,
|
||||
|
||||
IContactAddress,
|
||||
IContact,
|
||||
IContactNewDTO,
|
||||
IContactEditDTO,
|
||||
ICustomer,
|
||||
ICustomerNewDTO,
|
||||
ICustomerEditDTO,
|
||||
|
||||
IExpense,
|
||||
IExpenseCategory,
|
||||
IExpenseDTO,
|
||||
IExpenseCategoryDTO,
|
||||
IExpensesService,
|
||||
|
||||
ITenant,
|
||||
ITenantDBManager,
|
||||
ITenantManager,
|
||||
ISystemService,
|
||||
};
|
||||
export * from './InventoryTransaction';
|
||||
export * from './BillPayment';
|
||||
export * from './InventoryCostMethod';
|
||||
export * from './ItemEntry';
|
||||
export * from './Item';
|
||||
export * from './License';
|
||||
export * from './ItemCategory';
|
||||
export * from './Payment';
|
||||
export * from './SaleInvoice';
|
||||
export * from './PaymentReceive';
|
||||
export * from './SaleEstimate';
|
||||
export * from './Register';
|
||||
export * from './User';
|
||||
export * from './Metable';
|
||||
export * from './Options';
|
||||
export * from './Account';
|
||||
export * from './DynamicFilter';
|
||||
export * from './Journal';
|
||||
export * from './Contact';
|
||||
export * from './Expenses';
|
||||
export * from './Tenancy';
|
||||
export * from './View';
|
||||
|
||||
Reference in New Issue
Block a user