@feedmepos/mf-connect 0.0.21-prod → 0.0.24-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.
Files changed (73) hide show
  1. package/dist/{Analytic-C6F4G25g.js → Analytic-CHsctJL0.js} +21 -19
  2. package/dist/App-BSiHlz5h.js +4610 -0
  3. package/dist/{Broadcast-DO2VP__g.js → Broadcast-CL9Sa0bc.js} +7 -7
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D0aQTASM.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C2krWgqp.js} +8 -8
  5. package/dist/{Card-DZyOKMh6.js → Card-CqTzwiBp.js} +74 -72
  6. package/dist/{Collections-DLyCIlvd.js → Collections-9OXjYxFu.js} +16 -14
  7. package/dist/{Credit-DRdsjXky.js → Credit-BDm7vWU6.js} +7 -7
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-733A3xAJ.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-B7qqPxFM.js} +23 -20
  9. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CvtX7ULa.js → EffectSheet.vue_vue_type_style_index_0_lang-DItx2Ubv.js} +5 -5
  10. package/dist/{Experience-D33O1vby.js → Experience-DTWow5NR.js} +7 -7
  11. package/dist/{Game-BrYvnjMK.js → Game-BkYVDXqA.js} +7 -7
  12. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-Dby96cpu.js → ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js} +1 -1
  13. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  14. package/dist/{MainLayout-Cex8qsGf.js → MainLayout-DpZC6o3R.js} +2 -1
  15. package/dist/{Marketing-6ATQUGoF.js → Marketing-sDN1f-Rb.js} +13 -12
  16. package/dist/{Member-CCIVIzDM.js → Member-CIzs5lmW.js} +31 -30
  17. package/dist/MemberList-CdTv3lWA.js +1734 -0
  18. package/dist/{MemberTransactions-CLE7hYWY.js → MemberTransactions-CBoHXPr7.js} +1 -1
  19. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DcKMh_2f.js → MessageInput.vue_vue_type_script_setup_true_lang-CSwRL1kp.js} +2 -2
  20. package/dist/{Mission-BHI8zTMK.js → Mission-DdHOGOjC.js} +14 -14
  21. package/dist/{Point-CHxmW_O8.js → Point-Bc4su8pQ.js} +7 -7
  22. package/dist/{Promotion-C8CqdNGj.js → Promotion-Dhl69yfs.js} +96 -70
  23. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-C9C8o4ON.js → RuleGroup.vue_vue_type_script_setup_true_lang-CPHiByal.js} +16 -15
  24. package/dist/{Segment-CvNLrjIH.js → Segment-D95w0dZl.js} +19 -18
  25. package/dist/{Setting-oXiZZAub.js → Setting-C3ia_BMY.js} +11 -10
  26. package/dist/{Store-WLcxJNzp.js → Store-ziVgZZSh.js} +51 -47
  27. package/dist/{StoreRewards-CMrnEHsB.js → StoreRewards-CJBlOtGb.js} +108 -105
  28. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-bgEBVCXH.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DNIqB0jd.js} +106 -108
  29. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B6gZzsja.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C-5z47S1.js} +6 -6
  30. package/dist/{Tier-BwXb3Pk1.js → Tier-BKBlLV7D.js} +25 -24
  31. package/dist/{Title-BOyT9mEy.js → Title-COWE-LXc.js} +15 -15
  32. package/dist/{Transaction-wwnoXk9w.js → Transaction-BKU5hTvU.js} +1 -1
  33. package/dist/{Voucher-BbpSPfL0.js → Voucher-DGLn6y-b.js} +55 -51
  34. package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
  35. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  36. package/dist/app-BQpZdCao.js +2974 -0
  37. package/dist/{app-Bw4vX2Xq.js → app-CKg8FD6W.js} +1 -1
  38. package/dist/app-wDQR6dpb.js +39 -0
  39. package/dist/app.js +2 -2
  40. package/dist/business-DGCDUsna.js +78 -0
  41. package/dist/{campaign-BAxYqkWK.js → campaign-DFzcetIZ.js} +7 -7
  42. package/dist/{dto-CwGNrCVP.js → dto-BOsVyHhB.js} +50 -50
  43. package/dist/{effect-OIGvEMnu.js → effect-DAgCe9mB.js} +1 -1
  44. package/dist/{export-pnyF_Nqa.js → export-BArwqiqn.js} +3 -3
  45. package/dist/{helper-1r9zsTyt.js → helper-CjcpPq85.js} +1 -1
  46. package/dist/index-BLUNODxz.js +11 -0
  47. package/dist/{index-s63kYMDU.js → index-BtSUMNhN.js} +1 -1
  48. package/dist/{index-DdgrIdtX.js → index-CBYeGg9d.js} +177 -168
  49. package/dist/{app-CzpQo8NQ.js → index-CksikPRJ.js} +9660 -13019
  50. package/dist/{index-AeZIrHi3.js → index-Cr7N263J.js} +6 -7
  51. package/dist/{index-CFW6MW-j.js → index-D61l3xYo.js} +46 -39
  52. package/dist/{index-BULhetR6.js → index-D9aWLz3L.js} +1 -1
  53. package/dist/{index-6xeKaiuc.js → index-DQNrbgQh.js} +3 -3
  54. package/dist/{index-COXwd1ca.js → index-DUmYKFqp.js} +28 -27
  55. package/dist/{index-C9XT87dh.js → index-DarpjYwN.js} +6 -5
  56. package/dist/{index-C33oGCbQ.js → index-Dl6Tmuvm.js} +5 -5
  57. package/dist/{index-Shw3boHM.js → index-E9DFEkCN.js} +7 -2
  58. package/dist/index.esm2017-CK_DN0pS.js +3069 -0
  59. package/dist/{loading-D7uTV0-9.js → loading-CrTiMhEE.js} +11355 -14216
  60. package/dist/{lodash-O836mjN1.js → lodash-B5I3zXaY.js} +1 -1
  61. package/dist/{membership-BRlmOhUi.js → membership-BTYMMItR.js} +3 -3
  62. package/dist/{money-BdNZ4vMR.js → money-DPJgDQxk.js} +1 -1
  63. package/dist/number-DRvZfW5z.js +12 -0
  64. package/dist/{rule-2GUvtk01.js → rule-DBp5EC2a.js} +314 -343
  65. package/dist/{rule-builder-B3FwMkHG.js → rule-builder-B7-hVixK.js} +1 -1
  66. package/dist/style.css +1 -1
  67. package/dist/{template-COZoDCgl.js → template-D9IbwHGS.js} +5 -5
  68. package/dist/tslib.es6-BCqqvLQ_.js +44 -0
  69. package/dist/{usePagination-CwZ7gv3m.js → usePagination-JoYaROkV.js} +1 -1
  70. package/dist/{xlsx-B2_kvHAq.js → xlsx-BUPLRzvR.js} +1 -1
  71. package/package.json +15 -15
  72. package/dist/MemberList-Cs0LD8gi.js +0 -1718
  73. package/dist/number-CNiMHNNi.js +0 -12
