@feedmepos/mf-connect 0.0.8 → 0.0.9

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 (77) hide show
  1. package/dist/{Analytic-BxRuK2P2.js → Analytic-CwaN0mge.js} +68 -69
  2. package/dist/{Broadcast-BqGojAWW.js → Broadcast-Cjx5xzUC.js} +27 -28
  3. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B-VzcVMS.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D4mO5aik.js} +34 -34
  4. package/dist/Card-DbY6YaXk.js +827 -0
  5. package/dist/{Collections-DvdDRozp.js → Collections-DRN2gzwh.js} +158 -168
  6. package/dist/{Credit-BeHm7_2S.js → Credit-DOcrzykJ.js} +11 -12
  7. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BsbgHsah.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CUxfXaro.js} +359 -333
  8. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hwXvdiut.js → EffectSheet.vue_vue_type_style_index_0_lang-EF_rHfwT.js} +5 -5
  9. package/dist/{Experience-CtDY9u4Y.js → Experience-aQj-3H2Y.js} +11 -12
  10. package/dist/{Game-DjaYuqcb.js → Game-Cnje-m_M.js} +22 -23
  11. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-Bq5-Gl9N.js → ImageInput.vue_vue_type_script_setup_true_lang-CG-GBVMP.js} +8 -8
  12. package/dist/{MainLayout-B-iAZM2k.js → MainLayout-Cxl9yLPs.js} +1 -1
  13. package/dist/{Marketing-BJJltAh-.js → Marketing-BYUcbcMU.js} +19 -20
  14. package/dist/{Member-eJ9Pdi5w.js → Member-D7K9fm_Q.js} +2 -2
  15. package/dist/MemberList-DbXkxUzF.js +1717 -0
  16. package/dist/{MemberTransactions-DRET8mSQ.js → MemberTransactions-DED1SYwX.js} +4 -4
  17. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-CLqIp5wR.js +203 -0
  18. package/dist/{Point-DPTOgJbC.js → Point-CQm8whVQ.js} +11 -12
  19. package/dist/{Promotion-wzkRuNqO.js → Promotion-DzVXy_C9.js} +42 -44
  20. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Z06eB5i5.js → RuleGroup.vue_vue_type_script_setup_true_lang-CeS6KlhP.js} +12 -12
  21. package/dist/Segment-D3o0D3Uv.js +407 -0
  22. package/dist/{Setting-CXuZu0-m.js → Setting-pCzenLoL.js} +17 -18
  23. package/dist/{Store-4Um9keEp.js → Store-DEwEIFYD.js} +18 -19
  24. package/dist/{StoreRewards-B-UFeyQM.js → StoreRewards-D7vnZN4f.js} +86 -87
  25. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-ALzQU3th.js +793 -0
  26. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-I_XFpctY.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-GMIztWCj.js} +1 -1
  27. package/dist/{Tier-C6KVsxGO.js → Tier-BJbX5CPB.js} +401 -377
  28. package/dist/{Title-DuN1ahIM.js → Title-C9xV6rBg.js} +274 -248
  29. package/dist/Transaction-C8OHlhzR.js +36 -0
  30. package/dist/Voucher-eZwm7N1D.js +481 -0
  31. package/dist/{app-CxBTTB31.js → app-DgbDbhL-.js} +34 -34
  32. package/dist/app.js +1 -1
  33. package/dist/{campaign-B0aXkadj.js → campaign-BkvrUTEJ.js} +2 -2
  34. package/dist/{dto-BtdVC-Ab.js → dto-YYVhW73A.js} +52 -53
  35. package/dist/{effect-BUN6rkQM.js → effect-f7DAPYC8.js} +1 -1
  36. package/dist/export-BXbCXTfd.js +97 -0
  37. package/dist/{helper-Cpq3x8K5.js → helper-BhvQ9m6d.js} +1 -1
  38. package/dist/{index-D2Juhkdw.js → index-BhacKx5B.js} +85 -83
  39. package/dist/{index-DDSLx7vu.js → index-BsEqtUmY.js} +2 -2
  40. package/dist/{index-0GYrZr4L.js → index-CdtrQ9tR.js} +5 -5
  41. package/dist/{index-8clzk3uX.js → index-Cfo2A0Se.js} +1 -1
  42. package/dist/index-Cz5RZlYh.js +73 -0
  43. package/dist/{index-BTntbYTS.js → index-DQC_1tRF.js} +1 -1
  44. package/dist/{index-DysVCkrx.js → index-Dd3hrFcQ.js} +3 -3
  45. package/dist/{index-CK9yJMj7.js → index-FWp9M1yS.js} +5 -5
  46. package/dist/{index-C6NgUSl2.js → index-VmFlM704.js} +1 -1
  47. package/dist/{index-BvnZdJBY.js → index-oQLJE4Uw.js} +2 -2
  48. package/dist/libs/packages/core/src/collectible/collectible.dto.d.ts +6 -0
  49. package/dist/{plugins-B_d-WFtN.js → loading-DQaawbHE.js} +8204 -8108
  50. package/dist/{lodash-DsT1nK-T.js → lodash-DzdmTD20.js} +1 -1
  51. package/dist/{membership-DtD45RXh.js → membership-Dq2-b-S_.js} +3 -3
  52. package/dist/{money-CFI1TMCS.js → money-vzwOUBrp.js} +1 -1
  53. package/dist/{number-BBtf4fYz.js → number-CBzs6rfW.js} +1 -1
  54. package/dist/packages/connect/src/components/campaign/CampaignSummary.vue.d.ts +13 -0
  55. package/dist/packages/connect/src/composables/export.d.ts +11 -0
  56. package/dist/packages/connect/src/export/base.export.d.ts +7 -0
  57. package/dist/packages/connect/src/export/card.export.d.ts +5 -6
  58. package/dist/packages/connect/src/export/collection-transaction.export.d.ts +14 -0
  59. package/dist/packages/connect/src/export/index.d.ts +1 -0
  60. package/dist/packages/connect/src/export/store-transaction.export.d.ts +14 -0
  61. package/dist/packages/connect/src/helpers/user.d.ts +6 -0
  62. package/dist/{rule-CB9Qlcx1.js → rule-BR5rrmUV.js} +2 -2
  63. package/dist/{rule-builder-BIKcA4Bg.js → rule-builder-7GBNrPXt.js} +1 -1
  64. package/dist/{template-qlb46PGl.js → template-CETJ6lkf.js} +5 -5
  65. package/dist/{usePagination-CX66ab1Y.js → usePagination-DdZeE4Tt.js} +57 -56
  66. package/dist/user-Bm4KttFq.js +37 -0
  67. package/dist/{xlsx-DMaFso0k.js → xlsx-CDAKxZE_.js} +1 -1
  68. package/package.json +1 -1
  69. package/dist/Card-Dlj5jQp4.js +0 -792
  70. package/dist/MemberList-CrhMqUfJ.js +0 -1664
  71. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-D-ttMwn2.js +0 -166
  72. package/dist/Segment-DnsPrP7Q.js +0 -371
  73. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BAyotuXd.js +0 -660
  74. package/dist/Transaction-DdfX7Xfe.js +0 -34
  75. package/dist/Voucher-DarXrxZr.js +0 -454
  76. package/dist/index-Dg-PMgXV.js +0 -64
  77. package/dist/loading-Cxp7sI5p.js +0 -100
