@feedmepos/mf-connect 0.0.20-prod → 0.0.21-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 (60) hide show
  1. package/dist/{Analytic-DuwMJh8c.js → Analytic-C6F4G25g.js} +8 -8
  2. package/dist/{Broadcast-BUgjgqv9.js → Broadcast-DO2VP__g.js} +7 -7
  3. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BDU9wbxY.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D0aQTASM.js} +8 -8
  4. package/dist/{Card-CwohdmAQ.js → Card-DZyOKMh6.js} +54 -54
  5. package/dist/{Collections-D-JKj4iC.js → Collections-DLyCIlvd.js} +6 -6
  6. package/dist/{Credit-BdKekl3X.js → Credit-DRdsjXky.js} +7 -7
  7. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DA-7-Qi9.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-733A3xAJ.js} +321 -328
  8. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-lDNh6GmQ.js → EffectSheet.vue_vue_type_style_index_0_lang-CvtX7ULa.js} +5 -5
  9. package/dist/{Experience-KoC4x_ae.js → Experience-D33O1vby.js} +7 -7
  10. package/dist/{Game-CTkr8R18.js → Game-BrYvnjMK.js} +7 -7
  11. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CDeQRYDy.js → ImageInput.vue_vue_type_script_setup_true_lang-Dby96cpu.js} +1 -1
  12. package/dist/{MainLayout-Du7UHyf3.js → MainLayout-Cex8qsGf.js} +1 -1
  13. package/dist/{Marketing-CTl2LqXi.js → Marketing-6ATQUGoF.js} +4 -4
  14. package/dist/{Member-hHIz1gGT.js → Member-CCIVIzDM.js} +2 -2
  15. package/dist/{MemberList-Fs95BxUo.js → MemberList-Cs0LD8gi.js} +11 -11
  16. package/dist/{MemberTransactions-nmURocbA.js → MemberTransactions-CLE7hYWY.js} +1 -1
  17. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Zk21rkMZ.js → MessageInput.vue_vue_type_script_setup_true_lang-DcKMh_2f.js} +2 -2
  18. package/dist/{Mission-B5YwPU71.js → Mission-BHI8zTMK.js} +7 -7
  19. package/dist/{Point-BiOgpyye.js → Point-CHxmW_O8.js} +7 -7
  20. package/dist/{Promotion-Bpvuwixe.js → Promotion-C8CqdNGj.js} +8 -8
  21. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DZlxkB8D.js → RuleGroup.vue_vue_type_script_setup_true_lang-C9C8o4ON.js} +13 -13
  22. package/dist/{Segment-DrEpmY4N.js → Segment-CvNLrjIH.js} +9 -9
  23. package/dist/{Setting-D48p2snU.js → Setting-oXiZZAub.js} +8 -8
  24. package/dist/{Store-CT1XE_Sn.js → Store-WLcxJNzp.js} +11 -11
  25. package/dist/{StoreRewards-DsjyanOO.js → StoreRewards-CMrnEHsB.js} +138 -145
  26. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DboIoW51.js → StoreTransactions.vue_vue_type_script_setup_true_lang-bgEBVCXH.js} +6 -6
  27. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CtSi80Oy.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-B6gZzsja.js} +1 -1
  28. package/dist/{Tier-BzZX_Dki.js → Tier-BwXb3Pk1.js} +16 -16
  29. package/dist/{Title-C2Ji-YGQ.js → Title-BOyT9mEy.js} +15 -15
  30. package/dist/{Transaction-BJGKndk-.js → Transaction-wwnoXk9w.js} +1 -1
  31. package/dist/{Voucher-D2dpFJSA.js → Voucher-BbpSPfL0.js} +9 -9
  32. package/dist/{app-D5_9RvMw.js → app-Bw4vX2Xq.js} +1 -1
  33. package/dist/{app-BAgeAm1l.js → app-CzpQo8NQ.js} +33 -33
  34. package/dist/app.js +1 -1
  35. package/dist/{campaign-BK6-HrgE.js → campaign-BAxYqkWK.js} +2 -2
  36. package/dist/{dto-E-AuMyEO.js → dto-CwGNrCVP.js} +41 -41
  37. package/dist/{effect-DOWJayPu.js → effect-OIGvEMnu.js} +1 -1
  38. package/dist/{export-DMZdMVnb.js → export-pnyF_Nqa.js} +3 -3
  39. package/dist/{helper-CmlX0eR1.js → helper-1r9zsTyt.js} +1 -1
  40. package/dist/{index-BNy1wU-V.js → index-6xeKaiuc.js} +1 -1
  41. package/dist/{index-BZbJpBo2.js → index-AeZIrHi3.js} +2 -2
  42. package/dist/{index-Cj1rTpPK.js → index-BULhetR6.js} +1 -1
  43. package/dist/{index-BkHtyaBf.js → index-C33oGCbQ.js} +5 -5
  44. package/dist/{index-RcFvF7Y_.js → index-C9XT87dh.js} +5 -5
  45. package/dist/{index-DKCHICCa.js → index-CFW6MW-j.js} +2 -2
  46. package/dist/{index-gOVUv83Y.js → index-COXwd1ca.js} +3 -3
  47. package/dist/{index-zAvZNHx0.js → index-DdgrIdtX.js} +2 -2
  48. package/dist/{index-QeG7EuE3.js → index-Shw3boHM.js} +1 -1
  49. package/dist/{index-BhHZOSyO.js → index-s63kYMDU.js} +1 -1
  50. package/dist/{loading-BIURYgSR.js → loading-D7uTV0-9.js} +4 -4
  51. package/dist/{lodash-CxofWkz4.js → lodash-O836mjN1.js} +1 -1
  52. package/dist/{membership-DVEV926P.js → membership-BRlmOhUi.js} +3 -3
  53. package/dist/{money-99JilzxX.js → money-BdNZ4vMR.js} +1 -1
  54. package/dist/{number-BKGHLuLf.js → number-CNiMHNNi.js} +1 -1
  55. package/dist/{rule-Chwh9Y4B.js → rule-2GUvtk01.js} +2 -2
  56. package/dist/{rule-builder-JEF7ltcg.js → rule-builder-B3FwMkHG.js} +1 -1
  57. package/dist/{template-B6lZdtyo.js → template-COZoDCgl.js} +5 -5
  58. package/dist/{usePagination-4epNDLvW.js → usePagination-CwZ7gv3m.js} +1 -1
  59. package/dist/{xlsx-DKkkHUS_.js → xlsx-B2_kvHAq.js} +1 -1
  60. package/package.json +1 -1
