Skip to content

feat(admin): PublicTicketsSettings Filament page for guest policy#24

Open
mpge wants to merge 1 commit intomainfrom
feat/admin-public-tickets-settings
Open

feat(admin): PublicTicketsSettings Filament page for guest policy#24
mpge wants to merge 1 commit intomainfrom
feat/admin-public-tickets-settings

Conversation

@mpge
Copy link
Copy Markdown
Member

@mpge mpge commented Apr 24, 2026

Summary

Filament host-adapter side of the new public-ticket guest policy feature (escalated#32). Adds a new Filament admin page under Support → Public Tickets that lets admins configure the guest policy mode at runtime.

What's added

  • `src/Pages/PublicTicketsSettings.php` — Filament page class mirroring the `SsoSettings` pattern already in the plugin.
  • `resources/views/pages/support-public-tickets-settings.blade.php` — one-line view (standard Filament form-save template).
  • `resources/lang/en/filament.php` — English strings for the page title, mode labels, section headers, and helper text.
  • `src/EscalatedFilamentPlugin.php` — registers the new page in the plugin's `->pages([...])` list.

Form

  • Mode dropdown (`unassigned` / `guest_user` / `prompt_signup`) with live conditional sections.
  • `Shared guest user` section appears only when mode=`guest_user` with a required numeric user-id input.
  • `Signup invite` section appears only when mode=`prompt_signup` with an optional URL template input (supports `{{email}}` placeholder).
  • Save handler rejects unknown modes (falls back to `unassigned`) and clears fields that don't apply to the selected mode.

Persistence

Uses `Escalated\Laravel\Models\EscalatedSettings` — the same backing store as the Laravel adapter. Hosts running Filament + Laravel in the same app will see the same values whether they wrote via the Filament page or the Laravel controller.

Test plan

  • Navigate to Support → Public Tickets after merge; verify all three modes save correctly and conditional fields persist only when active.
  • Switch from guest_user → unassigned; verify the stored user-id is cleared.

Adds a new Filament admin page that mirrors the Laravel /
Rails / Django / Adonis / WordPress settings for the public-ticket
guest policy. Persists via the shared Escalated\Laravel\Models\EscalatedSettings
model so the widget controller reads the same values regardless of
which host adapter (Laravel-native or Filament) wrote them.

Form uses Filament's live conditional sections: shared-user-id
field appears only when mode=guest_user; signup URL template
appears only when mode=prompt_signup. Save handler clears fields
that don't apply to the selected mode so stale values don't leak.
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