feat(10-03): open, edit and save a record with toast and 422 feedback

- The SPA loads the backend::lang bundle before /auth/me, sets the
  document language from meta.locale and renders plural messages with
  Intl.PluralRules; interpolate mirrors phrasebook for :name/:Name/:NAME
- Create and record routes; mapWinterUrl maps recordUrl and redirects
  onto the controller's list, create and record routes only
- List rows open their record; FormView loads the form schema and the
  record, shows context-allowed fields in the span grid, saves values
  keyed by field name and toasts the resolved saved message
- A 422 puts each message under its field (aria-invalid,
  aria-describedby), shows the plural banner, focuses the first invalid
  field in schema order and clears a field's error on change
- The D-05 registry maps text, textarea, number and dropdown; any other
  type renders the unsupported-field box with the type in DM Mono
- The admin OpenAPI document declares the write request bodies
  (AdminRecord, AdminIDsRequest) and the list filter query as a
  deepObject, so the typed client can send them
- New backend::lang form.load_failed key; boardwalk/dist rebuilt
This commit is contained in:
Jakub Zych
2026-09-27 16:43:47 +02:00
parent 453b8ae786
commit 126ca5b8ed
41 changed files with 1930 additions and 37 deletions

View File

@@ -1,6 +1,20 @@
{
"components": {
"schemas": {
"cabana.AdminIDsRequest": {
"properties": {
"ids": {
"items": {
"type": "integer"
},
"type": "array"
}
},
"required": [
"ids"
],
"type": "object"
},
"cabana.AdminLoginData": {
"properties": {
"access_token": {
@@ -1665,6 +1679,17 @@
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/cabana.AdminRecord"
}
}
},
"description": "Setting values keyed by field name",
"required": true
},
"responses": {
"200": {
"content": {
@@ -1863,6 +1888,19 @@
"schema": {
"type": "integer"
}
},
{
"description": "Filter values keyed by filter name, sent as filter[\u003cname\u003e]=\u003cvalue\u003e",
"explode": true,
"in": "query",
"name": "filter",
"schema": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"style": "deepObject"
}
],
"responses": {
@@ -1958,6 +1996,17 @@
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/cabana.AdminRecord"
}
}
},
"description": "Field values keyed by field name; relation fields carry ids",
"required": true
},
"responses": {
"201": {
"content": {
@@ -2052,6 +2101,17 @@
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/cabana.AdminIDsRequest"
}
}
},
"description": "Record ids",
"required": true
},
"responses": {
"200": {
"content": {
@@ -2840,6 +2900,17 @@
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/cabana.AdminRecord"
}
}
},
"description": "Field values keyed by field name; relation fields carry ids",
"required": true
},
"responses": {
"200": {
"content": {
@@ -3176,6 +3247,17 @@
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/cabana.AdminIDsRequest"
}
}
},
"description": "Related record ids",
"required": true
},
"responses": {
"200": {
"content": {
@@ -3288,6 +3370,17 @@
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/cabana.AdminIDsRequest"
}
}
},
"description": "Related record ids",
"required": true
},
"responses": {
"200": {
"content": {