Skip to content

Commit 1858700

Browse files
author
manasa
committed
updated as per comments
1 parent 9376294 commit 1858700

File tree

2 files changed

+65
-62
lines changed

2 files changed

+65
-62
lines changed

src/app/_samples/mediaco/components/quick-create/quick-create.component.ts

Lines changed: 3 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { Utils } from '@pega/angular-sdk-components';
4+
import { getQuicklinksData } from './quick-create.utils';
45

56
interface QuickCreateProps {
67
// If any, enter additional props that only exist on this component
@@ -25,66 +26,6 @@ export class QuickCreateComponent implements OnInit, OnChanges {
2526
showCaseIcons$?: boolean;
2627
classFilter$: any;
2728
cases$: any = [];
28-
allCards: any[] = [
29-
{
30-
title: 'Plan Upgrade',
31-
description:
32-
'Take your experience to the next level by upgrading your current plan. This portal allows you to easily compare different subscription tiers, review the additional benefits and features of each, and select the upgrade that best suits your needs. The process is quick, and your new features will be available almost instantly.',
33-
icon: this.utils.getImageSrc('trending-up', this.utils.getSDKStaticContentUrl()),
34-
bgClass: 'bg-purple',
35-
iconBgClass: 'icon-purple',
36-
gradient: 'linear-gradient(135deg, #6750A4 0%, #8A7CC7 100%)',
37-
accentColor: '#6750A4'
38-
},
39-
{
40-
title: 'Purchase Phone',
41-
description: 'Browse and purchase the latest mobile phones. This feature allows you to select a new device and complete your order online.',
42-
icon: this.utils.getImageSrc('smartphone', this.utils.getSDKStaticContentUrl()),
43-
bgClass: 'bg-pink',
44-
iconBgClass: 'icon-pink',
45-
gradient: 'linear-gradient(135deg, #F814E3 0%, #FF6B9D 100%)',
46-
accentColor: '#F814E3'
47-
},
48-
{
49-
title: 'New Service',
50-
description:
51-
'Discover and initiate new services tailored to your needs. This portal provides a streamlined process to browse our service catalog, select the service you require, and submit a request. You will be guided through the necessary steps to provide details and complete your application efficiently.',
52-
icon: this.utils.getImageSrc('shopping-cart', this.utils.getSDKStaticContentUrl()),
53-
bgClass: 'bg-cyan',
54-
iconBgClass: 'icon-cyan',
55-
gradient: 'linear-gradient(135deg, #00C9FF 0%, #92FE9D 100%)',
56-
accentColor: '#00C9FF'
57-
},
58-
{
59-
title: 'Add-on Services',
60-
description:
61-
'Enhance your current plan by adding optional services and features. This portal allows you to browse a catalog of available add-ons—from extra storage to premium content—and activate them instantly on your account to tailor your experience to your specific needs.',
62-
icon: this.utils.getImageSrc('monitor', this.utils.getSDKStaticContentUrl()),
63-
bgClass: 'bg-orange',
64-
iconBgClass: 'icon-orange',
65-
gradient: 'linear-gradient(135deg, #FF6B35 0%, #F7931E 100%)',
66-
accentColor: '#FF6B35'
67-
},
68-
{
69-
title: 'Make Payment',
70-
description:
71-
'Conveniently manage and pay your bills online at any time. Our secure portal allows you to make one-time payments, schedule future payments, or enroll in AutoPay for automatic deductions. You can view your current balance and payment history, and choose to go paperless with electronic billing. Supported payment methods include credit/debit cards and eChecks',
72-
icon: this.utils.getImageSrc('wallet', this.utils.getSDKStaticContentUrl()),
73-
bgClass: 'bg-magenta',
74-
iconBgClass: 'icon-magenta',
75-
gradient: 'linear-gradient(135deg, #8A0786 0%, #C70BB5 100%)',
76-
accentColor: '#8A0786'
77-
},
78-
{
79-
title: 'Get Help',
80-
description: "Find answers quickly or connect with our support team for assistance. We're here to help you resolve any issue.",
81-
icon: this.utils.getImageSrc('headphones', this.utils.getSDKStaticContentUrl()),
82-
bgClass: 'bg-magenta',
83-
iconBgClass: 'icon-magenta',
84-
gradient: 'linear-gradient(135deg, #D0BCFF 0%, #EFB8C8 100%)',
85-
accentColor: '#D0BCFF'
86-
}
87-
];
8829
constructor(private utils: Utils) {}
8930

9031
ngOnInit() {
@@ -159,8 +100,8 @@ export class QuickCreateComponent implements OnInit, OnChanges {
159100
} else {
160101
this.cases$ = defaultCases;
161102
}
162-
163-
const cardMap = new Map(this.allCards.map(card => [card.title, card]));
103+
const cardsData = getQuicklinksData(this.utils);
104+
const cardMap = new Map(cardsData.map(card => [card.title, card]));
164105

165106
const mergedCases = this.cases$.map(caseItem => {
166107
const matchingCard = cardMap.get(caseItem.label);
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import { Utils } from '@pega/angular-sdk-components';
2+
3+
export const getQuicklinksData = (utils: Utils) => [
4+
{
5+
title: 'Plan Upgrade',
6+
description:
7+
'Take your experience to the next level by upgrading your current plan. This portal allows you to easily compare different subscription tiers, review the additional benefits and features of each, and select the upgrade that best suits your needs. The process is quick, and your new features will be available almost instantly.',
8+
icon: utils.getImageSrc('trending-up', utils.getSDKStaticContentUrl()),
9+
bgClass: 'bg-purple',
10+
iconBgClass: 'icon-purple',
11+
gradient: 'linear-gradient(135deg, #6750A4 0%, #8A7CC7 100%)',
12+
accentColor: '#6750A4'
13+
},
14+
{
15+
title: 'Purchase Phone',
16+
description: 'Browse and purchase the latest mobile phones. This feature allows you to select a new device and complete your order online.',
17+
icon: utils.getImageSrc('smartphone', utils.getSDKStaticContentUrl()),
18+
bgClass: 'bg-pink',
19+
iconBgClass: 'icon-pink',
20+
gradient: 'linear-gradient(135deg, #F814E3 0%, #FF6B9D 100%)',
21+
accentColor: '#F814E3'
22+
},
23+
{
24+
title: 'New Service',
25+
description:
26+
'Discover and initiate new services tailored to your needs. This portal provides a streamlined process to browse our service catalog, select the service you require, and submit a request. You will be guided through the necessary steps to provide details and complete your application efficiently.',
27+
icon: utils.getImageSrc('shopping-cart', utils.getSDKStaticContentUrl()),
28+
bgClass: 'bg-cyan',
29+
iconBgClass: 'icon-cyan',
30+
gradient: 'linear-gradient(135deg, #00C9FF 0%, #92FE9D 100%)',
31+
accentColor: '#00C9FF'
32+
},
33+
{
34+
title: 'Add-on Services',
35+
description:
36+
'Enhance your current plan by adding optional services and features. This portal allows you to browse a catalog of available add-ons—from extra storage to premium content—and activate them instantly on your account to tailor your experience to your specific needs.',
37+
icon: utils.getImageSrc('monitor', utils.getSDKStaticContentUrl()),
38+
bgClass: 'bg-orange',
39+
iconBgClass: 'icon-orange',
40+
gradient: 'linear-gradient(135deg, #FF6B35 0%, #F7931E 100%)',
41+
accentColor: '#FF6B35'
42+
},
43+
{
44+
title: 'Make Payment',
45+
description:
46+
'Conveniently manage and pay your bills online at any time. Our secure portal allows you to make one-time payments, schedule future payments, or enroll in AutoPay for automatic deductions. You can view your current balance and payment history, and choose to go paperless with electronic billing. Supported payment methods include credit/debit cards and eChecks',
47+
icon: utils.getImageSrc('wallet', utils.getSDKStaticContentUrl()),
48+
bgClass: 'bg-magenta',
49+
iconBgClass: 'icon-magenta',
50+
gradient: 'linear-gradient(135deg, #8A0786 0%, #C70BB5 100%)',
51+
accentColor: '#8A0786'
52+
},
53+
{
54+
title: 'Get Help',
55+
description: "Find answers quickly or connect with our support team for assistance. We're here to help you resolve any issue.",
56+
icon: utils.getImageSrc('headphones', utils.getSDKStaticContentUrl()),
57+
bgClass: 'bg-magenta',
58+
iconBgClass: 'icon-magenta',
59+
gradient: 'linear-gradient(135deg, #D0BCFF 0%, #EFB8C8 100%)',
60+
accentColor: '#D0BCFF'
61+
}
62+
];

0 commit comments

Comments
 (0)