@feedmepos/mf-connect 0.1.0-beta.5 → 0.1.0-beta.50

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 (112) hide show
  1. package/dist/Analytic-D-yp03jJ.js +427 -0
  2. package/dist/{App-C8Qfnkhz.js → App-CeQWTGNK.js} +441 -420
  3. package/dist/AuditLogs-2qzwcMXR.js +1885 -0
  4. package/dist/Bin-D1b2NbbA.js +191 -0
  5. package/dist/{Broadcast-BK-1MQkL.js → Broadcast-bKF9mIns.js} +13 -12
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BLzpFQoc.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B_q5K-cx.js} +6 -8
  7. package/dist/Card-BCAyfBLi.js +896 -0
  8. package/dist/{Collections-TA4iW1r0.js → Collections-Yz3F55bv.js} +27 -31
  9. package/dist/{Credit-Df9iFQjZ.js → Credit-Ceptt_g_.js} +17 -16
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
  11. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-CLFeMi0j.js +169 -0
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-TjNinQ8e.js +2181 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BCRVyPwl.js → EffectSheet.vue_vue_type_style_index_0_lang-D3Bt-Vuu.js} +6 -6
  14. package/dist/{Experience-ByLFXKn6.js → Experience-DskHKzfo.js} +26 -25
  15. package/dist/{Game-B6Ez0pfW.js → Game-IJ6X0AXM.js} +21 -20
  16. package/dist/Index-CEl2y9X6.js +259 -0
  17. package/dist/Marketing-CWekLb4c.js +20071 -0
  18. package/dist/{Member-TobP1ISp.js → Member-BUZPQ5Lb.js} +4 -4
  19. package/dist/MemberList-BmVNqvbm.js +1598 -0
  20. package/dist/MemberTransactions-B3XhEOK_.js +45 -0
  21. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CZ-w6iZi.js → MessageInput.vue_vue_type_script_setup_true_lang-C6YIbQtM.js} +6 -6
  22. package/dist/{Mission-D9uTVo0G.js → Mission-Ci9ed_ph.js} +97 -84
  23. package/dist/Overview-CU9uhC-k.js +1078 -0
  24. package/dist/{Point-4rDr-53e.js → Point-wuuR7AEb.js} +26 -25
  25. package/dist/{Promotion-BKO_dtQk.js → Promotion-BMi3kyE8.js} +55 -48
  26. package/dist/Record-Wmh-g8WY.js +340 -0
  27. package/dist/Reward-BL4lxhIB.js +442 -0
  28. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CqXuTxun.js +150 -0
  29. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dbik0PEw.js +1637 -0
  30. package/dist/Segment-DObdjyYi.js +568 -0
  31. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BAuM6qP5.js +181 -0
  32. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-BfyRVxWM.js +147 -0
  33. package/dist/{Setting-B7oISD0D.js → Setting-Dqgnd7TR.js} +610 -586
  34. package/dist/Store--Z4So__g.js +1744 -0
  35. package/dist/{StoreRewards-AMxIYhjZ.js → StoreRewards-DPFVXWwm.js} +33 -32
  36. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CNsdA106.js +939 -0
  37. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B2szciPk.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CGOmGozY.js} +1 -1
  38. package/dist/{Tier-DkxdNj-K.js → Tier-36IfhsnP.js} +327 -318
  39. package/dist/{Title-VFpCOsMO.js → Title-XH56OOug.js} +199 -184
  40. package/dist/{Transaction-BgKD8n2L.js → Transaction-BUQcSmBs.js} +2 -2
  41. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-BVCfeG5T.js +130 -0
  42. package/dist/Voucher-CvmH0kcF.js +353 -0
  43. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BQOD6uEf.js +419 -0
  44. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B2FGvyza.js → ZodTextField.vue_vue_type_script_setup_true_lang-CcIcCt4N.js} +1 -1
  45. package/dist/{app-DUl5dav5.js → app-DeW5_DB0.js} +1754 -1496
  46. package/dist/{app-DA-t-2Zt.js → app-TN8KEPMu.js} +1 -1
  47. package/dist/app.js +1 -1
  48. package/dist/{business-CeCitOY4.js → business-D1mLhSME.js} +1 -1
  49. package/dist/campaign-0tnkhu78.js +1810 -0
  50. package/dist/{campaign-CcLM6e4s.js → campaign-B-12Im0w.js} +2 -2
  51. package/dist/campaign.enum-C8m-HHZE.js +20 -0
  52. package/dist/campaign.fn-CxkhbK9i.js +758 -0
  53. package/dist/collectible.enum-6Syq-vQ6.js +19 -0
  54. package/dist/{collection.fn-CAEP7YxB.js → collection.fn-BUj75Jp2.js} +2 -2
  55. package/dist/dto-8wODhIIC.js +214 -0
  56. package/dist/{effect-Dt7rXOBy.js → effect-BEZEjcJu.js} +9 -9
  57. package/dist/email-addresses-PwjkdYYD.js +705 -0
  58. package/dist/{export-CyioiboQ.js → export-BB-0vgwy.js} +5 -5
  59. package/dist/{helper-FA_9AhGV.js → helper-DOt8-wns.js} +1 -1
  60. package/dist/{index-DLN4Kzz_.js → index-B1qUjniH.js} +1 -1
  61. package/dist/index-BTMIZz4v.js +44 -0
  62. package/dist/{index-igxrd5jC.js → index-By-GlmG7.js} +1500 -1479
  63. package/dist/index-C7zBkoZ4.js +115 -0
  64. package/dist/{index-CyNdsVrw.js → index-CNlHabtk.js} +1 -1
  65. package/dist/{index-DbbO3wip.js → index-CXGiIgdK.js} +48 -4
  66. package/dist/{index-C20XBD7G.js → index-Cjn1LVjC.js} +2192 -931
  67. package/dist/index-CpfUrdgw.js +29000 -0
  68. package/dist/index-CsaQJMAR.js +66 -0
  69. package/dist/index-DZuEmMyY.js +54 -0
  70. package/dist/{index-CCdXvb92.js → index-D_zwqIhq.js} +1 -1
  71. package/dist/index-DabUEw_c.js +32 -0
  72. package/dist/{index-BiFueJiF.js → index-X-FfC49l.js} +258 -192
  73. package/dist/index-vh86FiIQ.js +10 -0
  74. package/dist/{index.esm2017-Dl_CdTcK.js → index.esm2017-DJOUiVjR.js} +33 -33
  75. package/dist/loading-aCWVsOPY.js +71 -0
  76. package/dist/{membership-DFiY8aVd.js → membership-1etsHC5G.js} +54 -46
  77. package/dist/money-DzWRURZ5.js +15 -0
  78. package/dist/number-BxIQO1i3.js +12 -0
  79. package/dist/objectid-DjhmYkn-.js +145 -0
  80. package/dist/{loading-CZ0fiViM.js → plugins-CSPFAU50.js} +2990 -3062
  81. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  82. package/dist/reward-Bh4Li9f0.js +36 -0
  83. package/dist/{rule-C3e1xTqN.js → rule-CHTTTUFB.js} +180 -177
  84. package/dist/{rule-builder-MEVb_AiZ.js → rule-builder-OHfUJTIA.js} +1 -1
  85. package/dist/style.css +1 -1
  86. package/dist/{template-C2OKWd_e.js → template-ZGxXqkaC.js} +5 -5
  87. package/dist/trigger-Ogu5FDs0.js +144 -0
  88. package/dist/user-DBuU81tO.js +54 -0
  89. package/dist/{vue-i18n-CjxDUnX6.js → vue-i18n-CKpKQ6iE.js} +216 -216
  90. package/dist/{xlsx-CtXdl3ls.js → xlsx-DJDZBIeg.js} +1 -1
  91. package/package.json +9 -7
  92. package/dist/Analytic-C_ZFR5jh.js +0 -622
  93. package/dist/Card-C7dUFJKe.js +0 -825
  94. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bgl90veU.js +0 -2813
  95. package/dist/Marketing-BaqZUeVI.js +0 -316
  96. package/dist/MemberList-B9cutmEh.js +0 -1733
  97. package/dist/MemberTransactions-DRHA7AOF.js +0 -38
  98. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BHCoDSTg.js +0 -1753
  99. package/dist/Segment-Dj8nc3AE.js +0 -437
  100. package/dist/Store-CJ3wcohQ.js +0 -1511
  101. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-wXUTfQQF.js +0 -890
  102. package/dist/Voucher-BbTLt8Pt.js +0 -490
  103. package/dist/dto-CRJma6eX.js +0 -2770
  104. package/dist/index-B1e0LtDe.js +0 -99
  105. package/dist/index-Be2ZYDy_.js +0 -298
  106. package/dist/index-CDkITvze.js +0 -762
  107. package/dist/index-CuvNtC_M.js +0 -61
  108. package/dist/index-DPP5F3bT.js +0 -206
  109. package/dist/index-Dbo3DDwp.js +0 -29193
  110. package/dist/money-D8hUEfP4.js +0 -15
  111. package/dist/number-DL3GAeVt.js +0 -12
  112. package/dist/user-Bm4KttFq.js +0 -37
