Let a site choose the order its board rows run in

Rows ran in display-style order and then alphabetically, so what led the screen
was an accident of styling and the alphabet - a new type called Awareness
landed above Recertification for no better reason than the letter A.

Each type now carries a board position, lowest first, set on the Notification
Types page. The migration seeds Recognition at 10 and Recertification at 20 and
leaves everything else at 100, so an existing board keeps the order sites
already expect. Steps of ten leave room to slot a row in without renumbering
the rest.

A row shared by several types sits wherever its earliest-ordered type puts it,
so a category moves as a unit.
This commit is contained in:
cproudlock
2026-08-08 14:20:35 -04:00
parent adb8542018
commit 442a631557
6 changed files with 208 additions and 3 deletions

View File

@@ -33,6 +33,7 @@
<span class="mono">{{ t.typecolor }}</span>
</td>
<td>
<span class="badge">#{{ t.boardorder ?? 100 }}</span>
<span class="badge">{{ t.displaystyle || 'standard' }}</span>
<span v-if="t.boardcategory" class="badge badge-secondary">{{ t.boardcategory }}</span>
</td>
@@ -90,6 +91,17 @@
</select>
</label>
<label class="field">
<span>Board order</span>
<input v-model.number="form.boardorder" type="number" min="0" max="999" step="10" />
<small class="muted">
Where this type's row sits on the shopfloor board, lowest first
(Recognition 10, Recertification 20, everything else 100). Leave
gaps so a new row can be slotted in without renumbering. Types
sharing a category take the lowest order among them.
</small>
</label>
<label class="field">
<span>Board category (optional)</span>
<input v-model="form.boardcategory" type="text" maxlength="50"
@@ -230,6 +242,7 @@ function openNew() {
expiryhour: null,
gracewindowminutes: 0,
boardcategory: '',
boardorder: 100,
isactive: true
}
editing.value = true
@@ -250,6 +263,7 @@ function openEdit(t) {
expiryhour: t.expiryhour ?? null,
gracewindowminutes: t.gracewindowminutes ?? 0,
boardcategory: t.boardcategory || '',
boardorder: t.boardorder ?? 100,
isactive: t.isactive !== false
}
editing.value = true