@feedmepos/mf-connect 0.0.5-beta.20 → 0.0.5-beta.21

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.
Files changed (67) hide show
  1. package/dist/{Analytic-DUWe-WYz.js → Analytic-CVpCpEBl.js} +12 -13
  2. package/dist/{Broadcast-CAmI-dS9.js → Broadcast-C0SHdFpT.js} +11 -12
  3. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CQbePPyW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B94-nKP4.js} +8 -8
  4. package/dist/Card-C5yXOEhK.js +827 -0
  5. package/dist/Collections-Ka_q_V3S.js +424 -0
  6. package/dist/{Credit-CxyIk-mH.js → Credit-CmTa3hjm.js} +11 -12
  7. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-AGQwe70B.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CNSfNMA_.js} +23 -24
  8. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-y263YYGy.js → EffectSheet.vue_vue_type_style_index_0_lang-BLfzJ46z.js} +5 -5
  9. package/dist/{Experience-DH6nbWal.js → Experience-yd4ZPBXy.js} +11 -12
  10. package/dist/{Game-BGMGl6Uw.js → Game-DYTplwOh.js} +22 -23
  11. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rs3BEnpo.js → ImageInput.vue_vue_type_script_setup_true_lang-BuuYdlE4.js} +1 -1
  12. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BIwBZ7FH.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BfWuKa1w.js} +1 -1
  13. package/dist/{MainLayout-CjvNB4RK.js → MainLayout-8tc3ZtLI.js} +2 -2
  14. package/dist/{Marketing-BLbR9_KN.js → Marketing-D5Le-SWn.js} +19 -20
  15. package/dist/{Member-BqPHWUos.js → Member-CzY5Um_y.js} +2 -2
  16. package/dist/{MemberList-DoBv4aBY.js → MemberList-DpFa2ttF.js} +20 -21
  17. package/dist/{MemberTransactions-Cri3UCrX.js → MemberTransactions-CDKkRdfp.js} +4 -4
  18. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang--qiv_ZUS.js → MessageInput.vue_vue_type_script_setup_true_lang-BD27S5wB.js} +4 -4
  19. package/dist/{Mission-BXRMH__V.js → Mission-9BmMMzyr.js} +25 -26
  20. package/dist/{Point-MS30HaX7.js → Point-IiWgZIyI.js} +11 -12
  21. package/dist/{Promotion-BuOELg3x.js → Promotion-BmEQ28sH.js} +42 -44
  22. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CAnO-3XN.js → RuleGroup.vue_vue_type_script_setup_true_lang-BhOoz0HL.js} +12 -12
  23. package/dist/{Segment-C9s9hDBX.js → Segment-D1ID4Rmt.js} +39 -40
  24. package/dist/{Setting-CHk3QEsN.js → Setting-B3WeabHJ.js} +17 -18
  25. package/dist/{Store-CQWAs4Ew.js → Store-CKFLaYKH.js} +18 -19
  26. package/dist/{StoreRewards-DJkh42Es.js → StoreRewards-DIQL173Q.js} +27 -28
  27. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B2kjcViv.js +794 -0
  28. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CEBqSaBp.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C1QmPELI.js} +1 -1
  29. package/dist/{Tier-3zGwCsja.js → Tier-BvE47ciZ.js} +43 -43
  30. package/dist/{Title-TotAXw2n.js → Title-DfcczCHg.js} +42 -42
  31. package/dist/Transaction-CF0f3QCU.js +36 -0
  32. package/dist/Voucher-CCOZjT6k.js +481 -0
  33. package/dist/{app--rCS8dWb.js → app-B4oDOeXm.js} +1456 -1456
  34. package/dist/app.js +1 -1
  35. package/dist/{campaign-BPWXzTLO.js → campaign-BWwTQs_d.js} +2 -2
  36. package/dist/{collection.fn-NFB67-6j.js → collection.fn-C5XN0PPR.js} +2 -2
  37. package/dist/{dto-ChVvY7GG.js → dto-Ktuw3JiD.js} +138 -139
  38. package/dist/{effect-CbwZuhWY.js → effect-BM2dJl1a.js} +1 -1
  39. package/dist/export-LApNX--r.js +97 -0
  40. package/dist/{helper-D16-sxkv.js → helper-BUC1dAUX.js} +1 -1
  41. package/dist/{index-EmqFPQGb.js → index-B6GvsaDA.js} +1 -1
  42. package/dist/{index-DlqRXSLU.js → index-BZMMIcyM.js} +1 -1
  43. package/dist/{index-Blbjd5Y9.js → index-Bc-r4pik.js} +5 -5
  44. package/dist/{index-CGTaSvN6.js → index-Bt_xFt9g.js} +1 -1
  45. package/dist/{index-D-bPAs1d.js → index-C7qI5flU.js} +2 -2
  46. package/dist/{index-Dh6x04Wk.js → index-C86T8VON.js} +2 -2
  47. package/dist/{index-C7SZ9gvu.js → index-CvZ_MhCE.js} +7 -7
  48. package/dist/{index-vsgk07Y2.js → index-CzVShOLS.js} +1 -1
  49. package/dist/{index-BGAWJ6-h.js → index-DSUUVWFu.js} +3 -3
  50. package/dist/{index--VC0kdJZ.js → index-DVJQt0_Q.js} +2 -2
  51. package/dist/{plugins-Ccv9TIl4.js → loading-CM3ZyteE.js} +8204 -8108
  52. package/dist/{lodash-7Fz14kKI.js → lodash-DYMRs712.js} +1 -1
  53. package/dist/{membership-ByQds6Nb.js → membership-D0Z9EBWi.js} +3 -3
  54. package/dist/{money-DsiT1-aV.js → money-Cyt6uuok.js} +1 -1
  55. package/dist/{number-D4SI_vwy.js → number-CSBV_14_.js} +1 -1
  56. package/dist/{rule-NzJI8lrC.js → rule-C4ovkUox.js} +2 -2
  57. package/dist/{rule-builder-CNz0WgMq.js → rule-builder-DxDhft7B.js} +1 -1
  58. package/dist/{template-9wDwTGR-.js → template-Dd9xYS-m.js} +6 -6
  59. package/dist/{usePagination-CsZrmXsU.js → usePagination-cObe7G1g.js} +1 -1
  60. package/dist/{xlsx-CUa5ix7U.js → xlsx--baqnGDY.js} +1 -1
  61. package/package.json +1 -1
  62. package/dist/Card-DhgETjhz.js +0 -914
  63. package/dist/Collections-9fPXIR34.js +0 -424
  64. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-1GgzlIRZ.js +0 -693
  65. package/dist/Transaction-gV9vaJCR.js +0 -34
  66. package/dist/Voucher-BJ-pXo7Y.js +0 -449
  67. package/dist/loading-B5tUSWjN.js +0 -100
