Skip to content

feat: add approve/reject modal action to EditSubmissionPage #21

@danielhe4rt

Description

@danielhe4rt

Extend the Filament EditSubmissionPage to include a new page action that opens a modal allowing reviewers to approve or reject a Submission for the #100DaysOfCode workflow.


Requirements

1. New Page Action

Add a custom action to EditSubmissionPage:

  • Label: Review Submission
  • Icon: heroicon-o-check-circle (or similar)
  • Action opens a modal (Filament Action::make()->modal())
  • The modal must present a Select field:
Select::make('status')
    ->options(SubmissionStatus::class)
    ->required();
  • The reviewer chooses either:

    • approved
    • rejected

2. Modal Behavior

  • On submit:

    • Update the Submission model’s status
    • Save a timestamp approved_at if applicable
    • Save the approver_id as the authenticated user.

3. UI Notes

  • Keep the modal small and focused (single field + confirm button)
  • Show a success notification after the status changes

4. Acceptance Criteria

  • The page displays a new “Review Submission” action consistently beside default Filament actions.
  • Clicking the action opens the modal with the status selector.
  • Status updates correctly and persists in the database.
  • Action is fully compatible with Filament 3 page lifecycle.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions