Skip to content

Commit 66b7b70

Browse files
authored
Merge pull request #89 from sourcefuse/GH-88
fix(arc-saas): adding new column in onboading list page n in plan list
2 parents c47667f + 61ff10f commit 66b7b70

File tree

2 files changed

+27
-7
lines changed

2 files changed

+27
-7
lines changed

projects/saas-ui/src/app/main/components/manage-plans/manage-plans.component.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export class ManagePlansComponent extends RouteComponentBaseDirective {
3434
{field: 'description', width: 200, minWidth: 20},
3535
{field: 'cycleName', width: 250, minWidth: 20},
3636
{field: 'currencyName', width: 250, minWidth: 20},
37+
{field: 'tier', headerName: 'Tier', width: 250, minWidth: 20},
3738
{field: 'price', width: 250, minWidth: 20},
3839
{
3940
field: 'actions',
@@ -106,13 +107,12 @@ export class ManagePlansComponent extends RouteComponentBaseDirective {
106107
id: item.id,
107108
name: item.name,
108109
description: item.description,
109-
cycleName: item['billingCycle']?.cycleName,
110-
111-
currencyName: item['currency']?.currencyName,
112-
113-
price: item.price,
114-
};
115-
});
110+
cycleName: item['billingCycle']?.cycleName,
111+
currencyName: item['currency']?.currencyName,
112+
tier: item.tier,
113+
price: item.price,
114+
};
115+
});
116116

117117
return rows;
118118
} catch (error) {

projects/saas-ui/src/app/main/components/onboarding-tenant-list/onboarding-tenant-list.component.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ export class OnboardingTenantListComponent extends RouteComponentBaseDirective {
3737
floatingFilter: true,
3838
resizable: true,
3939
};
40+
tierOptions = [
41+
{name: 'Basic', value: 'BASIC'},
42+
{name: 'Standard', value: 'STANDARD'},
43+
{name: 'Premium', value: 'PREMIUM'},
44+
];
4045

4146
constructor(
4247
protected override readonly location: Location,
@@ -106,6 +111,15 @@ export class OnboardingTenantListComponent extends RouteComponentBaseDirective {
106111
filter: 'agTextColumnFilter',
107112
floatingFilter: true,
108113
},
114+
{
115+
field: 'tier',
116+
headerName: 'Tier',
117+
minWidth: 120,
118+
flex: 1,
119+
filter: 'agTextColumnFilter',
120+
floatingFilter: true,
121+
cellStyle: {textAlign: 'center'}, // Optional styling for the column
122+
},
109123
{
110124
field: 'status',
111125
headerName: 'Subscription Status',
@@ -186,6 +200,11 @@ export class OnboardingTenantListComponent extends RouteComponentBaseDirective {
186200
.filter(ele => ele != null && ele.trim() != '')
187201
.join(' ');
188202

203+
const displayTier =
204+
this.tierOptions.find(
205+
option => option.value === item.subscription.plan.tier,
206+
)?.name || '';
207+
189208
return {
190209
id: item.id,
191210
name: item.name,
@@ -194,6 +213,7 @@ export class OnboardingTenantListComponent extends RouteComponentBaseDirective {
194213
key: item.key,
195214
address: addressString,
196215
planName: item.subscription?.plan.name,
216+
tier: displayTier,
197217
status: TenantStatus[item.status],
198218
startDate: item.subscription?.startDate
199219
? new Date(item.subscription.startDate).toLocaleDateString()

0 commit comments

Comments
 (0)