@feedmepos/mf-connect 0.0.16-beta.1 → 0.0.16-beta.11

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 (95) hide show
  1. package/dist/{Analytic-C-zZmF5N.js → Analytic-Gq7PoNer.js} +368 -365
  2. package/dist/App-Cikl5jnp.js +177 -0
  3. package/dist/Broadcast-DU3JnBwZ.js +223 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-VWLBlxy1.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D0I8IZIR.js} +20 -20
  5. package/dist/Card-hIeQ5XUH.js +825 -0
  6. package/dist/Collections-B1SC1rr7.js +453 -0
  7. package/dist/Credit-BgwI8DR3.js +216 -0
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bz6TSmbW.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D9VR3P2d.js} +1026 -1022
  9. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-AhWnHG02.js → EffectSheet.vue_vue_type_style_index_0_lang-DPgu45MD.js} +29 -29
  10. package/dist/Experience-C2Q-zqV6.js +221 -0
  11. package/dist/Game-DU2pZDGk.js +255 -0
  12. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
  13. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  14. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DykNOOFD.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js} +1 -1
  15. package/dist/{MainLayout-D0AoA1tk.js → MainLayout-B1aJoR95.js} +2 -2
  16. package/dist/Marketing-DWiTQp9I.js +316 -0
  17. package/dist/Member-BEXKBFry.js +69 -0
  18. package/dist/MemberList-DzMdajIf.js +1733 -0
  19. package/dist/MemberOverview-wL_ailso.js +58 -0
  20. package/dist/{MemberTransactions-CTAx5jIV.js → MemberTransactions-Bciankuu.js} +1 -1
  21. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-C-BtHxSc.js → MessageInput.vue_vue_type_script_setup_true_lang-DH25Hfk3.js} +46 -46
  22. package/dist/Mission-KzwRlaA5.js +259 -0
  23. package/dist/Point-CSKvZXHc.js +222 -0
  24. package/dist/Promotion-IiwPhx8p.js +221 -0
  25. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CrpJySSp.js → RuleGroup.vue_vue_type_script_setup_true_lang-4zIO3oCr.js} +545 -544
  26. package/dist/Segment-2Q0PonBb.js +447 -0
  27. package/dist/{Setting-Zrj5P_4m.js → Setting-Df5vVRt4.js} +600 -598
  28. package/dist/Store-C0WXCKs6.js +1503 -0
  29. package/dist/StoreRewards-eSSIO0nk.js +401 -0
  30. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DS4APaHw.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BjnCRKGX.js} +106 -108
  31. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-ZYjWlDJ1.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-b0xTcoEp.js} +1 -1
  32. package/dist/{Tier-DVWJyQ9S.js → Tier-v-1FkRU-.js} +464 -449
  33. package/dist/{Title-B5kX64vs.js → Title-CQ2JWqBW.js} +315 -299
  34. package/dist/Transaction-0OouN_6s.js +39 -0
  35. package/dist/Voucher-CL0cgogx.js +488 -0
  36. package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
  37. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  38. package/dist/app-Bd19eW7X.js +5381 -0
  39. package/dist/app-CfS25Z66.js +34797 -0
  40. package/dist/app-wDQR6dpb.js +39 -0
  41. package/dist/app.js +5 -3
  42. package/dist/business-dQh3AEot.js +78 -0
  43. package/dist/{campaign-BZJuknWK.js → campaign-BOl8AgKA.js} +12 -12
  44. package/dist/{collection.fn-DoCkZ6z4.js → collection.fn-B_YsXmrP.js} +2 -2
  45. package/dist/dto-B8NfyVPG.js +1169 -0
  46. package/dist/{effect-B8kmnKvY.js → effect-C2jCStXO.js} +1 -1
  47. package/dist/{export-Dm6LYnWo.js → export-BtZc3Yzh.js} +3 -3
  48. package/dist/{helper-DR4XK3nv.js → helper-8oGsrM56.js} +1 -1
  49. package/dist/{index-DcUrk07Q.js → index-6FkKY3q0.js} +3 -3
  50. package/dist/{index-Bu4_26qI.js → index-C7oeXRUl.js} +1 -1
  51. package/dist/{index-CuL5-ORK.js → index-CZKYIefW.js} +6 -7
  52. package/dist/{index-yxJMhfxj.js → index-C_0IFnwi.js} +5 -5
  53. package/dist/{index-BryrRq8O.js → index-DCixRRvz.js} +36 -30
  54. package/dist/{index-CkiYkbXb.js → index-DFgt4-VW.js} +1 -1
  55. package/dist/{index-CWf0mh3a.js → index-DYDhH9bi.js} +177 -168
  56. package/dist/{index-boor8e80.js → index-Di-kWSmf.js} +3 -3
  57. package/dist/{app-DkI7dYRN.js → index-Dn0jdj0o.js} +9665 -13024
  58. package/dist/index-DwKqFNF6.js +3 -0
  59. package/dist/{index-BobRgQrE.js → index-HoacsZDk.js} +2 -2
  60. package/dist/{index-BxkxVtgm.js → index-UTQHDUdW.js} +1 -1
  61. package/dist/{loading-BzV5acUX.js → loading-D_AN6p24.js} +6807 -6805
  62. package/dist/{lodash-mg4435Qq.js → lodash-B5I3zXaY.js} +1 -1
  63. package/dist/{membership-CqbsLHqx.js → membership-Ccrx9R6r.js} +3 -3
  64. package/dist/{money-DA_gtp3q.js → money-waD-f-Zz.js} +1 -1
  65. package/dist/{number-C388eyOu.js → number-CwTGGsh9.js} +1 -1
  66. package/dist/{rule-Clmr5y4j.js → rule-DJ07h3Gh.js} +2 -2
  67. package/dist/{rule-builder-BgqNbM-P.js → rule-builder-DJ-acvVD.js} +1 -1
  68. package/dist/style.css +1 -1
  69. package/dist/template-clxvNnbF.js +190 -0
  70. package/dist/{usePagination-o5fgsZwU.js → usePagination-BeF5K3M7.js} +86 -86
  71. package/dist/vue-i18n-BxwiXSkp.js +2365 -0
  72. package/dist/{xlsx-BRdh9e2p.js → xlsx-BB366cdN.js} +1945 -1945
  73. package/package.json +9 -5
  74. package/dist/Broadcast-X69Mtv3b.js +0 -216
  75. package/dist/Card-D0X3v1UF.js +0 -822
  76. package/dist/Collections-umR6Ehqf.js +0 -452
  77. package/dist/Credit-C1EWF7R0.js +0 -214
  78. package/dist/Experience-CqL8wyPm.js +0 -211
  79. package/dist/Game--kYe64EV.js +0 -250
  80. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-BjOJ3XSL.js +0 -144
  81. package/dist/Marketing-CTCQ5ZmZ.js +0 -308
  82. package/dist/Member-DCduX7zP.js +0 -91
  83. package/dist/MemberList-B0EkXZJu.js +0 -1729
  84. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  85. package/dist/Mission-CVr9rS_D.js +0 -248
  86. package/dist/Point-BnZ6M74y.js +0 -220
  87. package/dist/Promotion-B0PUve5S.js +0 -218
  88. package/dist/Segment-B-XpkyM5.js +0 -445
  89. package/dist/Store-B2gywCt2.js +0 -1503
  90. package/dist/StoreRewards-D8410Q_-.js +0 -434
  91. package/dist/Transaction-CZBO4v4d.js +0 -36
  92. package/dist/Voucher-se-4JF9B.js +0 -481
  93. package/dist/app-B2ImSO3V.js +0 -53382
  94. package/dist/dto-BWpvRpK2.js +0 -1151
  95. package/dist/template-Dwp7heBA.js +0 -190
