Files
zemailnator/app/Filament
idevakk d767c6cf59 feat(plans): enhance plan management with dynamic providers, improved UI, and bug fixes
Dynamic Provider Integration:
  - Replace hardcoded provider arrays with database-driven payment_providers lookup
  - Display provider status (Active/Inactive) in selection dropdowns
  - Add provider_variant_id and provider_product_id input fields to plan configuration
  - Update EditPlan and SubscriptionForm with dynamic provider selection
  - Add empty state handling with helpful guidance when no providers exist

  UI/UX Improvements:
  - Format billing_cycle_days to readable text (Daily, Weekly, Monthly, Quarterly, Annually)
  - Add color-coded badges for billing cycle frequency
  - Fix plan_providers and plan_feature_limits count display with eager loading
  - Implement intelligent color coding for count indicators
  - Add visual status indicators for provider availability

  Database Compatibility:
  - Fix SQLite strftime() compatibility across all dashboard widgets
  - Fix CAST AS REAL syntax in ChurnAnalysis widget
  - Add database-agnostic date and cast expression methods
  - Support MySQL, SQLite, PostgreSQL, and SQL Server

  Bug Fixes:
  - Fix null reference error in SubscriptionForm provider_data access
  - Add null safety checks for new subscription creation
  - Optimize queries with withCount() to prevent N+1 issues

  Performance Optimizations:
  - Add eager loading with withCount() for relationship counts
  - Optimize plan provider and feature limit queries
  - Prevent N+1 query issues in resource tables

  BREAKING CHANGE: Plan provider configuration now uses dynamic provider options
  from payment_providers table instead of hardcoded list.
2025-12-02 09:47:51 -08:00
..