@feedmepos/mf-connect 0.1.63-prod → 0.1.65-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 (92) hide show
  1. package/dist/{Analytic-CG3hA6fW.js → Analytic-C5DE9NQJ.js} +27 -28
  2. package/dist/{App-CQUFVNES.js → App-DgEd6GLa.js} +7 -7
  3. package/dist/{Bin-whBityJo.js → Bin-DyWpGeoP.js} +8 -8
  4. package/dist/{Broadcast-BRgmIWF2.js → Broadcast-eqjJulx4.js} +10 -11
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DfATb_0G.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BfgttR2V.js} +6 -6
  6. package/dist/{Card-BgIT9bSV.js → Card-hFexO-iT.js} +16 -16
  7. package/dist/{Collections-DgBll2HL.js → Collections-BtBugjnH.js} +179 -165
  8. package/dist/{Credit-FVqQqTve.js → Credit-98wQjJxS.js} +10 -11
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CIApefkS.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-IrMeqHYK.js} +31 -31
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CVRvxR02.js → EffectSheet.vue_vue_type_style_index_0_lang-QM5-F282.js} +6 -6
  11. package/dist/{Experience-C23g_MfA.js → Experience-eVl9fAYr.js} +27 -28
  12. package/dist/{Game-CqbQTIqS.js → Game-C1oQthuo.js} +11 -12
  13. package/dist/{Index-D32I90Uf.js → Index-BACzirfP.js} +10 -10
  14. package/dist/{Marketing-ApmF9GMZ.js → Marketing-BOuh3JQF.js} +6 -6
  15. package/dist/{Member-p-MDnwdo.js → Member-DHcw5SAF.js} +10 -10
  16. package/dist/{MemberList-CWS216Oq.js → MemberList-BNVIjVXb.js} +25 -25
  17. package/dist/{MemberTransactions-1NaCYExP.js → MemberTransactions-DMpNrtT4.js} +1 -1
  18. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Ds28eMF3.js → MessageInput.vue_vue_type_script_setup_true_lang-MYkwax61.js} +7 -7
  19. package/dist/{Mission-D2EklQ6k.js → Mission-O9thc-xh.js} +19 -20
  20. package/dist/{Overview-Q2_jChHL.js → Overview-DYDTEJpf.js} +18 -18
  21. package/dist/{Point-D7IFoiQ5.js → Point-AoMfVDyc.js} +10 -11
  22. package/dist/{Promotion-BMKAj_VJ.js → Promotion-Bdmmnd5n.js} +11 -12
  23. package/dist/{Queue-CckukUf2.js → Queue-C59v4zpR.js} +10 -10
  24. package/dist/{Record-sjJx9Rxr.js → Record-DJimfMy6.js} +8 -8
  25. package/dist/{Reward-C33_2GAs.js → Reward-DoRA5oe0.js} +15 -15
  26. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-4Ah1HGJW.js → RewardGroup.vue_vue_type_script_setup_true_lang-ys_Vh6MC.js} +11 -11
  27. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CpDZBVmB.js → RuleGroup.vue_vue_type_script_setup_true_lang-ClQbIu9q.js} +13 -13
  28. package/dist/{Segment-CR4_Y82e.js → Segment-B1bvEg9R.js} +22 -22
  29. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CDZw5i96.js → SelectItems.vue_vue_type_script_setup_true_lang-BKdjRWtr.js} +2 -2
  30. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-pW_AdLpP.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CDOOVRwr.js} +11 -11
  31. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BS62Yf0v.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CvZRK_DV.js} +3 -3
  32. package/dist/{Setting-D4RTLzZM.js → Setting-puwRxs7w.js} +12 -12
  33. package/dist/{SettingAdvertisements-Cc9IMI41.js → SettingAdvertisements-D0e9lyCy.js} +65 -63
  34. package/dist/Store-BSbLeEpY.js +1924 -0
  35. package/dist/{StoreRewards-CzrZS5Au.js → StoreRewards-DDtlg3wU.js} +13 -13
  36. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Ci3xQrAn.js → StoreTransactions.vue_vue_type_script_setup_true_lang-xWPIvf68.js} +361 -343
  37. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DG7dPhv0.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-6gvUWrB_.js} +1 -1
  38. package/dist/{Tier-9-iKsHxM.js → Tier-C3ZY5wI7.js} +97 -98
  39. package/dist/{Title-C6TY3BbS.js → Title-D9FHvMc0.js} +27 -28
  40. package/dist/{Transaction-BGxgNf0y.js → Transaction-hopVsT0g.js} +2 -2
  41. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-xiH9sxVn.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CsL3d7xM.js} +6 -6
  42. package/dist/{Voucher-Cdh0PqeF.js → Voucher-D1WfKPnA.js} +132 -117
  43. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BRw2nedI.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BCorf-T-.js} +10 -10
  44. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-D6En5sRQ.js → ZodTextField.vue_vue_type_script_setup_true_lang-fp4U_C6t.js} +1 -1
  45. package/dist/{app-DIFcDSPz.js → app-BOEkcROx.js} +1 -1
  46. package/dist/{app-qOoNoXsj.js → app-VcIY7uz8.js} +496 -454
  47. package/dist/app.js +1 -1
  48. package/dist/{business-D8WOIwU3.js → business-CxrnbBG7.js} +1 -1
  49. package/dist/{campaign-B5Zcg5dG.js → campaign-DOOGvk7s.js} +9 -9
  50. package/dist/campaign-OdVtlvIh.js +213 -0
  51. package/dist/{campaign.enum-BVGqtpbT.js → campaign.enum-jzknDWsU.js} +1 -1
  52. package/dist/{campaign.fn-BJksX0lC.js → campaign.fn-C8KE-0gy.js} +40 -40
  53. package/dist/{collectible.enum-CDt5sCg-.js → collectible.enum-GH2dIJq0.js} +1 -1
  54. package/dist/{collection.fn-BmkwrIEt.js → collection.fn-BAhwf5Jh.js} +2 -2
  55. package/dist/{dto-BazhL1Wz.js → dto-B7m1l1UL.js} +4 -4
  56. package/dist/{effect-CERxlyga.js → effect-Cu0scI-k.js} +1 -1
  57. package/dist/{email-addresses-XWcL2s8u.js → email-addresses-C0c1x8Vz.js} +1 -1
  58. package/dist/{export-Ctk6xkHX.js → export-BR2VkJmz.js} +3 -3
  59. package/dist/{helper-C36sBB0k.js → helper-DNkQl8J2.js} +1 -1
  60. package/dist/{index-CYHzkVmf.js → index-BsQsj910.js} +3 -3
  61. package/dist/{index-BHPj_XYw.js → index-ByfJpxsf.js} +4 -4
  62. package/dist/{index-B9gRFG1Q.js → index-C23lCiVv.js} +1 -1
  63. package/dist/{index-Dz55oJOD.js → index-CO55xRbh.js} +530 -523
  64. package/dist/{index-D-cA3r-f.js → index-C_rW5Zzv.js} +1 -1
  65. package/dist/{index-1xCqie-s.js → index-CszV-kA7.js} +1 -1
  66. package/dist/{index-COJnc6ip.js → index-DWMboOMi.js} +1 -1
  67. package/dist/{index-Dr1iOdke.js → index-Dfi4M9Ap.js} +112 -104
  68. package/dist/{index-BSdS5JkE.js → index-DlgPQvBd.js} +1 -1
  69. package/dist/{index-BGirRSvf.js → index-Drvx6WWC.js} +1 -1
  70. package/dist/{index-Ctu4ZSkP.js → index-RkjhZsEw.js} +1 -1
  71. package/dist/{index-BhcuNARt.js → index-WCOWzb_D.js} +3 -3
  72. package/dist/{index-BAjS-mNm.js → index-WY8Y3SjU.js} +3 -3
  73. package/dist/{index.esm2017-CwEbNcAn.js → index.esm2017-DBFvix-C.js} +1 -1
  74. package/dist/{loading-DsAWzrAU.js → loading-DfP4ZQcW.js} +1 -1
  75. package/dist/{membership-CIWA-YIz.js → membership-CiLwVV-2.js} +3 -3
  76. package/dist/{money-B8_RYpfI.js → money-B92Ui9aH.js} +1 -1
  77. package/dist/{number-ClNyxrPX.js → number-CHYDMZpy.js} +1 -1
  78. package/dist/{objectid-B7Hb21TR.js → objectid-CsToJ4hH.js} +6 -6
  79. package/dist/{plugins-BaCcQwW_.js → plugins-GAf1L8Pd.js} +2 -2
  80. package/dist/{reward-Br3L7Y4x.js → reward-FLVXCKuH.js} +1 -1
  81. package/dist/{rule-CELh8Paa.js → rule-BHV4bC-1.js} +3 -3
  82. package/dist/{rule-builder-Dw3JpYy8.js → rule-builder-5WcDxoUM.js} +1 -1
  83. package/dist/{template-BIOneLeZ.js → template-C-y0046H.js} +4 -4
  84. package/dist/{timezone-Jr40C0YQ.js → timezone-Bdf9qSCF.js} +1 -1
  85. package/dist/{trigger-Bl_yRkKF.js → trigger-CjZQ4Gch.js} +4 -4
  86. package/dist/{user-C3J0hjK-.js → user-C5qgJUwB.js} +1 -1
  87. package/dist/{vue-i18n-DbCbvmTz.js → vue-i18n-6i4pn5bC.js} +99 -99
  88. package/dist/{xlsx-ClGRNHcc.js → xlsx-C4iuxJ6i.js} +166 -166
  89. package/package.json +1 -1
  90. package/dist/Store-BTE44D1j.js +0 -1842
  91. package/dist/campaign-IEgssyOs.js +0 -94
  92. package/dist/index-DTvC-nBb.js +0 -124
