Skip to content

Commit 8284408

Browse files
JamieXiaotektaxi
andauthored
Feat/create application review (#944)
* not finished create app rev * Reviewer status: 1/2 works (needs to enter twice??) * Hacker Reviewer Feature * Cleaner code * remove uneccessary comments * not finished create app rev * Reviewer status: 1/2 works (needs to enter twice??) * Hacker Reviewer Feature * Cleaner code * remove uneccessary comments * not finished create app rev * Reviewer status: 1/2 works (needs to enter twice??) * Hacker Reviewer Feature * Cleaner code * remove uneccessary comments * not finished create app rev * Reviewer status: 1/2 works (needs to enter twice??) * Hacker Reviewer Feature * Cleaner code * Fixed Application Error: implemented reviewers values from feat/review_filter and fixed the default value errors for reviewer status, name, and comments * Fixed Application Error: implemented reviewers values from feat/review_filter and fixed the default value errors for reviewer status, name, and comments * fixed authorization issues by adding all routes to routes.constant.js with unique IDs * disable emails on status change by admin --------- Co-authored-by: Tavi Pollard <[email protected]> Co-authored-by: Tavi Pollard <[email protected]>
1 parent fbcdfc7 commit 8284408

File tree

11 files changed

+1452
-25
lines changed

11 files changed

+1452
-25
lines changed

constants/general.constant.js

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,68 @@ const HACKER_STATUSES = [
2525
HACKER_STATUS_CHECKED_IN,
2626
HACKER_STATUS_DECLINED
2727
];
28+
29+
const HACKER_REVIEWER_STATUS_NONE = 'None';
30+
const HACKER_REVIEWER_STATUS_POOR = 'Poor';
31+
const HACKER_REVIEWER_STATUS_WEAK = 'Weak';
32+
const HACKER_REVIEWER_STATUS_AVERAGE = 'Average';
33+
const HACKER_REVIEWER_STATUS_STRONG = 'Strong';
34+
const HACKER_REVIEWER_STATUS_OUTSTANDING = 'Outstanding';
35+
const HACKER_REVIEWER_STATUS_WHITELIST = 'Whitelist';
36+
const HACKER_REVIEWER_STATUSES = [
37+
HACKER_REVIEWER_STATUS_NONE,
38+
HACKER_REVIEWER_STATUS_POOR,
39+
HACKER_REVIEWER_STATUS_WEAK,
40+
HACKER_REVIEWER_STATUS_AVERAGE,
41+
HACKER_REVIEWER_STATUS_STRONG,
42+
HACKER_REVIEWER_STATUS_OUTSTANDING,
43+
HACKER_REVIEWER_STATUS_WHITELIST,
44+
];
45+
46+
const HACKER_REVIEWER_NAMES = [
47+
'',
48+
'Amy',
49+
'Carolyn',
50+
'Clara',
51+
'Debo',
52+
'Deon',
53+
'Doaa',
54+
'Emily',
55+
'Emma',
56+
'Ethan',
57+
'Evan',
58+
'Finnley',
59+
'Gabriel',
60+
'Ian',
61+
'Inaya',
62+
'Jake',
63+
'Jamie',
64+
'Jane J.',
65+
'Jane K.',
66+
'Jeffrey',
67+
'Joshua',
68+
'Jyothsna',
69+
'Khyati',
70+
'Michael',
71+
'Mika',
72+
'Mubeen',
73+
'Mira',
74+
'Oishika',
75+
'Olivia',
76+
'Qi',
77+
'Rémi',
78+
'Sebastian',
79+
'Shirley',
80+
'Sihan',
81+
'Siva',
82+
'Snigdha',
83+
'Stephanie',
84+
'Tavi',
85+
'Tina',
86+
'Vipul',
87+
'Yue Qian',
88+
];
89+
2890
// This date is Jan 6, 2020 00:00:00 GMT -0500
2991
const APPLICATION_CLOSE_TIME = 1578286800000;
3092

@@ -185,7 +247,16 @@ module.exports = {
185247
HACKER_STATUS_CONFIRMED: HACKER_STATUS_CONFIRMED,
186248
HACKER_STATUS_WITHDRAWN: HACKER_STATUS_WITHDRAWN,
187249
HACKER_STATUS_CHECKED_IN: HACKER_STATUS_CHECKED_IN,
250+
HACKER_REVIEWER_STATUS_NONE: HACKER_REVIEWER_STATUS_NONE,
251+
HACKER_REVIEWER_STATUS_POOR: HACKER_REVIEWER_STATUS_POOR,
252+
HACKER_REVIEWER_STATUS_WEAK: HACKER_REVIEWER_STATUS_WEAK,
253+
HACKER_REVIEWER_STATUS_AVERAGE: HACKER_REVIEWER_STATUS_AVERAGE,
254+
HACKER_REVIEWER_STATUS_STRONG: HACKER_REVIEWER_STATUS_STRONG,
255+
HACKER_REVIEWER_STATUS_OUTSTANDING: HACKER_REVIEWER_STATUS_OUTSTANDING,
256+
HACKER_REVIEWER_STATUS_WHITELIST: HACKER_REVIEWER_STATUS_WHITELIST,
188257
HACKER_STATUSES: HACKER_STATUSES,
258+
HACKER_REVIEWER_STATUSES: HACKER_REVIEWER_STATUSES,
259+
HACKER_REVIEWER_NAMES: HACKER_REVIEWER_NAMES,
189260
TRAVEL_STATUS_NONE: TRAVEL_STATUS_NONE,
190261
TRAVEL_STATUS_BUS: TRAVEL_STATUS_BUS,
191262
TRAVEL_STATUS_POLICY: TRAVEL_STATUS_POLICY,

constants/routes.constant.js

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* ===***===***===***===***===***===***===***===***===
77
*
88
* If you are adding a route to this list, update this number
9-
* next avaiable createFromTime value: 170
9+
* next avaiable createFromTime value: 180
1010
*
1111
* If you are deleting a route from this list, please add the ID to the list of 'reserved' IDs,
1212
* so that we don't accidentally assign someone to a given ID.
@@ -153,6 +153,66 @@ const hackerRoutes = {
153153
uri: "/api/hacker/status/" + Constants.ROLE_CATEGORIES.SELF,
154154
_id: mongoose.Types.ObjectId.createFromTime(125),
155155
},
156+
patchAnyReviewerStatusById: {
157+
requestType: Constants.REQUEST_TYPES.PATCH,
158+
uri: "/api/hacker/reviewerStatus/" + Constants.ROLE_CATEGORIES.ALL,
159+
_id: mongoose.Types.ObjectId.createFromTime(168)
160+
},
161+
patchSelfReviewerStatusById: {
162+
requestType: Constants.REQUEST_TYPES.PATCH,
163+
uri: "/api/hacker/reviewerStatus/" + Constants.ROLE_CATEGORIES.SELF,
164+
_id: mongoose.Types.ObjectId.createFromTime(169)
165+
},
166+
patchAnyReviewerStatus2ById: {
167+
requestType: Constants.REQUEST_TYPES.PATCH,
168+
uri: "/api/hacker/reviewerStatus2/" + Constants.ROLE_CATEGORIES.ALL,
169+
_id: mongoose.Types.ObjectId.createFromTime(170)
170+
},
171+
patchSelfReviewerStatus2ById: {
172+
requestType: Constants.REQUEST_TYPES.PATCH,
173+
uri: "/api/hacker/reviewerStatus2/" + Constants.ROLE_CATEGORIES.SELF,
174+
_id: mongoose.Types.ObjectId.createFromTime(171)
175+
},
176+
patchAnyReviewerNameById: {
177+
requestType: Constants.REQUEST_TYPES.PATCH,
178+
uri: "/api/hacker/reviewerName/" + Constants.ROLE_CATEGORIES.ALL,
179+
_id: mongoose.Types.ObjectId.createFromTime(172)
180+
},
181+
patchSelfReviewerNameById: {
182+
requestType: Constants.REQUEST_TYPES.PATCH,
183+
uri: "/api/hacker/reviewerName/" + Constants.ROLE_CATEGORIES.SELF,
184+
_id: mongoose.Types.ObjectId.createFromTime(173)
185+
},
186+
patchAnyReviewerName2ById: {
187+
requestType: Constants.REQUEST_TYPES.PATCH,
188+
uri: "/api/hacker/reviewerName2/" + Constants.ROLE_CATEGORIES.ALL,
189+
_id: mongoose.Types.ObjectId.createFromTime(174)
190+
},
191+
patchSelfReviewerName2ById: {
192+
requestType: Constants.REQUEST_TYPES.PATCH,
193+
uri: "/api/hacker/reviewerName2/" + Constants.ROLE_CATEGORIES.SELF,
194+
_id: mongoose.Types.ObjectId.createFromTime(175)
195+
},
196+
patchAnyReviewerCommentsById: {
197+
requestType: Constants.REQUEST_TYPES.PATCH,
198+
uri: "/api/hacker/reviewerComments/" + Constants.ROLE_CATEGORIES.ALL,
199+
_id: mongoose.Types.ObjectId.createFromTime(176)
200+
},
201+
patchSelfReviewerCommentsById: {
202+
requestType: Constants.REQUEST_TYPES.PATCH,
203+
uri: "/api/hacker/reviewerComments/" + Constants.ROLE_CATEGORIES.SELF,
204+
_id: mongoose.Types.ObjectId.createFromTime(177)
205+
},
206+
patchAnyReviewerComments2ById: {
207+
requestType: Constants.REQUEST_TYPES.PATCH,
208+
uri: "/api/hacker/reviewerComments2/" + Constants.ROLE_CATEGORIES.ALL,
209+
_id: mongoose.Types.ObjectId.createFromTime(178)
210+
},
211+
patchSelfReviewerComments2ById: {
212+
requestType: Constants.REQUEST_TYPES.PATCH,
213+
uri: "/api/hacker/reviewerComments2/" + Constants.ROLE_CATEGORIES.SELF,
214+
_id: mongoose.Types.ObjectId.createFromTime(179)
215+
},
156216
patchSelfCheckInById: {
157217
requestType: Constants.REQUEST_TYPES.PATCH,
158218
uri: "/api/hacker/checkin/" + Constants.ROLE_CATEGORIES.SELF,

0 commit comments

Comments
 (0)