fix(documents): gate selected_custom_fields behind editable guard; bound index cap to column width

Addresses review: add selected_custom_fields to offers/issued-orders
NON_STATUS_UPDATE_FIELDS so a non-editable document rejects selection
edits (status-only transitions still pass); tighten Zod cap 200->50 to
stay within VARCHAR(255).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
BOHA
2026-06-16 20:31:58 +02:00
parent 59f555059b
commit fb480d886d
5 changed files with 6 additions and 4 deletions

View File

@@ -45,7 +45,7 @@ export const CreateIssuedOrderSchema = z.object({
// PDF. Omitted/empty ⇒ none. Update schema derives via .partial().
selected_custom_fields: z
.array(z.number().int().nonnegative())
.max(200)
.max(50)
.optional(),
});