From d89ea5947ed421dbcd3276121be2b7fded10906c Mon Sep 17 00:00:00 2001 From: adisposkofh Date: Wed, 22 Jul 2026 11:16:41 +0200 Subject: [PATCH] minor mod to coodle voting table appearance (grouping dates in top row) --- .../CoodleSurvey/CoodleSurveyVotingTable.js | 31 ++++++++++++++++--- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/public/js/components/Cis/Coodle/Components/CoodleSurvey/CoodleSurveyVotingTable.js b/public/js/components/Cis/Coodle/Components/CoodleSurvey/CoodleSurveyVotingTable.js index cd93d0ca3..718756858 100644 --- a/public/js/components/Cis/Coodle/Components/CoodleSurvey/CoodleSurveyVotingTable.js +++ b/public/js/components/Cis/Coodle/Components/CoodleSurvey/CoodleSurveyVotingTable.js @@ -63,6 +63,27 @@ export default { room.longName.toLowerCase().includes(roomFilterText), ); }, + timeslotDates() { + if (!this.$props.timeslots.length) return []; + + let groupedTimeslots = Object.groupBy( + this.$props.timeslots, + (timeslot) => { + return timeslot.startsAt.toISOString().slice(0, 10); + }, + ); + return Object.keys(groupedTimeslots) + .sort() + .map((dateKey) => { + let timeslotDate = groupedTimeslots[dateKey]; + return { + count: timeslotDate.length, + date: timeslotDate[0].date, + weekday: timeslotDate[0].weekday, + month: timeslotDate[0].month, + }; + }); + }, }, watch: { survey: { @@ -172,7 +193,7 @@ export default { // )[0]; this.externalParticipantsWithoutAuthUser = externalParticipants; - // + // }, setData() { this.setForms(); @@ -446,11 +467,11 @@ export default { -
+
- {{ timeslot.month.slice(0,3) }} - {{ timeslot.date }} - {{ timeslot.weekday.slice(0,3) }} + {{ timeslotDate.month.slice(0,3) }} + {{ timeslotDate.date }} + {{ timeslotDate.weekday.slice(0,3) }}