@@ -1,25 +1,24 @@
1
1
  var Z = Object.defineProperty;
2
- var ee = (b, s, u) => s in b ? Z(b, s, { enumerable: !0, configurable: !0, writable: !0, value: u }) : b[s] = u;
3
- var z = (b, s, u) => ee(b, typeof s != "symbol" ? s + "" : s, u);
4
- import { defineComponent as j, ref as g, computed as G, watch as oe, resolveComponent as m, openBlock as h, createBlock as L, unref as e, isRef as O, withCtx as N, createElementVNode as f, createVNode as r, createElementBlock as U, Fragment as P, renderList as te, createCommentVNode as B, onMounted as ae, h as M } from "vue";
5
- import { h as K } from "./moment-BWErdI6_.js";
6
- import { u as le, b as ne } from "./app-CxBTTB31.js";
7
- import { components as se } from "@feedmepos/ui-library";
8
- import "./plugins-B_d-WFtN.js";
9
- import { u as H } from "./loading-Cxp7sI5p.js";
10
- import { useRoute as Q } from "vue-router";
11
- import { c as A } from "./index-BTntbYTS.js";
12
- import { u as T, w as re } from "./xlsx-DMaFso0k.js";
13
- import { u as ie, _ as de } from "./usePagination-CX66ab1Y.js";
14
- import { m as ue } from "./index-C6NgUSl2.js";
2
+ var ee = (b, r, d) => r in b ? Z(b, r, { enumerable: !0, configurable: !0, writable: !0, value: d }) : b[r] = d;
3
+ var $ = (b, r, d) => ee(b, typeof r != "symbol" ? r + "" : r, d);
4
+ import { defineComponent as K, ref as g, computed as G, watch as O, resolveComponent as c, openBlock as v, createBlock as L, unref as e, isRef as z, withCtx as U, createElementVNode as h, createVNode as s, createElementBlock as P, Fragment as N, renderList as oe, createCommentVNode as I, onMounted as te } from "vue";
5
+ import { h as j } from "./moment-BWErdI6_.js";
6
+ import { u as ae, J as le, R as ne } from "./app-DgbDbhL-.js";
7
+ import { u as H } from "./loading-DQaawbHE.js";
8
+ import { useRoute as J } from "vue-router";
9
+ import { c as E } from "./index-DQC_1tRF.js";
10
+ import { u as T, w as se } from "./xlsx-CDAKxZE_.js";
11
+ import { g as re } from "./user-Bm4KttFq.js";
12
+ import { u as ie, _ as ue } from "./usePagination-DdZeE4Tt.js";
13
+ import { m as de } from "./index-VmFlM704.js";
15
14
  import { o as ce } from "./objectId-dwaoBfJX.js";