@@ -1,20 +1,23 @@
1
- import { defineComponent as q, ref as V, computed as N, onMounted as Y, resolveComponent as p, openBlock as u, createBlock as b, unref as e, isRef as W, withCtx as x, createElementVNode as l, createVNode as s, createElementBlock as O, createTextVNode as z, resolveDynamicComponent as H, toDisplayString as G, Fragment as j, createCommentVNode as U, h as R } from "vue";
1
+ import { defineComponent as q, ref as V, computed as N, onMounted as Y, resolveComponent as p, openBlock as u, createBlock as b, unref as e, isRef as W, withCtx as x, createElementVNode as l, createVNode as s, createElementBlock as O, createTextVNode as z, resolveDynamicComponent as H, toDisplayString as G, Fragment as j, createCommentVNode as U, h } from "vue";
2
2
  import { _ as J } from "./campaign-CpzFl8Vr.js";
3
3
  import { components as $ } from "@feedmepos/ui-library";
4
- import { b as Q, u as K, d as k } from "./app-CzpQo8NQ.js";
5
- import { u as X, p as M, f as B } from "./loading-D7uTV0-9.js";
6
- import { C, u as ee } from "./membership-BRlmOhUi.js";
7
- import { F as te } from "./index-DdgrIdtX.js";
8
- import { c as ae } from "./object-qECH92oz.js";
4
+ import "./index-BLUNODxz.js";
5
+ import { u as Q, p as M, f as B } from "./loading-CrTiMhEE.js";
6
+ import { C, u as X } from "./membership-BTYMMItR.js";
7
+ import { F as ee } from "./index-CBYeGg9d.js";
8
+ import { c as te } from "./object-qECH92oz.js";
9
9
  import { _ as oe } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