@@ -1,28 +1,28 @@
1
1
  var te = Object.defineProperty;
2
- var ae = (g, i, d) => i in g ? te(g, i, { enumerable: !0, configurable: !0, writable: !0, value: d }) : g[i] = d;
3
- var K = (g, i, d) => ae(g, typeof i != "symbol" ? i + "" : i, d);
4
- import { defineComponent as H, ref as f, computed as J, watch as T, resolveComponent as u, openBlock as x, createBlock as z, unref as o, isRef as j, withCtx as I, createElementVNode as h, createVNode as r, createElementBlock as R, Fragment as N, renderList as le, createCommentVNode as U, onMounted as ne, h as Y } from "vue";
5
- import { h as G } from "./moment-D7p2TMB-.js";
2
+ var ae = (g, i, c) => i in g ? te(g, i, { enumerable: !0, configurable: !0, writable: !0, value: c }) : g[i] = c;
3
+ var J = (g, i, c) => ae(g, typeof i != "symbol" ? i + "" : i, c);
4
+ import { defineComponent as X, ref as f, computed as A, watch as O, resolveComponent as d, openBlock as S, createBlock as K, unref as o, isRef as Q, withCtx as P, createElementVNode as v, createVNode as r, createElementBlock as D, Fragment as E, renderList as le, createCommentVNode as q, onMounted as ne, h as j } from "vue";
5
+ import { h as W } from "./moment-D7p2TMB-.js";
6
6
  import { components as se } from "@feedmepos/ui-library";