16
- const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1), pe = { class: "space-y-16" }, fe = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Settings", -1), ge = { class: "gap-16 grid grid-cols-2" }, be = { class: "flex items-center gap-8" }, Ce = /* @__PURE__ */ j({
15
+ const me = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1), pe = { class: "space-y-16" }, fe = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Settings", -1), ge = { class: "gap-16 grid grid-cols-2" }, be = { class: "flex items-center gap-8" }, Ce = /* @__PURE__ */ K({
17
16
  __name: "CreateCollectionSheet",
18
17
  emits: ["success"],
19
- setup(b, { expose: s, emit: u }) {
20
- const { minor: F } = H, I = Q(), R = g(), _ = g(!1), E = u, C = g(!1);
21
- function c(i) {
22
- C.value = i, i && (l.value = {
18
+ setup(b, { expose: r, emit: d }) {
19
+ const { minor: F } = H, B = J(), R = g(), k = g(!1), q = d, C = g(!1);
20
+ function m(i) {
21
+ C.value = i, i && (a.value = {
23
22
  quantity: 1,
24
23
  code: "",
25
24
  codeConfig: {
@@ -31,7 +30,7 @@ const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code t
31
30
  }
32
31
  });
33
32
  }
34
- const l = g({
33
+ const a = g({
35
34
  quantity: 1,
36
35
  code: "",
37
36
  codeConfig: {
@@ -41,7 +40,7 @@ const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code t
41
40
  suffix: "",
42
41
  pattern: "########"
43
42
  }
44
- }), q = [
43
+ }), A = [
45
44
  {
46
45
  label: "Bulk codes",
47
46
  value: "bulk",
@@ -52,7 +51,7 @@ const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code t
52
51
  value: "single",
53
52
  sublabel: "Enter your own custom codes"
54
53
  }
55
- ], v = [
54
+ ], y = [
56
55
  {
57
56
  label: "Alphanumeric",
58
57
  value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
@@ -65,12 +64,12 @@ const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code t
65
64
  { label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
66
65
  { label: "Numbers", value: "0123456789" },
67
66
  { label: "Custom", value: "" }
68
- ], x = g(v[0].value), y = g("bulk"), V = g(!1), n = G(() => I.params.id);
69
- async function a(i) {
67
+ ], x = g(y[0].value), f = g("bulk"), V = g(!1), n = G(() => B.params.id);
68
+ async function l(i) {
70
69
  var o;
71
- await ((o = R.value) == null ? void 0 : o.validateInputs()), _.value && await F(
70
+ await ((o = R.value) == null ? void 0 : o.validateInputs()), k.value && await F(
72
71
  async () => {
73
- await A.createCollectionByCampaignId(n.value, i), await E("success");
72
+ await E.createCollectionByCampaignId(n.value, i), await q("success");
74
73
  },
75
74
  {
76
75
  message: "Creating claim(s)",
@@ -78,33 +77,38 @@ const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code t
78
77
  }
79
78
  );
80
79
  }
81
- return s({
82
- showSheet: c
83
- }), oe(
84
- () => l.value.codeConfig.length,
80
+ return r({
81
+ showSheet: m
82
+ }), O(
83
+ () => f.value,
85
84
  (i, o) => {
86
- i != o && (l.value.codeConfig.pattern = "#".repeat(Number(i)));
85
+ o != i && (a.value.code = "", a.value.codeConfig.length = 8, a.value.codeConfig.charset = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", a.value.codeConfig.prefix = "", a.value.codeConfig.suffix = "", a.value.codeConfig.pattern = "########");
86
+ }
87
+ ), O(
88
+ () => a.value.codeConfig.length,
89
+ (i, o) => {
90
+ i != o && (a.value.codeConfig.pattern = "#".repeat(Math.min(16, Number(i))));
87
91
  }
88
92
  ), (i, o) => {
89
- const d = m("FmRadio"), S = m("FmRadioGroup"), $ = m("FmSwitch"), w = m("FmStepperField"), D = m("FmSelect"), k = m("FmTextField"), W = m("FmTextarea"), J = m("FmForm"), Y = m("FmButton"), X = m("FmSideSheet");
90
- return h(), L(X, {
93
+ const u = c("FmRadio"), S = c("FmRadioGroup"), M = c("FmSwitch"), w = c("FmStepperField"), D = c("FmSelect"), _ = c("FmTextField"), Q = c("FmTextarea"), W = c("FmForm"), Y = c("FmButton"), X = c("FmSideSheet");
94
+ return v(), L(X, {
91
95
  "max-width": 560,
92
96
  "dismiss-away": !0,
93
97
  header: "Create collection",
94
98
  modelValue: e(C),
95
99
  "onUpdate:modelValue": [
96
- o[14] || (o[14] = (t) => O(C) ? C.value = t : null),
100
+ o[14] || (o[14] = (t) => z(C) ? C.value = t : null),
97
101
  o[15] || (o[15] = (t) => C.value = t)
98
102
  ]
99
103
  }, {
100
- "side-sheet-footer": N(() => [
101
- f("div", be, [
102
- r(Y, {
104
+ "side-sheet-footer": U(() => [
105
+ h("div", be, [
106
+ s(Y, {
103
107
  label: "Save",
104
- onClick: o[12] || (o[12] = (t) => a(e(l))),
105
- loading: e(le)().isLoading
108
+ onClick: o[12] || (o[12] = (t) => l(e(a))),
109
+ loading: e(ae)().isLoading
106
110
  }, null, 8, ["loading"]),
107
- r(Y, {
111
+ s(Y, {
108
112
  label: "Cancel",
109
113
  type: "button",
110
114
  variant: "tertiary",
@@ -112,24 +116,25 @@ const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code t
112
116
  })
113
117
  ])
114
118
  ]),
115
- default: N(() => [
116
- r(J, {
119
+ default: U(() => [
120
+ s(le, { json: e(a) }, null, 8, ["json"]),
121
+ s(W, {
117
122
  ref_key: "form",
118
123
  ref: R,
119
124
  class: "space-y-40",
120
- onValidationSuccess: o[10] || (o[10] = (t) => _.value = !0),
121
- onValidationFailed: o[11] || (o[11] = (t) => _.value = !1)
125
+ onValidationSuccess: o[10] || (o[10] = (t) => k.value = !0),
126
+ onValidationFailed: o[11] || (o[11] = (t) => k.value = !1)
122
127
  }, {
123
- default: N(() => [
124
- f("div", null, [
128
+ default: U(() => [
129
+ h("div", null, [
125
130
  me,
126
- r(S, {
127
- modelValue: e(y),
128
- "onUpdate:modelValue": o[0] || (o[0] = (t) => O(y) ? y.value = t : null),
131
+ s(S, {
132
+ modelValue: e(f),
133
+ "onUpdate:modelValue": o[0] || (o[0] = (t) => z(f) ? f.value = t : null),
129
134
  inline: !1
130
135
  }, {
131
- default: N(() => [
132
- (h(), U(P, null, te(q, (t) => r(d, {
136
+ default: U(() => [
137
+ (v(), P(N, null, oe(A, (t) => s(u, {
133
138
  key: t.value,
134
139
  value: t.value,
135
140
  label: t.label,
@@ -139,10 +144,10 @@ const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code t
139
144
  _: 1
140
145
  }, 8, ["modelValue"])
141
146
  ]),
142
- f("div", pe, [
147
+ h("div", pe, [
143
148
  fe,
144
- e(y) === "bulk" ? (h(), U(P, { key: 0 }, [
145
- r($, {
149
+ e(f) === "bulk" ? (v(), P(N, { key: 0 }, [
150
+ s(M, {
146
151
  "model-value": e(V),
147
152
  "label-placement": "right",
148
153
  value: "true",
@@ -150,69 +155,74 @@ const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code t
150
155
  required: !0,
151
156
  "onUpdate:modelValue": o[1] || (o[1] = () => V.value = !e(V))
152
157
  }, null, 8, ["model-value"]),
153
- e(V) ? (h(), U(P, { key: 0 }, [
154
- r(w, {
155
- modelValue: e(l).codeConfig.length,
156
- "onUpdate:modelValue": o[2] || (o[2] = (t) => e(l).codeConfig.length = t),
158
+ e(V) ? (v(), P(N, { key: 0 }, [
159
+ s(w, {
160
+ modelValue: e(a).codeConfig.length,
161
+ "onUpdate:modelValue": o[2] || (o[2] = (t) => e(a).codeConfig.length = t),
157
162
  label: "Code length",
158
- rules: [(t) => Number(t) >= 1 || "Code length must at least 1"],
163
+ max: 16,
164
+ min: 1,
165
+ rules: [
166
+ (t) => Number(t) >= 1 || "Code length must at least 1",
167
+ (t) => Number(t) <= 16 || "Code length must less than 16"
168
+ ],
159
169
  required: !0
160
170
  }, null, 8, ["modelValue", "rules"]),
161
- r(D, {
171
+ s(D, {
162
172
  label: "Charset",
163
173
  "model-value": e(x),
164
- items: v,
165
- "helper-text": e(l).codeConfig.charset.length > 62 ? `${e(l).codeConfig.charset.substring(0, 62)}...` : e(l).codeConfig.charset,
174
+ items: y,
175
+ "helper-text": e(a).codeConfig.charset.length > 62 ? `${e(a).codeConfig.charset.substring(0, 62)}...` : e(a).codeConfig.charset,
166
176
  "onUpdate:modelValue": o[3] || (o[3] = (t) => {
167
- x.value = t, e(l).codeConfig.charset = t;
177
+ x.value = t, e(a).codeConfig.charset = t;
168
178
  })
169
179
  }, null, 8, ["model-value", "helper-text"]),
170
- e(x) === "" ? (h(), L(k, {
180
+ e(x) === "" ? (v(), L(_, {
171
181
  key: 0,
172
- modelValue: e(l).codeConfig.charset,
173
- "onUpdate:modelValue": o[4] || (o[4] = (t) => e(l).codeConfig.charset = t),
182
+ modelValue: e(a).codeConfig.charset,
183
+ "onUpdate:modelValue": o[4] || (o[4] = (t) => e(a).codeConfig.charset = t),
174
184
  label: "Custom Charset",
175
185
  required: ""
176
- }, null, 8, ["modelValue"])) : B("", !0),
177
- f("div", ge, [
178
- r(k, {
179
- modelValue: e(l).codeConfig.prefix,
180
- "onUpdate:modelValue": o[5] || (o[5] = (t) => e(l).codeConfig.prefix = t),
186
+ }, null, 8, ["modelValue"])) : I("", !0),
187
+ h("div", ge, [
188
+ s(_, {
189
+ modelValue: e(a).codeConfig.prefix,
190
+ "onUpdate:modelValue": o[5] || (o[5] = (t) => e(a).codeConfig.prefix = t),
181
191
  label: "Prefix (Optional)"
182
192
  }, null, 8, ["modelValue"]),
183
- r(k, {
184
- modelValue: e(l).codeConfig.suffix,
185
- "onUpdate:modelValue": o[6] || (o[6] = (t) => e(l).codeConfig.suffix = t),
193
+ s(_, {
194
+ modelValue: e(a).codeConfig.suffix,
195
+ "onUpdate:modelValue": o[6] || (o[6] = (t) => e(a).codeConfig.suffix = t),
186
196
  label: "Suffix (Optional)"
187
197
  }, null, 8, ["modelValue"])
188
198
  ]),
189
- r(k, {
190
- modelValue: e(l).codeConfig.pattern,
191
- "onUpdate:modelValue": o[7] || (o[7] = (t) => e(l).codeConfig.pattern = t),
199
+ s(_, {
200
+ modelValue: e(a).codeConfig.pattern,
201
+ "onUpdate:modelValue": o[7] || (o[7] = (t) => e(a).codeConfig.pattern = t),
192
202
  label: "Pattern",
193
203
  required: !0
194
204
  }, null, 8, ["modelValue"])
195
- ], 64)) : B("", !0),
196
- r(k, {
197
- modelValue: e(l).quantity,
198
- "onUpdate:modelValue": o[8] || (o[8] = (t) => e(l).quantity = t),
205
+ ], 64)) : I("", !0),
206
+ s(_, {
207
+ modelValue: e(a).quantity,
208
+ "onUpdate:modelValue": o[8] || (o[8] = (t) => e(a).quantity = t),
199
209
  label: "Number of code",
200
210
  rules: [
201
211
  (t) => t >= 1 || "Quantity cannot be less than 1",
202
212
  (t) => t <= 1e4 || "Quantity cannot more than 10,000"
203
213
  ],
204
214
  required: !0,
205
- "helper-text": `${e(l).quantity} claim will be created`
215
+ "helper-text": `${e(a).quantity} claim will be created`
206
216
  }, null, 8, ["modelValue", "rules", "helper-text"])
207
- ], 64)) : B("", !0),
208
- e(y) !== "bulk" ? (h(), L(W, {
217
+ ], 64)) : I("", !0),
218
+ e(f) !== "bulk" ? (v(), L(Q, {
209
219
  key: 1,
210
- modelValue: e(l).code,
211
- "onUpdate:modelValue": o[9] || (o[9] = (t) => e(l).code = t),
220
+ modelValue: e(a).code,
221
+ "onUpdate:modelValue": o[9] || (o[9] = (t) => e(a).code = t),
212
222
  label: "Custom Code",
213
- rules: [(t) => e(y) != "single" || !!t || "Custom code is required"],
223
+ rules: [(t) => e(f) != "single" || !!t || "Custom code is required"],
214
224
  placeholder: "(For multiple codes, please enter in the new row.)"
215
- }, null, 8, ["modelValue", "rules"])) : B("", !0)
225
+ }, null, 8, ["modelValue", "rules"])) : I("", !0)
216
226
  ])
217
227
  ]),
218
228
  _: 1
@@ -223,16 +233,16 @@ const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code t
223
233
  };
224
234
  }
225
235
  });
226
- class ye {
236
+ class he {
227
237
  constructor() {
228
- z(this, "data", []);
238
+ $(this, "data", []);
229
239
  }
230
- addRecord(s) {
231
- this.data.push(s);
240
+ addRecord(r) {
241
+ this.data.push(r);
232
242
  }
233
243
  buildExcel() {
234
- const s = T.book_new(), u = T.json_to_sheet(this.data);
235
- return T.book_append_sheet(s, u, "Collection"), s;
244
+ const r = T.book_new(), d = T.json_to_sheet(this.data);
245
+ return T.book_append_sheet(r, d, "Collection"), r;
236
246
  }
237
247
  }
238
248
  const p = {
@@ -241,16 +251,10 @@ const p = {
241
251
  rowsPerPage: 1e3,
242
252
  page: 1,
243
253
  rowsNumber: 0
244
- }, he = { class: "px-24 flex flex-col gap-y-32 pb-24" }, ve = { class: "flex items-center justify-end py-4 xs:hidden" }, xe = {
245
- key: 0,
246
- class: "w-full flex flex-col gap-16 items-center pt-16"
247
- }, Ve = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "No data found", -1), Se = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " No data to show at the current moment. ", -1), we = [
248
- Ve,
249
- Se
250
- ], De = /* @__PURE__ */ j({
254
+ }, ve = { class: "px-24 flex flex-col gap-y-32 pb-24" }, ye = { class: "flex items-center justify-end py-4 xs:hidden" }, Ne = /* @__PURE__ */ K({
251
255
  __name: "Collections",
252
256
  setup(b) {
253
- const s = Q(), u = g(), F = G(() => s.params.id), I = g(!1), { custom: R } = H, _ = [
257
+ const r = J(), d = g(), F = G(() => r.params.id), B = g(!1), { custom: R } = H, k = [
254
258
  {
255
259
  header: "ID/Code",
256
260
  accessorFn: (n) => n.code || n._id
@@ -260,28 +264,15 @@ const p = {
260
264
  accessorKey: "user",
261
265
  enableSorting: !1,
262
266
  cell(n) {
263
- const a = n.row.original.pf_user;
264
- return M(
265
- "div",
266
- {
267
- class: "flex items-center gap-x-8"
268
- },
269
- [
270
- M(se.FmAvatar, {
271
- name: a != null && a.photoUrl || a == null ? void 0 : a.name,
272
- src: (a == null ? void 0 : a.photoUrl) ?? void 0,
273
- size: "sm"
274
- }),
275
- M("span", a == null ? void 0 : a.name)
276
- ]
277
- );
267
+ const l = n.row.original.pf_user;
268
+ return re(l);
278
269
  }
279
270
  },
280
271
  {
281
272
  header: "Phone",
282
273
  accessorFn: (n) => {
283
- var a;
284
- return ((a = n.pf_user) == null ? void 0 : a.phoneNumber) || "-";
274
+ var l;
275
+ return ((l = n.pf_user) == null ? void 0 : l.phoneNumber) || "-";
285
276
  },
286
277
  accessorKey: "pf_user.phoneNumber"
287
278
  },
@@ -292,52 +283,52 @@ const p = {
292
283
  {
293
284
  header: "Created at",
294
285
  accessorKey: "_id",
295
- accessorFn: (n) => K(ce(n._id.toString())).format("DD MMM YYYY")
286
+ accessorFn: (n) => j(ce(n._id.toString())).format("DD MMM YYYY")
296
287
  },
297
288
  {
298
289
  header: "Nearest expired at",
299
290
  accessorKey: "expiryBalance",
300
291
  accessorFn: (n) => {
301
- var a;
302
- return n.expiryBalance && n.expiryBalance.length ? K((a = n.expiryBalance) == null ? void 0 : a[0].expiredAt).format("DD MMM YYYY") : "Never expires";
292
+ var l;
293
+ return n.expiryBalance && n.expiryBalance.length ? j((l = n.expiryBalance) == null ? void 0 : l[0].expiredAt).format("DD MMM YYYY") : "Never expires";
303
294
  }
304
295
  }
305
- ], E = {
306
- "$connect-STORE_REWARD_COLLECTIONS": ue.readCollectionsByRewardId,
307
- "$connect-CAMPAIGN_VOUCHER_COLLECTIONS": A.readCollectionsByCampaignId
296
+ ], q = {
297
+ "$connect-STORE_REWARD_COLLECTIONS": de.readCollectionsByRewardId,
298
+ "$connect-CAMPAIGN_VOUCHER_COLLECTIONS": E.readCollectionsByCampaignId
308
299
  }, C = (n) => {
309
- const a = E[s.name];
310
- return (i) => a(n, i);
311
- }, { tableMeta: c, rowData: l, onSort: q, debouncedFetchData: v, onSearch: x } = ie(C(F.value), {
300
+ const l = q[r.name];
301
+ return (i) => l(n, i);
302
+ }, { tableMeta: m, rowData: a, onSort: A, debouncedFetchData: y, onSearch: x } = ie(C(F.value), {
312
303
  key: "_id",
313
304
  descending: !1
314
305
  });
315
- async function y() {
306
+ async function f() {
316
307
  var n;
317
- await v(), (n = u.value) == null || n.showSheet(!1);
308
+ await y(), (n = d.value) == null || n.showSheet(!1);
318
309
  }
319
310
  async function V() {
320
- I.value || R(
311
+ B.value || R(
321
312
  async () => {
322
313
  var o;
323
- const n = new ye(), a = (await A.readCollectionsByCampaignId(F.value, {
314
+ const n = new he(), l = (await E.readCollectionsByCampaignId(F.value, {
324
315
  limit: 1,
325
316
  skip: 0,
326
317
  sortBy: p.sortBy,
327
318
  descending: p.descending
328
319
  })).meta.totalResources ?? 0, i = p.rowsPerPage;
329
- for (let d = 0; d < a; d += i) {
320
+ for (let u = 0; u < l; u += i) {
330
321
  const S = {
331
322
  ...p,
332
323
  limit: i,
333
324
  skip: (p.page - 1) * p.rowsPerPage,
334
325
  sortBy: p.sortBy,
335
326
  descending: p.descending
336
- }, $ = await A.readCollectionsByCampaignId(
327
+ }, M = await E.readCollectionsByCampaignId(
337
328
  F.value,
338
329
  S
339
330
  );
340
- for await (const w of $.resources) {
331
+ for await (const w of M.resources) {
341
332
  const D = {
342
333
  Id: (w == null ? void 0 : w.code) || ((o = w._id) == null ? void 0 : o.toString()) || ""
343
334
  };
@@ -345,7 +336,7 @@ const p = {
345
336
  }
346
337
  p.page++;
347
338
  }
348
- await re(
339
+ await se(
349
340
  n.buildExcel(),
350
341
  `members-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
351
342
  {
@@ -356,16 +347,16 @@ const p = {
356
347
  ), p.page = 1;
357
348
  },
358
349
  {
359
- isLoading: I
350
+ isLoading: B
360
351
  }
361
352
  );
362
353
  }
363
- return ae(async () => {
364
- await v();
365
- }), (n, a) => {
366
- const i = m("FmPageHead"), o = m("FmSearch");
367
- return h(), U(P, null, [
368
- r(i, {
354
+ return te(async () => {
355
+ await y();
356
+ }), (n, l) => {
357
+ const i = c("FmPageHead"), o = c("FmSearch");
358
+ return v(), P(N, null, [
359
+ s(i, {
369
360
  title: "Collections",
370
361
  "back-button": !0,
371
362
  actions: [
@@ -376,51 +367,50 @@ const p = {
376
367
  isPrimary: !0
377
368
  }
378
369
  ],
379
- "onClick:back": a[0] || (a[0] = (d) => e(ne).back()),
380
- "onClick:action": a[1] || (a[1] = (d) => {
370
+ "onClick:back": l[0] || (l[0] = (u) => e(ne).back()),
371
+ "onClick:action": l[1] || (l[1] = (u) => {
381
372
  var S;
382
- d === "create" && ((S = e(u)) == null || S.showSheet(!0)), d === "export" && V();
373
+ u === "create" && ((S = e(d)) == null || S.showSheet(!0)), u === "export" && V();
383
374
  })
384
375
  }),
385
- f("div", he, [
386
- r(o, {
376
+ h("div", ve, [
377
+ s(o, {
387
378
  class: "hidden xs:flex border-b border-fm-color-neutral-gray-100",
388
- modelValue: e(c).searchValue,
379
+ modelValue: e(m).searchValue,
389
380
  "onUpdate:modelValue": [
390
- a[2] || (a[2] = (d) => e(c).searchValue = d),
381
+ l[2] || (l[2] = (u) => e(m).searchValue = u),
391
382
  e(x)
392
383
  ],
393
384
  placeholder: "Search",
394
385
  collapsible: ""
395
386
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
396
- f("div", ve, [
397
- r(o, {
398
- modelValue: e(c).searchValue,
387
+ h("div", ye, [
388
+ s(o, {
389
+ modelValue: e(m).searchValue,
399
390
  "onUpdate:modelValue": [
400
- a[3] || (a[3] = (d) => e(c).searchValue = d),
391
+ l[3] || (l[3] = (u) => e(m).searchValue = u),
401
392
  e(x)
402
393
  ],
403
394
  placeholder: "Search",
404
395
  collapsible: ""
405
396
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
406
397
  ]),
407
- r(de, {
408
- loading: e(c).isLoading,
409
- "row-data": e(l),
410
- "column-defs": _,
411
- "row-count": e(c).totalRows,
412
- "page-count": e(c).pageCount,
413
- "page-index": e(c).pageIndex,
414
- "page-size": e(c).pageSize,
398
+ s(ue, {
399
+ loading: e(m).isLoading,
400
+ "row-data": e(a),
401
+ "column-defs": k,
402
+ "row-count": e(m).totalRows,
403
+ "page-count": e(m).pageCount,
404
+ "page-index": e(m).pageIndex,
405
+ "page-size": e(m).pageSize,
415
406
  "shrink-at": !1,
416
- onSortChange: e(q),
417
- onPageChange: a[4] || (a[4] = (d) => e(v)({ pageSize: d.pageSize, pageIndex: d.pageIndex }))
407
+ onSortChange: e(A),
408
+ onPageChange: l[4] || (l[4] = (u) => e(y)({ pageSize: u.pageSize, pageIndex: u.pageIndex }))
418
409
  }, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
419
- e(l).length == 0 && !e(c).isLoading ? (h(), U("div", xe, we)) : B("", !0),
420
- r(Ce, {
410
+ s(Ce, {
421
411
  ref_key: "sheetRef",
422
- ref: u,
423
- onSuccess: y
412
+ ref: d,
413
+ onSuccess: f
424
414
  }, null, 512)
425
415
  ])
426
416
  ], 64);
@@ -428,5 +418,5 @@ const p = {
428
418
  }
429
419
  });
430
420
  export {
431
- De as default
421
+ Ne as default
432
422
  };
@@ -1,15 +1,14 @@
1
1
  import { defineComponent as U, ref as k, computed as A, onMounted as N, resolveComponent as i, openBlock as l, createElementBlock as f, Fragment as g, createVNode as r, unref as o, createElementVNode as s, withCtx as h, renderList as j, createBlock as C, resolveDynamicComponent as M, toDisplayString as y, createCommentVNode as H, h as q } from "vue";
2
2
  import { _ as z } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as G, components as J } from "@feedmepos/ui-library";
4
- import { p as O } from "./plugins-B_d-WFtN.js";
5
- import { u as Q } from "./loading-Cxp7sI5p.js";
6
- import { a as W } from "./app-CxBTTB31.js";
7
- import { u as X } from "./campaign-B0aXkadj.js";
8
- import { g as S, b as V } from "./dto-BtdVC-Ab.js";
4
+ import { u as O, p as Q } from "./loading-DQaawbHE.js";
5
+ import { a as W } from "./app-DgbDbhL-.js";
6
+ import { u as X } from "./campaign-BkvrUTEJ.js";
7
+ import { g as S, b as V } from "./dto-YYVhW73A.js";
9
8
  import { _ as Y } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
10
- import { _ as Z } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BsbgHsah.js";
11
- import { u as ee } from "./template-qlb46PGl.js";
12
- import { c as _ } from "./index-BTntbYTS.js";
9
+ import { _ as Z } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-CUxfXaro.js";
10
+ import { u as ee } from "./template-CETJ6lkf.js";
11
+ import { c as _ } from "./index-DQC_1tRF.js";
13
12
  const te = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-center justify-between w-full" }, ae = { class: "flex gap-8 overflow-x-auto" }, se = { class: "space-y-8" }, ne = { class: "flex w-full gap-4 items-center" }, re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ie = { class: "space-y-4" }, le = { class: "fm-typo-en-body-lg-600" }, ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { key: 0 }, ue = /* @__PURE__ */ s("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1), pe = [
14
13
  ue
15
14
  ], fe = /* @__PURE__ */ s("img", {
@@ -18,7 +17,7 @@ const te = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
18
17
  }, null, -1), ye = /* @__PURE__ */ s("div", { class: "flex flex-col gap-16 text-center" }, [
19
18
  /* @__PURE__ */ s("div", { class: "fm-typo-en-title-sm-800" }, "Create your credit program"),
20
19
  /* @__PURE__ */ s("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credits are virtual money that customers can use to pay for their purchases, similar to cash within your store. ")
21
- ], -1), Le = /* @__PURE__ */ U({
20
+ ], -1), Re = /* @__PURE__ */ U({
22
21
  __name: "Credit",
23
22
  setup(_e) {
24
23
  const R = {
@@ -26,7 +25,7 @@ const te = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
26
25
  value: "create",
27
26
  isPrimary: !0,
28
27
  prependIcon: "add"
29
- }, L = ee("CREDIT", G()), I = W(), c = X(), { global: B, minor: w } = Q, n = k({
28
+ }, L = ee("CREDIT", G()), I = W(), c = X(), { global: B, minor: w } = O, n = k({
30
29
  searchKey: "",
31
30
  location: null
32
31
  }), m = A(
@@ -64,7 +63,7 @@ const te = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
64
63
  }
65
64
  ], v = k();
66
65
  async function x(e) {
67
- await O.remove(`Are you sure you want to remove ${e.name}?`) && await w(
66
+ await Q.remove(`Are you sure you want to remove ${e.name}?`) && await w(
68
67
  async () => {
69
68
  await _.delete(e._id), await c.read("CREDIT");
70
69
  },
@@ -211,5 +210,5 @@ const te = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
211
210
  }
212
211
  });
213
212
  export {
214
- Le as default
213
+ Re as default
215
214
  };