Summary
CategoriesPage.razor shows a grid with Edit actions but has no way to archive or delete a category. Once the API endpoint exists (see #120), this UI work adds the archive action — admin-only, with confirmation.
Context
The page uses RadzenDataGrid with inline edit. The action column currently has only an Edit button. Admin-only actions follow the pattern established in IssueDetailPage.razor (which uses ConfirmDialog for comment deletion).
Work Required
Archive Button
- Add an "Archive" button to the action column — visible only to admins (
AuthorizeView Policy="Admin")
- Style consistently with existing buttons (Radzen
ButtonStyle.Danger or an archive variant)
- Wire to a
HandleArchive(string id) method
Confirmation Dialog
- Use the existing
ConfirmDialog component (or equivalent) before submitting
- Text: "Archive '[CategoryName]'? It will no longer appear in issue forms."
API Call + Feedback
- Call
CategoryApiClient.ArchiveAsync(id) (update the client to add this method)
- On success: remove the row from the grid without full reload (optimistic UI)
- On failure: show an error notification
Optional: Archived Filter Toggle
- Add a "Show archived" checkbox/toggle to the filter bar
- Pass to
GetAllAsync to optionally include archived items (requires API param support)
Acceptance Criteria
Files
src/Web/Components/Features/Categories/CategoriesPage.razor
src/Web/Components/Features/Categories/CategoryApiClient.cs
Depends On
Summary
CategoriesPage.razorshows a grid with Edit actions but has no way to archive or delete a category. Once the API endpoint exists (see #120), this UI work adds the archive action — admin-only, with confirmation.Context
The page uses
RadzenDataGridwith inline edit. The action column currently has only an Edit button. Admin-only actions follow the pattern established inIssueDetailPage.razor(which usesConfirmDialogfor comment deletion).Work Required
Archive Button
AuthorizeView Policy="Admin")ButtonStyle.Dangeror an archive variant)HandleArchive(string id)methodConfirmation Dialog
ConfirmDialogcomponent (or equivalent) before submittingAPI Call + Feedback
CategoryApiClient.ArchiveAsync(id)(update the client to add this method)Optional: Archived Filter Toggle
GetAllAsyncto optionally include archived items (requires API param support)Acceptance Criteria
Files
src/Web/Components/Features/Categories/CategoriesPage.razorsrc/Web/Components/Features/Categories/CategoryApiClient.csDepends On