|
1 | 1 | import _ from "lodash";
|
2 | 2 | import { PrizeSetTypes } from "../common/Constants";
|
3 |
| -import { V5_TO_V4 } from "../common/ConversionMap"; |
| 3 | +import { V4_SUBTRACKS, V5_TO_V4 } from "../common/ConversionMap"; |
4 | 4 | import { legacyChallengeStatusesMap } from "./constants";
|
5 | 5 | import DateUtil from "./DateUtil";
|
6 | 6 |
|
@@ -61,16 +61,57 @@ class LegacyMapper {
|
61 | 61 | projectStudioSpecId: number | undefined;
|
62 | 62 | projectMmSpecId: number | undefined;
|
63 | 63 | } {
|
64 |
| - subTrack = subTrack.replace(" ", "").toLowerCase(); |
| 64 | + let projectCategoryId = 39; // V4_SUBTRACKS.CODE |
65 | 65 |
|
66 |
| - let projectCategoryId = 39; // code |
67 |
| - if (subTrack === "first2finish") { |
68 |
| - projectCategoryId = 38; |
69 |
| - } else if (subTrack === "marathonmatch") { |
70 |
| - projectCategoryId = 37; |
71 |
| - } else if (subTrack === "bughunt") { |
72 |
| - projectCategoryId = 9; |
73 |
| - } |
| 66 | + if (subTrack === V4_SUBTRACKS.FIRST_2_FINISH) projectCategoryId = 38; |
| 67 | + if (subTrack === V4_SUBTRACKS.MARATHON_MATCH) projectCategoryId = 37; |
| 68 | + // prettier-ignore |
| 69 | + if (subTrack === V4_SUBTRACKS.DEVELOP_MARATHON_MATCH) projectCategoryId = 37; |
| 70 | + if (subTrack === V4_SUBTRACKS.BUG_HUNT) projectCategoryId = 9; |
| 71 | + if (subTrack === V4_SUBTRACKS.DESIGN_FIRST_2_FINISH) projectCategoryId = 40; |
| 72 | + if (subTrack === V4_SUBTRACKS.WEB_DESIGNS) projectCategoryId = 17; |
| 73 | + /* |
| 74 | + project_category_id,project_type_id,name |
| 75 | + 1,1,Design |
| 76 | + 2,1,Development |
| 77 | + 3,1,Security |
| 78 | + 4,1,Process |
| 79 | + 5,1,Testing Competition |
| 80 | + 6,2,Specification |
| 81 | + 7,2,Architecture |
| 82 | + 8,2,Component Production |
| 83 | + 9,2,Bug Hunt |
| 84 | + 10,2,Deployment |
| 85 | + 11,2,Security |
| 86 | + 12,2,Process |
| 87 | + 13,2,Test Suites |
| 88 | + 14,2,Assembly Competition |
| 89 | + 15,2,Legacy |
| 90 | + 16,3,Banners/Icons |
| 91 | + 17,3,Web Design |
| 92 | + 18,3,Wireframes |
| 93 | + 19,2,UI Prototype Competition |
| 94 | + 20,3,Logo Design |
| 95 | + 21,3,Print/Presentation |
| 96 | + 23,2,Conceptualization |
| 97 | + 24,2,RIA Build Competition |
| 98 | + 25,2,RIA Component Competition |
| 99 | + 26,2,Test Scenarios |
| 100 | + 27,2,Spec Review |
| 101 | + 28,4,Generic Scorecards |
| 102 | + 29,2,Copilot Posting |
| 103 | + 35,2,Content Creation |
| 104 | + 30,3,Widget or Mobile Screen Design |
| 105 | + 31,3,Front-End Flash |
| 106 | + 32,3,Application Front-End Design |
| 107 | + 34,3,Studio Other |
| 108 | + 22,3,Idea Generation |
| 109 | + 36,2,Reporting |
| 110 | + 37,2,Marathon Match |
| 111 | + 38,2,First2Finish |
| 112 | + 39,2,Code |
| 113 | + 40,3,Design First2Finish |
| 114 | + */ |
74 | 115 |
|
75 | 116 | return {
|
76 | 117 | projectCategoryId,
|
|
0 commit comments