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.
This commit is contained in:
Maurice
2026-09-17 14:47:23 +02:00
parent bbcf17d816
commit 3dd3e1e8d2
+5 -2
View File
@@ -331,7 +331,10 @@ function JourneyDetailPageDesktop() {
<div className="relative z-[3]">
<div className="inline-flex items-center gap-7 md:gap-9" style={{ padding: '13px 26px', borderRadius: 18, background: 'rgba(255,255,255,0.14)', backdropFilter: 'blur(16px)', WebkitBackdropFilter: 'blur(16px)', border: '1px solid rgba(255,255,255,0.2)' }}>
{[
{ 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 && (
<div className={`flex flex-col gap-6 pb-24 md:pb-6${view === 'timeline' ? '' : ' hidden'}`}>
{sortedDates.length === 0 && (
{dayGroups.size === 0 && sortedDates.length === 0 && (
<EmptyState
scene="journey"
title={query ? t('journey.detail.searchEmpty', { query }) : t('journey.detail.noEntries')}