@@ -1,172 +1,165 @@
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";
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";
2
+ import { _ as J } from "./campaign-CpzFl8Vr.js";
3
3
  import { components as $ } from "@feedmepos/ui-library";
4
- import { b as X, u as q, d as k } from "./app-BAgeAm1l.js";
5
- import { u as ee, p as M, f as B } from "./loading-BIURYgSR.js";
6
- import { C as _, u as te } from "./membership-DVEV926P.js";
7
- import { F as ae } from "./index-zAvZNHx0.js";
8
- import { c as oe } 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 { _ as se, Z as w } from "./ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js";
12
- import { _ as ie } from "./ImageInput.vue_vue_type_script_setup_true_lang-CDeQRYDy.js";
13
- import { _ as re } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-CtSi80Oy.js";
14
- import { _ as me, a as de } from "./EffectSheet.vue_vue_type_style_index_0_lang-lDNh6GmQ.js";
15
- import { i as ce, t as ue } from "./helper-CmlX0eR1.js";
16
- import { useRouter as pe } from "vue-router";
17
- import { m as D } from "./index-Cj1rTpPK.js";
18
- const fe = {
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";
9
+ import { _ as oe } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
10
+ import { useCoreStore as ne } from "@feedmepos/mf-common";
11
+ 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";
16
+ import { useRouter as ue } from "vue-router";
17
+ import { m as D } from "./index-BULhetR6.js";
18
+ const pe = {
19
19
  key: 0,
20
20
  class: "flex flex-col space-y-16 pr-12"
21
- }, 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({
21
+ }, fe = { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, ye = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary flex items-center justify-between" }, ge = /* @__PURE__ */ l("div", { class: "fm-typo-en-title-sm-800" }, "Discount", -1), we = /* @__PURE__ */ l("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, " Usage configuration ", -1), ve = /* @__PURE__ */ l("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Availability", -1), _e = { class: "flex items-center gap-8" }, be = /* @__PURE__ */ q({
22
22
  __name: "EditRewardSheet",
23
23
  emits: ["update"],
24
- setup(W, { expose: O, emit: f }) {
25
- const A = f, S = X(), h = le(), i = V(!1), o = V(), y = V(), l = ae, g = N(
24
+ 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(
26
26
  () => {
27
27
  var a;
28
- return _[((a = o.value) == null ? void 0 : a.type) || "VOUCHER"];
28
+ return C[((a = o.value) == null ? void 0 : a.type) || "VOUCHER"];
29
29
  }
30
30
  ), P = N(() => {
31
- const a = l.safeParse(o.value);
31
+ const a = n.safeParse(o.value);
32
32
  return a.success ? [] : a.error.errors;
33
33
  });
34
34
  function F() {
35
- const a = l.safeParse(o.value);
35
+ const a = n.safeParse(o.value);
36
36
  a.success && A("update", a.data);
37
37
  }
38
- function E(a, t, m = {
38
+ function E(a, t, r = {
39
39
  isStoreReward: !1,
40
40
  type: "VOUCHER"
41
41
  }) {
42
- i.value = a, a && (y.value = void 0, o.value = t || ce(m.type, {
42
+ i.value = a, a && (y.value = void 0, o.value = t || de(r.type, {
43
43
  business: h.currentBusiness.value._id,
44
- noCampaign: m.isStoreReward == !0
44
+ noCampaign: r.isStoreReward == !0
45
45
  }));
46
46
  }
47
- return Z(async () => {
47
+ return Y(async () => {
48
48
  await S.readLocations();
49
- }), O({
49
+ }), I({
50
50
  showSheet: E,
51
51
  data: o,
52
52
  rewardImage: y
53
53
  }), (a, t) => {
54
- const m = p("FmTextarea"), c = p("FmHelperText"), R = p("FmSwitch"), T = p("FmButton"), L = p("FmSideSheet");
55
- return u(), v(L, {
54
+ const r = p("FmTextarea"), c = p("FmHelperText"), v = p("FmButton"), L = p("FmSideSheet");
55
+ return u(), b(L, {
56
56
  "max-width": 560,
57
57
  modelValue: e(i),
58
- "onUpdate:modelValue": t[8] || (t[8] = (b) => z(i) ? i.value = b : null),
58
+ "onUpdate:modelValue": t[7] || (t[7] = (_) => W(i) ? i.value = _ : null),
59
59
  header: "Store setting"
60
60
  }, {
61
61
  "side-sheet-footer": x(() => [
62
- s("div", _e, [
63
- n(T, {
62
+ l("div", _e, [
63
+ s(v, {
64
64
  label: "Submit",
65
65
  onClick: F,
66
- disabled: e(P).length > 0 || e(q)().isLoading,
67
- loading: e(q)().isLoading
66
+ disabled: e(P).length > 0 || e(K)().isLoading,
67
+ loading: e(K)().isLoading
68
68
  }, null, 8, ["disabled", "loading"]),
69
- n(T, {
69
+ s(v, {
70
70
  label: "Cancel",
71
- onClick: t[7] || (t[7] = (b) => E(!1)),
71
+ onClick: t[6] || (t[6] = (_) => E(!1)),
72
72
  variant: "tertiary"
73
73
  })
74
74
  ])
75
75
  ]),
76
76
  default: x(() => {
77
- var b, d, G;
77
+ var _, T, m;
78
78
  return [
79
- e(o) ? (u(), I("div", fe, [
80
- s("div", ye, [
81
- J(" Reward information "),
82
- (u(), v(H(e(g).chip())))
79
+ e(o) ? (u(), O("div", pe, [
80
+ l("div", fe, [
81
+ z(" Reward information "),
82
+ (u(), b(H(e(w).chip())))
83
83
  ]),
84
- n(se, {
84
+ s(se, {
85
85
  modelValue: e(o).name,
86
- "onUpdate:modelValue": t[0] || (t[0] = (r) => e(o).name = r),
87
- label: `${e(g).name} name`,
88
- schema: e(w).typeAtPath(e(l), "name", [e(o).type])
86
+ "onUpdate:modelValue": t[0] || (t[0] = (d) => e(o).name = d),
87
+ label: `${e(w).name} name`,
88
+ schema: e(g).typeAtPath(e(n), "name", [e(o).type])
89
89
  }, null, 8, ["modelValue", "label", "schema"]),
90
- n(m, {
90
+ s(r, {
91
91
  class: "!mb-[-16px]",
92
92
  modelValue: e(o).description,
93
- "onUpdate:modelValue": t[1] || (t[1] = (r) => e(o).description = r),
94
- rules: [e(w).ruleAtPath(e(l), "description", [e(o).type])]
93
+ "onUpdate:modelValue": t[1] || (t[1] = (d) => e(o).description = d),
94
+ rules: [e(g).ruleAtPath(e(n), "description", [e(o).type])]
95
95
  }, {
96
96
  label: x(() => [
97
- (u(), v(H(
98
- e(w).toInputLabel(
99
- e(w).typeAtPath(e(l), "description", [e(o).type]),
100
- `${e(g).name} description`
97
+ (u(), b(H(
98
+ e(g).toInputLabel(
99
+ e(g).typeAtPath(e(n), "description", [e(o).type]),
100
+ `${e(w).name} description`
101
101
  )
102
102
  )))
103
103
  ]),
104
104
  _: 1
105
105
  }, 8, ["modelValue", "rules"]),
106
- s("div", we, [
107
- s("div", null, K(e(g).name) + " description should not exceed 200 characters. ", 1),
108
- s("div", null, K(((b = e(o).description) == null ? void 0 : b.length) ?? 0) + "/200", 1)
106
+ l("div", ye, [
107
+ 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)
109
109
  ]),
110
- n(ie, {
110
+ s(le, {
111
111
  class: "w-1/2 xs:w-2/3",
112
112
  "aspect-ratio": "16/9",
113
113
  file: e(y) ?? void 0,
114
114
  thumbnail: e(o).image ?? void 0,
115
- "onUpdate:file": t[2] || (t[2] = async (r) => {
116
- y.value = r, r || (e(o).image = null);
115
+ "onUpdate:file": t[2] || (t[2] = async (d) => {
116
+ y.value = d, d || (e(o).image = null);
117
117
  })
118
118
  }, {
119
119
  label: x(() => [
120
- (u(), v(H(
121
- e(w).toInputLabel(
122
- e(w).typeAtPath(e(l), "image", [e(o).type]),
123
- `${e(g).name} image`
120
+ (u(), b(H(
121
+ e(g).toInputLabel(
122
+ e(g).typeAtPath(e(n), "image", [e(o).type]),
123
+ `${e(w).name} image`
124
124
  )
125
125
  )))
126
126
  ]),
127
127
  _: 1
128
128
  }, 8, ["file", "thumbnail"]),
129
- e(o).type === "VOUCHER" ? (u(), I(j, { key: 0 }, [
129
+ e(o).type === "VOUCHER" ? (u(), O(j, { key: 0 }, [
130
130
  ge,
131
- n(me, {
131
+ s(re, {
132
132
  "model-value": e(o).extras.effect,
133
- "onUpdate:modelValue": t[3] || (t[3] = (r) => {
134
- e(o).extras.effect = r;
133
+ "onUpdate:modelValue": t[3] || (t[3] = (d) => {
134
+ e(o).extras.effect = d;
135
135
  })
136
136
  }, null, 8, ["model-value"]),
137
- e(o).extras.effect == null ? (u(), v(c, {
137
+ e(o).extras.effect == null ? (u(), b(c, {
138
138
  key: 0,
139
139
  class: "!mt-8",
140
140
  text: "Effect is required",
141
141
  state: "error"
142
142
  })) : U("", !0),
143
- be,
144
- n(de, {
143
+ we,
144
+ s(me, {
145
145
  "model-value": e(o).options,
146
146
  "no-campaign": e(o).noCampaign,
147
- "onUpdate:modelValue": t[4] || (t[4] = (r) => e(o).options = r),
148
- schema: e(w).typeAtPath(e(l), "options", ["VOUCHER"])
147
+ "onUpdate:modelValue": t[4] || (t[4] = (d) => e(o).options = d),
148
+ schema: e(g).typeAtPath(e(n), "options", ["VOUCHER"])
149
149
  }, null, 8, ["model-value", "no-campaign", "schema"])
150
150
  ], 64)) : U("", !0),
151
151
  ve,
152
- e(o).type === "VOUCHER" ? (u(), v(re, {
152
+ e(o).type === "VOUCHER" ? (u(), b(ie, {
153
153
  key: 1,
154
- "model-value": ((G = (d = e(o).extras) == null ? void 0 : d.targetLocation) == null ? void 0 : G.map(String)) ?? null,
154
+ "model-value": ((m = (T = e(o).extras) == null ? void 0 : T.targetLocation) == null ? void 0 : m.map(String)) ?? null,
155
155
  type: "select",
156
- "onUpdate:modelValue": t[5] || (t[5] = (r) => {
157
- e(o).extras.targetLocation = r;
156
+ "onUpdate:modelValue": t[5] || (t[5] = (d) => {
157
+ e(o).extras.targetLocation = d;
158
158
  }),
159
159
  rules: [
160
- e(w).ruleAtPath(e(l), "extras.targetLocation", ["VOUCHER"])
160
+ e(g).ruleAtPath(e(n), "extras.targetLocation", ["VOUCHER"])
161
161
  ]
162
- }, null, 8, ["model-value", "rules"])) : U("", !0),
163
- n(R, {
164
- modelValue: e(o).internal,
165
- "onUpdate:modelValue": t[6] || (t[6] = (r) => e(o).internal = r),
166
- "label-placement": "right",
167
- label: "Internal only",
168
- sublabel: `${e(_)[e(o).type].name} will not be shown to customer`
169
- }, null, 8, ["modelValue", "sublabel"])
162
+ }, null, 8, ["model-value", "rules"])) : U("", !0)
170
163
  ])) : U("", !0)
171
164
  ];
172
165
  }),
@@ -174,21 +167,21 @@ const fe = {
174
167
  }, 8, ["modelValue"]);
175
168
  };
176
169
  }
177
- }), 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", {
178
- src: Q,
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", {
171
+ src: J,
179
172
  class: "aspect-square w-[150px]"
180
- }, null, -1), Ve = /* @__PURE__ */ s("div", { class: "flex flex-col gap-16 text-center" }, [
181
- /* @__PURE__ */ s("div", { class: "fm-typo-en-title-sm-800" }, "Create rewards"),
182
- /* @__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. ")
183
- ], -1), Ge = /* @__PURE__ */ Y({
173
+ }, null, -1), Fe = /* @__PURE__ */ l("div", { class: "flex flex-col gap-16 text-center" }, [
174
+ /* @__PURE__ */ l("div", { class: "fm-typo-en-title-sm-800" }, "Create rewards"),
175
+ /* @__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({
184
177
  __name: "StoreRewards",
185
- setup(W) {
186
- const O = {
178
+ setup(Z) {
179
+ const I = {
187
180
  label: "Create reward",
188
181
  value: "create",
189
182
  isPrimary: !0,
190
183
  prependIcon: "add"
191
- }, f = te(), { global: A, minor: S } = ee, h = pe(), i = V({
184
+ }, f = ee(), { global: A, minor: S } = X, h = ue(), i = V({
192
185
  searchKey: "",
193
186
  columnFilters: []
194
187
  }), o = [
@@ -201,12 +194,12 @@ const fe = {
201
194
  header: "Reward type",
202
195
  accessorFn: (a) => a.type,
203
196
  cell(a) {
204
- return _[a.row.original.type].chip();
197
+ return C[a.row.original.type].chip();
205
198
  }
206
199
  },
207
200
  {
208
201
  header: "Validity",
209
- accessorFn: (a) => ue(
202
+ accessorFn: (a) => ce(
210
203
  "validityOption" in a.options ? a.options.validityOption || {} : {}
211
204
  )
212
205
  },
@@ -220,8 +213,8 @@ const fe = {
220
213
  {
221
214
  header: "Actions",
222
215
  cell(a) {
223
- return C("div", { class: "flex items-center justify-end gap-4" }, [
224
- C(
216
+ return R("div", { class: "flex items-center justify-end gap-4" }, [
217
+ R(
225
218
  $.FmMenu,
226
219
  {
227
220
  placement: "bottom-end",
@@ -230,16 +223,16 @@ const fe = {
230
223
  }
231
224
  },
232
225
  {
233
- "menu-button": () => C($.FmButton, {
226
+ "menu-button": () => R($.FmButton, {
234
227
  icon: "more_vert",
235
228
  iconColor: "neutral-gray-400",
236
229
  variant: "tertiary"
237
230
  }),
238
231
  default: () => [
239
- C($.FmMenuItem, {
232
+ R($.FmMenuItem, {
240
233
  label: "View collections",
241
234
  onClick: async (t) => {
242
- t.stopPropagation(), g(a.row.original._id);
235
+ t.stopPropagation(), w(a.row.original._id);
243
236
  }
244
237
  }),
245
238
  // h(components.FmMenuItem, {
@@ -249,7 +242,7 @@ const fe = {
249
242
  // onViewTransactions(props.row.original._id as string);
250
243
  // },
251
244
  // }),
252
- C(
245
+ R(
253
246
  $.FmMenuItem,
254
247
  {
255
248
  onClick: async (t) => {
@@ -257,7 +250,7 @@ const fe = {
257
250
  }
258
251
  },
259
252
  {
260
- label: C(
253
+ label: R(
261
254
  "div",
262
255
  {
263
256
  class: "text-fm-color-typo-error fm-typo-en-body-md-400"
@@ -274,8 +267,8 @@ const fe = {
274
267
  }
275
268
  ], y = N(
276
269
  () => f.bundleRewards.filter((a) => a.type == "VOUCHER")
277
- ), l = V();
278
- function g(a) {
270
+ ), n = V();
271
+ function w(a) {
279
272
  h.push({
280
273
  name: k["$connect-STORE_REWARD_COLLECTIONS"],
281
274
  params: { id: a }
@@ -301,8 +294,8 @@ const fe = {
301
294
  );
302
295
  }
303
296
  async function F(a) {
304
- var m;
305
- const t = a ? oe(f.bundleRewards.find((c) => c._id === a)) : void 0;
297
+ var r;
298
+ const t = a ? ae(f.bundleRewards.find((c) => c._id === a)) : void 0;
306
299
  if ((t == null ? void 0 : t.type) === "TITLE") {
307
300
  await M.confirm(
308
301
  "You cannot edit a title here, please edit it at the Program > Title section.",
@@ -311,7 +304,7 @@ const fe = {
311
304
  ) && await h.push({ name: k["$connect-PROGRAM_TITLE"] });
312
305
  return;
313
306
  }
314
- (m = l.value) == null || m.showSheet(!0, t, {
307
+ (r = n.value) == null || r.showSheet(!0, t, {
315
308
  isStoreReward: !0,
316
309
  type: "VOUCHER"
317
310
  });
@@ -319,14 +312,14 @@ const fe = {
319
312
  async function E(a) {
320
313
  await S(
321
314
  async () => {
322
- var t, m, c, R;
323
- (t = l.value) != null && t.rewardImage && a.image ? await B.delete(a.image) : (m = l.value) != null && m.rewardImage && (a.image = await B.update(
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(
324
317
  a.image || B.collectibleImagePath(
325
318
  void 0,
326
- l.value.rewardImage
319
+ n.value.rewardImage
327
320
  ),
328
- (c = l.value) == null ? void 0 : c.rewardImage
329
- )), a._id ? await D.updateReward(a._id, a) : await D.createReward(a), await f.readRewards(), (R = l.value) == null || R.showSheet(!1);
321
+ (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);
330
323
  },
331
324
  {
332
325
  message: "Updating reward",
@@ -334,94 +327,94 @@ const fe = {
334
327
  }
335
328
  );
336
329
  }
337
- return Z(async () => {
330
+ return Y(async () => {
338
331
  await A(async () => {
339
332
  await f.readMembership(), await f.readRewards();
340
333
  });
341
334
  }), (a, t) => {
342
- const m = p("FmPageHead"), c = p("FmMenuItem"), R = p("FmSearch"), T = p("FmTable"), L = p("FmButton"), b = p("FmCard");
343
- return u(), I(j, null, [
344
- n(m, {
335
+ const r = p("FmPageHead"), c = p("FmMenuItem"), v = p("FmSearch"), L = p("FmTable"), _ = p("FmButton"), T = p("FmCard");
336
+ return u(), O(j, null, [
337
+ s(r, {
345
338
  title: "Rewards",
346
339
  description: "Create and manage rewards for your customers.",
347
- actions: [O],
340
+ actions: [I],
348
341
  "back-button": !0,
349
342
  "onClick:action": t[0] || (t[0] = () => F()),
350
343
  "onClick:back": t[1] || (t[1] = () => e(h).push({ name: e(k)["$connect-STORE"] }))
351
344
  }, null, 8, ["actions"]),
352
- s("div", Re, [
353
- e(y) && e(y).length > 0 ? (u(), I(j, { key: 0 }, [
354
- s("div", Ce, [
355
- s("div", xe, [
356
- n(ne, {
345
+ l("div", he, [
346
+ e(y) && e(y).length > 0 ? (u(), O(j, { key: 0 }, [
347
+ l("div", Re, [
348
+ l("div", Ce, [
349
+ s(oe, {
357
350
  label: `Reward type: ${e(i).columnFilters.length == 0 ? "All" : e(i).columnFilters[0].name}`
358
351
  }, {
359
352
  default: x(() => [
360
- n(c, {
361
- onClick: t[2] || (t[2] = (d) => e(i).columnFilters = []),
353
+ s(c, {
354
+ onClick: t[2] || (t[2] = (m) => e(i).columnFilters = []),
362
355
  label: "All"
363
356
  }),
364
- n(c, {
365
- onClick: t[3] || (t[3] = (d) => e(i).columnFilters = [
357
+ s(c, {
358
+ onClick: t[3] || (t[3] = (m) => e(i).columnFilters = [
366
359
  {
367
360
  id: "type",
368
361
  value: "VOUCHER",
369
- name: e(_).VOUCHER.name
362
+ name: e(C).VOUCHER.name
370
363
  }
371
364
  ]),
372
- label: e(_).VOUCHER.name
365
+ label: e(C).VOUCHER.name
373
366
  }, null, 8, ["label"]),
374
- n(c, {
375
- onClick: t[4] || (t[4] = (d) => e(i).columnFilters = [
367
+ s(c, {
368
+ onClick: t[4] || (t[4] = (m) => e(i).columnFilters = [
376
369
  {
377
370
  id: "type",
378
371
  value: "TITLE",
379
- name: e(_).TITLE.name
372
+ name: e(C).TITLE.name
380
373
  }
381
374
  ]),
382
- label: e(_).TITLE.name
375
+ label: e(C).TITLE.name
383
376
  }, null, 8, ["label"])
384
377
  ]),
385
378
  _: 1
386
379
  }, 8, ["label"])
387
380
  ]),
388
- n(R, {
381
+ s(v, {
389
382
  modelValue: e(i).searchKey,
390
- "onUpdate:modelValue": t[5] || (t[5] = (d) => e(i).searchKey = d),
383
+ "onUpdate:modelValue": t[5] || (t[5] = (m) => e(i).searchKey = m),
391
384
  class: "",
392
385
  placeholder: "search",
393
386
  collapsible: ""
394
387
  }, null, 8, ["modelValue"])
395
388
  ]),
396
- n(T, {
389
+ s(L, {
397
390
  "row-data": e(y),
398
391
  "column-defs": o,
399
392
  "search-value": e(i).searchKey,
400
393
  "column-filter": e(i).columnFilters,
401
- onRowClick: t[6] || (t[6] = (d) => F(d.original._id)),
394
+ onRowClick: t[6] || (t[6] = (m) => F(m.original._id)),
402
395
  "hide-footer": e(y).length < 10
403
396
  }, null, 8, ["row-data", "search-value", "column-filter", "hide-footer"])
404
- ], 64)) : (u(), v(b, {
397
+ ], 64)) : (u(), b(T, {
405
398
  key: 1,
406
399
  variant: "outlined",
407
400
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
408
401
  }, {
409
402
  default: x(() => [
403
+ xe,
410
404
  Fe,
411
- Ve,
412
- n(L, {
405
+ s(_, {
413
406
  variant: "primary",
414
407
  label: "Create reward",
415
- onClick: t[7] || (t[7] = (d) => F()),
408
+ onClick: t[7] || (t[7] = (m) => F()),
416
409
  icon: "add"
417
410
  })
418
411
  ]),
419
412
  _: 1
420
413
  })),
421
- n(he, {
414
+ s(be, {
422
415
  ref_key: "rewardSheetRef",
423
- ref: l,
424
- onUpdate: t[8] || (t[8] = (d) => E(d))
416
+ ref: n,
417
+ onUpdate: t[8] || (t[8] = (m) => E(m))
425
418
  }, null, 512)
426
419
  ])
427
420
  ], 64);
@@ -429,5 +422,5 @@ const fe = {
429
422
  }
430
423
  });
431
424
  export {
432
- Ge as default
425
+ je as default
433
426
  };
@@ -1,15 +1,15 @@
1
1
  import { defineComponent as P, ref as k, computed as $, onMounted as z, resolveComponent as x, openBlock as R, createBlock as O, unref as n, withCtx as N, createVNode as g, normalizeClass as U, createCommentVNode as oe, createElementVNode as C, toDisplayString as q, createElementBlock as L, Fragment as le, renderList as se, mergeModels as K, useModel as ie, watch as j, onBeforeMount as ce, h as c } from "vue";
2
2
  import { components as S } from "@feedmepos/ui-library";
3
- import { d as ue } from "./index-BZbJpBo2.js";
4
- import { a as X } from "./loading-BIURYgSR.js";
3
+ import { d as ue } from "./index-AeZIrHi3.js";
4
+ import { a as X } from "./loading-D7uTV0-9.js";
5
5
  import { s as de } from "./index-Dbd4WA4r.js";
6
6
  import { h as b } from "./moment-BWErdI6_.js";
7
7
  import { s as Y } from "./index-CuvNtC_M.js";
8
- import { f as H } from "./number-BKGHLuLf.js";
9
- import { e as G, j as me, S as pe, h as fe, b as ge } from "./app-BAgeAm1l.js";
10
- import { u as J, _ as Q } from "./usePagination-4epNDLvW.js";
8
+ import { f as H } from "./number-CNiMHNNi.js";
9
+ import { e as G, j as me, S as pe, h as fe, b as ge } from "./app-CzpQo8NQ.js";
10
+ import { u as J, _ as Q } from "./usePagination-CwZ7gv3m.js";
11
11
  import { g as Z } from "./user-Bm4KttFq.js";
12
- import { B as ee, a as te } from "./export-DMZdMVnb.js";
12
+ import { B as ee, a as te } from "./export-pnyF_Nqa.js";
13
13
  import { o as A } from "./objectId-dwaoBfJX.js";
14
14
  function ye(o) {
15
15
  let s = "";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as N, ref as C, computed as L, watch as E, resolveComponent as g, openBlock as o, createElementBlock as i, Fragment as y, toDisplayString as I, createCommentVNode as A, createElementVNode as M, createVNode as v, unref as u, renderList as b, createBlock as S, isRef as U, withCtx as F } from "vue";
2
- import { b as T } from "./app-BAgeAm1l.js";
2
+ import { b as T } from "./app-CzpQo8NQ.js";
3
3
  function j(l, s, n) {
4
4
  return l.some(
5
5
  n instanceof Function ? n : (a) => a === s