From 8aa476909bee09f3c2d44e7cdd714edeee418cdc Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Mon, 6 Jul 2026 20:57:47 +0200 Subject: [PATCH] Task/extend coupons with createdAt (#7257) * Extend coupons with createdAt --- .../admin-overview.component.ts | 8 ++++++- .../admin-overview/admin-overview.html | 22 +++++++++++++++++++ .../src/lib/interfaces/coupon.interface.ts | 3 ++- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/apps/client/src/app/components/admin-overview/admin-overview.component.ts b/apps/client/src/app/components/admin-overview/admin-overview.component.ts index b2c9b11a3..7374fb05c 100644 --- a/apps/client/src/app/components/admin-overview/admin-overview.component.ts +++ b/apps/client/src/app/components/admin-overview/admin-overview.component.ts @@ -90,7 +90,12 @@ export class GfAdminOverviewComponent implements OnInit { protected activitiesCount: number; protected couponDuration: StringValue = '14 days'; protected readonly couponsDataSource = new MatTableDataSource(); - protected readonly couponsDisplayedColumns = ['code', 'duration', 'actions']; + protected readonly couponsDisplayedColumns = [ + 'code', + 'duration', + 'createdAt', + 'actions' + ]; protected hasPermissionForSubscription: boolean; protected hasPermissionForSystemMessage: boolean; protected hasPermissionToSyncDemoUserAccount: boolean; @@ -201,6 +206,7 @@ export class GfAdminOverviewComponent implements OnInit { protected onAddCoupon() { const newCoupon: Coupon = { code: `${ghostfolioPrefix}${this.generateCouponCode(14)}`, + createdAt: new Date().toISOString(), duration: this.couponDuration }; diff --git a/apps/client/src/app/components/admin-overview/admin-overview.html b/apps/client/src/app/components/admin-overview/admin-overview.html index bccedd251..2fde94083 100644 --- a/apps/client/src/app/components/admin-overview/admin-overview.html +++ b/apps/client/src/app/components/admin-overview/admin-overview.html @@ -180,6 +180,28 @@ + + + Creation + + + @if (element.createdAt) { + + } @else { + - + } + + +