@@ -1,434 +0,0 @@
1
- import { defineComponent as Y, ref as V, computed as N, onMounted as Z, resolveComponent as p, openBlock as u, createBlock as v, unref as e, isRef as z, withCtx as x, createElementVNode as s, createVNode as n, createElementBlock as I, createTextVNode as J, resolveDynamicComponent as H, toDisplayString as K, Fragment as j, createCommentVNode as U, h as C } from "vue";
2
- import { _ as Q } from "./campaign-CpzFl8Vr.js";
3
- import { components as $ } from "@feedmepos/ui-library";
4
- import { a as X, u as q, b as k } from "./app-DkI7dYRN.js";
5
- import { u as ee, p as M, f as B } from "./loading-BzV5acUX.js";
6
- import { C as _, u as te } from "./membership-CqbsLHqx.js";
7
- import { F as oe } from "./index-CWf0mh3a.js";
8
- import { c as ae } from "./object-qECH92oz.js";
9
- import { _ as ne } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
10
- import { useCoreStore as le } from "@feedmepos/mf-common";
11
- import { Z as w } from "./zod-W_PvIofQ.js";
12
- import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js";
13
- import { _ as ie } from "./ImageInput.vue_vue_type_script_setup_true_lang-BjOJ3XSL.js";
14
- import { _ as re } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-ZYjWlDJ1.js";
15
- import { _ as me, a as de } from "./EffectSheet.vue_vue_type_style_index_0_lang-AhWnHG02.js";
16
- import { i as ce, t as ue } from "./helper-DR4XK3nv.js";
17
- import { useRouter as pe } from "vue-router";
18
- import { m as D } from "./index-Bu4_26qI.js";
19
- const fe = {
20
- key: 0,
21
- class: "flex flex-col space-y-16 pr-12"
22
- }, ye = { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, we = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary flex items-center justify-between" }, ge = /* @__PURE__ */ s("div", { class: "fm-typo-en-title-sm-800" }, "Discount", -1), be = /* @__PURE__ */ s("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, " Usage configuration ", -1), ve = /* @__PURE__ */ s("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Availability", -1), _e = { class: "flex items-center gap-8" }, he = /* @__PURE__ */ Y({
23
- __name: "EditRewardSheet",
24
- emits: ["update"],
25
- setup(W, { expose: O, emit: f }) {
26
- const A = f, S = X(), h = le(), i = V(!1), a = V(), y = V(), l = oe, g = N(
27
- () => {
28
- var o;
29
- return _[((o = a.value) == null ? void 0 : o.type) || "VOUCHER"];
30
- }
31
- ), P = N(() => {
32
- const o = l.safeParse(a.value);
33
- return o.success ? [] : o.error.errors;
34
- });
35
- function F() {
36
- const o = l.safeParse(a.value);
37
- o.success && A("update", o.data);
38
- }
39
- function E(o, t, m = {
40
- isStoreReward: !1,
41
- type: "VOUCHER"
42
- }) {
43
- i.value = o, o && (y.value = void 0, a.value = t || ce(m.type, {
44
- business: h.currentBusiness.value._id,
45
- noCampaign: m.isStoreReward == !0
46
- }));
47
- }
48
- return Z(async () => {
49
- await S.readLocations();
50
- }), O({
51
- showSheet: E,
52
- data: a,
53
- rewardImage: y
54
- }), (o, t) => {
55
- const m = p("FmTextarea"), c = p("FmHelperText"), R = p("FmSwitch"), T = p("FmButton"), L = p("FmSideSheet");
56
- return u(), v(L, {
57
- "max-width": 560,
58
- modelValue: e(i),
59
- "onUpdate:modelValue": t[8] || (t[8] = (b) => z(i) ? i.value = b : null),
60
- header: "Store setting"
61
- }, {
62
- "side-sheet-footer": x(() => [
63
- s("div", _e, [
64
- n(T, {
65
- label: "Submit",
66
- onClick: F,
67
- disabled: e(P).length > 0 || e(q)().isLoading,
68
- loading: e(q)().isLoading
69
- }, null, 8, ["disabled", "loading"]),
70
- n(T, {
71
- label: "Cancel",
72
- onClick: t[7] || (t[7] = (b) => E(!1)),
73
- variant: "tertiary"
74
- })
75
- ])
76
- ]),
77
- default: x(() => {
78
- var b, d, G;
79
- return [
80
- e(a) ? (u(), I("div", fe, [
81
- s("div", ye, [
82
- J(" Reward information "),
83
- (u(), v(H(e(g).chip())))
84
- ]),
85
- n(se, {
86
- modelValue: e(a).name,
87
- "onUpdate:modelValue": t[0] || (t[0] = (r) => e(a).name = r),
88
- label: `${e(g).name} name`,
89
- schema: e(w).typeAtPath(e(l), "name", [e(a).type])
90
- }, null, 8, ["modelValue", "label", "schema"]),
91
- n(m, {
92
- class: "!mb-[-16px]",
93
- modelValue: e(a).description,
94
- "onUpdate:modelValue": t[1] || (t[1] = (r) => e(a).description = r),
95
- rules: [e(w).ruleAtPath(e(l), "description", [e(a).type])]
96
- }, {
97
- label: x(() => [
98
- (u(), v(H(
99
- e(w).toInputLabel(
100
- e(w).typeAtPath(e(l), "description", [e(a).type]),
101
- `${e(g).name} description`
102
- )
103
- )))
104
- ]),
105
- _: 1
106
- }, 8, ["modelValue", "rules"]),
107
- s("div", we, [
108
- s("div", null, K(e(g).name) + " description should not exceed 200 characters. ", 1),
109
- s("div", null, K(((b = e(a).description) == null ? void 0 : b.length) ?? 0) + "/200", 1)
110
- ]),
111
- n(ie, {
112
- class: "w-1/2 xs:w-2/3",
113
- "aspect-ratio": "16/9",
114
- file: e(y) ?? void 0,
115
- thumbnail: e(a).image ?? void 0,
116
- "onUpdate:file": t[2] || (t[2] = async (r) => {
117
- y.value = r, r || (e(a).image = null);
118
- })
119
- }, {
120
- label: x(() => [
121
- (u(), v(H(
122
- e(w).toInputLabel(
123
- e(w).typeAtPath(e(l), "image", [e(a).type]),
124
- `${e(g).name} image`
125
- )
126
- )))
127
- ]),
128
- _: 1
129
- }, 8, ["file", "thumbnail"]),
130
- e(a).type === "VOUCHER" ? (u(), I(j, { key: 0 }, [
131
- ge,
132
- n(me, {
133
- "model-value": e(a).extras.effect,
134
- "onUpdate:modelValue": t[3] || (t[3] = (r) => {
135
- e(a).extras.effect = r;
136
- })
137
- }, null, 8, ["model-value"]),
138
- e(a).extras.effect == null ? (u(), v(c, {
139
- key: 0,
140
- class: "!mt-8",
141
- text: "Effect is required",
142
- state: "error"
143
- })) : U("", !0),
144
- be,
145
- n(de, {
146
- "model-value": e(a).options,
147
- "no-campaign": e(a).noCampaign,
148
- "onUpdate:modelValue": t[4] || (t[4] = (r) => e(a).options = r),
149
- schema: e(w).typeAtPath(e(l), "options", ["VOUCHER"])
150
- }, null, 8, ["model-value", "no-campaign", "schema"])
151
- ], 64)) : U("", !0),
152
- ve,
153
- e(a).type === "VOUCHER" ? (u(), v(re, {
154
- key: 1,
155
- "model-value": ((G = (d = e(a).extras) == null ? void 0 : d.targetLocation) == null ? void 0 : G.map(String)) ?? null,
156
- type: "select",
157
- "onUpdate:modelValue": t[5] || (t[5] = (r) => {
158
- e(a).extras.targetLocation = r;
159
- }),
160
- rules: [
161
- e(w).ruleAtPath(e(l), "extras.targetLocation", ["VOUCHER"])
162
- ]
163
- }, null, 8, ["model-value", "rules"])) : U("", !0),
164
- n(R, {
165
- modelValue: e(a).internal,
166
- "onUpdate:modelValue": t[6] || (t[6] = (r) => e(a).internal = r),
167
- "label-placement": "right",
168
- label: "Internal only",
169
- sublabel: `${e(_)[e(a).type].name} will not be shown to customer`
170
- }, null, 8, ["modelValue", "sublabel"])
171
- ])) : U("", !0)
172
- ];
173
- }),
174
- _: 1
175
- }, 8, ["modelValue"]);
176
- };
177
- }
178
- }), Re = { class: "px-24 flex flex-col gap-y-16" }, Ce = { class: "flex items-center justify-between w-full" }, xe = { class: "flex gap-8" }, Fe = /* @__PURE__ */ s("img", {
179
- src: Q,
180
- class: "aspect-square w-[150px]"
181
- }, null, -1), Ve = /* @__PURE__ */ s("div", { class: "flex flex-col gap-16 text-center" }, [
182
- /* @__PURE__ */ s("div", { class: "fm-typo-en-title-sm-800" }, "Create rewards"),
183
- /* @__PURE__ */ s("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Create rewards for your customers to redeem inside their bundle. ")
184
- ], -1), Ke = /* @__PURE__ */ Y({
185
- __name: "StoreRewards",
186
- setup(W) {
187
- const O = {
188
- label: "Create reward",
189
- value: "create",
190
- isPrimary: !0,
191
- prependIcon: "add"
192
- }, f = te(), { global: A, minor: S } = ee, h = pe(), i = V({
193
- searchKey: "",
194
- columnFilters: []
195
- }), a = [
196
- {
197
- header: "Reward title",
198
- accessorFn: (o) => o.name
199
- },
200
- {
201
- id: "type",
202
- header: "Reward type",
203
- accessorFn: (o) => o.type,
204
- cell(o) {
205
- return _[o.row.original.type].chip();
206
- }
207
- },
208
- {
209
- header: "Validity",
210
- accessorFn: (o) => ue(
211
- "validityOption" in o.options ? o.options.validityOption || {} : {}
212
- )
213
- },
214
- {
215
- header: "Used",
216
- meta: {
217
- textAlign: "right"
218
- },
219
- accessorFn: (o) => o.currentReceive ?? 0
220
- },
221
- {
222
- header: "Actions",
223
- cell(o) {
224
- return C("div", { class: "flex items-center justify-end gap-4" }, [
225
- C(
226
- $.FmMenu,
227
- {
228
- placement: "bottom-end",
229
- onClick: (t) => {
230
- t.stopPropagation();
231
- }
232
- },
233
- {
234
- "menu-button": () => C($.FmButton, {
235
- icon: "more_vert",
236
- iconColor: "neutral-gray-400",
237
- variant: "tertiary"
238
- }),
239
- default: () => [
240
- C($.FmMenuItem, {
241
- label: "View collections",
242
- onClick: async (t) => {
243
- t.stopPropagation(), g(o.row.original._id);
244
- }
245
- }),
246
- // h(components.FmMenuItem, {
247
- // label: 'View transactions',
248
- // onClick: async (event: Event) => {
249
- // event.stopPropagation();
250
- // onViewTransactions(props.row.original._id as string);
251
- // },
252
- // }),
253
- C(
254
- $.FmMenuItem,
255
- {
256
- onClick: async (t) => {
257
- t.stopPropagation(), P(o.row.original);
258
- }
259
- },
260
- {
261
- label: C(
262
- "div",
263
- {
264
- class: "text-fm-color-typo-error fm-typo-en-body-md-400"
265
- },
266
- "Remove"
267
- )
268
- }
269
- )
270
- ]
271
- }
272
- )
273
- ]);
274
- }
275
- }
276
- ], y = N(
277
- () => f.bundleRewards.filter((o) => o.type == "VOUCHER")
278
- ), l = V();
279
- function g(o) {
280
- h.push({
281
- name: k["$connect-STORE_REWARD_COLLECTIONS"],
282
- params: { id: o }
283
- });
284
- }
285
- async function P(o) {
286
- if (o.type === "TITLE") {
287
- await M.confirm(
288
- "You cannot remove a title here, please remove it at the Program > Title section.",
289
- "Delete reward",
290
- "Go to title section"
291
- ) && await h.push({ name: k["$connect-PROGRAM_TITLE"] });
292
- return;
293
- }
294
- await M.remove(
295
- "Are you sure you want to delete this reward?",
296
- "Delete reward"
297
- ) && await S(
298
- async () => {
299
- await D.deleteReward(o._id), await f.readMembership(), await f.readRewards();
300
- },
301
- { message: "Deleting reward", successMessage: "Reward deleted" }
302
- );
303
- }
304
- async function F(o) {
305
- var m;
306
- const t = o ? ae(f.bundleRewards.find((c) => c._id === o)) : void 0;
307
- if ((t == null ? void 0 : t.type) === "TITLE") {
308
- await M.confirm(
309
- "You cannot edit a title here, please edit it at the Program > Title section.",
310
- "Update reward",
311
- "Go to title section"
312
- ) && await h.push({ name: k["$connect-PROGRAM_TITLE"] });
313
- return;
314
- }
315
- (m = l.value) == null || m.showSheet(!0, t, {
316
- isStoreReward: !0,
317
- type: "VOUCHER"
318
- });
319
- }
320
- async function E(o) {
321
- await S(
322
- async () => {
323
- var t, m, c, R;
324
- (t = l.value) != null && t.rewardImage && o.image ? await B.delete(o.image) : (m = l.value) != null && m.rewardImage && (o.image = await B.update(
325
- o.image || B.collectibleImagePath(
326
- void 0,
327
- l.value.rewardImage
328
- ),
329
- (c = l.value) == null ? void 0 : c.rewardImage
330
- )), o._id ? await D.updateReward(o._id, o) : await D.createReward(o), await f.readRewards(), (R = l.value) == null || R.showSheet(!1);
331
- },
332
- {
333
- message: "Updating reward",
334
- successMessage: "Reward updated successfully"
335
- }
336
- );
337
- }
338
- return Z(async () => {
339
- await A(async () => {
340
- await f.readMembership(), await f.readRewards();
341
- });
342
- }), (o, t) => {
343
- const m = p("FmPageHead"), c = p("FmMenuItem"), R = p("FmSearch"), T = p("FmTable"), L = p("FmButton"), b = p("FmCard");
344
- return u(), I(j, null, [
345
- n(m, {
346
- title: "Rewards",
347
- description: "Create and manage rewards for your customers.",
348
- actions: [O],
349
- "back-button": !0,
350
- "onClick:action": t[0] || (t[0] = () => F()),
351
- "onClick:back": t[1] || (t[1] = () => e(h).push({ name: e(k)["$connect-STORE"] }))
352
- }, null, 8, ["actions"]),
353
- s("div", Re, [
354
- e(y) && e(y).length > 0 ? (u(), I(j, { key: 0 }, [
355
- s("div", Ce, [
356
- s("div", xe, [
357
- n(ne, {
358
- label: `Reward type: ${e(i).columnFilters.length == 0 ? "All" : e(i).columnFilters[0].name}`
359
- }, {
360
- default: x(() => [
361
- n(c, {
362
- onClick: t[2] || (t[2] = (d) => e(i).columnFilters = []),
363
- label: "All"
364
- }),
365
- n(c, {
366
- onClick: t[3] || (t[3] = (d) => e(i).columnFilters = [
367
- {
368
- id: "type",
369
- value: "VOUCHER",
370
- name: e(_).VOUCHER.name
371
- }
372
- ]),
373
- label: e(_).VOUCHER.name
374
- }, null, 8, ["label"]),
375
- n(c, {
376
- onClick: t[4] || (t[4] = (d) => e(i).columnFilters = [
377
- {
378
- id: "type",
379
- value: "TITLE",
380
- name: e(_).TITLE.name
381
- }
382
- ]),
383
- label: e(_).TITLE.name
384
- }, null, 8, ["label"])
385
- ]),
386
- _: 1
387
- }, 8, ["label"])
388
- ]),
389
- n(R, {
390
- modelValue: e(i).searchKey,
391
- "onUpdate:modelValue": t[5] || (t[5] = (d) => e(i).searchKey = d),
392
- class: "",
393
- placeholder: "search",
394
- collapsible: ""
395
- }, null, 8, ["modelValue"])
396
- ]),
397
- n(T, {
398
- "row-data": e(y),
399
- "column-defs": a,
400
- "search-value": e(i).searchKey,
401
- "column-filter": e(i).columnFilters,
402
- onRowClick: t[6] || (t[6] = (d) => F(d.original._id)),
403
- "hide-footer": e(y).length < 10
404
- }, null, 8, ["row-data", "search-value", "column-filter", "hide-footer"])
405
- ], 64)) : (u(), v(b, {
406
- key: 1,
407
- variant: "outlined",
408
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
409
- }, {
410
- default: x(() => [
411
- Fe,
412
- Ve,
413
- n(L, {
414
- variant: "primary",
415
- label: "Create reward",
416
- onClick: t[7] || (t[7] = (d) => F()),
417
- icon: "add"
418
- })
419
- ]),
420
- _: 1
421
- })),
422
- n(he, {
423
- ref_key: "rewardSheetRef",
424
- ref: l,
425
- onUpdate: t[8] || (t[8] = (d) => E(d))
426
- }, null, 512)
427
- ])
428
- ], 64);
429
- };
430
- }
431
- });
432
- export {
433
- Ke as default
434
- };
@@ -1,36 +0,0 @@
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-DS4APaHw.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
- };