Add TenantCustomTier system and fix BusinessEditModal feature loading

Backend:
- Add TenantCustomTier model for per-tenant feature overrides
- Update EntitlementService to check custom tier before plan features
- Add custom_tier action on TenantViewSet (GET/PUT/DELETE)
- Add Celery task for grace period management (30-day expiry)

Frontend:
- Add DynamicFeaturesEditor component for dynamic feature management
- Fix BusinessEditModal to load features from plan defaults when no custom tier
- Update limits (max_users, max_resources, etc.) to use featureValues
- Remove outdated canonical feature check from FeaturePicker (removes warning icons)
- Add useBillingPlans hook for accessing billing system data
- Add custom tier API functions to platform.ts

Features now follow consistent rules:
- Load from plan defaults when no custom tier exists
- Load from custom tier when one exists
- Reset to plan defaults when plan changes
- Save to custom tier on edit

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
poduck
2025-12-12 21:00:54 -05:00
parent d25c578e59
commit b384d9912a
183 changed files with 47627 additions and 3955 deletions

View File

@@ -114,6 +114,7 @@
"tickets": "Tickets",
"help": "Help",
"contracts": "Contracts",
"locations": "Locations",
"platformGuide": "Platform Guide",
"ticketingHelp": "Ticketing System",
"apiDocs": "API Docs",
@@ -1753,16 +1754,16 @@
"tiers": {
"free": {
"name": "Free",
"description": "Perfect for getting started",
"description": "Perfect for solo practitioners testing the platform.",
"price": "0",
"trial": "Free forever - no trial needed",
"features": [
"Up to 2 resources",
"Basic scheduling",
"Customer management",
"Direct Stripe integration",
"Subdomain (business.smoothschedule.com)",
"Community support"
"1 user",
"1 resource",
"50 appointments/month",
"Online booking",
"Email reminders",
"Basic reporting"
],
"transactionFee": "2.5% + $0.30 per transaction"
},
@@ -1797,53 +1798,73 @@
},
"enterprise": {
"name": "Enterprise",
"description": "For large organizations",
"price": "Custom",
"description": "For multi-location and white-label needs.",
"price": "199",
"trial": "14-day free trial",
"features": [
"All Business features",
"Custom integrations",
"Dedicated success manager",
"SLA guarantees",
"Custom contracts",
"On-premise option"
"Unlimited users & resources",
"Unlimited appointments",
"Multi-location support",
"White label branding",
"Priority support",
"Dedicated account manager",
"SLA guarantees"
],
"transactionFee": "Custom transaction fees"
},
"starter": {
"name": "Starter",
"description": "Perfect for solo practitioners and small studios.",
"description": "Perfect for small businesses getting started.",
"cta": "Start Free",
"features": {
"0": "1 User",
"1": "Unlimited Appointments",
"2": "1 Active Automation",
"3": "Basic Reporting",
"4": "Email Support"
"0": "3 Users",
"1": "5 Resources",
"2": "200 Appointments/month",
"3": "Payment Processing",
"4": "Mobile App Access"
},
"notIncluded": {
"0": "Custom Domain",
"1": "Python Scripting",
"2": "White-Labeling",
"3": "Priority Support"
"0": "SMS Reminders",
"1": "Custom Domain",
"2": "Integrations",
"3": "API Access"
}
},
"growth": {
"name": "Growth",
"description": "For growing teams needing SMS and integrations.",
"cta": "Start Trial",
"features": {
"0": "10 Users",
"1": "15 Resources",
"2": "1,000 Appointments/month",
"3": "SMS Reminders",
"4": "Custom Domain",
"5": "Integrations"
},
"notIncluded": {
"0": "API Access",
"1": "Advanced Reporting",
"2": "Team Permissions"
}
},
"pro": {
"name": "Pro",
"description": "For growing businesses that need automation.",
"description": "For established businesses needing API and analytics.",
"cta": "Start Trial",
"features": {
"0": "5 Users",
"1": "Unlimited Appointments",
"2": "5 Active Automations",
"3": "Advanced Reporting",
"4": "Priority Email Support",
"5": "SMS Reminders"
"0": "25 Users",
"1": "50 Resources",
"2": "5,000 Appointments/month",
"3": "API Access",
"4": "Advanced Reporting",
"5": "Team Permissions",
"6": "Audit Logs"
},
"notIncluded": {
"0": "Custom Domain",
"1": "Python Scripting",
"2": "White-Labeling"
"0": "Multi-location",
"1": "White Label",
"2": "Priority Support"
}
}
},
@@ -1865,7 +1886,62 @@
"question": "Is my data safe?",
"answer": "Absolutely. We use dedicated secure vaults to physically isolate your data from other customers. Your business data is never mixed with anyone else's."
}
}
},
"featureComparison": {
"title": "Compare Plans",
"subtitle": "See exactly what you get with each plan",
"features": "Features",
"categories": {
"limits": "Usage Limits",
"communication": "Communication",
"booking": "Booking & Payments",
"integrations": "Integrations & API",
"branding": "Branding & Customization",
"enterprise": "Enterprise Features",
"support": "Support",
"storage": "Storage"
},
"features": {
"max_users": "Team members",
"max_resources": "Resources",
"max_locations": "Locations",
"max_services": "Services",
"max_customers": "Customers",
"max_appointments_per_month": "Appointments/month",
"email_enabled": "Email notifications",
"max_email_per_month": "Emails/month",
"sms_enabled": "SMS reminders",
"max_sms_per_month": "SMS/month",
"masked_calling_enabled": "Masked calling",
"online_booking": "Online booking",
"recurring_appointments": "Recurring appointments",
"payment_processing": "Accept payments",
"mobile_app_access": "Mobile app",
"integrations_enabled": "Third-party integrations",
"api_access": "API access",
"max_api_calls_per_day": "API calls/day",
"custom_domain": "Custom domain",
"custom_branding": "Custom branding",
"remove_branding": "Remove \"Powered by\"",
"white_label": "White label",
"multi_location": "Multi-location management",
"team_permissions": "Team permissions",
"audit_logs": "Audit logs",
"advanced_reporting": "Advanced analytics",
"priority_support": "Priority support",
"dedicated_account_manager": "Dedicated account manager",
"sla_guarantee": "SLA guarantee",
"max_storage_mb": "File storage"
}
},
"loadError": "Unable to load pricing. Please try again later.",
"savePercent": "Save ~17%",
"perYear": "/year",
"trialDays": "{{days}}-day free trial",
"freeForever": "Free forever",
"custom": "Custom",
"getStartedFree": "Get Started Free",
"startTrial": "Start Free Trial"
},
"testimonials": {
"title": "Loved by Businesses Everywhere",