From 6792df016b98abf2d001196764cf39b0b615f904 Mon Sep 17 00:00:00 2001 From: nakaterm <104970808+nakaterm@users.noreply.github.com> Date: Tue, 12 May 2026 16:17:55 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=97=A5=E7=A8=8B=E6=8F=90=E5=87=BA?= =?UTF-8?q?=E6=99=82=E3=81=AB=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E3=82=92?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E3=81=A7=E3=81=8D=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/Calendar.tsx | 9 +- client/src/pages/Project.tsx | 3 + client/src/pages/eventId/Submission.tsx | 129 +++++++++++++----- client/src/revivers.ts | 2 + client/src/types.ts | 3 + common/validators.ts | 7 +- .../migration.sql | 2 + server/prisma/schema.prisma | 1 + server/src/routes/projects.ts | 6 +- 9 files changed, 118 insertions(+), 44 deletions(-) create mode 100644 server/prisma/migrations/20260328053217_add_comment_to_guest/migration.sql diff --git a/client/src/components/Calendar.tsx b/client/src/components/Calendar.tsx index ba02cd9..5623039 100644 --- a/client/src/components/Calendar.tsx +++ b/client/src/components/Calendar.tsx @@ -59,6 +59,7 @@ type Props = { editingSlots: EditingSlot[]; viewingSlots: ViewingSlot[]; guestIdToName: Record; + guestIdToComment: Record; participationOptions: ParticipationOption[]; currentParticipationOptionId: string; editMode: boolean; @@ -96,6 +97,7 @@ export const Calendar = ({ editingSlots, viewingSlots, guestIdToName, + guestIdToComment, participationOptions, currentParticipationOptionId, editMode, @@ -172,7 +174,10 @@ export const Calendar = ({ .filter((option) => optionGroups.has(option.id)) .map((option) => { const guestIds = optionGroups.get(option.id) || []; - const guestNames = guestIds.map((guestId) => guestIdToName[guestId] || guestId); + const guestNames = guestIds.map((guestId) => { + const name = guestIdToName[guestId] || guestId; + return guestIdToComment[guestId] ? `${name} 💬` : name; + }); const optionOpacity = 1 - (1 - OPACITY) ** guestIds.length; return { @@ -228,7 +233,7 @@ export const Calendar = ({ }); setEvents([...editingEvents, ...viewingEvents]); - }, [editingSlots, viewingSlots, guestIdToName, participationOptions]); + }, [editingSlots, viewingSlots, guestIdToName, guestIdToComment, participationOptions]); // viewing events ăźèƒŒæ™Żă‚čă‚żă‚€ăƒ«ă‚’ć‹•çš„ă«æłšć…„ useEffect(() => { diff --git a/client/src/pages/Project.tsx b/client/src/pages/Project.tsx index bbcc6b2..4f5ad98 100644 --- a/client/src/pages/Project.tsx +++ b/client/src/pages/Project.tsx @@ -320,6 +320,7 @@ export default function ProjectPage() { trigger("name")} @@ -333,6 +334,7 @@ export default function ProjectPage() {