@feedmepos/mf-connect 0.1.38-beta.26 → 0.1.38-beta.28
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/{Analytic-GI7aYtUb.js → Analytic-DJ7H3eCU.js} +13 -13
- package/dist/{App-BoklLgkw.js → App-D8IG7-AS.js} +7 -7
- package/dist/{AuditLogs-DGAmSC_0.js → AuditLogs-BbEbtj3K.js} +10 -10
- package/dist/{Bin-BiF3wXhU.js → Bin-cBcezKUe.js} +8 -8
- package/dist/Broadcast-BvB7SE9q.js +233 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BIGwoDq9.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Dz4bUU7V.js} +6 -6
- package/dist/{Card-Bzm_iM7j.js → Card-Z5HmiIyV.js} +16 -16
- package/dist/{Collections-CZEDKF0v.js → Collections-CjOHPf-1.js} +6 -6
- package/dist/Credit-1b1U1v6h.js +228 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Cz4ydsOk.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-t3kWWMMd.js} +32 -32
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-d67tWKfX.js → EffectSheet.vue_vue_type_style_index_0_lang-B1GJEsLP.js} +6 -6
- package/dist/Experience-BuuRT3Af.js +229 -0
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/{Game-ooDjLDzG.js → Game-C8vfoVvy.js} +103 -97
- package/dist/{Grab-CHmDWK3s.js → Grab-ldRfDcO2.js} +10 -10
- package/dist/{Index-C9yMbuO8.js → Index-DKwkokjr.js} +10 -10
- package/dist/{Marketing-BvgC-F4p.js → Marketing-CmBwUCw_.js} +6 -6
- package/dist/{Member-DP0Cm8yE.js → Member-D5rEsvQW.js} +10 -10
- package/dist/{MemberList-BYZ2NfAg.js → MemberList-zVtC7sGd.js} +25 -25
- package/dist/{MemberTransactions-DvG4SU0m.js → MemberTransactions-CP2K-Ufy.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-C3-IpjMr.js → MessageInput.vue_vue_type_script_setup_true_lang-nmCGCPlb.js} +7 -7
- package/dist/{Mission-CBOIiAhx.js → Mission-BA5hrRHI.js} +112 -106
- package/dist/{Overview-BqKRh6LC.js → Overview-0wOTo50k.js} +18 -18
- package/dist/Point-CMchF7I_.js +232 -0
- package/dist/{Promotion-D4HBy-As.js → Promotion-DP9xDP_Q.js} +11 -11
- package/dist/{Queue-BqzI56Vp.js → Queue-BRbvbIOc.js} +11 -11
- package/dist/{Record-WtLmMgjU.js → Record-Dljs4w39.js} +8 -8
- package/dist/{Reward-yfsdyC-T.js → Reward-DWzAd7fd.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DaB5piDf.js → RewardGroup.vue_vue_type_script_setup_true_lang-DZCw6Tj7.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DCKbSowE.js → RuleGroup.vue_vue_type_script_setup_true_lang-GHZzkjI1.js} +13 -13
- package/dist/{Segment-hOxwXwqZ.js → Segment-BzNp0yuS.js} +22 -22
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-IfFZG5uK.js → SelectItems.vue_vue_type_script_setup_true_lang-tRT9x7z8.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-C9FaS4EF.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-d6-F0cyp.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CNd_-RAr.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCfVM1h6.js} +3 -3
- package/dist/{Setting-B7XBouh4.js → Setting-kZJEjJ73.js} +11 -11
- package/dist/{Store-Dbg7gN9h.js → Store-Cqvmga7C.js} +19 -19
- package/dist/{StoreRewards-DoBjQyns.js → StoreRewards-CaLIJxC-.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-C3_usDfP.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DHonDeSo.js} +21 -21
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C5BP2K1C.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CgWzp89p.js} +1 -1
- package/dist/{Tier-Q9hjmprx.js → Tier-BuhUXTnt.js} +20 -20
- package/dist/{Title-9h42ZNEa.js → Title-CoqtSbG3.js} +19 -19
- package/dist/{Transaction-B_NIJcmb.js → Transaction-Do1ImR_e.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-EZ42L0jN.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B4NNtaCf.js} +6 -6
- package/dist/{Voucher-OjdoUYOe.js → Voucher-CYXwWPMB.js} +14 -14
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CgUFty-i.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CP-Dx2c_.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-D9V2WsTX.js → ZodTextField.vue_vue_type_script_setup_true_lang-D4SQnixz.js} +1 -1
- package/dist/{app-A-A8AXY4.js → app-CqKzNbaV.js} +33 -33
- package/dist/{app-psmMhnbB.js → app-DEnuQng0.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-BkIoeq-Q.js → business-f0az-Hy3.js} +11 -8
- package/dist/{campaign-C0gfY75c.js → campaign-C1ug3b0o.js} +9 -9
- package/dist/{campaign-CERB2jjK.js → campaign-C_81NbFH.js} +2 -2
- package/dist/{campaign.enum-jpIcwh1C.js → campaign.enum-C4L_bAhq.js} +1 -1
- package/dist/{campaign.fn-C3JAU897.js → campaign.fn-EU0pJ8kw.js} +3 -3
- package/dist/{collectible.enum-PLiXkPXk.js → collectible.enum-BF-mjm1H.js} +1 -1
- package/dist/{collection.fn-BEgw5oag.js → collection.fn-D8zx6kSt.js} +2 -2
- package/dist/{dto-CzjctCKL.js → dto-D4_lwPHD.js} +4 -4
- package/dist/{effect-BzkBC2cZ.js → effect-ByjBLNIU.js} +1 -1
- package/dist/{email-addresses-BWQOZIxj.js → email-addresses-DwU2exzd.js} +1 -1
- package/dist/{export-Bqt9zope.js → export-BtDOtfYF.js} +3 -3
- package/dist/{helper-CnEOKaJw.js → helper-CoeWXTPv.js} +1 -1
- package/dist/{index-Cs3ZFd92.js → index-0w5iM8ys.js} +4 -4
- package/dist/{index-DFqn9RQx.js → index-7WIUEYn9.js} +3 -3
- package/dist/{index-BD7Rc0qN.js → index-B6tn0V38.js} +8 -7
- package/dist/{index-DfOMpXlE.js → index-B8bKqIlt.js} +1 -1
- package/dist/{index-DZLqscW5.js → index-Bev0BsOx.js} +1 -1
- package/dist/{index-DBN0XD-h.js → index-BtKNK5T0.js} +3 -3
- package/dist/{index-DEezTfBN.js → index-D3teqQy1.js} +4 -4
- package/dist/{index-DnJuxEaY.js → index-D7pb6bbv.js} +1 -1
- package/dist/{index-D5aQKEmO.js → index-D7znJ99_.js} +1 -1
- package/dist/{index-DIN-0kYC.js → index-DKE_93Vz.js} +2 -2
- package/dist/{index-BMLcVoj2.js → index-DanRr8xE.js} +1 -1
- package/dist/{index-66ugkTKw.js → index-DyHdG826.js} +1 -1
- package/dist/{index-yOIVmjex.js → index-fdb8MCv7.js} +1 -1
- package/dist/{index-CeDl4txs.js → index-v4Pf59tF.js} +1 -1
- package/dist/{index.esm2017-7gQUvseu.js → index.esm2017-BLNZ-3xj.js} +1 -1
- package/dist/{loading-CJIHUxKM.js → loading-BqoQX5Rb.js} +1 -1
- package/dist/{membership-DRnWUdOc.js → membership-BjCyjE4I.js} +3 -3
- package/dist/{money-I2p-gwmi.js → money-BLKcccWr.js} +1 -1
- package/dist/{number-DldVO4aW.js → number-B0A1qd4w.js} +1 -1
- package/dist/objectid-BA-uFRq6.js +145 -0
- package/dist/{plugins-D17305Np.js → plugins-ByKQnwiZ.js} +2 -2
- package/dist/{reward-3PHDIRXM.js → reward-DQIbpYhl.js} +1 -1
- package/dist/{rule-BgMw4FoF.js → rule-DIbFCkIF.js} +3 -3
- package/dist/{rule-builder-CmqmCe3P.js → rule-builder-DH7ugfCj.js} +1 -1
- package/dist/{template-BR9R6E1B.js → template-BvQVIEJZ.js} +4 -4
- package/dist/{timezone-CWS-nhUv.js → timezone-C8GHauOy.js} +3 -2
- package/dist/{trigger-DsYBkR3I.js → trigger-pjASxQDD.js} +4 -4
- package/dist/{user-B3SLxQOc.js → user-l1WWivUO.js} +1 -1
- package/dist/{vue-i18n-CttzNDMl.js → vue-i18n-DRGINC-z.js} +2 -2
- package/dist/{xlsx-cNTfolRW.js → xlsx-CjPLfwxi.js} +1 -1
- package/package.json +1 -1
- package/dist/Broadcast-D5ypkyn0.js +0 -227
- package/dist/Credit-nieDAS9M.js +0 -222
- package/dist/Experience-CKeWLWIk.js +0 -223
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
- package/dist/Point-14thvTNE.js +0 -226
- package/dist/objectid-B_MkqbEB.js +0 -145
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { defineComponent as N, ref as L, computed as j, h as M, onMounted as H, resolveComponent as m, openBlock as d, createElementBlock as y, Fragment as h, createVNode as i, unref as t, createElementVNode as n, withCtx as C, renderList as q, createBlock as w, resolveDynamicComponent as O, toDisplayString as g, createCommentVNode as z } from "vue";
|
|
2
|
+
import { _ as G } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as J, components as Q } from "@feedmepos/ui-library";
|
|
4
|
+
import { p as W } from "./plugins-ByKQnwiZ.js";
|
|
5
|
+
import { u as X } from "./loading-BqoQX5Rb.js";
|
|
6
|
+
import { u as Y } from "./business-f0az-Hy3.js";
|
|
7
|
+
import { u as Z } from "./campaign-C_81NbFH.js";
|
|
8
|
+
import { g as ee, a as S, b as V } from "./campaign-C1ug3b0o.js";
|
|
9
|
+
import { u as oe } from "./vue-i18n-DRGINC-z.js";
|
|
10
|
+
import { _ as te } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
11
|
+
import { _ as ae } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-t3kWWMMd.js";
|
|
12
|
+
import { u as ne } from "./template-BvQVIEJZ.js";
|
|
13
|
+
import { c as _ } from "./index-B8bKqIlt.js";
|
|
14
|
+
const re = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-center justify-between w-full" }, ie = { class: "flex gap-8 overflow-x-auto" }, ce = { class: "space-y-8" }, le = { class: "flex w-full gap-4 items-center" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { key: 0 }, Ie = /* @__PURE__ */ N({
|
|
15
|
+
__name: "Credit",
|
|
16
|
+
setup(ge) {
|
|
17
|
+
const { t: r } = oe(), B = {
|
|
18
|
+
label: r("connect.program.common.actions.create", {
|
|
19
|
+
type: r("connect.program.credit.title").toLowerCase()
|
|
20
|
+
}),
|
|
21
|
+
value: "create",
|
|
22
|
+
isPrimary: !0,
|
|
23
|
+
prependIcon: "add"
|
|
24
|
+
}, I = ne("CREDIT", J()), R = Y(), u = Z(), { global: D, minor: v } = X, s = L({
|
|
25
|
+
searchKey: "",
|
|
26
|
+
location: []
|
|
27
|
+
});
|
|
28
|
+
function T(e) {
|
|
29
|
+
const o = s.value.location;
|
|
30
|
+
return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((l) => {
|
|
31
|
+
var c;
|
|
32
|
+
return (c = e == null ? void 0 : e.targetLocation) == null ? void 0 : c.includes(l);
|
|
33
|
+
}) : e.targetLocation.includes(o);
|
|
34
|
+
}
|
|
35
|
+
const p = j(
|
|
36
|
+
() => u.campaigns.credit.filter((e) => T(e))
|
|
37
|
+
), E = [
|
|
38
|
+
{
|
|
39
|
+
header: r("connect.program.common.table.title"),
|
|
40
|
+
accessorFn: (e) => e.name
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
header: r("connect.program.common.table.status"),
|
|
44
|
+
accessorFn: (e) => ee(e),
|
|
45
|
+
cell(e) {
|
|
46
|
+
return S(e.row.original);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
header: r("connect.program.common.table.summary"),
|
|
51
|
+
accessorFn: (e) => V(e)
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
header: r("connect.program.common.table.actions"),
|
|
55
|
+
cell(e) {
|
|
56
|
+
return M(Q.FmButton, {
|
|
57
|
+
variant: "tertiary",
|
|
58
|
+
icon: "delete",
|
|
59
|
+
iconColor: "neutral-gray-400",
|
|
60
|
+
onClick: (o) => {
|
|
61
|
+
o.stopPropagation(), x(e.row.original);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
], b = L();
|
|
67
|
+
async function x(e) {
|
|
68
|
+
await W.remove(
|
|
69
|
+
r("connect.program.common.remove.confirm", { name: e.name })
|
|
70
|
+
) && await v(
|
|
71
|
+
async () => {
|
|
72
|
+
await _.delete(e._id), await u.read("CREDIT");
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
message: r("connect.program.common.remove.removing", { name: e.name }),
|
|
76
|
+
successMessage: r("connect.program.common.remove.removed", {
|
|
77
|
+
name: e.name
|
|
78
|
+
})
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
async function f(e) {
|
|
83
|
+
e ? await o() : I.open(async (l) => {
|
|
84
|
+
await o(l);
|
|
85
|
+
});
|
|
86
|
+
async function o(l) {
|
|
87
|
+
var c;
|
|
88
|
+
(c = b.value) == null || c.showSheet(
|
|
89
|
+
!0,
|
|
90
|
+
"CREDIT",
|
|
91
|
+
e ? await _.readById(e._id) : void 0,
|
|
92
|
+
l
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
async function K(e) {
|
|
97
|
+
await v(
|
|
98
|
+
async () => {
|
|
99
|
+
e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await u.read("CREDIT");
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
message: `${e.campaign._id ? "Updating" : "Creating"} credit program`,
|
|
103
|
+
successMessage: `Credit program ${e.campaign._id ? "updated" : "created"} successfully`
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
return H(async () => {
|
|
108
|
+
await D(async () => {
|
|
109
|
+
await u.read("CREDIT");
|
|
110
|
+
});
|
|
111
|
+
}), (e, o) => {
|
|
112
|
+
const l = m("FmPageHead"), c = m("FmSearch"), $ = m("FmTable"), F = m("FmButton"), P = m("FmListItem"), U = m("FmList"), A = m("FmCard");
|
|
113
|
+
return d(), y(h, null, [
|
|
114
|
+
i(l, {
|
|
115
|
+
title: t(r)("connect.program.credit.title"),
|
|
116
|
+
actions: t(p).length > 0 ? [B] : [],
|
|
117
|
+
"onClick:action": o[0] || (o[0] = () => f())
|
|
118
|
+
}, null, 8, ["title", "actions"]),
|
|
119
|
+
n("div", re, [
|
|
120
|
+
i(c, {
|
|
121
|
+
modelValue: t(s).searchKey,
|
|
122
|
+
"onUpdate:modelValue": o[1] || (o[1] = (a) => t(s).searchKey = a),
|
|
123
|
+
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
124
|
+
placeholder: "search",
|
|
125
|
+
collapsible: ""
|
|
126
|
+
}, null, 8, ["modelValue"]),
|
|
127
|
+
t(u).campaigns.credit && t(u).campaigns.credit.length > 0 ? (d(), y(h, { key: 0 }, [
|
|
128
|
+
n("div", se, [
|
|
129
|
+
n("div", ie, [
|
|
130
|
+
i(te, {
|
|
131
|
+
label: `${t(r)("connect.common.location")}: `,
|
|
132
|
+
"right-icon": "keyboard_arrow_down",
|
|
133
|
+
modelValue: t(s).location,
|
|
134
|
+
"onUpdate:modelValue": o[2] || (o[2] = (a) => t(s).location = a),
|
|
135
|
+
icon: "storefront",
|
|
136
|
+
"show-item-label": !0,
|
|
137
|
+
items: t(R).locationOptions
|
|
138
|
+
}, null, 8, ["label", "modelValue", "items"])
|
|
139
|
+
]),
|
|
140
|
+
i(c, {
|
|
141
|
+
modelValue: t(s).searchKey,
|
|
142
|
+
"onUpdate:modelValue": o[3] || (o[3] = (a) => t(s).searchKey = a),
|
|
143
|
+
class: "xs:hidden",
|
|
144
|
+
placeholder: "search",
|
|
145
|
+
collapsible: ""
|
|
146
|
+
}, null, 8, ["modelValue"])
|
|
147
|
+
]),
|
|
148
|
+
i($, {
|
|
149
|
+
class: "xs:hidden",
|
|
150
|
+
"row-data": t(p),
|
|
151
|
+
"column-defs": E,
|
|
152
|
+
"search-value": t(s).searchKey,
|
|
153
|
+
"column-filter": [],
|
|
154
|
+
onRowClick: o[4] || (o[4] = (a) => f(a.original)),
|
|
155
|
+
"hide-footer": t(p).length < 10
|
|
156
|
+
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
157
|
+
i(U, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
158
|
+
default: C(() => [
|
|
159
|
+
(d(!0), y(h, null, q(t(p).filter(
|
|
160
|
+
(a) => a.name.toLowerCase().includes(t(s).searchKey.toLowerCase())
|
|
161
|
+
), (a) => (d(), w(P, {
|
|
162
|
+
key: a._id.toString(),
|
|
163
|
+
onClick: (k) => f(a),
|
|
164
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
165
|
+
}, {
|
|
166
|
+
default: C(() => [
|
|
167
|
+
n("div", ce, [
|
|
168
|
+
n("div", le, [
|
|
169
|
+
(d(), w(O(t(S)(a)))),
|
|
170
|
+
n("div", me, g(a.currentReceive ?? 0) + " used ", 1)
|
|
171
|
+
]),
|
|
172
|
+
n("div", de, [
|
|
173
|
+
n("div", ue, g(a.name), 1),
|
|
174
|
+
n("div", pe, g(t(V)(a)), 1)
|
|
175
|
+
]),
|
|
176
|
+
n("div", fe, " Credit received: " + g(a.currentReceive ?? 0), 1)
|
|
177
|
+
]),
|
|
178
|
+
i(F, {
|
|
179
|
+
icon: "delete",
|
|
180
|
+
"icon-color": "neutral-gray-400",
|
|
181
|
+
variant: "tertiary",
|
|
182
|
+
onClick: (k) => (k.stopPropagation(), x(a))
|
|
183
|
+
}, null, 8, ["onClick"])
|
|
184
|
+
]),
|
|
185
|
+
_: 2
|
|
186
|
+
}, 1032, ["onClick"]))), 128))
|
|
187
|
+
]),
|
|
188
|
+
_: 1
|
|
189
|
+
}),
|
|
190
|
+
t(p).length == 0 ? (d(), y("div", ye, [...o[6] || (o[6] = [
|
|
191
|
+
n("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1)
|
|
192
|
+
])])) : z("", !0)
|
|
193
|
+
], 64)) : (d(), w(A, {
|
|
194
|
+
key: 1,
|
|
195
|
+
variant: "outlined",
|
|
196
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
197
|
+
}, {
|
|
198
|
+
default: C(() => [
|
|
199
|
+
o[7] || (o[7] = n("img", {
|
|
200
|
+
src: G,
|
|
201
|
+
class: "aspect-square w-[150px]"
|
|
202
|
+
}, null, -1)),
|
|
203
|
+
o[8] || (o[8] = n("div", { class: "flex flex-col gap-16 text-center" }, [
|
|
204
|
+
n("div", { class: "fm-typo-en-title-sm-800" }, "Create your credit program"),
|
|
205
|
+
n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credits are virtual money that customers can use to pay for their purchases, similar to cash within your store. ")
|
|
206
|
+
], -1)),
|
|
207
|
+
i(F, {
|
|
208
|
+
variant: "primary",
|
|
209
|
+
label: "Create credit program",
|
|
210
|
+
icon: "add",
|
|
211
|
+
onClick: o[5] || (o[5] = (a) => f())
|
|
212
|
+
})
|
|
213
|
+
]),
|
|
214
|
+
_: 1
|
|
215
|
+
})),
|
|
216
|
+
i(ae, {
|
|
217
|
+
ref_key: "sheetRef",
|
|
218
|
+
ref: b,
|
|
219
|
+
"onSubmit:modelValue": K
|
|
220
|
+
}, null, 512)
|
|
221
|
+
])
|
|
222
|
+
], 64);
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
export {
|
|
227
|
+
Ie as default
|
|
228
|
+
};
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, createCommentVNode, computed, onMounted, toDisplayString, createBlock, withCtx, Fragment, renderList, withModifiers, unref, isRef, createTextVNode, normalizeClass, resolveDynamicComponent, toRefs, normalizeStyle, createSlots } from "vue";
|
|
2
2
|
import { _ } from "./lodash-B5I3zXaY.js";
|
|
3
|
-
import { z } from "./app-
|
|
3
|
+
import { z } from "./app-CqKzNbaV.js";
|
|
4
4
|
import { Z as ZodHelper } from "./zod-Bg2FbC-D.js";
|
|
5
|
-
import { c as getCampaignSummaryObject, C as CampaignOptions } from "./campaign-
|
|
6
|
-
import { c as campaignRefinement, C as CampaignDtos, a as campaignTransform } from "./dto-
|
|
7
|
-
import { u as useMembershipStore } from "./membership-
|
|
8
|
-
import { u as useBusinessStore } from "./business-
|
|
9
|
-
import "./index-
|
|
10
|
-
import { R as RuleBuilder, a as isRuleEntry } from "./rule-builder-
|
|
5
|
+
import { c as getCampaignSummaryObject, C as CampaignOptions } from "./campaign-C1ug3b0o.js";
|
|
6
|
+
import { c as campaignRefinement, C as CampaignDtos, a as campaignTransform } from "./dto-D4_lwPHD.js";
|
|
7
|
+
import { u as useMembershipStore } from "./membership-BjCyjE4I.js";
|
|
8
|
+
import { u as useBusinessStore } from "./business-f0az-Hy3.js";
|
|
9
|
+
import "./index-DKE_93Vz.js";
|
|
10
|
+
import { R as RuleBuilder, a as isRuleEntry } from "./rule-builder-DH7ugfCj.js";
|
|
11
11
|
import { J as JsonViewer } from "./JsonViewer-v8_C7l5N.js";
|
|
12
12
|
import { h as hooks } from "./moment-D7p2TMB-.js";
|
|
13
|
-
import { f as featureVersionMapping } from "./campaign.enum-
|
|
13
|
+
import { f as featureVersionMapping } from "./campaign.enum-C4L_bAhq.js";
|
|
14
14
|
import { _ as _sfc_main$u } from "./ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js";
|
|
15
|
-
import { b as _sfc_main$s, a as _sfc_main$v, _ as _sfc_main$x } from "./EffectSheet.vue_vue_type_style_index_0_lang-
|
|
16
|
-
import { _ as _sfc_main$w } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-
|
|
17
|
-
import { c as core, S as SvcConfig } from "./index-
|
|
18
|
-
import { p as prompt, c as cases, f as firebaseStorage } from "./plugins-
|
|
19
|
-
import { C as Cb } from "./app-
|
|
20
|
-
import { _ as _sfc_main$o } from "./SelectItems.vue_vue_type_script_setup_true_lang-
|
|
15
|
+
import { b as _sfc_main$s, a as _sfc_main$v, _ as _sfc_main$x } from "./EffectSheet.vue_vue_type_style_index_0_lang-B1GJEsLP.js";
|
|
16
|
+
import { _ as _sfc_main$w } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-CgWzp89p.js";
|
|
17
|
+
import { c as core, S as SvcConfig } from "./index-D3teqQy1.js";
|
|
18
|
+
import { p as prompt, c as cases, f as firebaseStorage } from "./plugins-ByKQnwiZ.js";
|
|
19
|
+
import { C as Cb } from "./app-DEnuQng0.js";
|
|
20
|
+
import { _ as _sfc_main$o } from "./SelectItems.vue_vue_type_script_setup_true_lang-tRT9x7z8.js";
|
|
21
21
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
22
|
-
import { _ as _sfc_main$z } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-
|
|
23
|
-
import { _ as _sfc_main$p, a as _sfc_main$q } from "./RuleGroup.vue_vue_type_script_setup_true_lang-
|
|
24
|
-
import { u as useI18n } from "./vue-i18n-
|
|
25
|
-
import { T as TypeToTriggerOptions, _ as _sfc_main$A, b as _sfc_main$B } from "./trigger-
|
|
26
|
-
import { _ as _sfc_main$y } from "./MessageInput.vue_vue_type_script_setup_true_lang-
|
|
27
|
-
import { C as CountryTimezone, m as moment } from "./timezone-
|
|
28
|
-
import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-
|
|
22
|
+
import { _ as _sfc_main$z } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-B4NNtaCf.js";
|
|
23
|
+
import { _ as _sfc_main$p, a as _sfc_main$q } from "./RuleGroup.vue_vue_type_script_setup_true_lang-GHZzkjI1.js";
|
|
24
|
+
import { u as useI18n } from "./vue-i18n-DRGINC-z.js";
|
|
25
|
+
import { T as TypeToTriggerOptions, _ as _sfc_main$A, b as _sfc_main$B } from "./trigger-pjASxQDD.js";
|
|
26
|
+
import { _ as _sfc_main$y } from "./MessageInput.vue_vue_type_script_setup_true_lang-nmCGCPlb.js";
|
|
27
|
+
import { C as CountryTimezone, m as moment } from "./timezone-C8GHauOy.js";
|
|
28
|
+
import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-DIbFCkIF.js";
|
|
29
29
|
import { useCoreStore } from "@feedmepos/mf-common";
|
|
30
|
-
import { _ as _sfc_main$r, a as _sfc_main$t } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-
|
|
31
|
-
import { T as TEMPLATES } from "./index-
|
|
32
|
-
import { v as FdoCreditLoyaltyReward, w as FdtoRandomReward, x as F_MISSION_TYPE, y as FdoThresholdCreditReward, z as FdtoThresholdReward, A as FdoMission } from "./index-
|
|
33
|
-
import "./index-
|
|
34
|
-
import "./index-
|
|
35
|
-
import { a as F_GAME_TYPE } from "./collectible.enum-
|
|
36
|
-
import { u as useLoading } from "./loading-
|
|
37
|
-
import { i as initCollectibleConfig } from "./helper-
|
|
38
|
-
import { C as CollectionUtils } from "./collection.fn-
|
|
30
|
+
import { _ as _sfc_main$r, a as _sfc_main$t } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-CP-Dx2c_.js";
|
|
31
|
+
import { T as TEMPLATES } from "./index-B6tn0V38.js";
|
|
32
|
+
import { v as FdoCreditLoyaltyReward, w as FdtoRandomReward, x as F_MISSION_TYPE, y as FdoThresholdCreditReward, z as FdtoThresholdReward, A as FdoMission } from "./index-0w5iM8ys.js";
|
|
33
|
+
import "./index-DyHdG826.js";
|
|
34
|
+
import "./index-BtKNK5T0.js";
|
|
35
|
+
import { a as F_GAME_TYPE } from "./collectible.enum-BF-mjm1H.js";
|
|
36
|
+
import { u as useLoading } from "./loading-BqoQX5Rb.js";
|
|
37
|
+
import { i as initCollectibleConfig } from "./helper-CoeWXTPv.js";
|
|
38
|
+
import { C as CollectionUtils } from "./collection.fn-D8zx6kSt.js";
|
|
39
39
|
import { s as sentenceCase$1 } from "./index-CsaQJMAR.js";
|
|
40
|
-
import "./index-
|
|
40
|
+
import "./index-7WIUEYn9.js";
|
|
41
41
|
import { useDialog } from "@feedmepos/ui-library";
|
|
42
|
-
import { u as useCampaignStore } from "./campaign-
|
|
42
|
+
import { u as useCampaignStore } from "./campaign-C_81NbFH.js";
|
|
43
43
|
import { a as cleanPF } from "./object-qECH92oz.js";
|
|
44
44
|
function summarizeGrabDiscount(e) {
|
|
45
45
|
if (!e)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as P, ref as O, onMounted as Q, computed as H, resolveComponent as y, openBlock as s, createElementBlock as x, renderSlot as W, toDisplayString as w, createCommentVNode as v, createBlock as f, unref as e, isRef as q, createVNode as b, normalizeClass as G, watch as X, withCtx as F, resolveDynamicComponent as R, Fragment as _, createElementVNode as U, createTextVNode as ee } from "vue";
|
|
2
|
-
import { z as te } from "./app-
|
|
2
|
+
import { z as te } from "./app-CqKzNbaV.js";
|
|
3
3
|
import { Z as u } from "./zod-Bg2FbC-D.js";
|
|
4
|
-
import { g as le, f as oe } from "./index-
|
|
5
|
-
import { u as Z } from "./vue-i18n-
|
|
6
|
-
import { s as C } from "./effect-
|
|
7
|
-
import { p as ae } from "./plugins-
|
|
8
|
-
import { e as ne } from "./app-
|
|
4
|
+
import { g as le, f as oe } from "./index-DKE_93Vz.js";
|
|
5
|
+
import { u as Z } from "./vue-i18n-DRGINC-z.js";
|
|
6
|
+
import { s as C } from "./effect-ByjBLNIU.js";
|
|
7
|
+
import { p as ae } from "./plugins-ByKQnwiZ.js";
|
|
8
|
+
import { e as ne } from "./app-DEnuQng0.js";
|
|
9
9
|
const ie = { class: "flex flex-col gap-8" }, se = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "fm-typo-en-body-lg-600"
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { defineComponent as E, ref as S, computed as U, onMounted as j, resolveComponent as m, openBlock as p, createElementBlock as _, Fragment as x, createVNode as i, unref as o, createElementVNode as a, withCtx as h, renderList as M, createBlock as w, resolveDynamicComponent as H, toDisplayString as u, h as q } from "vue";
|
|
2
|
+
import { _ as z } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as G, components as J } from "@feedmepos/ui-library";
|
|
4
|
+
import { p as Q } from "./plugins-ByKQnwiZ.js";
|
|
5
|
+
import { u as W } from "./loading-BqoQX5Rb.js";
|
|
6
|
+
import { u as X } from "./business-f0az-Hy3.js";
|
|
7
|
+
import { u as Y } from "./campaign-C_81NbFH.js";
|
|
8
|
+
import { a as L, b as V, g as Z } from "./campaign-C1ug3b0o.js";
|
|
9
|
+
import { u as ee } from "./vue-i18n-DRGINC-z.js";
|
|
10
|
+
import { _ as te } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
11
|
+
import { _ as oe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-t3kWWMMd.js";
|
|
12
|
+
import { u as ne } from "./template-BvQVIEJZ.js";
|
|
13
|
+
import { c as g } from "./index-B8bKqIlt.js";
|
|
14
|
+
const ae = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-center justify-between w-full" }, se = { class: "flex gap-8 overflow-x-auto" }, ie = { class: "space-y-8" }, ce = { class: "flex w-full gap-4 items-center" }, le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, me = { class: "space-y-4" }, de = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ie = /* @__PURE__ */ E({
|
|
15
|
+
__name: "Experience",
|
|
16
|
+
setup(_e) {
|
|
17
|
+
const { t: r } = ee(), P = {
|
|
18
|
+
label: r("connect.program.common.actions.create", {
|
|
19
|
+
type: r("connect.program.experience.title").toLowerCase()
|
|
20
|
+
}),
|
|
21
|
+
value: "create",
|
|
22
|
+
isPrimary: !0,
|
|
23
|
+
prependIcon: "add"
|
|
24
|
+
}, B = ne("POINT", G()), I = X(), d = Y(), { global: T, minor: v } = W, s = S({
|
|
25
|
+
searchKey: "",
|
|
26
|
+
location: []
|
|
27
|
+
});
|
|
28
|
+
function $(e) {
|
|
29
|
+
const t = s.value.location;
|
|
30
|
+
return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
|
|
31
|
+
var c;
|
|
32
|
+
return (c = e == null ? void 0 : e.targetLocation) == null ? void 0 : c.includes(l);
|
|
33
|
+
}) : e.targetLocation.includes(t);
|
|
34
|
+
}
|
|
35
|
+
const f = U(
|
|
36
|
+
() => d.campaigns.experience.filter((e) => $(e))
|
|
37
|
+
), K = [
|
|
38
|
+
{
|
|
39
|
+
header: "Program title",
|
|
40
|
+
accessorFn: (e) => e.name
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
header: "Status",
|
|
44
|
+
accessorFn: (e) => Z(e),
|
|
45
|
+
cell(e) {
|
|
46
|
+
return L(e.row.original);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
header: "Summary",
|
|
51
|
+
accessorFn: (e) => V(e)
|
|
52
|
+
//v.effect,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
header: "Actions",
|
|
56
|
+
cell(e) {
|
|
57
|
+
return q(J.FmButton, {
|
|
58
|
+
variant: "tertiary",
|
|
59
|
+
icon: "delete",
|
|
60
|
+
iconColor: "neutral-gray-400",
|
|
61
|
+
onClick: (t) => {
|
|
62
|
+
t.stopPropagation(), C(e.row.original);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
], b = S();
|
|
68
|
+
async function C(e) {
|
|
69
|
+
await Q.remove(`Are you sure you want to remove ${e.name}?`) && await v(
|
|
70
|
+
async () => {
|
|
71
|
+
await g.delete(e._id), await d.read("POINT");
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
message: `Removing ${e.name}`,
|
|
75
|
+
successMessage: `Removed ${e.name} successfully`
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
async function y(e) {
|
|
80
|
+
e ? await t() : B.open(async (l) => {
|
|
81
|
+
await t(l);
|
|
82
|
+
});
|
|
83
|
+
async function t(l) {
|
|
84
|
+
var c;
|
|
85
|
+
(c = b.value) == null || c.showSheet(
|
|
86
|
+
!0,
|
|
87
|
+
"POINT",
|
|
88
|
+
e ? await g.readById(e._id) : void 0,
|
|
89
|
+
l
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
async function N(e) {
|
|
94
|
+
await v(
|
|
95
|
+
async () => {
|
|
96
|
+
e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await d.read("POINT");
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
message: r("connect.program.common.update.updating", {
|
|
100
|
+
type: r("connect.program.experience.title")
|
|
101
|
+
}),
|
|
102
|
+
successMessage: r("connect.program.common.update.success", {
|
|
103
|
+
type: r("connect.program.experience.title"),
|
|
104
|
+
action: e.campaign._id ? "updated" : "created"
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
return j(async () => {
|
|
110
|
+
await T(async () => {
|
|
111
|
+
await d.read("POINT");
|
|
112
|
+
});
|
|
113
|
+
}), (e, t) => {
|
|
114
|
+
const l = m("FmPageHead"), c = m("FmSearch"), R = m("FmTable"), F = m("FmButton"), A = m("FmListItem"), O = m("FmList"), D = m("FmCard");
|
|
115
|
+
return p(), _(x, null, [
|
|
116
|
+
i(l, {
|
|
117
|
+
title: o(r)("connect.program.experience.title"),
|
|
118
|
+
actions: o(f).length > 0 ? [P] : [],
|
|
119
|
+
"onClick:action": t[0] || (t[0] = () => y())
|
|
120
|
+
}, null, 8, ["title", "actions"]),
|
|
121
|
+
a("div", ae, [
|
|
122
|
+
i(c, {
|
|
123
|
+
modelValue: o(s).searchKey,
|
|
124
|
+
"onUpdate:modelValue": t[1] || (t[1] = (n) => o(s).searchKey = n),
|
|
125
|
+
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
126
|
+
placeholder: o(r)("connect.program.common.search"),
|
|
127
|
+
collapsible: ""
|
|
128
|
+
}, null, 8, ["modelValue", "placeholder"]),
|
|
129
|
+
o(d).campaigns.experience && o(d).campaigns.experience.length > 0 ? (p(), _(x, { key: 0 }, [
|
|
130
|
+
a("div", re, [
|
|
131
|
+
a("div", se, [
|
|
132
|
+
i(te, {
|
|
133
|
+
label: `${o(r)("connect.common.location")}: `,
|
|
134
|
+
"right-icon": "keyboard_arrow_down",
|
|
135
|
+
modelValue: o(s).location,
|
|
136
|
+
"onUpdate:modelValue": t[2] || (t[2] = (n) => o(s).location = n),
|
|
137
|
+
icon: "storefront",
|
|
138
|
+
"show-item-label": !0,
|
|
139
|
+
items: o(I).locationOptions
|
|
140
|
+
}, null, 8, ["label", "modelValue", "items"])
|
|
141
|
+
]),
|
|
142
|
+
i(c, {
|
|
143
|
+
modelValue: o(s).searchKey,
|
|
144
|
+
"onUpdate:modelValue": t[3] || (t[3] = (n) => o(s).searchKey = n),
|
|
145
|
+
class: "xs:hidden",
|
|
146
|
+
placeholder: "search",
|
|
147
|
+
collapsible: ""
|
|
148
|
+
}, null, 8, ["modelValue"])
|
|
149
|
+
]),
|
|
150
|
+
i(R, {
|
|
151
|
+
class: "xs:hidden",
|
|
152
|
+
"row-data": o(f),
|
|
153
|
+
"column-defs": K,
|
|
154
|
+
"search-value": o(s).searchKey,
|
|
155
|
+
"column-filter": [],
|
|
156
|
+
onRowClick: t[4] || (t[4] = (n) => y(n.original)),
|
|
157
|
+
"hide-footer": o(f).length < 10
|
|
158
|
+
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
159
|
+
i(O, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
160
|
+
default: h(() => [
|
|
161
|
+
(p(!0), _(x, null, M(o(f).filter(
|
|
162
|
+
(n) => n.name.toLowerCase().includes(o(s).searchKey.toLowerCase())
|
|
163
|
+
), (n) => (p(), w(A, {
|
|
164
|
+
key: n._id.toString(),
|
|
165
|
+
onClick: (k) => y(n),
|
|
166
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
167
|
+
}, {
|
|
168
|
+
default: h(() => [
|
|
169
|
+
a("div", ie, [
|
|
170
|
+
a("div", ce, [
|
|
171
|
+
(p(), w(H(o(L)(n)))),
|
|
172
|
+
a("div", le, u(n.currentReceive ?? 0) + " used ", 1)
|
|
173
|
+
]),
|
|
174
|
+
a("div", me, [
|
|
175
|
+
a("div", de, u(n.name), 1),
|
|
176
|
+
a("div", pe, u(o(V)(n)), 1)
|
|
177
|
+
]),
|
|
178
|
+
a("div", ue, u(o(r)("connect.program.experience.received", {
|
|
179
|
+
count: n.currentReceive ?? 0
|
|
180
|
+
})), 1)
|
|
181
|
+
]),
|
|
182
|
+
i(F, {
|
|
183
|
+
icon: "delete",
|
|
184
|
+
"icon-color": "neutral-gray-400",
|
|
185
|
+
variant: "tertiary",
|
|
186
|
+
onClick: (k) => (k.stopPropagation(), C(n))
|
|
187
|
+
}, null, 8, ["onClick"])
|
|
188
|
+
]),
|
|
189
|
+
_: 2
|
|
190
|
+
}, 1032, ["onClick"]))), 128))
|
|
191
|
+
]),
|
|
192
|
+
_: 1
|
|
193
|
+
})
|
|
194
|
+
], 64)) : (p(), w(D, {
|
|
195
|
+
key: 1,
|
|
196
|
+
variant: "outlined",
|
|
197
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
198
|
+
}, {
|
|
199
|
+
default: h(() => [
|
|
200
|
+
t[6] || (t[6] = a("img", {
|
|
201
|
+
src: z,
|
|
202
|
+
class: "aspect-square w-[150px]"
|
|
203
|
+
}, null, -1)),
|
|
204
|
+
a("div", fe, [
|
|
205
|
+
a("div", ye, u(o(r)("connect.program.experience.empty_state.title")), 1),
|
|
206
|
+
a("div", ge, u(o(r)("connect.program.experience.empty_state.description")), 1)
|
|
207
|
+
]),
|
|
208
|
+
i(F, {
|
|
209
|
+
variant: "primary",
|
|
210
|
+
label: "Create experience program",
|
|
211
|
+
icon: "add",
|
|
212
|
+
onClick: t[5] || (t[5] = (n) => y())
|
|
213
|
+
})
|
|
214
|
+
]),
|
|
215
|
+
_: 1
|
|
216
|
+
})),
|
|
217
|
+
i(oe, {
|
|
218
|
+
ref_key: "sheetRef",
|
|
219
|
+
ref: b,
|
|
220
|
+
"onSubmit:modelValue": N
|
|
221
|
+
}, null, 512)
|
|
222
|
+
])
|
|
223
|
+
], 64);
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
export {
|
|
228
|
+
Ie as default
|
|
229
|
+
};
|