-
Notifications
You must be signed in to change notification settings - Fork 13
TCA-935 homepage integration init #472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kkartunov
merged 2 commits into
TCA-792_tc-certifications-epic
from
TCA-935-homepage-API-integration
Jan 30, 2023
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 8 additions & 5 deletions
13
src-ts/tools/learn/certification-details/hero-title/HeroTitle.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
src-ts/tools/learn/certification-details/providers-logo-list/providers-logo-map.tsx
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...n-lib/data-providers/tca-certifications-provider/tca-certification-provider.model-base.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { TCAProviderType } from './tca-provider-type' | ||
|
||
export interface TCACertificationProviderBase { | ||
id: number | ||
name: TCAProviderType | ||
description: string | ||
url: string | ||
} |
7 changes: 7 additions & 0 deletions
7
.../learn-lib/data-providers/tca-certifications-provider/tca-certification-provider.model.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { TCACertificationProviderBase } from './tca-certification-provider.model-base' | ||
import { TCACertificationResource } from './tca-certification-resource.model' | ||
|
||
export interface TCACertificationProvider extends TCACertificationProviderBase { | ||
attributionStatement: string | ||
CertificationResource: TCACertificationResource | ||
} |
15 changes: 15 additions & 0 deletions
15
.../learn-lib/data-providers/tca-certifications-provider/tca-certification-resource.model.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { TCACertificationResourceable } from './tca-certification-resourceable.type' | ||
|
||
export interface TCACertificationResource { | ||
id: number | ||
topcoderCertificationId: number | ||
resourceProviderId: number | ||
resourceableId: number | ||
resourceableType: TCACertificationResourceable | ||
displayOrder: number | ||
completionOrder: number | ||
resourceDescription: string | ||
resourceTitle: string | ||
createdAt: Date | ||
updatedAt: Date | ||
} |
1 change: 1 addition & 0 deletions
1
...rn-lib/data-providers/tca-certifications-provider/tca-certification-resourceable.type.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type TCACertificationResourceable = 'FreeCodeCampCertification' |
18 changes: 11 additions & 7 deletions
18
...ols/learn/learn-lib/data-providers/tca-certifications-provider/tca-certification.model.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,30 @@ | ||
import { TCACertificationLearnLevel } from './tca-certificate-level-type' | ||
import { TCACertificationStatus } from './tca-certificate-status-type' | ||
import { TCACertificationCategory } from './tca-certification-category.model' | ||
import { TcaProviderType } from './tca-provider-type' | ||
import { TCACertificationProvider } from './tca-certification-provider.model' | ||
import { TCACertificationProviderBase } from './tca-certification-provider.model-base' | ||
import { TCACertificationResource } from './tca-certification-resource.model' | ||
|
||
export interface TCACertification { | ||
id: number | ||
title: string | ||
certificationCategoryId: string | ||
coursesCount: number | ||
dashedName: string | ||
description: string | ||
introText: string | ||
estimatedCompletionTime: number | ||
status: TCACertificationStatus | ||
sequentialCourses: boolean | ||
learnerLevel: TCACertificationLearnLevel | ||
certificationCategory: TCACertificationCategory | ||
certificationCategoryId: string | ||
stripeProductId?: string | ||
skills: string[] | ||
learningOutcomes: string[] | ||
prerequisites: string[] | ||
createdAt: Date | ||
updatedAt: Date | ||
providers: Array<TcaProviderType> | ||
sequentialCourses: boolean | ||
status: TCACertificationStatus | ||
certificationResources: Array<TCACertificationResource> | ||
certificationCategory: TCACertificationCategory | ||
resourceProviders: Array<TCACertificationProvider> | ||
coursesCount: number | ||
providers: Array<TCACertificationProviderBase> | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src-ts/tools/learn/learn-lib/data-providers/tca-certifications-provider/tca-provider-type.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export type TcaProviderType = 'freecodecamp' | 'topcoder' | ||
export type TCAProviderType = 'freeCodeCamp' | 'Topcoder' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
src-ts/tools/learn/learn-lib/providers-logo-list/providers-logo-map.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { ReactNode } from 'react' | ||
import { FccLogoBlackSvg, TcLogoSvg } from '../svgs' | ||
import { TCAProviderType } from '../data-providers' | ||
|
||
// import { FccLogoBlackSvg, TCAProviderType, TcLogoSvg } from '../index' | ||
|
||
export const providersLogoMap: {[key in TCAProviderType]: ReactNode} = { | ||
freeCodeCamp: <FccLogoBlackSvg />, | ||
Topcoder: <TcLogoSvg />, | ||
} | ||
|
||
export function getProviderLogo(provider: TCAProviderType): ReactNode { | ||
return providersLogoMap[provider] | ||
} |
File renamed without changes
File renamed without changes
File renamed without changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
8 changes: 8 additions & 0 deletions
8
src-ts/tools/learn/learn-lib/tca-cert-badge/TCACertBadge.module.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@import '../../../../lib/styles/includes'; | ||
|
||
.tcaBadge { | ||
@include ltemd { | ||
width: 60px; | ||
height: 56px; | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
src-ts/tools/learn/learn-lib/tca-cert-badge/TCACertBadge.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { FC } from 'react' | ||
import { | ||
DSCertBadge1Svg, | ||
DSCertBadge2Svg, | ||
DSCertBadge3Svg, | ||
TCACertificationCategory, | ||
TCACertificationLearnLevel, | ||
WebDevCertBadge1Svg, | ||
WebDevCertBadge2Svg, | ||
WebDevCertBadge3Svg, | ||
} from '..' | ||
import styles from './TCACertBadge.module.scss' | ||
|
||
interface TCACertBadgeProps { | ||
learnerLevel: TCACertificationLearnLevel | ||
certificationCategory: TCACertificationCategory | ||
} | ||
|
||
const badgesMap: any = { | ||
DATASCIENCE: { | ||
Beginner: <DSCertBadge1Svg className={styles.tcaBadge} />, | ||
Expert: <DSCertBadge3Svg className={styles.tcaBadge} />, | ||
Intermediate: <DSCertBadge2Svg className={styles.tcaBadge} />, | ||
}, | ||
DEV: { | ||
Beginner: <WebDevCertBadge1Svg className={styles.tcaBadge} />, | ||
Expert: <WebDevCertBadge3Svg className={styles.tcaBadge} />, | ||
Intermediate: <WebDevCertBadge2Svg className={styles.tcaBadge} />, | ||
}, | ||
} | ||
|
||
const TCACertBadge: FC<TCACertBadgeProps> | ||
= (props: TCACertBadgeProps): JSX.Element => badgesMap[props.certificationCategory.track][props.learnerLevel] | ||
|
||
export default TCACertBadge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as TCACertBadge } from './TCACertBadge' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.