@feedmepos/mf-connect 0.1.98-beta.6 → 0.1.98-beta.61
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-CvJ0ASlp.js → App-BPFhGsvV.js} +812 -666
- package/dist/{AuditLogs-Bt9S2LKL.js → AuditLogs-CW8vs5kM.js} +14 -13
- package/dist/{Bin-ZSCDSioa.js → Bin-CgdkmL0M.js} +8 -8
- package/dist/Broadcast-CoRRvfXh.js +302 -0
- package/dist/CampaignAnalytic-UAwVz0E3.js +1830 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-LweQ57aG.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B_IbtQLp.js} +6 -5
- package/dist/Card-D3-MgguK.js +1084 -0
- package/dist/{Collections-H7zhe9zN.js → Collections-BU7-Lz_-.js} +14 -13
- package/dist/Credit-C9gf6eCr.js +286 -0
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-UK9GcPFC.js +53 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-B9A98JpX.js +4213 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-qNmiKaJc.js → EffectSheet.vue_vue_type_style_index_0_lang-nKD6CT3U.js} +35 -35
- package/dist/{Experience-CH5tg-tm.js → Experience-dKvKT4v4.js} +112 -86
- package/dist/{FileSaver.min-DNFqiyZb.js → FileSaver.min-CI8hZvUL.js} +1 -1
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
- package/dist/Game-CBjdeb6F.js +356 -0
- package/dist/GiftCardSetup-DA9yMwPR.js +662 -0
- package/dist/{Grab-3s_sLewD.js → Grab-zCeZMSNI.js} +33 -32
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-fbmoN1e9.js → ImageInput.vue_vue_type_script_setup_true_lang-CxhlYuM9.js} +1 -1
- package/dist/{Index-zTWZCiEo.js → Index-UGpjUfjV.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BOxYPkf5.js → LocationPicker.vue_vue_type_script_setup_true_lang-D21fIVUX.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-wjJ_cwft.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DrB7xzy1.js} +1 -1
- package/dist/LoyaltyDashboard-CBPnQReU.js +2865 -0
- package/dist/MainLayout-BBJUWsAz.js +143 -0
- package/dist/{Marketing-Bto1OvK1.js → Marketing-BjQG6Q41.js} +7 -6
- package/dist/{MarketingMaterialEdit-D7rIqF5U.js → MarketingMaterialEdit-CMUbiKjd.js} +15 -14
- package/dist/Member-B-7tGoFW.js +649 -0
- package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-BLmafK0n.js +1287 -0
- package/dist/MemberImportHistory-CDyHKO1L.js +187 -0
- package/dist/MemberList-f0dMdOF8.js +336 -0
- package/dist/{MemberTransactions-CjTtGB2y.js → MemberTransactions-DVcRoyxv.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DvKL7BL5.js → MessageInput.vue_vue_type_script_setup_true_lang-CnpXUVvO.js} +5682 -5479
- package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BTBXutpq.js +40 -0
- package/dist/Mission-CrrXaD8F.js +360 -0
- package/dist/{Overview-mxGLyFvE.js → Overview-CAIxshHU.js} +21 -20
- package/dist/Overview-Y_hxLN7Y.js +1316 -0
- package/dist/Point-CE0G4oxW.js +288 -0
- package/dist/Promotion-C_NQWWOT.js +423 -0
- package/dist/{Queue-DgaFyyyH.js → Queue-BfZGOOsa.js} +14 -13
- package/dist/{Record-BRol__6_.js → Record-BR3Su26B.js} +9 -9
- package/dist/Review-FrIgV7vH.js +45 -0
- package/dist/ReviewFacebookCallback-DOyee73-.js +238 -0
- package/dist/ReviewGoogleCallback-CX0cbT4r.js +213 -0
- package/dist/{Reward-DQI0PvmR.js → Reward-COkgkVT-.js} +35 -35
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-B6bvQNsU.js → RewardGroup.vue_vue_type_script_setup_true_lang-CUd-Gy5a.js} +14 -13
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DgAU7jGo.js → RuleGroup.vue_vue_type_script_setup_true_lang-eBVDv0Qy.js} +103 -109
- package/dist/{Segment-DFaLx0QZ.js → Segment-kh3FuWRP.js} +30 -29
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Cpb2i9iV.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CUoiQlba.js} +31 -30
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-MvoepHn9.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BkylJ859.js} +4 -4
- package/dist/{Setting-D2NjFJvq.js → Setting-UDrEIdF9.js} +14 -14
- package/dist/{SettingAdvertisements-CPWgSMaA.js → SettingAdvertisements-Dic4fC0u.js} +12 -12
- package/dist/Settings-Ct_ESMn8.js +230 -0
- package/dist/Store-CyG1FPWq.js +2612 -0
- package/dist/{StoreRewards-Ccj12pyq.js → StoreRewards-C9b_rMRT.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DaGFayps.js +1329 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CfWTn0Xd.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Dew6rC4d.js} +2 -2
- package/dist/{Tier-vaJoohiM.js → Tier-DgLEHrFJ.js} +2296 -750
- package/dist/{Title-BqHC7-v9.js → Title-C_8gMnYS.js} +39 -37
- package/dist/Transaction-B9E0jWw9.js +45 -0
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Dporb9KE.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DgW4dSkV.js} +26 -26
- package/dist/{Voucher-DeN6C6DQ.js → Voucher-DR3Eteh4.js} +156 -133
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-De16fuC4.js → VoucherEditor.vue_vue_type_script_setup_true_lang-JexB74ky.js} +115 -121
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DAC-j0Ln.js → ZodTextField.vue_vue_type_script_setup_true_lang-ChOd_di8.js} +2 -2
- package/dist/{app-n4Y2jMee.js → app-BIjITpNJ.js} +29593 -25208
- package/dist/app.js +1 -1
- package/dist/base.export-DqZ38Nx2.js +75 -0
- package/dist/{business-jn-_l48y.js → business-j4ZuiLuJ.js} +5 -5
- package/dist/campaign-DxhXoOvw.js +100 -0
- package/dist/campaign-MS9awZ18.js +368 -0
- package/dist/{campaign.enum-C9HvoKuq.js → campaign.enum-Bk6qcWR3.js} +1 -1
- package/dist/campaign.fn-DR_X38U8.js +776 -0
- package/dist/{collectible.enum-_HVU4lWn.js → collectible.enum-C_E4CCGR.js} +1 -1
- package/dist/collection.fn-BfyWr7cC.js +26 -0
- package/dist/currency-DZzC-632.js +7 -0
- package/dist/{duplicateCampaign-gzVwrnWb.js → duplicateCampaign-BgTmR0T2.js} +11 -11
- package/dist/{effect-DhpIv1L3.js → effect-DPCjkqDR.js} +1 -1
- package/dist/{email-addresses-DPxYLSoa.js → email-addresses-BoPJkP5p.js} +209 -201
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-WYHUnHVy.js → helper-DwJK1iKj.js} +1 -1
- package/dist/{index-BPsofsGt.js → index-8vHynDvo.js} +1933 -2560
- package/dist/{index-BdqRrCt8.js → index-Bd4ErVnX.js} +5 -5
- package/dist/index-BkFxLxI6.js +137 -0
- package/dist/index-BvxBDSzh.js +72 -0
- package/dist/{index-DUTFNEn9.js → index-C5Jm1Was.js} +4 -4
- package/dist/{index-xao4ggML.js → index-CIuQyo1z.js} +5 -5
- package/dist/{index-C-5YgmkC.js → index-CMJCsyXT.js} +7 -5
- package/dist/index-CTo26AN3.js +14530 -0
- package/dist/{index-Cte6dHHy.js → index-CVMsPseO.js} +14 -14
- package/dist/{index-BdnHQSDd.js → index-CXbojcfi.js} +5 -4
- package/dist/index-Cso1GrEu.js +53 -0
- package/dist/{index-Cvfavr2M.js → index-DD24eHtV.js} +351 -216
- package/dist/index-DGOX45St.js +151 -0
- package/dist/index-DP6WMBRq.js +900 -0
- package/dist/{index-7HizF3GI.js → index-DfwXt9fy.js} +1588 -1522
- package/dist/{index--fNMSXUf.js → index-Dn2mOB0A.js} +1 -1
- package/dist/{index-BuLfxJyC.js → index-LJrZDUgh.js} +105 -123
- package/dist/{index-BN-FP9kx.js → index-a15EaBn7.js} +1 -1
- package/dist/{index.esm2017-CjzFPUCa.js → index.esm2017-CWii-ZqX.js} +164 -164
- package/dist/{loading-CojnK00V.js → loading-CibOtJVR.js} +1 -1
- package/dist/{lodash-CLkg5jTT.js → lodash-oHoQ9t6u.js} +1 -1
- package/dist/member-import-BgJP811X.js +187 -0
- package/dist/membership-CqFY6ya6.js +274 -0
- package/dist/{money-CyaLaEKo.js → money-tVvfE8ha.js} +1 -1
- package/dist/{number-DEtI4bEX.js → number-B4p37H0W.js} +1 -1
- package/dist/objectid-reVda6sT.js +145 -0
- package/dist/{plugins-MnP1vCcg.js → plugins-S4qmcyLz.js} +13 -12
- package/dist/remy-Qz_pNsUS.js +13 -0
- package/dist/{reward-Dk3D26xC.js → reward-CgHNw9uj.js} +1 -1
- package/dist/{rule-B1Agad1n.js → rule-BECsW_aD.js} +335 -275
- package/dist/style.css +1 -1
- package/dist/{template-DpqLCq1p.js → template-jOqP_F7D.js} +6 -6
- package/dist/timezone-BBXko2_m.js +20 -0
- package/dist/transaction.fn-3DOFgJNT.js +64 -0
- package/dist/{trigger-cwPN-4Ia.js → trigger-DBIaHlqi.js} +17 -17
- package/dist/useMarketingMaterialActions-Dnln39_O.js +96 -0
- package/dist/{usePagination-D8zBMxdJ.js → usePagination-BKN2uLM2.js} +1 -1
- package/dist/{user-EUGwaL2f.js → user-CTKTBdLx.js} +1 -1
- package/dist/{vue-i18n-BBj45p9N.js → vue-i18n-Di-6yoyq.js} +233 -233
- package/dist/{xlsx-DiMIlKmu.js → xlsx-Z1jRdg68.js} +584 -584
- package/dist/{zod-B1cU167C.js → zod-BmQ5EO9I.js} +1 -1
- package/package.json +6 -5
- package/dist/Broadcast-BT0R11RB.js +0 -266
- package/dist/Card-Wdh8lyUv.js +0 -910
- package/dist/Credit-BuKLrFtM.js +0 -260
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-B2sZFWUF.js +0 -3377
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
- package/dist/Game-C9s4qZz4.js +0 -330
- package/dist/LoyaltyDashboard-tOOk6zvV.js +0 -1082
- package/dist/MainLayout-iWi1DzXS.js +0 -41
- package/dist/Member-BdgdT-sa.js +0 -280
- package/dist/MemberList-DBIE-RWC.js +0 -1601
- package/dist/Mission-CWR6FBvN.js +0 -334
- package/dist/Point-BIt82fJk.js +0 -262
- package/dist/Promotion-Cl1vPi0B.js +0 -397
- package/dist/Review-DmV2YnFd.js +0 -1076
- package/dist/ReviewFacebookCallback-B5XgAWXo.js +0 -243
- package/dist/ReviewGoogleCallback-CYR03Wfd.js +0 -208
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CAImd3yc.js +0 -181
- package/dist/Store-DjUe8ady.js +0 -1996
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B7w69A3j.js +0 -1130
- package/dist/Transaction-BOmDOGnD.js +0 -39
- package/dist/campaign-BnI7-ceP.js +0 -219
- package/dist/campaign-rgDnocfT.js +0 -277
- package/dist/campaign.fn-D21ettpH.js +0 -776
- package/dist/export-CWAxYj7W.js +0 -97
- package/dist/index-B6EBgIUx.js +0 -85
- package/dist/index-CxR1baaG.js +0 -52
- package/dist/membership-CeX8E_I9.js +0 -255
- package/dist/objectid-CMau7CW-.js +0 -145
- package/dist/useMarketingMaterialActions-CGzfJ68e.js +0 -107
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { defineComponent as d, ref as f, resolveComponent as s, openBlock as t, createElementBlock as v, Fragment as b, createVNode as r, unref as o, createElementVNode as k, createBlock as l, KeepAlive as x, resolveDynamicComponent as m, createCommentVNode as F } from "vue";
|
|
2
|
-
import { _ as g, a as y } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-B7w69A3j.js";
|
|
3
|
-
import { u as C } from "./vue-i18n-BBj45p9N.js";
|
|
4
|
-
const T = { class: "px-24 flex flex-col gap-y-32 pb-24" }, P = /* @__PURE__ */ d({
|
|
5
|
-
__name: "Transaction",
|
|
6
|
-
setup(V) {
|
|
7
|
-
const { t: n } = C(), a = [
|
|
8
|
-
{
|
|
9
|
-
label: n("connect.transaction.tabs.collection"),
|
|
10
|
-
value: "collection"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
label: n("connect.transaction.tabs.store"),
|
|
14
|
-
value: "store"
|
|
15
|
-
}
|
|
16
|
-
], e = f(a[0]);
|
|
17
|
-
return (B, c) => {
|
|
18
|
-
const i = s("FmPageHead"), u = s("FmTabs");
|
|
19
|
-
return t(), v(b, null, [
|
|
20
|
-
r(i, {
|
|
21
|
-
title: o(n)("connect.transaction.title")
|
|
22
|
-
}, null, 8, ["title"]),
|
|
23
|
-
k("div", T, [
|
|
24
|
-
r(u, {
|
|
25
|
-
"model-value": o(e).value,
|
|
26
|
-
items: a,
|
|
27
|
-
"onUpdate:modelValue": c[0] || (c[0] = (p) => e.value = a.find((_) => _.value === p))
|
|
28
|
-
}, null, 8, ["model-value"]),
|
|
29
|
-
(t(), l(x, null, [
|
|
30
|
-
o(e).value == "collection" ? (t(), l(m(g), { key: 0 })) : o(e).value == "store" ? (t(), l(m(y), { key: 1 })) : F("", !0)
|
|
31
|
-
], 1024))
|
|
32
|
-
])
|
|
33
|
-
], 64);
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
export {
|
|
38
|
-
P as default
|
|
39
|
-
};
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import { defineStore as w } from "pinia";
|
|
2
|
-
import { reactive as I, onMounted as b, ref as o } from "vue";
|
|
3
|
-
import { g as a, S as l, b as d } from "./index-BdnHQSDd.js";
|
|
4
|
-
const s = () => {
|
|
5
|
-
const e = l.getBusinessId();
|
|
6
|
-
if (!e) throw new Error("Invalid business ID");
|
|
7
|
-
return d(`businesses/${e}/campaigns`, {
|
|
8
|
-
// url: 'http://localhost:3000/portal/',
|
|
9
|
-
});
|
|
10
|
-
}, u = {
|
|
11
|
-
async readAllGrouped(e) {
|
|
12
|
-
const t = a(
|
|
13
|
-
await s().get("grouped", { params: e })
|
|
14
|
-
);
|
|
15
|
-
return {
|
|
16
|
-
meta: t.meta,
|
|
17
|
-
resources: t.resources
|
|
18
|
-
};
|
|
19
|
-
},
|
|
20
|
-
async readAll(e, t) {
|
|
21
|
-
const n = a(
|
|
22
|
-
await s().get("", {
|
|
23
|
-
params: { ...e, ...t }
|
|
24
|
-
})
|
|
25
|
-
);
|
|
26
|
-
return {
|
|
27
|
-
meta: n.meta,
|
|
28
|
-
resources: n.resources
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
async readById(e) {
|
|
32
|
-
return a(await s().get(`/${e}`));
|
|
33
|
-
},
|
|
34
|
-
async create(e) {
|
|
35
|
-
return a(await s().post("", e));
|
|
36
|
-
},
|
|
37
|
-
async update(e, t) {
|
|
38
|
-
return a(await s().put(e, t));
|
|
39
|
-
},
|
|
40
|
-
async delete(e) {
|
|
41
|
-
return a(await s().delete(e));
|
|
42
|
-
},
|
|
43
|
-
async readCollectionsByCampaignId(e, t) {
|
|
44
|
-
const n = a(
|
|
45
|
-
await s().get(`/${e}/collections`, {
|
|
46
|
-
params: t
|
|
47
|
-
})
|
|
48
|
-
);
|
|
49
|
-
return {
|
|
50
|
-
meta: n.meta,
|
|
51
|
-
resources: n.resources
|
|
52
|
-
};
|
|
53
|
-
},
|
|
54
|
-
async readTransactions(e) {
|
|
55
|
-
return a(
|
|
56
|
-
await s().get(
|
|
57
|
-
`/${e}/collections/transactions`
|
|
58
|
-
)
|
|
59
|
-
);
|
|
60
|
-
},
|
|
61
|
-
async createCollectionByCampaignId(e, t) {
|
|
62
|
-
return a(
|
|
63
|
-
await s().post(`/${e}/collections`, t)
|
|
64
|
-
);
|
|
65
|
-
},
|
|
66
|
-
async readGroups() {
|
|
67
|
-
return a(await s().get("/groups")) ?? [];
|
|
68
|
-
},
|
|
69
|
-
async readStats(e) {
|
|
70
|
-
return a(
|
|
71
|
-
await s().get("/stats", { params: e })
|
|
72
|
-
);
|
|
73
|
-
},
|
|
74
|
-
async createGroup(e) {
|
|
75
|
-
return a(await s().post("/groups", e));
|
|
76
|
-
},
|
|
77
|
-
async updateGroup(e, t) {
|
|
78
|
-
return a(
|
|
79
|
-
await s().put(`/groups/${e}`, t)
|
|
80
|
-
);
|
|
81
|
-
},
|
|
82
|
-
async deleteGroup(e) {
|
|
83
|
-
return a(await s().delete(`/groups/${e}`));
|
|
84
|
-
},
|
|
85
|
-
async sendCollection(e, t) {
|
|
86
|
-
return a(
|
|
87
|
-
await s().post(
|
|
88
|
-
`/${e}/collections/send`,
|
|
89
|
-
t
|
|
90
|
-
)
|
|
91
|
-
);
|
|
92
|
-
},
|
|
93
|
-
async sendStamp(e, t) {
|
|
94
|
-
return a(
|
|
95
|
-
await s().post(
|
|
96
|
-
`/${e}/collections/send-stamp`,
|
|
97
|
-
t
|
|
98
|
-
)
|
|
99
|
-
);
|
|
100
|
-
},
|
|
101
|
-
async syncAllPromotion() {
|
|
102
|
-
return a(await s().post("/promotion/sync"));
|
|
103
|
-
},
|
|
104
|
-
async readAllDeleted(e, t) {
|
|
105
|
-
const n = a(
|
|
106
|
-
await s().get("/bin", {
|
|
107
|
-
params: { ...e, ...t }
|
|
108
|
-
})
|
|
109
|
-
);
|
|
110
|
-
return {
|
|
111
|
-
meta: n.meta,
|
|
112
|
-
resources: n.resources
|
|
113
|
-
};
|
|
114
|
-
},
|
|
115
|
-
async restore(e) {
|
|
116
|
-
return a(
|
|
117
|
-
await s().post(`/${e}/restore`)
|
|
118
|
-
);
|
|
119
|
-
},
|
|
120
|
-
async getPromotionQueue() {
|
|
121
|
-
return a(await s().get("/promotion/queue"));
|
|
122
|
-
}
|
|
123
|
-
}, p = () => {
|
|
124
|
-
const e = l.getBusinessId();
|
|
125
|
-
if (!e) throw new Error("Invalid business ID");
|
|
126
|
-
return d(`businesses/${e}/campaigns`, {
|
|
127
|
-
noIdRequired: !0
|
|
128
|
-
});
|
|
129
|
-
}, f = {
|
|
130
|
-
async readAll() {
|
|
131
|
-
return a(await p().get("templates"));
|
|
132
|
-
},
|
|
133
|
-
async readById(e) {
|
|
134
|
-
return a(
|
|
135
|
-
await p().get(`templates/${e}`)
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
}, E = w("mf-connect-campaign", () => {
|
|
139
|
-
const e = I({
|
|
140
|
-
promotion: [],
|
|
141
|
-
voucher: [],
|
|
142
|
-
broadcast: [],
|
|
143
|
-
experience: [],
|
|
144
|
-
point: [],
|
|
145
|
-
credit: [],
|
|
146
|
-
token: [],
|
|
147
|
-
mission: [],
|
|
148
|
-
grab: [],
|
|
149
|
-
all: []
|
|
150
|
-
});
|
|
151
|
-
b(() => {
|
|
152
|
-
console.log("🔧 CampaignStore Installed");
|
|
153
|
-
});
|
|
154
|
-
const t = o([]), n = o([]), c = o([]);
|
|
155
|
-
async function m(h) {
|
|
156
|
-
const i = await u.readAll({
|
|
157
|
-
limit: 1e3,
|
|
158
|
-
skip: 0,
|
|
159
|
-
sortBy: "_id",
|
|
160
|
-
descending: !0
|
|
161
|
-
});
|
|
162
|
-
Object.keys(e).forEach((r) => {
|
|
163
|
-
e[r] = [];
|
|
164
|
-
}), e.all = i.resources.filter(
|
|
165
|
-
(r) => r.type !== "MEMBERSHIP"
|
|
166
|
-
);
|
|
167
|
-
for (const r of i.resources)
|
|
168
|
-
switch (r.type) {
|
|
169
|
-
case "PROMOTION":
|
|
170
|
-
e.promotion.push(r);
|
|
171
|
-
break;
|
|
172
|
-
case "VOUCHER":
|
|
173
|
-
e.voucher.push(r), c.value.push(r);
|
|
174
|
-
break;
|
|
175
|
-
case "BROADCAST":
|
|
176
|
-
["SCHEDULE", "FEEDBACK"].includes(r.event.type) && e.broadcast.push(r);
|
|
177
|
-
break;
|
|
178
|
-
case "POINT":
|
|
179
|
-
e.experience.push(r);
|
|
180
|
-
break;
|
|
181
|
-
case "COIN":
|
|
182
|
-
e.point.push(r);
|
|
183
|
-
break;
|
|
184
|
-
case "CREDIT":
|
|
185
|
-
e.credit.push(r);
|
|
186
|
-
break;
|
|
187
|
-
case "GAME":
|
|
188
|
-
e.token.push(r);
|
|
189
|
-
break;
|
|
190
|
-
case "MISSION":
|
|
191
|
-
e.mission.push(r);
|
|
192
|
-
break;
|
|
193
|
-
case "GRAB":
|
|
194
|
-
e.grab.push(r);
|
|
195
|
-
break;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
async function g() {
|
|
199
|
-
n.value = await u.readGroups();
|
|
200
|
-
}
|
|
201
|
-
async function y() {
|
|
202
|
-
t.value = await f.readAll();
|
|
203
|
-
}
|
|
204
|
-
return {
|
|
205
|
-
// State
|
|
206
|
-
campaigns: e,
|
|
207
|
-
templates: t,
|
|
208
|
-
groups: n,
|
|
209
|
-
voucher: c,
|
|
210
|
-
// Actions
|
|
211
|
-
read: m,
|
|
212
|
-
readGroups: g,
|
|
213
|
-
readTemplates: y
|
|
214
|
-
};
|
|
215
|
-
});
|
|
216
|
-
export {
|
|
217
|
-
u as c,
|
|
218
|
-
E as u
|
|
219
|
-
};
|
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
import "./index-7HizF3GI.js";
|
|
2
|
-
import "./index-xao4ggML.js";
|
|
3
|
-
import { h as s } from "./moment-D7p2TMB-.js";
|
|
4
|
-
import "./index-BPsofsGt.js";
|
|
5
|
-
import { e as f } from "./effect-DhpIv1L3.js";
|
|
6
|
-
import { components as l } from "@feedmepos/ui-library";
|
|
7
|
-
import { i as h } from "./index-Cvfavr2M.js";
|
|
8
|
-
import { c as O } from "./rule-B1Agad1n.js";
|
|
9
|
-
import { u as C } from "./business-jn-_l48y.js";
|
|
10
|
-
import { C as m } from "./campaign.fn-D21ettpH.js";
|
|
11
|
-
import { c as g } from "./string-Gcy5IM_H.js";
|
|
12
|
-
import { i as d } from "./plugins-MnP1vCcg.js";
|
|
13
|
-
import { h as p } from "vue";
|
|
14
|
-
import { F as a } from "./campaign.enum-C9HvoKuq.js";
|
|
15
|
-
function E(e) {
|
|
16
|
-
switch (e) {
|
|
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() {
|
|
37
|
-
const e = d.global.locale;
|
|
38
|
-
return typeof e == "string" ? e : e.value;
|
|
39
|
-
}
|
|
40
|
-
function u(e) {
|
|
41
|
-
return new Intl.DateTimeFormat(I(), {
|
|
42
|
-
day: "2-digit",
|
|
43
|
-
month: "short",
|
|
44
|
-
year: "numeric"
|
|
45
|
-
}).format(new Date(e));
|
|
46
|
-
}
|
|
47
|
-
function c(e) {
|
|
48
|
-
return p(
|
|
49
|
-
"div",
|
|
50
|
-
{
|
|
51
|
-
class: `${e.chipClass} gap-4 h-[22px] inline-flex items-center justify-center min-w-min px-8 rounded-md`
|
|
52
|
-
},
|
|
53
|
-
[
|
|
54
|
-
p(l.FmIcon, { size: "sm", name: e.icon, outline: !0 }),
|
|
55
|
-
p("span", { class: "fm-typo-en-body-md-600" }, e.name)
|
|
56
|
-
]
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
const H = {
|
|
60
|
-
[a.enum.CREDIT]: {
|
|
61
|
-
chipClass: "!text-fm-color-secondary-plum !bg-[#f2ebfe]",
|
|
62
|
-
icon: "local_activity",
|
|
63
|
-
get name() {
|
|
64
|
-
return o("connect.campaign.common.typeName.CREDIT");
|
|
65
|
-
},
|
|
66
|
-
chip() {
|
|
67
|
-
return c(this);
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
[a.enum.PROMOTION]: {
|
|
71
|
-
chipClass: "!text-fm-color-secondary-citrus !bg-fm-color-system-warning-100",
|
|
72
|
-
icon: "loyalty",
|
|
73
|
-
get name() {
|
|
74
|
-
return o("connect.campaign.common.typeName.PROMOTION");
|
|
75
|
-
},
|
|
76
|
-
chip() {
|
|
77
|
-
return c(this);
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
[a.enum.VOUCHER]: {
|
|
81
|
-
chipClass: "!text-fm-color-secondary-halite !bg-[#fff0f6]",
|
|
82
|
-
icon: "sell",
|
|
83
|
-
get name() {
|
|
84
|
-
return o("connect.campaign.common.typeName.VOUCHER");
|
|
85
|
-
},
|
|
86
|
-
chip() {
|
|
87
|
-
return c(this);
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
[a.enum.POINT]: {
|
|
91
|
-
chipClass: "!text-fm-color-secondary-cocoa !bg-[#fff9e6]",
|
|
92
|
-
icon: "award_star",
|
|
93
|
-
get name() {
|
|
94
|
-
return o("connect.campaign.common.typeName.POINT");
|
|
95
|
-
},
|
|
96
|
-
chip() {
|
|
97
|
-
return c(this);
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
[a.enum.BROADCAST]: {
|
|
101
|
-
chipClass: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
|
|
102
|
-
icon: "campaign",
|
|
103
|
-
get name() {
|
|
104
|
-
return o("connect.campaign.common.typeName.BROADCAST");
|
|
105
|
-
},
|
|
106
|
-
chip() {
|
|
107
|
-
return c(this);
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
[a.enum.GAME]: {
|
|
111
|
-
chipClass: "!text-fm-color-secondary-mint !bg-fm-color-system-success-100",
|
|
112
|
-
icon: "database",
|
|
113
|
-
get name() {
|
|
114
|
-
return o("connect.campaign.common.typeName.GAME");
|
|
115
|
-
},
|
|
116
|
-
chip() {
|
|
117
|
-
return c(this);
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
[a.enum.REWARD_POOL]: {
|
|
121
|
-
chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
|
|
122
|
-
icon: "editor_choice",
|
|
123
|
-
get name() {
|
|
124
|
-
return o("connect.campaign.common.typeName.REWARD_POOL");
|
|
125
|
-
},
|
|
126
|
-
chip() {
|
|
127
|
-
return c(this);
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
[a.enum.COIN]: {
|
|
131
|
-
chipClass: "!text-fm-color-system-success-400 !bg-fm-color-system-success-100",
|
|
132
|
-
icon: "monetization_on",
|
|
133
|
-
get name() {
|
|
134
|
-
return o("connect.campaign.common.typeName.COIN");
|
|
135
|
-
},
|
|
136
|
-
chip() {
|
|
137
|
-
return c(this);
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
[a.enum.MEMBERSHIP]: {
|
|
141
|
-
chipClass: "",
|
|
142
|
-
icon: "",
|
|
143
|
-
get name() {
|
|
144
|
-
return o("connect.campaign.common.typeName.MEMBERSHIP");
|
|
145
|
-
},
|
|
146
|
-
chip() {
|
|
147
|
-
return c(this);
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
[a.enum.MISSION]: {
|
|
151
|
-
chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
|
|
152
|
-
icon: "editor_choice",
|
|
153
|
-
get name() {
|
|
154
|
-
return o("connect.campaign.common.typeName.MISSION");
|
|
155
|
-
},
|
|
156
|
-
chip() {
|
|
157
|
-
return c(this);
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
[a.enum.GRAB]: {
|
|
161
|
-
chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
|
|
162
|
-
icon: "editor_choice",
|
|
163
|
-
name: "Grab",
|
|
164
|
-
chip() {
|
|
165
|
-
return c(this);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
function U(e) {
|
|
170
|
-
const t = R(e), r = {
|
|
171
|
-
active: "text-fm-color-typo-success bg-fm-color-system-success-100",
|
|
172
|
-
upcoming: "text-fm-color-typo-info bg-fm-color-system-info-100",
|
|
173
|
-
expired: "text-fm-color-typo-error bg-fm-color-system-error-100"
|
|
174
|
-
};
|
|
175
|
-
return e.type == "VOUCHER" ? p(l.FmChip, {
|
|
176
|
-
class: r[t],
|
|
177
|
-
label: g.title(o(`connect.campaign.common.status.${t}`)),
|
|
178
|
-
compact: !0
|
|
179
|
-
}) : p(l.FmChip, {
|
|
180
|
-
class: r[t],
|
|
181
|
-
label: g.title(o(`connect.campaign.common.status.${t}`)),
|
|
182
|
-
compact: !0
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
function B(e) {
|
|
186
|
-
const t = e.timeframeOptions;
|
|
187
|
-
if (!t || !t.start && !t.end)
|
|
188
|
-
return o("connect.campaign.common.always_active");
|
|
189
|
-
if (!t.start && t.end)
|
|
190
|
-
return o("connect.campaign.common.valid_until", {
|
|
191
|
-
date: u(t.end)
|
|
192
|
-
});
|
|
193
|
-
const r = u(t.start), n = t.end ? u(t.end) : o("connect.campaign.common.unlimited");
|
|
194
|
-
return `${r} -> ${n}`;
|
|
195
|
-
}
|
|
196
|
-
function F(e) {
|
|
197
|
-
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
|
-
return {
|
|
205
|
-
"connect.campaign.common.campaign_name": t.name,
|
|
206
|
-
"connect.campaign.common.campaign_period": r(
|
|
207
|
-
t.timeframeOptions
|
|
208
|
-
),
|
|
209
|
-
get "connect.campaign.common.next_schedule_at"() {
|
|
210
|
-
if ((t == null ? void 0 : t.event.type) != "SCHEDULE" || !t.event.rule || !h(t.event.rule))
|
|
211
|
-
return;
|
|
212
|
-
const n = O(
|
|
213
|
-
t.event.rule.rules.g_schedule
|
|
214
|
-
);
|
|
215
|
-
return n ? s(n).format("ddd, DD MMM YYYY, hh:mmA") : void 0;
|
|
216
|
-
},
|
|
217
|
-
get "connect.campaign.common.discount_type"() {
|
|
218
|
-
if (t.type == "PROMOTION") return f(t.effect);
|
|
219
|
-
if ("configs" in e && e.configs.type == "VOUCHER")
|
|
220
|
-
return f(e.configs.extras.effect);
|
|
221
|
-
},
|
|
222
|
-
get "connect.campaign.common.available_at"() {
|
|
223
|
-
return t.targetLocation ? t.targetLocation.length > 0 ? t.targetLocation.map(
|
|
224
|
-
(n) => C().locationItems.find((i) => i.value == n).label
|
|
225
|
-
).join(",") : "connect.campaign.common.no_location" : "connect.campaign.common.all_locations";
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
function R(e) {
|
|
230
|
-
return e.timeframeOptions && e.timeframeOptions.type == "timeframe" ? s().isBetween(
|
|
231
|
-
e.timeframeOptions.start ?? s().subtract(1, "d"),
|
|
232
|
-
e.timeframeOptions.end ?? s().add(1, "d")
|
|
233
|
-
) ? "active" : s().isAfter(e.timeframeOptions.end) ? "expired" : "upcoming" : "active";
|
|
234
|
-
}
|
|
235
|
-
function V(e) {
|
|
236
|
-
var t, r;
|
|
237
|
-
switch (e.event.type) {
|
|
238
|
-
case "BILL_COMPLETED":
|
|
239
|
-
const n = `Spend to get ${m.formattedType(e.type)}`;
|
|
240
|
-
switch (e.type) {
|
|
241
|
-
case "POINT":
|
|
242
|
-
case "CREDIT":
|
|
243
|
-
case "COIN":
|
|
244
|
-
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
|
-
case "VOUCHER":
|
|
246
|
-
const i = (r = (t = e == null ? void 0 : e.pf_collectible) == null ? void 0 : t.extras) == null ? void 0 : r.effect;
|
|
247
|
-
return i ? `${n} - ${f(i)}` : n;
|
|
248
|
-
default:
|
|
249
|
-
return n;
|
|
250
|
-
}
|
|
251
|
-
case "FEEDBACK":
|
|
252
|
-
return `Give feedback to receive ${m.formattedType(e.type)}`;
|
|
253
|
-
case "SCHEDULE":
|
|
254
|
-
return `Receive ${m.formattedType(e.type)} on scheduled time`;
|
|
255
|
-
case "SIMPLE_CLAIM":
|
|
256
|
-
return "Simple claim voucher";
|
|
257
|
-
case "TIER_UPGRADED":
|
|
258
|
-
return `Receive ${m.formattedType(e.type)} when member tier upgraded`;
|
|
259
|
-
case "MEMBERSHIP_JOINED":
|
|
260
|
-
return `Receive ${m.formattedType(e.type)} when member joined`;
|
|
261
|
-
case "MAKING_ORDER":
|
|
262
|
-
return e.type !== "PROMOTION" ? void 0 : f(e.effect);
|
|
263
|
-
default:
|
|
264
|
-
throw new Error(
|
|
265
|
-
`Not implemented ${JSON.stringify({ cause: e.event.type })}`
|
|
266
|
-
);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
export {
|
|
270
|
-
H as C,
|
|
271
|
-
R as a,
|
|
272
|
-
U as b,
|
|
273
|
-
V as c,
|
|
274
|
-
G as d,
|
|
275
|
-
F as e,
|
|
276
|
-
B as g
|
|
277
|
-
};
|