feat(shop-admin): manage flash-sale sessions and activity items

Add a flash-sale page where a shop user lists, creates, edits, and deletes its
own sessions and their SKU activity items, setting the fixed sale price,
currency, reserved stock, and per-customer limit. Expose it as a flash-sale
navigation entry beside the existing shop operations.
This commit is contained in:
2026-09-18 12:53:26 +00:00
parent 2125ae437f
commit 26773f7890
3 changed files with 507 additions and 0 deletions
+64
View File
@@ -6,6 +6,7 @@ export const enExtra = {
},
nav: {
coupons: "Coupons",
flashSales: "Flash sales",
},
shop: {
dashboardTitle: "Merchant dashboard",
@@ -85,6 +86,37 @@ export const enExtra = {
couponWindowInvalid: "End must not precede start.",
enabledOn: "Enabled",
enabledOff: "Disabled",
flashSaleList: "Flash sales",
newFlashSale: "New session",
editFlashSale: "Edit session",
flashLabelEn: "Label (English)",
flashLabelZh: "Label (中文)",
flashStartsAt: "Starts at",
flashEndsAt: "Ends at",
flashEnabled: "Enabled",
createFlashSale: "Create session",
updateFlashSale: "Update session",
flashSaleSaved: "Session saved.",
flashItemSaved: "Activity item saved.",
flashItems: "Activity items",
noFlashItems: "No activity items yet.",
newFlashItem: "Add activity item",
editFlashItem: "Edit activity item",
flashSku: "SKU",
flashSelectSku: "Select a SKU",
flashSalePrice: "Sale price (minor units)",
flashReservedStock: "Reserved stock",
flashPerCustomerLimit: "Per-customer limit",
saveFlashItem: "Save item",
flashOriginalPrice: "Catalog price",
flashSold: "Sold",
flashRemaining: "Remaining",
flashLabelRequired: "Both language labels are required.",
flashSkuRequired: "Choose a SKU.",
flashPriceInvalid: "Sale price must be a positive integer.",
flashStockInvalid: "Reserved stock cannot be negative.",
flashLimitInvalid: "Per-customer limit must be a positive integer.",
flashWindowInvalid: "End must not precede start.",
},
} as Record<string, unknown>;
@@ -94,6 +126,7 @@ export const zhExtra = {
},
nav: {
coupons: "优惠券",
flashSales: "秒杀",
},
shop: {
dashboardTitle: "商家仪表盘",
@@ -173,5 +206,36 @@ export const zhExtra = {
couponWindowInvalid: "结束时间不能早于开始时间。",
enabledOn: "已启用",
enabledOff: "已停用",
flashSaleList: "秒杀活动",
newFlashSale: "新建场次",
editFlashSale: "编辑场次",
flashLabelEn: "标题(英文)",
flashLabelZh: "标题(中文)",
flashStartsAt: "开始时间",
flashEndsAt: "结束时间",
flashEnabled: "启用",
createFlashSale: "创建场次",
updateFlashSale: "更新场次",
flashSaleSaved: "场次已保存。",
flashItemSaved: "活动商品已保存。",
flashItems: "活动商品",
noFlashItems: "暂无活动商品。",
newFlashItem: "添加活动商品",
editFlashItem: "编辑活动商品",
flashSku: "SKU",
flashSelectSku: "请选择 SKU",
flashSalePrice: "秒杀价(最小单位)",
flashReservedStock: "活动库存",
flashPerCustomerLimit: "每人限购",
saveFlashItem: "保存商品",
flashOriginalPrice: "原价",
flashSold: "已售",
flashRemaining: "剩余",
flashLabelRequired: "中英文标题均为必填项。",
flashSkuRequired: "请选择 SKU。",
flashPriceInvalid: "秒杀价必须为正整数。",
flashStockInvalid: "活动库存不能为负数。",
flashLimitInvalid: "每人限购必须为正整数。",
flashWindowInvalid: "结束时间不能早于开始时间。",
},
} as Record<string, unknown>;