@feedmepos/mf-connect 0.1.98-beta.73 → 0.1.98-beta.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-C4XD_vWL.js → App-BU-KKX-n.js} +550 -526
- package/dist/{AuditLogs-DpevHGsA.js → AuditLogs-CmLqBgj6.js} +15 -13
- package/dist/{Bin-FRrYZ8pV.js → Bin-Zbera_MK.js} +8 -8
- package/dist/{Broadcast-CoefxWt-.js → Broadcast-CYgMTWI5.js} +89 -86
- package/dist/{CampaignAnalytic-CdZjzsLr.js → CampaignAnalytic-UNTkez3N.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DQOLEDzY.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CfaXdAeW.js} +8 -6
- package/dist/{Card-BABL96V6.js → Card-CdoDOGUZ.js} +25 -23
- package/dist/{Collections-D6XuhBO1.js → Collections-CdeMQQCd.js} +8 -8
- package/dist/{Credit-D2WTeN8Z.js → Credit-BAP0k14-.js} +12 -12
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-B0KkvFWi.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CBn5qXw2.js} +1 -1
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-G2oU70Ef.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bk9ZmCSP.js} +38 -35
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-C4RByg0k.js → EffectSheet.vue_vue_type_style_index_0_lang-OUHg9s8b.js} +6 -6
- package/dist/{Experience-CUqmspwT.js → Experience-Dq4FXfGp.js} +87 -84
- package/dist/{FileSaver.min-DX17A8Gj.js → FileSaver.min-CCrEHqr_.js} +1 -1
- package/dist/{Game-D8IvyDdA.js → Game-BjgPoHzZ.js} +13 -13
- package/dist/{GiftCardSetup-BOSKBH8c.js → GiftCardSetup-CLKjBRXP.js} +10 -10
- package/dist/GoalPickerPanel.vue_vue_type_script_setup_true_lang-zCMcelvk.js +417 -0
- package/dist/Goals-B_DvaaRc.js +244 -0
- package/dist/{Grab-CnBGt_H2.js → Grab-C9QKHF9-.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BI00YCKv.js → ImageInput.vue_vue_type_script_setup_true_lang-CYoMZ7Rd.js} +1 -1
- package/dist/{Index-BovDOTbf.js → Index-DjyD4Ukt.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-D8auavm7.js → LocationPicker.vue_vue_type_script_setup_true_lang-D32lT_JS.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BM99IoIG.js → LottieAnimation.vue_vue_type_script_setup_true_lang-C8pCFjzw.js} +1 -1
- package/dist/{LoyaltyDashboard-DiCQnQ76.js → LoyaltyDashboard-gEfgYtBH.js} +1213 -1170
- package/dist/{MainLayout-Cg37dK-P.js → MainLayout-BZd3nvw4.js} +3 -3
- package/dist/{Marketing-DRCT9dBo.js → Marketing-vXzXx-ht.js} +4 -4
- package/dist/{MarketingMaterialEdit-DcE0A8_A.js → MarketingMaterialEdit-CodE48Pa.js} +6 -6
- package/dist/{Member-C8T1-ywK.js → Member-DmjIle-d.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-CTl8LtJ9.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-BkOC-rzc.js} +27 -25
- package/dist/{MemberImportHistory-CYCxxxN7.js → MemberImportHistory-Ds92Kmv3.js} +7 -7
- package/dist/{MemberList-Ddlnm4JX.js → MemberList-DRAygZjh.js} +14 -14
- package/dist/{MemberTransactions-DwyZTeZb.js → MemberTransactions-COQKjSaO.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BWCxGlQO.js → MessageInput.vue_vue_type_script_setup_true_lang-C1N1Q9KC.js} +10 -10
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-LdVeH7gh.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-hUZ6DRV3.js} +1 -1
- package/dist/{Mission-CW0y8Bzw.js → Mission-DVEvVeg9.js} +84 -81
- package/dist/{Overview-i2XPL7Pu.js → Overview-Lb2EDuKr.js} +4 -4
- package/dist/{Overview-CO4T3l6l.js → Overview-dKPDCTby.js} +23 -21
- package/dist/{Point-CNWdfqQZ.js → Point-HERJxwkG.js} +108 -99
- package/dist/{Promotion-DAemCP79.js → Promotion-C1O48NJ4.js} +96 -93
- package/dist/{Queue-DI50gMny.js → Queue-CIlcqlHV.js} +15 -13
- package/dist/{Record-DX3WHXku.js → Record-CbAQRpe2.js} +9 -9
- package/dist/{Review-DzSNG4Le.js → Review-C_aPrryB.js} +2 -2
- package/dist/{ReviewFacebookCallback-CrdRUN3t.js → ReviewFacebookCallback-zLjyKeV8.js} +5 -5
- package/dist/{ReviewGoogleCallback-Da28WNzU.js → ReviewGoogleCallback-DzJFf6UO.js} +5 -5
- package/dist/{Reward-DUQAE99I.js → Reward-kLTp1_Ph.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BGAOPkwD.js → RewardGroup.vue_vue_type_script_setup_true_lang-dzsAihqZ.js} +26 -24
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-B9Dbe9no.js → RuleGroup.vue_vue_type_script_setup_true_lang-BQDwwF1P.js} +17 -15
- package/dist/{Segment-BgVf2-G2.js → Segment-Blo6pvlP.js} +35 -32
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DDLXF5HM.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DI2f-icN.js} +31 -29
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-9UiH43em.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRYqib7b.js} +4 -4
- package/dist/Setting-BqfHAaJ4.js +573 -0
- package/dist/{SettingAdvertisements-C40QcuSn.js → SettingAdvertisements-BBWGPfr6.js} +12 -12
- package/dist/{Settings-DT9bypKs.js → Settings-xIvDU54B.js} +5 -5
- package/dist/{Store-DQyOUfEJ.js → Store-B4LKdCMI.js} +30 -27
- package/dist/{StoreRewards-Dr_c0PbO.js → StoreRewards-DioYcpoB.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Bh5h8Lc_.js → StoreTransactions.vue_vue_type_script_setup_true_lang-D8Aomf51.js} +45 -43
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-LquvtnTy.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-zau-k4F2.js} +2 -2
- package/dist/{Tier-DmqfEWcB.js → Tier-Byj8iaqs.js} +915 -922
- package/dist/{Title-Dx6pcJfP.js → Title-B47H9-3j.js} +25 -23
- package/dist/{Transaction-CD6agt6m.js → Transaction-Dv5d9njL.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CNjBtitb.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BuitfoqE.js} +6 -6
- package/dist/Voucher-Cxz8pkd-.js +837 -0
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Bv--fzY0.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CyF6pfdh.js} +12 -12
- package/dist/WhatsappBot-DEt2cwdQ.js +577 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Bq_7U0NO.js → ZodTextField.vue_vue_type_script_setup_true_lang-CoxyeE0y.js} +2 -2
- package/dist/{app-CmqX1V1B.js → app-Cy05FPyq.js} +1471 -918
- package/dist/app.js +1 -1
- package/dist/{base.export-guVE-B2c.js → base.export-CtX7g_L1.js} +2 -2
- package/dist/browser-BSAOEeIM.js +1478 -0
- package/dist/{business-DXmGtwPm.js → business-DwhrC6ZF.js} +1 -1
- package/dist/{campaign-CVXbgs-y.js → campaign-BPm7kwff.js} +2 -2
- package/dist/{campaign-D9Jufumh.js → campaign-RHNw7ITA.js} +9 -9
- package/dist/{campaign.enum-CXhYMbkx.js → campaign.enum-Dx-Zo68Q.js} +1 -1
- package/dist/{campaign.fn-DoJPn6yl.js → campaign.fn-Bg4cy9as.js} +77 -77
- package/dist/{collectible.enum-Tk6LIMMm.js → collectible.enum-Liy2wH3s.js} +1 -1
- package/dist/{collection.fn-DCVNYQau.js → collection.fn-TRu13bwb.js} +2 -2
- package/dist/{currency-BYhkCI6F.js → currency-B8eK9hdV.js} +1 -1
- package/dist/{duplicateCampaign-BOVBZHFs.js → duplicateCampaign-CGXCaVuj.js} +2 -2
- package/dist/{effect-e6wYWgc8.js → effect-OZ5p9rDk.js} +1 -1
- package/dist/{email-addresses-Dcd_vAeM.js → email-addresses-BZjfvPMn.js} +2 -2
- package/dist/{helper-DluoQ6zi.js → helper-WVL8SABi.js} +1 -1
- package/dist/{index-DB51l5yi.js → index-BGpXgY7W.js} +1 -1
- package/dist/{index-ChYMoLaB.js → index-BY_JWg4s.js} +1 -1
- package/dist/{index-qkkPuNFM.js → index-BrnzIo_o.js} +168 -155
- package/dist/{index-C9JY8Ru6.js → index-BzKV72Cd.js} +2 -2
- package/dist/index-C7RUAv0i.js +167 -0
- package/dist/index-C_H8jFYf.js +2743 -0
- package/dist/{index-BFzBAm6P.js → index-CcYZyfxy.js} +1 -1
- package/dist/{index-DIP_uzZm.js → index-CdUgMl41.js} +18 -17
- package/dist/{index-DoiGG41P.js → index-CicyjdaK.js} +8 -7
- package/dist/index-Cp2qabkb.js +28 -0
- package/dist/{index-DKrJlWH3.js → index-D5hnwmRx.js} +4 -4
- package/dist/{index-CiJQlOu7.js → index-D755ywwR.js} +11 -9
- package/dist/{index-CDdNExzM.js → index-DQO1iioy.js} +1 -1
- package/dist/{index-C-oypk0K.js → index-DcO-Tg44.js} +8027 -10766
- package/dist/{index-SQItAw7w.js → index-Df6TpLRF.js} +3 -3
- package/dist/{index-CBRWvjup.js → index-DzNxG_QU.js} +1202 -79
- package/dist/{index-2QCDTrA9.js → index-J5zd25r3.js} +2 -2
- package/dist/{index-BpAhyOgv.js → index-KakYLwk1.js} +1 -1
- package/dist/{index-BAs9N7bi.js → index-MRXHlUhf.js} +20 -19
- package/dist/{index-SS72WJs_.js → index-U0xt4ckb.js} +1 -1
- package/dist/{index-kPcRcSFx.js → index-co2uO7IC.js} +2 -2
- package/dist/{index.esm2017-BLVWhb4f.js → index.esm2017-xVDCuu7s.js} +37 -37
- package/dist/{loading-ClX4Z1ZH.js → loading-BiPCW0qK.js} +1 -1
- package/dist/{lodash-Cxh2BWuW.js → lodash-P_PMkPFg.js} +1 -1
- package/dist/{member-import-DKfSDn0D.js → member-import-Dc0ZuxZn.js} +6 -5
- package/dist/{membership-BBAosVNQ.js → membership-GQhLFMct.js} +3 -3
- package/dist/{money-CWzvdiFT.js → money-kIVXcKX4.js} +1 -1
- package/dist/{number-Cp7TGBzd.js → number-D15D84XS.js} +1 -1
- package/dist/{objectid-CXWfUmP_.js → objectid-DbtWoaPC.js} +12 -12
- package/dist/onboarding-B9rm_U_k.js +129 -0
- package/dist/onboardingSetup-DFET-PDE.js +17 -0
- package/dist/{plugins-BKD6oEHa.js → plugins-DrEJvnRW.js} +3 -3
- package/dist/{reward-CrjStT4w.js → reward-C8T99546.js} +1 -1
- package/dist/{rule-CBZRptRM.js → rule-BB_Uo0iG.js} +20 -18
- package/dist/{template-D4qWK9tk.js → template-B7oaySuH.js} +6 -6
- package/dist/{timezone-t0WxSk3e.js → timezone-DN2mMeK6.js} +1 -1
- package/dist/{transaction.fn-DZp6Drqf.js → transaction.fn-BHBTwOI9.js} +2 -2
- package/dist/{trigger-DN5yeimJ.js → trigger-D5xsNhoR.js} +5 -5
- package/dist/{useMarketingMaterialActions-ChkZyyRO.js → useMarketingMaterialActions-CKtANGYF.js} +3 -3
- package/dist/{usePagination-Vda9U5Dh.js → usePagination-Cxv7buJt.js} +1 -1
- package/dist/{user-jEjTV3E6.js → user-CXp-0Sc-.js} +1 -1
- package/dist/{vue-i18n-Bg_RJ_GV.js → vue-i18n-DU1J-6Fe.js} +455 -455
- package/dist/{xlsx-unW4U5Tx.js → xlsx-CaGnvtHp.js} +224 -224
- package/dist/{zod-DIsCEUuE.js → zod-DPK1tAj-.js} +1 -1
- package/package.json +1 -1
- package/dist/Setting-3jW6EbKA.js +0 -2047
- package/dist/Voucher-P4dyOeUd.js +0 -444
|
@@ -1,33 +1,35 @@
|
|
|
1
|
-
import { defineComponent as Z, resolveComponent as M, openBlock as c, createBlock as
|
|
2
|
-
import { m as
|
|
3
|
-
import { g as K, S as
|
|
4
|
-
import { c as
|
|
5
|
-
import { u as Q } from "./vue-i18n-
|
|
6
|
-
import { _ as
|
|
7
|
-
import { h as
|
|
8
|
-
import { m as
|
|
9
|
-
import { _ as
|
|
10
|
-
import { _ as
|
|
11
|
-
import { _ as
|
|
12
|
-
import { c as
|
|
13
|
-
import { t as
|
|
14
|
-
import { u as
|
|
15
|
-
import { u as
|
|
16
|
-
import { C as
|
|
17
|
-
import { useCoreStore as
|
|
18
|
-
|
|
1
|
+
import { defineComponent as Z, resolveComponent as M, openBlock as c, createBlock as N, withCtx as U, createElementVNode as a, toDisplayString as r, unref as o, createElementBlock as d, Fragment as k, renderList as W, normalizeClass as T, createVNode as f, withKeys as Ge, withModifiers as Je, createCommentVNode as z, createTextVNode as ge, normalizeStyle as Pt, mergeModels as Bt, useModel as Tt, ref as S, computed as $, watch as Ye, onBeforeUnmount as Nt, isRef as lt, nextTick as xt, reactive as Ut, onMounted as zt } from "vue";
|
|
2
|
+
import { m as De } from "./index-BY_JWg4s.js";
|
|
3
|
+
import { g as K, S as Vt, b as jt, c as Kt } from "./index-BzKV72Cd.js";
|
|
4
|
+
import { c as qt } from "./index-J5zd25r3.js";
|
|
5
|
+
import { u as Q } from "./vue-i18n-DU1J-6Fe.js";
|
|
6
|
+
import { _ as xe } from "./MetricInfoTooltip.vue_vue_type_script_setup_true_lang-hUZ6DRV3.js";
|
|
7
|
+
import { h as Yt } from "./moment-D7p2TMB-.js";
|
|
8
|
+
import { m as Ht } from "./index-co2uO7IC.js";
|
|
9
|
+
import { _ as wt } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
|
|
10
|
+
import { _ as it } from "./DateRangeChip.vue_vue_type_script_setup_true_lang-CBn5qXw2.js";
|
|
11
|
+
import { _ as Wt } from "./MemberDetailSheet.vue_vue_type_script_setup_true_lang-BkOC-rzc.js";
|
|
12
|
+
import { c as Gt, n as ht } from "./plugins-DrEJvnRW.js";
|
|
13
|
+
import { t as Jt } from "./money-kIVXcKX4.js";
|
|
14
|
+
import { u as Zt } from "./loading-BiPCW0qK.js";
|
|
15
|
+
import { u as Qt } from "./business-DwhrC6ZF.js";
|
|
16
|
+
import { C as vt } from "./timezone-DN2mMeK6.js";
|
|
17
|
+
import { useCoreStore as Xt } from "@feedmepos/mf-common";
|
|
18
|
+
import { _ as ea, a as ta } from "./GoalPickerPanel.vue_vue_type_script_setup_true_lang-zCMcelvk.js";
|
|
19
|
+
import { u as aa, a as oa } from "./onboarding-B9rm_U_k.js";
|
|
20
|
+
const sa = { class: "flex items-center mb-16" }, ra = { class: "flex-1 fm-typo-en-body-md-600" }, na = {
|
|
19
21
|
key: 0,
|
|
20
22
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary py-12"
|
|
21
|
-
},
|
|
23
|
+
}, la = {
|
|
22
24
|
key: 1,
|
|
23
25
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary py-12"
|
|
24
|
-
},
|
|
26
|
+
}, ia = {
|
|
25
27
|
key: 2,
|
|
26
28
|
class: "flex flex-col"
|
|
27
|
-
},
|
|
29
|
+
}, ca = { class: "flex-1 min-w-0" }, da = { class: "fm-typo-en-body-sm-600 whitespace-nowrap overflow-hidden text-ellipsis" }, ma = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4" }, ua = { class: "text-right flex-shrink-0" }, ya = { class: "fm-typo-en-body-lg-600" }, pa = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4" }, ba = {
|
|
28
30
|
key: 3,
|
|
29
31
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary py-12"
|
|
30
|
-
},
|
|
32
|
+
}, fa = /* @__PURE__ */ Z({
|
|
31
33
|
__name: "CampaignActivityList",
|
|
32
34
|
props: {
|
|
33
35
|
campaigns: {},
|
|
@@ -37,45 +39,45 @@ const qt = { class: "flex items-center mb-16" }, Yt = { class: "flex-1 fm-typo-e
|
|
|
37
39
|
setup(e) {
|
|
38
40
|
const { t: s } = Q();
|
|
39
41
|
return (t, n) => {
|
|
40
|
-
const
|
|
41
|
-
return c(),
|
|
42
|
+
const i = M("FmCard");
|
|
43
|
+
return c(), N(i, {
|
|
42
44
|
variant: "outlined",
|
|
43
45
|
class: "p-24"
|
|
44
46
|
}, {
|
|
45
47
|
default: U(() => [
|
|
46
|
-
a("div",
|
|
47
|
-
a("div",
|
|
48
|
+
a("div", sa, [
|
|
49
|
+
a("div", ra, r(o(s)("connect.loyalty.dashboard.campaigns.title")), 1)
|
|
48
50
|
]),
|
|
49
|
-
e.loading ? (c(), d("div",
|
|
50
|
-
(c(!0), d(
|
|
51
|
+
e.loading ? (c(), d("div", na, r(o(s)("connect.loyalty.dashboard.campaigns.loading")), 1)) : e.error ? (c(), d("div", la, r(o(s)("connect.loyalty.dashboard.campaigns.error")), 1)) : e.campaigns.length ? (c(), d("div", ia, [
|
|
52
|
+
(c(!0), d(k, null, W(e.campaigns, (y) => (c(), d("div", {
|
|
51
53
|
key: y.id,
|
|
52
54
|
class: "flex items-start gap-8 py-12 border-b border-fm-color-neutral-gray-100 last:border-b-0"
|
|
53
55
|
}, [
|
|
54
56
|
a("div", {
|
|
55
57
|
class: T(["w-[7px] h-[7px] mt-4 rounded-full bg-current flex-shrink-0", y.statusClass])
|
|
56
58
|
}, null, 2),
|
|
57
|
-
a("div",
|
|
58
|
-
a("div",
|
|
59
|
-
a("div",
|
|
59
|
+
a("div", ca, [
|
|
60
|
+
a("div", da, r(y.name), 1),
|
|
61
|
+
a("div", ma, r(y.type), 1)
|
|
60
62
|
]),
|
|
61
|
-
a("div",
|
|
62
|
-
a("div",
|
|
63
|
-
a("div",
|
|
63
|
+
a("div", ua, [
|
|
64
|
+
a("div", ya, r(y.metric), 1),
|
|
65
|
+
a("div", pa, r(y.metricLabel), 1)
|
|
64
66
|
])
|
|
65
67
|
]))), 128))
|
|
66
|
-
])) : (c(), d("div",
|
|
68
|
+
])) : (c(), d("div", ba, r(o(s)("connect.loyalty.dashboard.campaigns.empty")), 1))
|
|
67
69
|
]),
|
|
68
70
|
_: 1
|
|
69
71
|
});
|
|
70
72
|
};
|
|
71
73
|
}
|
|
72
|
-
}),
|
|
74
|
+
}), ha = { class: "flex items-center gap-8" }, va = { class: "w-[30px] h-[30px] bg-fm-color-primary-oats flex items-center justify-center flex-shrink-0 fm-corner-radius-md" }, ga = { class: "fm-typo-en-body-md-600" }, _a = ["aria-label"], xa = {
|
|
73
75
|
key: 1,
|
|
74
76
|
class: "flex min-h-[144px] items-center justify-center text-center fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
75
|
-
},
|
|
77
|
+
}, wa = { class: "bg-fm-color-primary-oats px-16 py-12 fm-corner-radius-md" }, Ra = { class: "fm-typo-en-body-md-600 mb-4" }, Sa = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ma = { class: "flex flex-col gap-8" }, $a = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-tertiary uppercase tracking-wide" }, Ca = { class: "flex flex-col gap-8" }, Fa = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Da = {
|
|
76
78
|
key: 3,
|
|
77
79
|
class: "bg-fm-color-neutral-gray-100 fm-corner-radius-md px-16 py-12 fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
78
|
-
},
|
|
80
|
+
}, Aa = /* @__PURE__ */ Z({
|
|
79
81
|
__name: "InsightPanel",
|
|
80
82
|
props: {
|
|
81
83
|
insight: {},
|
|
@@ -84,23 +86,23 @@ const qt = { class: "flex items-center mb-16" }, Yt = { class: "flex-1 fm-typo-e
|
|
|
84
86
|
},
|
|
85
87
|
setup(e) {
|
|
86
88
|
const s = e, { t } = Q();
|
|
87
|
-
return (n,
|
|
88
|
-
const y = M("FmIcon"), p = M("FmCircularProgress"),
|
|
89
|
-
return c(),
|
|
89
|
+
return (n, i) => {
|
|
90
|
+
const y = M("FmIcon"), p = M("FmCircularProgress"), u = M("FmCard");
|
|
91
|
+
return c(), N(u, {
|
|
90
92
|
variant: "outlined",
|
|
91
93
|
class: "p-24 flex flex-col gap-12"
|
|
92
94
|
}, {
|
|
93
95
|
default: U(() => [
|
|
94
|
-
a("div",
|
|
95
|
-
a("div",
|
|
96
|
-
|
|
96
|
+
a("div", ha, [
|
|
97
|
+
a("div", va, [
|
|
98
|
+
f(y, {
|
|
97
99
|
name: "info",
|
|
98
100
|
outline: "",
|
|
99
101
|
size: "sm",
|
|
100
102
|
class: "!text-fm-color-primary"
|
|
101
103
|
})
|
|
102
104
|
]),
|
|
103
|
-
a("div",
|
|
105
|
+
a("div", ga, r(o(t)("connect.loyalty.dashboard.insight.title")), 1)
|
|
104
106
|
]),
|
|
105
107
|
s.loading ? (c(), d("div", {
|
|
106
108
|
key: 0,
|
|
@@ -108,130 +110,130 @@ const qt = { class: "flex items-center mb-16" }, Yt = { class: "flex-1 fm-typo-e
|
|
|
108
110
|
role: "status",
|
|
109
111
|
"aria-label": o(t)("connect.loyalty.dashboard.accessibility.loading")
|
|
110
112
|
}, [
|
|
111
|
-
|
|
112
|
-
], 8,
|
|
113
|
-
a("div",
|
|
114
|
-
a("div",
|
|
115
|
-
a("div",
|
|
113
|
+
f(p, { size: "lg" })
|
|
114
|
+
], 8, _a)) : s.error ? (c(), d("div", xa, r(o(t)("connect.loyalty.dashboard.states.insightUnavailable")), 1)) : s.insight ? (c(), d(k, { key: 2 }, [
|
|
115
|
+
a("div", wa, [
|
|
116
|
+
a("div", Ra, r(s.insight.title), 1),
|
|
117
|
+
a("div", Sa, r(s.insight.body), 1)
|
|
116
118
|
]),
|
|
117
|
-
a("div",
|
|
118
|
-
a("div",
|
|
119
|
-
a("ul",
|
|
120
|
-
(c(!0), d(
|
|
121
|
-
key:
|
|
119
|
+
a("div", Ma, [
|
|
120
|
+
a("div", $a, r(o(t)("connect.loyalty.dashboard.insight.supportingSignal")), 1),
|
|
121
|
+
a("ul", Ca, [
|
|
122
|
+
(c(!0), d(k, null, W(s.insight.signals, (x) => (c(), d("li", {
|
|
123
|
+
key: x.text,
|
|
122
124
|
class: "flex items-start gap-8"
|
|
123
125
|
}, [
|
|
124
|
-
|
|
125
|
-
a("span",
|
|
126
|
+
i[0] || (i[0] = a("span", { class: "w-[5px] h-[5px] mt-[6px] rounded-full bg-fm-color-neutral-gray-200 flex-shrink-0" }, null, -1)),
|
|
127
|
+
a("span", Fa, r(x.text), 1)
|
|
126
128
|
]))), 128))
|
|
127
129
|
])
|
|
128
130
|
])
|
|
129
|
-
], 64)) : (c(), d("div",
|
|
131
|
+
], 64)) : (c(), d("div", Da, r(o(t)("connect.loyalty.dashboard.insight.empty")), 1))
|
|
130
132
|
]),
|
|
131
133
|
_: 1
|
|
132
134
|
});
|
|
133
135
|
};
|
|
134
136
|
}
|
|
135
|
-
}),
|
|
137
|
+
}), ka = { class: "grid grid-cols-6 xs:grid-cols-2 sm:grid-cols-3 md:grid-cols-3 gap-12" }, Ia = { class: "flex items-center gap-8" }, La = { class: "w-[30px] h-[30px] rounded-8 bg-[#FFF6EE] flex items-center justify-center flex-shrink-0" }, Oa = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary flex-1 min-w-0" }, Ea = { class: "flex min-h-[72px] flex-col" }, Pa = ["aria-label"], Ba = {
|
|
136
138
|
key: 1,
|
|
137
139
|
class: "flex flex-1 items-center justify-center text-center fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
138
|
-
},
|
|
140
|
+
}, Ta = { class: "fm-typo-en-title-sm-800 text-fm-color-typo-primary whitespace-nowrap overflow-hidden text-ellipsis" }, Na = {
|
|
139
141
|
key: 1,
|
|
140
142
|
class: "flex items-center gap-4 flex-wrap"
|
|
141
|
-
},
|
|
143
|
+
}, Ua = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, za = {
|
|
142
144
|
key: 2,
|
|
143
145
|
class: "flex items-center justify-between gap-8 mt-auto fm-typo-en-body-sm-600"
|
|
144
|
-
},
|
|
146
|
+
}, Va = /* @__PURE__ */ Z({
|
|
145
147
|
__name: "KpiStrip",
|
|
146
148
|
props: {
|
|
147
149
|
kpis: {}
|
|
148
150
|
},
|
|
149
151
|
emits: ["select"],
|
|
150
152
|
setup(e, { emit: s }) {
|
|
151
|
-
const t = e, n = s, { t:
|
|
152
|
-
function y(
|
|
153
|
-
|
|
153
|
+
const t = e, n = s, { t: i } = Q();
|
|
154
|
+
function y(u) {
|
|
155
|
+
u.interactive && n("select", u);
|
|
154
156
|
}
|
|
155
|
-
function p(
|
|
156
|
-
const
|
|
157
|
-
return `${
|
|
157
|
+
function p(u) {
|
|
158
|
+
const x = u.loading ? i("connect.loyalty.dashboard.accessibility.loading") : u.error ? i("connect.loyalty.dashboard.states.unavailable") : u.value;
|
|
159
|
+
return `${u.label}: ${x}`;
|
|
158
160
|
}
|
|
159
|
-
return (
|
|
160
|
-
const w = M("FmIcon"), R = M("FmCircularProgress"),
|
|
161
|
-
return c(), d("section",
|
|
162
|
-
(c(!0), d(
|
|
163
|
-
key:
|
|
161
|
+
return (u, x) => {
|
|
162
|
+
const w = M("FmIcon"), R = M("FmCircularProgress"), g = M("FmCard");
|
|
163
|
+
return c(), d("section", ka, [
|
|
164
|
+
(c(!0), d(k, null, W(t.kpis, (h) => (c(), N(g, {
|
|
165
|
+
key: h.label,
|
|
164
166
|
variant: "outlined",
|
|
165
167
|
class: T([
|
|
166
168
|
"flex h-full flex-col gap-8 p-16 min-w-0 overflow-hidden",
|
|
167
|
-
|
|
169
|
+
h.interactive ? "cursor-pointer hover:bg-fm-color-neutral-gray-100" : ""
|
|
168
170
|
]),
|
|
169
|
-
role:
|
|
170
|
-
tabindex:
|
|
171
|
-
"aria-label":
|
|
172
|
-
onClick: (
|
|
171
|
+
role: h.interactive ? "button" : void 0,
|
|
172
|
+
tabindex: h.interactive ? 0 : void 0,
|
|
173
|
+
"aria-label": h.interactive ? p(h) : void 0,
|
|
174
|
+
onClick: (V) => y(h),
|
|
173
175
|
onKeydown: [
|
|
174
|
-
|
|
175
|
-
|
|
176
|
+
Ge(Je((V) => y(h), ["prevent"]), ["enter"]),
|
|
177
|
+
Ge(Je((V) => y(h), ["prevent"]), ["space"])
|
|
176
178
|
]
|
|
177
179
|
}, {
|
|
178
180
|
default: U(() => [
|
|
179
|
-
a("div",
|
|
180
|
-
a("div",
|
|
181
|
-
|
|
182
|
-
name:
|
|
181
|
+
a("div", Ia, [
|
|
182
|
+
a("div", La, [
|
|
183
|
+
f(w, {
|
|
184
|
+
name: h.icon,
|
|
183
185
|
outline: "",
|
|
184
186
|
size: "sm",
|
|
185
187
|
class: "!text-fm-color-primary"
|
|
186
188
|
}, null, 8, ["name"])
|
|
187
189
|
]),
|
|
188
|
-
a("span",
|
|
189
|
-
|
|
190
|
-
description:
|
|
190
|
+
a("span", Oa, r(h.label), 1),
|
|
191
|
+
f(xe, {
|
|
192
|
+
description: h.description
|
|
191
193
|
}, null, 8, ["description"])
|
|
192
194
|
]),
|
|
193
|
-
a("div",
|
|
194
|
-
|
|
195
|
+
a("div", Ea, [
|
|
196
|
+
h.loading ? (c(), d("div", {
|
|
195
197
|
key: 0,
|
|
196
198
|
class: "flex flex-1 items-center justify-center",
|
|
197
199
|
role: "status",
|
|
198
|
-
"aria-label": o(
|
|
200
|
+
"aria-label": o(i)("connect.loyalty.dashboard.accessibility.loading")
|
|
199
201
|
}, [
|
|
200
|
-
|
|
201
|
-
], 8,
|
|
202
|
-
a("div",
|
|
203
|
-
|
|
202
|
+
f(R, { size: "lg" })
|
|
203
|
+
], 8, Pa)) : h.error ? (c(), d("div", Ba, r(o(i)("connect.loyalty.dashboard.states.unavailable")), 1)) : (c(), d(k, { key: 2 }, [
|
|
204
|
+
a("div", Ta, r(h.value), 1),
|
|
205
|
+
h.sub && !h.actionLabel ? (c(), d("div", {
|
|
204
206
|
key: 0,
|
|
205
|
-
class: T(["fm-typo-en-body-sm-600 -mt-4",
|
|
206
|
-
}, r(
|
|
207
|
-
|
|
208
|
-
|
|
207
|
+
class: T(["fm-typo-en-body-sm-600 -mt-4", h.subClass ?? "text-fm-color-typo-success"])
|
|
208
|
+
}, r(h.sub), 3)) : z("", !0),
|
|
209
|
+
h.delta ? (c(), d("div", Na, [
|
|
210
|
+
h.delta !== "0%" && h.delta !== "0pp" ? (c(), N(w, {
|
|
209
211
|
key: 0,
|
|
210
|
-
name:
|
|
212
|
+
name: h.trendUp ? "trending_up" : "trending_down",
|
|
211
213
|
size: "xs",
|
|
212
|
-
class: T(
|
|
213
|
-
}, null, 8, ["name", "class"])) :
|
|
214
|
+
class: T(h.deltaClass)
|
|
215
|
+
}, null, 8, ["name", "class"])) : z("", !0),
|
|
214
216
|
a("span", {
|
|
215
|
-
class: T(["fm-typo-en-body-sm-600",
|
|
216
|
-
}, r(
|
|
217
|
-
a("span",
|
|
218
|
-
])) :
|
|
217
|
+
class: T(["fm-typo-en-body-sm-600", h.deltaClass])
|
|
218
|
+
}, r(h.delta), 3),
|
|
219
|
+
a("span", Ua, r(o(i)("connect.loyalty.dashboard.kpis.previous")), 1)
|
|
220
|
+
])) : h.actionLabel ? (c(), d("div", za, [
|
|
219
221
|
a("span", {
|
|
220
|
-
class: T(
|
|
221
|
-
}, r(
|
|
222
|
+
class: T(h.subClass ?? "text-fm-color-typo-success")
|
|
223
|
+
}, r(h.sub), 3),
|
|
222
224
|
a("span", {
|
|
223
225
|
class: T([
|
|
224
226
|
"flex items-center gap-4",
|
|
225
|
-
|
|
227
|
+
h.interactive ? "text-fm-color-primary" : "text-fm-color-typo-disabled"
|
|
226
228
|
])
|
|
227
229
|
}, [
|
|
228
|
-
|
|
229
|
-
|
|
230
|
+
ge(r(h.actionLabel) + " ", 1),
|
|
231
|
+
f(w, {
|
|
230
232
|
name: "arrow_forward",
|
|
231
233
|
size: "xs"
|
|
232
234
|
})
|
|
233
235
|
], 2)
|
|
234
|
-
])) :
|
|
236
|
+
])) : z("", !0)
|
|
235
237
|
], 64))
|
|
236
238
|
])
|
|
237
239
|
]),
|
|
@@ -240,16 +242,16 @@ const qt = { class: "flex items-center mb-16" }, Yt = { class: "flex-1 fm-typo-e
|
|
|
240
242
|
]);
|
|
241
243
|
};
|
|
242
244
|
}
|
|
243
|
-
}),
|
|
245
|
+
}), ja = { class: "flex items-center mb-16" }, Ka = { class: "flex-1 fm-typo-en-body-md-600" }, qa = ["aria-label"], Ya = {
|
|
244
246
|
key: 1,
|
|
245
247
|
class: "flex min-h-[220px] items-center justify-center text-center fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
246
|
-
},
|
|
248
|
+
}, Ha = {
|
|
247
249
|
key: 2,
|
|
248
250
|
class: "flex flex-col gap-4"
|
|
249
|
-
},
|
|
251
|
+
}, Wa = ["onClick"], Ga = { class: "fm-typo-en-body-sm-600" }, Ja = { class: "fm-typo-en-body-md-600 min-w-[38px] text-right" }, Za = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary min-w-[34px] text-right" }, Qa = {
|
|
250
252
|
key: 3,
|
|
251
253
|
class: "mt-14 pt-12 border-t border-fm-color-neutral-gray-100 fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
252
|
-
},
|
|
254
|
+
}, Xa = /* @__PURE__ */ Z({
|
|
253
255
|
__name: "LifecycleSegments",
|
|
254
256
|
props: {
|
|
255
257
|
segments: {},
|
|
@@ -260,70 +262,70 @@ const qt = { class: "flex items-center mb-16" }, Yt = { class: "flex-1 fm-typo-e
|
|
|
260
262
|
},
|
|
261
263
|
emits: ["select"],
|
|
262
264
|
setup(e, { emit: s }) {
|
|
263
|
-
const t = e, n = s, { t:
|
|
265
|
+
const t = e, n = s, { t: i } = Q();
|
|
264
266
|
return (y, p) => {
|
|
265
|
-
const
|
|
266
|
-
return c(),
|
|
267
|
+
const u = M("FmCircularProgress"), x = M("FmProgressBar"), w = M("FmCard");
|
|
268
|
+
return c(), N(w, {
|
|
267
269
|
variant: "outlined",
|
|
268
270
|
class: "p-24"
|
|
269
271
|
}, {
|
|
270
272
|
default: U(() => [
|
|
271
|
-
a("div",
|
|
272
|
-
a("div",
|
|
273
|
+
a("div", ja, [
|
|
274
|
+
a("div", Ka, r(o(i)("connect.loyalty.dashboard.lifecycle.title")), 1)
|
|
273
275
|
]),
|
|
274
276
|
t.loading ? (c(), d("div", {
|
|
275
277
|
key: 0,
|
|
276
278
|
class: "flex min-h-[220px] items-center justify-center",
|
|
277
279
|
role: "status",
|
|
278
|
-
"aria-label": o(
|
|
280
|
+
"aria-label": o(i)("connect.loyalty.dashboard.accessibility.loading")
|
|
279
281
|
}, [
|
|
280
|
-
|
|
281
|
-
], 8,
|
|
282
|
-
(c(!0), d(
|
|
282
|
+
f(u, { size: "lg" })
|
|
283
|
+
], 8, qa)) : t.error ? (c(), d("div", Ya, r(o(i)("connect.loyalty.dashboard.states.lifecycleUnavailable")), 1)) : (c(), d("div", Ha, [
|
|
284
|
+
(c(!0), d(k, null, W(t.segments, (R) => (c(), d("div", {
|
|
283
285
|
key: R.id,
|
|
284
286
|
class: T([
|
|
285
287
|
"flex items-center gap-9 px-6 py-3 -mx-6 rounded-8",
|
|
286
288
|
t.interactive ? "cursor-pointer hover:bg-fm-color-neutral-gray-100/50" : "cursor-default"
|
|
287
289
|
]),
|
|
288
|
-
onClick: (
|
|
290
|
+
onClick: (g) => t.interactive && n("select", R.id)
|
|
289
291
|
}, [
|
|
290
292
|
a("div", {
|
|
291
293
|
class: T(["flex w-[90px] flex-shrink-0 items-center gap-3", R.labelClass])
|
|
292
294
|
}, [
|
|
293
|
-
a("span",
|
|
294
|
-
|
|
295
|
+
a("span", Ga, r(R.label), 1),
|
|
296
|
+
f(xe, {
|
|
295
297
|
description: R.description
|
|
296
298
|
}, null, 8, ["description"])
|
|
297
299
|
], 2),
|
|
298
|
-
|
|
300
|
+
f(x, {
|
|
299
301
|
class: "flex-1",
|
|
300
302
|
value: R.barPct,
|
|
301
303
|
color: R.barColor,
|
|
302
304
|
size: "lg"
|
|
303
305
|
}, null, 8, ["value", "color"]),
|
|
304
|
-
a("span",
|
|
305
|
-
a("span",
|
|
306
|
-
], 10,
|
|
306
|
+
a("span", Ja, r(R.countStr), 1),
|
|
307
|
+
a("span", Za, r(R.pctStr), 1)
|
|
308
|
+
], 10, Wa))), 128))
|
|
307
309
|
])),
|
|
308
|
-
!t.loading && !t.error ? (c(), d("div",
|
|
310
|
+
!t.loading && !t.error ? (c(), d("div", Qa, r(t.summary), 1)) : z("", !0)
|
|
309
311
|
]),
|
|
310
312
|
_: 1
|
|
311
313
|
});
|
|
312
314
|
};
|
|
313
315
|
}
|
|
314
|
-
}),
|
|
316
|
+
}), eo = { class: "flex items-start gap-8 mb-12" }, to = { class: "flex-1" }, ao = { class: "fm-typo-en-body-md-600" }, oo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4" }, so = ["aria-label"], ro = {
|
|
315
317
|
key: 1,
|
|
316
318
|
class: "flex min-h-[280px] items-center justify-center text-center fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
317
|
-
},
|
|
319
|
+
}, no = { key: 2 }, lo = {
|
|
318
320
|
key: 0,
|
|
319
321
|
class: "flex items-start pl-[152px] xs:pl-0 xs:justify-center"
|
|
320
|
-
},
|
|
322
|
+
}, io = { class: "flex flex-col items-start" }, co = { class: "flex items-center gap-8" }, mo = {
|
|
321
323
|
key: 0,
|
|
322
324
|
class: "fm-typo-en-body-sm-600 text-fm-color-typo-warning bg-fm-color-system-warning-100 px-8 py-[2px] rounded-xxxl whitespace-nowrap"
|
|
323
|
-
},
|
|
325
|
+
}, uo = ["onClick"], yo = { class: "min-w-0" }, po = { class: "flex items-center gap-3 fm-typo-en-body-sm-600" }, bo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mt-4" }, fo = { class: "min-w-0 text-right" }, ho = { class: "fm-typo-en-body-lg-600" }, vo = {
|
|
324
326
|
key: 0,
|
|
325
327
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary"
|
|
326
|
-
},
|
|
328
|
+
}, go = { class: "mt-12 pt-12 border-t border-fm-color-neutral-gray-100" }, _o = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary text-right" }, xo = /* @__PURE__ */ Z({
|
|
327
329
|
__name: "MemberFunnel",
|
|
328
330
|
props: {
|
|
329
331
|
stages: {},
|
|
@@ -334,21 +336,21 @@ const qt = { class: "flex items-center mb-16" }, Yt = { class: "flex-1 fm-typo-e
|
|
|
334
336
|
},
|
|
335
337
|
emits: ["select"],
|
|
336
338
|
setup(e, { emit: s }) {
|
|
337
|
-
const t = e, n = s, { t:
|
|
339
|
+
const t = e, n = s, { t: i } = Q();
|
|
338
340
|
function y(p) {
|
|
339
341
|
t.interactive && n("select", p);
|
|
340
342
|
}
|
|
341
|
-
return (p,
|
|
342
|
-
const
|
|
343
|
-
return c(),
|
|
343
|
+
return (p, u) => {
|
|
344
|
+
const x = M("FmCircularProgress"), w = M("FmProgressBar"), R = M("FmCard");
|
|
345
|
+
return c(), N(R, {
|
|
344
346
|
variant: "outlined",
|
|
345
347
|
class: "p-24"
|
|
346
348
|
}, {
|
|
347
349
|
default: U(() => [
|
|
348
|
-
a("div",
|
|
349
|
-
a("div",
|
|
350
|
-
a("div",
|
|
351
|
-
a("div",
|
|
350
|
+
a("div", eo, [
|
|
351
|
+
a("div", to, [
|
|
352
|
+
a("div", ao, r(o(i)("connect.loyalty.dashboard.funnel.title")), 1),
|
|
353
|
+
a("div", oo, r(o(i)(
|
|
352
354
|
t.interactive ? "connect.loyalty.dashboard.funnel.interactiveHint" : "connect.loyalty.dashboard.funnel.staticHint"
|
|
353
355
|
)), 1)
|
|
354
356
|
])
|
|
@@ -357,55 +359,55 @@ const qt = { class: "flex items-center mb-16" }, Yt = { class: "flex-1 fm-typo-e
|
|
|
357
359
|
key: 0,
|
|
358
360
|
class: "flex min-h-[280px] items-center justify-center",
|
|
359
361
|
role: "status",
|
|
360
|
-
"aria-label": o(
|
|
362
|
+
"aria-label": o(i)("connect.loyalty.dashboard.accessibility.loading")
|
|
361
363
|
}, [
|
|
362
|
-
|
|
363
|
-
], 8,
|
|
364
|
-
(c(!0), d(
|
|
365
|
-
key:
|
|
364
|
+
f(x, { size: "lg" })
|
|
365
|
+
], 8, so)) : t.error ? (c(), d("div", ro, r(o(i)("connect.loyalty.dashboard.states.funnelUnavailable")), 1)) : (c(), d("div", no, [
|
|
366
|
+
(c(!0), d(k, null, W(t.stages, (g, h) => (c(), d("div", {
|
|
367
|
+
key: g.id
|
|
366
368
|
}, [
|
|
367
|
-
|
|
368
|
-
a("div",
|
|
369
|
-
|
|
370
|
-
a("div",
|
|
369
|
+
g.hasDropLine ? (c(), d("div", lo, [
|
|
370
|
+
a("div", io, [
|
|
371
|
+
u[0] || (u[0] = a("div", { class: "w-[1px] h-[4px] bg-fm-color-neutral-gray-100 ml-[9px]" }, null, -1)),
|
|
372
|
+
a("div", co, [
|
|
371
373
|
a("span", {
|
|
372
|
-
class: T(["fm-typo-en-body-sm-600 px-8 py-[2px] rounded-xxxl whitespace-nowrap",
|
|
373
|
-
}, r(
|
|
374
|
-
|
|
374
|
+
class: T(["fm-typo-en-body-sm-600 px-8 py-[2px] rounded-xxxl whitespace-nowrap", g.dropClass])
|
|
375
|
+
}, r(g.conversionStr), 3),
|
|
376
|
+
g.isBiggestDrop ? (c(), d("span", mo, r(o(i)("connect.loyalty.dashboard.funnel.biggestDrop")), 1)) : z("", !0)
|
|
375
377
|
]),
|
|
376
|
-
|
|
378
|
+
u[1] || (u[1] = a("div", { class: "w-[1px] h-[4px] bg-fm-color-neutral-gray-100 ml-[9px]" }, null, -1))
|
|
377
379
|
])
|
|
378
|
-
])) :
|
|
380
|
+
])) : z("", !0),
|
|
379
381
|
a("div", {
|
|
380
382
|
class: T([
|
|
381
383
|
"grid grid-cols-[140px_minmax(0,1fr)_72px] xs:grid-cols-[minmax(0,1fr)_auto] items-center gap-x-12 gap-y-8 py-4 px-8 -mx-8 rounded-md",
|
|
382
384
|
t.interactive ? "cursor-pointer hover:bg-fm-color-neutral-gray-100/50" : ""
|
|
383
385
|
]),
|
|
384
|
-
onClick: (
|
|
386
|
+
onClick: (V) => y(g.id)
|
|
385
387
|
}, [
|
|
386
|
-
a("div",
|
|
387
|
-
a("div",
|
|
388
|
-
a("span", null, r(
|
|
389
|
-
|
|
390
|
-
description:
|
|
388
|
+
a("div", yo, [
|
|
389
|
+
a("div", po, [
|
|
390
|
+
a("span", null, r(g.label), 1),
|
|
391
|
+
f(xe, {
|
|
392
|
+
description: g.description
|
|
391
393
|
}, null, 8, ["description"])
|
|
392
394
|
]),
|
|
393
|
-
a("div",
|
|
395
|
+
a("div", bo, r(g.desc), 1)
|
|
394
396
|
]),
|
|
395
|
-
|
|
397
|
+
f(w, {
|
|
396
398
|
class: "min-w-0 xs:col-span-2 xs:row-start-2",
|
|
397
|
-
value:
|
|
398
|
-
color:
|
|
399
|
+
value: g.barWidthPct,
|
|
400
|
+
color: g.barColor,
|
|
399
401
|
size: "lg"
|
|
400
402
|
}, null, 8, ["value", "color"]),
|
|
401
|
-
a("div",
|
|
402
|
-
a("div",
|
|
403
|
-
|
|
403
|
+
a("div", fo, [
|
|
404
|
+
a("div", ho, r(g.countStr), 1),
|
|
405
|
+
g.hasConvRate ? (c(), d("div", vo, r(g.convRateLabel), 1)) : z("", !0)
|
|
404
406
|
])
|
|
405
|
-
], 10,
|
|
407
|
+
], 10, uo)
|
|
406
408
|
]))), 128)),
|
|
407
|
-
a("div",
|
|
408
|
-
a("div",
|
|
409
|
+
a("div", go, [
|
|
410
|
+
a("div", _o, r(t.footnote), 1)
|
|
409
411
|
])
|
|
410
412
|
]))
|
|
411
413
|
]),
|
|
@@ -413,10 +415,10 @@ const qt = { class: "flex items-center mb-16" }, Yt = { class: "flex-1 fm-typo-e
|
|
|
413
415
|
});
|
|
414
416
|
};
|
|
415
417
|
}
|
|
416
|
-
}),
|
|
418
|
+
}), wo = { class: "flex items-center gap-3 fm-typo-en-body-md-600 mb-4" }, Ro = ["aria-label"], So = {
|
|
417
419
|
key: 1,
|
|
418
420
|
class: "flex min-h-[220px] items-center justify-center text-center fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
419
|
-
},
|
|
421
|
+
}, Mo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mb-16" }, $o = { class: "grid grid-cols-2 xs:grid-cols-1 gap-16" }, Co = { class: "flex items-center gap-8 mb-8" }, Fo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Do = { class: "fm-typo-en-title-sm-800" }, Ao = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4" }, ko = { class: "flex items-center gap-8 mb-8" }, Io = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Lo = { class: "fm-typo-en-title-sm-800" }, Oo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4" }, Eo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-8" }, Po = { class: "mt-16 pt-12 border-t border-fm-color-neutral-gray-100 fm-typo-en-body-sm-400" }, Bo = /* @__PURE__ */ Z({
|
|
420
422
|
__name: "MemberSpendComparison",
|
|
421
423
|
props: {
|
|
422
424
|
spend: {},
|
|
@@ -425,16 +427,16 @@ const qt = { class: "flex items-center mb-16" }, Yt = { class: "flex-1 fm-typo-e
|
|
|
425
427
|
},
|
|
426
428
|
setup(e) {
|
|
427
429
|
const s = e, { t } = Q();
|
|
428
|
-
return (n,
|
|
429
|
-
const y = M("FmCircularProgress"), p = M("FmProgressBar"),
|
|
430
|
-
return c(),
|
|
430
|
+
return (n, i) => {
|
|
431
|
+
const y = M("FmCircularProgress"), p = M("FmProgressBar"), u = M("FmCard");
|
|
432
|
+
return c(), N(u, {
|
|
431
433
|
variant: "outlined",
|
|
432
434
|
class: "p-24"
|
|
433
435
|
}, {
|
|
434
436
|
default: U(() => [
|
|
435
|
-
a("div",
|
|
437
|
+
a("div", wo, [
|
|
436
438
|
a("span", null, r(o(t)("connect.loyalty.dashboard.spend.title")), 1),
|
|
437
|
-
|
|
439
|
+
f(xe, {
|
|
438
440
|
description: s.spend.description
|
|
439
441
|
}, null, 8, ["description"])
|
|
440
442
|
]),
|
|
@@ -444,54 +446,54 @@ const qt = { class: "flex items-center mb-16" }, Yt = { class: "flex-1 fm-typo-e
|
|
|
444
446
|
role: "status",
|
|
445
447
|
"aria-label": o(t)("connect.loyalty.dashboard.accessibility.loading")
|
|
446
448
|
}, [
|
|
447
|
-
|
|
448
|
-
], 8,
|
|
449
|
-
a("div",
|
|
450
|
-
a("div",
|
|
449
|
+
f(y, { size: "lg" })
|
|
450
|
+
], 8, Ro)) : s.error ? (c(), d("div", So, r(o(t)("connect.loyalty.dashboard.states.spendUnavailable")), 1)) : (c(), d(k, { key: 2 }, [
|
|
451
|
+
a("div", Mo, r(s.spend.description), 1),
|
|
452
|
+
a("div", $o, [
|
|
451
453
|
a("div", null, [
|
|
452
|
-
a("div",
|
|
453
|
-
|
|
454
|
-
a("span",
|
|
454
|
+
a("div", Co, [
|
|
455
|
+
i[0] || (i[0] = a("div", { class: "w-8 h-8 rounded-sm bg-fm-color-primary" }, null, -1)),
|
|
456
|
+
a("span", Fo, r(o(t)("connect.loyalty.dashboard.spend.memberSales")), 1)
|
|
455
457
|
]),
|
|
456
|
-
a("div",
|
|
457
|
-
a("div",
|
|
458
|
+
a("div", Do, r(s.spend.memberSalesFmt), 1),
|
|
459
|
+
a("div", Ao, r(o(t)("connect.loyalty.dashboard.spend.averageOrder", {
|
|
458
460
|
value: s.spend.avgMemberSaleFmt
|
|
459
461
|
})), 1)
|
|
460
462
|
]),
|
|
461
463
|
a("div", null, [
|
|
462
|
-
a("div",
|
|
463
|
-
|
|
464
|
-
a("span",
|
|
464
|
+
a("div", ko, [
|
|
465
|
+
i[1] || (i[1] = a("div", { class: "w-8 h-8 rounded-sm bg-fm-color-neutral-gray-200" }, null, -1)),
|
|
466
|
+
a("span", Io, r(o(t)("connect.loyalty.dashboard.spend.nonMemberSales")), 1)
|
|
465
467
|
]),
|
|
466
|
-
a("div",
|
|
467
|
-
a("div",
|
|
468
|
+
a("div", Lo, r(s.spend.nonMemberSalesFmt), 1),
|
|
469
|
+
a("div", Oo, r(o(t)("connect.loyalty.dashboard.spend.averageOrder", {
|
|
468
470
|
value: s.spend.avgNonMemberSaleFmt
|
|
469
471
|
})), 1)
|
|
470
472
|
])
|
|
471
473
|
]),
|
|
472
|
-
|
|
474
|
+
f(p, {
|
|
473
475
|
class: "mt-16",
|
|
474
476
|
value: s.spend.memberSharePct,
|
|
475
477
|
color: "primary",
|
|
476
478
|
size: "md"
|
|
477
479
|
}, null, 8, ["value"]),
|
|
478
|
-
a("div",
|
|
480
|
+
a("div", Eo, r(o(t)("connect.loyalty.dashboard.spend.share", {
|
|
479
481
|
value: s.spend.memberSharePct
|
|
480
482
|
})), 1),
|
|
481
|
-
a("div",
|
|
483
|
+
a("div", Po, r(s.spend.summary), 1)
|
|
482
484
|
], 64))
|
|
483
485
|
]),
|
|
484
486
|
_: 1
|
|
485
487
|
});
|
|
486
488
|
};
|
|
487
489
|
}
|
|
488
|
-
}),
|
|
490
|
+
}), To = { class: "flex items-center mb-16" }, No = { class: "flex-1 fm-typo-en-body-md-600" }, Uo = ["aria-label"], zo = {
|
|
489
491
|
key: 1,
|
|
490
492
|
class: "flex min-h-[220px] items-center justify-center text-center fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
491
|
-
},
|
|
493
|
+
}, Vo = { class: "grid grid-cols-3 gap-10 mb-16" }, jo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mb-4 flex items-center gap-3" }, Ko = { class: "fm-typo-en-title-sm-800" }, qo = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-tertiary uppercase tracking-wide mb-10" }, Yo = { class: "flex flex-col gap-9" }, Ho = { class: "flex-1 fm-typo-en-body-sm-400 whitespace-nowrap overflow-hidden text-ellipsis" }, Wo = { class: "flex flex-shrink-0 items-center gap-3 fm-typo-en-body-sm-600 text-fm-color-typo-secondary" }, Go = { class: "w-[48px] h-4 bg-fm-color-neutral-gray-100 rounded-2 overflow-hidden flex-shrink-0" }, Jo = {
|
|
492
494
|
key: 3,
|
|
493
495
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
494
|
-
},
|
|
496
|
+
}, Zo = /* @__PURE__ */ Z({
|
|
495
497
|
__name: "RewardPerformance",
|
|
496
498
|
props: {
|
|
497
499
|
kpis: {},
|
|
@@ -503,14 +505,14 @@ const qt = { class: "flex items-center mb-16" }, Yt = { class: "flex-1 fm-typo-e
|
|
|
503
505
|
setup(e) {
|
|
504
506
|
const { t: s } = Q();
|
|
505
507
|
return (t, n) => {
|
|
506
|
-
const
|
|
507
|
-
return c(),
|
|
508
|
+
const i = M("FmCircularProgress"), y = M("FmCard");
|
|
509
|
+
return c(), N(y, {
|
|
508
510
|
variant: "outlined",
|
|
509
511
|
class: "p-24"
|
|
510
512
|
}, {
|
|
511
513
|
default: U(() => [
|
|
512
|
-
a("div",
|
|
513
|
-
a("div",
|
|
514
|
+
a("div", To, [
|
|
515
|
+
a("div", No, r(o(s)("connect.loyalty.dashboard.rewards.title")), 1)
|
|
514
516
|
]),
|
|
515
517
|
e.loading ? (c(), d("div", {
|
|
516
518
|
key: 0,
|
|
@@ -518,61 +520,61 @@ const qt = { class: "flex items-center mb-16" }, Yt = { class: "flex-1 fm-typo-e
|
|
|
518
520
|
role: "status",
|
|
519
521
|
"aria-label": o(s)("connect.loyalty.dashboard.accessibility.loading")
|
|
520
522
|
}, [
|
|
521
|
-
|
|
522
|
-
], 8,
|
|
523
|
-
a("div",
|
|
524
|
-
(c(!0), d(
|
|
523
|
+
f(i, { size: "lg" })
|
|
524
|
+
], 8, Uo)) : e.error ? (c(), d("div", zo, r(o(s)("connect.loyalty.dashboard.states.rewardUsageUnavailable")), 1)) : e.hasData ? (c(), d(k, { key: 2 }, [
|
|
525
|
+
a("div", Vo, [
|
|
526
|
+
(c(!0), d(k, null, W(e.kpis, (p) => (c(), d("div", {
|
|
525
527
|
key: p.label,
|
|
526
528
|
class: "bg-[#FAFAFA] rounded-10 p-12"
|
|
527
529
|
}, [
|
|
528
|
-
a("div",
|
|
530
|
+
a("div", jo, [
|
|
529
531
|
a("span", null, r(p.label), 1),
|
|
530
|
-
|
|
532
|
+
f(xe, {
|
|
531
533
|
description: p.description
|
|
532
534
|
}, null, 8, ["description"])
|
|
533
535
|
]),
|
|
534
|
-
a("div",
|
|
536
|
+
a("div", Ko, r(p.value), 1),
|
|
535
537
|
p.delta ? (c(), d("div", {
|
|
536
538
|
key: 0,
|
|
537
539
|
class: T(["fm-typo-en-body-sm-600 mt-3", p.deltaClass])
|
|
538
|
-
}, r(p.delta), 3)) :
|
|
540
|
+
}, r(p.delta), 3)) : z("", !0)
|
|
539
541
|
]))), 128))
|
|
540
542
|
]),
|
|
541
|
-
a("div",
|
|
542
|
-
a("div",
|
|
543
|
-
(c(!0), d(
|
|
543
|
+
a("div", qo, r(o(s)("connect.loyalty.dashboard.rewards.topUsed")), 1),
|
|
544
|
+
a("div", Yo, [
|
|
545
|
+
(c(!0), d(k, null, W(e.topRewards, (p) => (c(), d("div", {
|
|
544
546
|
key: p.name,
|
|
545
547
|
class: "flex items-center gap-9"
|
|
546
548
|
}, [
|
|
547
549
|
n[0] || (n[0] = a("div", { class: "w-[7px] h-[7px] rounded-2 bg-fm-color-primary flex-shrink-0" }, null, -1)),
|
|
548
|
-
a("span",
|
|
549
|
-
a("span",
|
|
550
|
-
|
|
551
|
-
|
|
550
|
+
a("span", Ho, r(p.name), 1),
|
|
551
|
+
a("span", Wo, [
|
|
552
|
+
ge(r(p.count) + " ", 1),
|
|
553
|
+
f(xe, {
|
|
552
554
|
description: p.description
|
|
553
555
|
}, null, 8, ["description"])
|
|
554
556
|
]),
|
|
555
|
-
a("div",
|
|
557
|
+
a("div", Go, [
|
|
556
558
|
a("div", {
|
|
557
559
|
class: "h-full bg-fm-color-primary rounded-2",
|
|
558
|
-
style:
|
|
560
|
+
style: Pt({ width: p.barPct + "%" })
|
|
559
561
|
}, null, 4)
|
|
560
562
|
])
|
|
561
563
|
]))), 128))
|
|
562
564
|
])
|
|
563
|
-
], 64)) : (c(), d("div",
|
|
565
|
+
], 64)) : (c(), d("div", Jo, r(o(s)("connect.loyalty.dashboard.rewards.noData")), 1))
|
|
564
566
|
]),
|
|
565
567
|
_: 1
|
|
566
568
|
});
|
|
567
569
|
};
|
|
568
570
|
}
|
|
569
571
|
}), q = () => {
|
|
570
|
-
const e =
|
|
572
|
+
const e = Vt.getBusinessId();
|
|
571
573
|
if (!e) throw new Error("Invalid business ID");
|
|
572
|
-
return
|
|
574
|
+
return jt(`businesses/${e}/loyalty-dashboard`, {
|
|
573
575
|
noIdRequired: !0
|
|
574
576
|
});
|
|
575
|
-
},
|
|
577
|
+
}, H = {
|
|
576
578
|
async readTotalMembers(e) {
|
|
577
579
|
return K(
|
|
578
580
|
await q().post(
|
|
@@ -694,10 +696,10 @@ const qt = { class: "flex items-center mb-16" }, Yt = { class: "flex-1 fm-typo-e
|
|
|
694
696
|
);
|
|
695
697
|
}
|
|
696
698
|
};
|
|
697
|
-
function
|
|
699
|
+
function v(e, s, t, n) {
|
|
698
700
|
return e ? n === void 0 ? e(s) : e(s, n) : t;
|
|
699
701
|
}
|
|
700
|
-
const
|
|
702
|
+
const Y = {
|
|
701
703
|
totalMembers: "Distinct members recorded through the end of the selected period; the start date does not reduce this total.",
|
|
702
704
|
activeMembers: "Distinct members with a completed member purchase or voucher redemption during the selected period.",
|
|
703
705
|
memberSales: "Sum of nettTotal from member-linked bills included in the selected period.",
|
|
@@ -717,36 +719,36 @@ const H = {
|
|
|
717
719
|
averageRewardUses: "Counted reward-use transactions divided by distinct reward redeemers.",
|
|
718
720
|
flaggedForReview: "Unique members found across available anomaly signals; findings require verification.",
|
|
719
721
|
memberSpendComparison: "Shows the value members bring — use it to make the case for growing membership"
|
|
720
|
-
},
|
|
722
|
+
}, ne = {
|
|
721
723
|
SAME_DAY_BILL_ANOMALY: "same-day-bill-anomaly",
|
|
722
724
|
REWARD_EARNING_OUTLIER: "reward-earning-outlier"
|
|
723
|
-
},
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
],
|
|
727
|
-
[
|
|
728
|
-
[
|
|
729
|
-
},
|
|
730
|
-
[
|
|
731
|
-
[
|
|
732
|
-
},
|
|
733
|
-
[
|
|
734
|
-
[
|
|
735
|
-
},
|
|
725
|
+
}, He = [
|
|
726
|
+
ne.SAME_DAY_BILL_ANOMALY,
|
|
727
|
+
ne.REWARD_EARNING_OUTLIER
|
|
728
|
+
], Qo = {
|
|
729
|
+
[ne.SAME_DAY_BILL_ANOMALY]: "Same-day bill anomaly",
|
|
730
|
+
[ne.REWARD_EARNING_OUTLIER]: "Reward earning outlier"
|
|
731
|
+
}, Xo = {
|
|
732
|
+
[ne.SAME_DAY_BILL_ANOMALY]: "Members attached to at least three distinct completed, positive-value bills in one business day.",
|
|
733
|
+
[ne.REWARD_EARNING_OUTLIER]: "Daily reward earning is above the merchant-relative threshold for its reward type."
|
|
734
|
+
}, es = {
|
|
735
|
+
[ne.SAME_DAY_BILL_ANOMALY]: "Threshold: 3 completed bills in one business day.",
|
|
736
|
+
[ne.REWARD_EARNING_OUTLIER]: "Threshold: the greater of the prior-90-day P99 or median + 5 MAD, per reward type."
|
|
737
|
+
}, ts = {
|
|
736
738
|
VOUCHER: "Voucher",
|
|
737
739
|
CREDIT: "Credit",
|
|
738
740
|
COIN: "Point/spendable points",
|
|
739
741
|
POINT: "Experience"
|
|
740
|
-
},
|
|
741
|
-
[
|
|
742
|
-
[
|
|
743
|
-
},
|
|
742
|
+
}, ct = {
|
|
743
|
+
[ne.SAME_DAY_BILL_ANOMALY]: "sameDayBillAnomaly",
|
|
744
|
+
[ne.REWARD_EARNING_OUTLIER]: "rewardEarningOutlier"
|
|
745
|
+
}, as = {
|
|
744
746
|
VOUCHER: "voucher",
|
|
745
747
|
CREDIT: "credit",
|
|
746
748
|
COIN: "coin",
|
|
747
749
|
POINT: "point"
|
|
748
750
|
};
|
|
749
|
-
function
|
|
751
|
+
function os(e) {
|
|
750
752
|
return {
|
|
751
753
|
dateRange: e.dateRange,
|
|
752
754
|
businessRestaurantIds: [...e.businessRestaurantIds],
|
|
@@ -754,61 +756,61 @@ function Ko(e) {
|
|
|
754
756
|
timezone: e.timezone
|
|
755
757
|
};
|
|
756
758
|
}
|
|
757
|
-
function
|
|
759
|
+
function ss(e, s) {
|
|
758
760
|
return {
|
|
759
761
|
...e,
|
|
760
762
|
dateRange: s
|
|
761
763
|
};
|
|
762
764
|
}
|
|
763
|
-
function
|
|
764
|
-
return
|
|
765
|
+
function We(e, s) {
|
|
766
|
+
return v(
|
|
765
767
|
s,
|
|
766
|
-
`connect.loyalty.dashboard.review.signals.${
|
|
767
|
-
|
|
768
|
+
`connect.loyalty.dashboard.review.signals.${ct[e]}.label`,
|
|
769
|
+
Qo[e]
|
|
768
770
|
);
|
|
769
771
|
}
|
|
770
|
-
function
|
|
771
|
-
return
|
|
772
|
+
function gt(e, s) {
|
|
773
|
+
return v(
|
|
772
774
|
s,
|
|
773
|
-
`connect.loyalty.dashboard.review.rewardTypes.${
|
|
774
|
-
|
|
775
|
+
`connect.loyalty.dashboard.review.rewardTypes.${as[e]}`,
|
|
776
|
+
ts[e]
|
|
775
777
|
);
|
|
776
778
|
}
|
|
777
|
-
const
|
|
778
|
-
function
|
|
779
|
-
const n = Date.parse(e),
|
|
780
|
-
return Number.isFinite(n) && Number.isFinite(
|
|
779
|
+
const rs = 15 * 60 * 1e3;
|
|
780
|
+
function ns(e, s = /* @__PURE__ */ new Date(), t = rs) {
|
|
781
|
+
const n = Date.parse(e), i = new Date(s).getTime();
|
|
782
|
+
return Number.isFinite(n) && Number.isFinite(i) && i - n > t;
|
|
781
783
|
}
|
|
782
|
-
function
|
|
783
|
-
const n = s.loading === !0,
|
|
784
|
-
(
|
|
785
|
-
),
|
|
786
|
-
loading:
|
|
784
|
+
function ls(e, s = {}, t) {
|
|
785
|
+
const n = s.loading === !0, i = s.error === !0, y = e ? ns(e.updatedAt, s.now) : !1, p = ((e == null ? void 0 : e.bySignal) ?? []).filter(
|
|
786
|
+
(h) => He.includes(h.signal)
|
|
787
|
+
), u = p.length !== ((e == null ? void 0 : e.bySignal.length) ?? 0), x = !e || e.status === "unavailable" || u, w = (e == null ? void 0 : e.status) === "available" && e.flaggedMembers === 0 && e.totalFindings === 0, R = n ? "loading" : x ? "unavailable" : y ? "stale" : e.status === "partial" ? "partial" : w ? "empty" : "available", g = {
|
|
788
|
+
loading: v(
|
|
787
789
|
t,
|
|
788
790
|
"connect.loyalty.dashboard.review.statusMessages.loading",
|
|
789
791
|
"Loading report data..."
|
|
790
792
|
),
|
|
791
|
-
available:
|
|
793
|
+
available: v(
|
|
792
794
|
t,
|
|
793
795
|
"connect.loyalty.dashboard.review.statusMessages.available",
|
|
794
796
|
"These are unusual activity findings from report data and require verification."
|
|
795
797
|
),
|
|
796
|
-
partial:
|
|
798
|
+
partial: v(
|
|
797
799
|
t,
|
|
798
800
|
"connect.loyalty.dashboard.review.statusMessages.partial",
|
|
799
801
|
"Some report signals are unavailable. Available findings remain reviewable."
|
|
800
802
|
),
|
|
801
|
-
unavailable:
|
|
803
|
+
unavailable: v(
|
|
802
804
|
t,
|
|
803
|
-
|
|
804
|
-
|
|
805
|
+
i ? "connect.loyalty.dashboard.review.statusMessages.error" : "connect.loyalty.dashboard.review.statusMessages.unavailable",
|
|
806
|
+
i ? "The report could not be loaded for this period." : "Report data is unavailable for this period."
|
|
805
807
|
),
|
|
806
|
-
empty:
|
|
808
|
+
empty: v(
|
|
807
809
|
t,
|
|
808
810
|
"connect.loyalty.dashboard.review.statusMessages.empty",
|
|
809
811
|
"No unusual activity detected for the selected period."
|
|
810
812
|
),
|
|
811
|
-
stale:
|
|
813
|
+
stale: v(
|
|
812
814
|
t,
|
|
813
815
|
"connect.loyalty.dashboard.review.statusMessages.stale",
|
|
814
816
|
"The report data may be stale. Verify findings against source records."
|
|
@@ -816,81 +818,81 @@ function Wo(e, s = {}, t) {
|
|
|
816
818
|
};
|
|
817
819
|
return {
|
|
818
820
|
status: R,
|
|
819
|
-
availability:
|
|
820
|
-
flaggedMembers:
|
|
821
|
-
totalFindings:
|
|
821
|
+
availability: u ? "unavailable" : (e == null ? void 0 : e.status) ?? "unavailable",
|
|
822
|
+
flaggedMembers: u ? null : (e == null ? void 0 : e.flaggedMembers) ?? null,
|
|
823
|
+
totalFindings: u ? null : (e == null ? void 0 : e.totalFindings) ?? null,
|
|
822
824
|
updatedAt: (e == null ? void 0 : e.updatedAt) ?? null,
|
|
823
825
|
stale: y,
|
|
824
|
-
error:
|
|
825
|
-
message:
|
|
826
|
-
bySignal: p.map((
|
|
827
|
-
...
|
|
828
|
-
label:
|
|
829
|
-
description:
|
|
826
|
+
error: i,
|
|
827
|
+
message: g[R],
|
|
828
|
+
bySignal: p.map((h) => ({
|
|
829
|
+
...h,
|
|
830
|
+
label: We(h.signal, t),
|
|
831
|
+
description: v(
|
|
830
832
|
t,
|
|
831
|
-
`connect.loyalty.dashboard.review.signals.${
|
|
832
|
-
|
|
833
|
+
`connect.loyalty.dashboard.review.signals.${ct[h.signal]}.description`,
|
|
834
|
+
Xo[h.signal]
|
|
833
835
|
),
|
|
834
|
-
threshold:
|
|
836
|
+
threshold: v(
|
|
835
837
|
t,
|
|
836
|
-
`connect.loyalty.dashboard.review.signals.${
|
|
837
|
-
|
|
838
|
+
`connect.loyalty.dashboard.review.signals.${ct[h.signal]}.threshold`,
|
|
839
|
+
es[h.signal]
|
|
838
840
|
)
|
|
839
841
|
}))
|
|
840
842
|
};
|
|
841
843
|
}
|
|
842
|
-
function
|
|
843
|
-
const n =
|
|
844
|
-
return
|
|
844
|
+
function is(e, s, t = /* @__PURE__ */ new Date()) {
|
|
845
|
+
const n = De.tz(t, s).endOf("day"), i = n.clone().startOf("day");
|
|
846
|
+
return i.startOf("month"), [i.toISOString(), n.toISOString()];
|
|
845
847
|
}
|
|
846
|
-
function
|
|
848
|
+
function cs(e, s) {
|
|
847
849
|
return e.length ? e : s;
|
|
848
850
|
}
|
|
849
|
-
function
|
|
851
|
+
function ds(e) {
|
|
850
852
|
return {
|
|
851
853
|
dateRange: e.dateRange,
|
|
852
854
|
compareDateRange: e.compareDateRange,
|
|
853
|
-
restaurantIds:
|
|
855
|
+
restaurantIds: cs(
|
|
854
856
|
e.selectedLocationIds,
|
|
855
857
|
e.locationIds
|
|
856
858
|
),
|
|
857
859
|
timezone: e.timezone
|
|
858
860
|
};
|
|
859
861
|
}
|
|
860
|
-
const
|
|
862
|
+
const ms = [
|
|
861
863
|
"same-period-last-week",
|
|
862
864
|
"same-period-last-month",
|
|
863
865
|
"preceding-period",
|
|
864
866
|
"same-period-last-year",
|
|
865
867
|
"custom"
|
|
866
|
-
],
|
|
867
|
-
function
|
|
868
|
+
], us = "same-period-last-month";
|
|
869
|
+
function _t(e, s) {
|
|
868
870
|
return {
|
|
869
|
-
start:
|
|
870
|
-
end:
|
|
871
|
+
start: De.tz(e[0], s).startOf("day"),
|
|
872
|
+
end: De.tz(e[1], s).endOf("day")
|
|
871
873
|
};
|
|
872
874
|
}
|
|
873
|
-
function
|
|
875
|
+
function rt(e, s) {
|
|
874
876
|
return [e.toISOString(), s.toISOString()];
|
|
875
877
|
}
|
|
876
|
-
function
|
|
877
|
-
const
|
|
878
|
+
function ys(e, s, t, n) {
|
|
879
|
+
const i = _t(e, t);
|
|
878
880
|
if (s === "custom" && (n != null && n[0]) && n[1]) {
|
|
879
|
-
const w =
|
|
880
|
-
return
|
|
881
|
+
const w = _t(n, t);
|
|
882
|
+
return rt(w.start, w.end);
|
|
881
883
|
}
|
|
882
884
|
const y = s === "same-period-last-week" ? "week" : s === "same-period-last-month" ? "month" : s === "same-period-last-year" ? "year" : null;
|
|
883
885
|
if (y) {
|
|
884
|
-
const w =
|
|
885
|
-
return
|
|
886
|
-
|
|
887
|
-
|
|
886
|
+
const w = i.end.diff(i.start, y) + 1;
|
|
887
|
+
return rt(
|
|
888
|
+
i.start.clone().subtract(w, y),
|
|
889
|
+
i.end.clone().subtract(w, y)
|
|
888
890
|
);
|
|
889
891
|
}
|
|
890
|
-
const p =
|
|
891
|
-
return
|
|
892
|
+
const p = i.end.clone().startOf("day").diff(i.start.clone().startOf("day"), "days") + 1, u = i.start.clone().subtract(1, "day").endOf("day"), x = u.clone().subtract(p - 1, "days").startOf("day");
|
|
893
|
+
return rt(x, u);
|
|
892
894
|
}
|
|
893
|
-
const
|
|
895
|
+
const qe = (e) => ({
|
|
894
896
|
total: 0,
|
|
895
897
|
totalNew: 0,
|
|
896
898
|
totalPrev: 0,
|
|
@@ -907,34 +909,34 @@ const Ue = (e) => ({
|
|
|
907
909
|
series: Array(e).fill(0),
|
|
908
910
|
prev: Array(e).fill(0)
|
|
909
911
|
});
|
|
910
|
-
|
|
911
|
-
const
|
|
912
|
+
qe(20), qe(7), qe(30), qe(12);
|
|
913
|
+
const dt = (e, s) => s ? Math.round(e / s * 1e3) / 10 : 0, ps = (e, s) => s ? Math.round((e - s) / s * 1e3) / 10 : 0, Ae = (e) => e >= 1e3 ? (e / 1e3).toFixed(1).replace(/\.0$/, "") + "k" : String(e), _e = (e, s) => Jt(e).set({ currency: s }).toFormat(!0), bs = [
|
|
912
914
|
"neutral-black",
|
|
913
915
|
"primary",
|
|
914
916
|
"#FF9C52",
|
|
915
917
|
"#FFB577",
|
|
916
918
|
"#FFD0A3"
|
|
917
|
-
],
|
|
919
|
+
], mt = {
|
|
918
920
|
text: "text-fm-color-typo-success",
|
|
919
921
|
bg: "bg-fm-color-system-success-100"
|
|
920
|
-
},
|
|
922
|
+
}, Rt = {
|
|
921
923
|
text: "text-fm-color-typo-error",
|
|
922
924
|
bg: "bg-fm-color-system-error-100"
|
|
923
|
-
},
|
|
925
|
+
}, ut = {
|
|
924
926
|
text: "text-fm-color-typo-warning",
|
|
925
927
|
bg: "bg-fm-color-system-warning-100"
|
|
926
928
|
};
|
|
927
|
-
function
|
|
928
|
-
return e === 0 ? "text-fm-color-typo-secondary" : e > 0 ?
|
|
929
|
+
function fs(e) {
|
|
930
|
+
return e === 0 ? "text-fm-color-typo-secondary" : e > 0 ? mt.text : Rt.text;
|
|
929
931
|
}
|
|
930
|
-
function
|
|
932
|
+
function hs(e, s) {
|
|
931
933
|
const t = [
|
|
932
934
|
{
|
|
933
935
|
id: "total",
|
|
934
936
|
label: "Total members",
|
|
935
937
|
count: e.totalMembers,
|
|
936
938
|
desc: "All members through period end",
|
|
937
|
-
description:
|
|
939
|
+
description: Y.totalMembers,
|
|
938
940
|
i18nKey: "total",
|
|
939
941
|
denom: null
|
|
940
942
|
},
|
|
@@ -943,7 +945,7 @@ function ss(e, s) {
|
|
|
943
945
|
label: "Active members",
|
|
944
946
|
count: e.activeMembers,
|
|
945
947
|
desc: "Purchase or reward activity",
|
|
946
|
-
description:
|
|
948
|
+
description: Y.activeMembers,
|
|
947
949
|
i18nKey: "active",
|
|
948
950
|
denom: e.totalMembers
|
|
949
951
|
},
|
|
@@ -952,7 +954,7 @@ function ss(e, s) {
|
|
|
952
954
|
label: "Purchase members",
|
|
953
955
|
count: e.purchasingMembers,
|
|
954
956
|
desc: "At least 1 completed order",
|
|
955
|
-
description:
|
|
957
|
+
description: Y.purchasingMembers,
|
|
956
958
|
i18nKey: "purchasing",
|
|
957
959
|
denom: e.activeMembers
|
|
958
960
|
},
|
|
@@ -961,7 +963,7 @@ function ss(e, s) {
|
|
|
961
963
|
label: "Repeat members",
|
|
962
964
|
count: e.repeatMembers,
|
|
963
965
|
desc: "At least 2 completed purchases",
|
|
964
|
-
description:
|
|
966
|
+
description: Y.repeatMembers,
|
|
965
967
|
i18nKey: "repeat",
|
|
966
968
|
denom: e.purchasingMembers
|
|
967
969
|
},
|
|
@@ -970,68 +972,68 @@ function ss(e, s) {
|
|
|
970
972
|
label: "Reward redeemers",
|
|
971
973
|
count: e.rewardRedeemers,
|
|
972
974
|
desc: "Repeat member used reward",
|
|
973
|
-
description:
|
|
975
|
+
description: Y.funnelRewardRedeemers,
|
|
974
976
|
i18nKey: "redeemers",
|
|
975
977
|
denom: e.repeatMembers
|
|
976
978
|
}
|
|
977
979
|
], n = t.map(
|
|
978
|
-
(
|
|
980
|
+
(u, x) => x === 0 || !u.denom ? null : dt(u.count, u.denom)
|
|
979
981
|
);
|
|
980
|
-
let
|
|
981
|
-
return e.totalMembers > 0 && n.forEach((
|
|
982
|
-
|
|
982
|
+
let i = null, y = 100;
|
|
983
|
+
return e.totalMembers > 0 && n.forEach((u, x) => {
|
|
984
|
+
x > 0 && u !== null && u < y && (y = u, i = x);
|
|
983
985
|
}), {
|
|
984
|
-
funnelStages: t.map((
|
|
985
|
-
const w = n[
|
|
986
|
+
funnelStages: t.map((u, x) => {
|
|
987
|
+
const w = n[x], R = x === i, g = `connect.loyalty.dashboard.funnel.stages.${u.i18nKey}`;
|
|
986
988
|
return {
|
|
987
|
-
id:
|
|
988
|
-
label:
|
|
989
|
-
desc:
|
|
990
|
-
description:
|
|
989
|
+
id: u.id,
|
|
990
|
+
label: v(s, `${g}.label`, u.label),
|
|
991
|
+
desc: v(s, `${g}.short`, u.desc),
|
|
992
|
+
description: v(
|
|
991
993
|
s,
|
|
992
|
-
`${
|
|
993
|
-
|
|
994
|
+
`${g}.description`,
|
|
995
|
+
u.description
|
|
994
996
|
),
|
|
995
|
-
countStr:
|
|
996
|
-
conversionStr: w != null ?
|
|
997
|
+
countStr: Ae(u.count),
|
|
998
|
+
conversionStr: w != null ? v(
|
|
997
999
|
s,
|
|
998
1000
|
"connect.loyalty.dashboard.funnel.conversion",
|
|
999
1001
|
`${w}% convert`,
|
|
1000
1002
|
{ rate: w }
|
|
1001
1003
|
) : "",
|
|
1002
|
-
convRateLabel: w != null ?
|
|
1004
|
+
convRateLabel: w != null ? v(
|
|
1003
1005
|
s,
|
|
1004
1006
|
"connect.loyalty.dashboard.funnel.ofPrevious",
|
|
1005
1007
|
`${w}% of prev`,
|
|
1006
1008
|
{ rate: w }
|
|
1007
1009
|
) : "",
|
|
1008
|
-
hasConvRate:
|
|
1009
|
-
hasDropLine:
|
|
1010
|
+
hasConvRate: x > 0,
|
|
1011
|
+
hasDropLine: x > 0,
|
|
1010
1012
|
isBiggestDrop: R,
|
|
1011
|
-
barColor:
|
|
1012
|
-
barWidthPct: e.totalMembers > 0 &&
|
|
1013
|
-
dropClass: R ? `${
|
|
1013
|
+
barColor: bs[x] ?? "#FFD0A3",
|
|
1014
|
+
barWidthPct: e.totalMembers > 0 && u.count > 0 ? Math.max(dt(u.count, e.totalMembers), 1) : 0,
|
|
1015
|
+
dropClass: R ? `${ut.text} bg-[#FFF0E2]` : "text-fm-color-typo-secondary bg-fm-color-neutral-gray-100"
|
|
1014
1016
|
};
|
|
1015
1017
|
}),
|
|
1016
|
-
funnelFootnote:
|
|
1018
|
+
funnelFootnote: v(
|
|
1017
1019
|
s,
|
|
1018
1020
|
"connect.loyalty.dashboard.funnel.footnote",
|
|
1019
1021
|
`${e.totalMembers.toLocaleString()} total members`,
|
|
1020
1022
|
e.totalMembers
|
|
1021
1023
|
),
|
|
1022
1024
|
convRates: n,
|
|
1023
|
-
biggestDropIdx:
|
|
1025
|
+
biggestDropIdx: i
|
|
1024
1026
|
};
|
|
1025
1027
|
}
|
|
1026
|
-
function
|
|
1027
|
-
const { funnelStages: t, funnelFootnote: n } =
|
|
1028
|
+
function vs(e, s) {
|
|
1029
|
+
const { funnelStages: t, funnelFootnote: n } = hs(
|
|
1028
1030
|
e,
|
|
1029
1031
|
s
|
|
1030
1032
|
);
|
|
1031
1033
|
return { funnelStages: t, funnelFootnote: n };
|
|
1032
1034
|
}
|
|
1033
|
-
const
|
|
1034
|
-
function
|
|
1035
|
+
const gs = 10;
|
|
1036
|
+
function _s(e, s) {
|
|
1035
1037
|
const t = [
|
|
1036
1038
|
{
|
|
1037
1039
|
i18nKey: "reactivation",
|
|
@@ -1080,20 +1082,20 @@ function ls(e, s) {
|
|
|
1080
1082
|
];
|
|
1081
1083
|
let n = null;
|
|
1082
1084
|
for (const p of t)
|
|
1083
|
-
p.source <
|
|
1085
|
+
p.source < gs || p.target >= p.source || (!n || p.target / p.source < n.target / n.source) && (n = p);
|
|
1084
1086
|
if (!n) return null;
|
|
1085
|
-
const
|
|
1087
|
+
const i = Math.round(n.target / n.source * 1e3) / 10, y = `connect.loyalty.dashboard.insight.candidates.${n.i18nKey}`;
|
|
1086
1088
|
return {
|
|
1087
|
-
title:
|
|
1088
|
-
body: `${
|
|
1089
|
+
title: v(s, `${y}.title`, n.title),
|
|
1090
|
+
body: `${v(
|
|
1089
1091
|
s,
|
|
1090
1092
|
"connect.loyalty.dashboard.insight.progress",
|
|
1091
|
-
`${
|
|
1092
|
-
{ rate:
|
|
1093
|
-
)} ${
|
|
1093
|
+
`${i}% of this stage progressed in the selected period.`,
|
|
1094
|
+
{ rate: i }
|
|
1095
|
+
)} ${v(s, `${y}.body`, n.body)}`,
|
|
1094
1096
|
action: {
|
|
1095
1097
|
...n.action,
|
|
1096
|
-
label:
|
|
1098
|
+
label: v(
|
|
1097
1099
|
s,
|
|
1098
1100
|
`${y}.action`,
|
|
1099
1101
|
n.action.label
|
|
@@ -1101,7 +1103,7 @@ function ls(e, s) {
|
|
|
1101
1103
|
},
|
|
1102
1104
|
signals: [
|
|
1103
1105
|
{
|
|
1104
|
-
text:
|
|
1106
|
+
text: v(
|
|
1105
1107
|
s,
|
|
1106
1108
|
"connect.loyalty.dashboard.insight.signal",
|
|
1107
1109
|
`${n.target.toLocaleString()} of ${n.source.toLocaleString()} members progressed`,
|
|
@@ -1114,7 +1116,7 @@ function ls(e, s) {
|
|
|
1114
1116
|
]
|
|
1115
1117
|
};
|
|
1116
1118
|
}
|
|
1117
|
-
const
|
|
1119
|
+
const xs = {
|
|
1118
1120
|
VOUCHER: "Voucher",
|
|
1119
1121
|
PROMOTION: "Promotion",
|
|
1120
1122
|
POINT: "Experience",
|
|
@@ -1124,24 +1126,24 @@ const is = {
|
|
|
1124
1126
|
REWARD_POOL: "Reward pool",
|
|
1125
1127
|
GAME: "Game",
|
|
1126
1128
|
MISSION: "Mission"
|
|
1127
|
-
},
|
|
1128
|
-
active: { label: "Active", class:
|
|
1129
|
+
}, ws = {
|
|
1130
|
+
active: { label: "Active", class: mt.text },
|
|
1129
1131
|
expired: { label: "Ended", class: "text-fm-color-typo-tertiary" },
|
|
1130
|
-
upcoming: { label: "Upcoming", class:
|
|
1132
|
+
upcoming: { label: "Upcoming", class: ut.text }
|
|
1131
1133
|
};
|
|
1132
|
-
function
|
|
1134
|
+
function Rs(e) {
|
|
1133
1135
|
return e.type !== "MEMBERSHIP";
|
|
1134
1136
|
}
|
|
1135
|
-
function
|
|
1137
|
+
function Ss(e, s) {
|
|
1136
1138
|
var t;
|
|
1137
1139
|
return !s.length || !((t = e.targetLocation) != null && t.length) ? !0 : e.targetLocation.some(
|
|
1138
1140
|
(n) => s.includes(n.toString())
|
|
1139
1141
|
);
|
|
1140
1142
|
}
|
|
1141
|
-
function
|
|
1143
|
+
function nt(e) {
|
|
1142
1144
|
var s;
|
|
1143
1145
|
if (((s = e.timeframeOptions) == null ? void 0 : s.type) === "timeframe") {
|
|
1144
|
-
const t =
|
|
1146
|
+
const t = De();
|
|
1145
1147
|
return t.isBetween(
|
|
1146
1148
|
e.timeframeOptions.start ?? t.clone().subtract(1, "d"),
|
|
1147
1149
|
e.timeframeOptions.end ?? t.clone().add(1, "d")
|
|
@@ -1149,31 +1151,31 @@ function rt(e) {
|
|
|
1149
1151
|
}
|
|
1150
1152
|
return "active";
|
|
1151
1153
|
}
|
|
1152
|
-
function
|
|
1153
|
-
return e.filter(
|
|
1154
|
+
function Ms(e, s, t) {
|
|
1155
|
+
return e.filter(Rs).filter(
|
|
1154
1156
|
(n) => n.type !== "BROADCAST" || !n.linkedCampaign
|
|
1155
1157
|
).filter(
|
|
1156
|
-
(n) =>
|
|
1157
|
-
).sort((n,
|
|
1158
|
-
const y =
|
|
1159
|
-
return +(
|
|
1158
|
+
(n) => Ss(n, s)
|
|
1159
|
+
).sort((n, i) => {
|
|
1160
|
+
const y = nt(n);
|
|
1161
|
+
return +(nt(i) === "active") - +(y === "active");
|
|
1160
1162
|
}).slice(0, 4).map((n) => {
|
|
1161
|
-
const
|
|
1163
|
+
const i = nt(n), y = ws[i], p = n.type === "BROADCAST", u = v(
|
|
1162
1164
|
t,
|
|
1163
1165
|
`connect.loyalty.dashboard.campaigns.types.${n.type}`,
|
|
1164
|
-
|
|
1165
|
-
),
|
|
1166
|
+
xs[n.type] ?? n.type
|
|
1167
|
+
), x = v(
|
|
1166
1168
|
t,
|
|
1167
|
-
`connect.loyalty.dashboard.campaigns.status.${
|
|
1169
|
+
`connect.loyalty.dashboard.campaigns.status.${i}`,
|
|
1168
1170
|
y.label
|
|
1169
1171
|
);
|
|
1170
1172
|
return {
|
|
1171
1173
|
id: n._id.toString(),
|
|
1172
1174
|
name: n.name,
|
|
1173
|
-
type:
|
|
1174
|
-
status:
|
|
1175
|
-
metric: p ? String(n.currentReceive ?? 0) :
|
|
1176
|
-
metricLabel:
|
|
1175
|
+
type: u,
|
|
1176
|
+
status: x,
|
|
1177
|
+
metric: p ? String(n.currentReceive ?? 0) : x,
|
|
1178
|
+
metricLabel: v(
|
|
1177
1179
|
t,
|
|
1178
1180
|
p ? "connect.loyalty.dashboard.campaigns.messagesSent" : "connect.loyalty.dashboard.campaigns.statusLabel",
|
|
1179
1181
|
p ? "Messages sent" : "Status"
|
|
@@ -1182,13 +1184,13 @@ function us(e, s, t) {
|
|
|
1182
1184
|
};
|
|
1183
1185
|
});
|
|
1184
1186
|
}
|
|
1185
|
-
function
|
|
1187
|
+
function $s(e, s, t) {
|
|
1186
1188
|
return {
|
|
1187
1189
|
categories: e.categories,
|
|
1188
1190
|
prevCategories: e.prevCategories,
|
|
1189
1191
|
comparisonCategories: e.categories.map(
|
|
1190
|
-
(n,
|
|
1191
|
-
|
|
1192
|
+
(n, i) => [n, e.prevCategories[i]].filter(Boolean).map((y) => De(y).format("DD/MM/YYYY")).join(
|
|
1193
|
+
v(
|
|
1192
1194
|
t,
|
|
1193
1195
|
"connect.loyalty.dashboard.salesTrend.comparisonSeparator",
|
|
1194
1196
|
" vs "
|
|
@@ -1197,135 +1199,135 @@ function ys(e, s, t) {
|
|
|
1197
1199
|
),
|
|
1198
1200
|
series: e.series,
|
|
1199
1201
|
prevSeries: e.prevSeries,
|
|
1200
|
-
description:
|
|
1202
|
+
description: v(
|
|
1201
1203
|
t,
|
|
1202
1204
|
"connect.loyalty.dashboard.salesTrend.description",
|
|
1203
|
-
|
|
1205
|
+
Y.memberSalesTrend
|
|
1204
1206
|
),
|
|
1205
|
-
totalFmt:
|
|
1207
|
+
totalFmt: _e(e.memberSales, s),
|
|
1206
1208
|
deltaStr: `${e.deltaPct > 0 ? "+" : ""}${e.deltaPct}%`,
|
|
1207
|
-
deltaClass:
|
|
1209
|
+
deltaClass: fs(e.deltaPct)
|
|
1208
1210
|
};
|
|
1209
1211
|
}
|
|
1210
|
-
function
|
|
1212
|
+
function Cs(e, s, t, n, i) {
|
|
1211
1213
|
if (!e.memberOrders && !e.nonMemberOrders)
|
|
1212
|
-
return
|
|
1213
|
-
|
|
1214
|
+
return v(
|
|
1215
|
+
i,
|
|
1214
1216
|
"connect.loyalty.dashboard.spend.summary.noOrders",
|
|
1215
1217
|
"No completed orders were recorded in this period."
|
|
1216
1218
|
);
|
|
1217
1219
|
if (t === 0 && s > 0)
|
|
1218
|
-
return
|
|
1219
|
-
|
|
1220
|
+
return v(
|
|
1221
|
+
i,
|
|
1220
1222
|
"connect.loyalty.dashboard.spend.summary.memberAll",
|
|
1221
1223
|
"Members account for all tracked spend in this period."
|
|
1222
1224
|
);
|
|
1223
1225
|
if (s === 0 && t > 0)
|
|
1224
|
-
return
|
|
1225
|
-
|
|
1226
|
+
return v(
|
|
1227
|
+
i,
|
|
1226
1228
|
"connect.loyalty.dashboard.spend.summary.nonMemberAll",
|
|
1227
1229
|
"Non-members account for all tracked spend in this period."
|
|
1228
1230
|
);
|
|
1229
1231
|
if (n > 0)
|
|
1230
|
-
return
|
|
1231
|
-
|
|
1232
|
+
return v(
|
|
1233
|
+
i,
|
|
1232
1234
|
"connect.loyalty.dashboard.spend.summary.memberHigher",
|
|
1233
1235
|
`Members spend ${n}% more per order than non-members. Converting more walk-ins to members is a direct lever on sales.`,
|
|
1234
1236
|
{ gap: n }
|
|
1235
1237
|
);
|
|
1236
1238
|
if (n < 0) {
|
|
1237
1239
|
const y = Math.abs(n);
|
|
1238
|
-
return
|
|
1239
|
-
|
|
1240
|
+
return v(
|
|
1241
|
+
i,
|
|
1240
1242
|
"connect.loyalty.dashboard.spend.summary.nonMemberHigher",
|
|
1241
1243
|
`Non-members spend ${y}% more per order than members. Converting more walk-ins to members can increase member-linked sales.`,
|
|
1242
1244
|
{ gap: y }
|
|
1243
1245
|
);
|
|
1244
1246
|
}
|
|
1245
|
-
return
|
|
1246
|
-
|
|
1247
|
+
return v(
|
|
1248
|
+
i,
|
|
1247
1249
|
"connect.loyalty.dashboard.spend.summary.equal",
|
|
1248
1250
|
"Members and non-members have the same average order value in this period."
|
|
1249
1251
|
);
|
|
1250
1252
|
}
|
|
1251
|
-
function
|
|
1252
|
-
const n = e.memberOrders ? e.memberSales / e.memberOrders : 0,
|
|
1253
|
+
function Fs(e, s, t) {
|
|
1254
|
+
const n = e.memberOrders ? e.memberSales / e.memberOrders : 0, i = e.nonMemberOrders ? e.nonMemberSales / e.nonMemberOrders : 0, y = e.memberSales + e.nonMemberSales, p = ps(n, i);
|
|
1253
1255
|
return {
|
|
1254
|
-
description:
|
|
1256
|
+
description: v(
|
|
1255
1257
|
t,
|
|
1256
1258
|
"connect.loyalty.dashboard.spend.description",
|
|
1257
|
-
|
|
1259
|
+
Y.memberSpendComparison
|
|
1258
1260
|
),
|
|
1259
|
-
memberSalesFmt:
|
|
1260
|
-
nonMemberSalesFmt:
|
|
1261
|
-
avgMemberSaleFmt:
|
|
1262
|
-
avgNonMemberSaleFmt:
|
|
1263
|
-
memberSharePct:
|
|
1261
|
+
memberSalesFmt: _e(e.memberSales, s),
|
|
1262
|
+
nonMemberSalesFmt: _e(e.nonMemberSales, s),
|
|
1263
|
+
avgMemberSaleFmt: _e(n, s),
|
|
1264
|
+
avgNonMemberSaleFmt: _e(i, s),
|
|
1265
|
+
memberSharePct: dt(e.memberSales, y),
|
|
1264
1266
|
avgGapPct: p,
|
|
1265
|
-
summary:
|
|
1267
|
+
summary: Cs(
|
|
1266
1268
|
e,
|
|
1267
1269
|
n,
|
|
1268
|
-
|
|
1270
|
+
i,
|
|
1269
1271
|
p,
|
|
1270
1272
|
t
|
|
1271
1273
|
)
|
|
1272
1274
|
};
|
|
1273
1275
|
}
|
|
1274
|
-
function
|
|
1276
|
+
function Ds(e, s) {
|
|
1275
1277
|
const t = e.criteria, n = {
|
|
1276
|
-
newlyJoined:
|
|
1278
|
+
newlyJoined: v(
|
|
1277
1279
|
s,
|
|
1278
1280
|
"connect.loyalty.dashboard.lifecycle.descriptions.newlyJoined",
|
|
1279
|
-
|
|
1281
|
+
Y.newlyJoined
|
|
1280
1282
|
),
|
|
1281
|
-
frequent: t ?
|
|
1283
|
+
frequent: t ? v(
|
|
1282
1284
|
s,
|
|
1283
1285
|
"connect.loyalty.dashboard.lifecycle.descriptions.frequentWithCriteria",
|
|
1284
1286
|
`Existing members with at least ${t.frequentMinBills} completed member bills in the selected period.`,
|
|
1285
1287
|
{ count: t.frequentMinBills }
|
|
1286
|
-
) :
|
|
1288
|
+
) : v(
|
|
1287
1289
|
s,
|
|
1288
1290
|
"connect.loyalty.dashboard.lifecycle.descriptions.frequent",
|
|
1289
|
-
|
|
1291
|
+
Y.frequent
|
|
1290
1292
|
),
|
|
1291
|
-
infrequent: t ?
|
|
1293
|
+
infrequent: t ? v(
|
|
1292
1294
|
s,
|
|
1293
1295
|
"connect.loyalty.dashboard.lifecycle.descriptions.infrequentWithCriteria",
|
|
1294
1296
|
`Existing members with 1 to ${t.frequentMinBills - 1} completed member bills in the selected period.`,
|
|
1295
1297
|
{ count: t.frequentMinBills - 1 }
|
|
1296
|
-
) :
|
|
1298
|
+
) : v(
|
|
1297
1299
|
s,
|
|
1298
1300
|
"connect.loyalty.dashboard.lifecycle.descriptions.infrequent",
|
|
1299
|
-
|
|
1301
|
+
Y.infrequent
|
|
1300
1302
|
),
|
|
1301
|
-
atRisk: t ?
|
|
1303
|
+
atRisk: t ? v(
|
|
1302
1304
|
s,
|
|
1303
1305
|
"connect.loyalty.dashboard.lifecycle.descriptions.atRiskWithCriteria",
|
|
1304
1306
|
`Existing members with no selected-period purchase but a completed purchase in the prior ${t.atRiskLookbackDays} calendar days.`,
|
|
1305
1307
|
{ count: t.atRiskLookbackDays }
|
|
1306
|
-
) :
|
|
1308
|
+
) : v(
|
|
1307
1309
|
s,
|
|
1308
1310
|
"connect.loyalty.dashboard.lifecycle.descriptions.atRisk",
|
|
1309
|
-
|
|
1311
|
+
Y.atRisk
|
|
1310
1312
|
),
|
|
1311
|
-
dormant: t ?
|
|
1313
|
+
dormant: t ? v(
|
|
1312
1314
|
s,
|
|
1313
1315
|
"connect.loyalty.dashboard.lifecycle.descriptions.dormantWithCriteria",
|
|
1314
1316
|
`Existing members with no selected-period purchase and no completed purchase in the prior ${t.atRiskLookbackDays} calendar days.`,
|
|
1315
1317
|
{ count: t.atRiskLookbackDays }
|
|
1316
|
-
) :
|
|
1318
|
+
) : v(
|
|
1317
1319
|
s,
|
|
1318
1320
|
"connect.loyalty.dashboard.lifecycle.descriptions.dormant",
|
|
1319
|
-
|
|
1321
|
+
Y.dormant
|
|
1320
1322
|
)
|
|
1321
|
-
},
|
|
1323
|
+
}, i = [
|
|
1322
1324
|
{
|
|
1323
1325
|
id: "new",
|
|
1324
1326
|
label: "Newly joined",
|
|
1325
1327
|
count: e.newlyJoined,
|
|
1326
1328
|
description: n.newlyJoined,
|
|
1327
1329
|
i18nKey: "new",
|
|
1328
|
-
labelClass:
|
|
1330
|
+
labelClass: mt.text,
|
|
1329
1331
|
barColor: "typo-success"
|
|
1330
1332
|
},
|
|
1331
1333
|
{
|
|
@@ -1352,7 +1354,7 @@ function fs(e, s) {
|
|
|
1352
1354
|
count: e.atRisk,
|
|
1353
1355
|
description: n.atRisk,
|
|
1354
1356
|
i18nKey: "atRisk",
|
|
1355
|
-
labelClass:
|
|
1357
|
+
labelClass: ut.text,
|
|
1356
1358
|
barColor: "#FFC746"
|
|
1357
1359
|
},
|
|
1358
1360
|
{
|
|
@@ -1361,60 +1363,60 @@ function fs(e, s) {
|
|
|
1361
1363
|
count: e.dormant,
|
|
1362
1364
|
description: n.dormant,
|
|
1363
1365
|
i18nKey: "dormant",
|
|
1364
|
-
labelClass:
|
|
1366
|
+
labelClass: Rt.text,
|
|
1365
1367
|
barColor: "#FFCFCC"
|
|
1366
1368
|
}
|
|
1367
|
-
], y = Math.max(...
|
|
1369
|
+
], y = Math.max(...i.map((u) => u.count), 1);
|
|
1368
1370
|
return {
|
|
1369
|
-
lifecycleSegs:
|
|
1370
|
-
...
|
|
1371
|
-
label:
|
|
1371
|
+
lifecycleSegs: i.map((u) => ({
|
|
1372
|
+
...u,
|
|
1373
|
+
label: v(
|
|
1372
1374
|
s,
|
|
1373
|
-
`connect.loyalty.dashboard.lifecycle.labels.${
|
|
1374
|
-
|
|
1375
|
+
`connect.loyalty.dashboard.lifecycle.labels.${u.i18nKey}`,
|
|
1376
|
+
u.label
|
|
1375
1377
|
),
|
|
1376
|
-
barPct: Math.round(
|
|
1377
|
-
pctStr: `${e.totalMembers ? Math.round(
|
|
1378
|
-
countStr:
|
|
1378
|
+
barPct: Math.round(u.count / y * 100),
|
|
1379
|
+
pctStr: `${e.totalMembers ? Math.round(u.count / e.totalMembers * 100) : 0}%`,
|
|
1380
|
+
countStr: Ae(u.count)
|
|
1379
1381
|
})),
|
|
1380
|
-
lifecycleSummary:
|
|
1382
|
+
lifecycleSummary: v(
|
|
1381
1383
|
s,
|
|
1382
1384
|
"connect.loyalty.dashboard.lifecycle.summary",
|
|
1383
|
-
`${
|
|
1385
|
+
`${Ae(e.atRisk + e.dormant)} members are at-risk or dormant`,
|
|
1384
1386
|
e.atRisk + e.dormant
|
|
1385
1387
|
)
|
|
1386
1388
|
};
|
|
1387
1389
|
}
|
|
1388
|
-
function
|
|
1389
|
-
return
|
|
1390
|
+
function As(e, s) {
|
|
1391
|
+
return Ds(e, s);
|
|
1390
1392
|
}
|
|
1391
|
-
function
|
|
1392
|
-
return e.displayUnit === "uses" ?
|
|
1393
|
+
function ks(e, s, t) {
|
|
1394
|
+
return e.displayUnit === "uses" ? v(
|
|
1393
1395
|
t,
|
|
1394
1396
|
"connect.loyalty.dashboard.rewards.uses",
|
|
1395
|
-
`${
|
|
1397
|
+
`${Ae(e.displayValue)} ${e.displayValue === 1 ? "use" : "uses"}`,
|
|
1396
1398
|
e.displayValue
|
|
1397
|
-
) : e.type === "COIN" ?
|
|
1399
|
+
) : e.type === "COIN" ? v(
|
|
1398
1400
|
t,
|
|
1399
1401
|
"connect.loyalty.dashboard.rewards.points",
|
|
1400
|
-
`${
|
|
1402
|
+
`${Ae(e.displayValue)} pts`,
|
|
1401
1403
|
e.displayValue
|
|
1402
|
-
) :
|
|
1404
|
+
) : _e(e.displayValue, s);
|
|
1403
1405
|
}
|
|
1404
|
-
function
|
|
1406
|
+
function Is(e, s) {
|
|
1405
1407
|
if (e.displayUnit === "uses")
|
|
1406
|
-
return
|
|
1408
|
+
return v(
|
|
1407
1409
|
s,
|
|
1408
1410
|
"connect.loyalty.dashboard.rewards.topReward.voucherUsesDescription",
|
|
1409
1411
|
"Counted voucher-use transactions for this reward during the selected period."
|
|
1410
1412
|
);
|
|
1411
1413
|
const t = e.type === "COIN" ? "point" : e.type.toLowerCase();
|
|
1412
|
-
return
|
|
1414
|
+
return v(
|
|
1413
1415
|
s,
|
|
1414
1416
|
"connect.loyalty.dashboard.rewards.topReward.amountDescription",
|
|
1415
1417
|
`Total ${t} amount used for this reward during the selected period.`,
|
|
1416
1418
|
{
|
|
1417
|
-
type:
|
|
1419
|
+
type: v(
|
|
1418
1420
|
s,
|
|
1419
1421
|
`connect.loyalty.dashboard.rewards.types.${e.type}`,
|
|
1420
1422
|
t
|
|
@@ -1422,103 +1424,103 @@ function gs(e, s) {
|
|
|
1422
1424
|
}
|
|
1423
1425
|
);
|
|
1424
1426
|
}
|
|
1425
|
-
function
|
|
1427
|
+
function Ls(e, s, t) {
|
|
1426
1428
|
const n = Math.max(
|
|
1427
|
-
...e.topRewards.map((
|
|
1429
|
+
...e.topRewards.map((i) => i.usageCount),
|
|
1428
1430
|
1
|
|
1429
1431
|
);
|
|
1430
1432
|
return {
|
|
1431
1433
|
rewardKpis: [
|
|
1432
1434
|
{
|
|
1433
|
-
label:
|
|
1435
|
+
label: v(
|
|
1434
1436
|
t,
|
|
1435
1437
|
"connect.loyalty.dashboard.rewards.kpis.rewardRedeemers",
|
|
1436
1438
|
"Reward redeemers"
|
|
1437
1439
|
),
|
|
1438
|
-
value:
|
|
1439
|
-
description:
|
|
1440
|
+
value: Ae(e.rewardRedeemers),
|
|
1441
|
+
description: v(
|
|
1440
1442
|
t,
|
|
1441
1443
|
"connect.loyalty.dashboard.rewards.descriptions.rewardRedeemers",
|
|
1442
|
-
|
|
1444
|
+
Y.rewardRedeemers
|
|
1443
1445
|
)
|
|
1444
1446
|
},
|
|
1445
1447
|
{
|
|
1446
|
-
label:
|
|
1448
|
+
label: v(
|
|
1447
1449
|
t,
|
|
1448
1450
|
"connect.loyalty.dashboard.rewards.kpis.redemptionRate",
|
|
1449
1451
|
"Redemption rate"
|
|
1450
1452
|
),
|
|
1451
1453
|
value: `${e.redemptionRatePct}%`,
|
|
1452
|
-
description:
|
|
1454
|
+
description: v(
|
|
1453
1455
|
t,
|
|
1454
1456
|
"connect.loyalty.dashboard.rewards.descriptions.redemptionRate",
|
|
1455
|
-
|
|
1457
|
+
Y.redemptionRate
|
|
1456
1458
|
)
|
|
1457
1459
|
},
|
|
1458
1460
|
{
|
|
1459
|
-
label:
|
|
1461
|
+
label: v(
|
|
1460
1462
|
t,
|
|
1461
1463
|
"connect.loyalty.dashboard.rewards.kpis.averageUses",
|
|
1462
1464
|
"Avg reward uses"
|
|
1463
1465
|
),
|
|
1464
1466
|
value: `${e.averageRewardUsesPerRedeemer}x`,
|
|
1465
|
-
description:
|
|
1467
|
+
description: v(
|
|
1466
1468
|
t,
|
|
1467
1469
|
"connect.loyalty.dashboard.rewards.descriptions.averageUses",
|
|
1468
|
-
|
|
1470
|
+
Y.averageRewardUses
|
|
1469
1471
|
)
|
|
1470
1472
|
}
|
|
1471
1473
|
],
|
|
1472
|
-
topRewards: e.topRewards.map((
|
|
1473
|
-
name:
|
|
1474
|
-
count:
|
|
1475
|
-
description:
|
|
1476
|
-
barPct:
|
|
1474
|
+
topRewards: e.topRewards.map((i) => ({
|
|
1475
|
+
name: i.name,
|
|
1476
|
+
count: ks(i, s, t),
|
|
1477
|
+
description: Is(i, t),
|
|
1478
|
+
barPct: i.usageCount ? Math.round(i.usageCount / n * 100) : 0
|
|
1477
1479
|
}))
|
|
1478
1480
|
};
|
|
1479
1481
|
}
|
|
1480
|
-
const
|
|
1482
|
+
const Os = { class: "flex flex-col gap-16 min-h-full" }, Es = { class: "flex flex-col gap-12 pb-16 border-b border-fm-color-neutral-gray-100" }, Ps = { class: "flex items-center justify-between gap-8" }, Bs = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Ts = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-2" }, Ns = {
|
|
1481
1483
|
key: 0,
|
|
1482
1484
|
class: "flex items-center justify-center min-h-[72px]"
|
|
1483
|
-
},
|
|
1485
|
+
}, Us = { class: "grid grid-cols-2 gap-8" }, zs = { class: "border border-fm-color-neutral-gray-100 rounded-sm p-12" }, Vs = { class: "fm-typo-en-title-lg-800 text-fm-color-typo-primary" }, js = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mt-4" }, Ks = { class: "border border-fm-color-neutral-gray-100 rounded-sm p-12" }, qs = { class: "fm-typo-en-title-lg-800 text-fm-color-typo-primary" }, Ys = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mt-4" }, Hs = {
|
|
1484
1486
|
key: 0,
|
|
1485
1487
|
class: "flex flex-col gap-8"
|
|
1486
|
-
},
|
|
1488
|
+
}, Ws = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-primary" }, Gs = { class: "flex items-center justify-between gap-8" }, Js = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-primary" }, Zs = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Qs = { class: "flex items-start justify-between gap-12 fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, Xs = { class: "whitespace-nowrap" }, er = {
|
|
1487
1489
|
key: 0,
|
|
1488
1490
|
class: "mt-4 pl-12 border-l-2 border-fm-color-neutral-gray-100 flex flex-col gap-4"
|
|
1489
|
-
},
|
|
1491
|
+
}, tr = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, ar = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, or = {
|
|
1490
1492
|
key: 0,
|
|
1491
1493
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-error p-12 rounded-sm border border-fm-color-system-error-200 bg-fm-color-system-error-100"
|
|
1492
|
-
},
|
|
1494
|
+
}, sr = { class: "grid grid-cols-2 md:grid-cols-4 gap-8 items-end" }, rr = { class: "flex items-center justify-between gap-12 flex-wrap" }, nr = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-primary" }, lr = {
|
|
1493
1495
|
key: 0,
|
|
1494
1496
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
1495
|
-
},
|
|
1497
|
+
}, ir = { class: "flex items-center gap-8" }, cr = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, dr = {
|
|
1496
1498
|
key: 1,
|
|
1497
1499
|
class: "flex items-center justify-center min-h-[180px]"
|
|
1498
|
-
},
|
|
1500
|
+
}, mr = {
|
|
1499
1501
|
key: 2,
|
|
1500
1502
|
class: "flex flex-col items-center justify-center gap-8 min-h-[180px] text-center"
|
|
1501
|
-
},
|
|
1503
|
+
}, ur = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, yr = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, pr = {
|
|
1502
1504
|
key: 3,
|
|
1503
1505
|
class: "flex flex-col items-center justify-center gap-8 min-h-[180px] text-center"
|
|
1504
|
-
},
|
|
1506
|
+
}, br = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, fr = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, hr = {
|
|
1505
1507
|
key: 4,
|
|
1506
1508
|
class: "flex flex-col gap-8"
|
|
1507
|
-
},
|
|
1509
|
+
}, vr = { class: "flex items-stretch gap-8 p-12" }, gr = ["aria-expanded", "onClick", "onKeydown"], _r = { class: "flex-1 min-w-0" }, xr = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary truncate" }, wr = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary truncate" }, Rr = { class: "hidden md:flex flex-col justify-center min-w-[150px]" }, Sr = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, Mr = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-primary" }, $r = { class: "hidden lg:flex flex-wrap items-center gap-4 max-w-[260px]" }, Cr = {
|
|
1508
1510
|
key: 0,
|
|
1509
1511
|
class: "border-t border-fm-color-neutral-gray-100 bg-fm-color-neutral-gray-100 p-16"
|
|
1510
|
-
},
|
|
1512
|
+
}, Fr = { class: "grid grid-cols-1 md:grid-cols-2 gap-16 mb-16" }, Dr = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, Ar = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-primary" }, kr = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, Ir = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-primary" }, Lr = { class: "flex flex-col gap-8" }, Or = { class: "flex items-start justify-between gap-12" }, Er = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-primary" }, Pr = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary whitespace-nowrap" }, Br = { class: "grid grid-cols-1 md:grid-cols-2 gap-x-16 gap-y-8 mt-8" }, Tr = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Nr = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-primary" }, Ur = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, zr = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-primary" }, Vr = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, jr = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-primary" }, Kr = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, qr = {
|
|
1511
1513
|
key: 0,
|
|
1512
1514
|
class: "mt-4 flex max-w-full flex-wrap gap-4"
|
|
1513
|
-
},
|
|
1515
|
+
}, Yr = {
|
|
1514
1516
|
key: 1,
|
|
1515
1517
|
class: "fm-typo-en-body-sm-600 text-fm-color-typo-primary"
|
|
1516
|
-
},
|
|
1518
|
+
}, Hr = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary md:col-span-2" }, Wr = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-primary break-words" }, Gr = {
|
|
1517
1519
|
key: 5,
|
|
1518
1520
|
class: "flex items-center justify-between gap-12 pt-8 border-t border-fm-color-neutral-gray-100"
|
|
1519
|
-
},
|
|
1521
|
+
}, Jr = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Zr = { class: "flex items-center gap-4" }, Qr = /* @__PURE__ */ Z({
|
|
1520
1522
|
__name: "RewardAbuseFindingsSheet",
|
|
1521
|
-
props: /* @__PURE__ */
|
|
1523
|
+
props: /* @__PURE__ */ Bt({
|
|
1522
1524
|
payload: {},
|
|
1523
1525
|
summary: {},
|
|
1524
1526
|
outlierMetric: {},
|
|
@@ -1529,17 +1531,17 @@ const xs = { class: "flex flex-col gap-16 min-h-full" }, ws = { class: "flex fle
|
|
|
1529
1531
|
}),
|
|
1530
1532
|
emits: ["update:modelValue"],
|
|
1531
1533
|
setup(e) {
|
|
1532
|
-
const s = e, { t, locale: n } = Q(),
|
|
1534
|
+
const s = e, { t, locale: n } = Q(), i = (m, C) => typeof C == "number" ? t(m, C) : C === void 0 ? t(m) : t(m, C), y = Tt(e, "modelValue"), p = S(He[0]), u = S([]), x = S(""), w = S({
|
|
1533
1535
|
startDate: void 0,
|
|
1534
1536
|
endDate: void 0
|
|
1535
|
-
}), R = S(10),
|
|
1536
|
-
let
|
|
1537
|
-
const
|
|
1538
|
-
() =>
|
|
1539
|
-
label:
|
|
1540
|
-
value:
|
|
1537
|
+
}), R = S(10), g = S(0), h = S("latestOccurredOn"), V = S([]), oe = S(0), I = S(0), X = S(!1), ke = S(!1), be = S(!1), A = S({}), ee = S(null), le = S(null);
|
|
1538
|
+
let G = 0, te = "", se;
|
|
1539
|
+
const Ue = $(
|
|
1540
|
+
() => He.map((m) => ({
|
|
1541
|
+
label: We(m, i),
|
|
1542
|
+
value: m
|
|
1541
1543
|
}))
|
|
1542
|
-
),
|
|
1544
|
+
), ze = $(() => [
|
|
1543
1545
|
{
|
|
1544
1546
|
label: t("connect.loyalty.dashboard.review.sortItems.latestFlagged"),
|
|
1545
1547
|
value: "latestOccurredOn"
|
|
@@ -1548,19 +1550,19 @@ const xs = { class: "flex flex-col gap-16 min-h-full" }, ws = { class: "flex fle
|
|
|
1548
1550
|
label: t("connect.loyalty.dashboard.review.sortItems.highestObserved"),
|
|
1549
1551
|
value: "observedValue"
|
|
1550
1552
|
}
|
|
1551
|
-
]),
|
|
1553
|
+
]), ie = [
|
|
1552
1554
|
{ label: "10", value: 10 },
|
|
1553
1555
|
{ label: "20", value: 20 },
|
|
1554
1556
|
{ label: "50", value: 50 }
|
|
1555
|
-
],
|
|
1556
|
-
() =>
|
|
1557
|
-
),
|
|
1557
|
+
], re = $(
|
|
1558
|
+
() => I.value ? Math.ceil(I.value / R.value) : 0
|
|
1559
|
+
), Ie = $(() => g.value + 1), Le = $(
|
|
1558
1560
|
() => Object.fromEntries(
|
|
1559
|
-
s.locations.map((
|
|
1561
|
+
s.locations.map((m) => [m.value, m.label])
|
|
1560
1562
|
)
|
|
1561
|
-
),
|
|
1563
|
+
), Oe = $(
|
|
1562
1564
|
() => `${w.value.startDate}-${w.value.endDate}`
|
|
1563
|
-
),
|
|
1565
|
+
), we = $(
|
|
1564
1566
|
() => ({
|
|
1565
1567
|
loading: t("connect.loyalty.dashboard.review.statuses.loading"),
|
|
1566
1568
|
available: t("connect.loyalty.dashboard.review.statuses.available"),
|
|
@@ -1570,192 +1572,192 @@ const xs = { class: "flex flex-col gap-16 min-h-full" }, ws = { class: "flex fle
|
|
|
1570
1572
|
stale: t("connect.loyalty.dashboard.review.statuses.stale")
|
|
1571
1573
|
})
|
|
1572
1574
|
);
|
|
1573
|
-
function
|
|
1574
|
-
return
|
|
1575
|
+
function Ee(m) {
|
|
1576
|
+
return m === "available" || m === "empty" ? "text-fm-color-typo-success bg-fm-color-system-success-100" : m === "partial" || m === "stale" ? "text-fm-color-typo-warning bg-fm-color-system-warning-100" : "text-fm-color-typo-error bg-fm-color-system-error-100";
|
|
1575
1577
|
}
|
|
1576
|
-
function
|
|
1577
|
-
return t(
|
|
1578
|
+
function Pe(m) {
|
|
1579
|
+
return t(m === "available" ? "connect.loyalty.dashboard.review.signalStatuses.available" : m === "insufficient-baseline" ? "connect.loyalty.dashboard.review.signalStatuses.insufficientBaseline" : "connect.loyalty.dashboard.review.signalStatuses.unavailable");
|
|
1578
1580
|
}
|
|
1579
|
-
function
|
|
1580
|
-
return
|
|
1581
|
+
function Be(m) {
|
|
1582
|
+
return m === "available" ? "text-fm-color-typo-success" : m === "insufficient-baseline" ? "text-fm-color-typo-warning" : "text-fm-color-typo-error";
|
|
1581
1583
|
}
|
|
1582
|
-
function
|
|
1583
|
-
return
|
|
1584
|
+
function L(m) {
|
|
1585
|
+
return m === null ? "--" : m.toLocaleString();
|
|
1584
1586
|
}
|
|
1585
|
-
function
|
|
1586
|
-
return
|
|
1587
|
+
function Re(m) {
|
|
1588
|
+
return m === null ? "--" : m.toLocaleString();
|
|
1587
1589
|
}
|
|
1588
|
-
function
|
|
1589
|
-
var
|
|
1590
|
-
const
|
|
1591
|
-
return
|
|
1590
|
+
function ce(m) {
|
|
1591
|
+
var P;
|
|
1592
|
+
const C = Yt(m);
|
|
1593
|
+
return C.isValid() ? new Intl.DateTimeFormat(n.value, {
|
|
1592
1594
|
day: "numeric",
|
|
1593
1595
|
month: "short",
|
|
1594
1596
|
year: "numeric",
|
|
1595
1597
|
hour: "numeric",
|
|
1596
1598
|
minute: "2-digit",
|
|
1597
|
-
timeZone: (
|
|
1598
|
-
}).format(
|
|
1599
|
+
timeZone: (P = s.payload) == null ? void 0 : P.timezone
|
|
1600
|
+
}).format(C.toDate()) : "--";
|
|
1599
1601
|
}
|
|
1600
|
-
function
|
|
1601
|
-
return
|
|
1602
|
+
function fe(m) {
|
|
1603
|
+
return m.length ? m.join(", ") : "--";
|
|
1602
1604
|
}
|
|
1603
|
-
function
|
|
1604
|
-
return
|
|
1605
|
+
function he(m) {
|
|
1606
|
+
return Gt(m, {
|
|
1605
1607
|
successMessage: t("connect.loyalty.dashboard.review.copyBillIdSuccess")
|
|
1606
1608
|
});
|
|
1607
1609
|
}
|
|
1608
|
-
function
|
|
1609
|
-
return
|
|
1610
|
+
function ve(m) {
|
|
1611
|
+
return m.member.name || t("connect.loyalty.dashboard.review.memberFallback");
|
|
1610
1612
|
}
|
|
1611
|
-
function
|
|
1612
|
-
return
|
|
1613
|
-
date:
|
|
1613
|
+
function Se(m) {
|
|
1614
|
+
return m ? t("connect.loyalty.dashboard.review.updated", {
|
|
1615
|
+
date: ce(m)
|
|
1614
1616
|
}) : t("connect.loyalty.dashboard.review.timestampUnavailable");
|
|
1615
1617
|
}
|
|
1616
|
-
function
|
|
1617
|
-
return
|
|
1618
|
-
threshold:
|
|
1619
|
-
members:
|
|
1618
|
+
function Me(m) {
|
|
1619
|
+
return m.status !== "available" ? t("connect.loyalty.dashboard.review.outlier.insufficientBaseline") : t("connect.loyalty.dashboard.review.outlier.available", {
|
|
1620
|
+
threshold: Re(m.threshold),
|
|
1621
|
+
members: m.baselineMembers.toLocaleString()
|
|
1620
1622
|
});
|
|
1621
1623
|
}
|
|
1622
|
-
function
|
|
1623
|
-
return
|
|
1624
|
+
function Ze(m) {
|
|
1625
|
+
return Le.value[m] ?? m;
|
|
1624
1626
|
}
|
|
1625
|
-
function
|
|
1626
|
-
var
|
|
1627
|
-
return
|
|
1627
|
+
function ue(m) {
|
|
1628
|
+
var C, P, j;
|
|
1629
|
+
return m.member.id ?? `anonymous-${m.latestOccurredOn}-${(C = m.findings[0]) == null ? void 0 : C.billIds.join(
|
|
1628
1630
|
"-"
|
|
1629
|
-
)}-${(
|
|
1631
|
+
)}-${(P = m.findings[0]) == null ? void 0 : P.referenceIds.join("-")}-${(j = m.findings[0]) == null ? void 0 : j.observedValue}`;
|
|
1630
1632
|
}
|
|
1631
|
-
function
|
|
1632
|
-
const
|
|
1633
|
-
|
|
1633
|
+
function $e(m) {
|
|
1634
|
+
const C = ue(m);
|
|
1635
|
+
A.value[C] = !A.value[C];
|
|
1634
1636
|
}
|
|
1635
|
-
function
|
|
1636
|
-
|
|
1637
|
+
function Qe(m) {
|
|
1638
|
+
m.startDate && m.endDate && (w.value = m);
|
|
1637
1639
|
}
|
|
1638
|
-
function
|
|
1639
|
-
var
|
|
1640
|
-
const
|
|
1641
|
-
|
|
1642
|
-
(
|
|
1643
|
-
)) == null ? void 0 :
|
|
1644
|
-
startDate:
|
|
1645
|
-
endDate:
|
|
1646
|
-
},
|
|
1640
|
+
function Ve() {
|
|
1641
|
+
var C, P;
|
|
1642
|
+
const m = s.payload;
|
|
1643
|
+
m && (p.value = ((C = s.summary.bySignal.find(
|
|
1644
|
+
(j) => j.status === "available" && (j.findings ?? 0) > 0
|
|
1645
|
+
)) == null ? void 0 : C.signal) ?? ((P = s.summary.bySignal.find((j) => j.status === "available")) == null ? void 0 : P.signal) ?? He[0], u.value = [...m.selectedRestaurantIds], w.value = {
|
|
1646
|
+
startDate: m.dateRange[0],
|
|
1647
|
+
endDate: m.dateRange[1]
|
|
1648
|
+
}, x.value = "", R.value = 10, g.value = 0, h.value = "latestOccurredOn", A.value = {}, be.value = !1);
|
|
1647
1649
|
}
|
|
1648
|
-
function
|
|
1650
|
+
function Te() {
|
|
1649
1651
|
return !w.value.startDate || !w.value.endDate ? null : [w.value.startDate, w.value.endDate];
|
|
1650
1652
|
}
|
|
1651
|
-
async function
|
|
1653
|
+
async function de(m = !1) {
|
|
1652
1654
|
if (!y.value || !s.payload) return;
|
|
1653
|
-
const
|
|
1654
|
-
if (
|
|
1655
|
-
const
|
|
1656
|
-
...
|
|
1655
|
+
const C = Te();
|
|
1656
|
+
if (!C) return;
|
|
1657
|
+
const j = {
|
|
1658
|
+
...ss(
|
|
1657
1659
|
s.payload,
|
|
1658
|
-
|
|
1660
|
+
C
|
|
1659
1661
|
),
|
|
1660
|
-
selectedRestaurantIds: [...
|
|
1662
|
+
selectedRestaurantIds: [...u.value],
|
|
1661
1663
|
signal: p.value,
|
|
1662
|
-
search:
|
|
1663
|
-
page:
|
|
1664
|
+
search: x.value.trim(),
|
|
1665
|
+
page: g.value + 1,
|
|
1664
1666
|
pageSize: R.value,
|
|
1665
|
-
sortBy:
|
|
1667
|
+
sortBy: h.value,
|
|
1666
1668
|
sortDirection: "desc"
|
|
1667
|
-
},
|
|
1668
|
-
if (!
|
|
1669
|
-
|
|
1670
|
-
const
|
|
1671
|
-
X.value = !0,
|
|
1669
|
+
}, ye = JSON.stringify(j);
|
|
1670
|
+
if (!m && ye === te) return;
|
|
1671
|
+
te = ye;
|
|
1672
|
+
const me = ++G;
|
|
1673
|
+
X.value = !0, ke.value = !1;
|
|
1672
1674
|
try {
|
|
1673
|
-
const
|
|
1674
|
-
if (
|
|
1675
|
-
|
|
1675
|
+
const J = await H.readRewardAbuseFindings(j);
|
|
1676
|
+
if (me !== G) return;
|
|
1677
|
+
V.value = J.members, oe.value = J.totalMembers, I.value = J.totalRows, A.value = {};
|
|
1676
1678
|
} catch {
|
|
1677
|
-
if (
|
|
1678
|
-
|
|
1679
|
+
if (me !== G) return;
|
|
1680
|
+
ke.value = !0, V.value = [], oe.value = 0, I.value = 0;
|
|
1679
1681
|
} finally {
|
|
1680
|
-
|
|
1682
|
+
me === G && (X.value = !1);
|
|
1681
1683
|
}
|
|
1682
1684
|
}
|
|
1683
|
-
function
|
|
1684
|
-
y.value && (
|
|
1685
|
-
|
|
1685
|
+
function Xe() {
|
|
1686
|
+
y.value && (g.value = 0, se && clearTimeout(se), se = setTimeout(() => {
|
|
1687
|
+
de();
|
|
1686
1688
|
}, 250));
|
|
1687
1689
|
}
|
|
1688
|
-
function
|
|
1689
|
-
|
|
1690
|
+
function je() {
|
|
1691
|
+
g.value < re.value - 1 && (g.value += 1, de());
|
|
1690
1692
|
}
|
|
1691
|
-
function
|
|
1692
|
-
|
|
1693
|
+
function et() {
|
|
1694
|
+
g.value > 0 && (g.value -= 1, de());
|
|
1693
1695
|
}
|
|
1694
|
-
function
|
|
1695
|
-
R.value =
|
|
1696
|
+
function tt(m) {
|
|
1697
|
+
R.value = m, g.value = 0, de();
|
|
1696
1698
|
}
|
|
1697
|
-
async function
|
|
1698
|
-
var
|
|
1699
|
-
if (
|
|
1700
|
-
|
|
1699
|
+
async function at(m) {
|
|
1700
|
+
var C;
|
|
1701
|
+
if (m.member.id) {
|
|
1702
|
+
be.value = !1;
|
|
1701
1703
|
try {
|
|
1702
|
-
const
|
|
1703
|
-
|
|
1704
|
+
const P = await Ht.readById(m.member.id);
|
|
1705
|
+
ee.value = P, await xt(), (C = le.value) == null || C.showSheet();
|
|
1704
1706
|
} catch {
|
|
1705
|
-
|
|
1707
|
+
be.value = !0;
|
|
1706
1708
|
}
|
|
1707
1709
|
}
|
|
1708
1710
|
}
|
|
1709
|
-
return
|
|
1710
|
-
if (!
|
|
1711
|
-
|
|
1711
|
+
return Ye(y, (m) => {
|
|
1712
|
+
if (!m) {
|
|
1713
|
+
ee.value = null, be.value = !1;
|
|
1712
1714
|
return;
|
|
1713
1715
|
}
|
|
1714
|
-
|
|
1715
|
-
}),
|
|
1716
|
-
[p,
|
|
1717
|
-
|
|
1716
|
+
te = "", Ve(), de(!0);
|
|
1717
|
+
}), Ye(
|
|
1718
|
+
[p, u, x, w, h],
|
|
1719
|
+
Xe,
|
|
1718
1720
|
{ deep: !0 }
|
|
1719
|
-
),
|
|
1721
|
+
), Ye(
|
|
1720
1722
|
() => s.payload,
|
|
1721
1723
|
() => {
|
|
1722
|
-
y.value && (
|
|
1724
|
+
y.value && (te = "", Ve(), de(!0));
|
|
1723
1725
|
},
|
|
1724
1726
|
{ deep: !0 }
|
|
1725
|
-
),
|
|
1726
|
-
|
|
1727
|
-
}), (
|
|
1728
|
-
const
|
|
1729
|
-
return c(),
|
|
1727
|
+
), Nt(() => {
|
|
1728
|
+
se && clearTimeout(se);
|
|
1729
|
+
}), (m, C) => {
|
|
1730
|
+
const P = M("FmCircularProgress"), j = M("FmSearch"), ye = M("FmSelect"), me = M("FmIcon"), J = M("FmButton"), Ke = M("FmAvatar"), ot = M("FmChip"), Ne = M("FmTooltip"), st = M("FmSideSheet");
|
|
1731
|
+
return c(), N(st, {
|
|
1730
1732
|
modelValue: y.value,
|
|
1731
|
-
"onUpdate:modelValue":
|
|
1733
|
+
"onUpdate:modelValue": C[5] || (C[5] = (_) => y.value = _),
|
|
1732
1734
|
header: o(t)("connect.loyalty.dashboard.review.sheetTitle"),
|
|
1733
1735
|
"dismiss-away": "",
|
|
1734
1736
|
"max-width": 1100
|
|
1735
1737
|
}, {
|
|
1736
1738
|
default: U(() => [
|
|
1737
|
-
a("div",
|
|
1738
|
-
a("section",
|
|
1739
|
-
a("div",
|
|
1739
|
+
a("div", Os, [
|
|
1740
|
+
a("section", Es, [
|
|
1741
|
+
a("div", Ps, [
|
|
1740
1742
|
a("div", null, [
|
|
1741
|
-
a("div",
|
|
1742
|
-
a("div",
|
|
1743
|
+
a("div", Bs, r(o(t)("connect.loyalty.dashboard.review.summaryTitle")), 1),
|
|
1744
|
+
a("div", Ts, r(o(t)("connect.loyalty.dashboard.review.summaryDescription")), 1)
|
|
1743
1745
|
]),
|
|
1744
1746
|
a("span", {
|
|
1745
|
-
class: T(["fm-typo-en-body-sm-600 px-8 py-4 rounded-sm whitespace-nowrap",
|
|
1746
|
-
}, r(o(
|
|
1747
|
+
class: T(["fm-typo-en-body-sm-600 px-8 py-4 rounded-sm whitespace-nowrap", Ee(e.summary.status)])
|
|
1748
|
+
}, r(o(we)[e.summary.status]), 3)
|
|
1747
1749
|
]),
|
|
1748
|
-
e.summary.status === "loading" ? (c(), d("div",
|
|
1749
|
-
|
|
1750
|
-
])) : (c(), d(
|
|
1751
|
-
a("div",
|
|
1752
|
-
a("div",
|
|
1753
|
-
a("div",
|
|
1754
|
-
a("div",
|
|
1750
|
+
e.summary.status === "loading" ? (c(), d("div", Ns, [
|
|
1751
|
+
f(P, { size: "lg" })
|
|
1752
|
+
])) : (c(), d(k, { key: 1 }, [
|
|
1753
|
+
a("div", Us, [
|
|
1754
|
+
a("div", zs, [
|
|
1755
|
+
a("div", Vs, r(L(e.summary.flaggedMembers)), 1),
|
|
1756
|
+
a("div", js, r(o(t)("connect.loyalty.dashboard.review.uniqueMembers")), 1)
|
|
1755
1757
|
]),
|
|
1756
|
-
a("div",
|
|
1757
|
-
a("div",
|
|
1758
|
-
a("div",
|
|
1758
|
+
a("div", Ks, [
|
|
1759
|
+
a("div", qs, r(L(e.summary.totalFindings)), 1),
|
|
1760
|
+
a("div", Ys, r(o(t)("connect.loyalty.dashboard.review.totalFindings")), 1)
|
|
1759
1761
|
])
|
|
1760
1762
|
]),
|
|
1761
1763
|
a("div", {
|
|
@@ -1764,300 +1766,300 @@ const xs = { class: "flex flex-col gap-16 min-h-full" }, ws = { class: "flex fle
|
|
|
1764
1766
|
e.summary.status === "available" || e.summary.status === "empty" ? "text-fm-color-typo-secondary border-fm-color-neutral-gray-100 bg-fm-color-neutral-gray-100" : e.summary.status === "partial" || e.summary.status === "stale" ? "text-fm-color-typo-warning border-fm-color-system-warning-200 bg-fm-color-system-warning-100" : "text-fm-color-typo-error border-fm-color-system-error-200 bg-fm-color-system-error-100"
|
|
1765
1767
|
])
|
|
1766
1768
|
}, r(e.summary.message), 3),
|
|
1767
|
-
e.summary.bySignal.length ? (c(), d("div",
|
|
1768
|
-
a("div",
|
|
1769
|
-
(c(!0), d(
|
|
1770
|
-
var
|
|
1769
|
+
e.summary.bySignal.length ? (c(), d("div", Hs, [
|
|
1770
|
+
a("div", Ws, r(o(t)("connect.loyalty.dashboard.review.signalSummary")), 1),
|
|
1771
|
+
(c(!0), d(k, null, W(e.summary.bySignal, (_) => {
|
|
1772
|
+
var D;
|
|
1771
1773
|
return c(), d("div", {
|
|
1772
|
-
key:
|
|
1774
|
+
key: _.signal,
|
|
1773
1775
|
class: "flex flex-col gap-4 py-8 border-b border-fm-color-neutral-gray-100 last:border-b-0"
|
|
1774
1776
|
}, [
|
|
1775
|
-
a("div",
|
|
1776
|
-
a("div",
|
|
1777
|
+
a("div", Gs, [
|
|
1778
|
+
a("div", Js, r(_.label), 1),
|
|
1777
1779
|
a("div", {
|
|
1778
|
-
class: T(["fm-typo-en-body-sm-600",
|
|
1779
|
-
}, r(
|
|
1780
|
+
class: T(["fm-typo-en-body-sm-600", Be(_.status)])
|
|
1781
|
+
}, r(Pe(_.status)), 3)
|
|
1780
1782
|
]),
|
|
1781
|
-
a("div",
|
|
1782
|
-
a("div",
|
|
1783
|
-
a("span", null, r(
|
|
1784
|
-
a("span",
|
|
1785
|
-
members:
|
|
1786
|
-
findings:
|
|
1783
|
+
a("div", Zs, r(_.description), 1),
|
|
1784
|
+
a("div", Qs, [
|
|
1785
|
+
a("span", null, r(_.threshold), 1),
|
|
1786
|
+
a("span", Xs, r(o(t)("connect.loyalty.dashboard.review.signalCounts", {
|
|
1787
|
+
members: L(_.flaggedMembers),
|
|
1788
|
+
findings: L(_.findings)
|
|
1787
1789
|
})), 1)
|
|
1788
1790
|
]),
|
|
1789
|
-
|
|
1790
|
-
(c(!0), d(
|
|
1791
|
-
key:
|
|
1791
|
+
_.signal === "reward-earning-outlier" && ((D = e.outlierMetric) != null && D.byType.length) ? (c(), d("div", er, [
|
|
1792
|
+
(c(!0), d(k, null, W(e.outlierMetric.byType, (B) => (c(), d("div", {
|
|
1793
|
+
key: B.type,
|
|
1792
1794
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary"
|
|
1793
|
-
}, r(o(
|
|
1794
|
-
])) :
|
|
1795
|
+
}, r(o(gt)(B.type, i)) + ": " + r(Me(B)), 1))), 128))
|
|
1796
|
+
])) : z("", !0)
|
|
1795
1797
|
]);
|
|
1796
1798
|
}), 128))
|
|
1797
|
-
])) :
|
|
1798
|
-
a("div",
|
|
1799
|
+
])) : z("", !0),
|
|
1800
|
+
a("div", tr, r(Se(e.summary.updatedAt)), 1)
|
|
1799
1801
|
], 64))
|
|
1800
1802
|
]),
|
|
1801
|
-
a("div",
|
|
1802
|
-
o(
|
|
1803
|
-
a("div",
|
|
1804
|
-
|
|
1805
|
-
modelValue: o(
|
|
1806
|
-
"onUpdate:modelValue":
|
|
1803
|
+
a("div", ar, r(o(t)("connect.loyalty.dashboard.review.intro")), 1),
|
|
1804
|
+
o(be) ? (c(), d("div", or, r(o(t)("connect.loyalty.dashboard.review.detailError")), 1)) : z("", !0),
|
|
1805
|
+
a("div", sr, [
|
|
1806
|
+
f(j, {
|
|
1807
|
+
modelValue: o(x),
|
|
1808
|
+
"onUpdate:modelValue": C[0] || (C[0] = (_) => lt(x) ? x.value = _ : null),
|
|
1807
1809
|
placeholder: o(t)("connect.loyalty.dashboard.review.searchMemberId"),
|
|
1808
1810
|
class: "col-span-2 md:col-span-1"
|
|
1809
1811
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
1810
|
-
|
|
1812
|
+
f(ye, {
|
|
1811
1813
|
modelValue: o(p),
|
|
1812
|
-
"onUpdate:modelValue":
|
|
1813
|
-
items: o(
|
|
1814
|
+
"onUpdate:modelValue": C[1] || (C[1] = (_) => lt(p) ? p.value = _ : null),
|
|
1815
|
+
items: o(Ue),
|
|
1814
1816
|
label: o(t)("connect.loyalty.dashboard.review.signal"),
|
|
1815
1817
|
class: "col-span-1"
|
|
1816
1818
|
}, null, 8, ["modelValue", "items", "label"]),
|
|
1817
|
-
|
|
1819
|
+
f(wt, {
|
|
1818
1820
|
label: `${o(t)("connect.loyalty.dashboard.filters.location")}: `,
|
|
1819
1821
|
"all-label": o(t)("connect.loyalty.dashboard.filters.all"),
|
|
1820
1822
|
"selected-label": o(t)("connect.loyalty.dashboard.filters.selected"),
|
|
1821
1823
|
"search-placeholder": o(t)("connect.loyalty.dashboard.filters.searchLocations"),
|
|
1822
1824
|
icon: "storefront",
|
|
1823
1825
|
"right-icon": "keyboard_arrow_down",
|
|
1824
|
-
"model-value": o(
|
|
1826
|
+
"model-value": o(u),
|
|
1825
1827
|
items: e.locations,
|
|
1826
1828
|
"show-item-label": !0,
|
|
1827
1829
|
class: "col-span-1",
|
|
1828
|
-
"onUpdate:modelValue":
|
|
1830
|
+
"onUpdate:modelValue": C[2] || (C[2] = (_) => u.value = _)
|
|
1829
1831
|
}, null, 8, ["label", "all-label", "selected-label", "search-placeholder", "model-value", "items"]),
|
|
1830
|
-
(c(),
|
|
1831
|
-
key: o(
|
|
1832
|
+
(c(), N(it, {
|
|
1833
|
+
key: o(Oe),
|
|
1832
1834
|
"model-value": o(w),
|
|
1833
|
-
"onUpdate:modelValue":
|
|
1835
|
+
"onUpdate:modelValue": Qe
|
|
1834
1836
|
}, null, 8, ["model-value"]))
|
|
1835
1837
|
]),
|
|
1836
|
-
a("div",
|
|
1837
|
-
a("div",
|
|
1838
|
-
|
|
1839
|
-
o(
|
|
1838
|
+
a("div", rr, [
|
|
1839
|
+
a("div", nr, [
|
|
1840
|
+
ge(r(o(t)("connect.loyalty.dashboard.review.members", o(oe))) + " ", 1),
|
|
1841
|
+
o(I) !== o(oe) ? (c(), d("span", lr, r(o(t)("connect.loyalty.dashboard.review.evidenceRows", o(I))), 1)) : z("", !0)
|
|
1840
1842
|
]),
|
|
1841
|
-
a("div",
|
|
1842
|
-
a("span",
|
|
1843
|
-
|
|
1844
|
-
"model-value": o(
|
|
1845
|
-
items: o(
|
|
1843
|
+
a("div", ir, [
|
|
1844
|
+
a("span", cr, r(o(t)("connect.loyalty.dashboard.review.sort")), 1),
|
|
1845
|
+
f(ye, {
|
|
1846
|
+
"model-value": o(h),
|
|
1847
|
+
items: o(ze),
|
|
1846
1848
|
searchable: !1,
|
|
1847
|
-
"onUpdate:modelValue":
|
|
1849
|
+
"onUpdate:modelValue": C[3] || (C[3] = (_) => h.value = _)
|
|
1848
1850
|
}, null, 8, ["model-value", "items"]),
|
|
1849
|
-
|
|
1851
|
+
f(ye, {
|
|
1850
1852
|
"model-value": o(R),
|
|
1851
|
-
items:
|
|
1853
|
+
items: ie,
|
|
1852
1854
|
searchable: !1,
|
|
1853
|
-
"onUpdate:modelValue":
|
|
1855
|
+
"onUpdate:modelValue": tt
|
|
1854
1856
|
}, null, 8, ["model-value"])
|
|
1855
1857
|
])
|
|
1856
1858
|
]),
|
|
1857
|
-
o(X) ? (c(), d("div",
|
|
1858
|
-
|
|
1859
|
-
])) : o(
|
|
1860
|
-
|
|
1859
|
+
o(X) ? (c(), d("div", dr, [
|
|
1860
|
+
f(P, { size: "lg" })
|
|
1861
|
+
])) : o(ke) ? (c(), d("div", mr, [
|
|
1862
|
+
f(me, {
|
|
1861
1863
|
name: "error_outline",
|
|
1862
1864
|
outline: "",
|
|
1863
1865
|
size: "lg",
|
|
1864
1866
|
class: "text-fm-color-typo-error"
|
|
1865
1867
|
}),
|
|
1866
|
-
a("div",
|
|
1867
|
-
a("div",
|
|
1868
|
-
|
|
1868
|
+
a("div", ur, r(o(t)("connect.loyalty.dashboard.review.findingsUnavailable")), 1),
|
|
1869
|
+
a("div", yr, r(o(t)("connect.loyalty.dashboard.review.findingsUnavailableDescription")), 1),
|
|
1870
|
+
f(J, {
|
|
1869
1871
|
label: o(t)("connect.loyalty.dashboard.review.retry"),
|
|
1870
1872
|
icon: "refresh",
|
|
1871
1873
|
variant: "tertiary",
|
|
1872
|
-
onClick:
|
|
1874
|
+
onClick: C[4] || (C[4] = (_) => de(!0))
|
|
1873
1875
|
}, null, 8, ["label"])
|
|
1874
|
-
])) : o(
|
|
1875
|
-
(c(!0), d(
|
|
1876
|
-
key:
|
|
1876
|
+
])) : o(V).length ? (c(), d("div", hr, [
|
|
1877
|
+
(c(!0), d(k, null, W(o(V), (_) => (c(), d("div", {
|
|
1878
|
+
key: ue(_),
|
|
1877
1879
|
class: "border border-fm-color-neutral-gray-100 rounded-sm overflow-hidden"
|
|
1878
1880
|
}, [
|
|
1879
|
-
a("div",
|
|
1881
|
+
a("div", vr, [
|
|
1880
1882
|
a("button", {
|
|
1881
1883
|
type: "button",
|
|
1882
1884
|
class: "flex items-center gap-12 flex-1 min-w-0 text-left",
|
|
1883
|
-
"aria-expanded": o(
|
|
1884
|
-
onClick: (
|
|
1885
|
+
"aria-expanded": o(A)[ue(_)] === !0,
|
|
1886
|
+
onClick: (D) => $e(_),
|
|
1885
1887
|
onKeydown: [
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
+
Ge(Je((D) => $e(_), ["prevent"]), ["enter"]),
|
|
1889
|
+
Ge(Je((D) => $e(_), ["prevent"]), ["space"])
|
|
1888
1890
|
]
|
|
1889
1891
|
}, [
|
|
1890
|
-
|
|
1891
|
-
name: o(
|
|
1892
|
+
f(me, {
|
|
1893
|
+
name: o(A)[ue(_)] ? "expand_less" : "expand_more",
|
|
1892
1894
|
outline: "",
|
|
1893
1895
|
size: "md",
|
|
1894
1896
|
class: "text-fm-color-typo-tertiary"
|
|
1895
1897
|
}, null, 8, ["name"]),
|
|
1896
|
-
|
|
1897
|
-
name:
|
|
1898
|
+
f(Ke, {
|
|
1899
|
+
name: ve(_),
|
|
1898
1900
|
size: "md"
|
|
1899
1901
|
}, null, 8, ["name"]),
|
|
1900
|
-
a("div",
|
|
1901
|
-
a("div",
|
|
1902
|
-
a("div",
|
|
1902
|
+
a("div", _r, [
|
|
1903
|
+
a("div", xr, r(ve(_)), 1),
|
|
1904
|
+
a("div", wr, r(_.member.phoneNumber || _.member.cardNo || _.member.id || o(t)("connect.loyalty.dashboard.review.anonymousEvidence")), 1)
|
|
1903
1905
|
])
|
|
1904
|
-
], 40,
|
|
1905
|
-
a("div",
|
|
1906
|
-
a("div",
|
|
1907
|
-
a("div",
|
|
1906
|
+
], 40, gr),
|
|
1907
|
+
a("div", Rr, [
|
|
1908
|
+
a("div", Sr, r(o(t)("connect.loyalty.dashboard.review.latestFlagged")), 1),
|
|
1909
|
+
a("div", Mr, r(ce(_.latestOccurredOn)), 1)
|
|
1908
1910
|
]),
|
|
1909
|
-
a("div",
|
|
1910
|
-
(c(!0), d(
|
|
1911
|
-
key:
|
|
1911
|
+
a("div", $r, [
|
|
1912
|
+
(c(!0), d(k, null, W(_.signals, (D) => (c(), d("span", {
|
|
1913
|
+
key: D,
|
|
1912
1914
|
class: "fm-typo-en-body-sm-400 px-8 py-4 rounded-sm bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary"
|
|
1913
|
-
}, r(o(
|
|
1915
|
+
}, r(o(We)(D, i)), 1))), 128))
|
|
1914
1916
|
]),
|
|
1915
|
-
|
|
1917
|
+
f(J, {
|
|
1916
1918
|
label: o(t)("connect.loyalty.dashboard.review.viewMember"),
|
|
1917
1919
|
icon: "person",
|
|
1918
1920
|
variant: "tertiary",
|
|
1919
|
-
disabled: !
|
|
1920
|
-
onClick: (
|
|
1921
|
+
disabled: !_.member.id,
|
|
1922
|
+
onClick: (D) => at(_)
|
|
1921
1923
|
}, null, 8, ["label", "disabled", "onClick"])
|
|
1922
1924
|
]),
|
|
1923
|
-
o(
|
|
1924
|
-
a("div",
|
|
1925
|
+
o(A)[ue(_)] ? (c(), d("div", Cr, [
|
|
1926
|
+
a("div", Fr, [
|
|
1925
1927
|
a("div", null, [
|
|
1926
|
-
a("div",
|
|
1927
|
-
a("div",
|
|
1928
|
+
a("div", Dr, r(o(t)("connect.loyalty.dashboard.review.latestFlagged")), 1),
|
|
1929
|
+
a("div", Ar, r(ce(_.latestOccurredOn)), 1)
|
|
1928
1930
|
]),
|
|
1929
1931
|
a("div", null, [
|
|
1930
|
-
a("div",
|
|
1931
|
-
a("div",
|
|
1932
|
+
a("div", kr, r(o(t)("connect.loyalty.dashboard.review.locations")), 1),
|
|
1933
|
+
a("div", Ir, r(_.locationIds.length ? _.locationIds.map(Ze).join(", ") : "--"), 1)
|
|
1932
1934
|
])
|
|
1933
1935
|
]),
|
|
1934
|
-
a("div",
|
|
1935
|
-
(c(!0), d(
|
|
1936
|
-
key: `${
|
|
1936
|
+
a("div", Lr, [
|
|
1937
|
+
(c(!0), d(k, null, W(_.findings, (D) => (c(), d("div", {
|
|
1938
|
+
key: `${D.signal}-${D.occurredOn}-${D.billIds.join("-")}-${D.referenceIds.join(
|
|
1937
1939
|
"-"
|
|
1938
1940
|
)}`,
|
|
1939
1941
|
class: "border border-fm-color-neutral-gray-200 rounded-sm bg-fm-color-neutral-white p-12"
|
|
1940
1942
|
}, [
|
|
1941
|
-
a("div",
|
|
1942
|
-
a("div",
|
|
1943
|
-
a("div",
|
|
1943
|
+
a("div", Or, [
|
|
1944
|
+
a("div", Er, r(o(We)(D.signal, i)), 1),
|
|
1945
|
+
a("div", Pr, r(ce(D.occurredOn)), 1)
|
|
1944
1946
|
]),
|
|
1945
|
-
a("div",
|
|
1946
|
-
a("div",
|
|
1947
|
-
|
|
1948
|
-
a("span",
|
|
1947
|
+
a("div", Br, [
|
|
1948
|
+
a("div", Tr, [
|
|
1949
|
+
ge(r(o(t)("connect.loyalty.dashboard.review.observedValue")) + ": ", 1),
|
|
1950
|
+
a("span", Nr, r(D.observedValue.toLocaleString()), 1)
|
|
1949
1951
|
]),
|
|
1950
|
-
a("div",
|
|
1951
|
-
|
|
1952
|
-
a("span",
|
|
1952
|
+
a("div", Ur, [
|
|
1953
|
+
ge(r(o(t)("connect.loyalty.dashboard.review.threshold")) + ": ", 1),
|
|
1954
|
+
a("span", zr, r(D.thresholdValue === null ? "--" : D.thresholdValue.toLocaleString()), 1)
|
|
1953
1955
|
]),
|
|
1954
|
-
a("div",
|
|
1955
|
-
|
|
1956
|
-
a("span",
|
|
1957
|
-
|
|
1958
|
-
|
|
1956
|
+
a("div", Vr, [
|
|
1957
|
+
ge(r(o(t)("connect.loyalty.dashboard.review.rewardType")) + ": ", 1),
|
|
1958
|
+
a("span", jr, r(D.rewardType ? o(gt)(
|
|
1959
|
+
D.rewardType,
|
|
1960
|
+
i
|
|
1959
1961
|
) : "--"), 1)
|
|
1960
1962
|
]),
|
|
1961
|
-
a("div",
|
|
1963
|
+
a("div", Kr, [
|
|
1962
1964
|
a("div", null, r(o(t)("connect.loyalty.dashboard.review.billIds")) + ": ", 1),
|
|
1963
|
-
|
|
1964
|
-
(c(!0), d(
|
|
1965
|
-
key:
|
|
1965
|
+
D.billIds.length ? (c(), d("div", qr, [
|
|
1966
|
+
(c(!0), d(k, null, W(D.billIds, (B) => (c(), N(Ne, {
|
|
1967
|
+
key: B,
|
|
1966
1968
|
content: o(t)("connect.loyalty.dashboard.review.copyBillId"),
|
|
1967
1969
|
placement: "top"
|
|
1968
1970
|
}, {
|
|
1969
1971
|
default: U(() => [
|
|
1970
|
-
|
|
1971
|
-
label:
|
|
1972
|
+
f(ot, {
|
|
1973
|
+
label: B,
|
|
1972
1974
|
"aria-label": o(t)(
|
|
1973
1975
|
"connect.loyalty.dashboard.review.copyBillIdAria",
|
|
1974
1976
|
{
|
|
1975
|
-
id:
|
|
1977
|
+
id: B
|
|
1976
1978
|
}
|
|
1977
1979
|
),
|
|
1978
1980
|
"right-icon": "content_copy",
|
|
1979
1981
|
variant: "plain",
|
|
1980
1982
|
compact: "",
|
|
1981
1983
|
class: "max-w-full cursor-pointer",
|
|
1982
|
-
onClick: (
|
|
1984
|
+
onClick: (ae) => he(B)
|
|
1983
1985
|
}, null, 8, ["label", "aria-label", "onClick"])
|
|
1984
1986
|
]),
|
|
1985
1987
|
_: 2
|
|
1986
1988
|
}, 1032, ["content"]))), 128))
|
|
1987
|
-
])) : (c(), d("span",
|
|
1989
|
+
])) : (c(), d("span", Yr, " -- "))
|
|
1988
1990
|
]),
|
|
1989
|
-
a("div",
|
|
1990
|
-
|
|
1991
|
-
a("span",
|
|
1991
|
+
a("div", Hr, [
|
|
1992
|
+
ge(r(o(t)("connect.loyalty.dashboard.review.referenceIds")) + ": ", 1),
|
|
1993
|
+
a("span", Wr, r(fe(D.referenceIds)), 1)
|
|
1992
1994
|
])
|
|
1993
1995
|
])
|
|
1994
1996
|
]))), 128))
|
|
1995
1997
|
])
|
|
1996
|
-
])) :
|
|
1998
|
+
])) : z("", !0)
|
|
1997
1999
|
]))), 128))
|
|
1998
|
-
])) : (c(), d("div",
|
|
1999
|
-
|
|
2000
|
+
])) : (c(), d("div", pr, [
|
|
2001
|
+
f(me, {
|
|
2000
2002
|
name: "fact_check",
|
|
2001
2003
|
outline: "",
|
|
2002
2004
|
size: "lg",
|
|
2003
2005
|
class: "text-fm-color-typo-tertiary"
|
|
2004
2006
|
}),
|
|
2005
|
-
a("div",
|
|
2006
|
-
a("div",
|
|
2007
|
+
a("div", br, r(o(t)("connect.loyalty.dashboard.review.noFindings")), 1),
|
|
2008
|
+
a("div", fr, r(o(t)("connect.loyalty.dashboard.review.noFindingsDescription")), 1)
|
|
2007
2009
|
])),
|
|
2008
|
-
o(
|
|
2009
|
-
a("div",
|
|
2010
|
-
current: o(
|
|
2011
|
-
total: o(
|
|
2010
|
+
o(re) > 1 ? (c(), d("div", Gr, [
|
|
2011
|
+
a("div", Jr, r(o(t)("connect.loyalty.dashboard.review.page", {
|
|
2012
|
+
current: o(Ie),
|
|
2013
|
+
total: o(re)
|
|
2012
2014
|
})), 1),
|
|
2013
|
-
a("div",
|
|
2014
|
-
|
|
2015
|
+
a("div", Zr, [
|
|
2016
|
+
f(Ne, {
|
|
2015
2017
|
content: o(t)("connect.loyalty.dashboard.accessibility.previousPage")
|
|
2016
2018
|
}, {
|
|
2017
2019
|
default: U(() => [
|
|
2018
|
-
|
|
2020
|
+
f(J, {
|
|
2019
2021
|
icon: "chevron_left",
|
|
2020
2022
|
variant: "tertiary",
|
|
2021
|
-
disabled: o(
|
|
2022
|
-
onClick:
|
|
2023
|
+
disabled: o(g) === 0 || o(X),
|
|
2024
|
+
onClick: et
|
|
2023
2025
|
}, null, 8, ["disabled"])
|
|
2024
2026
|
]),
|
|
2025
2027
|
_: 1
|
|
2026
2028
|
}, 8, ["content"]),
|
|
2027
|
-
|
|
2029
|
+
f(Ne, {
|
|
2028
2030
|
content: o(t)("connect.loyalty.dashboard.accessibility.nextPage")
|
|
2029
2031
|
}, {
|
|
2030
2032
|
default: U(() => [
|
|
2031
|
-
|
|
2033
|
+
f(J, {
|
|
2032
2034
|
icon: "chevron_right",
|
|
2033
2035
|
variant: "tertiary",
|
|
2034
|
-
disabled: o(
|
|
2035
|
-
onClick:
|
|
2036
|
+
disabled: o(g) >= o(re) - 1 || o(X),
|
|
2037
|
+
onClick: je
|
|
2036
2038
|
}, null, 8, ["disabled"])
|
|
2037
2039
|
]),
|
|
2038
2040
|
_: 1
|
|
2039
2041
|
}, 8, ["content"])
|
|
2040
2042
|
])
|
|
2041
|
-
])) :
|
|
2043
|
+
])) : z("", !0)
|
|
2042
2044
|
]),
|
|
2043
|
-
o(
|
|
2045
|
+
o(ee) ? (c(), N(Wt, {
|
|
2044
2046
|
key: 0,
|
|
2045
2047
|
ref_key: "detailSheetRef",
|
|
2046
|
-
ref:
|
|
2047
|
-
member: o(
|
|
2048
|
-
}, null, 8, ["member"])) :
|
|
2048
|
+
ref: le,
|
|
2049
|
+
member: o(ee)
|
|
2050
|
+
}, null, 8, ["member"])) : z("", !0)
|
|
2049
2051
|
]),
|
|
2050
2052
|
_: 1
|
|
2051
2053
|
}, 8, ["modelValue", "header"]);
|
|
2052
2054
|
};
|
|
2053
2055
|
}
|
|
2054
|
-
}),
|
|
2056
|
+
}), Xr = { class: "flex items-start gap-12" }, en = { class: "flex-1 min-w-0" }, tn = { class: "flex items-center gap-8" }, an = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, on = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4" }, sn = ["aria-label"], rn = {
|
|
2055
2057
|
key: 1,
|
|
2056
2058
|
class: "flex min-h-[220px] items-center justify-center text-center fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
2057
|
-
},
|
|
2059
|
+
}, nn = {
|
|
2058
2060
|
key: 2,
|
|
2059
2061
|
class: "mt-24"
|
|
2060
|
-
},
|
|
2062
|
+
}, ln = { class: "grid grid-cols-2 gap-16" }, cn = { class: "border border-fm-color-neutral-gray-100 rounded-sm p-16" }, dn = { class: "fm-typo-en-title-lg-800 text-fm-color-typo-primary" }, mn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mt-4" }, un = { class: "border border-fm-color-neutral-gray-100 rounded-sm p-16" }, yn = { class: "fm-typo-en-title-lg-800 text-fm-color-typo-primary" }, pn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mt-4" }, bn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-16" }, fn = /* @__PURE__ */ Z({
|
|
2061
2063
|
__name: "RewardAbuseMaximizers",
|
|
2062
2064
|
props: {
|
|
2063
2065
|
metric: {},
|
|
@@ -2065,27 +2067,27 @@ const xs = { class: "flex flex-col gap-16 min-h-full" }, ws = { class: "flex fle
|
|
|
2065
2067
|
error: { type: Boolean }
|
|
2066
2068
|
},
|
|
2067
2069
|
setup(e) {
|
|
2068
|
-
const s = e, { t } = Q(), n =
|
|
2070
|
+
const s = e, { t } = Q(), n = $(() => s.loading ? "loading" : s.error || !s.metric ? "unavailable" : s.metric.status === "insufficient-baseline" ? "insufficientBaseline" : s.metric.maximizerMembers === 0 ? "noMembers" : "available"), i = $(
|
|
2069
2071
|
() => t(`connect.loyalty.dashboard.maximizers.status.${n.value}`)
|
|
2070
|
-
), y =
|
|
2072
|
+
), y = $(() => n.value === "unavailable" ? t("connect.loyalty.dashboard.maximizers.error") : n.value === "insufficientBaseline" ? t(
|
|
2071
2073
|
"connect.loyalty.dashboard.maximizers.insufficientBaselineMessage"
|
|
2072
|
-
) : n.value === "noMembers" ? t("connect.loyalty.dashboard.maximizers.noMembersMessage") : t("connect.loyalty.dashboard.maximizers.availableMessage")), p =
|
|
2074
|
+
) : n.value === "noMembers" ? t("connect.loyalty.dashboard.maximizers.noMembersMessage") : t("connect.loyalty.dashboard.maximizers.availableMessage")), p = $(() => n.value === "available" || n.value === "noMembers" ? "text-fm-color-typo-success bg-fm-color-system-success-100" : n.value === "insufficientBaseline" ? "text-fm-color-typo-warning bg-fm-color-system-warning-100" : "text-fm-color-typo-error bg-fm-color-system-error-100"), u = $(() => s.metric ? s.metric.maximizerMembers.toLocaleString() : ""), x = $(() => !s.metric || s.metric.thresholdPct === null ? t("connect.loyalty.dashboard.states.unavailable") : `${s.metric.thresholdPct}%`);
|
|
2073
2075
|
return (w, R) => {
|
|
2074
|
-
const
|
|
2075
|
-
return c(),
|
|
2076
|
+
const g = M("FmIcon"), h = M("FmTooltip"), V = M("FmCircularProgress"), oe = M("FmCard");
|
|
2077
|
+
return c(), N(oe, {
|
|
2076
2078
|
variant: "outlined",
|
|
2077
2079
|
class: "p-24 h-full"
|
|
2078
2080
|
}, {
|
|
2079
2081
|
default: U(() => [
|
|
2080
|
-
a("div",
|
|
2081
|
-
a("div",
|
|
2082
|
-
a("div",
|
|
2083
|
-
a("div",
|
|
2084
|
-
h
|
|
2082
|
+
a("div", Xr, [
|
|
2083
|
+
a("div", en, [
|
|
2084
|
+
a("div", tn, [
|
|
2085
|
+
a("div", an, r(o(t)("connect.loyalty.dashboard.maximizers.title")), 1),
|
|
2086
|
+
f(h, {
|
|
2085
2087
|
content: o(t)("connect.loyalty.dashboard.maximizers.tooltip")
|
|
2086
2088
|
}, {
|
|
2087
2089
|
default: U(() => [
|
|
2088
|
-
|
|
2090
|
+
f(g, {
|
|
2089
2091
|
name: "info",
|
|
2090
2092
|
outline: "",
|
|
2091
2093
|
size: "sm",
|
|
@@ -2095,11 +2097,11 @@ const xs = { class: "flex flex-col gap-16 min-h-full" }, ws = { class: "flex fle
|
|
|
2095
2097
|
_: 1
|
|
2096
2098
|
}, 8, ["content"])
|
|
2097
2099
|
]),
|
|
2098
|
-
a("div",
|
|
2100
|
+
a("div", on, r(o(t)("connect.loyalty.dashboard.maximizers.subtitle")), 1)
|
|
2099
2101
|
]),
|
|
2100
2102
|
a("span", {
|
|
2101
2103
|
class: T(["fm-typo-en-body-sm-600 px-8 py-4 rounded-sm whitespace-nowrap", o(p)])
|
|
2102
|
-
}, r(o(
|
|
2104
|
+
}, r(o(i)), 3)
|
|
2103
2105
|
]),
|
|
2104
2106
|
e.loading ? (c(), d("div", {
|
|
2105
2107
|
key: 0,
|
|
@@ -2107,16 +2109,16 @@ const xs = { class: "flex flex-col gap-16 min-h-full" }, ws = { class: "flex fle
|
|
|
2107
2109
|
role: "status",
|
|
2108
2110
|
"aria-label": o(t)("connect.loyalty.dashboard.accessibility.loading")
|
|
2109
2111
|
}, [
|
|
2110
|
-
|
|
2111
|
-
], 8,
|
|
2112
|
-
a("div",
|
|
2113
|
-
a("div",
|
|
2114
|
-
a("div",
|
|
2115
|
-
a("div",
|
|
2112
|
+
f(V, { size: "lg" })
|
|
2113
|
+
], 8, sn)) : o(n) === "unavailable" ? (c(), d("div", rn, r(o(y)), 1)) : (c(), d("div", nn, [
|
|
2114
|
+
a("div", ln, [
|
|
2115
|
+
a("div", cn, [
|
|
2116
|
+
a("div", dn, r(o(u)), 1),
|
|
2117
|
+
a("div", mn, r(o(t)("connect.loyalty.dashboard.maximizers.membersInCohort")), 1)
|
|
2116
2118
|
]),
|
|
2117
|
-
a("div",
|
|
2118
|
-
a("div",
|
|
2119
|
-
a("div",
|
|
2119
|
+
a("div", un, [
|
|
2120
|
+
a("div", yn, r(o(x)), 1),
|
|
2121
|
+
a("div", pn, r(o(t)("connect.loyalty.dashboard.maximizers.baselineRatio")), 1)
|
|
2120
2122
|
])
|
|
2121
2123
|
]),
|
|
2122
2124
|
a("div", {
|
|
@@ -2125,17 +2127,17 @@ const xs = { class: "flex flex-col gap-16 min-h-full" }, ws = { class: "flex fle
|
|
|
2125
2127
|
o(n) === "available" || o(n) === "noMembers" ? "text-fm-color-typo-secondary border-fm-color-neutral-gray-100 bg-fm-color-neutral-gray-100" : o(n) === "insufficientBaseline" ? "text-fm-color-typo-warning border-fm-color-system-warning-200 bg-fm-color-system-warning-100" : "text-fm-color-typo-error border-fm-color-system-error-200 bg-fm-color-system-error-100"
|
|
2126
2128
|
])
|
|
2127
2129
|
}, r(o(y)), 3),
|
|
2128
|
-
a("div",
|
|
2130
|
+
a("div", bn, r(o(t)("connect.loyalty.dashboard.maximizers.experienceNote")), 1)
|
|
2129
2131
|
]))
|
|
2130
2132
|
]),
|
|
2131
2133
|
_: 1
|
|
2132
2134
|
});
|
|
2133
2135
|
};
|
|
2134
2136
|
}
|
|
2135
|
-
}),
|
|
2137
|
+
}), hn = { class: "mb-6 flex items-center gap-3 fm-typo-en-body-md-600" }, vn = ["aria-label"], gn = {
|
|
2136
2138
|
key: 1,
|
|
2137
2139
|
class: "flex min-h-[180px] items-center justify-center text-center fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
2138
|
-
},
|
|
2140
|
+
}, _n = { class: "flex items-baseline gap-10 mb-14 flex-wrap" }, xn = { class: "fm-typo-en-title-lg-800" }, wn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, Rn = { class: "flex items-center gap-14 mt-10" }, Sn = { class: "flex items-center gap-5" }, Mn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, $n = { class: "flex items-center gap-5" }, Cn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Fn = /* @__PURE__ */ Z({
|
|
2139
2141
|
__name: "SalesTrendChart",
|
|
2140
2142
|
props: {
|
|
2141
2143
|
sales: {},
|
|
@@ -2143,7 +2145,7 @@ const xs = { class: "flex flex-col gap-16 min-h-full" }, ws = { class: "flex fle
|
|
|
2143
2145
|
error: { type: Boolean }
|
|
2144
2146
|
},
|
|
2145
2147
|
setup(e) {
|
|
2146
|
-
const s = e, { t } = Q(), n =
|
|
2148
|
+
const s = e, { t } = Q(), n = $(() => [
|
|
2147
2149
|
{
|
|
2148
2150
|
label: t("connect.loyalty.dashboard.salesTrend.thisPeriod"),
|
|
2149
2151
|
data: s.sales.series,
|
|
@@ -2156,17 +2158,17 @@ const xs = { class: "flex flex-col gap-16 min-h-full" }, ws = { class: "flex fle
|
|
|
2156
2158
|
color: "#B2B3B6",
|
|
2157
2159
|
dash: !0
|
|
2158
2160
|
}
|
|
2159
|
-
]),
|
|
2161
|
+
]), i = { display: !1 };
|
|
2160
2162
|
return (y, p) => {
|
|
2161
|
-
const
|
|
2162
|
-
return c(),
|
|
2163
|
+
const u = M("FmCircularProgress"), x = M("FmLineChart"), w = M("FmCard");
|
|
2164
|
+
return c(), N(w, {
|
|
2163
2165
|
variant: "outlined",
|
|
2164
2166
|
class: "p-24"
|
|
2165
2167
|
}, {
|
|
2166
2168
|
default: U(() => [
|
|
2167
|
-
a("div",
|
|
2169
|
+
a("div", hn, [
|
|
2168
2170
|
a("span", null, r(o(t)("connect.loyalty.dashboard.salesTrend.title")), 1),
|
|
2169
|
-
|
|
2171
|
+
f(xe, {
|
|
2170
2172
|
description: s.sales.description
|
|
2171
2173
|
}, null, 8, ["description"])
|
|
2172
2174
|
]),
|
|
@@ -2176,31 +2178,31 @@ const xs = { class: "flex flex-col gap-16 min-h-full" }, ws = { class: "flex fle
|
|
|
2176
2178
|
role: "status",
|
|
2177
2179
|
"aria-label": o(t)("connect.loyalty.dashboard.accessibility.loading")
|
|
2178
2180
|
}, [
|
|
2179
|
-
|
|
2180
|
-
], 8,
|
|
2181
|
-
a("div",
|
|
2182
|
-
a("span",
|
|
2181
|
+
f(u, { size: "lg" })
|
|
2182
|
+
], 8, vn)) : s.error ? (c(), d("div", gn, r(o(t)("connect.loyalty.dashboard.states.salesTrendUnavailable")), 1)) : (c(), d(k, { key: 2 }, [
|
|
2183
|
+
a("div", _n, [
|
|
2184
|
+
a("span", xn, r(s.sales.totalFmt), 1),
|
|
2183
2185
|
a("span", {
|
|
2184
2186
|
class: T(["fm-typo-en-body-sm-600 px-9 py-3 rounded-full whitespace-nowrap", s.sales.deltaClass])
|
|
2185
2187
|
}, r(s.sales.deltaStr), 3),
|
|
2186
|
-
a("span",
|
|
2188
|
+
a("span", wn, r(o(t)("connect.loyalty.dashboard.salesTrend.vsPreviousPeriod")), 1)
|
|
2187
2189
|
]),
|
|
2188
|
-
|
|
2190
|
+
f(x, {
|
|
2189
2191
|
datasets: o(n),
|
|
2190
2192
|
"x-axis": { categories: s.sales.comparisonCategories },
|
|
2191
|
-
"x-cfg":
|
|
2192
|
-
"y-cfg":
|
|
2193
|
+
"x-cfg": i,
|
|
2194
|
+
"y-cfg": i,
|
|
2193
2195
|
legend: { display: !1 },
|
|
2194
2196
|
height: "80px"
|
|
2195
2197
|
}, null, 8, ["datasets", "x-axis"]),
|
|
2196
|
-
a("div",
|
|
2197
|
-
a("div",
|
|
2198
|
+
a("div", Rn, [
|
|
2199
|
+
a("div", Sn, [
|
|
2198
2200
|
p[0] || (p[0] = a("div", { class: "w-14 h-2 bg-fm-color-primary rounded-1" }, null, -1)),
|
|
2199
|
-
a("span",
|
|
2201
|
+
a("span", Mn, r(o(t)("connect.loyalty.dashboard.salesTrend.thisPeriod")), 1)
|
|
2200
2202
|
]),
|
|
2201
|
-
a("div",
|
|
2203
|
+
a("div", $n, [
|
|
2202
2204
|
p[1] || (p[1] = a("div", { class: "w-14 border-t-[1.5px] border-dashed border-fm-color-neutral-gray-200" }, null, -1)),
|
|
2203
|
-
a("span",
|
|
2205
|
+
a("span", Cn, r(o(t)("connect.loyalty.dashboard.salesTrend.previousPeriod")), 1)
|
|
2204
2206
|
])
|
|
2205
2207
|
])
|
|
2206
2208
|
], 64))
|
|
@@ -2209,109 +2211,131 @@ const xs = { class: "flex flex-col gap-16 min-h-full" }, ws = { class: "flex fle
|
|
|
2209
2211
|
});
|
|
2210
2212
|
};
|
|
2211
2213
|
}
|
|
2212
|
-
}),
|
|
2214
|
+
}), Dn = /* @__PURE__ */ Z({
|
|
2213
2215
|
__name: "ComparisonMethodChip",
|
|
2214
2216
|
props: {
|
|
2215
2217
|
modelValue: {}
|
|
2216
2218
|
},
|
|
2217
2219
|
emits: ["update:model-value"],
|
|
2218
2220
|
setup(e, { emit: s }) {
|
|
2219
|
-
const t = e, n = s, { t:
|
|
2221
|
+
const t = e, n = s, { t: i } = Q(), y = S(!1), p = {
|
|
2220
2222
|
"same-period-last-week": "samePeriodLastWeek",
|
|
2221
2223
|
"same-period-last-month": "samePeriodLastMonth",
|
|
2222
2224
|
"preceding-period": "precedingPeriod",
|
|
2223
2225
|
"same-period-last-year": "samePeriodLastYear",
|
|
2224
2226
|
custom: "custom"
|
|
2225
|
-
},
|
|
2226
|
-
() =>
|
|
2227
|
+
}, u = $(
|
|
2228
|
+
() => ms.map((R) => ({
|
|
2227
2229
|
value: R,
|
|
2228
|
-
label:
|
|
2230
|
+
label: i(
|
|
2229
2231
|
`connect.loyalty.dashboard.filters.comparisonModes.${p[R]}`
|
|
2230
2232
|
),
|
|
2231
|
-
sublabel: R === "same-period-last-week" || R === "same-period-last-month" ?
|
|
2233
|
+
sublabel: R === "same-period-last-week" || R === "same-period-last-month" ? i(
|
|
2232
2234
|
`connect.loyalty.dashboard.filters.comparisonModeDescriptions.${p[R]}`
|
|
2233
2235
|
) : void 0
|
|
2234
2236
|
}))
|
|
2235
|
-
),
|
|
2237
|
+
), x = $(
|
|
2236
2238
|
() => {
|
|
2237
2239
|
var R;
|
|
2238
|
-
return (R =
|
|
2240
|
+
return (R = u.value.find((g) => g.value === t.modelValue)) == null ? void 0 : R.label;
|
|
2239
2241
|
}
|
|
2240
2242
|
);
|
|
2241
2243
|
function w(R) {
|
|
2242
2244
|
n("update:model-value", R), y.value = !1;
|
|
2243
2245
|
}
|
|
2244
|
-
return (R,
|
|
2245
|
-
const
|
|
2246
|
-
return c(),
|
|
2246
|
+
return (R, g) => {
|
|
2247
|
+
const h = M("FmChip"), V = M("FmMenuItem"), oe = M("FmMenu");
|
|
2248
|
+
return c(), N(oe, {
|
|
2247
2249
|
placement: "bottom-end",
|
|
2248
2250
|
"model-value": y.value,
|
|
2249
|
-
onMenuChanged:
|
|
2251
|
+
onMenuChanged: g[0] || (g[0] = (I) => y.value = I)
|
|
2250
2252
|
}, {
|
|
2251
2253
|
"menu-button": U(() => [
|
|
2252
|
-
h
|
|
2253
|
-
label: `${o(
|
|
2254
|
+
f(h, {
|
|
2255
|
+
label: `${o(i)(
|
|
2254
2256
|
"connect.loyalty.dashboard.filters.comparisonMethod"
|
|
2255
|
-
)}: ${
|
|
2257
|
+
)}: ${x.value}`,
|
|
2256
2258
|
icon: "compare_arrows",
|
|
2257
2259
|
"right-icon": y.value ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
2258
2260
|
class: "text-fm-color-neutral-gray-400 cursor-pointer"
|
|
2259
2261
|
}, null, 8, ["label", "right-icon"])
|
|
2260
2262
|
]),
|
|
2261
2263
|
default: U(() => [
|
|
2262
|
-
(c(!0), d(
|
|
2263
|
-
key:
|
|
2264
|
-
label:
|
|
2265
|
-
sublabel:
|
|
2266
|
-
"model-value":
|
|
2267
|
-
onClick: (X) => w(
|
|
2264
|
+
(c(!0), d(k, null, W(u.value, (I) => (c(), N(V, {
|
|
2265
|
+
key: I.value,
|
|
2266
|
+
label: I.label,
|
|
2267
|
+
sublabel: I.sublabel,
|
|
2268
|
+
"model-value": I.value === t.modelValue,
|
|
2269
|
+
onClick: (X) => w(I.value)
|
|
2268
2270
|
}, null, 8, ["label", "sublabel", "model-value", "onClick"]))), 128))
|
|
2269
2271
|
]),
|
|
2270
2272
|
_: 1
|
|
2271
2273
|
}, 8, ["model-value"]);
|
|
2272
2274
|
};
|
|
2273
2275
|
}
|
|
2274
|
-
}),
|
|
2276
|
+
}), An = { class: "flex items-center gap-8" }, kn = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2" }, In = { class: "px-24 flex flex-col gap-16 pb-24" }, Ln = { key: 1 }, On = { class: "flex items-center justify-between gap-8 flex-wrap" }, En = { class: "flex items-center gap-8 flex-wrap" }, Pn = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-tertiary" }, Bn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary -mt-8 text-right" }, Tn = { class: "grid grid-cols-[3fr_2fr] xs:grid-cols-1 gap-16 items-start" }, Nn = { class: "grid grid-cols-2 xs:grid-cols-1 gap-16 items-start" }, Un = { class: "flex flex-col gap-16" }, zn = { class: "flex flex-col gap-16" }, ll = /* @__PURE__ */ Z({
|
|
2275
2277
|
__name: "LoyaltyDashboard",
|
|
2276
2278
|
setup(e) {
|
|
2277
|
-
const { t: s, locale: t } = Q(), n = (
|
|
2278
|
-
() =>
|
|
2279
|
-
),
|
|
2280
|
-
() =>
|
|
2281
|
-
),
|
|
2279
|
+
const { t: s, locale: t } = Q(), n = aa(), i = $(
|
|
2280
|
+
() => n.catalog && n.state ? oa(n.catalog, n.state) : null
|
|
2281
|
+
), y = $(() => i.value === "goals" ? "goals" : "generic"), p = $(
|
|
2282
|
+
() => i.value === "picker" || !!i.value && n.doneCount(y.value) < n.ids(y.value).length
|
|
2283
|
+
), u = $(() => {
|
|
2284
|
+
var l;
|
|
2285
|
+
return !!((l = n.state) != null && l.analyticDismissed);
|
|
2286
|
+
}), x = $(() => p.value && u.value);
|
|
2287
|
+
async function w() {
|
|
2288
|
+
try {
|
|
2289
|
+
await n.patch({ analyticDismissed: !0 });
|
|
2290
|
+
} catch {
|
|
2291
|
+
ht.error(s("connect.onboarding.save_error"), 3e3);
|
|
2292
|
+
}
|
|
2293
|
+
}
|
|
2294
|
+
async function R() {
|
|
2295
|
+
try {
|
|
2296
|
+
await n.patch({ analyticDismissed: !1 });
|
|
2297
|
+
} catch {
|
|
2298
|
+
ht.error(s("connect.onboarding.save_error"), 3e3);
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2301
|
+
const g = (l, b) => typeof b == "number" ? s(l, b) : b === void 0 ? s(l) : s(l, b), h = Qt(), V = Xt(), { global: oe } = Zt, I = $(
|
|
2302
|
+
() => vt[V.currentCountry.value || "MY"] ?? vt.MY
|
|
2303
|
+
), X = $(
|
|
2304
|
+
() => Kt.Country.getCountry(V.currentCountry.value || "MY").currency.code
|
|
2305
|
+
), [ke, be] = is(
|
|
2282
2306
|
"this-month",
|
|
2283
|
-
|
|
2284
|
-
),
|
|
2285
|
-
startDate:
|
|
2286
|
-
endDate:
|
|
2287
|
-
}),
|
|
2288
|
-
|
|
2289
|
-
),
|
|
2307
|
+
I.value
|
|
2308
|
+
), A = S({
|
|
2309
|
+
startDate: ke,
|
|
2310
|
+
endDate: be
|
|
2311
|
+
}), ee = S(
|
|
2312
|
+
us
|
|
2313
|
+
), le = S({
|
|
2290
2314
|
startDate: void 0,
|
|
2291
2315
|
endDate: void 0
|
|
2292
|
-
}),
|
|
2316
|
+
}), G = $({
|
|
2293
2317
|
get: () => {
|
|
2294
|
-
if (!
|
|
2295
|
-
return { ...
|
|
2296
|
-
const
|
|
2297
|
-
|
|
2298
|
-
|
|
2318
|
+
if (!A.value.startDate || !A.value.endDate)
|
|
2319
|
+
return { ...le.value };
|
|
2320
|
+
const l = le.value.startDate && le.value.endDate ? [
|
|
2321
|
+
le.value.startDate,
|
|
2322
|
+
le.value.endDate
|
|
2299
2323
|
] : void 0;
|
|
2300
|
-
return
|
|
2301
|
-
|
|
2302
|
-
[
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2324
|
+
return Ze(
|
|
2325
|
+
ys(
|
|
2326
|
+
[A.value.startDate, A.value.endDate],
|
|
2327
|
+
ee.value,
|
|
2328
|
+
I.value,
|
|
2329
|
+
l
|
|
2306
2330
|
)
|
|
2307
2331
|
);
|
|
2308
2332
|
},
|
|
2309
|
-
set: (
|
|
2310
|
-
|
|
2333
|
+
set: (l) => {
|
|
2334
|
+
ee.value === "custom" && (le.value = { ...l });
|
|
2311
2335
|
}
|
|
2312
|
-
}),
|
|
2336
|
+
}), te = S({ location: [] }), se = S(h.locations.length > 0), Ue = S(!1), ze = S(0), ie = S({}), re = S(null), Ie = S(null), Le = S(null), Oe = S(
|
|
2313
2337
|
null
|
|
2314
|
-
),
|
|
2338
|
+
), we = S(null), Ee = S([]), Pe = S(!1), Be = S(!1), L = Ut({
|
|
2315
2339
|
totalMembers: { loading: !1, error: !1 },
|
|
2316
2340
|
activeMembers: { loading: !1, error: !1 },
|
|
2317
2341
|
memberSales: { loading: !1, error: !1 },
|
|
@@ -2322,27 +2346,27 @@ const xs = { class: "flex flex-col gap-16 min-h-full" }, ws = { class: "flex fle
|
|
|
2322
2346
|
memberSalesTrend: { loading: !1, error: !1 },
|
|
2323
2347
|
memberSpendComparison: { loading: !1, error: !1 },
|
|
2324
2348
|
rewardUsageHealth: { loading: !1, error: !1 }
|
|
2325
|
-
}),
|
|
2349
|
+
}), Re = S({
|
|
2326
2350
|
outlier: { loading: !1, error: !1 },
|
|
2327
2351
|
maximizers: { loading: !1, error: !1 }
|
|
2328
|
-
}),
|
|
2329
|
-
function
|
|
2330
|
-
return { startDate:
|
|
2352
|
+
}), ce = S(null), fe = S(!1), he = S(!1), ve = S(null), Se = S(null), Me = S(!1);
|
|
2353
|
+
function Ze([l, b]) {
|
|
2354
|
+
return { startDate: l, endDate: b };
|
|
2331
2355
|
}
|
|
2332
|
-
const
|
|
2333
|
-
() =>
|
|
2334
|
-
|
|
2356
|
+
const ue = $(
|
|
2357
|
+
() => vs(
|
|
2358
|
+
re.value ?? {
|
|
2335
2359
|
totalMembers: 0,
|
|
2336
2360
|
activeMembers: 0,
|
|
2337
2361
|
purchasingMembers: 0,
|
|
2338
2362
|
repeatMembers: 0,
|
|
2339
2363
|
rewardRedeemers: 0
|
|
2340
2364
|
},
|
|
2341
|
-
|
|
2365
|
+
g
|
|
2342
2366
|
)
|
|
2343
|
-
),
|
|
2344
|
-
() =>
|
|
2345
|
-
|
|
2367
|
+
), $e = $(
|
|
2368
|
+
() => As(
|
|
2369
|
+
Ie.value ?? {
|
|
2346
2370
|
totalMembers: 0,
|
|
2347
2371
|
newlyJoined: 0,
|
|
2348
2372
|
frequent: 0,
|
|
@@ -2350,11 +2374,11 @@ const xs = { class: "flex flex-col gap-16 min-h-full" }, ws = { class: "flex fle
|
|
|
2350
2374
|
atRisk: 0,
|
|
2351
2375
|
dormant: 0
|
|
2352
2376
|
},
|
|
2353
|
-
|
|
2377
|
+
g
|
|
2354
2378
|
)
|
|
2355
|
-
),
|
|
2356
|
-
() =>
|
|
2357
|
-
|
|
2379
|
+
), Qe = $(
|
|
2380
|
+
() => $s(
|
|
2381
|
+
Le.value ?? {
|
|
2358
2382
|
categories: [""],
|
|
2359
2383
|
prevCategories: [""],
|
|
2360
2384
|
series: [0],
|
|
@@ -2362,498 +2386,517 @@ const xs = { class: "flex flex-col gap-16 min-h-full" }, ws = { class: "flex fle
|
|
|
2362
2386
|
memberSales: 0,
|
|
2363
2387
|
deltaPct: 0
|
|
2364
2388
|
},
|
|
2365
|
-
|
|
2366
|
-
|
|
2389
|
+
X.value,
|
|
2390
|
+
g
|
|
2367
2391
|
)
|
|
2368
|
-
),
|
|
2369
|
-
() =>
|
|
2370
|
-
),
|
|
2371
|
-
() =>
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2392
|
+
), Ve = $(
|
|
2393
|
+
() => re.value ? _s(re.value, g) : null
|
|
2394
|
+
), Te = $(
|
|
2395
|
+
() => we.value ? Ls(
|
|
2396
|
+
we.value,
|
|
2397
|
+
X.value,
|
|
2398
|
+
g
|
|
2375
2399
|
) : null
|
|
2376
|
-
),
|
|
2377
|
-
() =>
|
|
2378
|
-
|
|
2400
|
+
), de = $(
|
|
2401
|
+
() => Fs(
|
|
2402
|
+
Oe.value ?? {
|
|
2379
2403
|
memberSales: 0,
|
|
2380
2404
|
memberOrders: 0,
|
|
2381
2405
|
nonMemberSales: 0,
|
|
2382
2406
|
nonMemberOrders: 0
|
|
2383
2407
|
},
|
|
2384
|
-
|
|
2385
|
-
|
|
2408
|
+
X.value,
|
|
2409
|
+
g
|
|
2386
2410
|
)
|
|
2387
|
-
),
|
|
2388
|
-
() =>
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2411
|
+
), Xe = $(
|
|
2412
|
+
() => Ms(
|
|
2413
|
+
Ee.value,
|
|
2414
|
+
te.value.location,
|
|
2415
|
+
g
|
|
2392
2416
|
)
|
|
2393
|
-
),
|
|
2394
|
-
() =>
|
|
2395
|
-
|
|
2417
|
+
), je = $(
|
|
2418
|
+
() => ls(
|
|
2419
|
+
ce.value,
|
|
2396
2420
|
{
|
|
2397
|
-
loading:
|
|
2398
|
-
error:
|
|
2421
|
+
loading: fe.value,
|
|
2422
|
+
error: he.value
|
|
2399
2423
|
},
|
|
2400
|
-
|
|
2424
|
+
g
|
|
2401
2425
|
)
|
|
2402
2426
|
);
|
|
2403
|
-
function
|
|
2404
|
-
const b =
|
|
2427
|
+
function et(l) {
|
|
2428
|
+
const b = l.status === "loading" ? "loading" : l.status === "unavailable" ? "unavailable" : l.status === "empty" ? "empty" : l.status === "partial" ? "partial" : l.status === "stale" ? "stale" : "available";
|
|
2405
2429
|
return s(`connect.loyalty.dashboard.review.kpiStatuses.${b}`);
|
|
2406
2430
|
}
|
|
2407
|
-
function
|
|
2408
|
-
return
|
|
2431
|
+
function tt(l) {
|
|
2432
|
+
return l.status === "empty" ? "text-fm-color-typo-success" : l.status === "available" || l.status === "partial" || l.status === "stale" ? "text-fm-color-typo-warning" : "text-fm-color-typo-tertiary";
|
|
2409
2433
|
}
|
|
2410
|
-
const
|
|
2411
|
-
const
|
|
2412
|
-
label: s(
|
|
2413
|
-
value:
|
|
2414
|
-
description: s(
|
|
2415
|
-
icon:
|
|
2416
|
-
delta:
|
|
2434
|
+
const at = $(() => {
|
|
2435
|
+
const l = ie.value, b = je.value, F = b.flaggedMembers !== null && b.flaggedMembers > 0 && ["available", "partial", "stale"].includes(b.status), O = (E, pe, Fe, Lt, ft, Ot, Et) => ({
|
|
2436
|
+
label: s(pe),
|
|
2437
|
+
value: ft === void 0 ? "" : Ot(ft),
|
|
2438
|
+
description: s(Fe),
|
|
2439
|
+
icon: Lt,
|
|
2440
|
+
delta: Et,
|
|
2417
2441
|
sub: null,
|
|
2418
2442
|
deltaClass: "text-fm-color-typo-secondary",
|
|
2419
2443
|
trendUp: !0,
|
|
2420
|
-
loading:
|
|
2421
|
-
error:
|
|
2444
|
+
loading: L[E].loading,
|
|
2445
|
+
error: L[E].error
|
|
2422
2446
|
});
|
|
2423
2447
|
return [
|
|
2424
|
-
|
|
2448
|
+
O(
|
|
2425
2449
|
"totalMembers",
|
|
2426
2450
|
"connect.loyalty.dashboard.kpis.totalMembers.label",
|
|
2427
2451
|
"connect.loyalty.dashboard.kpis.totalMembers.description",
|
|
2428
2452
|
"group",
|
|
2429
|
-
|
|
2430
|
-
|
|
2453
|
+
l.totalMembers,
|
|
2454
|
+
J,
|
|
2431
2455
|
"0%"
|
|
2432
2456
|
),
|
|
2433
|
-
|
|
2457
|
+
O(
|
|
2434
2458
|
"activeMembers",
|
|
2435
2459
|
"connect.loyalty.dashboard.kpis.activeMembers.label",
|
|
2436
2460
|
"connect.loyalty.dashboard.kpis.activeMembers.description",
|
|
2437
2461
|
"bolt",
|
|
2438
|
-
|
|
2439
|
-
|
|
2462
|
+
l.activeMembers,
|
|
2463
|
+
J,
|
|
2440
2464
|
"0%"
|
|
2441
2465
|
),
|
|
2442
|
-
|
|
2466
|
+
O(
|
|
2443
2467
|
"memberSales",
|
|
2444
2468
|
"connect.loyalty.dashboard.kpis.memberSales.label",
|
|
2445
2469
|
"connect.loyalty.dashboard.kpis.memberSales.description",
|
|
2446
2470
|
"payments",
|
|
2447
|
-
|
|
2448
|
-
(
|
|
2471
|
+
l.memberSales,
|
|
2472
|
+
(E) => _e(E, X.value),
|
|
2449
2473
|
"0%"
|
|
2450
2474
|
),
|
|
2451
|
-
|
|
2475
|
+
O(
|
|
2452
2476
|
"repeatRate",
|
|
2453
2477
|
"connect.loyalty.dashboard.kpis.repeatRate.label",
|
|
2454
2478
|
"connect.loyalty.dashboard.kpis.repeatRate.description",
|
|
2455
2479
|
"repeat",
|
|
2456
|
-
|
|
2457
|
-
|
|
2480
|
+
l.repeatRatePct,
|
|
2481
|
+
Ke,
|
|
2458
2482
|
"0pp"
|
|
2459
2483
|
),
|
|
2460
|
-
|
|
2484
|
+
O(
|
|
2461
2485
|
"voucherRedemptionRate",
|
|
2462
2486
|
"connect.loyalty.dashboard.kpis.voucherRedemptionRate.label",
|
|
2463
2487
|
"connect.loyalty.dashboard.kpis.voucherRedemptionRate.description",
|
|
2464
2488
|
"redeem",
|
|
2465
|
-
|
|
2466
|
-
|
|
2489
|
+
l.voucherRedemptionRatePct,
|
|
2490
|
+
Ke,
|
|
2467
2491
|
"0pp"
|
|
2468
2492
|
),
|
|
2469
2493
|
{
|
|
2470
2494
|
label: s("connect.loyalty.dashboard.kpis.flaggedForReview.label"),
|
|
2471
|
-
value: b.flaggedMembers === null ? "" :
|
|
2495
|
+
value: b.flaggedMembers === null ? "" : J(b.flaggedMembers),
|
|
2472
2496
|
description: s(
|
|
2473
2497
|
"connect.loyalty.dashboard.kpis.flaggedForReview.description"
|
|
2474
2498
|
),
|
|
2475
2499
|
icon: "fact_check",
|
|
2476
2500
|
delta: "",
|
|
2477
|
-
sub:
|
|
2478
|
-
subClass:
|
|
2479
|
-
interactive:
|
|
2501
|
+
sub: et(b),
|
|
2502
|
+
subClass: tt(b),
|
|
2503
|
+
interactive: F,
|
|
2480
2504
|
actionLabel: s("connect.loyalty.dashboard.review.action"),
|
|
2481
2505
|
deltaClass: "text-fm-color-typo-secondary",
|
|
2482
2506
|
trendUp: !0,
|
|
2483
|
-
loading:
|
|
2484
|
-
error:
|
|
2507
|
+
loading: fe.value,
|
|
2508
|
+
error: he.value || b.status === "unavailable"
|
|
2485
2509
|
}
|
|
2486
|
-
].map((
|
|
2487
|
-
}),
|
|
2488
|
-
() =>
|
|
2489
|
-
),
|
|
2490
|
-
() =>
|
|
2491
|
-
label: `${
|
|
2492
|
-
value:
|
|
2510
|
+
].map((E) => ({ ...E, sub: E.sub ?? null }));
|
|
2511
|
+
}), m = $(
|
|
2512
|
+
() => h.locations.map((l) => l._id.toString())
|
|
2513
|
+
), C = $(
|
|
2514
|
+
() => h.locations.map((l) => ({
|
|
2515
|
+
label: `${l.code ? `${l.code} - ` : ""}${l.name}`,
|
|
2516
|
+
value: l._id.toString()
|
|
2493
2517
|
}))
|
|
2494
|
-
),
|
|
2495
|
-
() => !
|
|
2496
|
-
dateRange: [
|
|
2497
|
-
businessRestaurantIds:
|
|
2498
|
-
selectedRestaurantIds:
|
|
2499
|
-
timezone:
|
|
2518
|
+
), P = $(
|
|
2519
|
+
() => !A.value.startDate || !A.value.endDate || !se.value ? null : os({
|
|
2520
|
+
dateRange: [A.value.startDate, A.value.endDate],
|
|
2521
|
+
businessRestaurantIds: m.value,
|
|
2522
|
+
selectedRestaurantIds: te.value.location,
|
|
2523
|
+
timezone: I.value
|
|
2500
2524
|
})
|
|
2501
2525
|
);
|
|
2502
|
-
function
|
|
2503
|
-
if (!
|
|
2504
|
-
const b = (
|
|
2526
|
+
function j(l) {
|
|
2527
|
+
if (!l.startDate || !l.endDate) return "";
|
|
2528
|
+
const b = (F, O) => new Intl.DateTimeFormat(t.value, {
|
|
2505
2529
|
day: "numeric",
|
|
2506
2530
|
month: "short",
|
|
2507
|
-
year:
|
|
2508
|
-
timeZone:
|
|
2509
|
-
}).format(
|
|
2510
|
-
return `${b(
|
|
2531
|
+
year: O ? "numeric" : void 0,
|
|
2532
|
+
timeZone: I.value
|
|
2533
|
+
}).format(De.tz(F, I.value).toDate());
|
|
2534
|
+
return `${b(l.startDate, !1)} – ${b(l.endDate, !0)}`;
|
|
2511
2535
|
}
|
|
2512
|
-
const
|
|
2513
|
-
() =>
|
|
2536
|
+
const ye = $(() => j(A.value)), me = $(
|
|
2537
|
+
() => j(G.value)
|
|
2514
2538
|
);
|
|
2515
|
-
function
|
|
2516
|
-
return
|
|
2539
|
+
function J(l) {
|
|
2540
|
+
return l >= 1e3 ? `${(l / 1e3).toFixed(1).replace(/\.0$/, "")}k` : String(l);
|
|
2517
2541
|
}
|
|
2518
|
-
function
|
|
2519
|
-
return `${Math.round(
|
|
2542
|
+
function Ke(l) {
|
|
2543
|
+
return `${Math.round(l * 10) / 10}%`;
|
|
2520
2544
|
}
|
|
2521
|
-
function
|
|
2522
|
-
|
|
2545
|
+
function ot(l) {
|
|
2546
|
+
A.value = l;
|
|
2523
2547
|
}
|
|
2524
|
-
function
|
|
2525
|
-
|
|
2548
|
+
function Ne(l) {
|
|
2549
|
+
ee.value = l;
|
|
2526
2550
|
}
|
|
2527
|
-
function
|
|
2528
|
-
|
|
2551
|
+
function st(l) {
|
|
2552
|
+
G.value = l;
|
|
2529
2553
|
}
|
|
2530
|
-
function
|
|
2531
|
-
if (
|
|
2532
|
-
return Number(
|
|
2554
|
+
function _(l) {
|
|
2555
|
+
if (l && typeof l == "object" && "value" in l && Number.isFinite(Number(l.value)))
|
|
2556
|
+
return Number(l.value);
|
|
2533
2557
|
}
|
|
2534
|
-
function
|
|
2535
|
-
return !
|
|
2536
|
-
dateRange: [
|
|
2558
|
+
function D() {
|
|
2559
|
+
return !A.value.startDate || !A.value.endDate || !G.value.startDate || !G.value.endDate || !se.value ? null : ds({
|
|
2560
|
+
dateRange: [A.value.startDate, A.value.endDate],
|
|
2537
2561
|
compareDateRange: [
|
|
2538
|
-
|
|
2539
|
-
|
|
2562
|
+
G.value.startDate,
|
|
2563
|
+
G.value.endDate
|
|
2540
2564
|
],
|
|
2541
|
-
selectedLocationIds:
|
|
2542
|
-
locationIds:
|
|
2543
|
-
timezone:
|
|
2565
|
+
selectedLocationIds: te.value.location,
|
|
2566
|
+
locationIds: m.value,
|
|
2567
|
+
timezone: I.value
|
|
2544
2568
|
});
|
|
2545
2569
|
}
|
|
2546
|
-
function
|
|
2547
|
-
return
|
|
2570
|
+
function B(l) {
|
|
2571
|
+
return l === ze.value;
|
|
2548
2572
|
}
|
|
2549
|
-
function
|
|
2550
|
-
const
|
|
2551
|
-
|
|
2552
|
-
|
|
2573
|
+
function ae(l, b, F, O, Ce) {
|
|
2574
|
+
const E = L[l];
|
|
2575
|
+
E.loading = !0, E.error = !1, Promise.resolve().then(() => b(F)).then((pe) => {
|
|
2576
|
+
B(O) && Ce(pe);
|
|
2553
2577
|
}).catch(() => {
|
|
2554
|
-
|
|
2578
|
+
B(O) && (E.error = !0);
|
|
2555
2579
|
}).finally(() => {
|
|
2556
|
-
|
|
2580
|
+
B(O) && (E.loading = !1);
|
|
2557
2581
|
});
|
|
2558
2582
|
}
|
|
2559
|
-
function
|
|
2560
|
-
|
|
2583
|
+
function St(l, b) {
|
|
2584
|
+
ae(
|
|
2561
2585
|
"totalMembers",
|
|
2562
|
-
|
|
2563
|
-
|
|
2586
|
+
H.readTotalMembers,
|
|
2587
|
+
l,
|
|
2564
2588
|
b,
|
|
2565
|
-
(
|
|
2566
|
-
const
|
|
2567
|
-
if (
|
|
2589
|
+
(F) => {
|
|
2590
|
+
const O = _(F);
|
|
2591
|
+
if (O === void 0)
|
|
2568
2592
|
throw new Error("Invalid total member metric");
|
|
2569
|
-
|
|
2593
|
+
ie.value.totalMembers = O;
|
|
2570
2594
|
}
|
|
2571
|
-
),
|
|
2595
|
+
), ae(
|
|
2572
2596
|
"activeMembers",
|
|
2573
|
-
|
|
2574
|
-
|
|
2597
|
+
H.readActiveMembers,
|
|
2598
|
+
l,
|
|
2575
2599
|
b,
|
|
2576
|
-
(
|
|
2577
|
-
|
|
2600
|
+
(F) => {
|
|
2601
|
+
ie.value.activeMembers = F.activeMembers;
|
|
2578
2602
|
}
|
|
2579
|
-
),
|
|
2603
|
+
), ae(
|
|
2580
2604
|
"memberSales",
|
|
2581
|
-
|
|
2582
|
-
|
|
2605
|
+
H.readMemberSales,
|
|
2606
|
+
l,
|
|
2583
2607
|
b,
|
|
2584
|
-
(
|
|
2585
|
-
|
|
2608
|
+
(F) => {
|
|
2609
|
+
ie.value.memberSales = F.memberSales;
|
|
2586
2610
|
}
|
|
2587
|
-
),
|
|
2611
|
+
), ae(
|
|
2588
2612
|
"repeatRate",
|
|
2589
|
-
|
|
2590
|
-
|
|
2613
|
+
H.readRepeatRate,
|
|
2614
|
+
l,
|
|
2591
2615
|
b,
|
|
2592
|
-
(
|
|
2593
|
-
|
|
2616
|
+
(F) => {
|
|
2617
|
+
ie.value.repeatRatePct = F.repeatRatePct;
|
|
2594
2618
|
}
|
|
2595
|
-
),
|
|
2619
|
+
), ae(
|
|
2596
2620
|
"voucherRedemptionRate",
|
|
2597
|
-
|
|
2598
|
-
|
|
2621
|
+
H.readVoucherRedemptionRate,
|
|
2622
|
+
l,
|
|
2599
2623
|
b,
|
|
2600
|
-
(
|
|
2601
|
-
|
|
2624
|
+
(F) => {
|
|
2625
|
+
ie.value.voucherRedemptionRatePct = F.voucherRedemptionRatePct;
|
|
2602
2626
|
}
|
|
2603
2627
|
);
|
|
2604
2628
|
}
|
|
2605
|
-
function
|
|
2606
|
-
|
|
2629
|
+
function Mt(l, b) {
|
|
2630
|
+
ae(
|
|
2607
2631
|
"memberFunnel",
|
|
2608
|
-
|
|
2609
|
-
|
|
2632
|
+
H.readMemberFunnel,
|
|
2633
|
+
l,
|
|
2610
2634
|
b,
|
|
2611
|
-
(
|
|
2612
|
-
|
|
2635
|
+
(F) => {
|
|
2636
|
+
re.value = F;
|
|
2613
2637
|
}
|
|
2614
2638
|
);
|
|
2615
2639
|
}
|
|
2616
|
-
function
|
|
2617
|
-
|
|
2640
|
+
function $t(l, b) {
|
|
2641
|
+
ae(
|
|
2618
2642
|
"memberLifecycle",
|
|
2619
|
-
|
|
2620
|
-
|
|
2643
|
+
H.readMemberLifecycle,
|
|
2644
|
+
l,
|
|
2621
2645
|
b,
|
|
2622
|
-
(
|
|
2623
|
-
|
|
2646
|
+
(F) => {
|
|
2647
|
+
Ie.value = F;
|
|
2624
2648
|
}
|
|
2625
2649
|
);
|
|
2626
2650
|
}
|
|
2627
|
-
function
|
|
2628
|
-
|
|
2651
|
+
function Ct(l, b) {
|
|
2652
|
+
ae(
|
|
2629
2653
|
"memberSalesTrend",
|
|
2630
|
-
|
|
2631
|
-
|
|
2654
|
+
H.readMemberSalesTrend,
|
|
2655
|
+
l,
|
|
2632
2656
|
b,
|
|
2633
|
-
(
|
|
2634
|
-
|
|
2657
|
+
(F) => {
|
|
2658
|
+
Le.value = F;
|
|
2635
2659
|
}
|
|
2636
2660
|
);
|
|
2637
2661
|
}
|
|
2638
|
-
function
|
|
2639
|
-
|
|
2662
|
+
function Ft(l, b) {
|
|
2663
|
+
ae(
|
|
2640
2664
|
"memberSpendComparison",
|
|
2641
|
-
|
|
2642
|
-
|
|
2665
|
+
H.readMemberSpendComparison,
|
|
2666
|
+
l,
|
|
2643
2667
|
b,
|
|
2644
|
-
(
|
|
2645
|
-
|
|
2668
|
+
(F) => {
|
|
2669
|
+
Oe.value = F;
|
|
2646
2670
|
}
|
|
2647
2671
|
);
|
|
2648
2672
|
}
|
|
2649
|
-
function
|
|
2650
|
-
|
|
2673
|
+
function Dt(l, b) {
|
|
2674
|
+
ae(
|
|
2651
2675
|
"rewardUsageHealth",
|
|
2652
|
-
|
|
2653
|
-
|
|
2676
|
+
H.readRewardUsageHealth,
|
|
2677
|
+
l,
|
|
2654
2678
|
b,
|
|
2655
|
-
(
|
|
2656
|
-
|
|
2679
|
+
(F) => {
|
|
2680
|
+
we.value = F;
|
|
2657
2681
|
}
|
|
2658
2682
|
);
|
|
2659
2683
|
}
|
|
2660
|
-
function
|
|
2661
|
-
|
|
2662
|
-
|
|
2684
|
+
function yt() {
|
|
2685
|
+
ce.value = null, fe.value = !1, he.value = !1, ve.value = null, Se.value = null, Object.values(Re.value).forEach((l) => {
|
|
2686
|
+
l.loading = !1, l.error = !1;
|
|
2663
2687
|
});
|
|
2664
2688
|
}
|
|
2665
|
-
function
|
|
2666
|
-
const
|
|
2667
|
-
|
|
2668
|
-
|
|
2689
|
+
function pt(l, b, F, O, Ce) {
|
|
2690
|
+
const E = Re.value[l];
|
|
2691
|
+
E.loading = !0, E.error = !1, b(F).then((pe) => {
|
|
2692
|
+
B(O) && Ce(pe);
|
|
2669
2693
|
}).catch(() => {
|
|
2670
|
-
|
|
2694
|
+
B(O) && (E.error = !0);
|
|
2671
2695
|
}).finally(() => {
|
|
2672
|
-
|
|
2696
|
+
B(O) && (E.loading = !1);
|
|
2673
2697
|
});
|
|
2674
2698
|
}
|
|
2675
|
-
function
|
|
2676
|
-
|
|
2699
|
+
function At(l, b) {
|
|
2700
|
+
ce.value = null, fe.value = !0, he.value = !1, ve.value = null, Se.value = null, pt(
|
|
2677
2701
|
"outlier",
|
|
2678
|
-
|
|
2679
|
-
|
|
2702
|
+
H.readRewardEarningOutliers,
|
|
2703
|
+
l,
|
|
2680
2704
|
b,
|
|
2681
|
-
(
|
|
2682
|
-
|
|
2705
|
+
(F) => {
|
|
2706
|
+
ve.value = F;
|
|
2683
2707
|
}
|
|
2684
|
-
),
|
|
2708
|
+
), pt(
|
|
2685
2709
|
"maximizers",
|
|
2686
|
-
|
|
2687
|
-
|
|
2710
|
+
H.readRewardMaximizers,
|
|
2711
|
+
l,
|
|
2688
2712
|
b,
|
|
2689
|
-
(
|
|
2690
|
-
|
|
2713
|
+
(F) => {
|
|
2714
|
+
Se.value = F;
|
|
2691
2715
|
}
|
|
2692
|
-
),
|
|
2693
|
-
|
|
2716
|
+
), H.readRewardAbuseSummary(l).then((F) => {
|
|
2717
|
+
B(b) && (ce.value = F);
|
|
2694
2718
|
}).catch(() => {
|
|
2695
|
-
|
|
2719
|
+
B(b) && (he.value = !0);
|
|
2696
2720
|
}).finally(() => {
|
|
2697
|
-
|
|
2721
|
+
B(b) && (fe.value = !1);
|
|
2698
2722
|
});
|
|
2699
2723
|
}
|
|
2700
|
-
async function
|
|
2701
|
-
|
|
2724
|
+
async function kt() {
|
|
2725
|
+
Pe.value = !0, Be.value = !1;
|
|
2702
2726
|
try {
|
|
2703
|
-
const { resources:
|
|
2727
|
+
const { resources: l } = await qt.readAll({
|
|
2704
2728
|
limit: 1e3,
|
|
2705
2729
|
skip: 0,
|
|
2706
2730
|
sortBy: "_id",
|
|
2707
2731
|
descending: !0
|
|
2708
2732
|
});
|
|
2709
|
-
|
|
2710
|
-
} catch (
|
|
2711
|
-
throw
|
|
2733
|
+
Ee.value = l;
|
|
2734
|
+
} catch (l) {
|
|
2735
|
+
throw Be.value = !0, l;
|
|
2712
2736
|
} finally {
|
|
2713
|
-
|
|
2737
|
+
Pe.value = !1;
|
|
2714
2738
|
}
|
|
2715
2739
|
}
|
|
2716
|
-
function
|
|
2717
|
-
|
|
2718
|
-
|
|
2740
|
+
function It() {
|
|
2741
|
+
ie.value = {}, re.value = null, Ie.value = null, Le.value = null, Oe.value = null, we.value = null, Object.values(L).forEach((l) => {
|
|
2742
|
+
l.loading = !1, l.error = !1;
|
|
2719
2743
|
});
|
|
2720
2744
|
}
|
|
2721
|
-
function
|
|
2722
|
-
const
|
|
2723
|
-
|
|
2724
|
-
const b =
|
|
2745
|
+
function bt() {
|
|
2746
|
+
const l = ++ze.value;
|
|
2747
|
+
It();
|
|
2748
|
+
const b = D();
|
|
2725
2749
|
if (!b) {
|
|
2726
|
-
|
|
2750
|
+
yt();
|
|
2727
2751
|
return;
|
|
2728
2752
|
}
|
|
2729
|
-
|
|
2753
|
+
P.value ? At(P.value, l) : yt(), St(b, l), Mt(b, l), $t(b, l), Ct(b, l), Ft(b, l), Dt(b, l);
|
|
2730
2754
|
}
|
|
2731
|
-
return
|
|
2732
|
-
[
|
|
2755
|
+
return Ye(
|
|
2756
|
+
[A, G, ee, () => te.value.location],
|
|
2733
2757
|
() => {
|
|
2734
|
-
|
|
2758
|
+
Ue.value && bt();
|
|
2735
2759
|
}
|
|
2736
|
-
),
|
|
2737
|
-
await
|
|
2738
|
-
|
|
2739
|
-
}), await
|
|
2740
|
-
|
|
2760
|
+
), zt(async () => {
|
|
2761
|
+
n.read(t.value), await oe(async () => {
|
|
2762
|
+
se.value || await h.readLocations(), se.value = !0;
|
|
2763
|
+
}), await xt(), Ue.value = !0, bt(), kt().catch(() => {
|
|
2764
|
+
Ee.value = [];
|
|
2741
2765
|
});
|
|
2742
|
-
}), (
|
|
2743
|
-
var
|
|
2744
|
-
const
|
|
2745
|
-
return c(), d(
|
|
2746
|
-
|
|
2766
|
+
}), (l, b) => {
|
|
2767
|
+
var E, pe;
|
|
2768
|
+
const F = M("FmPill"), O = M("FmPageHead"), Ce = M("FmButton");
|
|
2769
|
+
return c(), d(k, null, [
|
|
2770
|
+
f(O, {
|
|
2747
2771
|
title: o(s)("connect.loyalty.dashboard.title")
|
|
2748
2772
|
}, {
|
|
2749
2773
|
title: U(() => [
|
|
2750
|
-
a("div",
|
|
2751
|
-
a("span",
|
|
2752
|
-
|
|
2774
|
+
a("div", An, [
|
|
2775
|
+
a("span", kn, r(o(s)("connect.loyalty.dashboard.title")), 1),
|
|
2776
|
+
f(F, { variant: "beta" })
|
|
2753
2777
|
])
|
|
2754
2778
|
]),
|
|
2755
2779
|
_: 1
|
|
2756
2780
|
}, 8, ["title"]),
|
|
2757
|
-
a("div",
|
|
2758
|
-
|
|
2759
|
-
|
|
2781
|
+
a("div", In, [
|
|
2782
|
+
o(p) && !o(u) ? (c(), d(k, { key: 0 }, [
|
|
2783
|
+
o(i) === "picker" ? (c(), N(ea, {
|
|
2784
|
+
key: 0,
|
|
2785
|
+
updating: !1,
|
|
2786
|
+
dismissible: "",
|
|
2787
|
+
onDismiss: w
|
|
2788
|
+
})) : (c(), N(ta, {
|
|
2789
|
+
key: 1,
|
|
2790
|
+
mode: o(y),
|
|
2791
|
+
placement: "analytic"
|
|
2792
|
+
}, null, 8, ["mode"]))
|
|
2793
|
+
], 64)) : o(x) ? (c(), d("div", Ln, [
|
|
2794
|
+
f(Ce, {
|
|
2795
|
+
variant: "secondary",
|
|
2796
|
+
"prepend-icon": "checklist",
|
|
2797
|
+
label: o(s)("connect.onboarding.show_list"),
|
|
2798
|
+
onClick: R
|
|
2799
|
+
}, null, 8, ["label"])
|
|
2800
|
+
])) : z("", !0),
|
|
2801
|
+
a("div", On, [
|
|
2802
|
+
f(wt, {
|
|
2760
2803
|
label: `${o(s)("connect.loyalty.dashboard.filters.location")}: `,
|
|
2761
2804
|
"all-label": o(s)("connect.loyalty.dashboard.filters.all"),
|
|
2762
2805
|
"selected-label": o(s)("connect.loyalty.dashboard.filters.selected"),
|
|
2763
2806
|
"search-placeholder": o(s)("connect.loyalty.dashboard.filters.searchLocations"),
|
|
2764
2807
|
"right-icon": "keyboard_arrow_down",
|
|
2765
|
-
modelValue: o(
|
|
2766
|
-
"onUpdate:modelValue": b[0] || (b[0] = (
|
|
2808
|
+
modelValue: o(te).location,
|
|
2809
|
+
"onUpdate:modelValue": b[0] || (b[0] = (Fe) => o(te).location = Fe),
|
|
2767
2810
|
icon: "storefront",
|
|
2768
2811
|
"show-item-label": !0,
|
|
2769
|
-
items: o(
|
|
2812
|
+
items: o(h).locationOptions
|
|
2770
2813
|
}, null, 8, ["label", "all-label", "selected-label", "search-placeholder", "modelValue", "items"]),
|
|
2771
|
-
a("div",
|
|
2772
|
-
|
|
2773
|
-
"model-value": o(
|
|
2774
|
-
"onUpdate:modelValue":
|
|
2814
|
+
a("div", En, [
|
|
2815
|
+
f(it, {
|
|
2816
|
+
"model-value": o(A),
|
|
2817
|
+
"onUpdate:modelValue": ot
|
|
2775
2818
|
}, null, 8, ["model-value"]),
|
|
2776
|
-
a("span",
|
|
2777
|
-
|
|
2778
|
-
"model-value": o(
|
|
2779
|
-
"onUpdate:modelValue":
|
|
2819
|
+
a("span", Pn, r(o(s)("connect.loyalty.dashboard.filters.comparisonSeparator")), 1),
|
|
2820
|
+
f(Dn, {
|
|
2821
|
+
"model-value": o(ee),
|
|
2822
|
+
"onUpdate:modelValue": Ne
|
|
2780
2823
|
}, null, 8, ["model-value"]),
|
|
2781
|
-
|
|
2782
|
-
"model-value": o(
|
|
2783
|
-
readonly: o(
|
|
2784
|
-
"onUpdate:modelValue":
|
|
2824
|
+
f(it, {
|
|
2825
|
+
"model-value": o(G),
|
|
2826
|
+
readonly: o(ee) !== "custom",
|
|
2827
|
+
"onUpdate:modelValue": st
|
|
2785
2828
|
}, null, 8, ["model-value", "readonly"])
|
|
2786
2829
|
])
|
|
2787
2830
|
]),
|
|
2788
|
-
a("div",
|
|
2789
|
-
current: o(
|
|
2790
|
-
comparison: o(
|
|
2831
|
+
a("div", Bn, r(o(s)("connect.loyalty.dashboard.filters.rangeSummary", {
|
|
2832
|
+
current: o(ye),
|
|
2833
|
+
comparison: o(me)
|
|
2791
2834
|
})), 1),
|
|
2792
|
-
|
|
2793
|
-
kpis: o(
|
|
2794
|
-
onSelect: b[1] || (b[1] = (
|
|
2835
|
+
f(Va, {
|
|
2836
|
+
kpis: o(at),
|
|
2837
|
+
onSelect: b[1] || (b[1] = (Fe) => Me.value = !0)
|
|
2795
2838
|
}, null, 8, ["kpis"]),
|
|
2796
|
-
a("section",
|
|
2797
|
-
|
|
2798
|
-
stages: o(
|
|
2799
|
-
footnote: o(
|
|
2839
|
+
a("section", Tn, [
|
|
2840
|
+
f(xo, {
|
|
2841
|
+
stages: o(ue).funnelStages,
|
|
2842
|
+
footnote: o(ue).funnelFootnote,
|
|
2800
2843
|
interactive: !1,
|
|
2801
|
-
loading: o(
|
|
2802
|
-
error: o(
|
|
2844
|
+
loading: o(L).memberFunnel.loading,
|
|
2845
|
+
error: o(L).memberFunnel.error
|
|
2803
2846
|
}, null, 8, ["stages", "footnote", "loading", "error"]),
|
|
2804
|
-
|
|
2805
|
-
insight: o(
|
|
2806
|
-
loading: o(
|
|
2807
|
-
error: o(
|
|
2847
|
+
f(Aa, {
|
|
2848
|
+
insight: o(Ve),
|
|
2849
|
+
loading: o(L).memberFunnel.loading,
|
|
2850
|
+
error: o(L).memberFunnel.error
|
|
2808
2851
|
}, null, 8, ["insight", "loading", "error"])
|
|
2809
2852
|
]),
|
|
2810
|
-
a("section",
|
|
2811
|
-
a("div",
|
|
2812
|
-
|
|
2813
|
-
segments: o(
|
|
2814
|
-
summary: o(
|
|
2853
|
+
a("section", Nn, [
|
|
2854
|
+
a("div", Un, [
|
|
2855
|
+
f(Xa, {
|
|
2856
|
+
segments: o($e).lifecycleSegs,
|
|
2857
|
+
summary: o($e).lifecycleSummary,
|
|
2815
2858
|
interactive: !1,
|
|
2816
|
-
loading: o(
|
|
2817
|
-
error: o(
|
|
2859
|
+
loading: o(L).memberLifecycle.loading,
|
|
2860
|
+
error: o(L).memberLifecycle.error
|
|
2818
2861
|
}, null, 8, ["segments", "summary", "loading", "error"]),
|
|
2819
|
-
|
|
2820
|
-
spend: o(
|
|
2821
|
-
loading: o(
|
|
2822
|
-
error: o(
|
|
2862
|
+
f(Bo, {
|
|
2863
|
+
spend: o(de),
|
|
2864
|
+
loading: o(L).memberSpendComparison.loading,
|
|
2865
|
+
error: o(L).memberSpendComparison.error
|
|
2823
2866
|
}, null, 8, ["spend", "loading", "error"]),
|
|
2824
|
-
|
|
2825
|
-
metric: o(
|
|
2826
|
-
loading: o(
|
|
2827
|
-
error: o(
|
|
2867
|
+
f(fn, {
|
|
2868
|
+
metric: o(Se),
|
|
2869
|
+
loading: o(Re).maximizers.loading,
|
|
2870
|
+
error: o(Re).maximizers.error
|
|
2828
2871
|
}, null, 8, ["metric", "loading", "error"])
|
|
2829
2872
|
]),
|
|
2830
|
-
a("div",
|
|
2831
|
-
|
|
2832
|
-
sales: o(
|
|
2833
|
-
loading: o(
|
|
2834
|
-
error: o(
|
|
2873
|
+
a("div", zn, [
|
|
2874
|
+
f(Fn, {
|
|
2875
|
+
sales: o(Qe),
|
|
2876
|
+
loading: o(L).memberSalesTrend.loading,
|
|
2877
|
+
error: o(L).memberSalesTrend.error
|
|
2835
2878
|
}, null, 8, ["sales", "loading", "error"]),
|
|
2836
|
-
|
|
2837
|
-
kpis: ((
|
|
2838
|
-
"top-rewards": ((
|
|
2839
|
-
"has-data": !!o(
|
|
2840
|
-
loading: o(
|
|
2841
|
-
error: o(
|
|
2879
|
+
f(Zo, {
|
|
2880
|
+
kpis: ((E = o(Te)) == null ? void 0 : E.rewardKpis) ?? [],
|
|
2881
|
+
"top-rewards": ((pe = o(Te)) == null ? void 0 : pe.topRewards) ?? [],
|
|
2882
|
+
"has-data": !!o(Te),
|
|
2883
|
+
loading: o(L).rewardUsageHealth.loading,
|
|
2884
|
+
error: o(L).rewardUsageHealth.error
|
|
2842
2885
|
}, null, 8, ["kpis", "top-rewards", "has-data", "loading", "error"]),
|
|
2843
|
-
|
|
2844
|
-
campaigns: o(
|
|
2845
|
-
loading: o(
|
|
2846
|
-
error: o(
|
|
2886
|
+
f(fa, {
|
|
2887
|
+
campaigns: o(Xe),
|
|
2888
|
+
loading: o(Pe),
|
|
2889
|
+
error: o(Be)
|
|
2847
2890
|
}, null, 8, ["campaigns", "loading", "error"])
|
|
2848
2891
|
])
|
|
2849
2892
|
]),
|
|
2850
|
-
|
|
2851
|
-
modelValue: o(
|
|
2852
|
-
"onUpdate:modelValue": b[2] || (b[2] = (
|
|
2853
|
-
summary: o(
|
|
2854
|
-
"outlier-metric": o(
|
|
2855
|
-
payload: o(
|
|
2856
|
-
locations: o(
|
|
2893
|
+
f(Qr, {
|
|
2894
|
+
modelValue: o(Me),
|
|
2895
|
+
"onUpdate:modelValue": b[2] || (b[2] = (Fe) => lt(Me) ? Me.value = Fe : null),
|
|
2896
|
+
summary: o(je),
|
|
2897
|
+
"outlier-metric": o(ve),
|
|
2898
|
+
payload: o(P),
|
|
2899
|
+
locations: o(C)
|
|
2857
2900
|
}, null, 8, ["modelValue", "summary", "outlier-metric", "payload", "locations"])
|
|
2858
2901
|
])
|
|
2859
2902
|
], 64);
|
|
@@ -2861,5 +2904,5 @@ const xs = { class: "flex flex-col gap-16 min-h-full" }, ws = { class: "flex fle
|
|
|
2861
2904
|
}
|
|
2862
2905
|
});
|
|
2863
2906
|
export {
|
|
2864
|
-
|
|
2907
|
+
ll as default
|
|
2865
2908
|
};
|