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:
@@ -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(),
|
||||
]),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user