mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-22 06:41:46 +00:00
feat: show date badge on day selectors + i18n transport modal titles
Day selectors in the Transport, Reservation and Hotel-Day-Range modals only showed the renamed day title once a day had a custom name — hiding the actual date. Added an optional badge prop to CustomSelect, rendered as a pill next to the label, and wired the date badge onto all affected dropdowns. FileManager day section headers got the same pill for consistency. Also translated transport.addTransport and transport.modalTitle.* in all 13 non-English language files; the keys existed but still carried the English source string.
This commit is contained in:
@@ -222,7 +222,8 @@ export function TransportModal({ isOpen, onClose, onSave, reservation, days, sel
|
||||
{ value: '', label: '—' },
|
||||
...days.map(d => ({
|
||||
value: d.id,
|
||||
label: d.title || `${t('dayplan.dayN', { n: d.day_number })}${d.date ? ` · ${formatDate(d.date, locale) ?? ''}` : ''}`,
|
||||
label: d.title || t('dayplan.dayN', { n: d.day_number }),
|
||||
badge: d.date ? (formatDate(d.date, locale) ?? undefined) : undefined,
|
||||
})),
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user