feat(places): colour tags, tabs for the texts and opening hours on the phone

Tags on the place form are pills in their own colour, with a palette under
the dot that recolours a tag for the whole trip (PUT /trips/:id/tags/:id was
there already, the client now reaches it through repo and store) and a
custom colour field of its own instead of the system picker. A new tag is
made in a colour picked the same way.

Description, notes and the note for one day's visit sit in one card under a
switch, each with a line on where the text shows up; the day tab is named
after its day and is only there with one visit in context. Nothing about the
three fields changes underneath.

Opening hours get a switch for open around the clock next to closed. Google
writes a place open all week as one period on Sunday that never closes; it
read as Sunday open and every other day closed, and now opens every day.

The phone form follows the desktop: category as one field with a list, tags
in one field, the texts switch, and phone, e-mail and opening hours, which it
did not have. The hours and the text tabs are shared hooks (usePlaceHours,
usePlaceTextTabs). Files and costs on the phone sheets are drawn as fields
like the rest, and the paste hint, a keyboard shortcut a phone has no use
for, is gone with its key.
This commit is contained in:
Maurice
2026-11-17 08:44:05 +01:00
parent 33d074c786
commit a3f6635633
100 changed files with 2538 additions and 510 deletions
+16 -4
View File
@@ -174,12 +174,24 @@ export function PopoverListPanel({ list, label, className = '', children }: {
}
/** The dashed full-width button that adds a row: a stop, a leg. */
export function AddRowButton({ onClick, disabled, children }: { onClick: () => void; disabled?: boolean; children: ReactNode }) {
export function AddRowButton({ onClick, disabled, raised = false, children }: {
onClick: () => void
disabled?: boolean
/**
* On a PANEL: the white raised button of the cards (the costs' "Create expense"),
* at its size, instead of a dashed outline on grey.
*/
raised?: boolean
children: ReactNode
}) {
const look = raised
? 'gap-2 border-transparent bg-surface-card px-[13px] text-content shadow-sm ring-1 ring-edge-faint hover:bg-surface-hover'
: 'gap-1.5 border-dashed border-edge px-3 text-content-muted hover:border-content-faint hover:text-content'
return (
<button type="button" onClick={onClick} disabled={disabled}
className="flex w-full items-center justify-center gap-1.5 rounded-[10px] border border-dashed border-edge px-3 py-2 font-semibold text-content-muted hover:border-content-faint hover:text-content disabled:cursor-default disabled:opacity-50"
style={fs(12, 'body')}>
<Plus size={13} strokeWidth={2.2} />{children}
className={`flex w-full items-center justify-center rounded-[10px] border py-2 font-semibold transition-colors disabled:cursor-default disabled:opacity-50 ${look}`}
style={fs(raised ? 13 : 12, 'body')}>
<Plus size={raised ? 14 : 13} strokeWidth={2.2} />{children}
</button>
)
}