@feedmepos/mf-connect 0.0.16-beta.10 → 0.0.16-beta.12

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 (85) hide show
  1. package/dist/{Analytic-BVk0jPDU.js → Analytic-DIc9BYb0.js} +32 -20
  2. package/dist/{App-BbAalq1k.js → App-BzzL9_Jw.js} +33 -27
  3. package/dist/Broadcast-dVPgK5QV.js +223 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DiU3MnH0.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-TnEPvafD.js} +18 -11
  5. package/dist/{Card-B5in1RMa.js → Card-Bj2Yd2pr.js} +178 -158
  6. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
  7. package/dist/Collections-Fkb_zzqZ.js +453 -0
  8. package/dist/{Credit-Bc9EzdsC.js → Credit-DHn9OkE8.js} +78 -69
  9. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C1ZXQski.js +2788 -0
  10. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-D6mWny8y.js +344 -0
  11. package/dist/{Experience-CgKak5ik.js → Experience-DX3aJihS.js} +64 -55
  12. package/dist/{Game-QhfKqrN_.js → Game-CcVQvETd.js} +54 -45
  13. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
  14. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  15. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +18737 -0
  16. package/dist/MainLayout-B1aJoR95.js +41 -0
  17. package/dist/{Marketing-CSx4N7UJ.js → Marketing-B9kykWEh.js} +79 -72
  18. package/dist/{Member-CY6WMD8D.js → Member-RoJSCSC5.js} +25 -22
  19. package/dist/{MemberList-8iRwm7Sz.js → MemberList-BUDxqMEK.js} +321 -307
  20. package/dist/{MemberTransactions-CknqkWO3.js → MemberTransactions-Bh_tT1Rp.js} +1 -1
  21. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Cj3-JHOX.js +432 -0
  22. package/dist/{Mission-BTy1p7lU.js → Mission-DDvgCLy0.js} +50 -40
  23. package/dist/{Point-A6B_ggSy.js → Point-BbPkt4kF.js} +67 -58
  24. package/dist/Promotion-DEo-lxpX.js +221 -0
  25. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BGjeTeqS.js +1751 -0
  26. package/dist/{Segment-CFVXtyEj.js → Segment-DAcpZWIN.js} +145 -130
  27. package/dist/{Setting-Jmtw-_DV.js → Setting-CgXohUPt.js} +167 -154
  28. package/dist/{Store-DQypT-7e.js → Store-BVyHbQ8o.js} +504 -489
  29. package/dist/{StoreRewards-M-utm0iI.js → StoreRewards-sccMDbkj.js} +124 -108
  30. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-B60mQ5kq.js → StoreTransactions.vue_vue_type_script_setup_true_lang--sdQ_l8g.js} +131 -123
  31. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CXlkvt2u.js +139 -0
  32. package/dist/{Tier-D1jymeLK.js → Tier--P27XXbB.js} +144 -125
  33. package/dist/{Title-DN9DIP2k.js → Title-B27S3SxD.js} +107 -90
  34. package/dist/{Transaction-BAJvAoU6.js → Transaction-CYTtwwHY.js} +2 -2
  35. package/dist/Voucher-BZ8PKgO5.js +488 -0
  36. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js +55 -0
  37. package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
  38. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  39. package/dist/app-CnKzqAcN.js +53428 -0
  40. package/dist/app-FfENBuoE.js +5381 -0
  41. package/dist/app-wDQR6dpb.js +39 -0
  42. package/dist/app.js +2 -1
  43. package/dist/business-CXyP9G7A.js +78 -0
  44. package/dist/campaign-0aM2KYOy.js +96 -0
  45. package/dist/campaign-CpzFl8Vr.js +4 -0
  46. package/dist/collection.fn-FicQhH1t.js +26 -0
  47. package/dist/dto-BiYLkVdL.js +1169 -0
  48. package/dist/effect-Cg-eNEjg.js +61 -0
  49. package/dist/{export-DjeNY5Pc.js → export-D7BuObOL.js} +19 -16
  50. package/dist/helper-DvD-D7c7.js +71 -0
  51. package/dist/index-B1Q0GAWp.js +95 -0
  52. package/dist/index-B4UZgSB-.js +28058 -0
  53. package/dist/index-B6c-fUij.js +203 -0
  54. package/dist/index-BP_5cfKa.js +38 -0
  55. package/dist/index-BRXg5Si1.js +2071 -0
  56. package/dist/index-BuDwICBJ.js +761 -0
  57. package/dist/index-CDMC-8iO.js +94 -0
  58. package/dist/index-CcZt3OrE.js +73 -0
  59. package/dist/index-CuvNtC_M.js +61 -0
  60. package/dist/index-DA-fzkRR.js +1737 -0
  61. package/dist/index-Dbd4WA4r.js +61 -0
  62. package/dist/index-Dkeb_9ER.js +8832 -0
  63. package/dist/index-DmdKoKk_.js +298 -0
  64. package/dist/index-G-88ujCM.js +3 -0
  65. package/dist/loading-uCNeZibp.js +32697 -0
  66. package/dist/lodash-B5I3zXaY.js +3678 -0
  67. package/dist/membership-DFRO9TyM.js +221 -0
  68. package/dist/moment-BWErdI6_.js +2578 -0
  69. package/dist/money-OtkT4Pzp.js +15 -0
  70. package/dist/number-Cg3NCouc.js +12 -0
  71. package/dist/object-qECH92oz.js +26 -0
  72. package/dist/objectId-dwaoBfJX.js +7 -0
  73. package/dist/rule-Ch2HRiGw.js +1973 -0
  74. package/dist/rule-builder-B_M9yvEe.js +89 -0
  75. package/dist/template-1o0LbOoJ.js +190 -0
  76. package/dist/usePagination-BeF5K3M7.js +223 -0
  77. package/dist/vue-i18n-AtGIa4qH.js +2365 -0
  78. package/dist/xlsx-pChq0adn.js +15491 -0
  79. package/dist/zod-W_PvIofQ.js +90 -0
  80. package/package.json +3 -3
  81. package/dist/Collections-CFCZ9YIG.js +0 -4
  82. package/dist/MainLayout-JbHzENFy.js +0 -4
  83. package/dist/app-BpzzygYP.js +0 -87765
  84. package/dist/money-DKGIIplY.js +0 -15
  85. package/dist/number-tPodRxTN.js +0 -12
