@feedmepos/mf-connect 0.0.6 → 0.0.8

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 (72) hide show
  1. package/dist/{Analytic-BJYHu6np.js → Analytic-BxRuK2P2.js} +8 -8
  2. package/dist/{Broadcast-B8FNr597.js → Broadcast-BqGojAWW.js} +8 -8
  3. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BlZ4cdrl.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B-VzcVMS.js} +8 -8
  4. package/dist/{Card-DLHnQyMF.js → Card-Dlj5jQp4.js} +54 -54
  5. package/dist/{Collections-d7N7aO1G.js → Collections-DvdDRozp.js} +180 -185
  6. package/dist/{Credit-DWbl28df.js → Credit-BeHm7_2S.js} +8 -8
  7. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DBRqd0z4.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BsbgHsah.js} +170 -160
  8. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DTxJHWjb.js → EffectSheet.vue_vue_type_style_index_0_lang-hwXvdiut.js} +2999 -2978
  9. package/dist/{Experience-Bzt7yrvt.js → Experience-CtDY9u4Y.js} +8 -8
  10. package/dist/{Game-IRXuMUL3.js → Game-DjaYuqcb.js} +8 -8
  11. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-C8d0t8nQ.js → ImageInput.vue_vue_type_script_setup_true_lang-Bq5-Gl9N.js} +1 -1
  12. package/dist/{MainLayout-DDh1WuO8.js → MainLayout-B-iAZM2k.js} +1 -1
  13. package/dist/{Marketing-C2kkxDFL.js → Marketing-BJJltAh-.js} +6 -6
  14. package/dist/Member-eJ9Pdi5w.js +91 -0
  15. package/dist/MemberList-CrhMqUfJ.js +1664 -0
  16. package/dist/{MemberTransactions-DNIJDHOQ.js → MemberTransactions-DRET8mSQ.js} +4 -4
  17. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DYWmeADi.js → MessageInput.vue_vue_type_script_setup_true_lang-D-ttMwn2.js} +2 -2
  18. package/dist/{Point-Bgp7ogL-.js → Point-DPTOgJbC.js} +8 -8
  19. package/dist/{Promotion-Dk6STeBk.js → Promotion-wzkRuNqO.js} +9 -9
  20. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BXzBoSgP.js → RuleGroup.vue_vue_type_script_setup_true_lang-Z06eB5i5.js} +12 -12
  21. package/dist/{Segment-BEQJcNkY.js → Segment-DnsPrP7Q.js} +10 -10
  22. package/dist/{Setting-CZi479L2.js → Setting-CXuZu0-m.js} +9 -9
  23. package/dist/Store-4Um9keEp.js +1424 -0
  24. package/dist/StoreRewards-B-UFeyQM.js +434 -0
  25. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Bdo4vZkG.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BAyotuXd.js} +5 -5
  26. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DQQ-EPvQ.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-I_XFpctY.js} +1 -1
  27. package/dist/Tier-C6KVsxGO.js +818 -0
  28. package/dist/{Title-Dc3COZA9.js → Title-DuN1ahIM.js} +236 -236
  29. package/dist/{Transaction-BCa3ObND.js → Transaction-DdfX7Xfe.js} +1 -1
  30. package/dist/Voucher-DarXrxZr.js +454 -0
  31. package/dist/{app-DldkpdyI.js → app-CxBTTB31.js} +2372 -2357
  32. package/dist/app.js +1 -1
  33. package/dist/{campaign-COrVPhtR.js → campaign-B0aXkadj.js} +7 -7
  34. package/dist/dto-BtdVC-Ab.js +1093 -0
  35. package/dist/{effect-B4_HDofh.js → effect-BUN6rkQM.js} +1 -1
  36. package/dist/{helper-CwQEM81T.js → helper-Cpq3x8K5.js} +1 -1
  37. package/dist/{index-DujHgfez.js → index-0GYrZr4L.js} +138 -132
  38. package/dist/{index-Cd-A6imB.js → index-8clzk3uX.js} +1 -1
  39. package/dist/{index-ClQze5GX.js → index-BTntbYTS.js} +1 -1
  40. package/dist/{index-D8ae8TSh.js → index-BvnZdJBY.js} +2 -2
  41. package/dist/{index-D3Oa_lL4.js → index-C6NgUSl2.js} +1 -1
  42. package/dist/{index-CDXgQC_P.js → index-CK9yJMj7.js} +34 -34
  43. package/dist/{index-DApTNNm8.js → index-D2Juhkdw.js} +2 -2
  44. package/dist/{index-DCIJl8iK.js → index-DDSLx7vu.js} +2 -2
  45. package/dist/{index-BGEOMkg0.js → index-Dg-PMgXV.js} +1 -1
  46. package/dist/index-DysVCkrx.js +1735 -0
  47. package/dist/libs/packages/core/src/campaign/campaign.enum.d.ts +6 -0
  48. package/dist/libs/packages/core/src/campaign/campaign.fn.d.ts +2 -0
  49. package/dist/libs/packages/core/src/template/templates.d.ts +7 -0
  50. package/dist/{loading-CEcLG67g.js → loading-Cxp7sI5p.js} +2 -2
  51. package/dist/{lodash-CQck_rTn.js → lodash-DsT1nK-T.js} +1 -1
  52. package/dist/{membership-Bat0mrVs.js → membership-DtD45RXh.js} +4 -4
  53. package/dist/{money-JE8h3c0z.js → money-CFI1TMCS.js} +1 -1
  54. package/dist/{number-D5WgTK0X.js → number-BBtf4fYz.js} +1 -1
  55. package/dist/packages/connect/src/api/index.d.ts +3 -0
  56. package/dist/packages/connect/src/api/settings/index.d.ts +1 -1
  57. package/dist/packages/connect/src/main.d.ts +1 -1
  58. package/dist/{plugins-B53iVLET.js → plugins-B_d-WFtN.js} +4 -4
  59. package/dist/{rule-lH1B2od5.js → rule-CB9Qlcx1.js} +2 -2
  60. package/dist/{rule-builder-D6chADAd.js → rule-builder-BIKcA4Bg.js} +1 -1
  61. package/dist/{template-D4IPNePW.js → template-qlb46PGl.js} +5 -5
  62. package/dist/{usePagination-MD91K8Ao.js → usePagination-CX66ab1Y.js} +1 -1
  63. package/dist/{xlsx-zo_mxA6a.js → xlsx-DMaFso0k.js} +1 -1
  64. package/package.json +2 -2
  65. package/dist/Member-CNfC-lCV.js +0 -90
  66. package/dist/MemberList-B_lQ2EIK.js +0 -1663
  67. package/dist/Store-BeH0Gm7T.js +0 -1423
  68. package/dist/StoreRewards-BgYxgC_0.js +0 -433
  69. package/dist/Tier-DS1BnVuA.js +0 -818
  70. package/dist/Voucher-BG51P9yR.js +0 -448
  71. package/dist/dto-lHIRZTaN.js +0 -353
  72. package/dist/index-BDLy_dUj.js +0 -1742
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as p, ref as d, resolveComponent as n, openBlock as t, createElementBlock as f, Fragment as v, createVNode as c, createElementVNode as b, unref as a, createBlock as s, resolveDynamicComponent as m, createCommentVNode as k } from "vue";
2
- import { _ as x, a as C } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-Bdo4vZkG.js";
2
+ import { _ as x, a as C } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-BAyotuXd.js";
3
3
  const F = { class: "px-24 flex flex-col gap-y-32 pb-24" }, B = /* @__PURE__ */ p({
4
4
  __name: "Transaction",
5
5
  setup(T) {
@@ -0,0 +1,454 @@
1
+ import { defineComponent as N, ref as g, watch as T, onMounted as D, resolveComponent as p, openBlock as _, createBlock as U, unref as o, isRef as H, withCtx as V, createElementVNode as l, createVNode as r, toDisplayString as I, computed as Q, createElementBlock as B, Fragment as A, renderList as W, resolveDynamicComponent as Z, h as y } from "vue";
2
+ import { _ as Y } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as ee, components as x } from "@feedmepos/ui-library";
4
+ import { p as j, c as ae } from "./plugins-B_d-WFtN.js";
5
+ import { useCoreStore as oe } from "@feedmepos/mf-common";
6
+ import { u as q } from "./loading-Cxp7sI5p.js";
7
+ import { u as te, J as ne, a as se, R as le } from "./app-CxBTTB31.js";
8
+ import { u as ie } from "./campaign-B0aXkadj.js";
9
+ import { g as K, b as z } from "./dto-BtdVC-Ab.js";
10
+ import { u as re } from "./template-qlb46PGl.js";
11
+ import { _ as ce } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BsbgHsah.js";
12
+ import { _ as ue } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
13
+ import { l as me } from "./lodash-DsT1nK-T.js";
14
+ import { m as de } from "./index-Dg-PMgXV.js";
15
+ import { c as S } from "./index-BTntbYTS.js";
16
+ import { useRouter as pe } from "vue-router";
17
+ const fe = { class: "space-y-16" }, he = { class: "fm-typo-en-body-md-600" }, ge = { class: "flex items-center justify-end" }, ye = { class: "flex items-center gap-8" }, ve = /* @__PURE__ */ N({
18
+ __name: "SendVoucherSheet",
19
+ emits: ["success"],
20
+ setup(X, { expose: L, emit: F }) {
21
+ const { minor: M } = q, k = g(""), i = g({}), P = F, f = g(!1), u = g([]);
22
+ function m(e) {
23
+ f.value = !0, k.value = e.campaignId, u.value = [];
24
+ }
25
+ function v() {
26
+ f.value = !1;
27
+ }
28
+ const $ = [
29
+ {
30
+ header: "Name",
31
+ accessorFn: (e) => e.name || "No Profile"
32
+ },
33
+ {
34
+ header: "Phone",
35
+ accessorFn: (e) => e.phoneNumber || "-"
36
+ }
37
+ ], s = g({
38
+ searchValue: "",
39
+ pageSize: 10,
40
+ pageCount: 0,
41
+ pageIndex: 0,
42
+ totalRows: 0,
43
+ isLoading: !1
44
+ }), d = g([]), b = async (e) => {
45
+ s.value.isLoading = !0, d.value = [];
46
+ const a = await de.read({
47
+ limit: e.pageSize,
48
+ skip: e.pageIndex,
49
+ sortBy: "_id",
50
+ search: s.value.searchValue,
51
+ descending: !1
52
+ });
53
+ d.value = a.resources, s.value.totalRows = a.meta.totalResources ?? 0, s.value.pageCount = a.meta.totalPages ?? 0, s.value.isLoading = !1, i.value = {}, u.value.forEach((t) => {
54
+ const c = d.value.findIndex((C) => C._id == t);
55
+ c > -1 && (console.log(c, "fetch member index"), i.value[c] = !0);
56
+ });
57
+ };
58
+ function w() {
59
+ d.value.length > 0 && (u.value = u.value.filter(
60
+ (e) => !d.value.some((a) => a._id === e) || // Keep if not in current page
61
+ Object.entries(i.value).some(
62
+ ([a, t]) => t && d.value[a]._id === e
63
+ // Keep if selected in current page
64
+ )
65
+ ));
66
+ for (const [e, a] of Object.entries(i.value))
67
+ if (a) {
68
+ const t = d.value[e]._id;
69
+ u.value.includes(t) || u.value.push(t);
70
+ }
71
+ }
72
+ async function E(e) {
73
+ u.value.length < 1 || await M(
74
+ async () => {
75
+ await S.sendCollection(k.value, {
76
+ memberId: u.value
77
+ }), await P("success"), v();
78
+ },
79
+ {
80
+ message: "Sending claim(s)",
81
+ successMessage: "Claim(s) created"
82
+ }
83
+ );
84
+ }
85
+ return T(i, w, { deep: !0 }), T(
86
+ () => s.value.searchValue,
87
+ me.debounce(async () => {
88
+ await b({ pageSize: 10, pageIndex: 0 });
89
+ }, 500)
90
+ ), L({
91
+ showSheet: m,
92
+ hideSheet: v
93
+ }), D(async () => {
94
+ await b(s.value);
95
+ }), (e, a) => {
96
+ const t = p("FmSearch"), c = p("FmTable"), C = p("FmButton"), R = p("FmSideSheet");
97
+ return _(), U(R, {
98
+ "max-width": 560,
99
+ "dismiss-away": !0,
100
+ header: "Send voucher to",
101
+ modelValue: o(f),
102
+ "onUpdate:modelValue": [
103
+ a[3] || (a[3] = (h) => H(f) ? f.value = h : null),
104
+ a[4] || (a[4] = (h) => f.value = h)
105
+ ]
106
+ }, {
107
+ "side-sheet-footer": V(() => [
108
+ l("div", ye, [
109
+ r(C, {
110
+ label: "Send",
111
+ loading: o(te)().isLoading,
112
+ onClick: E
113
+ }, null, 8, ["loading"]),
114
+ r(C, {
115
+ label: "Cancel",
116
+ type: "button",
117
+ variant: "tertiary",
118
+ onClick: a[2] || (a[2] = (h) => f.value = !1)
119
+ })
120
+ ])
121
+ ]),
122
+ default: V(() => [
123
+ r(ne, { json: o(u) }, null, 8, ["json"]),
124
+ l("div", fe, [
125
+ l("div", he, I(o(u).length) + " members selected ", 1),
126
+ l("div", ge, [
127
+ r(t, {
128
+ class: "mt-4",
129
+ modelValue: o(s).searchValue,
130
+ "onUpdate:modelValue": a[0] || (a[0] = (h) => o(s).searchValue = h),
131
+ placeholder: "Search Member",
132
+ collapsible: ""
133
+ }, null, 8, ["modelValue"])
134
+ ]),
135
+ r(c, {
136
+ modelValue: o(i),
137
+ "onUpdate:modelValue": a[1] || (a[1] = (h) => H(i) ? i.value = h : null),
138
+ class: "xs:hidden",
139
+ selection: "multiple",
140
+ loading: o(s).isLoading,
141
+ "row-data": o(d),
142
+ "column-defs": $,
143
+ "page-size": o(s).pageSize,
144
+ "page-count": o(s).pageCount,
145
+ "hide-footer": o(s).totalRows <= o(s).pageSize,
146
+ "fetch-fn": b
147
+ }, null, 8, ["modelValue", "loading", "row-data", "page-size", "page-count", "hide-footer"])
148
+ ])
149
+ ]),
150
+ _: 1
151
+ }, 8, ["modelValue"]);
152
+ };
153
+ }
154
+ });
155
+ var _e = { 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", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
156
+ const be = { class: "px-24 flex flex-col gap-y-16" }, we = { class: "flex items-center justify-between w-full" }, Ce = { class: "flex gap-8 overflow-x-auto" }, xe = { class: "space-y-8" }, Se = { class: "flex w-full gap-4 items-center" }, Ve = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fe = { class: "space-y-4" }, ke = { class: "fm-typo-en-body-lg-600" }, Re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ue = /* @__PURE__ */ l("img", {
157
+ src: Y,
158
+ class: "aspect-square w-[150px]"
159
+ }, null, -1), Ie = /* @__PURE__ */ l("div", { class: "flex flex-col gap-16 text-center" }, [
160
+ /* @__PURE__ */ l("div", { class: "fm-typo-en-title-sm-800" }, "Create voucher campaign"),
161
+ /* @__PURE__ */ l("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. ")
162
+ ], -1), Xe = /* @__PURE__ */ N({
163
+ __name: "Voucher",
164
+ setup(X) {
165
+ const L = {
166
+ label: "Create campaign",
167
+ value: "create",
168
+ isPrimary: !0,
169
+ prependIcon: "add"
170
+ }, F = ee(), M = re("VOUCHER", F), k = se(), i = ie(), { global: P, minor: f } = q, u = pe(), m = g({
171
+ searchKey: "",
172
+ location: null
173
+ }), v = Q(
174
+ () => i.campaigns.voucher.filter(
175
+ (e) => !m.value.location || !e.targetLocation || e.targetLocation.includes(m.value.location)
176
+ )
177
+ ), $ = [
178
+ {
179
+ header: "Voucher title",
180
+ accessorFn: (e) => e.name
181
+ },
182
+ {
183
+ header: "Status",
184
+ cell(e) {
185
+ return K(e.row.original);
186
+ }
187
+ },
188
+ {
189
+ header: "Summary",
190
+ accessorFn: (e) => z(e)
191
+ },
192
+ {
193
+ header: "Quota",
194
+ accessorFn: (e) => {
195
+ var a;
196
+ return ((a = e.pf_collectible) == null ? void 0 : a.options.maxReceive) ?? "Unlimited";
197
+ }
198
+ },
199
+ {
200
+ header: "Claimed",
201
+ accessorFn: (e) => {
202
+ var a;
203
+ return ((a = e == null ? void 0 : e.pf_collectible) == null ? void 0 : a.currentReceive) ?? 0;
204
+ }
205
+ },
206
+ {
207
+ header: "Actions",
208
+ cell(e) {
209
+ return y("div", { class: "flex items-center justify-end" }, [
210
+ y(x.FmButton, {
211
+ icon: "visibility",
212
+ variant: "tertiary",
213
+ iconColor: "neutral-gray-400",
214
+ onClick: async (a) => {
215
+ a.stopPropagation(), await u.push({
216
+ name: le["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
217
+ params: { id: e.row.original._id }
218
+ });
219
+ }
220
+ }),
221
+ y(
222
+ x.FmMenu,
223
+ {
224
+ placement: "bottom-end",
225
+ onClick: (a) => {
226
+ a.stopPropagation();
227
+ }
228
+ },
229
+ {
230
+ "menu-button": () => y(x.FmButton, {
231
+ icon: "more_vert",
232
+ iconColor: "neutral-gray-400",
233
+ variant: "tertiary"
234
+ }),
235
+ default: () => {
236
+ const a = [
237
+ y(
238
+ x.FmMenuItem,
239
+ {
240
+ onClick: async (t) => {
241
+ t.stopPropagation(), b(e.row.original);
242
+ }
243
+ },
244
+ {
245
+ label: y(
246
+ "div",
247
+ {
248
+ class: "text-fm-color-typo-error fm-typo-en-body-md-400"
249
+ },
250
+ "Remove"
251
+ )
252
+ }
253
+ )
254
+ ];
255
+ return e.row.original.event.type === "SIMPLE_CLAIM" && (a.unshift(
256
+ y(x.FmMenuItem, {
257
+ label: "Send",
258
+ onClick: async (t) => {
259
+ var c;
260
+ t.stopPropagation(), (c = d.value) == null || c.showSheet({
261
+ campaignId: e.row.original._id
262
+ });
263
+ }
264
+ })
265
+ ), a.unshift(
266
+ y(x.FmMenuItem, {
267
+ label: "Share",
268
+ onClick: async (t) => {
269
+ if (t.stopPropagation(), e.row.original.event.type !== "SIMPLE_CLAIM")
270
+ return await j.confirm(
271
+ "Cannot share a voucher that is not a simple claim.",
272
+ "Share Voucher",
273
+ "OK"
274
+ );
275
+ await ae(
276
+ `https://${oe().currentBusiness.value._id}.${_e.appUrl}/vouchers/${e.row.original._id}`,
277
+ {
278
+ successMessage: "Voucher link copied to clipboard"
279
+ }
280
+ );
281
+ }
282
+ })
283
+ )), a;
284
+ }
285
+ }
286
+ )
287
+ ]);
288
+ }
289
+ }
290
+ ], s = g(), d = g();
291
+ async function b(e) {
292
+ await j.remove(`Are you sure you want to remove ${e.name}?`) && await f(
293
+ async () => {
294
+ await S.delete(e._id), await i.read("VOUCHER");
295
+ },
296
+ {
297
+ message: `Removing ${e.name}`,
298
+ successMessage: `Removed ${e.name} successfully`
299
+ }
300
+ );
301
+ }
302
+ async function w(e) {
303
+ e ? await a() : M.open(async (t) => {
304
+ await a(t);
305
+ });
306
+ async function a(t) {
307
+ var c;
308
+ (c = s.value) == null || c.showSheet(
309
+ !0,
310
+ "VOUCHER",
311
+ e ? await S.readById(e._id) : void 0,
312
+ t
313
+ );
314
+ }
315
+ }
316
+ async function E(e) {
317
+ e.campaign._id && await new Promise((a) => {
318
+ F.open({
319
+ title: "Confirmation",
320
+ message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
321
+ primaryActions: { text: "Update all", close: !0 },
322
+ secondaryActions: { text: "Update future only", close: !0 }
323
+ }).onPrimary(async () => {
324
+ var t;
325
+ e.updateCollections = !0, (t = window.top) == null || t.postMessage("updateAllVoucher", "*"), a();
326
+ }).onSecondary(async () => {
327
+ a();
328
+ });
329
+ }), await f(
330
+ async () => {
331
+ e.campaign._id ? await S.update(e.campaign._id, e) : await S.create(e), await i.read("VOUCHER");
332
+ },
333
+ {
334
+ message: `${e.campaign._id ? "Updating" : "Creating"} voucher`,
335
+ successMessage: `Voucher ${e.campaign._id ? "updated" : "created"} successfully`
336
+ }
337
+ );
338
+ }
339
+ return D(async () => {
340
+ await P(async () => {
341
+ await i.read("VOUCHER");
342
+ });
343
+ }), (e, a) => {
344
+ const t = p("FmPageHead"), c = p("FmSearch"), C = p("FmTable"), R = p("FmButton"), h = p("FmListItem"), G = p("FmList"), J = p("FmCard");
345
+ return _(), B(A, null, [
346
+ r(t, {
347
+ title: "Voucher",
348
+ actions: o(v).length > 0 ? [L] : [],
349
+ "onClick:action": a[0] || (a[0] = () => w())
350
+ }, null, 8, ["actions"]),
351
+ l("div", be, [
352
+ r(c, {
353
+ modelValue: o(m).searchKey,
354
+ "onUpdate:modelValue": a[1] || (a[1] = (n) => o(m).searchKey = n),
355
+ class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
356
+ placeholder: "search",
357
+ collapsible: ""
358
+ }, null, 8, ["modelValue"]),
359
+ o(i).campaigns.voucher && o(i).campaigns.voucher.length > 0 ? (_(), B(A, { key: 0 }, [
360
+ l("div", we, [
361
+ l("div", Ce, [
362
+ r(ue, {
363
+ modelValue: o(m).location,
364
+ "onUpdate:modelValue": a[2] || (a[2] = (n) => o(m).location = n),
365
+ label: "Location: ",
366
+ "show-item-label": !0,
367
+ icon: "storefront",
368
+ placement: "bottom-start",
369
+ items: o(k).locationItems
370
+ }, null, 8, ["modelValue", "items"])
371
+ ]),
372
+ r(c, {
373
+ modelValue: o(m).searchKey,
374
+ "onUpdate:modelValue": a[3] || (a[3] = (n) => o(m).searchKey = n),
375
+ class: "xs:hidden",
376
+ placeholder: "search",
377
+ collapsible: ""
378
+ }, null, 8, ["modelValue"])
379
+ ]),
380
+ r(C, {
381
+ class: "xs:hidden",
382
+ "row-data": o(v),
383
+ "column-defs": $,
384
+ "search-value": o(m).searchKey,
385
+ "column-filter": [],
386
+ onRowClick: a[4] || (a[4] = (n) => w(n.original)),
387
+ "hide-footer": o(v).length < 10
388
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
389
+ r(G, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
390
+ default: V(() => [
391
+ (_(!0), B(A, null, W(o(v).filter(
392
+ (n) => n.name.toLowerCase().includes(o(m).searchKey.toLowerCase())
393
+ ), (n) => (_(), U(h, {
394
+ key: n._id.toString(),
395
+ onClick: (O) => w(n),
396
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
397
+ }, {
398
+ default: V(() => [
399
+ l("div", xe, [
400
+ l("div", Se, [
401
+ (_(), U(Z(o(K)(n)))),
402
+ l("div", Ve, I(n.currentReceive ?? 0) + " used ", 1)
403
+ ]),
404
+ l("div", Fe, [
405
+ l("div", ke, I(n.name), 1),
406
+ l("div", Re, I(o(z)(n)), 1)
407
+ ])
408
+ ]),
409
+ r(R, {
410
+ icon: "delete",
411
+ "icon-color": "neutral-gray-400",
412
+ variant: "tertiary",
413
+ onClick: (O) => (O.stopPropagation(), b(n))
414
+ }, null, 8, ["onClick"])
415
+ ]),
416
+ _: 2
417
+ }, 1032, ["onClick"]))), 128))
418
+ ]),
419
+ _: 1
420
+ })
421
+ ], 64)) : (_(), U(J, {
422
+ key: 1,
423
+ variant: "outlined",
424
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
425
+ }, {
426
+ default: V(() => [
427
+ Ue,
428
+ Ie,
429
+ r(R, {
430
+ variant: "primary",
431
+ label: "Create voucher campaign",
432
+ icon: "add",
433
+ onClick: a[5] || (a[5] = (n) => w())
434
+ })
435
+ ]),
436
+ _: 1
437
+ })),
438
+ r(ce, {
439
+ ref_key: "sheetRef",
440
+ ref: s,
441
+ "onSubmit:modelValue": E
442
+ }, null, 512),
443
+ r(ve, {
444
+ ref_key: "sendVoucherSheetRef",
445
+ ref: d
446
+ }, null, 512)
447
+ ])
448
+ ], 64);
449
+ };
450
+ }
451
+ });
452
+ export {
453
+ Xe as default
454
+ };