Skip to content

Implement Student Soft Delete & Filter Tabs #942

@americac

Description

@americac

!!! Blocked By: #941 !!!

Description:
Add soft delete/restore functionality with filter tabs for Students.

Tasks:

  • Update Admin::StudentsController:
    • Override destroy to use discard instead of hard delete
    • Add restore action for undiscarding students
    • Implement scoped_resource to filter by discarded status (:discarded, :all)
  • Update views:
    • Create custom index header with filter tabs (Active, Discarded, All)
    • Create custom collection item actions with Restore/Discard buttons
    • Add Turbo confirmation dialogs
  • Add query param handling for filter switching

Files to Create/Update:

  • app/views/admin/students/_index_header.html.erb
  • app/views/admin/students/_collection_item_actions.html.erb

Reference:

  • app/controllers/admin/students_controller.rb (lines 42-45, 47-54)
  • app/views/admin/students/_index_header.html.erb (current)
  • app/views/admin/students/_collection_item_actions.html.erb (current)
  • app/dashboards/student_dashboard.rb (COLLECTION_FILTERS)

Metadata

Metadata

Assignees

Labels

blockedIssue blocked by another issue

Type

No type

Projects

Status

In Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions