@feedmepos/mf-connect 0.1.98-beta.5 → 0.1.98-beta.50
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-D_4snNiy.js → App-XRTSw_F1.js} +812 -666
- package/dist/{AuditLogs-KQU1O9_9.js → AuditLogs-CgsvZ-7X.js} +12 -11
- package/dist/{Bin-gp_uuNrE.js → Bin-CDwE00an.js} +8 -8
- package/dist/{Broadcast-CbBaOlnn.js → Broadcast-BOh56jYG.js} +39 -36
- package/dist/CampaignAnalytic-DZkCSGRF.js +1826 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-2bro245w.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DqYRlwCj.js} +7 -5
- package/dist/Card-DZ01wmGw.js +1060 -0
- package/dist/{Collections-CKeOHYZ4.js → Collections-CaIWOlsO.js} +14 -13
- package/dist/Credit-C8TM9q2f.js +286 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bh2O4xdy.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-1UH_Ie4E.js} +34 -30
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BIdb46VQ.js → EffectSheet.vue_vue_type_style_index_0_lang-CVqMqYhi.js} +6 -6
- package/dist/{Experience-B-c5SMns.js → Experience-Cy0K8E9P.js} +112 -86
- package/dist/{FileSaver.min-DWnvGKCg.js → FileSaver.min-ClaVGDxU.js} +1 -1
- package/dist/Game-DxUNIK1H.js +356 -0
- package/dist/GiftCardSetup-DPuRb-29.js +662 -0
- package/dist/{Grab-BLC4GcgE.js → Grab-VSlV6K7E.js} +32 -31
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-l2CmQ0nR.js → ImageInput.vue_vue_type_script_setup_true_lang-BJQzLNY1.js} +1 -1
- package/dist/{Index-DmAG2skd.js → Index-D_xXXqKL.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-UmynGH00.js → LocationPicker.vue_vue_type_script_setup_true_lang-BJl8_bKp.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BThofu65.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BOaXZf3X.js} +1 -1
- package/dist/LoyaltyDashboard-CWPV6CHM.js +2218 -0
- package/dist/MainLayout-CeA24f8v.js +143 -0
- package/dist/{Marketing-DmY25Ri9.js → Marketing-Bw437-ze.js} +7 -6
- package/dist/{MarketingMaterialEdit-DP9pba44.js → MarketingMaterialEdit-x6JdhQDh.js} +15 -14
- package/dist/Member-zLjxWmJf.js +626 -0
- package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DM9c_Ow1.js +1287 -0
- package/dist/MemberImportHistory-BvvIfn9o.js +187 -0
- package/dist/MemberList-DqqAduX1.js +336 -0
- package/dist/{MemberTransactions-XRvUfeFB.js → MemberTransactions-j4nWa843.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-g7v3ZoUS.js → MessageInput.vue_vue_type_script_setup_true_lang-z9lYA425.js} +5434 -5279
- package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +38 -0
- package/dist/Mission-CPXEtNBm.js +360 -0
- package/dist/Overview-Bel0iCe8.js +1316 -0
- package/dist/{Overview-DgmVlUVi.js → Overview-DySRWqyr.js} +21 -20
- package/dist/Point-ClovAwUI.js +288 -0
- package/dist/Promotion-BiiruWmm.js +423 -0
- package/dist/{Queue-DxtykwmI.js → Queue-DY9zRWWp.js} +13 -12
- package/dist/{Record-fLCi2Oyh.js → Record-BJ6M5bXk.js} +9 -9
- package/dist/Review-Cyi-vRyc.js +45 -0
- package/dist/ReviewFacebookCallback-CdSAfiJ7.js +238 -0
- package/dist/ReviewGoogleCallback-COen72wx.js +213 -0
- package/dist/{Reward-BbdiCAiO.js → Reward-B3--b_8h.js} +35 -35
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Cfjtk46d.js → RewardGroup.vue_vue_type_script_setup_true_lang-DCmSt5io.js} +14 -13
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CYEBeuQQ.js → RuleGroup.vue_vue_type_script_setup_true_lang-F2B47wb8.js} +17 -15
- package/dist/{Segment-EkGcR2jo.js → Segment-DydGccSi.js} +31 -29
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DND48RGu.js → SelectItems.vue_vue_type_script_setup_true_lang-Bf_1Lw5R.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-sbYDSAFK.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BXrHY1DU.js} +37 -36
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D8RmLtRC.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DhitF847.js} +4 -4
- package/dist/{Setting-D3swsR6P.js → Setting-DgXgWy7W.js} +14 -14
- package/dist/{SettingAdvertisements-BjhTK11W.js → SettingAdvertisements-TMTfvGdU.js} +12 -12
- package/dist/Settings-b3K8fH29.js +230 -0
- package/dist/Store-jAGYe4R6.js +2615 -0
- package/dist/{StoreRewards-CyrWuwLi.js → StoreRewards-23IXon0V.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BUTYIDGo.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BroaESpx.js} +400 -455
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DJQ022R4.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-gnjnQhXP.js} +2 -2
- package/dist/{Tier-DrPqr8_e.js → Tier-B_ixl0ZY.js} +44 -41
- package/dist/{Title-CaZtz98p.js → Title-CUc90kzn.js} +49 -46
- package/dist/Transaction-BNVEjOC4.js +45 -0
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BsBqk0Rs.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CkbKlnrt.js} +6 -6
- package/dist/{Voucher-BZcr4D0y.js → Voucher-eALK6zg9.js} +156 -133
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DXQF3LZK.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CEsMYQ-L.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DI-tCQeb.js → ZodTextField.vue_vue_type_script_setup_true_lang-BEAJ5tb7.js} +2 -2
- package/dist/{app-B0vutEt5.js → app-I3z-EN92.js} +7269 -5971
- package/dist/app.js +1 -1
- package/dist/{business-IZLJeLD-.js → business-D_ksG_j8.js} +5 -5
- package/dist/campaign-BKIxUyuf.js +100 -0
- package/dist/{campaign-BPmgteCL.js → campaign-IZaOdcTr.js} +74 -96
- package/dist/{campaign.enum-BCdlLIt6.js → campaign.enum-k3u4N6yI.js} +1 -1
- package/dist/{campaign.fn-BIFWlQvS.js → campaign.fn-DeQTMPoH.js} +116 -116
- package/dist/{collectible.enum-CiuAWn6_.js → collectible.enum-CSQwvFfW.js} +1 -1
- package/dist/collection.fn-BtWAPYLz.js +26 -0
- package/dist/{duplicateCampaign-BouCkl9n.js → duplicateCampaign-BWdWO-Jv.js} +2 -2
- package/dist/{effect-Cov_Xrar.js → effect-BBSG58dq.js} +1 -1
- package/dist/{email-addresses-BiopO9xi.js → email-addresses-CJg5ttqC.js} +2 -2
- package/dist/{export-DAPTBdHb.js → export-BkjhRe8g.js} +3 -3
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-ClFo4nAk.js → helper-DsSVIIP1.js} +1 -1
- package/dist/index-38Rnr26K.js +53 -0
- package/dist/{index-N5t83KgP.js → index-BbBies0f.js} +1902 -2559
- package/dist/index-BmAoVlN8.js +151 -0
- package/dist/{index-BZvvCPbP.js → index-BsAuvfaE.js} +5 -4
- package/dist/{index-Kllafq_o.js → index-C-phzlda.js} +105 -123
- package/dist/{index-CD_3hR1g.js → index-C0qgi7n9.js} +1 -1
- package/dist/index-CPnv5m8Z.js +137 -0
- package/dist/{index-BeK9AXvx.js → index-CV1kOec1.js} +1 -1
- package/dist/{index-CmgQZKyo.js → index-Ckr8ODhI.js} +1 -1
- package/dist/{index-DTSGYksR.js → index-CtF4Z_fd.js} +281 -372
- package/dist/{index-k9DTOKkN.js → index-CtXqXihA.js} +4 -1
- package/dist/index-DCz9v1dd.js +51 -0
- package/dist/index-DdV1nasM.js +896 -0
- package/dist/index-ZPKkCZxS.js +72 -0
- package/dist/{index-k0hHOUBO.js → index-blX95L2R.js} +579 -571
- package/dist/{index-Bm5E2iD6.js → index-f0JDFqAr.js} +14 -14
- package/dist/{index-pKdJ8574.js → index-iagCxZ13.js} +5 -5
- package/dist/{index-C_AuIVay.js → index-wsdEChJx.js} +5 -5
- package/dist/{index.esm2017-ByFUnorr.js → index.esm2017-BMC-Q91P.js} +164 -164
- package/dist/{loading-t4ygCIAa.js → loading-3obmcgAf.js} +1 -1
- package/dist/{lodash-DwGVChOs.js → lodash-C69G7pFG.js} +1 -1
- package/dist/member-import-BxBe9NE7.js +187 -0
- package/dist/{membership-CMCTmRdh.js → membership-_XX1_j55.js} +3 -3
- package/dist/{money-MhQbdVIt.js → money-DZpYudCC.js} +1 -1
- package/dist/{number-klG94_wm.js → number-BbQQzzRA.js} +1 -1
- package/dist/objectid-kWi62XJQ.js +145 -0
- package/dist/{plugins-2py5EcqG.js → plugins-UfVjLlr4.js} +3 -3
- package/dist/remy-Qz_pNsUS.js +13 -0
- package/dist/{reward-CE9z-Us7.js → reward-1G2M5tgv.js} +1 -1
- package/dist/{rule-BKNHxNrQ.js → rule-DHHGjLt5.js} +3 -3
- package/dist/rule-builder-CgNmvg5o.js +126 -0
- package/dist/{template-C9yNa_0m.js → template-Ckva65hw.js} +6 -6
- package/dist/timezone-Ddve0ese.js +20 -0
- package/dist/transaction.fn-7n5XLxfA.js +64 -0
- package/dist/{trigger-Dk0tAyDv.js → trigger-F-XaDRpc.js} +14 -14
- package/dist/useMarketingMaterialActions-DIhnstdO.js +96 -0
- package/dist/{usePagination-cF1F_1NH.js → usePagination-C0TcC_Lo.js} +1 -1
- package/dist/{user-CNPPoxKh.js → user-DeuI7T2e.js} +1 -1
- package/dist/{vue-i18n-Bk_KpCO_.js → vue-i18n-DRrphfc1.js} +191 -191
- package/dist/{xlsx-D3muGzk7.js → xlsx-DaY_eyt1.js} +440 -440
- package/dist/{zod-D72USJGr.js → zod-BDdpK5Gp.js} +1 -1
- package/package.json +5 -3
- package/dist/Card-P7MqKEDT.js +0 -910
- package/dist/Credit-Dp5P2k79.js +0 -260
- package/dist/Game-CNSbh93g.js +0 -330
- package/dist/LoyaltyDashboard-Go9ClMrp.js +0 -1082
- package/dist/MainLayout-Dyw9Qqvh.js +0 -41
- package/dist/Member-DKXzaqlL.js +0 -280
- package/dist/MemberList-BJ5nI3Nz.js +0 -1601
- package/dist/Mission-BvHArY3W.js +0 -334
- package/dist/Point-BR0R03i6.js +0 -262
- package/dist/Promotion-DofFeR2N.js +0 -397
- package/dist/Review-7tFJOnrt.js +0 -1076
- package/dist/ReviewFacebookCallback-yl0w_vF9.js +0 -243
- package/dist/ReviewGoogleCallback-Dn_aF2ZD.js +0 -208
- package/dist/Store-U1jysb7b.js +0 -1996
- package/dist/Transaction-Bj6bSo8R.js +0 -39
- package/dist/campaign-Cxp-DOCG.js +0 -219
- package/dist/index-BQ8XZk2Y.js +0 -85
- package/dist/index-KmCk2ksK.js +0 -52
- package/dist/objectid-C4ak1ctJ.js +0 -145
- package/dist/useMarketingMaterialActions-BiXkdMcs.js +0 -107
package/dist/app.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref as i, computed as u } from "vue";
|
|
2
2
|
import { defineStore as w } from "pinia";
|
|
3
3
|
import { useCoreStore as y } from "@feedmepos/mf-common";
|
|
4
|
-
import {
|
|
4
|
+
import { d as I, g as r, A as b, S, b as D } from "./index-BsAuvfaE.js";
|
|
5
5
|
const $ = {
|
|
6
6
|
async readSettings(e) {
|
|
7
7
|
try {
|
|
@@ -37,11 +37,11 @@ const $ = {
|
|
|
37
37
|
}
|
|
38
38
|
}, h = w("mf-connect-business", () => {
|
|
39
39
|
const e = i("v2"), t = i(!1), a = i([]), c = i([]);
|
|
40
|
-
async function
|
|
40
|
+
async function d() {
|
|
41
41
|
const n = y().currentBusiness.value, s = await $.readSettings(n == null ? void 0 : n.id);
|
|
42
42
|
return t.value = s && "business" in s && s.premium == !0 || !1, e.value = (s == null ? void 0 : s.apiVersion) || "v1", t.value;
|
|
43
43
|
}
|
|
44
|
-
async function
|
|
44
|
+
async function v() {
|
|
45
45
|
return a.value = await l.read(), a.value;
|
|
46
46
|
}
|
|
47
47
|
async function p() {
|
|
@@ -67,8 +67,8 @@ const $ = {
|
|
|
67
67
|
locations: a,
|
|
68
68
|
locationDevices: c,
|
|
69
69
|
// actions
|
|
70
|
-
readPremium:
|
|
71
|
-
readLocations:
|
|
70
|
+
readPremium: d,
|
|
71
|
+
readLocations: v,
|
|
72
72
|
readLocationDevices: p,
|
|
73
73
|
locationById: m,
|
|
74
74
|
// getters
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { defineStore as d } from "pinia";
|
|
2
|
+
import { reactive as b, onMounted as f, ref as s } from "vue";
|
|
3
|
+
import { c } from "./index-BmAoVlN8.js";
|
|
4
|
+
import { g as i, S as g, b as h } from "./index-BsAuvfaE.js";
|
|
5
|
+
const p = () => {
|
|
6
|
+
const e = g.getBusinessId();
|
|
7
|
+
if (!e) throw new Error("Invalid business ID");
|
|
8
|
+
return h(`businesses/${e}/campaigns`, {
|
|
9
|
+
noIdRequired: !0
|
|
10
|
+
});
|
|
11
|
+
}, I = {
|
|
12
|
+
async readAll() {
|
|
13
|
+
return i(await p().get("templates"));
|
|
14
|
+
},
|
|
15
|
+
async readById(e) {
|
|
16
|
+
return i(
|
|
17
|
+
await p().get(`templates/${e}`)
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
}, A = d("mf-connect-campaign", () => {
|
|
21
|
+
const e = b({
|
|
22
|
+
promotion: [],
|
|
23
|
+
voucher: [],
|
|
24
|
+
broadcast: [],
|
|
25
|
+
experience: [],
|
|
26
|
+
point: [],
|
|
27
|
+
credit: [],
|
|
28
|
+
token: [],
|
|
29
|
+
mission: [],
|
|
30
|
+
grab: [],
|
|
31
|
+
all: []
|
|
32
|
+
});
|
|
33
|
+
f(() => {
|
|
34
|
+
console.log("🔧 CampaignStore Installed");
|
|
35
|
+
});
|
|
36
|
+
const t = s([]), r = s([]), n = s([]);
|
|
37
|
+
async function u(k) {
|
|
38
|
+
const o = await c.readAll({
|
|
39
|
+
limit: 1e3,
|
|
40
|
+
skip: 0,
|
|
41
|
+
sortBy: "_id",
|
|
42
|
+
descending: !0
|
|
43
|
+
});
|
|
44
|
+
Object.keys(e).forEach((a) => {
|
|
45
|
+
e[a] = [];
|
|
46
|
+
}), e.all = o.resources.filter(
|
|
47
|
+
(a) => a.type !== "MEMBERSHIP"
|
|
48
|
+
);
|
|
49
|
+
for (const a of o.resources)
|
|
50
|
+
switch (a.type) {
|
|
51
|
+
case "PROMOTION":
|
|
52
|
+
e.promotion.push(a);
|
|
53
|
+
break;
|
|
54
|
+
case "VOUCHER":
|
|
55
|
+
e.voucher.push(a), n.value.push(a);
|
|
56
|
+
break;
|
|
57
|
+
case "BROADCAST":
|
|
58
|
+
["SCHEDULE", "FEEDBACK"].includes(a.event.type) && e.broadcast.push(a);
|
|
59
|
+
break;
|
|
60
|
+
case "POINT":
|
|
61
|
+
e.experience.push(a);
|
|
62
|
+
break;
|
|
63
|
+
case "COIN":
|
|
64
|
+
e.point.push(a);
|
|
65
|
+
break;
|
|
66
|
+
case "CREDIT":
|
|
67
|
+
e.credit.push(a);
|
|
68
|
+
break;
|
|
69
|
+
case "GAME":
|
|
70
|
+
e.token.push(a);
|
|
71
|
+
break;
|
|
72
|
+
case "MISSION":
|
|
73
|
+
e.mission.push(a);
|
|
74
|
+
break;
|
|
75
|
+
case "GRAB":
|
|
76
|
+
e.grab.push(a);
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
async function l() {
|
|
81
|
+
r.value = await c.readGroups();
|
|
82
|
+
}
|
|
83
|
+
async function m() {
|
|
84
|
+
t.value = await I.readAll();
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
// State
|
|
88
|
+
campaigns: e,
|
|
89
|
+
templates: t,
|
|
90
|
+
groups: r,
|
|
91
|
+
voucher: n,
|
|
92
|
+
// Actions
|
|
93
|
+
read: u,
|
|
94
|
+
readGroups: l,
|
|
95
|
+
readTemplates: m
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
export {
|
|
99
|
+
A as u
|
|
100
|
+
};
|
|
@@ -1,67 +1,45 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./index-
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { u as C } from "./business-IZLJeLD-.js";
|
|
10
|
-
import { C as m } from "./campaign.fn-BIFWlQvS.js";
|
|
1
|
+
import { h as i } from "./moment-D7p2TMB-.js";
|
|
2
|
+
import "./index-DdV1nasM.js";
|
|
3
|
+
import { e as p } from "./effect-BBSG58dq.js";
|
|
4
|
+
import { components as f } from "@feedmepos/ui-library";
|
|
5
|
+
import { i as y } from "./rule-builder-CgNmvg5o.js";
|
|
6
|
+
import { c as h } from "./rule-DHHGjLt5.js";
|
|
7
|
+
import { u as O } from "./business-D_ksG_j8.js";
|
|
8
|
+
import { C as m } from "./campaign.fn-DeQTMPoH.js";
|
|
11
9
|
import { c as g } from "./string-Gcy5IM_H.js";
|
|
12
|
-
import { i as d } from "./plugins-
|
|
13
|
-
import { h as
|
|
14
|
-
import { F as a } from "./campaign.enum-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
case "PROMOTION":
|
|
18
|
-
return "Promotion";
|
|
19
|
-
case "VOUCHER":
|
|
20
|
-
return "Voucher";
|
|
21
|
-
case "CREDIT":
|
|
22
|
-
return "Credit";
|
|
23
|
-
case "POINT":
|
|
24
|
-
return "Experience";
|
|
25
|
-
case "COIN":
|
|
26
|
-
return "Point";
|
|
27
|
-
case "GAME":
|
|
28
|
-
return "Game";
|
|
29
|
-
default:
|
|
30
|
-
return e;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
const G = {
|
|
34
|
-
formattedType: E
|
|
35
|
-
}, o = d.global.t;
|
|
36
|
-
function I() {
|
|
10
|
+
import { i as d } from "./plugins-UfVjLlr4.js";
|
|
11
|
+
import { h as s } from "vue";
|
|
12
|
+
import { F as a } from "./campaign.enum-k3u4N6yI.js";
|
|
13
|
+
const n = d.global.t;
|
|
14
|
+
function C() {
|
|
37
15
|
const e = d.global.locale;
|
|
38
16
|
return typeof e == "string" ? e : e.value;
|
|
39
17
|
}
|
|
40
18
|
function u(e) {
|
|
41
|
-
return new Intl.DateTimeFormat(
|
|
19
|
+
return new Intl.DateTimeFormat(C(), {
|
|
42
20
|
day: "2-digit",
|
|
43
21
|
month: "short",
|
|
44
22
|
year: "numeric"
|
|
45
23
|
}).format(new Date(e));
|
|
46
24
|
}
|
|
47
25
|
function c(e) {
|
|
48
|
-
return
|
|
26
|
+
return s(
|
|
49
27
|
"div",
|
|
50
28
|
{
|
|
51
29
|
class: `${e.chipClass} gap-4 h-[22px] inline-flex items-center justify-center min-w-min px-8 rounded-md`
|
|
52
30
|
},
|
|
53
31
|
[
|
|
54
|
-
|
|
55
|
-
|
|
32
|
+
s(f.FmIcon, { size: "sm", name: e.icon, outline: !0 }),
|
|
33
|
+
s("span", { class: "fm-typo-en-body-md-600" }, e.name)
|
|
56
34
|
]
|
|
57
35
|
);
|
|
58
36
|
}
|
|
59
|
-
const
|
|
37
|
+
const P = {
|
|
60
38
|
[a.enum.CREDIT]: {
|
|
61
39
|
chipClass: "!text-fm-color-secondary-plum !bg-[#f2ebfe]",
|
|
62
40
|
icon: "local_activity",
|
|
63
41
|
get name() {
|
|
64
|
-
return
|
|
42
|
+
return n("connect.campaign.common.typeName.CREDIT");
|
|
65
43
|
},
|
|
66
44
|
chip() {
|
|
67
45
|
return c(this);
|
|
@@ -71,7 +49,7 @@ const H = {
|
|
|
71
49
|
chipClass: "!text-fm-color-secondary-citrus !bg-fm-color-system-warning-100",
|
|
72
50
|
icon: "loyalty",
|
|
73
51
|
get name() {
|
|
74
|
-
return
|
|
52
|
+
return n("connect.campaign.common.typeName.PROMOTION");
|
|
75
53
|
},
|
|
76
54
|
chip() {
|
|
77
55
|
return c(this);
|
|
@@ -81,7 +59,7 @@ const H = {
|
|
|
81
59
|
chipClass: "!text-fm-color-secondary-halite !bg-[#fff0f6]",
|
|
82
60
|
icon: "sell",
|
|
83
61
|
get name() {
|
|
84
|
-
return
|
|
62
|
+
return n("connect.campaign.common.typeName.VOUCHER");
|
|
85
63
|
},
|
|
86
64
|
chip() {
|
|
87
65
|
return c(this);
|
|
@@ -91,7 +69,7 @@ const H = {
|
|
|
91
69
|
chipClass: "!text-fm-color-secondary-cocoa !bg-[#fff9e6]",
|
|
92
70
|
icon: "award_star",
|
|
93
71
|
get name() {
|
|
94
|
-
return
|
|
72
|
+
return n("connect.campaign.common.typeName.POINT");
|
|
95
73
|
},
|
|
96
74
|
chip() {
|
|
97
75
|
return c(this);
|
|
@@ -101,7 +79,7 @@ const H = {
|
|
|
101
79
|
chipClass: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
|
|
102
80
|
icon: "campaign",
|
|
103
81
|
get name() {
|
|
104
|
-
return
|
|
82
|
+
return n("connect.campaign.common.typeName.BROADCAST");
|
|
105
83
|
},
|
|
106
84
|
chip() {
|
|
107
85
|
return c(this);
|
|
@@ -111,7 +89,7 @@ const H = {
|
|
|
111
89
|
chipClass: "!text-fm-color-secondary-mint !bg-fm-color-system-success-100",
|
|
112
90
|
icon: "database",
|
|
113
91
|
get name() {
|
|
114
|
-
return
|
|
92
|
+
return n("connect.campaign.common.typeName.GAME");
|
|
115
93
|
},
|
|
116
94
|
chip() {
|
|
117
95
|
return c(this);
|
|
@@ -121,7 +99,7 @@ const H = {
|
|
|
121
99
|
chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
|
|
122
100
|
icon: "editor_choice",
|
|
123
101
|
get name() {
|
|
124
|
-
return
|
|
102
|
+
return n("connect.campaign.common.typeName.REWARD_POOL");
|
|
125
103
|
},
|
|
126
104
|
chip() {
|
|
127
105
|
return c(this);
|
|
@@ -131,7 +109,7 @@ const H = {
|
|
|
131
109
|
chipClass: "!text-fm-color-system-success-400 !bg-fm-color-system-success-100",
|
|
132
110
|
icon: "monetization_on",
|
|
133
111
|
get name() {
|
|
134
|
-
return
|
|
112
|
+
return n("connect.campaign.common.typeName.COIN");
|
|
135
113
|
},
|
|
136
114
|
chip() {
|
|
137
115
|
return c(this);
|
|
@@ -141,7 +119,7 @@ const H = {
|
|
|
141
119
|
chipClass: "",
|
|
142
120
|
icon: "",
|
|
143
121
|
get name() {
|
|
144
|
-
return
|
|
122
|
+
return n("connect.campaign.common.typeName.MEMBERSHIP");
|
|
145
123
|
},
|
|
146
124
|
chip() {
|
|
147
125
|
return c(this);
|
|
@@ -151,7 +129,7 @@ const H = {
|
|
|
151
129
|
chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
|
|
152
130
|
icon: "editor_choice",
|
|
153
131
|
get name() {
|
|
154
|
-
return
|
|
132
|
+
return n("connect.campaign.common.typeName.MISSION");
|
|
155
133
|
},
|
|
156
134
|
chip() {
|
|
157
135
|
return c(this);
|
|
@@ -166,87 +144,87 @@ const H = {
|
|
|
166
144
|
}
|
|
167
145
|
}
|
|
168
146
|
};
|
|
169
|
-
function
|
|
170
|
-
const t =
|
|
147
|
+
function L(e) {
|
|
148
|
+
const t = b(e), o = {
|
|
171
149
|
active: "text-fm-color-typo-success bg-fm-color-system-success-100",
|
|
172
150
|
upcoming: "text-fm-color-typo-info bg-fm-color-system-info-100",
|
|
173
151
|
expired: "text-fm-color-typo-error bg-fm-color-system-error-100"
|
|
174
152
|
};
|
|
175
|
-
return e.type == "VOUCHER" ?
|
|
176
|
-
class:
|
|
177
|
-
label: g.title(
|
|
153
|
+
return e.type == "VOUCHER" ? s(f.FmChip, {
|
|
154
|
+
class: o[t],
|
|
155
|
+
label: g.title(n(`connect.campaign.common.status.${t}`)),
|
|
178
156
|
compact: !0
|
|
179
|
-
}) :
|
|
180
|
-
class:
|
|
181
|
-
label: g.title(
|
|
157
|
+
}) : s(f.FmChip, {
|
|
158
|
+
class: o[t],
|
|
159
|
+
label: g.title(n(`connect.campaign.common.status.${t}`)),
|
|
182
160
|
compact: !0
|
|
183
161
|
});
|
|
184
162
|
}
|
|
185
|
-
function
|
|
163
|
+
function w(e) {
|
|
186
164
|
const t = e.timeframeOptions;
|
|
187
165
|
if (!t || !t.start && !t.end)
|
|
188
|
-
return
|
|
166
|
+
return n("connect.campaign.common.always_active");
|
|
189
167
|
if (!t.start && t.end)
|
|
190
|
-
return
|
|
168
|
+
return n("connect.campaign.common.valid_until", {
|
|
191
169
|
date: u(t.end)
|
|
192
170
|
});
|
|
193
|
-
const
|
|
194
|
-
return `${
|
|
171
|
+
const o = u(t.start), r = t.end ? u(t.end) : n("connect.campaign.common.unlimited");
|
|
172
|
+
return `${o} -> ${r}`;
|
|
195
173
|
}
|
|
196
|
-
function
|
|
174
|
+
function E(e) {
|
|
175
|
+
if (!e || !e.start && !e.end)
|
|
176
|
+
return "connect.campaign.common.always";
|
|
177
|
+
const t = e.start ? i(e.start).format("DD MMM YYYY") : "From campaign creation", o = e.end ? i(e.end).format("DD MMM YYYY") : "Never ends";
|
|
178
|
+
return `${t} - ${o}`;
|
|
179
|
+
}
|
|
180
|
+
function Y(e) {
|
|
197
181
|
const { campaign: t } = e;
|
|
198
|
-
function r(n) {
|
|
199
|
-
if (!n || !n.start && !n.end)
|
|
200
|
-
return "connect.campaign.common.always";
|
|
201
|
-
const i = n.start ? u(n.start) : "From campaign creation", y = n.end ? u(n.end) : "Never ends";
|
|
202
|
-
return `${i} - ${y}`;
|
|
203
|
-
}
|
|
204
182
|
return {
|
|
205
183
|
"connect.campaign.common.campaign_name": t.name,
|
|
206
|
-
"connect.campaign.common.campaign_period":
|
|
184
|
+
"connect.campaign.common.campaign_period": E(
|
|
207
185
|
t.timeframeOptions
|
|
208
186
|
),
|
|
209
187
|
get "connect.campaign.common.next_schedule_at"() {
|
|
210
|
-
if ((t == null ? void 0 : t.event.type) != "SCHEDULE" || !t.event.rule || !
|
|
188
|
+
if ((t == null ? void 0 : t.event.type) != "SCHEDULE" || !t.event.rule || !y(t.event.rule))
|
|
211
189
|
return;
|
|
212
|
-
const
|
|
190
|
+
const o = h(
|
|
213
191
|
t.event.rule.rules.g_schedule
|
|
214
192
|
);
|
|
215
|
-
return
|
|
193
|
+
return o ? i(o).format("ddd, DD MMM YYYY, hh:mmA") : void 0;
|
|
216
194
|
},
|
|
217
195
|
get "connect.campaign.common.discount_type"() {
|
|
218
|
-
if (t.type == "PROMOTION") return
|
|
196
|
+
if (t.type == "PROMOTION") return p(t.effect);
|
|
219
197
|
if ("configs" in e && e.configs.type == "VOUCHER")
|
|
220
|
-
return
|
|
198
|
+
return p(e.configs.extras.effect);
|
|
221
199
|
},
|
|
222
200
|
get "connect.campaign.common.available_at"() {
|
|
223
201
|
return t.targetLocation ? t.targetLocation.length > 0 ? t.targetLocation.map(
|
|
224
|
-
(
|
|
202
|
+
(o) => O().locationItems.find((r) => r.value == o).label
|
|
225
203
|
).join(",") : "connect.campaign.common.no_location" : "connect.campaign.common.all_locations";
|
|
226
204
|
}
|
|
227
205
|
};
|
|
228
206
|
}
|
|
229
|
-
function
|
|
230
|
-
return e.timeframeOptions && e.timeframeOptions.type == "timeframe" ?
|
|
231
|
-
e.timeframeOptions.start ??
|
|
232
|
-
e.timeframeOptions.end ??
|
|
233
|
-
) ? "active" :
|
|
207
|
+
function b(e) {
|
|
208
|
+
return e.timeframeOptions && e.timeframeOptions.type == "timeframe" ? i().isBetween(
|
|
209
|
+
e.timeframeOptions.start ?? i().subtract(1, "d"),
|
|
210
|
+
e.timeframeOptions.end ?? i().add(1, "d")
|
|
211
|
+
) ? "active" : i().isAfter(e.timeframeOptions.end) ? "expired" : "upcoming" : "active";
|
|
234
212
|
}
|
|
235
|
-
function
|
|
236
|
-
var t,
|
|
213
|
+
function B(e) {
|
|
214
|
+
var t, o;
|
|
237
215
|
switch (e.event.type) {
|
|
238
216
|
case "BILL_COMPLETED":
|
|
239
|
-
const
|
|
217
|
+
const r = `Spend to get ${m.formattedType(e.type)}`;
|
|
240
218
|
switch (e.type) {
|
|
241
219
|
case "POINT":
|
|
242
220
|
case "CREDIT":
|
|
243
221
|
case "COIN":
|
|
244
222
|
return e.earningOption.type == "FIXED" ? `Spend to get ${e.earningOption.amount} ${m.formattedType(e.type)}` : `Every ${e.earningOption.every} amount spent get ${e.earningOption.amount} ${m.formattedType(e.type)}`;
|
|
245
223
|
case "VOUCHER":
|
|
246
|
-
const
|
|
247
|
-
return
|
|
224
|
+
const l = (o = (t = e == null ? void 0 : e.pf_collectible) == null ? void 0 : t.extras) == null ? void 0 : o.effect;
|
|
225
|
+
return l ? `${r} - ${p(l)}` : r;
|
|
248
226
|
default:
|
|
249
|
-
return
|
|
227
|
+
return r;
|
|
250
228
|
}
|
|
251
229
|
case "FEEDBACK":
|
|
252
230
|
return `Give feedback to receive ${m.formattedType(e.type)}`;
|
|
@@ -259,7 +237,7 @@ function V(e) {
|
|
|
259
237
|
case "MEMBERSHIP_JOINED":
|
|
260
238
|
return `Receive ${m.formattedType(e.type)} when member joined`;
|
|
261
239
|
case "MAKING_ORDER":
|
|
262
|
-
return e.type !== "PROMOTION" ? void 0 :
|
|
240
|
+
return e.type !== "PROMOTION" ? void 0 : p(e.effect);
|
|
263
241
|
default:
|
|
264
242
|
throw new Error(
|
|
265
243
|
`Not implemented ${JSON.stringify({ cause: e.event.type })}`
|
|
@@ -267,11 +245,11 @@ function V(e) {
|
|
|
267
245
|
}
|
|
268
246
|
}
|
|
269
247
|
export {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
248
|
+
P as C,
|
|
249
|
+
b as a,
|
|
250
|
+
L as b,
|
|
251
|
+
B as c,
|
|
252
|
+
Y as d,
|
|
253
|
+
w as g,
|
|
254
|
+
E as s
|
|
277
255
|
};
|