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

@@ -5,6 +5,9 @@ Protected. Requires a valid session cookie (`credentials: 'include'`).
Create customer group
Creates a customer group for the selected company.
Appends with the next `sort` index. Reserved names `POS` and `Lieferanten`
are not allowed (`Name not allowed`).
## Body (JSON)
@@ -22,7 +25,8 @@ Created customer group
{
"customergroup": {
"id": 1,
"name": "…"
"name": "…",
"sort": 1
}
}
```
@@ -31,7 +35,7 @@ Created customer group
| Status | Description |
|--------|-------------|
| 400 | Name required or no company selected — `{"error":"…"}` |
| 400 | Name required, name not allowed, or no company selected — `{"error":"…"}` |
| 401 | Unauthorized — `{"error":"…"}` |
| 403 | Not authorized — `{"error":"…"}` |
| 404 | Company not found — `{"error":"…"}` |