Add frontend/modules/loyalty with types, API client, design system, feature pages and thin App Router routes under app/loyalty/. BFF proxy at app/api/loyalty/. Include loyalty frontend docs. Co-authored-by: Cursor <cursoragent@cursor.com>
115 lines
3.1 KiB
TypeScript
115 lines
3.1 KiB
TypeScript
/** Loyalty module visual tokens — extends global DS (globals.css). */
|
|
export const loyaltyTokens = {
|
|
accent: "var(--loyalty-accent)",
|
|
accentSoft: "var(--loyalty-accent-soft)",
|
|
success: "var(--loyalty-success)",
|
|
warning: "var(--loyalty-warning)",
|
|
danger: "var(--loyalty-danger)",
|
|
} as const;
|
|
|
|
export const programStatusLabels: Record<string, string> = {
|
|
draft: "پیشنویس",
|
|
active: "فعال",
|
|
suspended: "معلق",
|
|
archived: "بایگانی",
|
|
};
|
|
|
|
export const memberStatusLabels: Record<string, string> = {
|
|
pending: "در انتظار",
|
|
active: "فعال",
|
|
suspended: "معلق",
|
|
frozen: "مسدود",
|
|
expired: "منقضی",
|
|
cancelled: "لغوشده",
|
|
transferred: "منتقلشده",
|
|
closed: "بسته",
|
|
};
|
|
|
|
export const tierStatusLabels: Record<string, string> = {
|
|
active: "فعال",
|
|
inactive: "غیرفعال",
|
|
archived: "بایگانی",
|
|
};
|
|
|
|
export const pointAccountStatusLabels: Record<string, string> = {
|
|
open: "باز",
|
|
frozen: "مسدود",
|
|
closed: "بسته",
|
|
};
|
|
|
|
export const ledgerEntryTypeLabels: Record<string, string> = {
|
|
earn: "کسب امتیاز",
|
|
redeem: "استفاده امتیاز",
|
|
adjust: "تعدیل",
|
|
expire: "انقضا",
|
|
};
|
|
|
|
export const rewardTypeLabels: Record<string, string> = {
|
|
coupon: "کوپن",
|
|
discount: "تخفیف",
|
|
cashback: "بازگشت وجه",
|
|
voucher: "واچر",
|
|
gift: "هدیه",
|
|
custom: "سفارشی",
|
|
};
|
|
|
|
export const rewardStatusLabels: Record<string, string> = {
|
|
draft: "پیشنویس",
|
|
active: "فعال",
|
|
inactive: "غیرفعال",
|
|
archived: "بایگانی",
|
|
};
|
|
|
|
export const redemptionStatusLabels: Record<string, string> = {
|
|
pending: "در انتظار",
|
|
fulfilled: "انجامشده",
|
|
cancelled: "لغوشده",
|
|
expired: "منقضی",
|
|
};
|
|
|
|
export const campaignStatusLabels: Record<string, string> = {
|
|
draft: "پیشنویس",
|
|
scheduled: "زمانبندیشده",
|
|
active: "فعال",
|
|
paused: "متوقف",
|
|
expired: "منقضی",
|
|
archived: "بایگانی",
|
|
};
|
|
|
|
export const campaignApplicationStatusLabels: Record<string, string> = {
|
|
applied: "اعمالشده",
|
|
reversed: "برگشتخورده",
|
|
};
|
|
|
|
export const referralProgramStatusLabels: Record<string, string> = {
|
|
draft: "پیشنویس",
|
|
active: "فعال",
|
|
inactive: "غیرفعال",
|
|
};
|
|
|
|
export const referralCodeStatusLabels: Record<string, string> = {
|
|
active: "فعال",
|
|
revoked: "ابطالشده",
|
|
};
|
|
|
|
export const referralAttributionStatusLabels: Record<string, string> = {
|
|
pending: "در انتظار",
|
|
converted: "تبدیلشده",
|
|
rewarded: "پاداشگرفته",
|
|
cancelled: "لغوشده",
|
|
};
|
|
|
|
export const walletAccountStatusLabels: Record<string, string> = {
|
|
open: "باز",
|
|
frozen: "مسدود",
|
|
closed: "بسته",
|
|
};
|
|
|
|
export const walletLedgerEntryTypeLabels: Record<string, string> = {
|
|
credit: "واریز",
|
|
debit: "برداشت",
|
|
adjust: "تعدیل",
|
|
transfer_in: "انتقال ورودی",
|
|
transfer_out: "انتقال خروجی",
|
|
};
|