feat(settings): ticket lookup editors in the Settings hub (MAPPS-172) #150
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/mapps-172-ticket-lookup-editors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
MAPPS-172: client editors for the five ticket lookup tables, wired to the management CRUD that shipped in PMS-321. Completes the "anything with a standard type" part of the MAPPS-169 Settings hub for tickets.
A new Tickets group on the
/settingshub links to five sub-routes, each a paginated list + create/edit/delete modal following the existing Work Types / Task Statuses / Asset Types pattern (admin-gated, refetches on tenant switch, sharedSettingFormModalchrome):/api/v1/tickets/statuses(/settings/ticket-statuses)/api/v1/tickets/priorities(/settings/ticket-priorities)/api/v1/tickets/types(/settings/ticket-types)/api/v1/tickets/queues(/settings/ticket-queues)/api/v1/tickets/categories(/settings/ticket-categories)Contract
Fields mirror the as-built PMS-321 DTOs verbatim (verified against
crates/mokosh-types/src/tickets.rsandsrc/modules/tickets/routes.rson server main):Lists consume
PaginatedResponse(page/per_pageparams). Mutations are admin-gated server-side; the client also hides the editors behinduse_is_admin.Category specifics
The category editor offers a parent picker populated from the category list, excluding the row being edited. The server independently rejects self-parenting and deeper cycles (400), so the UI restriction is just a convenience. The list table resolves parent names from the same fetch.
Refactor
Per-modal save/delete logic is factored into shared helpers (
save_lookup= POST-or-PUT,confirm_delete,opt_str,non_empty_color) plus smallColorSwatch/ActiveBadgeview helpers, used by the new editors (and a couple of the existing ones for the color/active cells).Notes
cargo clippy --all-targets -- -D warnings).Test plan
/settings: a "Tickets" group shows five cards.sla_multiplierlike1.5; confirm it round-trips and renders as1.50x.