@@ -1,46 +1,62 @@
1
- import { defineComponent as K, ref as V, computed as j, onMounted as q, resolveComponent as g, openBlock as m, createBlock as b, unref as e, isRef as Y, withCtx as S, createElementVNode as s, createVNode as d, createElementBlock as O, createTextVNode as z, resolveDynamicComponent as H, toDisplayString as $, Fragment as D, createCommentVNode as E, h } from "vue";
2
- import { b as J, G as Z, a as G, d as Q, Z as v, o as X, ak as ee, al as te, am as oe, H as ae, I as ne, u as se, i as le, af as ie, R as U, B as M, t as B, j as re, e as ce, q as de, D as N } from "./app-BpzzygYP.js";
3
- import { components as T } from "@feedmepos/ui-library";
4
- import { useCoreStore as me } from "@feedmepos/mf-common";
1
+ import { defineComponent as G, ref as F, computed as j, onMounted as q, resolveComponent as g, openBlock as d, createBlock as b, unref as e, isRef as Y, withCtx as S, createElementVNode as s, createVNode as c, createElementBlock as O, createTextVNode as z, resolveDynamicComponent as M, toDisplayString as $, Fragment as D, createCommentVNode as U, h } from "vue";
2
+ import { _ as J } from "./campaign-CpzFl8Vr.js";
3
+ import { components as k } from "@feedmepos/ui-library";
4
+ import "./index-G-88ujCM.js";
5
+ import { p as H, u as Q, f as B } from "./loading-uCNeZibp.js";
6
+ import { C as Z, u as X } from "./membership-DFRO9TyM.js";
7
+ import { u as ee } from "./vue-i18n-AtGIa4qH.js";
8
+ import { F as te } from "./index-Dkeb_9ER.js";
9
+ import { c as oe } from "./object-qECH92oz.js";
10
+ import { u as K } from "./app-wDQR6dpb.js";
11
+ import { u as ae } from "./business-CXyP9G7A.js";
12
+ import { useCoreStore as ne } from "@feedmepos/mf-common";
13
+ import { Z as v } from "./zod-W_PvIofQ.js";
14
+ import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js";
15
+ import { _ as re } from "./ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js";
16
+ import { _ as ie } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-CXlkvt2u.js";
17
+ import { _ as le, a as me } from "./EffectSheet.vue_vue_type_style_index_0_lang-D6mWny8y.js";
18
+ import { i as ce, t as de } from "./helper-DvD-D7c7.js";
5
19
  import { useRouter as ue } from "vue-router";
