From 3bf49d4180ed9a91b63ce9dd28194d3536949ed5 Mon Sep 17 00:00:00 2001 From: Maurice Date: Wed, 25 Mar 2026 16:47:10 +0100 Subject: [PATCH] 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 --- README.md | 14 ++- client/src/api/client.js | 1 + .../src/components/Places/PlaceFormModal.jsx | 13 +-- .../components/Planner/AssignedPlaceItem.jsx | 2 +- .../src/components/Planner/DayPlanSidebar.jsx | 2 +- .../src/components/Planner/PlaceFormModal.jsx | 97 +++++++++++++++---- .../src/components/Planner/PlaceInspector.jsx | 4 +- client/src/i18n/translations/de.js | 8 +- client/src/i18n/translations/en.js | 8 +- client/src/pages/TripPlannerPage.jsx | 31 ++++-- client/src/store/tripStore.js | 17 +++- server/src/db/database.js | 13 +++ server/src/routes/assignments.js | 29 +++++- server/src/routes/days.js | 8 +- 14 files changed, 191 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index b7ded62..45beb5b 100644 --- a/README.md +++ b/README.md @@ -131,15 +131,23 @@ docker compose up -d ### Updating +**Docker Compose** (recommended): + +```bash +docker compose pull && docker compose up -d +``` + +**Docker Run** — use the same volume paths from your original `docker run` command: + ```bash docker pull mauriceboe/nomad docker rm -f nomad -docker run -d --name nomad -p 3000:3000 -v /your/data:/app/data -v /your/uploads:/app/uploads --restart unless-stopped mauriceboe/nomad +docker run -d --name nomad -p 3000:3000 -v ./data:/app/data -v ./uploads:/app/uploads --restart unless-stopped mauriceboe/nomad ``` -Or with Docker Compose: `docker compose pull && docker compose up -d` +> **Tip:** Not sure which paths you used? Run `docker inspect nomad --format '{{json .Mounts}}'` before removing the container. -Your data is persisted in the mounted `data` and `uploads` volumes. +Your data is persisted in the mounted `data` and `uploads` volumes — updates never touch your existing data. ### Reverse Proxy (recommended) diff --git a/client/src/api/client.js b/client/src/api/client.js index e793772..bbf4cdb 100644 --- a/client/src/api/client.js +++ b/client/src/api/client.js @@ -97,6 +97,7 @@ export const assignmentsApi = { update: (tripId, dayId, id, data) => apiClient.put(`/trips/${tripId}/days/${dayId}/assignments/${id}`, data).then(r => r.data), getParticipants: (tripId, id) => apiClient.get(`/trips/${tripId}/assignments/${id}/participants`).then(r => r.data), setParticipants: (tripId, id, userIds) => apiClient.put(`/trips/${tripId}/assignments/${id}/participants`, { user_ids: userIds }).then(r => r.data), + updateTime: (tripId, id, times) => apiClient.put(`/trips/${tripId}/assignments/${id}/time`, times).then(r => r.data), } export const packingApi = { diff --git a/client/src/components/Places/PlaceFormModal.jsx b/client/src/components/Places/PlaceFormModal.jsx index 2228202..2b4289a 100644 --- a/client/src/components/Places/PlaceFormModal.jsx +++ b/client/src/components/Places/PlaceFormModal.jsx @@ -447,17 +447,8 @@ export default function PlaceFormModal({ )} - {/* Time & Reservation */} -
-
- - update('place_time', e.target.value)} - className="w-full px-3 py-2.5 border border-slate-300 rounded-lg text-slate-900 focus:ring-2 focus:ring-slate-400 focus:border-transparent" - /> -
+ {/* Reservation */} +