Add product applicability controls to promotion forms
Introduces product selection and exclusion controls to both new and edit promotion forms, allowing promotions to target all, specific, or all-but-specific products. Adds a reusable ProductSelector component, updates promotion types to support new fields, and adjusts cookie max-age for authentication. Also adds two new business quotes.
This commit is contained in:
@@ -11,6 +11,9 @@ export interface Promotion {
|
||||
startDate: string;
|
||||
endDate: string | null;
|
||||
description: string;
|
||||
blacklistedProducts: string[];
|
||||
applicableProducts: 'all' | 'specific' | 'exclude_specific';
|
||||
specificProducts: string[];
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
@@ -25,4 +28,14 @@ export interface PromotionFormData {
|
||||
startDate: string;
|
||||
endDate: string | null;
|
||||
description: string;
|
||||
blacklistedProducts: string[];
|
||||
applicableProducts: 'all' | 'specific' | 'exclude_specific';
|
||||
specificProducts: string[];
|
||||
}
|
||||
|
||||
export interface Product {
|
||||
_id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
enabled: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user