mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
Merge pull request #636 from bigcapitalhq/expand-export-page-size
fix: Expand the resources export page size limitation
This commit is contained in:
@@ -2,6 +2,7 @@ import { Inject, Service } from 'typedi';
|
||||
import { AccountsApplication } from './AccountsApplication';
|
||||
import { Exportable } from '../Export/Exportable';
|
||||
import { IAccountsFilter, IAccountsStructureType } from '@/interfaces';
|
||||
import { EXPORT_SIZE_LIMIT } from '../Export/constants';
|
||||
|
||||
@Service()
|
||||
export class AccountsExportable extends Exportable {
|
||||
@@ -20,7 +21,7 @@ export class AccountsExportable extends Exportable {
|
||||
inactiveMode: false,
|
||||
...query,
|
||||
structure: IAccountsStructureType.Flat,
|
||||
pageSize: 12000,
|
||||
pageSize: EXPORT_SIZE_LIMIT,
|
||||
page: 1,
|
||||
} as IAccountsFilter;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Inject, Service } from 'typedi';
|
||||
import { IItemsFilter } from '@/interfaces';
|
||||
import { CustomersApplication } from './CustomersApplication';
|
||||
import { Exportable } from '@/services/Export/Exportable';
|
||||
import { EXPORT_SIZE_LIMIT } from '@/services/Export/constants';
|
||||
|
||||
@Service()
|
||||
export class CustomersExportable extends Exportable {
|
||||
@@ -17,9 +18,9 @@ export class CustomersExportable extends Exportable {
|
||||
const parsedQuery = {
|
||||
sortOrder: 'DESC',
|
||||
columnSortBy: 'created_at',
|
||||
page: 1,
|
||||
...query,
|
||||
pageSize: 12,
|
||||
page: 1,
|
||||
pageSize: EXPORT_SIZE_LIMIT,
|
||||
} as IItemsFilter;
|
||||
|
||||
return this.customersApplication
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Inject, Service } from 'typedi';
|
||||
import { IItemsFilter } from '@/interfaces';
|
||||
import { Exportable } from '@/services/Export/Exportable';
|
||||
import { VendorsApplication } from './VendorsApplication';
|
||||
import { EXPORT_SIZE_LIMIT } from '@/services/Export/constants';
|
||||
|
||||
@Service()
|
||||
export class VendorsExportable extends Exportable {
|
||||
@@ -17,9 +18,9 @@ export class VendorsExportable extends Exportable {
|
||||
const parsedQuery = {
|
||||
sortOrder: 'DESC',
|
||||
columnSortBy: 'created_at',
|
||||
page: 1,
|
||||
...query,
|
||||
pageSize: 12,
|
||||
page: 1,
|
||||
pageSize: EXPORT_SIZE_LIMIT,
|
||||
} as IItemsFilter;
|
||||
|
||||
return this.vendorsApplication
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Inject, Service } from 'typedi';
|
||||
import { Exportable } from '../Export/Exportable';
|
||||
import { IExpensesFilter } from '@/interfaces';
|
||||
import { ExpensesApplication } from './ExpensesApplication';
|
||||
import { EXPORT_SIZE_LIMIT } from '../Export/constants';
|
||||
|
||||
@Service()
|
||||
export class ExpensesExportable extends Exportable {
|
||||
@@ -19,7 +20,7 @@ export class ExpensesExportable extends Exportable {
|
||||
columnSortBy: 'created_at',
|
||||
...query,
|
||||
page: 1,
|
||||
pageSize: 12000,
|
||||
pageSize: EXPORT_SIZE_LIMIT,
|
||||
} as IExpensesFilter;
|
||||
|
||||
return this.expensesApplication
|
||||
|
||||
1
packages/server/src/services/Export/constants.ts
Normal file
1
packages/server/src/services/Export/constants.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const EXPORT_SIZE_LIMIT = 9999999;
|
||||
@@ -2,6 +2,7 @@ import { Inject, Service } from 'typedi';
|
||||
import { Exportable } from '../Export/Exportable';
|
||||
import { IItemsFilter } from '@/interfaces';
|
||||
import { ItemsApplication } from './ItemsApplication';
|
||||
import { EXPORT_SIZE_LIMIT } from '../Export/constants';
|
||||
|
||||
@Service()
|
||||
export class ItemsExportable extends Exportable {
|
||||
@@ -19,7 +20,7 @@ export class ItemsExportable extends Exportable {
|
||||
columnSortBy: 'created_at',
|
||||
page: 1,
|
||||
...query,
|
||||
pageSize: 12,
|
||||
pageSize: EXPORT_SIZE_LIMIT,
|
||||
} as IItemsFilter;
|
||||
|
||||
return this.itemsApplication
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Inject, Service } from 'typedi';
|
||||
import { IManualJournalsFilter } from '@/interfaces';
|
||||
import { Exportable } from '../Export/Exportable';
|
||||
import { ManualJournalsApplication } from './ManualJournalsApplication';
|
||||
import { EXPORT_SIZE_LIMIT } from '../Export/constants';
|
||||
|
||||
@Service()
|
||||
export class ManualJournalsExportable extends Exportable {
|
||||
@@ -19,7 +20,7 @@ export class ManualJournalsExportable extends Exportable {
|
||||
columnSortBy: 'created_at',
|
||||
...query,
|
||||
page: 1,
|
||||
pageSize: 12000,
|
||||
pageSize: EXPORT_SIZE_LIMIT,
|
||||
} as IManualJournalsFilter;
|
||||
|
||||
return this.manualJournalsApplication
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Inject, Service } from 'typedi';
|
||||
import { Exportable } from '@/services/Export/Exportable';
|
||||
import { BillPaymentsApplication } from './BillPaymentsApplication';
|
||||
import { EXPORT_SIZE_LIMIT } from '@/services/Export/constants';
|
||||
|
||||
@Service()
|
||||
export class BillPaymentExportable extends Exportable {
|
||||
@@ -14,11 +15,11 @@ export class BillPaymentExportable extends Exportable {
|
||||
*/
|
||||
public exportable(tenantId: number, query: any) {
|
||||
const parsedQuery = {
|
||||
page: 1,
|
||||
pageSize: 12,
|
||||
...query,
|
||||
sortOrder: 'desc',
|
||||
columnSortBy: 'created_at',
|
||||
...query,
|
||||
page: 1,
|
||||
pageSize: EXPORT_SIZE_LIMIT,
|
||||
} as any;
|
||||
|
||||
return this.billPaymentsApplication
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Inject, Service } from 'typedi';
|
||||
import { IBillsFilter } from '@/interfaces';
|
||||
import { Exportable } from '@/services/Export/Exportable';
|
||||
import { BillsApplication } from './BillsApplication';
|
||||
import { EXPORT_SIZE_LIMIT } from '@/services/Export/constants';
|
||||
|
||||
@Service()
|
||||
export class BillsExportable extends Exportable {
|
||||
@@ -19,7 +20,7 @@ export class BillsExportable extends Exportable {
|
||||
columnSortBy: 'created_at',
|
||||
...query,
|
||||
page: 1,
|
||||
pageSize: 12000,
|
||||
pageSize: EXPORT_SIZE_LIMIT,
|
||||
} as IBillsFilter;
|
||||
|
||||
return this.billsApplication
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Inject, Service } from 'typedi';
|
||||
import { ISalesInvoicesFilter } from '@/interfaces';
|
||||
import { Exportable } from '@/services/Export/Exportable';
|
||||
import { SaleEstimatesApplication } from './SaleEstimatesApplication';
|
||||
import { EXPORT_SIZE_LIMIT } from '@/services/Export/constants';
|
||||
|
||||
@Service()
|
||||
export class SaleEstimatesExportable extends Exportable {
|
||||
@@ -19,7 +20,7 @@ export class SaleEstimatesExportable extends Exportable {
|
||||
columnSortBy: 'created_at',
|
||||
...query,
|
||||
page: 1,
|
||||
pageSize: 12000,
|
||||
pageSize: EXPORT_SIZE_LIMIT,
|
||||
} as ISalesInvoicesFilter;
|
||||
|
||||
return this.saleEstimatesApplication
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Inject, Service } from 'typedi';
|
||||
import { ISalesInvoicesFilter } from '@/interfaces';
|
||||
import { SaleInvoiceApplication } from './SaleInvoicesApplication';
|
||||
import { Exportable } from '@/services/Export/Exportable';
|
||||
import { EXPORT_SIZE_LIMIT } from '@/services/Export/constants';
|
||||
|
||||
@Service()
|
||||
export class SaleInvoicesExportable extends Exportable {
|
||||
@@ -19,7 +20,7 @@ export class SaleInvoicesExportable extends Exportable {
|
||||
columnSortBy: 'created_at',
|
||||
...query,
|
||||
page: 1,
|
||||
pageSize: 120000,
|
||||
pageSize: EXPORT_SIZE_LIMIT,
|
||||
} as ISalesInvoicesFilter;
|
||||
|
||||
return this.saleInvoicesApplication
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Inject, Service } from 'typedi';
|
||||
import { IAccountsStructureType, IPaymentsReceivedFilter } from '@/interfaces';
|
||||
import { Exportable } from '@/services/Export/Exportable';
|
||||
import { PaymentReceivesApplication } from './PaymentReceivedApplication';
|
||||
import { EXPORT_SIZE_LIMIT } from '@/services/Export/constants';
|
||||
|
||||
@Service()
|
||||
export class PaymentsReceivedExportable extends Exportable {
|
||||
@@ -21,6 +22,8 @@ export class PaymentsReceivedExportable extends Exportable {
|
||||
inactiveMode: false,
|
||||
...query,
|
||||
structure: IAccountsStructureType.Flat,
|
||||
page: 1,
|
||||
pageSize: EXPORT_SIZE_LIMIT,
|
||||
} as IPaymentsReceivedFilter;
|
||||
|
||||
return this.paymentReceivedApp
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Inject, Service } from 'typedi';
|
||||
import { ISalesReceiptsFilter } from '@/interfaces';
|
||||
import { Exportable } from '@/services/Export/Exportable';
|
||||
import { SaleReceiptApplication } from './SaleReceiptApplication';
|
||||
import { EXPORT_SIZE_LIMIT } from '@/services/Export/constants';
|
||||
|
||||
@Service()
|
||||
export class SaleReceiptsExportable extends Exportable {
|
||||
@@ -19,7 +20,7 @@ export class SaleReceiptsExportable extends Exportable {
|
||||
columnSortBy: 'created_at',
|
||||
...query,
|
||||
page: 1,
|
||||
pageSize: 12,
|
||||
pageSize: EXPORT_SIZE_LIMIT,
|
||||
} as ISalesReceiptsFilter;
|
||||
|
||||
return this.saleReceiptsApp
|
||||
|
||||
Reference in New Issue
Block a user