diff --git a/frontend/src/api/platform.ts b/frontend/src/api/platform.ts index 9cff902..cbe02a9 100644 --- a/frontend/src/api/platform.ts +++ b/frontend/src/api/platform.ts @@ -28,6 +28,10 @@ export interface PlatformBusiness { phone?: string; // Platform permissions can_manage_oauth_credentials: boolean; + can_accept_payments: boolean; + can_use_custom_domain: boolean; + can_white_label: boolean; + can_api_access: boolean; } export interface PlatformBusinessUpdate { @@ -37,6 +41,10 @@ export interface PlatformBusinessUpdate { max_users?: number; max_resources?: number; can_manage_oauth_credentials?: boolean; + can_accept_payments?: boolean; + can_use_custom_domain?: boolean; + can_white_label?: boolean; + can_api_access?: boolean; } export interface PlatformBusinessCreate { diff --git a/frontend/src/pages/platform/components/BusinessEditModal.tsx b/frontend/src/pages/platform/components/BusinessEditModal.tsx index ae9c550..56c3256 100644 --- a/frontend/src/pages/platform/components/BusinessEditModal.tsx +++ b/frontend/src/pages/platform/components/BusinessEditModal.tsx @@ -19,6 +19,24 @@ const BusinessEditModal: React.FC = ({ business, isOpen, max_users: 5, max_resources: 10, can_manage_oauth_credentials: false, + can_accept_payments: false, + can_use_custom_domain: false, + can_white_label: false, + can_api_access: false, + // New feature limits (not yet implemented) + limits: { + can_add_video_conferencing: false, + max_event_types: null as number | null, + max_calendars_connected: null as number | null, + can_connect_to_api: false, + can_book_repeated_events: false, + can_require_2fa: false, + can_download_logs: false, + can_delete_data: false, + can_use_masked_phone_numbers: false, + can_use_pos: false, + can_use_mobile_app: false, + }, }); // Update form when business changes @@ -31,6 +49,23 @@ const BusinessEditModal: React.FC = ({ business, isOpen, max_users: business.max_users || 5, max_resources: business.max_resources || 10, can_manage_oauth_credentials: business.can_manage_oauth_credentials || false, + can_accept_payments: business.can_accept_payments || false, + can_use_custom_domain: business.can_use_custom_domain || false, + can_white_label: business.can_white_label || false, + can_api_access: business.can_api_access || false, + limits: { + can_add_video_conferencing: false, + max_event_types: null, + max_calendars_connected: null, + can_connect_to_api: false, + can_book_repeated_events: false, + can_require_2fa: false, + can_download_logs: false, + can_delete_data: false, + can_use_masked_phone_numbers: false, + can_use_pos: false, + can_use_mobile_app: false, + }, }); } }, [business]); @@ -156,24 +191,264 @@ const BusinessEditModal: React.FC = ({ business, isOpen, Platform Permissions - {/* Can Manage OAuth Credentials */} -
-
- -

- Allow this business to configure their own OAuth app credentials -

+
+ {/* Can Manage OAuth Credentials */} +
+
+ +

+ Allow this business to configure their own OAuth app credentials +

+
+
- + + {/* Can Accept Payments */} +
+
+ +

+ Enable Stripe Connect for payment processing +

+
+ +
+ + {/* Can Use Custom Domain */} +
+
+ +

+ Allow custom domain configuration +

+
+ +
+ + {/* Can White Label */} +
+
+ +

+ Allow removal of SmoothSchedule branding +

+
+ +
+ + {/* Can API Access */} +
+
+ +

+ Enable API access for integrations +

+
+ +
+
+
+ + {/* Feature Limits (Not Yet Implemented) */} +
+
+ + + Coming Soon + +
+
+ {/* Video Conferencing */} + + + {/* Event Types Limit */} +
+ +
+
+ Unlimited event types +
+ +
+
+ + {/* Calendars Connected Limit */} +
+ +
+
+ Unlimited calendar connections +
+ +
+
+ + {/* API Access */} + + + {/* Repeated Events */} + + + {/* 2FA */} + + + {/* Download Logs */} + + + {/* Delete Data */} + + + {/* Masked Phone Numbers */} + + + {/* POS Integration */} + + + {/* Mobile App */} +
diff --git a/smoothschedule/platform_admin/serializers.py b/smoothschedule/platform_admin/serializers.py index f0bb3c9..f9fc2b8 100644 --- a/smoothschedule/platform_admin/serializers.py +++ b/smoothschedule/platform_admin/serializers.py @@ -72,6 +72,10 @@ class TenantUpdateSerializer(serializers.ModelSerializer): 'max_users', 'max_resources', # Platform permissions 'can_manage_oauth_credentials', + 'can_accept_payments', + 'can_use_custom_domain', + 'can_white_label', + 'can_api_access', ] read_only_fields = ['id']