@feedmepos/mf-connect 0.1.98-beta.3 → 0.1.98-beta.30
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-DEtGn29M.js → App-DUpK_Q7f.js} +808 -665
- package/dist/{AuditLogs-Mrm0iq9P.js → AuditLogs-DWYbj4lo.js} +9 -9
- package/dist/{Bin-D9Pu0L6h.js → Bin-DieOnDz0.js} +8 -8
- package/dist/{Broadcast-BZDQtN8x.js → Broadcast-UQ-vMYLl.js} +39 -36
- package/dist/CampaignAnalytic-CfvtyBoa.js +1656 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bxlbz-JW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CuJWOZ3o.js} +6 -5
- package/dist/{Card-BdMSuxr4.js → Card-Te7LGbdC.js} +18 -18
- package/dist/{Collections-D2IOFKrJ.js → Collections-C-QeTQej.js} +14 -13
- package/dist/Credit-B459_0Nt.js +286 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-jmfMQG79.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Dp3i8kku.js} +34 -30
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BYQDCpXN.js → EffectSheet.vue_vue_type_style_index_0_lang-XgrUL64F.js} +6 -6
- package/dist/{Experience-Dm5TDsKH.js → Experience-BUiwaqiZ.js} +112 -86
- package/dist/{FileSaver.min-G6JMp965.js → FileSaver.min-BBLnxnqN.js} +1 -1
- package/dist/Game-iOJbGiNe.js +356 -0
- package/dist/{Grab-BXfBhrCM.js → Grab-bC6BeXxc.js} +32 -31
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-C7EIMTui.js → ImageInput.vue_vue_type_script_setup_true_lang-eiJJrTiu.js} +1 -1
- package/dist/{Index-DfPPobH8.js → Index-Utb2MWAQ.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Cpx1HMpd.js → LocationPicker.vue_vue_type_script_setup_true_lang-B7iWGh2L.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Csse-q2U.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CppfUz1y.js} +1 -1
- package/dist/LoyaltyDashboard-BHSHnBpi.js +1345 -0
- package/dist/{MainLayout-DxAYEJg1.js → MainLayout-DMqkiGFT.js} +1 -1
- package/dist/{Marketing-CPQQG8Y9.js → Marketing-DGfDqW7v.js} +4 -4
- package/dist/{MarketingMaterialEdit-ssilnzNw.js → MarketingMaterialEdit-p5QBPd83.js} +6 -6
- package/dist/{Member-DmoUk3Dx.js → Member-C2KIOib-.js} +11 -11
- package/dist/{MemberList-Cm2BWPrW.js → MemberList-Esp9384f.js} +36 -35
- package/dist/{MemberTransactions-Cxr87RMl.js → MemberTransactions-CKYG04pY.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DpUg4Uwi.js → MessageInput.vue_vue_type_script_setup_true_lang-CItc3B3N.js} +5434 -5279
- package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +38 -0
- package/dist/Mission-BlckuFfz.js +360 -0
- package/dist/{Overview-CfigslHq.js → Overview-B5PSmDQr.js} +18 -18
- package/dist/Overview-suva6hd8.js +1104 -0
- package/dist/Point-CVexYech.js +288 -0
- package/dist/Promotion-VW7rqIn-.js +423 -0
- package/dist/{Queue-B7kxDPZV.js → Queue-Dh4C5OO9.js} +12 -12
- package/dist/{Record-BGULqygn.js → Record-CYGrQ_Cb.js} +9 -9
- package/dist/Review-mxbjxTB1.js +45 -0
- package/dist/ReviewFacebookCallback-C-pSgxeh.js +238 -0
- package/dist/ReviewGoogleCallback-CnNbGQdM.js +213 -0
- package/dist/{Reward-C0w5c1Th.js → Reward-CQ8AgV1m.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CspVlyRZ.js → RewardGroup.vue_vue_type_script_setup_true_lang-DxaejEKe.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-QYsK7vE4.js → RuleGroup.vue_vue_type_script_setup_true_lang-CxHheatc.js} +16 -15
- package/dist/{Segment-I_p06AoA.js → Segment-Crm395ad.js} +39 -37
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DV79EJm9.js → SelectItems.vue_vue_type_script_setup_true_lang-CnA8A--R.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CUwwzTTV.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dd-mYmBN.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D2Nv32U5.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DgkPQA3H.js} +4 -4
- package/dist/{Setting-DOMSAMUz.js → Setting-AKRWf4zD.js} +40 -40
- package/dist/{SettingAdvertisements-IeGC6PHz.js → SettingAdvertisements-DD9U8S6N.js} +12 -12
- package/dist/Settings-D7c8sBA8.js +179 -0
- package/dist/{Store-DLzj0qGi.js → Store-BN3RP_u-.js} +21 -21
- package/dist/{StoreRewards-BPhAkGNl.js → StoreRewards-BXc96ZMM.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DpcaOgdN.js → StoreTransactions.vue_vue_type_script_setup_true_lang-B76NSzNg.js} +190 -187
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DUdAxdEO.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DnhMV2aq.js} +2 -2
- package/dist/{Tier-7MveQA4f.js → Tier-Bbktc4H8.js} +36 -34
- package/dist/{Title-kyAzLGqm.js → Title-BU8pzF9c.js} +39 -37
- package/dist/{Transaction-Chl3d3Ai.js → Transaction-B3_M0MMz.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CZsaFtae.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DtFoQXUu.js} +6 -6
- package/dist/{Voucher-CxIPPul5.js → Voucher-CJruHWmd.js} +156 -133
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BntA1IAx.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DzIQ_1Nb.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CiOmadge.js → ZodTextField.vue_vue_type_script_setup_true_lang-Lq5Z_Glg.js} +2 -2
- package/dist/{app-5YllsPJi.js → app-CmK_zWVU.js} +3356 -2864
- package/dist/app.js +1 -1
- package/dist/{business-C0zArPJj.js → business-Br3Sboxg.js} +1 -1
- package/dist/campaign-53KorSW_.js +100 -0
- package/dist/{campaign-BHl5a5Z1.js → campaign-Dz57HOfP.js} +74 -96
- package/dist/{campaign.enum-CHWTkc9k.js → campaign.enum-Dx-Zo68Q.js} +1 -1
- package/dist/{campaign.fn-BtwnAETQ.js → campaign.fn-D-J5-IK0.js} +127 -127
- package/dist/{collectible.enum-BvoISTK3.js → collectible.enum-Liy2wH3s.js} +1 -1
- package/dist/collection.fn-cEP4Vjv6.js +26 -0
- package/dist/{duplicateCampaign-C27ikU2f.js → duplicateCampaign-bBnEmbXg.js} +2 -2
- package/dist/{effect-CARgKjhU.js → effect-RQs_nrvo.js} +1 -1
- package/dist/{email-addresses-CnTsfZHe.js → email-addresses-CAX-uL1B.js} +2 -2
- package/dist/{export-CO8-3Ob9.js → export-DSgRDjwv.js} +3 -3
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-C617AZcV.js → helper-DlEUDhaf.js} +1 -1
- package/dist/{index-CMfyVF2h.js → index-BA0GllA8.js} +105 -123
- package/dist/index-BHdJaRRQ.js +146 -0
- package/dist/{index-9AxeGyVh.js → index-BpXYj8xl.js} +272 -369
- package/dist/index-C8cXXcLk.js +45 -0
- package/dist/{index-Da8trM3D.js → index-CBvgQWbo.js} +1 -1
- package/dist/{index-gPrU9b68.js → index-CHmtKN0J.js} +8027 -10766
- package/dist/{index-hKv7PcTR.js → index-CJ0Ofs8g.js} +1 -1
- package/dist/{index-CFO8nwbC.js → index-CQ40sF6g.js} +8 -7
- package/dist/index-C_H8jFYf.js +2743 -0
- package/dist/{index-DMvP3cOz.js → index-CbBnibrX.js} +184 -210
- package/dist/{index-DIcwj1r2.js → index-Cm4hBY6K.js} +1 -1
- package/dist/{index-CtXx42Yb.js → index-D3obFXMZ.js} +1 -1
- package/dist/{index-B0BE7PIS.js → index-DJQCoy-g.js} +1 -1
- package/dist/{index-DNf6qgpV.js → index-DansV6RZ.js} +2 -2
- package/dist/{index-wL9aIsub.js → index-Dpyep_-G.js} +587 -578
- package/dist/{index-B2ZvboNZ.js → index-ZFdRmzK7.js} +1 -1
- package/dist/{index-CEJgFylS.js → index-fVWfEBZV.js} +26 -17
- package/dist/{index.esm2017-BFgbXDc8.js → index.esm2017-GDYw3ujs.js} +105 -105
- package/dist/{loading-BxpiUNaf.js → loading-CevzAqpQ.js} +1 -1
- package/dist/{lodash-rPOvq9te.js → lodash-CcmP-ZWD.js} +1 -1
- package/dist/{membership-lfX5TNVQ.js → membership-CP-ZGC-Y.js} +3 -3
- package/dist/{money-CuUoYzPn.js → money-B_CYilsX.js} +1 -1
- package/dist/{number-DMk8hvKt.js → number-CqWVPhp0.js} +1 -1
- package/dist/objectid-DkTaCd6K.js +145 -0
- package/dist/{plugins-CyYjHO_X.js → plugins-Br271boW.js} +3 -3
- package/dist/{reward-BxwaSc-X.js → reward-CKQRdG-H.js} +1 -1
- package/dist/{rule-76SluGaP.js → rule-D0Rv4CuV.js} +3 -3
- package/dist/rule-builder-BUn6UMwW.js +126 -0
- package/dist/{template-ByceGw-A.js → template-D5GB4cAl.js} +6 -6
- package/dist/timezone-DqRsL54X.js +20 -0
- package/dist/{trigger-CxM5x3Sj.js → trigger-Ci92pTJU.js} +5 -5
- package/dist/{useMarketingMaterialActions-CHXVZ61f.js → useMarketingMaterialActions-C_mu-ac8.js} +3 -3
- package/dist/{usePagination-BKfoMHBB.js → usePagination-CWQ2WXiM.js} +1 -1
- package/dist/{user-Cqjv0IpD.js → user-CeAfYeZW.js} +1 -1
- package/dist/{vue-i18n-Q-nKu_E3.js → vue-i18n-P_SZNhrt.js} +419 -419
- package/dist/{xlsx-D1LobU8O.js → xlsx-CTo0cmDn.js} +1 -1
- package/dist/{zod-B5vUvKbD.js → zod-CPa57Pxb.js} +1 -1
- package/package.json +3 -3
- package/dist/Credit-BWyLeJpj.js +0 -260
- package/dist/Game-BB81nS7Y.js +0 -330
- package/dist/LoyaltyDashboard-BWC3rDDk.js +0 -1082
- package/dist/Mission-ChWPNxbI.js +0 -334
- package/dist/Point-Ko81Ny1q.js +0 -262
- package/dist/Promotion-CfyscRNN.js +0 -397
- package/dist/Review-C7Nx6a5t.js +0 -959
- package/dist/ReviewFacebookCallback-DKmL0TYZ.js +0 -243
- package/dist/ReviewGoogleCallback-C6iFFEfS.js +0 -208
- package/dist/campaign-C_49MeEc.js +0 -219
- package/dist/objectid-VPzb0Etb.js +0 -145
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 { a as I, g as r, A as b, S, b as D } from "./index-
|
|
4
|
+
import { a as I, g as r, A as b, S, b as D } from "./index-DansV6RZ.js";
|
|
5
5
|
const $ = {
|
|
6
6
|
async readSettings(e) {
|
|
7
7
|
try {
|
|
@@ -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-BHdJaRRQ.js";
|
|
4
|
+
import { g as i, S as g, b as h } from "./index-DansV6RZ.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-C0zArPJj.js";
|
|
10
|
-
import { C as m } from "./campaign.fn-BtwnAETQ.js";
|
|
1
|
+
import { h as i } from "./moment-D7p2TMB-.js";
|
|
2
|
+
import "./index-CbBnibrX.js";
|
|
3
|
+
import { e as p } from "./effect-RQs_nrvo.js";
|
|
4
|
+
import { components as f } from "@feedmepos/ui-library";
|
|
5
|
+
import { i as y } from "./rule-builder-BUn6UMwW.js";
|
|
6
|
+
import { c as h } from "./rule-D0Rv4CuV.js";
|
|
7
|
+
import { u as O } from "./business-Br3Sboxg.js";
|
|
8
|
+
import { C as m } from "./campaign.fn-D-J5-IK0.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-Br271boW.js";
|
|
11
|
+
import { h as s } from "vue";
|
|
12
|
+
import { F as a } from "./campaign.enum-Dx-Zo68Q.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
|
};
|