We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e2a4c1 commit 6ab63e3Copy full SHA for 6ab63e3
routes/api/missions.js
@@ -64,11 +64,15 @@ exports.update = (req, res) => {
64
data.removed = oldCrewIDs.filter(id => !newCrewIDs.includes(id));
65
data.added = newCrewIDs.filter(id => !oldCrewIDs.includes(id));
66
67
+ newData.crew // set the status of newly added volunteers on pending
68
+ .filter(a => data.added.includes(a.volunteer))
69
+ .forEach(a => a.status = 'pending');
70
+
71
if (newData.start || newData.end) {
72
data.unchanged = oldCrewIDs.filter(id => newCrewIDs.includes(id));
73
newData.crew
- .filter(assignment => assignment.status === 'yes')
- .forEach(assignment => assignment.status = 'pending');
74
+ .filter(a => a.status === 'yes')
75
76
}
77
78
0 commit comments