10
+ import { u as K } from "./app-wDQR6dpb.js";
11
+ import { u as ae } from "./business-DGCDUsna.js";
10
12
  import { useCoreStore as ne } from "@feedmepos/mf-common";
11
13
  import { _ as se, Z as g } from "./ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js";
12
- import { _ as le } from "./ImageInput.vue_vue_type_script_setup_true_lang-Dby96cpu.js";
13
- import { _ as ie } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-B6gZzsja.js";
14
- import { _ as re, a as me } from "./EffectSheet.vue_vue_type_style_index_0_lang-CvtX7ULa.js";
15
- import { i as de, t as ce } from "./helper-1r9zsTyt.js";
14
+ import { _ as le } from "./ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js";
15
+ import { _ as re } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-C-5z47S1.js";
16
+ import { _ as ie, a as me } from "./EffectSheet.vue_vue_type_style_index_0_lang-DItx2Ubv.js";
17
+ import { i as de, t as ce } from "./helper-CjcpPq85.js";
16
18
  import { useRouter as ue } from "vue-router";
17
- import { m as D } from "./index-BULhetR6.js";
19
+ import { m as D } from "./index-D9aWLz3L.js";
20
+ import { R as k } from "./app-BQpZdCao.js";
18
21
  const pe = {
19
22
  key: 0,
20
23
  class: "flex flex-col space-y-16 pr-12"
@@ -22,40 +25,40 @@ const pe = {
22
25
  __name: "EditRewardSheet",
23
26
  emits: ["update"],
24
27
  setup(Z, { expose: I, emit: f }) {
25
- const A = f, S = Q(), h = ne(), i = V(!1), o = V(), y = V(), n = te, w = N(
28
+ const A = f, S = ae(), R = ne(), r = V(!1), a = V(), y = V(), n = ee, w = N(
26
29
  () => {
27
- var a;
28
- return C[((a = o.value) == null ? void 0 : a.type) || "VOUCHER"];
30
+ var o;
31
+ return C[((o = a.value) == null ? void 0 : o.type) || "VOUCHER"];
29
32
  }
30
33
  ), P = N(() => {
31
- const a = n.safeParse(o.value);
32
- return a.success ? [] : a.error.errors;
34
+ const o = n.safeParse(a.value);
35
+ return o.success ? [] : o.error.errors;
33
36
  });
34
37
  function F() {
35
- const a = n.safeParse(o.value);
36
- a.success && A("update", a.data);
38
+ const o = n.safeParse(a.value);
39
+ o.success && A("update", o.data);
37
40
  }
38
- function E(a, t, r = {
41
+ function E(o, t, i = {
39
42
  isStoreReward: !1,
40
43
  type: "VOUCHER"
41
44
  }) {
42
- i.value = a, a && (y.value = void 0, o.value = t || de(r.type, {
43
- business: h.currentBusiness.value._id,
44
- noCampaign: r.isStoreReward == !0
45
+ r.value = o, o && (y.value = void 0, a.value = t || de(i.type, {
46
+ business: R.currentBusiness.value._id,
47
+ noCampaign: i.isStoreReward == !0
45
48
  }));
46
49
  }
47
50
  return Y(async () => {
48
51
  await S.readLocations();
49
52
  }), I({
50
53
  showSheet: E,
51
- data: o,
54
+ data: a,
52
55
  rewardImage: y
53
- }), (a, t) => {
54
- const r = p("FmTextarea"), c = p("FmHelperText"), v = p("FmButton"), L = p("FmSideSheet");
56
+ }), (o, t) => {
57
+ const i = p("FmTextarea"), c = p("FmHelperText"), v = p("FmButton"), L = p("FmSideSheet");
55
58
  return u(), b(L, {
56
59
  "max-width": 560,
57
- modelValue: e(i),
58
- "onUpdate:modelValue": t[7] || (t[7] = (_) => W(i) ? i.value = _ : null),
60
+ modelValue: e(r),
61
+ "onUpdate:modelValue": t[7] || (t[7] = (_) => W(r) ? r.value = _ : null),
59
62
  header: "Store setting"
60
63
  }, {
61
64
  "side-sheet-footer": x(() => [
@@ -76,27 +79,27 @@ const pe = {
76
79
  default: x(() => {
77
80
  var _, T, m;
78
81
  return [
79
- e(o) ? (u(), O("div", pe, [
82
+ e(a) ? (u(), O("div", pe, [
80
83
  l("div", fe, [
81
84
  z(" Reward information "),
82
85
  (u(), b(H(e(w).chip())))
83
86
  ]),
84
87
  s(se, {
85
- modelValue: e(o).name,
86
- "onUpdate:modelValue": t[0] || (t[0] = (d) => e(o).name = d),
88
+ modelValue: e(a).name,
89
+ "onUpdate:modelValue": t[0] || (t[0] = (d) => e(a).name = d),
87
90
  label: `${e(w).name} name`,
88
- schema: e(g).typeAtPath(e(n), "name", [e(o).type])
91
+ schema: e(g).typeAtPath(e(n), "name", [e(a).type])
89
92
  }, null, 8, ["modelValue", "label", "schema"]),
90
- s(r, {
93
+ s(i, {
91
94
  class: "!mb-[-16px]",
92
- modelValue: e(o).description,
93
- "onUpdate:modelValue": t[1] || (t[1] = (d) => e(o).description = d),
94
- rules: [e(g).ruleAtPath(e(n), "description", [e(o).type])]
95
+ modelValue: e(a).description,
96
+ "onUpdate:modelValue": t[1] || (t[1] = (d) => e(a).description = d),
97
+ rules: [e(g).ruleAtPath(e(n), "description", [e(a).type])]
95
98
  }, {
96
99
  label: x(() => [
97
100
  (u(), b(H(
98
101
  e(g).toInputLabel(
99
- e(g).typeAtPath(e(n), "description", [e(o).type]),
102
+ e(g).typeAtPath(e(n), "description", [e(a).type]),
100
103
  `${e(w).name} description`
101
104
  )
102
105
  )))
@@ -105,36 +108,36 @@ const pe = {
105
108
  }, 8, ["modelValue", "rules"]),
106
109
  l("div", ye, [
107
110
  l("div", null, G(e(w).name) + " description should not exceed 200 characters. ", 1),
108
- l("div", null, G(((_ = e(o).description) == null ? void 0 : _.length) ?? 0) + "/200", 1)
111
+ l("div", null, G(((_ = e(a).description) == null ? void 0 : _.length) ?? 0) + "/200", 1)
109
112
  ]),
110
113
  s(le, {
111
114
  class: "w-1/2 xs:w-2/3",
112
115
  "aspect-ratio": "16/9",
113
116
  file: e(y) ?? void 0,
114
- thumbnail: e(o).image ?? void 0,
117
+ thumbnail: e(a).image ?? void 0,
115
118
  "onUpdate:file": t[2] || (t[2] = async (d) => {
116
- y.value = d, d || (e(o).image = null);
119
+ y.value = d, d || (e(a).image = null);
117
120
  })
118
121
  }, {
119
122
  label: x(() => [
120
123
  (u(), b(H(
121
124
  e(g).toInputLabel(
122
- e(g).typeAtPath(e(n), "image", [e(o).type]),
125
+ e(g).typeAtPath(e(n), "image", [e(a).type]),
123
126
  `${e(w).name} image`
124
127
  )
125
128
  )))
126
129
  ]),
127
130
  _: 1
128
131
  }, 8, ["file", "thumbnail"]),
129
- e(o).type === "VOUCHER" ? (u(), O(j, { key: 0 }, [
132
+ e(a).type === "VOUCHER" ? (u(), O(j, { key: 0 }, [
130
133
  ge,
131
- s(re, {
132
- "model-value": e(o).extras.effect,
134
+ s(ie, {
135
+ "model-value": e(a).extras.effect,
133
136
  "onUpdate:modelValue": t[3] || (t[3] = (d) => {
134
- e(o).extras.effect = d;
137
+ e(a).extras.effect = d;
135
138
  })
136
139
  }, null, 8, ["model-value"]),
137
- e(o).extras.effect == null ? (u(), b(c, {
140
+ e(a).extras.effect == null ? (u(), b(c, {
138
141
  key: 0,
139
142
  class: "!mt-8",
140
143
  text: "Effect is required",
@@ -142,19 +145,19 @@ const pe = {
142
145
  })) : U("", !0),
143
146
  we,
144
147
  s(me, {
145
- "model-value": e(o).options,
146
- "no-campaign": e(o).noCampaign,
147
- "onUpdate:modelValue": t[4] || (t[4] = (d) => e(o).options = d),
148
+ "model-value": e(a).options,
149
+ "no-campaign": e(a).noCampaign,
150
+ "onUpdate:modelValue": t[4] || (t[4] = (d) => e(a).options = d),
148
151
  schema: e(g).typeAtPath(e(n), "options", ["VOUCHER"])
149
152
  }, null, 8, ["model-value", "no-campaign", "schema"])
150
153
  ], 64)) : U("", !0),
151
154
  ve,
152
- e(o).type === "VOUCHER" ? (u(), b(ie, {
155
+ e(a).type === "VOUCHER" ? (u(), b(re, {
153
156
  key: 1,
154
- "model-value": ((m = (T = e(o).extras) == null ? void 0 : T.targetLocation) == null ? void 0 : m.map(String)) ?? null,
157
+ "model-value": ((m = (T = e(a).extras) == null ? void 0 : T.targetLocation) == null ? void 0 : m.map(String)) ?? null,
155
158
  type: "select",
156
159
  "onUpdate:modelValue": t[5] || (t[5] = (d) => {
157
- e(o).extras.targetLocation = d;
160
+ e(a).extras.targetLocation = d;
158
161
  }),
159
162
  rules: [
160
163
  e(g).ruleAtPath(e(n), "extras.targetLocation", ["VOUCHER"])
@@ -167,13 +170,13 @@ const pe = {
167
170
  }, 8, ["modelValue"]);
168
171
  };
169
172
  }
170
- }), he = { class: "px-24 flex flex-col gap-y-16" }, Re = { class: "flex items-center justify-between w-full" }, Ce = { class: "flex gap-8" }, xe = /* @__PURE__ */ l("img", {
173
+ }), Re = { class: "px-24 flex flex-col gap-y-16" }, he = { class: "flex items-center justify-between w-full" }, Ce = { class: "flex gap-8" }, xe = /* @__PURE__ */ l("img", {
171
174
  src: J,
172
175
  class: "aspect-square w-[150px]"
173
176
  }, null, -1), Fe = /* @__PURE__ */ l("div", { class: "flex flex-col gap-16 text-center" }, [
174
177
  /* @__PURE__ */ l("div", { class: "fm-typo-en-title-sm-800" }, "Create rewards"),
175
178
  /* @__PURE__ */ l("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Create rewards for your customers to redeem inside their bundle. ")
176
- ], -1), je = /* @__PURE__ */ q({
179
+ ], -1), qe = /* @__PURE__ */ q({
177
180
  __name: "StoreRewards",
178
181
  setup(Z) {
179
182
  const I = {
@@ -181,26 +184,26 @@ const pe = {
181
184
  value: "create",
182
185
  isPrimary: !0,
183
186
  prependIcon: "add"
184
- }, f = ee(), { global: A, minor: S } = X, h = ue(), i = V({
187
+ }, f = X(), { global: A, minor: S } = Q, R = ue(), r = V({
185
188
  searchKey: "",
186
189
  columnFilters: []
187
- }), o = [
190
+ }), a = [
188
191
  {
189
192
  header: "Reward title",
190
- accessorFn: (a) => a.name
193
+ accessorFn: (o) => o.name
191
194
  },
192
195
  {
193
196
  id: "type",
194
197
  header: "Reward type",
195
- accessorFn: (a) => a.type,
196
- cell(a) {
197
- return C[a.row.original.type].chip();
198
+ accessorFn: (o) => o.type,
199
+ cell(o) {
200
+ return C[o.row.original.type].chip();
198
201
  }
199
202
  },
200
203
  {
201
204
  header: "Validity",
202
- accessorFn: (a) => ce(
203
- "validityOption" in a.options ? a.options.validityOption || {} : {}
205
+ accessorFn: (o) => ce(
206
+ "validityOption" in o.options ? o.options.validityOption || {} : {}
204
207
  )
205
208
  },
206
209
  {
@@ -208,13 +211,13 @@ const pe = {
208
211
  meta: {
209
212
  textAlign: "right"
210
213
  },
211
- accessorFn: (a) => a.currentReceive ?? 0
214
+ accessorFn: (o) => o.currentReceive ?? 0
212
215
  },
213
216
  {
214
217
  header: "Actions",
215
- cell(a) {
216
- return R("div", { class: "flex items-center justify-end gap-4" }, [
217
- R(
218
+ cell(o) {
219
+ return h("div", { class: "flex items-center justify-end gap-4" }, [
220
+ h(
218
221
  $.FmMenu,
219
222
  {
220
223
  placement: "bottom-end",
@@ -223,16 +226,16 @@ const pe = {
223
226
  }
224
227
  },
225
228
  {
226
- "menu-button": () => R($.FmButton, {
229
+ "menu-button": () => h($.FmButton, {
227
230
  icon: "more_vert",
228
231
  iconColor: "neutral-gray-400",
229
232
  variant: "tertiary"
230
233
  }),
231
234
  default: () => [
232
- R($.FmMenuItem, {
235
+ h($.FmMenuItem, {
233
236
  label: "View collections",
234
237
  onClick: async (t) => {
235
- t.stopPropagation(), w(a.row.original._id);
238
+ t.stopPropagation(), w(o.row.original._id);
236
239
  }
237
240
  }),
238
241
  // h(components.FmMenuItem, {
@@ -242,15 +245,15 @@ const pe = {
242
245
  // onViewTransactions(props.row.original._id as string);
243
246
  // },
244
247
  // }),
245
- R(
248
+ h(
246
249
  $.FmMenuItem,
247
250
  {
248
251
  onClick: async (t) => {
249
- t.stopPropagation(), P(a.row.original);
252
+ t.stopPropagation(), P(o.row.original);
250
253
  }
251
254
  },
252
255
  {
253
- label: R(
256
+ label: h(
254
257
  "div",
255
258
  {
256
259
  class: "text-fm-color-typo-error fm-typo-en-body-md-400"
@@ -266,21 +269,21 @@ const pe = {
266
269
  }
267
270
  }
268
271
  ], y = N(
269
- () => f.bundleRewards.filter((a) => a.type == "VOUCHER")
272
+ () => f.bundleRewards.filter((o) => o.type == "VOUCHER")
270
273
  ), n = V();
271
- function w(a) {
272
- h.push({
274
+ function w(o) {
275
+ R.push({
273
276
  name: k["$connect-STORE_REWARD_COLLECTIONS"],
274
- params: { id: a }
277
+ params: { id: o }
275
278
  });
276
279
  }
277
- async function P(a) {
278
- if (a.type === "TITLE") {
280
+ async function P(o) {
281
+ if (o.type === "TITLE") {
279
282
  await M.confirm(
280
283
  "You cannot remove a title here, please remove it at the Program > Title section.",
281
284
  "Delete reward",
282
285
  "Go to title section"
283
- ) && await h.push({ name: k["$connect-PROGRAM_TITLE"] });
286
+ ) && await R.push({ name: k["$connect-PROGRAM_TITLE"] });
284
287
  return;
285
288
  }
286
289
  await M.remove(
@@ -288,38 +291,38 @@ const pe = {
288
291
  "Delete reward"
289
292
  ) && await S(
290
293
  async () => {
291
- await D.deleteReward(a._id), await f.readMembership(), await f.readRewards();
294
+ await D.deleteReward(o._id), await f.readMembership(), await f.readRewards();
292
295
  },
293
296
  { message: "Deleting reward", successMessage: "Reward deleted" }
294
297
  );
295
298
  }
296
- async function F(a) {
297
- var r;
298
- const t = a ? ae(f.bundleRewards.find((c) => c._id === a)) : void 0;
299
+ async function F(o) {
300
+ var i;
301
+ const t = o ? te(f.bundleRewards.find((c) => c._id === o)) : void 0;
299
302
  if ((t == null ? void 0 : t.type) === "TITLE") {
300
303
  await M.confirm(
301
304
  "You cannot edit a title here, please edit it at the Program > Title section.",
302
305
  "Update reward",
303
306
  "Go to title section"
304
- ) && await h.push({ name: k["$connect-PROGRAM_TITLE"] });
307
+ ) && await R.push({ name: k["$connect-PROGRAM_TITLE"] });
305
308
  return;
306
309
  }
307
- (r = n.value) == null || r.showSheet(!0, t, {
310
+ (i = n.value) == null || i.showSheet(!0, t, {
308
311
  isStoreReward: !0,
309
312
  type: "VOUCHER"
310
313
  });
311
314
  }
312
- async function E(a) {
315
+ async function E(o) {
313
316
  await S(
314
317
  async () => {
315
- var t, r, c, v;
316
- (t = n.value) != null && t.rewardImage && a.image ? await B.delete(a.image) : (r = n.value) != null && r.rewardImage && (a.image = await B.update(
317
- a.image || B.collectibleImagePath(
318
+ var t, i, c, v;
319
+ (t = n.value) != null && t.rewardImage && o.image ? await B.delete(o.image) : (i = n.value) != null && i.rewardImage && (o.image = await B.update(
320
+ o.image || B.collectibleImagePath(
318
321
  void 0,
319
322
  n.value.rewardImage
320
323
  ),
321
324
  (c = n.value) == null ? void 0 : c.rewardImage
322
- )), a._id ? await D.updateReward(a._id, a) : await D.createReward(a), await f.readRewards(), (v = n.value) == null || v.showSheet(!1);
325
+ )), o._id ? await D.updateReward(o._id, o) : await D.createReward(o), await f.readRewards(), (v = n.value) == null || v.showSheet(!1);
323
326
  },
324
327
  {
325
328
  message: "Updating reward",
@@ -331,31 +334,31 @@ const pe = {
331
334
  await A(async () => {
332
335
  await f.readMembership(), await f.readRewards();
333
336
  });
334
- }), (a, t) => {
335
- const r = p("FmPageHead"), c = p("FmMenuItem"), v = p("FmSearch"), L = p("FmTable"), _ = p("FmButton"), T = p("FmCard");
337
+ }), (o, t) => {
338
+ const i = p("FmPageHead"), c = p("FmMenuItem"), v = p("FmSearch"), L = p("FmTable"), _ = p("FmButton"), T = p("FmCard");
336
339
  return u(), O(j, null, [
337
- s(r, {
340
+ s(i, {
338
341
  title: "Rewards",
339
342
  description: "Create and manage rewards for your customers.",
340
343
  actions: [I],
341
344
  "back-button": !0,
342
345
  "onClick:action": t[0] || (t[0] = () => F()),
343
- "onClick:back": t[1] || (t[1] = () => e(h).push({ name: e(k)["$connect-STORE"] }))
346
+ "onClick:back": t[1] || (t[1] = () => e(R).push({ name: e(k)["$connect-STORE"] }))
344
347
  }, null, 8, ["actions"]),
345
- l("div", he, [
348
+ l("div", Re, [
346
349
  e(y) && e(y).length > 0 ? (u(), O(j, { key: 0 }, [
347
- l("div", Re, [
350
+ l("div", he, [
348
351
  l("div", Ce, [
349
352
  s(oe, {
350
- label: `Reward type: ${e(i).columnFilters.length == 0 ? "All" : e(i).columnFilters[0].name}`
353
+ label: `Reward type: ${e(r).columnFilters.length == 0 ? "All" : e(r).columnFilters[0].name}`
351
354
  }, {
352
355
  default: x(() => [
353
356
  s(c, {
354
- onClick: t[2] || (t[2] = (m) => e(i).columnFilters = []),
357
+ onClick: t[2] || (t[2] = (m) => e(r).columnFilters = []),
355
358
  label: "All"
356
359
  }),
357
360
  s(c, {
358
- onClick: t[3] || (t[3] = (m) => e(i).columnFilters = [
361
+ onClick: t[3] || (t[3] = (m) => e(r).columnFilters = [
359
362
  {
360
363
  id: "type",
361
364
  value: "VOUCHER",
@@ -365,7 +368,7 @@ const pe = {
365
368
  label: e(C).VOUCHER.name
366
369
  }, null, 8, ["label"]),
367
370
  s(c, {
368
- onClick: t[4] || (t[4] = (m) => e(i).columnFilters = [
371
+ onClick: t[4] || (t[4] = (m) => e(r).columnFilters = [
369
372
  {
370
373
  id: "type",
371
374
  value: "TITLE",
@@ -379,8 +382,8 @@ const pe = {
379
382
  }, 8, ["label"])
380
383
  ]),
381
384
  s(v, {
382
- modelValue: e(i).searchKey,
383
- "onUpdate:modelValue": t[5] || (t[5] = (m) => e(i).searchKey = m),
385
+ modelValue: e(r).searchKey,
386
+ "onUpdate:modelValue": t[5] || (t[5] = (m) => e(r).searchKey = m),
384
387
  class: "",
385
388
  placeholder: "search",
386
389
  collapsible: ""
@@ -388,9 +391,9 @@ const pe = {
388
391
  ]),
389
392
  s(L, {
390
393
  "row-data": e(y),
391
- "column-defs": o,
392
- "search-value": e(i).searchKey,
393
- "column-filter": e(i).columnFilters,
394
+ "column-defs": a,
395
+ "search-value": e(r).searchKey,
396
+ "column-filter": e(r).columnFilters,
394
397
  onRowClick: t[6] || (t[6] = (m) => F(m.original._id)),
395
398
  "hide-footer": e(y).length < 10
396
399
  }, null, 8, ["row-data", "search-value", "column-filter", "hide-footer"])
@@ -422,5 +425,5 @@ const pe = {
422
425
  }
423
426
  });
424
427
  export {
425
- je as default
428
+ qe as default
426
429
  };