Skip to content
Snippets Groups Projects
Commit 850167d1 authored by Julian's avatar Julian
Browse files

Display name of person in success message

parent c1f9242f
No related branches found
No related tags found
1 merge request!373Resolve "Suggest creating Kolego absence for the rest of the day when entering absences"
......@@ -47,6 +47,8 @@ export default {
showAlert: false,
num: 0,
reason: "no reason",
name: "nobody",
personIds: [],
},
};
},
......@@ -78,8 +80,16 @@ export default {
this.$set(this.selected, []);
this.$refs.iterator.selected = [];
},
activateFullDayDialog() {
// Separate method as there may be additional logic here in the future
activateFullDayDialog({ data: { updateParticipationStatuses: { items }}}) {
const itemIds = items.map(item => item.id);
const participations = this.documentation.participations.filter(part => itemIds.includes(part.id));
if (this.markAsAbsentDay.num === 1) {
this.markAsAbsentDay.name = participations[0].person.firstName;
}
this.$set(this.markAsAbsentDay.personIds, itemIds);
this.markAsAbsentDay.showAlert = true;
}
},
......
......@@ -113,7 +113,7 @@
"warning": "The following lessons are in the selected time period. Please check that you want to register the absences for these lessons before confirming."
},
"mark_as_absent_day": {
"title": "Error: no person | Successfully marked as '{reason}' | Successfully marked {n} people as '{reason}'",
"title": "Error: no person | Successfully marked {name} as '{reason}' | Successfully marked {n} people as '{reason}'",
"description": "Do you want to mark them as '{reason}' for the rest of their day?",
"action_button": "Extend absence"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment