Skip to content

Commit 440c9a8

Browse files
authored
Merge pull request #207 from topcoder-platform/PROD-2580_info-cards-review-page
PROD-2580 info cards in review page -> Intake form
2 parents d40afc0 + 43f9bab commit 440c9a8

File tree

5 files changed

+70
-1
lines changed

5 files changed

+70
-1
lines changed

src-ts/tools/work/work-lib/work-provider/work-functions/work-store/work-type.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export const WorkTypeConfigs: { [workType: string]: WorkTypeConfig } = {
2828
a detailed report of bugs which have steps to reproduce, screenshots / videos if applicable,
2929
details of the bug, and severity of the issue.`,
3030
review: {
31+
aboutYourProjectTitle: 'Important things to know about your project',
3132
subtitle: 'Website Bug Hunt',
3233
title: 'Review & Payment',
3334
type: 'Review & Payment',

src-ts/tools/work/work-lib/work-provider/work-functions/work-store/work-type.model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export interface WorkTypeConfig {
1414
priceConfig: WorkPrice
1515
results: string,
1616
review: {
17+
aboutYourProjectTitle: string,
1718
subtitle: string,
1819
title: string,
1920
type: string,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import React from 'react'
2+
3+
const AboutYourProjectInfoCard: React.FC = () => {
4+
return (
5+
<>
6+
<li>
7+
<strong>
8+
Your Dashboard is your go-to hub for managing your work.
9+
</strong>
10+
&nbsp; From here you can view timelines, details, and other important
11+
information tied to your work submissions.
12+
</li>
13+
<li>
14+
<strong>
15+
You can expect members of our community to ask you questions about
16+
this work.
17+
</strong>
18+
&nbsp; From your Work Summary page you’ll see if you have any
19+
outstanding Messages, indicated by a red icon. Please answer questions
20+
from our members in a timely and thorough manner. This will help them
21+
deliver high quality results for you on time!
22+
</li>
23+
<li>
24+
<strong>
25+
Topcoder experts will curate the best solutions for you.
26+
</strong>
27+
&nbsp; This saves you time and energy wading through submissions that
28+
perhaps aren't of value to you. When your high-quality submissions are
29+
ready, you'll be notified to download your assets, rate your Topcoder
30+
experience, and officially close out this work.
31+
</li>
32+
</>
33+
)
34+
}
35+
36+
export default AboutYourProjectInfoCard
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as AboutYourProjectInfoCard } from './AboutYourProjectInfoCard'

src-ts/tools/work/work-self-service/intake-forms/review/Review.tsx

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import { NavigateFunction, useNavigate, useParams } from 'react-router-dom'
77

88
import { ReactComponent as BackIcon } from '../../../../../../src/assets/images/icon-back-arrow.svg'
99
import { EnvironmentConfig } from '../../../../../config'
10-
import { Button, IconOutline, LoadingSpinner, PageDivider, PaymentForm, profileContext, ProfileContextData } from '../../../../../lib'
10+
import { Button, IconOutline, InfoCard, LoadingSpinner, PageDivider, PaymentForm, profileContext, ProfileContextData } from '../../../../../lib'
11+
import { useCheckIsMobile } from '../../../../../lib/hooks/use-check-is-mobile.hook'
1112
import { WorkDetailDetailsPane } from '../../../work-detail-details'
1213
import {
1314
Challenge,
@@ -20,8 +21,10 @@ import { WorkIntakeFormRoutes } from '../../../work-lib/work-provider/work-funct
2021
import { bugHuntConfig } from '../../../work-lib/work-provider/work-functions/work-store/work-type.config'
2122
import { WorkServicePrice } from '../../../work-service-price'
2223
import { WorkTypeBanner } from '../../../work-type-banner'
24+
import { DeliverablesInfoCard } from '../bug-hunt/deliverables-info-card'
2325
import IntakeFormsBreadcrumb from '../intake-forms-breadcrumb/IntakeFormsBreadcrumb'
2426

27+
import { AboutYourProjectInfoCard } from './AboutYourProjectInfoCard'
2528
import styles from './Review.module.scss'
2629

2730
interface FormFieldValues {
@@ -58,6 +61,7 @@ const Review: React.FC = () => {
5861
const [isLoading, setLoading]: [boolean, Dispatch<SetStateAction<boolean>>] = useState<boolean>(false)
5962
const [isPaymentFailed, setPaymentFailed]: [boolean, Dispatch<SetStateAction<boolean>>] = useState<boolean>(false)
6063
const navigate: NavigateFunction = useNavigate()
64+
const isMobile: boolean = useCheckIsMobile()
6165

6266
const stripe: Stripe | null = useStripe()
6367
const elements: StripeElements | null = useElements()
@@ -244,9 +248,23 @@ const Review: React.FC = () => {
244248

245249
{renderWorkServicePrice()}
246250

251+
<DeliverablesInfoCard isMobile={isMobile} />
252+
247253
<div className={styles['content']}>
248254
<div className={styles['left']}>
249255
<WorkDetailDetailsPane formData={formData} isReviewPage={true} redirectUrl={redirectUrl} collapsible={true} defaultOpen={true} />
256+
{
257+
!isMobile && (
258+
<InfoCard
259+
color='success'
260+
defaultOpen={true}
261+
isCollapsible
262+
title={workBugHuntConfig.review.aboutYourProjectTitle}
263+
>
264+
<AboutYourProjectInfoCard />
265+
</InfoCard>
266+
)
267+
}
250268
</div>
251269
<div className={styles['right']}>
252270
<div className={styles['payment-form-wrapper']}>
@@ -262,6 +280,18 @@ const Review: React.FC = () => {
262280
error={isPaymentFailed}
263281
/>
264282
</div>
283+
{
284+
isMobile && (
285+
<InfoCard
286+
color='success'
287+
defaultOpen={!isMobile}
288+
isCollapsible
289+
title={workBugHuntConfig.review.aboutYourProjectTitle}
290+
>
291+
<AboutYourProjectInfoCard />
292+
</InfoCard>
293+
)
294+
}
265295
</div>
266296
</div>
267297

0 commit comments

Comments
 (0)