Queue Supply run toggles made offline and replay them in order (Feature 17)
A toggle made while the server cannot be reached (the browser is offline, or its PATCH fails with a network error) now stays pending in the existing serial toggle mutation, laid over the list with a "will sync" marker, and is sent once the network status says the server is reachable again. Every toggle is saved in order in localStorage until it settles, and SupplyRunSync replays the saved ones after a reload. Any answer from the server settles a toggle: a 409 archived discards it, puts the count back and shows the refusal; other refusals surface as before and are never queued. The Supply run and the household schedule are saved on the device too, so the Supply run screen opens offline from the saved list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -200,6 +200,21 @@
|
||||
color: var(--color-neutral-700);
|
||||
}
|
||||
|
||||
/* Toggled while the server cannot be reached: the change is saved here and
|
||||
sent once it can be. */
|
||||
.willSync {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
margin-left: 8px;
|
||||
font-family: var(--font-body);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
color: var(--color-neutral-700);
|
||||
text-decoration: none;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.qty {
|
||||
flex: none;
|
||||
font-family: var(--font-body);
|
||||
|
||||
Reference in New Issue
Block a user