From 353fd7b8ba895a9c075a54940e2a6e2d00982518 Mon Sep 17 00:00:00 2001 From: Chloe Date: Mon, 13 Mar 2023 10:05:28 +0700 Subject: [PATCH] add promotion stackability with same type option Signed-off-by: Chloe --- src/pages/Promotions/constants.ts | 1 + src/types/promotions.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/Promotions/constants.ts b/src/pages/Promotions/constants.ts index d790b68..0363bce 100644 --- a/src/pages/Promotions/constants.ts +++ b/src/pages/Promotions/constants.ts @@ -22,6 +22,7 @@ export const DISCOUNT_TYPES_MAP: Record = { export const DATE_FORMAT = "yyyy-MM-dd"; export const PROMOTION_STACKABILITY_OPTIONS: SelectOptionType[] = [ + { label: "Don't Stack with Same Type", value: Stackability.PerType }, { label: "Never Stackable", value: Stackability.None }, { label: "Stack with Any", value: Stackability.All } ]; diff --git a/src/types/promotions.ts b/src/types/promotions.ts index 1a09d3d..1a08907 100644 --- a/src/types/promotions.ts +++ b/src/types/promotions.ts @@ -28,7 +28,8 @@ export enum TriggerType { export enum Stackability { None = "none", - All = "all" + All = "all", + PerType = "per-type" } export type RuleCondition = {