From 3dd3e1e8d23b7b117432c0937d17ac2cd4ab5f22 Mon Sep 17 00:00:00 2001 From: Maurice Date: Thu, 17 Sep 2026 14:47:23 +0200 Subject: [PATCH] fix(journey): the day count stays the journal's own A day a pending stay was waiting on now joins the timeline so the stay can be reached, and the header counted those days as part of the journey: a journal of seven days read "11 days" because Dawarich had recorded on four more. The figure comes off the entries again, which is what the word means. --- client/src/pages/JourneyDetailPage.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/src/pages/JourneyDetailPage.tsx b/client/src/pages/JourneyDetailPage.tsx index a1807d29f..b869a7fa0 100644 --- a/client/src/pages/JourneyDetailPage.tsx +++ b/client/src/pages/JourneyDetailPage.tsx @@ -331,7 +331,10 @@ function JourneyDetailPageDesktop() {
{[ - { value: sortedDates.length, label: t('journey.stats.days') }, + // The journal's own days, not the ones a pending stay added to the + // timeline: "11 days" for a trip of 7 counts somebody else's data as + // the journey. + { value: dayGroups.size, label: t('journey.stats.days') }, { value: current.stats.places, label: t('journey.stats.places') }, { value: current.stats.entries, label: t('journey.stats.entries') }, { value: current.stats.photos, label: t('journey.stats.photos') }, @@ -421,7 +424,7 @@ function JourneyDetailPageDesktop() { {/* Timeline (desktop only — mobile uses fullscreen combined view above) */} {!isMobile && (
- {sortedDates.length === 0 && ( + {dayGroups.size === 0 && sortedDates.length === 0 && (