From 6163f24268073d2b00f87948c0714437fdaf7cfb Mon Sep 17 00:00:00 2001 From: ShahanaFarooqui Date: Thu, 27 Oct 2022 10:16:18 -0700 Subject: [PATCH] Page setting bug fix --- src/app/lnd/store/lnd.effects.ts | 4 ++-- .../page-settings/page-settings.component.html | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/app/lnd/store/lnd.effects.ts b/src/app/lnd/store/lnd.effects.ts index c6989fbb..ca91fbe0 100644 --- a/src/app/lnd/store/lnd.effects.ts +++ b/src/app/lnd/store/lnd.effects.ts @@ -1200,8 +1200,8 @@ export class LNDEffects implements OnDestroy { map((settings: any) => { this.logger.info(settings); this.store.dispatch(updateLNDAPICallStatus({ payload: { action: 'FetchPageSettings', status: APICallStatusEnum.COMPLETED } })); - this.invoicesPageSize = (settings.find((page) => page.pageId === 'transactions')?.tables.find((table) => table.tableId === 'invoices') || LND_DEFAULT_PAGE_SETTINGS.find((page) => page.pageId === 'transactions')?.tables.find((table) => table.tableId === 'invoices')).recordsPerPage; - this.paymentsPageSize = (settings.find((page) => page.pageId === 'transactions')?.tables.find((table) => table.tableId === 'payments') || LND_DEFAULT_PAGE_SETTINGS.find((page) => page.pageId === 'transactions')?.tables.find((table) => table.tableId === 'payments')).recordsPerPage; + this.invoicesPageSize = (settings ? (settings.find((page) => page.pageId === 'transactions')?.tables.find((table) => table.tableId === 'invoices')) : LND_DEFAULT_PAGE_SETTINGS.find((page) => page.pageId === 'transactions')?.tables.find((table) => table.tableId === 'invoices')).recordsPerPage; + this.paymentsPageSize = (settings ? (settings.find((page) => page.pageId === 'transactions')?.tables.find((table) => table.tableId === 'payments')) : LND_DEFAULT_PAGE_SETTINGS.find((page) => page.pageId === 'transactions')?.tables.find((table) => table.tableId === 'payments')).recordsPerPage; this.store.dispatch(fetchInvoices({ payload: { num_max_invoices: this.invoicesPageSize, reversed: true } })); // this.store.dispatch(fetchPayments({ payload: { max_payments: 100000, reversed: true } })); return { diff --git a/src/app/shared/components/node-config/page-settings/page-settings.component.html b/src/app/shared/components/node-config/page-settings/page-settings.component.html index 8aa2f0ab..1a594fe6 100644 --- a/src/app/shared/components/node-config/page-settings/page-settings.component.html +++ b/src/app/shared/components/node-config/page-settings/page-settings.component.html @@ -11,43 +11,43 @@
- {{table.tableId | camelcaseWithReplace:'_'}}: + {{table.tableId | camelcaseWithReplace:'_'}}: - + {{pageSizeOption}} - + {{field | camelcaseWithReplace:'_'}} - + {{so === 'desc' ? 'Descending' : 'Ascending'}} - + {{field | camelcaseWithReplace:'_'}} - Columns (mobile) should be between 1 and 3 + Column selected (mobile) should be between 1 and 3 - + {{field | camelcaseWithReplace:'_'}} - Column selection should be between 2 and {{tableFieldsDef[page.pageId][table.tableId].maxColumns}} + Number of column selected should be between 2 and {{tableFieldsDef[page.pageId][table.tableId].maxColumns}}