From 40f5d6745afe3e3b9c02a8d12f9204e8e5890760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=20Jurmanovi=C4=87?= Date: Sun, 20 Jun 2021 12:04:29 +0200 Subject: [PATCH] display dates in table --- .../app-pagination/AppPaginationElement.ts | 7 ++++--- src/components/input-field/InputFieldElement.ts | 15 +++++++++++++++ .../SubscriptionCreateElement.ts | 17 ++++++++++++++++- .../TransactionCreateElement.ts | 17 ++++++++++++++++- 4 files changed, 51 insertions(+), 5 deletions(-) diff --git a/src/components/app-pagination/AppPaginationElement.ts b/src/components/app-pagination/AppPaginationElement.ts index ff75c53..11aa89e 100644 --- a/src/components/app-pagination/AppPaginationElement.ts +++ b/src/components/app-pagination/AppPaginationElement.ts @@ -2,6 +2,7 @@ import { attr, controller, target } from '@github/catalyst'; import { html, TemplateResult } from 'core/utils'; import { BaseComponentElement } from 'common/'; import { CircleLoaderElement } from 'components/circle-loader/CircleLoaderElement'; +import dayjs from 'dayjs'; @controller class AppPaginationElement extends BaseComponentElement { @@ -36,7 +37,7 @@ class AppPaginationElement extends BaseComponentElement { this.fetchFunc = fetchFunc; if (autoInit) { const options = { - rpp: this.rpp || 5, + rpp: this.rpp || 10, page: this.page || 1, }; this.executeFetch(options); @@ -100,7 +101,7 @@ class AppPaginationElement extends BaseComponentElement { const renderItem = this.customRenderItem ? this.customRenderItem : (item, iter) => html` - ${iter + 1 + rpp * (page - 1)} + ${dayjs(item.transactionDate).format("MMM DD 'YY")} ${item.description} - ${totalItems} Total Items + (${items?.length}) / ${totalItems} Total Items