feat(promotion,dashboard,types,utils,medusa): Add statuses to promotions (#10950)

what:

- adds a status column to promotion table
- introduce active promotion query
- scope revert, register and compute actions to active promotions
- admin to create and update promotion with statuses

RESOLVES CMRC-845
RESOLVES CMRC-846
RESOLVES CMRC-847
RESOLVES CMRC-848
RESOLVES CMRC-849
RESOLVES CMRC-850
This commit is contained in:
Riqwan Thamir authored and GitHub committed 2025-01-16 19:17:22 +00:00
1 parent effee5c8bb
commit 5eab9e7399
35 files changed
+1208 -1743

No files matched your search

@@ -13,6 +13,10 @@ const Promotion = model
.index("IDX_promotion_code"),
is_automatic: model.boolean().default(false),
type: model.enum(PromotionUtils.PromotionType).index("IDX_promotion_type"),
status: model
.enum(PromotionUtils.PromotionStatus)
.index("IDX_promotion_status")
.default(PromotionUtils.PromotionStatus.DRAFT),
campaign: model
.belongsTo(() => Campaign, {
mappedBy: "promotions",