Per-assignment times, participant avatar fix, UI improvements

- Times are now per-assignment instead of per-place, so the same place
  on different days can have different times
- Migration 26 adds assignment_time/assignment_end_time columns
- New endpoint PUT /assignments/:id/time for updating assignment times
- Time picker removed from place creation (only shown when editing)
- End-before-start validation disables save button
- Time collision warning shows overlapping activities on the same day
- Fix participant avatars using avatar_url instead of avatar filename
- Rename "Add Place" to "Add Place/Activity" (DE + EN)
- Improve README update instructions with docker inspect tip
This commit is contained in:
Maurice
2026-03-25 16:47:10 +01:00
parent 66e2799870
commit 3bf49d4180
14 changed files with 191 additions and 56 deletions
+16 -1
View File
@@ -275,6 +275,21 @@ export const useTripStore = create((set, get) => ({
}
},
refreshDays: async (tripId) => {
try {
const daysData = await daysApi.list(tripId)
const assignmentsMap = {}
const dayNotesMap = {}
for (const day of daysData.days) {
assignmentsMap[String(day.id)] = day.assignments || []
dayNotesMap[String(day.id)] = day.notes_items || []
}
set({ days: daysData.days, assignments: assignmentsMap, dayNotes: dayNotesMap })
} catch (err) {
console.error('Failed to refresh days:', err)
}
},
refreshPlaces: async (tripId) => {
try {
const data = await placesApi.list(tripId)
@@ -302,7 +317,7 @@ export const useTripStore = create((set, get) => ({
assignments: Object.fromEntries(
Object.entries(state.assignments).map(([dayId, items]) => [
dayId,
items.map(a => a.place?.id === placeId ? { ...a, place: data.place } : a)
items.map(a => a.place?.id === placeId ? { ...a, place: { ...data.place, place_time: a.place.place_time, end_time: a.place.end_time } } : a)
])
),
}))