Compare commits
1 commit
signer-abs
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 4739ec0127 |
3 changed files with 28 additions and 1 deletions
20
docs/cms.md
20
docs/cms.md
|
|
@ -70,6 +70,26 @@ Both use the same data source (`GET /restaurants/{id}/orders`)
|
||||||
filtered by status. The KDS view escalates color by age (`>5min`
|
filtered by status. The KDS view escalates color by age (`>5min`
|
||||||
orange, `>15min` red) and offers one-tap state transitions.
|
orange, `>15min` red) and offers one-tap state transitions.
|
||||||
|
|
||||||
|
When a card transitions to `accepted` (driven by `cookingMode(order)`
|
||||||
|
in `kds.js`), three inline `:style` bindings kick in:
|
||||||
|
|
||||||
|
- the items `q-card-section` switches base font between `1rem` and
|
||||||
|
`1.25rem`,
|
||||||
|
- the modifier list (`.text-caption.text-grey-7`) bumps to `1.15rem`
|
||||||
|
+ medium weight + `color: inherit` (drops the muted grey),
|
||||||
|
- the per-line note (`.text-caption.text-amber-9`) bumps to `1.15rem`
|
||||||
|
+ medium weight; color is left alone so it stays amber.
|
||||||
|
|
||||||
|
All cooking-mode styling is inline because an upstream `!important`
|
||||||
|
rule (likely an lnbits theme override on Quasar's typography
|
||||||
|
utilities) defeats class-based CSS rules — even with `!important`
|
||||||
|
on our side. Inline `:style` wins without needing the arms race.
|
||||||
|
Card chrome and the age-based `bg-{color}-1` from `cardClass()`
|
||||||
|
are untouched. The amber
|
||||||
|
per-line note keeps its color because only `.text-grey-7` is
|
||||||
|
overridden. No background rules; card chrome and the age-based
|
||||||
|
`bg-{color}-1` from `cardClass()` are untouched.
|
||||||
|
|
||||||
Today the monitor + KDS poll every 5–8 s. SSE / Nostr push is on
|
Today the monitor + KDS poll every 5–8 s. SSE / Nostr push is on
|
||||||
the roadmap.
|
the roadmap.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ window.app = Vue.createApp({
|
||||||
statusColor(status) {
|
statusColor(status) {
|
||||||
return {paid: 'positive', accepted: 'blue', ready: 'amber'}[status] || 'grey'
|
return {paid: 'positive', accepted: 'blue', ready: 'amber'}[status] || 'grey'
|
||||||
},
|
},
|
||||||
|
cookingMode(order) {
|
||||||
|
return order && order.status === 'accepted'
|
||||||
|
},
|
||||||
cardClass(order) {
|
cardClass(order) {
|
||||||
// Visually escalate as orders age. >5min = highlight; >15min = alarm.
|
// Visually escalate as orders age. >5min = highlight; >15min = alarm.
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,9 @@
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-separator></q-separator>
|
<q-separator></q-separator>
|
||||||
<q-card-section style="font-size: 1rem">
|
<q-card-section
|
||||||
|
:style="{'font-size': cookingMode(order) ? '1.25rem' : '1rem'}"
|
||||||
|
>
|
||||||
<div v-for="line in order._items || []" :key="line.id">
|
<div v-for="line in order._items || []" :key="line.id">
|
||||||
<div>
|
<div>
|
||||||
<strong v-text="line.quantity + 'x'"></strong>
|
<strong v-text="line.quantity + 'x'"></strong>
|
||||||
|
|
@ -46,6 +48,7 @@
|
||||||
<div
|
<div
|
||||||
v-if="line.selected_modifiers && line.selected_modifiers.length"
|
v-if="line.selected_modifiers && line.selected_modifiers.length"
|
||||||
class="text-caption text-grey-7 q-pl-md"
|
class="text-caption text-grey-7 q-pl-md"
|
||||||
|
:style="cookingMode(order) ? 'font-size: 1.15rem; font-weight: 500; color: inherit' : ''"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-for="(m, i) in line.selected_modifiers"
|
v-for="(m, i) in line.selected_modifiers"
|
||||||
|
|
@ -58,6 +61,7 @@
|
||||||
<div
|
<div
|
||||||
v-if="line.note"
|
v-if="line.note"
|
||||||
class="text-caption text-amber-9 q-pl-md"
|
class="text-caption text-amber-9 q-pl-md"
|
||||||
|
:style="cookingMode(order) ? 'font-size: 1.15rem; font-weight: 500' : ''"
|
||||||
>
|
>
|
||||||
<q-icon name="info" size="xs"></q-icon>
|
<q-icon name="info" size="xs"></q-icon>
|
||||||
<span v-text="line.note"></span>
|
<span v-text="line.note"></span>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue