Add customergroup bulk reorder and list editable flag.

Expose PUT /customergroup/order for exact-set sort updates, keep create/update name-only, and mark POS/Lieferanten as non-editable in list responses.
This commit is contained in:
seb
2026-08-07 03:40:40 +02:00
parent cdae7b6eab
commit 57fd3b4837
9 changed files with 344 additions and 23 deletions

View File

@@ -4,7 +4,10 @@ Protected. Requires a valid session cookie (`credentials: 'include'`).
List customer groups
Lists customer groups for the authenticated user's selected company.
Lists customer groups for the selected company, ordered by `sort`.
Each item includes `editable`: `false` for implicit `POS` / `Lieferanten`
(name locked), `true` otherwise. Reorder via `PUT /customergroup/order`.
## Response `200`
@@ -15,7 +18,9 @@ Customer group list
"customergroups": [
{
"id": 1,
"name": "…"
"name": "…",
"sort": 1,
"editable": true
}
]
}