Skip to content

Commit 88bee06

Browse files
Merge branch 'qa' into PROD-1573_work-details-solutions
2 parents f01f4da + 0a9b3c6 commit 88bee06

File tree

11 files changed

+51
-19
lines changed

11 files changed

+51
-19
lines changed

.circleci/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ workflows:
7575
filters:
7676
branches:
7777
only:
78-
- develop
78+
# - develop
79+
- qa
7980

8081
# Production builds are exectuted only on tagged commits to the
8182
# master branch.

src-ts/lib/svgs/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import { ReactComponent as SocialIconLinkedin } from './social-linkedin-icon.svg
1010
import { ReactComponent as SocialIconTwitter } from './social-tw-icon.svg'
1111
import { ReactComponent as SocialIconYoutube } from './social-yt-icon.svg'
1212
import { ReactComponent as TooltipArrowIcon } from './tooltip-arrow.svg'
13-
import { ReactComponent as WorkTypeDataExplorationIcon } from './work-type-data-exploration.svg'
14-
import { ReactComponent as WorkTypeUnknownIcon } from './work-type-unknown.svg'
15-
import { ReactComponent as WorkTypeWebsiteDesignIcon } from './work-type-website-design.svg'
13+
import { ReactComponent as WorkTypeCategoryDataIcon } from './work-type-category-data.svg'
14+
import { ReactComponent as WorkTypeCategoryDesignIcon } from './work-type-category-design.svg'
15+
import { ReactComponent as WorkTypeCategoryUnknownIcon } from './work-type-category-unknown.svg'
1616

1717
export { ActiveTabTipIcon }
1818
export { IconOutline }
@@ -24,6 +24,6 @@ export { SocialIconLinkedin }
2424
export { SocialIconTwitter }
2525
export { SocialIconYoutube }
2626
export { TooltipArrowIcon }
27-
export { WorkTypeDataExplorationIcon }
28-
export { WorkTypeUnknownIcon }
29-
export { WorkTypeWebsiteDesignIcon }
27+
export { WorkTypeCategoryDataIcon }
28+
export { WorkTypeCategoryDesignIcon }
29+
export { WorkTypeCategoryUnknownIcon }

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ export {
44
} from './work.functions'
55
export {
66
type Work,
7+
workFactoryCreate,
8+
workFactoryGetStatus,
79
type WorkProgress,
810
type WorkProgressStep,
911
type WorkSolution,
1012
WorkStatus,
1113
WorkType,
12-
workFactoryCreate,
13-
workFactoryGetStatus,
14+
WorkTypeCategory,
1415
} from './work-factory'
1516
export {
1617
type Challenge,

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export * from './work-progress.model'
22
export * from './work-progress-step.model'
33
export * from './work-status.enum'
44
export * from './work-solution.model'
5+
export * from './work-type-category.enum'
56
export * from './work-type.enum'
67
export {
78
create as workFactoryCreate,
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export enum WorkTypeCategory {
2+
data = 'Data',
3+
design = 'Design',
4+
dev = 'Development',
5+
qa = 'QA',
6+
unknown = '',
7+
}

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { ChallengeStatus } from './challenge-status.enum'
1515
import { WorkProgressStep } from './work-progress-step.model'
1616
import { WorkProgress } from './work-progress.model'
1717
import { WorkStatus } from './work-status.enum'
18+
import { WorkTypeCategory } from './work-type-category.enum'
1819
import { WorkType } from './work-type.enum'
1920
import { Work } from './work.model'
2021

@@ -38,6 +39,7 @@ export function create(challenge: Challenge): Work {
3839
submittedDate,
3940
title: challenge.name,
4041
type,
42+
typeCategory: getTypeCategory(type),
4143
}
4244
}
4345

@@ -231,3 +233,20 @@ function getType(challenge: Challenge): WorkType {
231233
const output: WorkType = !!workTypeKey ? WorkType[workTypeKey] : WorkType.unknown
232234
return output
233235
}
236+
237+
function getTypeCategory(type: WorkType): WorkTypeCategory {
238+
239+
switch (type) {
240+
241+
case WorkType.data:
242+
case WorkType.findData:
243+
return WorkTypeCategory.data
244+
245+
case WorkType.design:
246+
return WorkTypeCategory.design
247+
248+
// TOOD: other categories: qa and dev
249+
default:
250+
return WorkTypeCategory.unknown
251+
}
252+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { WorkProgress } from './work-progress.model'
22
import { WorkStatus } from './work-status.enum'
3+
import { WorkTypeCategory } from './work-type-category.enum'
34
import { WorkType } from './work-type.enum'
45

56
export interface Work {
@@ -16,4 +17,5 @@ export interface Work {
1617
submittedDate?: Date
1718
title: string
1819
type: WorkType
20+
typeCategory: WorkTypeCategory
1921
}

0 commit comments

Comments
 (0)