@@ -1,490 +0,0 @@
1
- import { defineComponent as X, ref as _, watch as N, onMounted as J, resolveComponent as h, openBlock as y, createBlock as k, unref as t, isRef as j, withCtx as M, createElementVNode as l, createVNode as r, toDisplayString as F, computed as oe, h as C, createElementBlock as $, Fragment as T, renderList as te, resolveDynamicComponent as ae, createCommentVNode as K } from "vue";
2
- import { _ as ne } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as se, components as V } from "@feedmepos/ui-library";
4
- import { u as W, p as z, a as le } from "./loading-CZ0fiViM.js";
5
- import { useCoreStore as ce } from "@feedmepos/mf-common";
6
- import { u as ie } from "./business-CeCitOY4.js";
7
- import { u as re } from "./campaign-CcLM6e4s.js";
8
- import { g as D, b as q } from "./dto-CRJma6eX.js";
9
- import "./index-CyNdsVrw.js";
10
- import { u as ue } from "./template-C2OKWd_e.js";
11
- import { _ as me } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bgl90veU.js";
12
- import { _ as de } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
13
- import { J as pe } from "./JsonViewer-v8_C7l5N.js";
14
- import { u as fe } from "./app-wDQR6dpb.js";
15
- import { l as he } from "./lodash-B5I3zXaY.js";
16
- import { m as ve } from "./index-CCdXvb92.js";
17
- import { c as L } from "./index-B1e0LtDe.js";
18
- import { u as ge } from "./vue-i18n-CjxDUnX6.js";
19
- import { useRouter as ye } from "vue-router";
20
- import { R as G } from "./app-DUl5dav5.js";
21
- const _e = { class: "space-y-16" }, be = { class: "fm-typo-en-body-md-600" }, Ce = { class: "flex items-center justify-end" }, we = { class: "flex items-center gap-8" }, Se = /* @__PURE__ */ X({
22
- __name: "SendVoucherSheet",
23
- emits: ["success"],
24
- setup(Q, { expose: a, emit: A }) {
25
- const { minor: R } = W, P = _(""), v = _({}), b = A, g = _(!1), u = _([]);
26
- function U(c) {
27
- g.value = !0, P.value = c.campaignId, u.value = [];
28
- }
29
- function m() {
30
- g.value = !1;
31
- }
32
- const S = [
33
- {
34
- header: "Name",
35
- accessorFn: (c) => c.name || "No Profile"
36
- },
37
- {
38
- header: "Phone",
39
- accessorFn: (c) => c.phoneNumber || "-"
40
- }
41
- ], i = _({
42
- searchValue: "",
43
- pageSize: 10,
44
- pageCount: 0,
45
- pageIndex: 0,
46
- totalRows: 0,
47
- isLoading: !1
48
- }), f = _([]), w = async (c) => {
49
- i.value.isLoading = !0, f.value = [];
50
- const e = await ve.read({
51
- limit: c.pageSize,
52
- skip: c.pageIndex,
53
- sortBy: "_id",
54
- search: i.value.searchValue,
55
- descending: !1
56
- });
57
- f.value = e.resources, i.value.totalRows = e.meta.totalResources ?? 0, i.value.pageCount = e.meta.totalPages ?? 0, i.value.isLoading = !1, v.value = {}, u.value.forEach((o) => {
58
- const s = f.value.findIndex((d) => d._id == o);
59
- s > -1 && (console.log(s, "fetch member index"), v.value[s] = !0);
60
- });
61
- };
62
- function E() {
63
- f.value.length > 0 && (u.value = u.value.filter(
64
- (c) => !f.value.some((e) => e._id === c) || // Keep if not in current page
65
- Object.entries(v.value).some(
66
- ([e, o]) => o && f.value[e]._id === c
67
- // Keep if selected in current page
68
- )
69
- ));
70
- for (const [c, e] of Object.entries(v.value))
71
- if (e) {
72
- const o = f.value[c]._id;
73
- u.value.includes(o) || u.value.push(o);
74
- }
75
- }
76
- async function x(c) {
77
- u.value.length < 1 || await R(
78
- async () => {
79
- await L.sendCollection(P.value, {
80
- memberId: u.value
81
- }), await b("success"), m();
82
- },
83
- {
84
- message: "Sending claim(s)",
85
- successMessage: "Claim(s) created"
86
- }
87
- );
88
- }
89
- return N(v, E, { deep: !0 }), N(
90
- () => i.value.searchValue,
91
- he.debounce(async () => {
92
- await w({ pageSize: 10, pageIndex: 0 });
93
- }, 500)
94
- ), a({
95
- showSheet: U,
96
- hideSheet: m
97
- }), J(async () => {
98
- await w(i.value);
99
- }), (c, e) => {
100
- const o = h("FmSearch"), s = h("FmTable"), d = h("FmButton"), B = h("FmSideSheet");
101
- return y(), k(B, {
102
- "max-width": 560,
103
- "dismiss-away": !0,
104
- header: "Send voucher to",
105
- modelValue: t(g),
106
- "onUpdate:modelValue": [
107
- e[3] || (e[3] = (p) => j(g) ? g.value = p : null),
108
- e[4] || (e[4] = (p) => g.value = p)
109
- ]
110
- }, {
111
- "side-sheet-footer": M(() => [
112
- l("div", we, [
113
- r(d, {
114
- label: "Send",
115
- loading: t(fe)().isLoading,
116
- onClick: x
117
- }, null, 8, ["loading"]),
118
- r(d, {
119
- label: "Cancel",
120
- type: "button",
121
- variant: "tertiary",
122
- onClick: e[2] || (e[2] = (p) => g.value = !1)
123
- })
124
- ])
125
- ]),
126
- default: M(() => [
127
- r(pe, { json: t(u) }, null, 8, ["json"]),
128
- l("div", _e, [
129
- l("div", be, F(t(u).length) + " members selected ", 1),
130
- l("div", Ce, [
131
- r(o, {
132
- class: "mt-4",
133
- modelValue: t(i).searchValue,
134
- "onUpdate:modelValue": e[0] || (e[0] = (p) => t(i).searchValue = p),
135
- placeholder: "Search Member",
136
- collapsible: ""
137
- }, null, 8, ["modelValue"])
138
- ]),
139
- r(s, {
140
- modelValue: t(v),
141
- "onUpdate:modelValue": e[1] || (e[1] = (p) => j(v) ? v.value = p : null),
142
- selection: "multiple",
143
- loading: t(i).isLoading,
144
- "row-data": t(f),
145
- "column-defs": S,
146
- "page-size": t(i).pageSize,
147
- "page-count": t(i).pageCount,
148
- "hide-footer": t(i).totalRows <= t(i).pageSize,
149
- "fetch-fn": w
150
- }, null, 8, ["modelValue", "loading", "row-data", "page-size", "page-count", "hide-footer"])
151
- ])
152
- ]),
153
- _: 1
154
- }, 8, ["modelValue"]);
155
- };
156
- }
157
- });
158
- var xe = { 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" };
159
- const Ve = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-center justify-between w-full" }, Fe = { class: "flex gap-8 overflow-x-auto" }, Ie = { 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" }, Re = { class: "space-y-4" }, Pe = { class: "fm-typo-en-body-lg-600" }, Ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ee = { class: "flex gap-8 items-center" }, Ae = { class: "flex flex-col gap-16 text-center" }, Be = { class: "fm-typo-en-title-sm-800" }, Oe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, no = /* @__PURE__ */ X({
160
- __name: "Voucher",
161
- setup(Q) {
162
- const { t: a } = ge(), A = {
163
- label: a("connect.voucher.createCampaign"),
164
- value: "create",
165
- isPrimary: !0,
166
- prependIcon: "add"
167
- }, R = se(), P = ue("VOUCHER", R), v = ie(), b = re(), { global: g, minor: u } = W, U = ye(), m = _({
168
- searchKey: "",
169
- location: null
170
- }), S = oe(
171
- () => b.campaigns.voucher.filter(
172
- (e) => !m.value.location || !e.targetLocation || e.targetLocation.includes(m.value.location)
173
- )
174
- ), i = [
175
- {
176
- header: a("connect.voucher.voucherTitle"),
177
- accessorFn: (e) => e.name
178
- },
179
- {
180
- header: a("connect.voucher.status"),
181
- cell(e) {
182
- return D(e.row.original);
183
- }
184
- },
185
- {
186
- header: a("connect.voucher.summary"),
187
- accessorFn: (e) => q(e)
188
- },
189
- {
190
- header: a("connect.voucher.quota"),
191
- accessorFn: (e) => {
192
- var o;
193
- return ((o = e.pf_collectible) == null ? void 0 : o.options.maxReceive) ?? "Unlimited";
194
- }
195
- },
196
- {
197
- header: a("connect.voucher.claimed"),
198
- accessorFn: (e) => {
199
- var o;
200
- return ((o = e == null ? void 0 : e.pf_collectible) == null ? void 0 : o.currentReceive) ?? 0;
201
- }
202
- },
203
- {
204
- header: a("connect.voucher.actions"),
205
- cell(e) {
206
- return C("div", { class: "flex items-center justify-end" }, [
207
- C(V.FmButton, {
208
- icon: "visibility",
209
- variant: "tertiary",
210
- iconColor: "neutral-gray-400",
211
- onClick: async (o) => {
212
- o.stopPropagation(), await U.push({
213
- name: G["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
214
- params: { id: e.row.original._id }
215
- });
216
- }
217
- }),
218
- C(
219
- V.FmMenu,
220
- {
221
- placement: "bottom-end",
222
- onClick: (o) => {
223
- o.stopPropagation();
224
- }
225
- },
226
- {
227
- "menu-button": () => C(V.FmButton, {
228
- icon: "more_vert",
229
- iconColor: "neutral-gray-400",
230
- variant: "tertiary"
231
- }),
232
- default: () => {
233
- const o = [
234
- C(
235
- V.FmMenuItem,
236
- {
237
- onClick: async (s) => {
238
- s.stopPropagation(), E(e.row.original);
239
- }
240
- },
241
- {
242
- label: C(
243
- "div",
244
- {
245
- class: "text-fm-color-typo-error fm-typo-en-body-md-400"
246
- },
247
- a("connect.voucher.remove")
248
- )
249
- }
250
- )
251
- ];
252
- return e.row.original.event.type === "SIMPLE_CLAIM" && (o.unshift(
253
- C(V.FmMenuItem, {
254
- label: a("connect.voucher.send"),
255
- onClick: async (s) => {
256
- var d;
257
- s.stopPropagation(), (d = w.value) == null || d.showSheet({
258
- campaignId: e.row.original._id
259
- });
260
- }
261
- })
262
- ), o.unshift(
263
- C(V.FmMenuItem, {
264
- label: a("connect.voucher.share"),
265
- onClick: async (s) => {
266
- if (s.stopPropagation(), e.row.original.event.type !== "SIMPLE_CLAIM")
267
- return await z.confirm(
268
- "Cannot share a voucher that is not a simple claim.",
269
- "Share Voucher",
270
- "OK"
271
- );
272
- await le(
273
- `https://${ce().currentBusiness.value._id}.${xe.appUrl}/vouchers/${e.row.original._id}`,
274
- {
275
- successMessage: "Voucher link copied to clipboard"
276
- }
277
- );
278
- }
279
- })
280
- )), o;
281
- }
282
- }
283
- )
284
- ]);
285
- }
286
- }
287
- ], f = _(), w = _();
288
- async function E(e) {
289
- await z.remove(a("voucher.confirmRemove", { name: e.name })) && await u(
290
- async () => {
291
- await L.delete(e._id), await b.read("VOUCHER");
292
- },
293
- {
294
- message: a("voucher.removing", { name: e.name }),
295
- successMessage: a("voucher.removedSuccessfully", { name: e.name })
296
- }
297
- );
298
- }
299
- async function x(e) {
300
- e ? await o() : P.open(async (s) => {
301
- await o(s);
302
- });
303
- async function o(s) {
304
- var d;
305
- (d = f.value) == null || d.showSheet(
306
- !0,
307
- "VOUCHER",
308
- e ? await L.readById(e._id) : void 0,
309
- s
310
- );
311
- }
312
- }
313
- async function c(e) {
314
- e.campaign._id && await new Promise((o) => {
315
- R.open({
316
- title: "Confirmation",
317
- message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
318
- primaryActions: { text: "Update all", close: !0 },
319
- secondaryActions: { text: "Update future only", close: !0 }
320
- }).onPrimary(async () => {
321
- var s;
322
- e.updateCollections = !0, (s = window.top) == null || s.postMessage("updateAllVoucher", "*"), o();
323
- }).onSecondary(async () => {
324
- o();
325
- });
326
- }), await u(
327
- async () => {
328
- e.campaign._id ? await L.update(e.campaign._id, e) : await L.create(e), await b.read("VOUCHER");
329
- },
330
- {
331
- message: a(
332
- e.campaign._id ? "connect.voucher.updating" : "connect.voucher.creating"
333
- ),
334
- successMessage: a(
335
- e.campaign._id ? "connect.voucher.updatedSuccessfully" : "connect.voucher.createdSuccessfully"
336
- )
337
- }
338
- );
339
- }
340
- return J(async () => {
341
- await g(async () => {
342
- await b.read("VOUCHER");
343
- });
344
- }), (e, o) => {
345
- const s = h("FmPageHead"), d = h("FmSearch"), B = h("FmTable"), p = h("FmButton"), Z = h("FmListItem"), Y = h("FmList"), ee = h("FmCard");
346
- return y(), $(T, null, [
347
- r(s, {
348
- title: t(a)("connect.voucher.title"),
349
- actions: t(S).length > 0 ? [A] : [],
350
- "onClick:action": o[0] || (o[0] = () => x())
351
- }, null, 8, ["title", "actions"]),
352
- l("div", Ve, [
353
- r(d, {
354
- modelValue: t(m).searchKey,
355
- "onUpdate:modelValue": o[1] || (o[1] = (n) => t(m).searchKey = n),
356
- class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
357
- placeholder: t(a)("connect.voucher.search"),
358
- collapsible: ""
359
- }, null, 8, ["modelValue", "placeholder"]),
360
- t(b).campaigns.voucher && t(b).campaigns.voucher.length > 0 ? (y(), $(T, { key: 0 }, [
361
- l("div", ke, [
362
- l("div", Fe, [
363
- r(de, {
364
- modelValue: t(m).location,
365
- "onUpdate:modelValue": o[2] || (o[2] = (n) => t(m).location = n),
366
- label: t(a)("connect.voucher.location"),
367
- "show-item-label": !0,
368
- icon: "storefront",
369
- placement: "bottom-start",
370
- items: t(v).locationItems
371
- }, null, 8, ["modelValue", "label", "items"])
372
- ]),
373
- r(d, {
374
- modelValue: t(m).searchKey,
375
- "onUpdate:modelValue": o[3] || (o[3] = (n) => t(m).searchKey = n),
376
- class: "xs:hidden",
377
- placeholder: t(a)("connect.voucher.search"),
378
- collapsible: ""
379
- }, null, 8, ["modelValue", "placeholder"])
380
- ]),
381
- r(B, {
382
- class: "xs:hidden",
383
- "row-data": t(S),
384
- "column-defs": i,
385
- "search-value": t(m).searchKey,
386
- "column-filter": [],
387
- onRowClick: o[4] || (o[4] = (n) => x(n.original)),
388
- "hide-footer": t(S).length < 10
389
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
390
- r(Y, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
391
- default: M(() => [
392
- (y(!0), $(T, null, te(t(S).filter(
393
- (n) => n.name.toLowerCase().includes(t(m).searchKey.toLowerCase())
394
- ), (n) => (y(), k(Z, {
395
- key: n._id.toString(),
396
- onClick: (O) => x(n),
397
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
398
- }, {
399
- default: M(() => {
400
- var O;
401
- return [
402
- l("div", Ie, [
403
- l("div", Le, [
404
- (y(), k(ae(t(D)(n)))),
405
- l("div", Me, F(((O = n.pf_collectible) == null ? void 0 : O.currentReceive) ?? 0) + " claimed ", 1)
406
- ]),
407
- l("div", Re, [
408
- l("div", Pe, F(n.name), 1),
409
- l("div", Ue, F(t(q)(n)), 1)
410
- ])
411
- ]),
412
- l("div", Ee, [
413
- n.event.type === "SIMPLE_CLAIM" ? (y(), k(p, {
414
- key: 0,
415
- icon: "visibility",
416
- "icon-color": "neutral-gray-400",
417
- variant: "tertiary",
418
- onClick: async (I) => {
419
- I.stopPropagation(), await t(U).push({
420
- name: t(G)["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
421
- params: { id: n._id }
422
- });
423
- }
424
- }, null, 8, ["onClick"])) : K("", !0),
425
- n.event.type === "SIMPLE_CLAIM" ? (y(), k(p, {
426
- key: 1,
427
- icon: "send",
428
- "icon-color": "neutral-gray-400",
429
- variant: "tertiary",
430
- onClick: (I) => {
431
- var H;
432
- I.stopPropagation(), (H = t(w)) == null || H.showSheet({
433
- campaignId: n._id
434
- });
435
- }
436
- }, null, 8, ["onClick"])) : K("", !0),
437
- r(p, {
438
- icon: "delete",
439
- "icon-color": "neutral-gray-400",
440
- variant: "tertiary",
441
- onClick: (I) => (I.stopPropagation(), E(n))
442
- }, null, 8, ["onClick"])
443
- ])
444
- ];
445
- }),
446
- _: 2
447
- }, 1032, ["onClick"]))), 128))
448
- ]),
449
- _: 1
450
- })
451
- ], 64)) : (y(), k(ee, {
452
- key: 1,
453
- variant: "outlined",
454
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
455
- }, {
456
- default: M(() => [
457
- o[6] || (o[6] = l("img", {
458
- src: ne,
459
- class: "aspect-square w-[150px]"
460
- }, null, -1)),
461
- l("div", Ae, [
462
- l("div", Be, F(t(a)("connect.voucher.createVoucherCampaign")), 1),
463
- l("div", Oe, F(t(a)("connect.voucher.description")), 1)
464
- ]),
465
- r(p, {
466
- variant: "primary",
467
- label: t(a)("connect.voucher.createVoucherCampaign"),
468
- icon: "add",
469
- onClick: o[5] || (o[5] = (n) => x())
470
- }, null, 8, ["label"])
471
- ]),
472
- _: 1
473
- })),
474
- r(me, {
475
- ref_key: "sheetRef",
476
- ref: f,
477
- "onSubmit:modelValue": c
478
- }, null, 512),
479
- r(Se, {
480
- ref_key: "sendVoucherSheetRef",
481
- ref: w
482
- }, null, 512)
483
- ])
484
- ], 64);
485
- };
486
- }
487
- });
488
- export {
489
- no as default
490
- };