feat(contracts): Add contracts permission to subscription tiers
- Add contracts_enabled field to SubscriptionPlan model
- Add contracts toggle to plan create/edit modal in platform settings
- Hide contracts menu item for tenants without contracts permission
- Protect /contracts routes with canUse('contracts') check
- Add HasContractsPermission to contracts API ViewSets
- Add contracts to PlanPermissions interface and feature definitions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -60,12 +60,14 @@ export const useCurrentBusiness = () => {
|
||||
white_label: false,
|
||||
custom_oauth: false,
|
||||
plugins: false,
|
||||
tasks: false,
|
||||
export_data: false,
|
||||
video_conferencing: false,
|
||||
two_factor_auth: false,
|
||||
masked_calling: false,
|
||||
pos_system: false,
|
||||
mobile_app: false,
|
||||
contracts: false,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
@@ -91,6 +91,7 @@ export const FEATURE_NAMES: Record<FeatureKey, string> = {
|
||||
masked_calling: 'Masked Calling',
|
||||
pos_system: 'POS System',
|
||||
mobile_app: 'Mobile App',
|
||||
contracts: 'Contracts',
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -111,4 +112,5 @@ export const FEATURE_DESCRIPTIONS: Record<FeatureKey, string> = {
|
||||
masked_calling: 'Use masked phone numbers to protect privacy',
|
||||
pos_system: 'Process in-person payments with Point of Sale',
|
||||
mobile_app: 'Access SmoothSchedule on mobile devices',
|
||||
contracts: 'Create and manage contracts with customers',
|
||||
};
|
||||
|
||||
@@ -51,6 +51,8 @@ export interface SubscriptionPlan {
|
||||
masked_calling_price_per_minute_cents: number;
|
||||
proxy_number_enabled: boolean;
|
||||
proxy_number_monthly_fee_cents: number;
|
||||
// Contracts feature
|
||||
contracts_enabled: boolean;
|
||||
// Default credit settings
|
||||
default_auto_reload_enabled: boolean;
|
||||
default_auto_reload_threshold_cents: number;
|
||||
@@ -82,6 +84,8 @@ export interface SubscriptionPlanCreate {
|
||||
masked_calling_price_per_minute_cents?: number;
|
||||
proxy_number_enabled?: boolean;
|
||||
proxy_number_monthly_fee_cents?: number;
|
||||
// Contracts feature
|
||||
contracts_enabled?: boolean;
|
||||
// Default credit settings
|
||||
default_auto_reload_enabled?: boolean;
|
||||
default_auto_reload_threshold_cents?: number;
|
||||
|
||||
Reference in New Issue
Block a user