Merge the log and history into one page, group dishes by category
Kirjaa and Historia were two views of the same thing: every history row was already a link back into the logger, and the logger had a day switcher. They are now one page — the day being logged on top, history underneath, each row loading its day into the logger above. Two tabs instead of three. That also closed a gap. On an already-logged day there was no way to swap to a different dish; "Muokkaa" only reopened the sides for the same one. It now opens the board, so changing a dish and choosing one for the first time are the same path. Dishes are grouped by category on both screens, with Sekalaiset collecting the ones covering more than one. That group is derived from the stored set rather than being a fifth category, so a single Tortillat still satisfies meat, chicken, fish and vegetarian at once when the §8.1 suggester arrives. The two screens sort differently on purpose. The log board keeps frequency then name inside each group, so favourites surface without wandering between categories as counts change. The catalog sorts by name, because there you are hunting a specific dish to edit rather than picking one to eat. groupDishes preserves the order it is handed; the caller decides which it wants. Ruoat is renamed Ruuat throughout, label and route both.
This commit is contained in:
@@ -17,18 +17,29 @@ weeks of real history to weight against.
|
||||
|
||||
Working:
|
||||
|
||||
- **Kirjaa** — log a dinner: pick a dish, tick sides, save. Dishes are sized
|
||||
by how often they are eaten. Edit or delete the day's entry.
|
||||
- **Historia** — every day back to the first entry, with unlogged days shown
|
||||
as explicit gaps.
|
||||
- **Ruoat** — add, edit and delete mains and sides, or import a whole bundle
|
||||
by paste or file upload. Deletes are soft, so old log entries keep showing
|
||||
the dish they used.
|
||||
- **Kirjaa** — log a dinner: pick a dish, tick sides, save. Dishes are ordered
|
||||
and sized by how often they are eaten, so the likely answer is the biggest
|
||||
target. The history sits on the same page underneath: every day back to the
|
||||
first entry, unlogged days shown as explicit gaps, and every row a link that
|
||||
loads that day into the logger above it.
|
||||
- **Ruuat** — add, edit and delete mains and sides, or import a whole bundle
|
||||
by paste or file upload. Grouped by category and alphabetical inside, since
|
||||
this is a list you manage rather than one you pick from. Deletes are soft,
|
||||
so old log entries keep showing the dish they used.
|
||||
- **Light / dark**, remembered per device, dark by default. The button shows
|
||||
the theme that is on — moon while dark, sun while light — not the one a
|
||||
click would bring.
|
||||
|
||||
Still to build:
|
||||
|
||||
- Live search as you type, and paging for the history and catalog lists once
|
||||
years of entries make them long. Both via Datastar.
|
||||
- Category icons instead of plain colour dots — colour and shape together, so
|
||||
a red blob and a yellow blob are told apart by more than hue.
|
||||
- Edit and delete as icons in the catalog rows, and a confirmation step before
|
||||
a delete actually happens.
|
||||
- A background for the header. Something subtle; the palette gets overhauled
|
||||
later.
|
||||
- Stage 2: the seven-meal suggester, which starts once there is history to
|
||||
weight against.
|
||||
|
||||
@@ -99,7 +110,7 @@ make up/down/logs compose
|
||||
|
||||
## Importing dishes
|
||||
|
||||
The **Ruoat** tab takes a bundle of mains and sides: paste the JSON or upload
|
||||
The **Ruuat** tab takes a bundle of mains and sides: paste the JSON or upload
|
||||
a file, and the app reports row by row what it did.
|
||||
|
||||
```json
|
||||
|
||||
Reference in New Issue
Block a user