20
+ import { m as N } from "./index-B1Q0GAWp.js";
21
+ import { R as T } from "./app-FfENBuoE.js";
6
22
  const pe = {
7
23
  key: 0,
8
24
  class: "flex flex-col space-y-16 pr-12"
9
- }, 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" }, we = { class: "flex items-center gap-8" }, ge = /* @__PURE__ */ K({
25
+ }, 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" }, we = { class: "flex items-center gap-8" }, ge = /* @__PURE__ */ G({
10
26
  __name: "EditRewardSheet",
11
27
  emits: ["update"],
12
- setup(W, { expose: n, emit: I }) {
13
- const p = I, P = J(), F = me(), f = V(!1), a = V(), x = V(), i = ae, r = j(
28
+ setup(W, { expose: n, emit: P }) {
29
+ const p = P, I = ae(), V = ne(), f = F(!1), a = F(), _ = F(), i = te, l = j(
14
30
  () => {
15
- var l;
16
- return Z[((l = a.value) == null ? void 0 : l.type) || "VOUCHER"];
31
+ var r;
32
+ return Z[((r = a.value) == null ? void 0 : r.type) || "VOUCHER"];
17
33
  }
18
34
  ), A = j(() => {
19
- const l = i.safeParse(a.value);
20
- return l.success ? [] : l.error.errors;
35
+ const r = i.safeParse(a.value);
36
+ return r.success ? [] : r.error.errors;
21
37
  });
22
38
  function L() {
23
- const l = i.safeParse(a.value);
24
- l.success && p("update", l.data);
39
+ const r = i.safeParse(a.value);
40
+ r.success && p("update", r.data);
25
41
  }
26
- function _(l, t, o = {
42
+ function x(r, t, o = {
27
43
  isStoreReward: !1,
28
44
  type: "VOUCHER"
29
45
  }) {
30
- f.value = l, l && (x.value = void 0, a.value = t || ne(o.type, {
31
- business: F.currentBusiness.value._id,
46
+ f.value = r, r && (_.value = void 0, a.value = t || ce(o.type, {
47
+ business: V.currentBusiness.value._id,
32
48
  noCampaign: o.isStoreReward == !0
33
49
  }));
34
50
  }
35
51
  return q(async () => {
36
- await P.readLocations();
52
+ await I.readLocations();
37
53
  }), n({
38
- showSheet: _,
54
+ showSheet: x,
39
55
  data: a,
40
- rewardImage: x
41
- }), (l, t) => {
56
+ rewardImage: _
57
+ }), (r, t) => {
42
58
  const o = g("FmTextarea"), y = g("FmHelperText"), u = g("FmButton"), C = g("FmSideSheet");
43
- return m(), b(C, {
59
+ return d(), b(C, {
44
60
  "max-width": 560,
45
61
  modelValue: e(f),
46
62
  "onUpdate:modelValue": t[7] || (t[7] = (R) => Y(f) ? f.value = R : null),
@@ -48,125 +64,125 @@ const pe = {
48
64
  }, {
49
65
  "side-sheet-footer": S(() => [
50
66
  s("div", we, [
51
- d(u, {
67
+ c(u, {
52
68
  label: "Submit",
53
69
  onClick: L,
54
- disabled: e(A).length > 0 || e(G)().isLoading,
55
- loading: e(G)().isLoading
70
+ disabled: e(A).length > 0 || e(K)().isLoading,
71
+ loading: e(K)().isLoading
56
72
  }, null, 8, ["disabled", "loading"]),
57
- d(u, {
73
+ c(u, {
58
74
  label: "Cancel",
59
- onClick: t[6] || (t[6] = (R) => _(!1)),
75
+ onClick: t[6] || (t[6] = (R) => x(!1)),
60
76
  variant: "tertiary"
61
77
  })
62
78
  ])
63
79
  ]),
64
80
  default: S(() => {
65
- var R, k, w;
81
+ var R, E, w;
66
82
  return [
67
- e(a) ? (m(), O("div", pe, [
83
+ e(a) ? (d(), O("div", pe, [
68
84
  s("div", fe, [
69
85
  t[8] || (t[8] = z(" Reward information ")),
70
- (m(), b(H(e(r).chip())))
86
+ (d(), b(M(e(l).chip())))
71
87
  ]),
72
- d(Q, {
88
+ c(se, {
73
89
  modelValue: e(a).name,
74
- "onUpdate:modelValue": t[0] || (t[0] = (c) => e(a).name = c),
75
- label: `${e(r).name} name`,
90
+ "onUpdate:modelValue": t[0] || (t[0] = (m) => e(a).name = m),
91
+ label: `${e(l).name} name`,
76
92
  schema: e(v).typeAtPath(e(i), "name", [e(a).type])
77
93
  }, null, 8, ["modelValue", "label", "schema"]),
78
- d(o, {
94
+ c(o, {
79
95
  class: "!mb-[-16px]",
80
96
  modelValue: e(a).description,
81
- "onUpdate:modelValue": t[1] || (t[1] = (c) => e(a).description = c),
97
+ "onUpdate:modelValue": t[1] || (t[1] = (m) => e(a).description = m),
82
98
  rules: [e(v).ruleAtPath(e(i), "description", [e(a).type])]
83
99
  }, {
84
100
  label: S(() => [
85
- (m(), b(H(
101
+ (d(), b(M(
86
102
  e(v).toInputLabel(
87
103
  e(v).typeAtPath(e(i), "description", [e(a).type]),
88
- `${e(r).name} description`
104
+ `${e(l).name} description`
89
105
  )
90
106
  )))
91
107
  ]),
92
108
  _: 1
93
109
  }, 8, ["modelValue", "rules"]),
94
110
  s("div", ye, [
95
- s("div", null, $(e(r).name) + " description should not exceed 200 characters. ", 1),
111
+ s("div", null, $(e(l).name) + " description should not exceed 200 characters. ", 1),
96
112
  s("div", null, $(((R = e(a).description) == null ? void 0 : R.length) ?? 0) + "/200", 1)
97
113
  ]),
98
- d(X, {
114
+ c(re, {
99
115
  class: "w-1/2 xs:w-2/3",
100
116
  "aspect-ratio": "16/9",
101
- file: e(x) ?? void 0,
117
+ file: e(_) ?? void 0,
102
118
  thumbnail: e(a).image ?? void 0,
103
- "onUpdate:file": t[2] || (t[2] = async (c) => {
104
- x.value = c, c || (e(a).image = null);
119
+ "onUpdate:file": t[2] || (t[2] = async (m) => {
120
+ _.value = m, m || (e(a).image = null);
105
121
  })
106
122
  }, {
107
123
  label: S(() => [
108
- (m(), b(H(
124
+ (d(), b(M(
109
125
  e(v).toInputLabel(
110
126
  e(v).typeAtPath(e(i), "image", [e(a).type]),
111
- `${e(r).name} image`
127
+ `${e(l).name} image`
112
128
  )
113
129
  )))
114
130
  ]),
115
131
  _: 1
116
132
  }, 8, ["file", "thumbnail"]),
117
- e(a).type === "VOUCHER" ? (m(), O(D, { key: 0 }, [
133
+ e(a).type === "VOUCHER" ? (d(), O(D, { key: 0 }, [
118
134
  t[9] || (t[9] = s("div", { class: "fm-typo-en-title-sm-800" }, "Discount", -1)),
119
- d(ee, {
135
+ c(le, {
120
136
  "model-value": e(a).extras.effect,
121
- "onUpdate:modelValue": t[3] || (t[3] = (c) => {
122
- e(a).extras.effect = c;
137
+ "onUpdate:modelValue": t[3] || (t[3] = (m) => {
138
+ e(a).extras.effect = m;
123
139
  })
124
140
  }, null, 8, ["model-value"]),
125
- e(a).extras.effect == null ? (m(), b(y, {
141
+ e(a).extras.effect == null ? (d(), b(y, {
126
142
  key: 0,
127
143
  class: "!mt-8",
128
144
  text: "Effect is required",
129
145
  state: "error"
130
- })) : E("", !0),
146
+ })) : U("", !0),
131
147
  t[10] || (t[10] = s("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, " Usage configuration ", -1)),
132
- d(te, {
148
+ c(me, {
133
149
  "model-value": e(a).options,
134
150
  "no-campaign": e(a).noCampaign,
135
- "onUpdate:modelValue": t[4] || (t[4] = (c) => e(a).options = c),
151
+ "onUpdate:modelValue": t[4] || (t[4] = (m) => e(a).options = m),
136
152
  schema: e(v).typeAtPath(e(i), "options", ["VOUCHER"])
137
153
  }, null, 8, ["model-value", "no-campaign", "schema"])
138
- ], 64)) : E("", !0),
154
+ ], 64)) : U("", !0),
139
155
  t[11] || (t[11] = s("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Availability", -1)),
140
- e(a).type === "VOUCHER" ? (m(), b(oe, {
156
+ e(a).type === "VOUCHER" ? (d(), b(ie, {
141
157
  key: 1,
142
- "model-value": ((w = (k = e(a).extras) == null ? void 0 : k.targetLocation) == null ? void 0 : w.map(String)) ?? null,
158
+ "model-value": ((w = (E = e(a).extras) == null ? void 0 : E.targetLocation) == null ? void 0 : w.map(String)) ?? null,
143
159
  type: "select",
144
- "onUpdate:modelValue": t[5] || (t[5] = (c) => {
145
- e(a).extras.targetLocation = c;
160
+ "onUpdate:modelValue": t[5] || (t[5] = (m) => {
161
+ e(a).extras.targetLocation = m;
146
162
  }),
147
163
  rules: [
148
164
  e(v).ruleAtPath(e(i), "extras.targetLocation", ["VOUCHER"])
149
165
  ]
150
- }, null, 8, ["model-value", "rules"])) : E("", !0)
151
- ])) : E("", !0)
166
+ }, null, 8, ["model-value", "rules"])) : U("", !0)
167
+ ])) : U("", !0)
152
168
  ];
153
169
  }),
154
170
  _: 1
155
171
  }, 8, ["modelValue"]);
156
172
  };
157
173
  }
158
- }), ve = { class: "px-24 flex flex-col gap-y-16" }, Re = { class: "flex items-center justify-between w-full" }, be = { class: "flex flex-col gap-16 text-center" }, xe = { class: "fm-typo-en-title-sm-800" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ke = /* @__PURE__ */ K({
174
+ }), ve = { class: "px-24 flex flex-col gap-y-16" }, Re = { class: "flex items-center justify-between w-full" }, be = { class: "flex flex-col gap-16 text-center" }, _e = { class: "fm-typo-en-title-sm-800" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ke = /* @__PURE__ */ G({
159
175
  __name: "StoreRewards",
160
176
  setup(W) {
161
- const { t: n } = se(), I = {
177
+ const { t: n } = ee(), P = {
162
178
  label: n("connect.storeRewards.create"),
163
179
  value: "create",
164
180
  isPrimary: !0,
165
181
  prependIcon: "add"
166
- }, p = le(), { global: P, minor: F } = ce, f = ue(), a = V({
182
+ }, p = X(), { global: I, minor: V } = Q, f = ue(), a = F({
167
183
  searchKey: "",
168
184
  columnFilters: []
169
- }), x = [
185
+ }), _ = [
170
186
  {
171
187
  header: n("connect.storeRewards.table.name"),
172
188
  accessorFn: (t) => t.name
@@ -181,7 +197,7 @@ const pe = {
181
197
  },
182
198
  {
183
199
  header: n("connect.storeRewards.table.validity"),
184
- accessorFn: (t) => ie(
200
+ accessorFn: (t) => de(
185
201
  "validityOption" in t.options ? t.options.validityOption || {} : {}
186
202
  )
187
203
  },
@@ -197,7 +213,7 @@ const pe = {
197
213
  cell(t) {
198
214
  return h("div", { class: "flex items-center justify-end gap-4" }, [
199
215
  h(
200
- T.FmMenu,
216
+ k.FmMenu,
201
217
  {
202
218
  placement: "bottom-end",
203
219
  onClick: (o) => {
@@ -205,13 +221,13 @@ const pe = {
205
221
  }
206
222
  },
207
223
  {
208
- "menu-button": () => h(T.FmButton, {
224
+ "menu-button": () => h(k.FmButton, {
209
225
  icon: "more_vert",
210
226
  iconColor: "neutral-gray-400",
211
227
  variant: "tertiary"
212
228
  }),
213
229
  default: () => [
214
- h(T.FmMenuItem, {
230
+ h(k.FmMenuItem, {
215
231
  label: "View collections",
216
232
  onClick: async (o) => {
217
233
  o.stopPropagation(), A(t.row.original._id);
@@ -225,7 +241,7 @@ const pe = {
225
241
  // },
226
242
  // }),
227
243
  h(
228
- T.FmMenuItem,
244
+ k.FmMenuItem,
229
245
  {
230
246
  onClick: async (o) => {
231
247
  o.stopPropagation(), L(t.row.original);
@@ -249,28 +265,28 @@ const pe = {
249
265
  }
250
266
  ], i = j(
251
267
  () => p.bundleRewards.filter((t) => t.type == "VOUCHER")
252
- ), r = V();
268
+ ), l = F();
253
269
  function A(t) {
254
270
  f.push({
255
- name: U["$connect-STORE_REWARD_COLLECTIONS"],
271
+ name: T["$connect-STORE_REWARD_COLLECTIONS"],
256
272
  params: { id: t }
257
273
  });
258
274
  }
259
275
  async function L(t) {
260
276
  if (t.type === "TITLE") {
261
- await M.confirm(
277
+ await H.confirm(
262
278
  n("connect.storeRewards.remove.message"),
263
279
  n("connect.storeRewards.remove.title"),
264
280
  n("connect.storeRewards.remove.action")
265
- ) && await f.push({ name: U["$connect-PROGRAM_TITLE"] });
281
+ ) && await f.push({ name: T["$connect-PROGRAM_TITLE"] });
266
282
  return;
267
283
  }
268
- await M.remove(
284
+ await H.remove(
269
285
  n("connect.storeRewards.delete.confirm"),
270
286
  n("connect.storeRewards.delete.title")
271
- ) && await F(
287
+ ) && await V(
272
288
  async () => {
273
- await B.deleteReward(t._id), await p.readMembership(), await p.readRewards();
289
+ await N.deleteReward(t._id), await p.readMembership(), await p.readRewards();
274
290
  },
275
291
  {
276
292
  message: n("connect.storeRewards.delete.message"),
@@ -278,33 +294,33 @@ const pe = {
278
294
  }
279
295
  );
280
296
  }
281
- async function _(t) {
297
+ async function x(t) {
282
298
  var y;
283
- const o = t ? de(p.bundleRewards.find((u) => u._id === t)) : void 0;
299
+ const o = t ? oe(p.bundleRewards.find((u) => u._id === t)) : void 0;
284
300
  if ((o == null ? void 0 : o.type) === "TITLE") {
285
- await M.confirm(
301
+ await H.confirm(
286
302
  "You cannot edit a title here, please edit it at the Program > Title section.",
287
303
  "Update reward",
288
304
  "Go to title section"
289
- ) && await f.push({ name: U["$connect-PROGRAM_TITLE"] });
305
+ ) && await f.push({ name: T["$connect-PROGRAM_TITLE"] });
290
306
  return;
291
307
  }
292
- (y = r.value) == null || y.showSheet(!0, o, {
308
+ (y = l.value) == null || y.showSheet(!0, o, {
293
309
  isStoreReward: !0,
294
310
  type: "VOUCHER"
295
311
  });
296
312
  }
297
- async function l(t) {
298
- await F(
313
+ async function r(t) {
314
+ await V(
299
315
  async () => {
300
316
  var o, y, u, C;
301
- (o = r.value) != null && o.rewardImage && t.image ? await N.delete(t.image) : (y = r.value) != null && y.rewardImage && (t.image = await N.update(
302
- t.image || N.collectibleImagePath(
317
+ (o = l.value) != null && o.rewardImage && t.image ? await B.delete(t.image) : (y = l.value) != null && y.rewardImage && (t.image = await B.update(
318
+ t.image || B.collectibleImagePath(
303
319
  void 0,
304
- r.value.rewardImage
320
+ l.value.rewardImage
305
321
  ),
306
- (u = r.value) == null ? void 0 : u.rewardImage
307
- )), t._id ? await B.updateReward(t._id, t) : await B.createReward(t), await p.readRewards(), (C = r.value) == null || C.showSheet(!1);
322
+ (u = l.value) == null ? void 0 : u.rewardImage
323
+ )), t._id ? await N.updateReward(t._id, t) : await N.createReward(t), await p.readRewards(), (C = l.value) == null || C.showSheet(!1);
308
324
  },
309
325
  {
310
326
  message: "Updating reward",
@@ -313,25 +329,25 @@ const pe = {
313
329
  );
314
330
  }
315
331
  return q(async () => {
316
- await P(async () => {
332
+ await I(async () => {
317
333
  await p.readMembership(), await p.readRewards();
318
334
  });
319
335
  }), (t, o) => {
320
- const y = g("FmPageHead"), u = g("FmSearch"), C = g("FmTable"), R = g("FmButton"), k = g("FmCard");
321
- return m(), O(D, null, [
322
- d(y, {
336
+ const y = g("FmPageHead"), u = g("FmSearch"), C = g("FmTable"), R = g("FmButton"), E = g("FmCard");
337
+ return d(), O(D, null, [
338
+ c(y, {
323
339
  title: e(n)("connect.storeRewards.title"),
324
340
  description: e(n)("connect.storeRewards.description"),
325
- actions: [I],
341
+ actions: [P],
326
342
  "back-button": !0,
327
- "onClick:action": o[0] || (o[0] = () => _()),
328
- "onClick:back": o[1] || (o[1] = () => e(f).push({ name: e(U)["$connect-STORE"] }))
343
+ "onClick:action": o[0] || (o[0] = () => x()),
344
+ "onClick:back": o[1] || (o[1] = () => e(f).push({ name: e(T)["$connect-STORE"] }))
329
345
  }, null, 8, ["title", "description", "actions"]),
330
346
  s("div", ve, [
331
- e(i) && e(i).length > 0 ? (m(), O(D, { key: 0 }, [
347
+ e(i) && e(i).length > 0 ? (d(), O(D, { key: 0 }, [
332
348
  s("div", Re, [
333
349
  o[6] || (o[6] = s("div", { class: "flex gap-8" }, null, -1)),
334
- d(u, {
350
+ c(u, {
335
351
  modelValue: e(a).searchKey,
336
352
  "onUpdate:modelValue": o[2] || (o[2] = (w) => e(a).searchKey = w),
337
353
  class: "",
@@ -339,41 +355,41 @@ const pe = {
339
355
  collapsible: ""
340
356
  }, null, 8, ["modelValue"])
341
357
  ]),
342
- d(C, {
358
+ c(C, {
343
359
  "row-data": e(i),
344
- "column-defs": x,
360
+ "column-defs": _,
345
361
  "search-value": e(a).searchKey,
346
362
  "column-filter": e(a).columnFilters,
347
- onRowClick: o[3] || (o[3] = (w) => _(w.original._id)),
363
+ onRowClick: o[3] || (o[3] = (w) => x(w.original._id)),
348
364
  "hide-footer": e(i).length < 10
349
365
  }, null, 8, ["row-data", "search-value", "column-filter", "hide-footer"])
350
- ], 64)) : (m(), b(k, {
366
+ ], 64)) : (d(), b(E, {
351
367
  key: 1,
352
368
  variant: "outlined",
353
369
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
354
370
  }, {
355
371
  default: S(() => [
356
372
  o[7] || (o[7] = s("img", {
357
- src: re,
373
+ src: J,
358
374
  class: "aspect-square w-[150px]"
359
375
  }, null, -1)),
360
376
  s("div", be, [
361
- s("div", xe, $(e(n)("connect.storeRewards.empty.title")), 1),
362
- s("div", _e, $(e(n)("connect.storeRewards.empty.description")), 1)
377
+ s("div", _e, $(e(n)("connect.storeRewards.empty.title")), 1),
378
+ s("div", xe, $(e(n)("connect.storeRewards.empty.description")), 1)
363
379
  ]),
364
- d(R, {
380
+ c(R, {
365
381
  variant: "primary",
366
382
  label: e(n)("connect.storeRewards.empty.action"),
367
- onClick: o[4] || (o[4] = (w) => _()),
383
+ onClick: o[4] || (o[4] = (w) => x()),
368
384
  icon: "add"
369
385
  }, null, 8, ["label"])
370
386
  ]),
371
387
  _: 1
372
388
  })),
373
- d(ge, {
389
+ c(ge, {
374
390
  ref_key: "rewardSheetRef",
375
- ref: r,
376
- onUpdate: o[5] || (o[5] = (w) => l(w))
391
+ ref: l,
392
+ onUpdate: o[5] || (o[5] = (w) => r(w))
377
393
  }, null, 512)
378
394
  ])
379
395
  ], 64);
@@ -381,5 +397,5 @@ const pe = {
381
397
  }
382
398
  });
383
399
  export {
384
- ke as default
400
+ Ke as default
385
401
  };