@@ -0,0 +1,36 @@
1
+ import { defineComponent as _, ref as d, resolveComponent as c, openBlock as o, createElementBlock as v, Fragment as f, createVNode as s, createElementVNode as b, unref as t, createBlock as a, KeepAlive as k, resolveDynamicComponent as m, createCommentVNode as x } from "vue";
2
+ import { _ as C, a as F } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-B2kjcViv.js";
3
+ const T = { class: "px-24 flex flex-col gap-y-32 pb-24" }, N = /* @__PURE__ */ _({
4
+ __name: "Transaction",
5
+ setup(g) {
6
+ const l = [
7
+ {
8
+ label: "Collection",
9
+ value: "collection"
10
+ },
11
+ {
12
+ label: "Store",
13
+ value: "store"
14
+ }
15
+ ], e = d(l[0]);
16
+ return (y, n) => {
17
+ const r = c("FmPageHead"), u = c("FmTabs");
18
+ return o(), v(f, null, [
19
+ s(r, { title: "Transactions" }),
20
+ b("div", T, [
21
+ s(u, {
22
+ "model-value": t(e).value,
23
+ items: l,
24
+ "onUpdate:modelValue": n[0] || (n[0] = (i) => e.value = l.find((p) => p.value === i))
25
+ }, null, 8, ["model-value"]),
26
+ (o(), a(k, null, [
27
+ t(e).value == "collection" ? (o(), a(m(C), { key: 0 })) : t(e).value == "store" ? (o(), a(m(F), { key: 1 })) : x("", !0)
28
+ ], 1024))
29
+ ])
30
+ ], 64);
31
+ };
32
+ }
33
+ });
34
+ export {
35
+ N as default
36
+ };
@@ -0,0 +1,481 @@
1
+ import { defineComponent as X, ref as y, watch as N, onMounted as J, resolveComponent as p, openBlock as g, createBlock as V, unref as t, isRef as j, withCtx as I, createElementVNode as s, createVNode as r, toDisplayString as U, computed as ee, createElementBlock as O, Fragment as T, renderList as ae, resolveDynamicComponent as te, createCommentVNode as K, h as v } from "vue";
2
+ import { _ as oe } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as ne, components as x } from "@feedmepos/ui-library";
4
+ import { u as Q, p as z, a as se } from "./loading-CM3ZyteE.js";
5
+ import { useCoreStore as le } from "@feedmepos/mf-common";
6
+ import { u as ie, J as re, a as ce, R as ue, b as D } from "./app-B4oDOeXm.js";
7
+ import { u as me } from "./campaign-BWwTQs_d.js";
8
+ import { g as q, b as G } from "./dto-Ktuw3JiD.js";
9
+ import { u as de } from "./template-Dd9xYS-m.js";
10
+ import { _ as pe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-CNSfNMA_.js";
11
+ import { _ as fe } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
12
+ import { l as he } from "./lodash-DYMRs712.js";
13
+ import { m as ge } from "./index-Bt_xFt9g.js";
14
+ import { c as F } from "./index-BZMMIcyM.js";
15
+ import { useRouter as ye } from "vue-router";
16
+ const ve = { class: "space-y-16" }, _e = { class: "fm-typo-en-body-md-600" }, Ce = { class: "flex items-center justify-end" }, be = { class: "flex items-center gap-8" }, we = /* @__PURE__ */ X({
17
+ __name: "SendVoucherSheet",
18
+ emits: ["success"],
19
+ setup(W, { expose: M, emit: L }) {
20
+ const { minor: P } = Q, R = y(""), i = y({}), E = L, f = y(!1), d = y([]);
21
+ function u(e) {
22
+ f.value = !0, R.value = e.campaignId;
23
+ }
24
+ function _() {
25
+ f.value = !1;
26
+ }
27
+ const A = [
28
+ {
29
+ header: "Name",
30
+ accessorFn: (e) => e.name || "No Profile"
31
+ },
32
+ {
33
+ header: "Phone",
34
+ accessorFn: (e) => e.phoneNumber || "-"
35
+ }
36
+ ], l = y({
37
+ searchValue: "",
38
+ pageSize: 10,
39
+ pageCount: 0,
40
+ pageIndex: 0,
41
+ totalRows: 0,
42
+ isLoading: !1
43
+ }), m = y([]), C = async (e) => {
44
+ l.value.isLoading = !0, m.value = [];
45
+ const a = await ge.read({
46
+ limit: e.pageSize,
47
+ skip: e.pageIndex,
48
+ sortBy: "_id",
49
+ search: l.value.searchValue,
50
+ descending: !1
51
+ });
52
+ m.value = a.resources, l.value.totalRows = a.meta.totalResources ?? 0, l.value.pageCount = a.meta.totalPages ?? 0, l.value.isLoading = !1, i.value = {}, d.value.forEach((o) => {
53
+ const c = m.value.findIndex((w) => w._id == o);
54
+ c > -1 && (console.log(c, "fetch member index"), i.value[c] = !0);
55
+ });
56
+ };
57
+ function b() {
58
+ m.value.length > 0 && (d.value = d.value.filter(
59
+ (e) => !m.value.some((a) => a._id === e) || // Keep if not in current page
60
+ Object.entries(i.value).some(
61
+ ([a, o]) => o && m.value[a]._id === e
62
+ // Keep if selected in current page
63
+ )
64
+ ));
65
+ for (const [e, a] of Object.entries(i.value))
66
+ if (a) {
67
+ const o = m.value[e]._id;
68
+ d.value.includes(o) || d.value.push(o);
69
+ }
70
+ }
71
+ async function $(e) {
72
+ d.value.length < 1 || await P(
73
+ async () => {
74
+ await F.sendCollection(R.value, {
75
+ memberId: d.value
76
+ }), await E("success"), _();
77
+ },
78
+ {
79
+ message: "Sending claim(s)",
80
+ successMessage: "Claim(s) created"
81
+ }
82
+ );
83
+ }
84
+ return N(i, b, { deep: !0 }), N(
85
+ () => l.value.searchValue,
86
+ he.debounce(async () => {
87
+ await C({ pageSize: 10, pageIndex: 0 });
88
+ }, 500)
89
+ ), M({
90
+ showSheet: u,
91
+ hideSheet: _
92
+ }), J(async () => {
93
+ await C(l.value);
94
+ }), (e, a) => {
95
+ const o = p("FmSearch"), c = p("FmTable"), w = p("FmButton"), S = p("FmSideSheet");
96
+ return g(), V(S, {
97
+ "max-width": 560,
98
+ "dismiss-away": !0,
99
+ header: "Send voucher to",
100
+ modelValue: t(f),
101
+ "onUpdate:modelValue": [
102
+ a[3] || (a[3] = (h) => j(f) ? f.value = h : null),
103
+ a[4] || (a[4] = (h) => f.value = h)
104
+ ]
105
+ }, {
106
+ "side-sheet-footer": I(() => [
107
+ s("div", be, [
108
+ r(w, {
109
+ label: "Send",
110
+ loading: t(ie)().isLoading,
111
+ onClick: $
112
+ }, null, 8, ["loading"]),
113
+ r(w, {
114
+ label: "Cancel",
115
+ type: "button",
116
+ variant: "tertiary",
117
+ onClick: a[2] || (a[2] = (h) => f.value = !1)
118
+ })
119
+ ])
120
+ ]),
121
+ default: I(() => [
122
+ r(re, { json: t(d) }, null, 8, ["json"]),
123
+ s("div", ve, [
124
+ s("div", _e, U(t(d).length) + " members selected ", 1),
125
+ s("div", Ce, [
126
+ r(o, {
127
+ class: "mt-4",
128
+ modelValue: t(l).searchValue,
129
+ "onUpdate:modelValue": a[0] || (a[0] = (h) => t(l).searchValue = h),
130
+ placeholder: "Search Member",
131
+ collapsible: ""
132
+ }, null, 8, ["modelValue"])
133
+ ]),
134
+ r(c, {
135
+ modelValue: t(i),
136
+ "onUpdate:modelValue": a[1] || (a[1] = (h) => j(i) ? i.value = h : null),
137
+ selection: "multiple",
138
+ loading: t(l).isLoading,
139
+ "row-data": t(m),
140
+ "column-defs": A,
141
+ "page-size": t(l).pageSize,
142
+ "page-count": t(l).pageCount,
143
+ "hide-footer": t(l).totalRows <= t(l).pageSize,
144
+ "fetch-fn": C
145
+ }, null, 8, ["modelValue", "loading", "row-data", "page-size", "page-count", "hide-footer"])
146
+ ])
147
+ ]),
148
+ _: 1
149
+ }, 8, ["modelValue"]);
150
+ };
151
+ }
152
+ });
153
+ var Se = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
154
+ const xe = { class: "px-24 flex flex-col gap-y-16" }, Ve = { class: "flex items-center justify-between w-full" }, ke = { class: "flex gap-8 overflow-x-auto" }, Fe = { class: "space-y-8" }, Ie = { class: "flex w-full gap-4 items-center" }, Le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Re = { class: "space-y-4" }, Ue = { class: "fm-typo-en-body-lg-600" }, Me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = { class: "flex gap-8 items-center" }, Ee = /* @__PURE__ */ s("img", {
155
+ src: oe,
156
+ class: "aspect-square w-[150px]"
157
+ }, null, -1), Ae = /* @__PURE__ */ s("div", { class: "flex flex-col gap-16 text-center" }, [
158
+ /* @__PURE__ */ s("div", { class: "fm-typo-en-title-sm-800" }, "Create voucher campaign"),
159
+ /* @__PURE__ */ s("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " A digital coupon that users can redeem for discounts on future purchases. Users usually need to claim and apply the voucher to benefit from the discount. ")
160
+ ], -1), We = /* @__PURE__ */ X({
161
+ __name: "Voucher",
162
+ setup(W) {
163
+ const M = {
164
+ label: "Create campaign",
165
+ value: "create",
166
+ isPrimary: !0,
167
+ prependIcon: "add"
168
+ }, L = ne(), P = de("VOUCHER", L), R = ce(), i = me(), { global: E, minor: f } = Q, d = ye(), u = y({
169
+ searchKey: "",
170
+ location: null
171
+ }), _ = ee(
172
+ () => i.campaigns.voucher.filter(
173
+ (e) => !u.value.location || !e.targetLocation || e.targetLocation.includes(u.value.location)
174
+ )
175
+ ), A = [
176
+ {
177
+ header: "Voucher title",
178
+ accessorFn: (e) => e.name
179
+ },
180
+ {
181
+ header: "Status",
182
+ cell(e) {
183
+ return q(e.row.original);
184
+ }
185
+ },
186
+ {
187
+ header: "Summary",
188
+ accessorFn: (e) => G(e)
189
+ },
190
+ {
191
+ header: "Quota",
192
+ accessorFn: (e) => {
193
+ var a;
194
+ return ((a = e.pf_collectible) == null ? void 0 : a.options.maxReceive) ?? "Unlimited";
195
+ }
196
+ },
197
+ {
198
+ header: "Claimed",
199
+ accessorFn: (e) => {
200
+ var a;
201
+ return ((a = e == null ? void 0 : e.pf_collectible) == null ? void 0 : a.currentReceive) ?? 0;
202
+ }
203
+ },
204
+ {
205
+ header: "Actions",
206
+ cell(e) {
207
+ return v("div", { class: "flex items-center justify-end" }, [
208
+ v(x.FmButton, {
209
+ icon: "visibility",
210
+ variant: "tertiary",
211
+ iconColor: "neutral-gray-400",
212
+ onClick: async (a) => {
213
+ a.stopPropagation(), await d.push({
214
+ name: D["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
215
+ params: { id: e.row.original._id }
216
+ });
217
+ }
218
+ }),
219
+ v(
220
+ x.FmMenu,
221
+ {
222
+ placement: "bottom-end",
223
+ onClick: (a) => {
224
+ a.stopPropagation();
225
+ }
226
+ },
227
+ {
228
+ "menu-button": () => v(x.FmButton, {
229
+ icon: "more_vert",
230
+ iconColor: "neutral-gray-400",
231
+ variant: "tertiary"
232
+ }),
233
+ default: () => {
234
+ const a = [
235
+ v(
236
+ x.FmMenuItem,
237
+ {
238
+ onClick: async (o) => {
239
+ o.stopPropagation(), C(e.row.original);
240
+ }
241
+ },
242
+ {
243
+ label: v(
244
+ "div",
245
+ {
246
+ class: "text-fm-color-typo-error fm-typo-en-body-md-400"
247
+ },
248
+ "Remove"
249
+ )
250
+ }
251
+ )
252
+ ];
253
+ return e.row.original.event.type === "SIMPLE_CLAIM" && (a.unshift(
254
+ v(x.FmMenuItem, {
255
+ label: "Send",
256
+ onClick: async (o) => {
257
+ var c;
258
+ o.stopPropagation(), (c = m.value) == null || c.showSheet({
259
+ campaignId: e.row.original._id
260
+ });
261
+ }
262
+ })
263
+ ), a.unshift(
264
+ v(x.FmMenuItem, {
265
+ label: "Share",
266
+ onClick: async (o) => {
267
+ if (o.stopPropagation(), e.row.original.event.type !== "SIMPLE_CLAIM")
268
+ return await z.confirm(
269
+ "Cannot share a voucher that is not a simple claim.",
270
+ "Share Voucher",
271
+ "OK"
272
+ );
273
+ await se(
274
+ `https://${le().currentBusiness.value._id}.${Se.appUrl}/vouchers/${e.row.original._id}`,
275
+ {
276
+ successMessage: "Voucher link copied to clipboard"
277
+ }
278
+ );
279
+ }
280
+ })
281
+ )), a;
282
+ }
283
+ }
284
+ )
285
+ ]);
286
+ }
287
+ }
288
+ ], l = y(), m = y();
289
+ async function C(e) {
290
+ await z.remove(`Are you sure you want to remove ${e.name}?`) && await f(
291
+ async () => {
292
+ await F.delete(e._id), await i.read("VOUCHER");
293
+ },
294
+ {
295
+ message: `Removing ${e.name}`,
296
+ successMessage: `Removed ${e.name} successfully`
297
+ }
298
+ );
299
+ }
300
+ async function b(e) {
301
+ e ? await a() : P.open(async (o) => {
302
+ await a(o);
303
+ });
304
+ async function a(o) {
305
+ var c;
306
+ (c = l.value) == null || c.showSheet(
307
+ !0,
308
+ "VOUCHER",
309
+ e ? await F.readById(e._id) : void 0,
310
+ o
311
+ );
312
+ }
313
+ }
314
+ async function $(e) {
315
+ e.campaign._id && await new Promise((a) => {
316
+ L.open({
317
+ title: "Confirmation",
318
+ message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
319
+ primaryActions: { text: "Update all", close: !0 },
320
+ secondaryActions: { text: "Update future only", close: !0 }
321
+ }).onPrimary(async () => {
322
+ var o;
323
+ e.updateCollections = !0, (o = window.top) == null || o.postMessage("updateAllVoucher", "*"), a();
324
+ }).onSecondary(async () => {
325
+ a();
326
+ });
327
+ }), await f(
328
+ async () => {
329
+ e.campaign._id ? await F.update(e.campaign._id, e) : await F.create(e), await i.read("VOUCHER");
330
+ },
331
+ {
332
+ message: `${e.campaign._id ? "Updating" : "Creating"} voucher`,
333
+ successMessage: `Voucher ${e.campaign._id ? "updated" : "created"} successfully`
334
+ }
335
+ );
336
+ }
337
+ return J(async () => {
338
+ await E(async () => {
339
+ await i.read("VOUCHER");
340
+ });
341
+ }), (e, a) => {
342
+ const o = p("FmPageHead"), c = p("FmSearch"), w = p("FmTable"), S = p("FmButton"), h = p("FmListItem"), Z = p("FmList"), Y = p("FmCard");
343
+ return g(), O(T, null, [
344
+ r(o, {
345
+ title: "Voucher",
346
+ actions: t(_).length > 0 ? [M] : [],
347
+ "onClick:action": a[0] || (a[0] = () => b())
348
+ }, null, 8, ["actions"]),
349
+ s("div", xe, [
350
+ r(c, {
351
+ modelValue: t(u).searchKey,
352
+ "onUpdate:modelValue": a[1] || (a[1] = (n) => t(u).searchKey = n),
353
+ class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
354
+ placeholder: "search",
355
+ collapsible: ""
356
+ }, null, 8, ["modelValue"]),
357
+ t(i).campaigns.voucher && t(i).campaigns.voucher.length > 0 ? (g(), O(T, { key: 0 }, [
358
+ s("div", Ve, [
359
+ s("div", ke, [
360
+ r(fe, {
361
+ modelValue: t(u).location,
362
+ "onUpdate:modelValue": a[2] || (a[2] = (n) => t(u).location = n),
363
+ label: "Location: ",
364
+ "show-item-label": !0,
365
+ icon: "storefront",
366
+ placement: "bottom-start",
367
+ items: t(R).locationItems
368
+ }, null, 8, ["modelValue", "items"])
369
+ ]),
370
+ r(c, {
371
+ modelValue: t(u).searchKey,
372
+ "onUpdate:modelValue": a[3] || (a[3] = (n) => t(u).searchKey = n),
373
+ class: "xs:hidden",
374
+ placeholder: "search",
375
+ collapsible: ""
376
+ }, null, 8, ["modelValue"])
377
+ ]),
378
+ r(w, {
379
+ class: "xs:hidden",
380
+ "row-data": t(_),
381
+ "column-defs": A,
382
+ "search-value": t(u).searchKey,
383
+ "column-filter": [],
384
+ onRowClick: a[4] || (a[4] = (n) => b(n.original)),
385
+ "hide-footer": t(_).length < 10
386
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
387
+ r(Z, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
388
+ default: I(() => [
389
+ (g(!0), O(T, null, ae(t(_).filter(
390
+ (n) => n.name.toLowerCase().includes(t(u).searchKey.toLowerCase())
391
+ ), (n) => (g(), V(h, {
392
+ key: n._id.toString(),
393
+ onClick: (B) => b(n),
394
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
395
+ }, {
396
+ default: I(() => {
397
+ var B;
398
+ return [
399
+ s("div", Fe, [
400
+ s("div", Ie, [
401
+ (g(), V(te(t(q)(n)))),
402
+ s("div", Le, U(((B = n.pf_collectible) == null ? void 0 : B.currentReceive) ?? 0) + " claimed ", 1)
403
+ ]),
404
+ s("div", Re, [
405
+ s("div", Ue, U(n.name), 1),
406
+ s("div", Me, U(t(G)(n)), 1)
407
+ ])
408
+ ]),
409
+ s("div", Pe, [
410
+ n.event.type === "SIMPLE_CLAIM" ? (g(), V(S, {
411
+ key: 0,
412
+ icon: "visibility",
413
+ "icon-color": "neutral-gray-400",
414
+ variant: "tertiary",
415
+ onClick: async (k) => {
416
+ k.stopPropagation(), await t(ue).push({
417
+ name: t(D)["mf-connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
418
+ params: { id: n._id }
419
+ });
420
+ }
421
+ }, null, 8, ["onClick"])) : K("", !0),
422
+ n.event.type === "SIMPLE_CLAIM" ? (g(), V(S, {
423
+ key: 1,
424
+ icon: "send",
425
+ "icon-color": "neutral-gray-400",
426
+ variant: "tertiary",
427
+ onClick: (k) => {
428
+ var H;
429
+ k.stopPropagation(), (H = t(m)) == null || H.showSheet({
430
+ campaignId: n._id
431
+ });
432
+ }
433
+ }, null, 8, ["onClick"])) : K("", !0),
434
+ r(S, {
435
+ icon: "delete",
436
+ "icon-color": "neutral-gray-400",
437
+ variant: "tertiary",
438
+ onClick: (k) => (k.stopPropagation(), C(n))
439
+ }, null, 8, ["onClick"])
440
+ ])
441
+ ];
442
+ }),
443
+ _: 2
444
+ }, 1032, ["onClick"]))), 128))
445
+ ]),
446
+ _: 1
447
+ })
448
+ ], 64)) : (g(), V(Y, {
449
+ key: 1,
450
+ variant: "outlined",
451
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
452
+ }, {
453
+ default: I(() => [
454
+ Ee,
455
+ Ae,
456
+ r(S, {
457
+ variant: "primary",
458
+ label: "Create voucher campaign",
459
+ icon: "add",
460
+ onClick: a[5] || (a[5] = (n) => b())
461
+ })
462
+ ]),
463
+ _: 1
464
+ })),
465
+ r(pe, {
466
+ ref_key: "sheetRef",
467
+ ref: l,
468
+ "onSubmit:modelValue": $
469
+ }, null, 512),
470
+ r(we, {
471
+ ref_key: "sendVoucherSheetRef",
472
+ ref: m
473
+ }, null, 512)
474
+ ])
475
+ ], 64);
476
+ };
477
+ }
478
+ });
479
+ export {
480
+ We as default
481
+ };