Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As user I want to prevent my promotion from stacking with other promotions of the same type #209

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/pages/Promotions/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const DISCOUNT_TYPES_MAP: Record<PromotionType, string> = {
export const DATE_FORMAT = "yyyy-MM-dd";

export const PROMOTION_STACKABILITY_OPTIONS: SelectOptionType<Stackability>[] = [
{ label: "Don't Stack with Same Type", value: Stackability.PerType },
{ label: "Never Stackable", value: Stackability.None },
{ label: "Stack with Any", value: Stackability.All }
];
Expand Down
3 changes: 2 additions & 1 deletion src/types/promotions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export enum TriggerType {

export enum Stackability {
None = "none",
All = "all"
All = "all",
PerType = "per-type"
}

export type RuleCondition = {
Expand Down