backend-server-v2/codex-prompt/prompt-7.txt

23 lines
858 B
Plaintext

Implementa modulo “users” sotto /web/templates/private/users.
Routes protette (RequireAuth):
- GET /users -> pagina con search + container tabella
- GET /users/table -> partial HTML tabella (ajax)
- GET /users/:id/modal -> partial HTML contenuto modal
Requisiti tabella:
- query params: q, sort (id|name|email whitelist), dir (asc|desc), page, pageSize
- server-driven paging/sort/search usando GORM (Count + Limit/Offset + Order)
- _table.html deve includere:
- header th cliccabili con fetch GET (toggle dir)
- pager prev/next con fetch GET
- bottone “Apri” che aggiorna `#userModal` via fetch + `innerHTML`
- apri modal via JS minimal: setAttribute('open','') dopo swap (o onclick)
Crea template:
- private/users/index.html
- private/users/_table.html
- private/users/_modal.html
Integra <ui-modal id="userModal"> nella index privata.