feat(frontend): add user permissions CRUD page#1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b477078bd8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <div class="flex flex-col gap-4"> | ||
| <div> | ||
| <label for="permissionId" class="block font-bold mb-2">Code</label> | ||
| <input id="permissionId" type="text" pInputText [(ngModel)]="permission.id" required fluid [disabled]="!!permission.id && !submitted" /> |
There was a problem hiding this comment.
Keep permission code editable while creating records
The Code input is bound with [disabled]="!!permission.id && !submitted", which disables the field immediately after the first character is typed during creation (submitted is still false). In practice this prevents entering normal multi-character permission IDs and breaks the main create flow; after failed submits it can also re-enable the field in edit mode, allowing accidental ID changes even though savePermission() uses id as the update key.
Useful? React with 👍 / 👎.
Motivation
Description
UserPermissionCRUD implementation infrontend/src/app/pages/crud/crud.tsandfrontend/src/app/pages/crud/crud.html, including a dialog for create/edit with client-side validation forid,nameandmodule.moduleandstatuswith select options and status badges; remove dependency on the product service and export features not needed for this screen./logedin/pages/permissionsby updatingfrontend/src/app/pages/pages.routes.tswhile keeping the existingcrudpath available.User Permissionsand link it to/logedin/pages/permissionsinfrontend/src/app/layout/component/app.menu.ts.Testing
cd frontend && npm run build, which completed successfully (Angular build finished; a bundle-size budget warning was reported).Codex Task