Skip to content

[Feature] UI: Add archive action to CategoriesPage (admin-only) #124

@mpaulosky

Description

@mpaulosky

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

  • Archive button is visible to admin users only
  • Confirmation dialog appears before archiving
  • Confirmed archive calls DELETE API and removes item from grid
  • Non-admin users cannot see or trigger the archive action
  • Error state handled gracefully

Files

  • src/Web/Components/Features/Categories/CategoriesPage.razor
  • src/Web/Components/Features/Categories/CategoryApiClient.cs

Depends On

Metadata

Metadata

Assignees

No one assigned

    Labels

    go:yesReady to implementpriority:p2Next sprintrelease:backlogNot yet targetedsprint-3Sprint 3 — Full CRUD UI + ArchivesquadSquad triage inbox — Lead will assign to a membersquad:legolasAssigned to Legolas (Frontend Dev)type:featureNew capability

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions