Add stackable add-ons with compounding integer features
- Add is_stackable field to AddOnProduct model for add-ons that can be purchased multiple times - Add quantity field to SubscriptionAddOn for tracking purchase count - Update EntitlementService to ADD integer add-on values to base plan (instead of max) and multiply by quantity for stackable add-ons - Add feature selection to AddOnEditorModal using FeaturePicker component - Add AddOnFeatureSerializer for nested feature CRUD on add-ons - Fix Create Add-on button styling to use solid blue (was muted outline) - Widen billing sidebar from 320px to 384px to prevent text wrapping 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -175,6 +175,20 @@ export interface PlanCreate {
|
||||
max_custom_domains?: number;
|
||||
}
|
||||
|
||||
export interface AddOnFeature {
|
||||
id: number;
|
||||
feature: Feature;
|
||||
bool_value: boolean | null;
|
||||
int_value: number | null;
|
||||
value: boolean | number | null;
|
||||
}
|
||||
|
||||
export interface AddOnFeatureWrite {
|
||||
feature_code: string;
|
||||
bool_value?: boolean | null;
|
||||
int_value?: number | null;
|
||||
}
|
||||
|
||||
export interface AddOnProduct {
|
||||
id: number;
|
||||
code: string;
|
||||
@@ -184,7 +198,9 @@ export interface AddOnProduct {
|
||||
price_one_time_cents: number;
|
||||
stripe_product_id: string;
|
||||
stripe_price_id: string;
|
||||
is_stackable: boolean;
|
||||
is_active: boolean;
|
||||
features: AddOnFeature[];
|
||||
}
|
||||
|
||||
export interface AddOnProductCreate {
|
||||
@@ -195,7 +211,9 @@ export interface AddOnProductCreate {
|
||||
price_one_time_cents?: number;
|
||||
stripe_product_id?: string;
|
||||
stripe_price_id?: string;
|
||||
is_stackable?: boolean;
|
||||
is_active?: boolean;
|
||||
features?: AddOnFeatureWrite[];
|
||||
}
|
||||
|
||||
// Grandfathering response when updating a version with subscribers
|
||||
|
||||
Reference in New Issue
Block a user