Skip to content

Commit 8eaf663

Browse files
committed
Fix as per review comments
1 parent b7a7c55 commit 8eaf663

File tree

6 files changed

+27
-39
lines changed

6 files changed

+27
-39
lines changed

src-ts/lib/form/form-groups/form-card-set/FormCardSet.module.scss

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,6 @@
6868
line-height: $space-mx;
6969
}
7070

71-
.body-medium-bold {
72-
font-weight: 700;
73-
font-size: $space-xxl;
74-
font-family: "Roboto";
75-
padding: 0;
76-
line-height: calc($space-xxl - 2px);
77-
}
78-
7971
&.feature {
8072
visibility: hidden;
8173

@@ -92,12 +84,6 @@
9284
margin-top: $space-sm;
9385
margin-bottom: $space-xxl;
9486
}
95-
96-
.body-medium-bold {
97-
font-size: $space-xl;
98-
line-height: $space-xxxxl;
99-
font-style: normal;
100-
}
10187
}
10288
}
10389

@@ -178,10 +164,18 @@
178164
cursor: pointer;
179165
outline: none;
180166
}
167+
168+
.check-icon {
169+
@include icon-xxl;
170+
@include ltemd {
171+
@include icon-lg;
172+
}
173+
}
181174
}
182175
}
183176
&.mobile {
184177
margin-bottom: 0;
178+
margin-top: $space-xxl;
185179
.feature-name {
186180
width: 100%;
187181
}
@@ -215,14 +209,12 @@
215209
}
216210

217211
svg.card-row-icon {
218-
height: 24px;
219-
width: 24px;
212+
@include icon-xxl;
220213
display: inline;
221214
margin-right: 6px;
222215

223216
@include ltemd {
224-
height: 16px;
225-
width: 16px;
217+
@include icon-lg;
226218
}
227219
}
228220
}

src-ts/lib/form/form-groups/form-card-set/FormCardSet.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const FormCardSet: React.FC<FormCardSetProps> = ({ name, cards, onChange, value
4949
<div key={`card-${index}`}className={cn(styles['card'], selected && styles['selected'], isMobile && card.mostPopular && styles['mobile-popular'], { [styles.feature]: index === 0, [styles.mobile]: isMobile })}>
5050
{ card.mostPopular && <div className={styles['popular-card']}>MOST POPULAR</div>}
5151
<div className={cn(styles['card-header'], isMobile && styles['mobile'], { [styles.feature]: index === 0 })}>
52-
<div className={styles['body-medium-bold']}>{card.title}</div>
52+
<div className='body-large-bold'>{card.title}</div>
5353
<h3>{formattedPrice}</h3>
5454
{getButton(card, selected)}
5555
</div>
@@ -77,7 +77,7 @@ const FormCardSet: React.FC<FormCardSetProps> = ({ name, cards, onChange, value
7777
{(
7878
<span className={cn(styles['card-row-col'], styles['center'])}>
7979
{ row.valueIcon ?
80-
<IconOutline.CheckIcon width={28} height={20} /> :
80+
<IconOutline.CheckIcon className={styles['check-icon']} /> :
8181
<span className='body-main'>{row.text}</span>
8282
}
8383
</span>

src-ts/tools/work/work-detail-details/work-detail-details-pane/WorkDetailDetailsPane.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { Dispatch, FC, SetStateAction, useEffect, useState } from 'react'
44
import { Link } from 'react-router-dom'
55

66
import { ArrowIcon, LoadingSpinner } from '../../../../lib'
7-
import getSelectedPackageFormatted from '../../../../utils/bug-hunt'
87
import { ChallengeMetadataName, workFactoryMapFormData } from '../../work-lib'
8+
import { getSelectedPackageFormatted } from '../../work-lib/work-provider/work-functions/work.functions'
99

1010
import styles from './WorkDetailDetailsPane.module.scss'
1111

src-ts/tools/work/work-lib/work-provider/work-functions/work-factory/work.factory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import moment from 'moment'
22

3-
import getSelectedPackageFormatted from '../../../../../../utils/bug-hunt'
43
import { WorkConfigConstants, WorkStrings } from '../../../work-constants'
54
import {
65
ActivateWorkRequest,
@@ -26,6 +25,7 @@ import {
2625
WorkTypeCategory,
2726
WorkTypeConfig,
2827
} from '../work-store'
28+
import { getSelectedPackageFormatted } from '../work.functions'
2929

3030
export interface FormDetail {
3131
key: string,

src-ts/tools/work/work-lib/work-provider/work-functions/work.functions.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { PaymentMethodResult, Stripe, StripeCardNumberElement } from '@stripe/stripe-js'
22

3-
import { Page, UserProfile } from '../../../../../lib'
3+
import { FormCard, Page, textFormatMoneyLocaleString, UserProfile } from '../../../../../lib'
4+
import BugHuntPricingConfig from '../../../work-self-service/intake-forms/bug-hunt/bug-hunt.form.pricing-config'
45

56
import { WorkByStatus } from './work-by-status.model'
67
import {
@@ -171,3 +172,14 @@ async function getPageAsync(handle: string, page: Page): Promise<Array<Work>> {
171172
.map(challenge => workFactoryCreate(challenge, workGetPricesConfig()))
172173
.filter(work => work.status !== WorkStatus.deleted && work.type !== WorkType.unknown)
173174
}
175+
176+
export function getSelectedPackageFormatted(packageId: string): string {
177+
const currentPackage: FormCard | undefined = BugHuntPricingConfig.find((pricingConfig) => pricingConfig.id === packageId)
178+
if (currentPackage) {
179+
const deviceType: string = currentPackage.sections?.[0]?.rows?.[3]?.text || ''
180+
const noOfTesters: string = `${currentPackage.sections?.[0]?.rows?.[2]?.text || 0} testers`
181+
return `${currentPackage.title} - ${textFormatMoneyLocaleString(currentPackage.price)} - ${deviceType} - ${noOfTesters}`
182+
}
183+
184+
return packageId
185+
}

src-ts/utils/bug-hunt/index.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)