Skip to content

AP-042 Incident Oversight page - #559

Open
pratigya245 wants to merge 1 commit into
mainfrom
pratigya245/feature/ap-042-incident-oversight
Open

AP-042 Incident Oversight page#559
pratigya245 wants to merge 1 commit into
mainfrom
pratigya245/feature/ap-042-incident-oversight

Conversation

@pratigya245

Copy link
Copy Markdown
Collaborator

Summary

Adds the Incident Oversight page to the Admin Panel — a list/detail view for guard-submitted incidents with severity and status filters, and admin-driven status updates.

What's included

  • Incidents.jsx — list page with search, severity filter, status filter
  • IncidentDetails.jsx — detail view with a status-advance action (SUBMITTED → IN_REVIEW → RESOLVED)
  • adminAPI.jsgetIncidents, getIncident, updateIncident
  • Routes registered at /incidents and /incidents/:id
  • Sidebar nav entry with icon

Scope note

The ticket assumed the incidents backend wasn't ready and called for a mock-data-first approach with a follow-up wiring task. Since the backend was already live (full CRUD + severity/status/date filters, RBAC-gated), I skipped mocking and wired directly to the real API — so this covers both the "Mock data" and "Wire incidents API" checklist items in one pass.

Bug found + fixed

While testing, admin/employer/guard all hit "Insufficient permissions" on incident endpoints. Root cause: seedRoles.js's DB-seeded Role permissions were never updated when the incident feature was added, even though rbac.js's in-code fallback list already included incident:* permissions for these roles. Fixed by adding the missing permissions to seedRoles.js for admin, employer, and guard.

Evidence

detail view filter Page

Checklist

  • Incident list + filters
  • Detail view
  • Status update
  • Mock data (superseded — wired to live API instead)
  • Wire incidents API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant