@feedmepos/mf-connect 0.1.48-prod → 0.1.50-prod
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-DrjBaKmx.js → Analytic-DetQY5GC.js} +11 -11
- package/dist/{App-eIaytGsZ.js → App-BKAkMGZw.js} +7 -7
- package/dist/{Bin-CVp0eFwl.js → Bin-DqWL1Uxx.js} +8 -8
- package/dist/Broadcast-8QF-MUmN.js +233 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CugJWeBo.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D7hZS2PW.js} +6 -6
- package/dist/{Card-DkP6oJVn.js → Card-sor9JviQ.js} +16 -16
- package/dist/{Collections-DYb_aeTW.js → Collections-C0Db6mEj.js} +7 -7
- package/dist/Credit-rEapztLw.js +228 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Dt9c2kvf.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BmBKIEVi.js} +30 -30
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DT3y4k1C.js → EffectSheet.vue_vue_type_style_index_0_lang-CurNXC5g.js} +6 -6
- package/dist/Experience--KRaE_Li.js +229 -0
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/{Game-C7jxRESY.js → Game-DAkkgwzf.js} +103 -97
- package/dist/{Index-DYr1p4sh.js → Index-DU5r6mjQ.js} +10 -10
- package/dist/{Marketing-Djl27fez.js → Marketing-Ct5vKaig.js} +6 -6
- package/dist/{Member-CWXedfTG.js → Member-Dc4-BH4L.js} +10 -10
- package/dist/{MemberList-C2TvGi22.js → MemberList-CxwklJTB.js} +25 -25
- package/dist/{MemberTransactions-BSUocGg9.js → MemberTransactions-CwzDZAl2.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-D8xPA6jM.js → MessageInput.vue_vue_type_script_setup_true_lang-CPQt4nvp.js} +7 -7
- package/dist/{Mission-BVx9Cqi5.js → Mission-Bn1aqRYm.js} +112 -106
- package/dist/{Overview-DyXF9zfB.js → Overview-Dx-7fuPI.js} +18 -18
- package/dist/Point-sitkRn9W.js +232 -0
- package/dist/{Promotion-B0Q6GItP.js → Promotion-Gfnd0zqz.js} +11 -11
- package/dist/{Queue-BAWG1Hh-.js → Queue-r2m3kpfO.js} +11 -11
- package/dist/{Record-CTp80g4A.js → Record-C2lwWPrY.js} +8 -8
- package/dist/{Reward-_Jow1lJ7.js → Reward-6_bESA4r.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BV8xCejA.js → RewardGroup.vue_vue_type_script_setup_true_lang-S_jJxZYB.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DkDAuGY0.js → RuleGroup.vue_vue_type_script_setup_true_lang-dK8IcQjI.js} +13 -13
- package/dist/{Segment-CsdJ1SjK.js → Segment-CIKgedqx.js} +22 -22
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DH3oIm2t.js → SelectItems.vue_vue_type_script_setup_true_lang-Co6QzIYj.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DvVrjpxR.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-y2UFm_m_.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D5gV89Xk.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DZDWIry7.js} +3 -3
- package/dist/{Setting-BZRA50LO.js → Setting-k_xmt5bE.js} +11 -11
- package/dist/{Store-CFnCN_7-.js → Store-Ag9cJqq5.js} +19 -19
- package/dist/{StoreRewards-B_McpBz-.js → StoreRewards-RO9OsV_l.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-vL0vr-Xn.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BmBZgPtR.js} +20 -20
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C1ZlLdme.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BNtW7Fdv.js} +1 -1
- package/dist/{Tier-CCYFu6kJ.js → Tier-Cm-xmOeT.js} +20 -20
- package/dist/{Title-7Mg-Ml4z.js → Title-IRrmK7t7.js} +19 -19
- package/dist/{Transaction-BqZrbpZi.js → Transaction-BaGLhfdx.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-C6ZwPUD4.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BP1HZcmM.js} +6 -6
- package/dist/{Voucher-Yty_7SuS.js → Voucher-BvH508SF.js} +14 -14
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Bt12t3gB.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BRbpOzoW.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C3NHrEIl.js → ZodTextField.vue_vue_type_script_setup_true_lang-BO13CzIt.js} +1 -1
- package/dist/{app-2EJP4psh.js → app-CoIOKtZT.js} +30 -30
- package/dist/{app-Dzon--6x.js → app-DInntAeW.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-BehG4fR2.js → business-CEezohK9.js} +11 -8
- package/dist/{campaign-CAcP56Sz.js → campaign-BiJIXVFh.js} +2 -2
- package/dist/{campaign-BpaiTG4f.js → campaign-DN4wRHB1.js} +9 -9
- package/dist/{campaign.enum-BWjI8Hop.js → campaign.enum-B1ofvKe0.js} +1 -1
- package/dist/{campaign.fn-PVdB1-V1.js → campaign.fn-CHOnx0h3.js} +33 -33
- package/dist/{collectible.enum-BYmuqayi.js → collectible.enum-DCJQ4kRG.js} +1 -1
- package/dist/{collection.fn-CbH8hbWW.js → collection.fn-DDUQOBpT.js} +2 -2
- package/dist/{dto-Dd3Oc4QO.js → dto-PJfDH2ob.js} +4 -4
- package/dist/{effect-DvEQNEl0.js → effect-BG3qfaJa.js} +1 -1
- package/dist/{email-addresses-C-9JrAi8.js → email-addresses-_qAqETU4.js} +1 -1
- package/dist/{export-RWE9Cn-d.js → export-BkXHJNqp.js} +3 -3
- package/dist/{helper-Bl6LdWED.js → helper-DURbnPWw.js} +1 -1
- package/dist/{index-BCQMVr1J.js → index-0vL_6ITj.js} +1 -1
- package/dist/{index-wOExBjGo.js → index-B-sSLyBV.js} +1 -1
- package/dist/{index-DX1X6Owa.js → index-BAmB5yiT.js} +1 -1
- package/dist/{index-G_XSbrXB.js → index-BZ64wqfO.js} +4 -4
- package/dist/{index-Bgnrbk5x.js → index-BnIQoKWu.js} +1 -1
- package/dist/{index-CFW9ogow.js → index-DO21OBbC.js} +1 -1
- package/dist/{index-DhUvELhc.js → index-DX-ycdBx.js} +3 -3
- package/dist/{index-VVy4GPzJ.js → index-D_UkMUVu.js} +1 -1
- package/dist/{index-DpoNuVc-.js → index-DyqlTP2f.js} +6 -6
- package/dist/{index-CfgczUMX.js → index-KuVAb425.js} +2 -2
- package/dist/{index-1bU9cLqV.js → index-cdBSUDQZ.js} +1 -1
- package/dist/{index-CzCqc7ph.js → index-ckRnO0P8.js} +1 -1
- package/dist/{index-DZN5WWgq.js → index-iqGVdsb3.js} +3 -3
- package/dist/{index-Bjf5Z2QE.js → index-wBtnVW6-.js} +4 -4
- package/dist/{index.esm2017-DfgZFSqe.js → index.esm2017-xsA1Ke9N.js} +40 -40
- package/dist/{loading-qlqqYGF3.js → loading-JUECGK_w.js} +1 -1
- package/dist/{membership-Bh_1iu5v.js → membership-3dOL9I-2.js} +3 -3
- package/dist/{money-DvTB_Fek.js → money-Bj8WRBgr.js} +1 -1
- package/dist/{number-DJQ3gi1P.js → number-C3eoGwAF.js} +1 -1
- package/dist/objectid-BbM7wSa-.js +145 -0
- package/dist/{plugins-DJpBrPbQ.js → plugins-CihdO0FL.js} +2 -2
- package/dist/{reward-DZ4KlN9B.js → reward-B7voCFtP.js} +1 -1
- package/dist/{rule-DV0yCGlq.js → rule-CRac4es-.js} +3 -3
- package/dist/{rule-builder-D6ihVPNO.js → rule-builder-PIKcs0df.js} +1 -1
- package/dist/{template-ElP-JIFL.js → template-DkXoHjc6.js} +4 -4
- package/dist/{timezone-FaHjut_D.js → timezone-gOOWBZ0e.js} +1 -1
- package/dist/{trigger-D8wnJVTA.js → trigger-ByWt9UsS.js} +4 -4
- package/dist/{user-NWV9KppR.js → user-HwAeHnO-.js} +1 -1
- package/dist/{vue-i18n-CkbS-IDD.js → vue-i18n-BlWI3iG4.js} +247 -247
- package/dist/{xlsx-CdQE5RZi.js → xlsx-Cdgu-2pL.js} +1 -1
- package/package.json +1 -1
- package/dist/Broadcast-DBgBT6yz.js +0 -227
- package/dist/Credit-WVv_PL5D.js +0 -222
- package/dist/Experience-BdH44wBG.js +0 -223
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
- package/dist/Point-ovkgTwZO.js +0 -226
- package/dist/objectid-BKU0cEuv.js +0 -145
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import { defineComponent as D, ref as S, computed as E, onMounted as U, resolveComponent as i, openBlock as m, createElementBlock as _, Fragment as x, createVNode as c, unref as t, createElementVNode as n, withCtx as h, renderList as j, createBlock as w, resolveDynamicComponent as M, toDisplayString as p, h as H } from "vue";
|
|
2
|
-
import { _ as q } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as z, components as G } from "@feedmepos/ui-library";
|
|
4
|
-
import { p as J } from "./plugins-DJpBrPbQ.js";
|
|
5
|
-
import { u as Q } from "./loading-qlqqYGF3.js";
|
|
6
|
-
import { u as W } from "./business-BehG4fR2.js";
|
|
7
|
-
import { u as X } from "./campaign-CAcP56Sz.js";
|
|
8
|
-
import { a as L, b as V, g as Y } from "./campaign-BpaiTG4f.js";
|
|
9
|
-
import { u as Z } from "./vue-i18n-CkbS-IDD.js";
|
|
10
|
-
import { _ as ee } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
11
|
-
import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-Dt9c2kvf.js";
|
|
12
|
-
import { u as oe } from "./template-ElP-JIFL.js";
|
|
13
|
-
import { c as g } from "./index-BCQMVr1J.js";
|
|
14
|
-
const ae = { class: "px-24 flex flex-col gap-y-16" }, ne = { class: "flex items-center justify-between w-full" }, se = { class: "flex gap-8 overflow-x-auto" }, re = { class: "space-y-8" }, ce = { class: "flex w-full gap-4 items-center" }, ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, le = { class: "space-y-4" }, me = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = { class: "flex flex-col gap-16 text-center" }, fe = { class: "fm-typo-en-title-sm-800" }, ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = /* @__PURE__ */ D({
|
|
15
|
-
__name: "Experience",
|
|
16
|
-
setup(ge) {
|
|
17
|
-
const { t: s } = Z(), I = {
|
|
18
|
-
label: s("connect.program.common.actions.create", {
|
|
19
|
-
type: s("connect.program.experience.title").toLowerCase()
|
|
20
|
-
}),
|
|
21
|
-
value: "create",
|
|
22
|
-
isPrimary: !0,
|
|
23
|
-
prependIcon: "add"
|
|
24
|
-
}, P = oe("POINT", z()), B = W(), l = X(), { global: T, minor: v } = Q, r = S({
|
|
25
|
-
searchKey: "",
|
|
26
|
-
location: null
|
|
27
|
-
}), f = E(
|
|
28
|
-
() => l.campaigns.experience.filter(
|
|
29
|
-
(e) => !r.value.location || !e.targetLocation || e.targetLocation.includes(r.value.location)
|
|
30
|
-
)
|
|
31
|
-
), K = [
|
|
32
|
-
{
|
|
33
|
-
header: "Program title",
|
|
34
|
-
accessorFn: (e) => e.name
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
header: "Status",
|
|
38
|
-
accessorFn: (e) => Y(e),
|
|
39
|
-
cell(e) {
|
|
40
|
-
return L(e.row.original);
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
header: "Summary",
|
|
45
|
-
accessorFn: (e) => V(e)
|
|
46
|
-
//v.effect,
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
header: "Actions",
|
|
50
|
-
cell(e) {
|
|
51
|
-
return H(G.FmButton, {
|
|
52
|
-
variant: "tertiary",
|
|
53
|
-
icon: "delete",
|
|
54
|
-
iconColor: "neutral-gray-400",
|
|
55
|
-
onClick: (o) => {
|
|
56
|
-
o.stopPropagation(), C(e.row.original);
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
], b = S();
|
|
62
|
-
async function C(e) {
|
|
63
|
-
await J.remove(`Are you sure you want to remove ${e.name}?`) && await v(
|
|
64
|
-
async () => {
|
|
65
|
-
await g.delete(e._id), await l.read("POINT");
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
message: `Removing ${e.name}`,
|
|
69
|
-
successMessage: `Removed ${e.name} successfully`
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
async function y(e) {
|
|
74
|
-
e ? await o() : P.open(async (d) => {
|
|
75
|
-
await o(d);
|
|
76
|
-
});
|
|
77
|
-
async function o(d) {
|
|
78
|
-
var u;
|
|
79
|
-
(u = b.value) == null || u.showSheet(
|
|
80
|
-
!0,
|
|
81
|
-
"POINT",
|
|
82
|
-
e ? await g.readById(e._id) : void 0,
|
|
83
|
-
d
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
async function N(e) {
|
|
88
|
-
await v(
|
|
89
|
-
async () => {
|
|
90
|
-
e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await l.read("POINT");
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
message: s("connect.program.common.update.updating", {
|
|
94
|
-
type: s("connect.program.experience.title")
|
|
95
|
-
}),
|
|
96
|
-
successMessage: s("connect.program.common.update.success", {
|
|
97
|
-
type: s("connect.program.experience.title"),
|
|
98
|
-
action: e.campaign._id ? "updated" : "created"
|
|
99
|
-
})
|
|
100
|
-
}
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
return U(async () => {
|
|
104
|
-
await T(async () => {
|
|
105
|
-
await l.read("POINT");
|
|
106
|
-
});
|
|
107
|
-
}), (e, o) => {
|
|
108
|
-
const d = i("FmPageHead"), u = i("FmSearch"), R = i("FmTable"), F = i("FmButton"), $ = i("FmListItem"), O = i("FmList"), A = i("FmCard");
|
|
109
|
-
return m(), _(x, null, [
|
|
110
|
-
c(d, {
|
|
111
|
-
title: t(s)("connect.program.experience.title"),
|
|
112
|
-
actions: t(f).length > 0 ? [I] : [],
|
|
113
|
-
"onClick:action": o[0] || (o[0] = () => y())
|
|
114
|
-
}, null, 8, ["title", "actions"]),
|
|
115
|
-
n("div", ae, [
|
|
116
|
-
c(u, {
|
|
117
|
-
modelValue: t(r).searchKey,
|
|
118
|
-
"onUpdate:modelValue": o[1] || (o[1] = (a) => t(r).searchKey = a),
|
|
119
|
-
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
120
|
-
placeholder: t(s)("connect.program.common.search"),
|
|
121
|
-
collapsible: ""
|
|
122
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
123
|
-
t(l).campaigns.experience && t(l).campaigns.experience.length > 0 ? (m(), _(x, { key: 0 }, [
|
|
124
|
-
n("div", ne, [
|
|
125
|
-
n("div", se, [
|
|
126
|
-
c(ee, {
|
|
127
|
-
modelValue: t(r).location,
|
|
128
|
-
"onUpdate:modelValue": o[2] || (o[2] = (a) => t(r).location = a),
|
|
129
|
-
label: "Location: ",
|
|
130
|
-
"show-item-label": !0,
|
|
131
|
-
icon: "storefront",
|
|
132
|
-
placement: "bottom-start",
|
|
133
|
-
items: t(B).locationItems
|
|
134
|
-
}, null, 8, ["modelValue", "items"])
|
|
135
|
-
]),
|
|
136
|
-
c(u, {
|
|
137
|
-
modelValue: t(r).searchKey,
|
|
138
|
-
"onUpdate:modelValue": o[3] || (o[3] = (a) => t(r).searchKey = a),
|
|
139
|
-
class: "xs:hidden",
|
|
140
|
-
placeholder: "search",
|
|
141
|
-
collapsible: ""
|
|
142
|
-
}, null, 8, ["modelValue"])
|
|
143
|
-
]),
|
|
144
|
-
c(R, {
|
|
145
|
-
class: "xs:hidden",
|
|
146
|
-
"row-data": t(f),
|
|
147
|
-
"column-defs": K,
|
|
148
|
-
"search-value": t(r).searchKey,
|
|
149
|
-
"column-filter": [],
|
|
150
|
-
onRowClick: o[4] || (o[4] = (a) => y(a.original)),
|
|
151
|
-
"hide-footer": t(f).length < 10
|
|
152
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
153
|
-
c(O, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
154
|
-
default: h(() => [
|
|
155
|
-
(m(!0), _(x, null, j(t(f).filter(
|
|
156
|
-
(a) => a.name.toLowerCase().includes(t(r).searchKey.toLowerCase())
|
|
157
|
-
), (a) => (m(), w($, {
|
|
158
|
-
key: a._id.toString(),
|
|
159
|
-
onClick: (k) => y(a),
|
|
160
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
161
|
-
}, {
|
|
162
|
-
default: h(() => [
|
|
163
|
-
n("div", re, [
|
|
164
|
-
n("div", ce, [
|
|
165
|
-
(m(), w(M(t(L)(a)))),
|
|
166
|
-
n("div", ie, p(a.currentReceive ?? 0) + " used ", 1)
|
|
167
|
-
]),
|
|
168
|
-
n("div", le, [
|
|
169
|
-
n("div", me, p(a.name), 1),
|
|
170
|
-
n("div", pe, p(t(V)(a)), 1)
|
|
171
|
-
]),
|
|
172
|
-
n("div", de, p(t(s)("connect.program.experience.received", {
|
|
173
|
-
count: a.currentReceive ?? 0
|
|
174
|
-
})), 1)
|
|
175
|
-
]),
|
|
176
|
-
c(F, {
|
|
177
|
-
icon: "delete",
|
|
178
|
-
"icon-color": "neutral-gray-400",
|
|
179
|
-
variant: "tertiary",
|
|
180
|
-
onClick: (k) => (k.stopPropagation(), C(a))
|
|
181
|
-
}, null, 8, ["onClick"])
|
|
182
|
-
]),
|
|
183
|
-
_: 2
|
|
184
|
-
}, 1032, ["onClick"]))), 128))
|
|
185
|
-
]),
|
|
186
|
-
_: 1
|
|
187
|
-
})
|
|
188
|
-
], 64)) : (m(), w(A, {
|
|
189
|
-
key: 1,
|
|
190
|
-
variant: "outlined",
|
|
191
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
192
|
-
}, {
|
|
193
|
-
default: h(() => [
|
|
194
|
-
o[6] || (o[6] = n("img", {
|
|
195
|
-
src: q,
|
|
196
|
-
class: "aspect-square w-[150px]"
|
|
197
|
-
}, null, -1)),
|
|
198
|
-
n("div", ue, [
|
|
199
|
-
n("div", fe, p(t(s)("connect.program.experience.empty_state.title")), 1),
|
|
200
|
-
n("div", ye, p(t(s)("connect.program.experience.empty_state.description")), 1)
|
|
201
|
-
]),
|
|
202
|
-
c(F, {
|
|
203
|
-
variant: "primary",
|
|
204
|
-
label: "Create experience program",
|
|
205
|
-
icon: "add",
|
|
206
|
-
onClick: o[5] || (o[5] = (a) => y())
|
|
207
|
-
})
|
|
208
|
-
]),
|
|
209
|
-
_: 1
|
|
210
|
-
})),
|
|
211
|
-
c(te, {
|
|
212
|
-
ref_key: "sheetRef",
|
|
213
|
-
ref: b,
|
|
214
|
-
"onSubmit:modelValue": N
|
|
215
|
-
}, null, 512)
|
|
216
|
-
])
|
|
217
|
-
], 64);
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
export {
|
|
222
|
-
Pe as default
|
|
223
|
-
};
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { defineComponent as V, ref as y, computed as q, onMounted as x, resolveComponent as s, openBlock as r, createBlock as m, unref as u, withCtx as d, createVNode as i, normalizeClass as p, createCommentVNode as j, createElementVNode as I, toDisplayString as h, createElementBlock as M, Fragment as O, renderList as S } from "vue";
|
|
2
|
-
const A = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, N = /* @__PURE__ */ V({
|
|
3
|
-
__name: "FilterChip",
|
|
4
|
-
props: {
|
|
5
|
-
modelValue: {
|
|
6
|
-
type: Array,
|
|
7
|
-
required: !1
|
|
8
|
-
},
|
|
9
|
-
label: {
|
|
10
|
-
type: String,
|
|
11
|
-
required: !1,
|
|
12
|
-
default: ""
|
|
13
|
-
},
|
|
14
|
-
showItemLabel: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
default: !1
|
|
17
|
-
},
|
|
18
|
-
placement: {
|
|
19
|
-
type: String,
|
|
20
|
-
required: !1,
|
|
21
|
-
default: "bottom-end"
|
|
22
|
-
},
|
|
23
|
-
class: {
|
|
24
|
-
type: String,
|
|
25
|
-
required: !1
|
|
26
|
-
},
|
|
27
|
-
disabled: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
required: !1
|
|
30
|
-
},
|
|
31
|
-
items: {
|
|
32
|
-
type: Array,
|
|
33
|
-
required: !0
|
|
34
|
-
},
|
|
35
|
-
icon: {
|
|
36
|
-
type: String,
|
|
37
|
-
required: !1
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
emits: ["update:model-value"],
|
|
41
|
-
setup(o, { emit: g }) {
|
|
42
|
-
const t = o, v = g, c = y(!1), e = y({}), k = q(() => {
|
|
43
|
-
const l = Object.keys(e.value).length;
|
|
44
|
-
return !e.value || Object.keys(e.value).length == t.items.length || l === 0 ? "All" : `${l > 0 ? l : "None"} selected`;
|
|
45
|
-
});
|
|
46
|
-
function _(l) {
|
|
47
|
-
e.value[l] ? delete e.value[l] : e.value[l] = !0, v("update:model-value", Object.keys(e.value));
|
|
48
|
-
}
|
|
49
|
-
function C() {
|
|
50
|
-
Object.keys(e.value).length > 0 ? e.value = {} : e.value = t.items.reduce((l, n) => (l[n.value] = !0, l), {}), v("update:model-value", Object.keys(e.value));
|
|
51
|
-
}
|
|
52
|
-
return x(() => {
|
|
53
|
-
e.value = t.modelValue.reduce(
|
|
54
|
-
(l, n) => (l[n] = !0, l),
|
|
55
|
-
{}
|
|
56
|
-
), t.modelValue.length == 0;
|
|
57
|
-
}), (l, n) => {
|
|
58
|
-
const b = s("FmIcon"), F = s("FmChip"), f = s("FmMenuItem"), w = s("FmMenu");
|
|
59
|
-
return r(), m(w, {
|
|
60
|
-
placement: o.placement || "bottom-end",
|
|
61
|
-
disabled: o.disabled == !0,
|
|
62
|
-
"model-value": u(c),
|
|
63
|
-
onMenuChanged: n[0] || (n[0] = (a) => c.value = a),
|
|
64
|
-
"close-on-click": !1
|
|
65
|
-
}, {
|
|
66
|
-
"menu-button": d(() => [
|
|
67
|
-
i(F, {
|
|
68
|
-
label: o.label,
|
|
69
|
-
class: p(t.class || "text-fm-color-neutral-gray-400 cursor-pointer")
|
|
70
|
-
}, {
|
|
71
|
-
default: d(() => [
|
|
72
|
-
t.icon ? (r(), m(b, {
|
|
73
|
-
key: 0,
|
|
74
|
-
name: t.icon,
|
|
75
|
-
class: p(t.class),
|
|
76
|
-
outline: "",
|
|
77
|
-
size: "sm"
|
|
78
|
-
}, null, 8, ["name", "class"])) : j("", !0),
|
|
79
|
-
I("div", A, h(t.label) + " " + h(o.showItemLabel ? u(k) : ""), 1),
|
|
80
|
-
i(b, {
|
|
81
|
-
name: u(c) ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
82
|
-
class: p(t.class),
|
|
83
|
-
outline: "",
|
|
84
|
-
size: "sm"
|
|
85
|
-
}, null, 8, ["name", "class"])
|
|
86
|
-
]),
|
|
87
|
-
_: 1
|
|
88
|
-
}, 8, ["label", "class"])
|
|
89
|
-
]),
|
|
90
|
-
default: d(() => [
|
|
91
|
-
i(f, {
|
|
92
|
-
"model-value": Object.keys(u(e)).length === t.items.length,
|
|
93
|
-
label: "All",
|
|
94
|
-
"has-checkbox": !0,
|
|
95
|
-
indeterminate: !0,
|
|
96
|
-
onClick: C
|
|
97
|
-
}, null, 8, ["model-value"]),
|
|
98
|
-
(r(!0), M(O, null, S(t.items ?? [], (a) => (r(), m(f, {
|
|
99
|
-
key: a.value,
|
|
100
|
-
value: a.value,
|
|
101
|
-
label: a.label,
|
|
102
|
-
"has-checkbox": !0,
|
|
103
|
-
"model-value": u(e)[a.value],
|
|
104
|
-
"onUpdate:modelValue": (B) => _(a.value)
|
|
105
|
-
}, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
|
|
106
|
-
]),
|
|
107
|
-
_: 1
|
|
108
|
-
}, 8, ["placement", "disabled", "model-value"]);
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
export {
|
|
113
|
-
N as _
|
|
114
|
-
};
|
package/dist/Point-ovkgTwZO.js
DELETED
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import { defineComponent as j, ref as P, computed as A, h as E, onMounted as M, resolveComponent as l, openBlock as d, createElementBlock as b, Fragment as w, createVNode as r, unref as t, withCtx as y, createElementVNode as n, toDisplayString as c, renderList as H, createBlock as C, resolveDynamicComponent 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-DJpBrPbQ.js";
|
|
5
|
-
import { u as W } from "./loading-qlqqYGF3.js";
|
|
6
|
-
import { u as X } from "./business-BehG4fR2.js";
|
|
7
|
-
import { u as Y } from "./campaign-CAcP56Sz.js";
|
|
8
|
-
import { g as Z, a as V, b as I } from "./campaign-BpaiTG4f.js";
|
|
9
|
-
import { _ as ee } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
10
|
-
import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-Dt9c2kvf.js";
|
|
11
|
-
import { u as oe } from "./template-ElP-JIFL.js";
|
|
12
|
-
import { u as ae } from "./vue-i18n-CkbS-IDD.js";
|
|
13
|
-
import { c as _ } from "./index-BCQMVr1J.js";
|
|
14
|
-
const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-center justify-between w-full" }, le = { class: "flex gap-8 overflow-x-auto" }, ce = { class: "space-y-8" }, me = { class: "flex w-full gap-4 items-center" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pe = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { class: "flex flex-col gap-16 text-center" }, _e = { class: "fm-typo-en-title-sm-800" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ke = /* @__PURE__ */ j({
|
|
15
|
-
__name: "Point",
|
|
16
|
-
setup(be) {
|
|
17
|
-
const { t: s } = ae(), B = {
|
|
18
|
-
label: s("connect.program.common.actions.create", {
|
|
19
|
-
type: s("connect.program.point.title").toLowerCase()
|
|
20
|
-
}),
|
|
21
|
-
value: "create",
|
|
22
|
-
isPrimary: !0,
|
|
23
|
-
prependIcon: "add"
|
|
24
|
-
}, $ = oe("COIN", G()), h = X(), m = Y(), { global: K, minor: x } = W, i = P({
|
|
25
|
-
searchKey: "",
|
|
26
|
-
location: null
|
|
27
|
-
}), u = A(
|
|
28
|
-
() => m.campaigns.point.filter(
|
|
29
|
-
(e) => !i.value.location || !e.targetLocation || e.targetLocation.includes(i.value.location)
|
|
30
|
-
)
|
|
31
|
-
), N = [
|
|
32
|
-
{
|
|
33
|
-
header: s("connect.program.common.table.title"),
|
|
34
|
-
accessorFn: (e) => e.name
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
header: s("connect.program.common.table.status"),
|
|
38
|
-
accessorFn: (e) => Z(e),
|
|
39
|
-
cell(e) {
|
|
40
|
-
return V(e.row.original);
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
header: s("connect.program.common.table.summary"),
|
|
45
|
-
accessorFn: (e) => I(e)
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
header: s("connect.program.common.table.actions"),
|
|
49
|
-
cell(e) {
|
|
50
|
-
return E(J.FmButton, {
|
|
51
|
-
variant: "tertiary",
|
|
52
|
-
icon: "delete",
|
|
53
|
-
iconColor: "neutral-gray-400",
|
|
54
|
-
onClick: (o) => {
|
|
55
|
-
o.stopPropagation(), F(e.row.original);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
], v = P();
|
|
61
|
-
async function F(e) {
|
|
62
|
-
await Q.remove(`Are you sure you want to remove ${e.name}?`) && await x(
|
|
63
|
-
async () => {
|
|
64
|
-
await _.delete(e._id), await m.read("COIN");
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
message: `Removing ${e.name}`,
|
|
68
|
-
successMessage: `Removed ${e.name} successfully`
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
async function f(e) {
|
|
73
|
-
e ? await o() : $.open(async (p) => {
|
|
74
|
-
await o(p);
|
|
75
|
-
});
|
|
76
|
-
async function o(p) {
|
|
77
|
-
var g;
|
|
78
|
-
(g = v.value) == null || g.showSheet(
|
|
79
|
-
!0,
|
|
80
|
-
"COIN",
|
|
81
|
-
e ? await _.readById(e._id) : void 0,
|
|
82
|
-
p
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
async function R(e) {
|
|
87
|
-
await x(
|
|
88
|
-
async () => {
|
|
89
|
-
e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await m.read("COIN");
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
message: `${e.campaign._id ? "Updating" : "Creating"} point program`,
|
|
93
|
-
successMessage: `Point program ${e.campaign._id ? "updated" : "created"} successfully`
|
|
94
|
-
}
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
return M(async () => {
|
|
98
|
-
await K(async () => {
|
|
99
|
-
await m.read("COIN");
|
|
100
|
-
});
|
|
101
|
-
}), (e, o) => {
|
|
102
|
-
const p = l("FmPill"), g = l("FmPageHead"), k = l("FmSearch"), O = l("FmTable"), S = l("FmButton"), U = l("FmListItem"), D = l("FmList"), T = l("FmCard");
|
|
103
|
-
return d(), b(w, null, [
|
|
104
|
-
r(g, {
|
|
105
|
-
title: t(s)("connect.program.point.title"),
|
|
106
|
-
actions: t(u).length > 0 && t(h).isPremium ? [B] : [],
|
|
107
|
-
"onClick:action": o[0] || (o[0] = () => f())
|
|
108
|
-
}, {
|
|
109
|
-
title: y(() => [
|
|
110
|
-
n("div", ne, [
|
|
111
|
-
n("span", se, c(t(s)("connect.program.point.title")), 1),
|
|
112
|
-
r(p, { variant: "premium" })
|
|
113
|
-
])
|
|
114
|
-
]),
|
|
115
|
-
_: 1
|
|
116
|
-
}, 8, ["title", "actions"]),
|
|
117
|
-
n("div", ie, [
|
|
118
|
-
r(k, {
|
|
119
|
-
modelValue: t(i).searchKey,
|
|
120
|
-
"onUpdate:modelValue": o[1] || (o[1] = (a) => t(i).searchKey = a),
|
|
121
|
-
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
122
|
-
placeholder: "search",
|
|
123
|
-
collapsible: ""
|
|
124
|
-
}, null, 8, ["modelValue"]),
|
|
125
|
-
t(m).campaigns.point && t(m).campaigns.point.length > 0 ? (d(), b(w, { key: 0 }, [
|
|
126
|
-
n("div", re, [
|
|
127
|
-
n("div", le, [
|
|
128
|
-
r(ee, {
|
|
129
|
-
modelValue: t(i).location,
|
|
130
|
-
"onUpdate:modelValue": o[2] || (o[2] = (a) => t(i).location = a),
|
|
131
|
-
label: "Location: ",
|
|
132
|
-
"show-item-label": !0,
|
|
133
|
-
icon: "storefront",
|
|
134
|
-
placement: "bottom-start",
|
|
135
|
-
items: t(h).locationItems
|
|
136
|
-
}, null, 8, ["modelValue", "items"])
|
|
137
|
-
]),
|
|
138
|
-
r(k, {
|
|
139
|
-
modelValue: t(i).searchKey,
|
|
140
|
-
"onUpdate:modelValue": o[3] || (o[3] = (a) => t(i).searchKey = a),
|
|
141
|
-
class: "xs:hidden",
|
|
142
|
-
placeholder: "search",
|
|
143
|
-
collapsible: ""
|
|
144
|
-
}, null, 8, ["modelValue"])
|
|
145
|
-
]),
|
|
146
|
-
r(O, {
|
|
147
|
-
class: "xs:hidden",
|
|
148
|
-
"row-data": t(u),
|
|
149
|
-
"column-defs": N,
|
|
150
|
-
"search-value": t(i).searchKey,
|
|
151
|
-
"column-filter": [],
|
|
152
|
-
onRowClick: o[4] || (o[4] = (a) => f(a.original)),
|
|
153
|
-
"hide-footer": t(u).length < 10
|
|
154
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
155
|
-
r(D, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
156
|
-
default: y(() => [
|
|
157
|
-
(d(!0), b(w, null, H(t(u).filter(
|
|
158
|
-
(a) => a.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
|
|
159
|
-
), (a) => (d(), C(U, {
|
|
160
|
-
key: a._id.toString(),
|
|
161
|
-
onClick: (L) => f(a),
|
|
162
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
163
|
-
}, {
|
|
164
|
-
default: y(() => [
|
|
165
|
-
n("div", ce, [
|
|
166
|
-
n("div", me, [
|
|
167
|
-
(d(), C(q(t(V)(a)))),
|
|
168
|
-
n("div", de, c(t(s)("connect.program.point.used", {
|
|
169
|
-
count: a.currentReceive ?? 0
|
|
170
|
-
})), 1)
|
|
171
|
-
]),
|
|
172
|
-
n("div", pe, [
|
|
173
|
-
n("div", ue, c(a.name), 1),
|
|
174
|
-
n("div", fe, c(t(I)(a)), 1)
|
|
175
|
-
]),
|
|
176
|
-
n("div", ge, " Point received: " + c(a.currentReceive ?? 0), 1)
|
|
177
|
-
]),
|
|
178
|
-
r(S, {
|
|
179
|
-
icon: "delete",
|
|
180
|
-
"icon-color": "neutral-gray-400",
|
|
181
|
-
variant: "tertiary",
|
|
182
|
-
onClick: (L) => (L.stopPropagation(), F(a))
|
|
183
|
-
}, null, 8, ["onClick"])
|
|
184
|
-
]),
|
|
185
|
-
_: 2
|
|
186
|
-
}, 1032, ["onClick"]))), 128))
|
|
187
|
-
]),
|
|
188
|
-
_: 1
|
|
189
|
-
})
|
|
190
|
-
], 64)) : (d(), C(T, {
|
|
191
|
-
key: 1,
|
|
192
|
-
variant: "outlined",
|
|
193
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
194
|
-
}, {
|
|
195
|
-
default: y(() => [
|
|
196
|
-
o[6] || (o[6] = n("img", {
|
|
197
|
-
src: z,
|
|
198
|
-
class: "aspect-square w-[150px]"
|
|
199
|
-
}, null, -1)),
|
|
200
|
-
n("div", ye, [
|
|
201
|
-
n("div", _e, c(t(s)("connect.program.point.empty_state.title")), 1),
|
|
202
|
-
n("div", he, c(t(s)("connect.program.point.empty_state.description")), 1)
|
|
203
|
-
]),
|
|
204
|
-
r(S, {
|
|
205
|
-
variant: "primary",
|
|
206
|
-
label: "Create point program",
|
|
207
|
-
disabled: !t(h).isPremium,
|
|
208
|
-
icon: "add",
|
|
209
|
-
onClick: o[5] || (o[5] = (a) => f())
|
|
210
|
-
}, null, 8, ["disabled"])
|
|
211
|
-
]),
|
|
212
|
-
_: 1
|
|
213
|
-
})),
|
|
214
|
-
r(te, {
|
|
215
|
-
ref_key: "sheetRef",
|
|
216
|
-
ref: v,
|
|
217
|
-
"onSubmit:modelValue": R
|
|
218
|
-
}, null, 512)
|
|
219
|
-
])
|
|
220
|
-
], 64);
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
});
|
|
224
|
-
export {
|
|
225
|
-
Ke as default
|
|
226
|
-
};
|