7
- import "./index-BAjS-mNm.js";
7
+ import "./index-WY8Y3SjU.js";
8
8
  import { J as re } from "./JsonViewer-v8_C7l5N.js";
9
- import { u as Q } from "./loading-DsAWzrAU.js";
9
+ import { u as Z } from "./loading-DfP4ZQcW.js";
10
10
  import { u as ie } from "./app-wDQR6dpb.js";
11
- import { useRoute as W, useRouter as ue } from "vue-router";
12
- import { c as P } from "./index-DTvC-nBb.js";
11
+ import { useRoute as ee, useRouter as ue } from "vue-router";
12
+ import { c as M, u as de } from "./campaign-OdVtlvIh.js";
13
13
  import { e as p } from "./index-vh86FiIQ.js";
14
- import { u as $, w as de } from "./xlsx-ClGRNHcc.js";
15
- import { g as ce } from "./user-C3J0hjK-.js";
16
- import { u as me, _ as pe } from "./usePagination-Ds-cuHop.js";
17
- import { a as fe } from "./plugins-BaCcQwW_.js";
18
- import { m as ge } from "./index-1xCqie-s.js";
19
- import { o as Ce } from "./objectId-dwaoBfJX.js";
20
- const be = { class: "space-y-16" }, ve = { class: "gap-16 grid grid-cols-2" }, he = { class: "flex items-center gap-8" }, ye = /* @__PURE__ */ H({
14
+ import { u as G, w as ce } from "./xlsx-C4iuxJ6i.js";
15
+ import { g as me } from "./user-C5qgJUwB.js";
16
+ import { u as pe, _ as fe } from "./usePagination-Ds-cuHop.js";
17
+ import { a as ge } from "./plugins-GAf1L8Pd.js";
18
+ import { m as Ce } from "./index-CszV-kA7.js";
19
+ import { o as be } from "./objectId-dwaoBfJX.js";
20
+ const ve = { class: "space-y-16" }, he = { class: "gap-16 grid grid-cols-2" }, ye = { class: "flex items-center gap-8" }, xe = /* @__PURE__ */ X({
21
21
  __name: "CreateCollectionSheet",
22
22
  emits: ["success"],
23
- setup(g, { expose: i, emit: d }) {
24
- const { minor: S } = Q, w = W(), F = f(), k = f(!1), q = d, C = f(!1);
25
- function D(s) {
23
+ setup(g, { expose: i, emit: c }) {
24
+ const { minor: I } = Z, k = ee(), h = f(), V = f(!1), L = c, C = f(!1);
25
+ function U(s) {
26
26
  C.value = s, s && (a.value = {
27
27
  quantity: 1,
28
28
  code: "",
@@ -45,7 +45,7 @@ const be = { class: "space-y-16" }, ve = { class: "gap-16 grid grid-cols-2" }, h
45
45
  suffix: "",
46
46
  pattern: "########"
47
47
  }
48
- }), E = [
48
+ }), T = [
49
49
  {
50
50
  label: "Bulk codes",
51
51
  value: "bulk",
@@ -56,7 +56,7 @@ const be = { class: "space-y-16" }, ve = { class: "gap-16 grid grid-cols-2" }, h
56
56
  value: "single",
57
57
  sublabel: "Enter your own custom codes"
58
58
  }
59
- ], B = [
59
+ ], R = [
60
60
  {
61
61
  label: "Alphanumeric",
62
62
  value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
@@ -69,12 +69,12 @@ const be = { class: "space-y-16" }, ve = { class: "gap-16 grid grid-cols-2" }, h
69
69
  { label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
70
70
  { label: "Numbers", value: "0123456789" },
71
71
  { label: "Custom", value: "" }
72
- ], y = f(B[0].value), c = f("bulk"), V = f(!1), A = J(() => w.params.id);
73
- async function n(s) {
72
+ ], _ = f(R[0].value), n = f("bulk"), w = f(!1), z = A(() => k.params.id);
73
+ async function B(s) {
74
74
  var e;
75
- await ((e = F.value) == null ? void 0 : e.validateInputs()), k.value && await S(
75
+ await ((e = h.value) == null ? void 0 : e.validateInputs()), V.value && await I(
76
76
  async () => {
77
- await P.createCollectionByCampaignId(A.value, s), await q("success");
77
+ await M.createCollectionByCampaignId(z.value, s), await L("success");
78
78
  },
79
79
  {
80
80
  message: "Creating claim(s)",
@@ -83,52 +83,52 @@ const be = { class: "space-y-16" }, ve = { class: "gap-16 grid grid-cols-2" }, h
83
83
  );
84
84
  }
85
85
  i({
86
- showSheet: D
87
- }), T(
88
- () => c.value,
86
+ showSheet: U
87
+ }), O(
88
+ () => n.value,
89
89
  (s, e) => {
90
90
  e != s && (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 = "########");
91
91
  }
92
92
  );
93
- function l(s) {
94
- if (c.value !== "single") return !1;
93
+ function N(s) {
94
+ if (n.value !== "single") return !1;
95
95
  const e = s.split(`
96
- `).map((v) => v.trim()).filter(Boolean);
96
+ `).map((l) => l.trim()).filter(Boolean);
97
97
  return new Set(e).size !== e.length;
98
98
  }
99
- function b(s) {
99
+ function Y(s) {
100
100
  return /[ \t]/.test(s);
101
101
  }
102
- return T(
102
+ return O(
103
103
  () => a.value.codeConfig.length,
104
104
  (s, e) => {
105
105
  s != e && (a.value.codeConfig.pattern = "#".repeat(Math.min(16, Number(s))));
106
106
  }
107
- ), T(
107
+ ), O(
108
108
  () => a.value.codeConfig.pattern,
109
109
  (s, e) => {
110
110
  s != e && (a.value.codeConfig.length = (a.value.codeConfig.pattern.match(/#/g) || []).length);
111
111
  }
112
112
  ), (s, e) => {
113
- const v = u("FmRadio"), M = u("FmRadioGroup"), m = u("FmSwitch"), L = u("FmStepperField"), X = u("FmSelect"), _ = u("FmTextField"), Z = u("FmTextarea"), ee = u("FmForm"), O = u("FmButton"), oe = u("FmSideSheet");
114
- return x(), z(oe, {
113
+ const l = d("FmRadio"), b = d("FmRadioGroup"), y = d("FmSwitch"), u = d("FmStepperField"), F = d("FmSelect"), x = d("FmTextField"), m = d("FmTextarea"), $ = d("FmForm"), H = d("FmButton"), oe = d("FmSideSheet");
114
+ return S(), K(oe, {
115
115
  "max-width": 560,
116
116
  "dismiss-away": !0,
117
117
  header: "Create collection",
118
118
  modelValue: o(C),
119
119
  "onUpdate:modelValue": [
120
- e[14] || (e[14] = (t) => j(C) ? C.value = t : null),
120
+ e[14] || (e[14] = (t) => Q(C) ? C.value = t : null),
121
121
  e[15] || (e[15] = (t) => C.value = t)
122
122
  ]
123
123
  }, {
124
- "side-sheet-footer": I(() => [
125
- h("div", he, [
126
- r(O, {
124
+ "side-sheet-footer": P(() => [
125
+ v("div", ye, [
126
+ r(H, {
127
127
  label: "Save",
128
- onClick: e[12] || (e[12] = (t) => n(o(a))),
128
+ onClick: e[12] || (e[12] = (t) => B(o(a))),
129
129
  loading: o(ie)().isLoading
130
130
  }, null, 8, ["loading"]),
131
- r(O, {
131
+ r(H, {
132
132
  label: "Cancel",
133
133
  type: "button",
134
134
  variant: "tertiary",
@@ -136,25 +136,25 @@ const be = { class: "space-y-16" }, ve = { class: "gap-16 grid grid-cols-2" }, h
136
136
  })
137
137
  ])
138
138
  ]),
139
- default: I(() => [
139
+ default: P(() => [
140
140
  r(re, { json: o(a) }, null, 8, ["json"]),
141
- r(ee, {
141
+ r($, {
142
142
  ref_key: "form",
143
- ref: F,
143
+ ref: h,
144
144
  class: "space-y-40",
145
- onValidationSuccess: e[10] || (e[10] = (t) => k.value = !0),
146
- onValidationFailed: e[11] || (e[11] = (t) => k.value = !1)
145
+ onValidationSuccess: e[10] || (e[10] = (t) => V.value = !0),
146
+ onValidationFailed: e[11] || (e[11] = (t) => V.value = !1)
147
147
  }, {
148
- default: I(() => [
149
- h("div", null, [
150
- e[16] || (e[16] = h("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1)),
151
- r(M, {
152
- modelValue: o(c),
153
- "onUpdate:modelValue": e[0] || (e[0] = (t) => j(c) ? c.value = t : null),
148
+ default: P(() => [
149
+ v("div", null, [
150
+ e[16] || (e[16] = v("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1)),
151
+ r(b, {
152
+ modelValue: o(n),
153
+ "onUpdate:modelValue": e[0] || (e[0] = (t) => Q(n) ? n.value = t : null),
154
154
  inline: !1
155
155
  }, {
156
- default: I(() => [
157
- (x(), R(N, null, le(E, (t) => r(v, {
156
+ default: P(() => [
157
+ (S(), D(E, null, le(T, (t) => r(l, {
158
158
  key: t.value,
159
159
  value: t.value,
160
160
  label: t.label,
@@ -164,19 +164,19 @@ const be = { class: "space-y-16" }, ve = { class: "gap-16 grid grid-cols-2" }, h
164
164
  _: 1
165
165
  }, 8, ["modelValue"])
166
166
  ]),
167
- h("div", be, [
168
- e[17] || (e[17] = h("div", { class: "fm-typo-en-body-lg-600" }, "Settings", -1)),
169
- o(c) === "bulk" ? (x(), R(N, { key: 0 }, [
170
- r(m, {
171
- "model-value": o(V),
167
+ v("div", ve, [
168
+ e[17] || (e[17] = v("div", { class: "fm-typo-en-body-lg-600" }, "Settings", -1)),
169
+ o(n) === "bulk" ? (S(), D(E, { key: 0 }, [
170
+ r(y, {
171
+ "model-value": o(w),
172
172
  "label-placement": "right",
173
173
  value: "true",
174
174
  label: "Advance code setting",
175
175
  required: !0,
176
- "onUpdate:modelValue": e[1] || (e[1] = () => V.value = !o(V))
176
+ "onUpdate:modelValue": e[1] || (e[1] = () => w.value = !o(w))
177
177
  }, null, 8, ["model-value"]),
178
- o(V) ? (x(), R(N, { key: 0 }, [
179
- r(L, {
178
+ o(w) ? (S(), D(E, { key: 0 }, [
179
+ r(u, {
180
180
  modelValue: o(a).codeConfig.length,
181
181
  "onUpdate:modelValue": e[2] || (e[2] = (t) => o(a).codeConfig.length = t),
182
182
  label: "Code length",
@@ -188,42 +188,42 @@ const be = { class: "space-y-16" }, ve = { class: "gap-16 grid grid-cols-2" }, h
188
188
  ],
189
189
  required: !0
190
190
  }, null, 8, ["modelValue", "rules"]),
191
- r(X, {
191
+ r(F, {
192
192
  label: "Charset",
193
- "model-value": o(y),
194
- items: B,
193
+ "model-value": o(_),
194
+ items: R,
195
195
  "helper-text": o(a).codeConfig.charset.length > 62 ? `${o(a).codeConfig.charset.substring(0, 62)}...` : o(a).codeConfig.charset,
196
196
  "onUpdate:modelValue": e[3] || (e[3] = (t) => {
197
- y.value = t, o(a).codeConfig.charset = t;
197
+ _.value = t, o(a).codeConfig.charset = t;
198
198
  })
199
199
  }, null, 8, ["model-value", "helper-text"]),
200
- o(y) === "" ? (x(), z(_, {
200
+ o(_) === "" ? (S(), K(x, {
201
201
  key: 0,
202
202
  modelValue: o(a).codeConfig.charset,
203
203
  "onUpdate:modelValue": e[4] || (e[4] = (t) => o(a).codeConfig.charset = t),
204
204
  label: "Custom Charset",
205
205
  required: ""
206
- }, null, 8, ["modelValue"])) : U("", !0),
207
- h("div", ve, [
208
- r(_, {
206
+ }, null, 8, ["modelValue"])) : q("", !0),
207
+ v("div", he, [
208
+ r(x, {
209
209
  modelValue: o(a).codeConfig.prefix,
210
210
  "onUpdate:modelValue": e[5] || (e[5] = (t) => o(a).codeConfig.prefix = t),
211
211
  label: "Prefix (Optional)"
212
212
  }, null, 8, ["modelValue"]),
213
- r(_, {
213
+ r(x, {
214
214
  modelValue: o(a).codeConfig.suffix,
215
215
  "onUpdate:modelValue": e[6] || (e[6] = (t) => o(a).codeConfig.suffix = t),
216
216
  label: "Suffix (Optional)"
217
217
  }, null, 8, ["modelValue"])
218
218
  ]),
219
- r(_, {
219
+ r(x, {
220
220
  modelValue: o(a).codeConfig.pattern,
221
221
  "onUpdate:modelValue": e[7] || (e[7] = (t) => o(a).codeConfig.pattern = t),
222
222
  label: "Pattern",
223
223
  required: !0
224
224
  }, null, 8, ["modelValue"])
225
- ], 64)) : U("", !0),
226
- r(_, {
225
+ ], 64)) : q("", !0),
226
+ r(x, {
227
227
  modelValue: o(a).quantity,
228
228
  "onUpdate:modelValue": e[8] || (e[8] = (t) => o(a).quantity = t),
229
229
  label: "Number of code",
@@ -234,19 +234,19 @@ const be = { class: "space-y-16" }, ve = { class: "gap-16 grid grid-cols-2" }, h
234
234
  required: !0,
235
235
  "helper-text": `${o(a).quantity} claim will be created`
236
236
  }, null, 8, ["modelValue", "rules", "helper-text"])
237
- ], 64)) : U("", !0),
238
- o(c) !== "bulk" ? (x(), z(Z, {
237
+ ], 64)) : q("", !0),
238
+ o(n) !== "bulk" ? (S(), K(m, {
239
239
  key: 1,
240
240
  modelValue: o(a).code,
241
241
  "onUpdate:modelValue": e[9] || (e[9] = (t) => o(a).code = t),
242
242
  label: "Custom Code",
243
243
  rules: [
244
- (t) => o(c) != "single" || !!t || "Custom code is required",
245
- (t) => !l(t) || "Custom code must be unique",
246
- (t) => !b(t) || "Custom code must not contain space"
244
+ (t) => o(n) != "single" || !!t || "Custom code is required",
245
+ (t) => !N(t) || "Custom code must be unique",
246
+ (t) => !Y(t) || "Custom code must not contain space"
247
247
  ],
248
248
  placeholder: "(For multiple codes, please enter in the new row.)"
249
- }, null, 8, ["modelValue", "rules"])) : U("", !0)
249
+ }, null, 8, ["modelValue", "rules"])) : q("", !0)
250
250
  ])
251
251
  ]),
252
252
  _: 1
@@ -257,42 +257,54 @@ const be = { class: "space-y-16" }, ve = { class: "gap-16 grid grid-cols-2" }, h
257
257
  };
258
258
  }
259
259
  });
260
- class xe {
260
+ class Se {
261
261
  constructor() {
262
- K(this, "data", []);
262
+ J(this, "data", []);
263
263
  }
264
264
  addRecord(i) {
265
265
  this.data.push(i);
266
266
  }
267
267
  buildExcel() {
268
- const i = $.book_new(), d = $.json_to_sheet(this.data);
269
- return $.book_append_sheet(i, d, "Collection"), i;
268
+ const i = G.book_new(), c = G.json_to_sheet(this.data);
269
+ return G.book_append_sheet(i, c, "Collection"), i;
270
270
  }
271
271
  }
272
- const Ve = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Se = { class: "flex items-center justify-end py-4 xs:hidden" }, ze = /* @__PURE__ */ H({
272
+ const Ve = { class: "px-24 flex flex-col gap-y-32 pb-24" }, we = { class: "flex items-center justify-end py-4 xs:hidden" }, Ye = /* @__PURE__ */ X({
273
273
  __name: "Collections",
274
274
  setup(g) {
275
- const i = ue(), d = W(), S = f(), w = J(() => d.params.id), F = f(!1), { custom: k } = Q, q = [
275
+ function i(e) {
276
+ return e.hideInApp === !1;
277
+ }
278
+ const c = ue(), I = ee(), k = f(), h = A(() => I.params.id), V = f(!1), { custom: L } = Z, C = de(), U = A(
279
+ () => C.campaigns.voucher.find(
280
+ (e) => {
281
+ var l;
282
+ return ((l = e._id) == null ? void 0 : l.toString()) === h.value;
283
+ }
284
+ )
285
+ ), a = A(
286
+ () => !!U.value && !i(U.value)
287
+ ), T = [
276
288
  {
277
289
  header: "ID/Code",
278
290
  accessorKey: "_id",
279
- cell(n) {
280
- return Y("div", { class: "flex items-center" }, [
281
- Y(se.FmIcon, {
291
+ cell(e) {
292
+ return j("div", { class: "flex items-center" }, [
293
+ j(se.FmIcon, {
282
294
  name: "content_copy",
283
295
  outline: !0,
284
296
  size: "sm",
285
297
  class: "cursor-pointer mr-4",
286
298
  onClick: (l) => {
287
- l.preventDefault(), l.stopPropagation(), fe(
288
- n.row.original.code || n.row.original._id.toString()
299
+ l.preventDefault(), l.stopPropagation(), ge(
300
+ e.row.original.code || e.row.original._id.toString()
289
301
  );
290
302
  }
291
303
  }),
292
- Y(
304
+ j(
293
305
  "div",
294
306
  { class: "pr-2 text-ellipsis overflow-hidden" },
295
- n.row.original.code || n.row.original._id.toString()
307
+ e.row.original.code || e.row.original._id.toString()
296
308
  )
297
309
  ]);
298
310
  }
@@ -301,16 +313,16 @@ const Ve = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Se = { class: "flex
301
313
  header: "User",
302
314
  accessorKey: "user",
303
315
  enableSorting: !1,
304
- cell(n) {
305
- const l = n.row.original.pf_user;
306
- return ce(l);
316
+ cell(e) {
317
+ const l = e.row.original.pf_user;
318
+ return me(l);
307
319
  }
308
320
  },
309
321
  {
310
322
  header: "Phone",
311
- accessorFn: (n) => {
323
+ accessorFn: (e) => {
312
324
  var l;
313
- return ((l = n.pf_user) == null ? void 0 : l.phoneNumber) || "-";
325
+ return ((l = e.pf_user) == null ? void 0 : l.phoneNumber) || "-";
314
326
  },
315
327
  accessorKey: "pf_user.phoneNumber"
316
328
  },
@@ -321,59 +333,59 @@ const Ve = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Se = { class: "flex
321
333
  {
322
334
  header: "Created at",
323
335
  accessorKey: "_id",
324
- accessorFn: (n) => G(Ce(n._id.toString())).format("DD MMM YYYY")
336
+ accessorFn: (e) => W(be(e._id.toString())).format("DD MMM YYYY")
325
337
  },
326
338
  {
327
339
  header: "Nearest expired at",
328
340
  accessorKey: "expiryBalance",
329
- accessorFn: (n) => {
341
+ accessorFn: (e) => {
330
342
  var l;
331
- return n.expiryBalance && n.expiryBalance.length ? G((l = n.expiryBalance) == null ? void 0 : l[0].expiredAt).format("DD MMM YYYY") : "Never expires";
343
+ return e.expiryBalance && e.expiryBalance.length ? W((l = e.expiryBalance) == null ? void 0 : l[0].expiredAt).format("DD MMM YYYY") : "Never expires";
332
344
  }
333
345
  }
334
- ], C = {
335
- "$connect-STORE_REWARD_COLLECTIONS": ge.readCollectionsByRewardId,
336
- "$connect-CAMPAIGN_VOUCHER_COLLECTIONS": P.readCollectionsByCampaignId
337
- }, D = (n) => {
338
- const l = C[d.name];
339
- return (b) => l(n, b);
340
- }, { tableMeta: a, rowData: E, onSort: B, debouncedFetchData: y, onSearch: c } = me(D(w.value));
341
- async function V() {
342
- var n;
343
- await y(), (n = S.value) == null || n.showSheet(!1);
346
+ ], R = {
347
+ "$connect-STORE_REWARD_COLLECTIONS": Ce.readCollectionsByRewardId,
348
+ "$connect-CAMPAIGN_VOUCHER_COLLECTIONS": M.readCollectionsByCampaignId
349
+ }, _ = (e) => {
350
+ const l = R[I.name];
351
+ return (b) => l(e, b);
352
+ }, { tableMeta: n, rowData: w, onSort: z, debouncedFetchData: B, onSearch: N } = pe(_(h.value));
353
+ async function Y() {
354
+ var e;
355
+ await B(), (e = k.value) == null || e.showSheet(!1);
344
356
  }
345
- async function A() {
346
- F.value || k(
357
+ async function s() {
358
+ V.value || L(
347
359
  async () => {
348
- var s;
349
- const n = new xe(), l = (await P.readCollectionsByCampaignId(w.value, {
360
+ var y;
361
+ const e = new Se(), l = (await M.readCollectionsByCampaignId(h.value, {
350
362
  limit: 1,
351
363
  skip: 0,
352
364
  sortBy: p.sortBy,
353
365
  descending: p.descending
354
366
  })).meta.totalResources ?? 0, b = p.rowsPerPage;
355
- for (let e = 0; e < l; e += b) {
356
- const v = {
367
+ for (let u = 0; u < l; u += b) {
368
+ const F = {
357
369
  ...p,
358
370
  limit: b,
359
371
  skip: p.page - 1,
360
372
  sortBy: p.sortBy,
361
373
  descending: p.descending
362
- }, M = await P.readCollectionsByCampaignId(
363
- w.value,
364
- v
374
+ }, x = await M.readCollectionsByCampaignId(
375
+ h.value,
376
+ F
365
377
  );
366
- for await (const m of M.resources) {
367
- const L = {
368
- Id: (m == null ? void 0 : m.code) || ((s = m._id) == null ? void 0 : s.toString()) || "",
378
+ for await (const m of x.resources) {
379
+ const $ = {
380
+ Id: (m == null ? void 0 : m.code) || ((y = m._id) == null ? void 0 : y.toString()) || "",
369
381
  Balance: (m == null ? void 0 : m.balance) || 0
370
382
  };
371
- n.addRecord(L);
383
+ e.addRecord($);
372
384
  }
373
385
  p.page++;
374
386
  }
375
- await de(
376
- n.buildExcel(),
387
+ await ce(
388
+ e.buildExcel(),
377
389
  `members-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
378
390
  {
379
391
  bookType: "xlsx",
@@ -383,70 +395,72 @@ const Ve = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Se = { class: "flex
383
395
  ), p.page = 1;
384
396
  },
385
397
  {
386
- isLoading: F
398
+ isLoading: V
387
399
  }
388
400
  );
389
401
  }
390
402
  return ne(async () => {
391
- await y();
392
- }), (n, l) => {
393
- const b = u("FmPageHead"), s = u("FmSearch");
394
- return x(), R(N, null, [
403
+ await B();
404
+ }), (e, l) => {
405
+ const b = d("FmPageHead"), y = d("FmSearch");
406
+ return S(), D(E, null, [
395
407
  r(b, {
396
408
  title: "Collections",
397
409
  "back-button": !0,
398
410
  actions: [
399
411
  { label: "Export", value: "export", isPrimary: !1 },
400
- {
401
- label: "Create collection",
402
- value: "create",
403
- isPrimary: !0
404
- }
412
+ ...o(a) ? [
413
+ {
414
+ label: "Create collection",
415
+ value: "create",
416
+ isPrimary: !0
417
+ }
418
+ ] : []
405
419
  ],
406
- "onClick:back": l[0] || (l[0] = (e) => o(i).back()),
407
- "onClick:action": l[1] || (l[1] = (e) => {
408
- var v;
409
- e === "create" && ((v = o(S)) == null || v.showSheet(!0)), e === "export" && A();
420
+ "onClick:back": l[0] || (l[0] = (u) => o(c).back()),
421
+ "onClick:action": l[1] || (l[1] = (u) => {
422
+ var F;
423
+ u === "create" && ((F = o(k)) == null || F.showSheet(!0)), u === "export" && s();
410
424
  })
411
- }),
412
- h("div", Ve, [
413
- r(s, {
425
+ }, null, 8, ["actions"]),
426
+ v("div", Ve, [
427
+ r(y, {
414
428
  class: "hidden xs:flex border-b border-fm-color-neutral-gray-100",
415
- modelValue: o(a).searchValue,
429
+ modelValue: o(n).searchValue,
416
430
  "onUpdate:modelValue": [
417
- l[2] || (l[2] = (e) => o(a).searchValue = e),
418
- o(c)
431
+ l[2] || (l[2] = (u) => o(n).searchValue = u),
432
+ o(N)
419
433
  ],
420
434
  placeholder: "Search",
421
435
  collapsible: ""
422
436
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
423
- h("div", Se, [
424
- r(s, {
425
- modelValue: o(a).searchValue,
437
+ v("div", we, [
438
+ r(y, {
439
+ modelValue: o(n).searchValue,
426
440
  "onUpdate:modelValue": [
427
- l[3] || (l[3] = (e) => o(a).searchValue = e),
428
- o(c)
441
+ l[3] || (l[3] = (u) => o(n).searchValue = u),
442
+ o(N)
429
443
  ],
430
444
  placeholder: "Search",
431
445
  collapsible: ""
432
446
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
433
447
  ]),
434
- r(pe, {
435
- loading: o(a).isLoading,
436
- "row-data": o(E),
437
- "column-defs": q,
438
- "row-count": o(a).totalRows,
439
- "page-count": o(a).pageCount,
440
- "page-index": o(a).pageIndex,
441
- "page-size": o(a).pageSize,
448
+ r(fe, {
449
+ loading: o(n).isLoading,
450
+ "row-data": o(w),
451
+ "column-defs": T,
452
+ "row-count": o(n).totalRows,
453
+ "page-count": o(n).pageCount,
454
+ "page-index": o(n).pageIndex,
455
+ "page-size": o(n).pageSize,
442
456
  "shrink-at": !1,
443
- onSortChange: o(B),
444
- onPageChange: l[4] || (l[4] = (e) => o(y)({ pageSize: e.pageSize, pageIndex: e.pageIndex }))
457
+ onSortChange: o(z),
458
+ onPageChange: l[4] || (l[4] = (u) => o(B)({ pageSize: u.pageSize, pageIndex: u.pageIndex }))
445
459
  }, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
446
- r(ye, {
460
+ r(xe, {
447
461
  ref_key: "sheetRef",
448
- ref: S,
449
- onSuccess: V
462
+ ref: k,
463
+ onSuccess: Y
450
464
  }, null, 512)
451
465
  ])
452
466
  ], 64);
@@ -454,5 +468,5 @@ const Ve = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Se = { class: "flex
454
468
  }
455
469
  });
456
470
  export {
457
- ze as default
471
+ Ye as default
458
472
  };
@@ -1,17 +1,16 @@
1
1
  import { defineComponent as N, ref as L, computed as j, h as M, onMounted as H, resolveComponent as m, openBlock as d, createElementBlock as y, Fragment as h, createVNode as i, unref as t, createElementVNode as n, withCtx as C, renderList as q, createBlock as w, resolveDynamicComponent as O, toDisplayString as g, createCommentVNode as z } from "vue";
2
2
  import { _ as G } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as J, components as Q } from "@feedmepos/ui-library";
4
- import { p as W } from "./plugins-BaCcQwW_.js";
5
- import { u as X } from "./loading-DsAWzrAU.js";
6
- import { u as Y } from "./business-D8WOIwU3.js";
7
- import { u as Z } from "./campaign-IEgssyOs.js";
8
- import { g as ee, a as S, b as V } from "./campaign-B5Zcg5dG.js";
9
- import { u as oe } from "./vue-i18n-DbCbvmTz.js";
4
+ import { p as W } from "./plugins-GAf1L8Pd.js";
5
+ import { u as X } from "./loading-DfP4ZQcW.js";
6
+ import { u as Y } from "./business-CxrnbBG7.js";
7
+ import { u as Z, c as _ } from "./campaign-OdVtlvIh.js";
8
+ import { g as ee, a as S, b as V } from "./campaign-DOOGvk7s.js";
9
+ import { u as oe } from "./vue-i18n-6i4pn5bC.js";
10
10
  import { _ as te } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
11
- import { _ as ae } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-CIApefkS.js";
12
- import { u as ne } from "./template-BIOneLeZ.js";
13
- import { c as _ } from "./index-DTvC-nBb.js";
14
- const re = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-center justify-between w-full" }, ie = { class: "flex gap-8 overflow-x-auto" }, ce = { class: "space-y-8" }, le = { class: "flex w-full gap-4 items-center" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { key: 0 }, Ie = /* @__PURE__ */ N({
11
+ import { _ as ae } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-IrMeqHYK.js";
12
+ import { u as ne } from "./template-C-y0046H.js";
13
+ const re = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-center justify-between w-full" }, ie = { class: "flex gap-8 overflow-x-auto" }, ce = { class: "space-y-8" }, le = { class: "flex w-full gap-4 items-center" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { key: 0 }, Be = /* @__PURE__ */ N({
15
14
  __name: "Credit",
16
15
  setup(ge) {
17
16
  const { t: r } = oe(), B = {
@@ -224,5 +223,5 @@ const re = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-
224
223
  }
225
224
  });
226
225
  export {
227
- Ie as default
226
+ Be as default
228
227
  };