fix(plans): prevent deletion of plans with active subscriptions

- Fix bulk delete and individual delete actions using before() hook with halt()
  - Add daily/weekly billing cycle options to plan resource and Polar provider
  - Enhance payment confirmation with dynamic polling and loading states
  - Add graceful handling for deleted plans in subscription display
  - Update Polar provider to support dynamic billing cycles
This commit is contained in:
idevakk
2025-12-07 02:23:14 -08:00
parent 1b438cbf89
commit 5fabec1f9d
7 changed files with 225 additions and 93 deletions

View File

@@ -62,12 +62,15 @@ class EditPlan extends EditRecord
Select::make('billing_cycle_days')
->label('Billing Cycle')
->options([
1 => 'Daily',
7 => 'Weekly',
30 => 'Monthly',
90 => 'Quarterly',
365 => 'Yearly',
60 => 'Bi-Monthly',
90 => 'Quarterly',
180 => 'Semi-Annual',
365 => 'Yearly',
])
->default(30)
->required(),
]),