Skip to content

Commit b1584f6

Browse files
chore: add lms constants
1 parent 114e438 commit b1584f6

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

src/data/services/lms/constants.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,39 @@ export const MutationStatus = StrictDict({
1818
success: 'success',
1919
});
2020

21+
export const stepStates = StrictDict({
22+
inProgress: 'inProgress',
23+
completed: 'completed',
24+
cancelled: 'cancelled',
25+
closed: 'closed',
26+
notAvailable: 'notAvailable',
27+
teamAlreadySubmitted: 'teamAlreadySubmitted',
28+
});
29+
30+
export const closedReasons = StrictDict({
31+
pastDue: 'pastDue',
32+
notAvailable: 'notAvailable', // (yet)
33+
});
34+
35+
export const stepNames = StrictDict({
36+
submission: 'submission',
37+
peer: 'peer',
38+
self: 'self',
39+
studentTraining: 'studentTraining',
40+
myGrades: 'myGrades',
41+
});
42+
43+
export const routeSteps = StrictDict({
44+
submission: stepNames.submission,
45+
peer_assessment: stepNames.peer,
46+
self_assessment: stepNames.self,
47+
student_training: stepNames.studentTraining,
48+
my_grades: stepNames.myGrades,
49+
});
50+
51+
export const stepRoutes = StrictDict(Object.keys(routeSteps).reduce(
52+
(curr, route) => ({ ...curr, [routeSteps[route]]: route }),
53+
{},
54+
));
55+
2156
export default { feedbackRequirement, queryKeys, MutationStatus };

0 commit comments

Comments
 (0)