@feedmepos/mf-connect 0.1.0-beta.35 → 0.1.0-beta.37

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 (88) hide show
  1. package/dist/{Analytic-BMdB7x5F.js → Analytic-BfWknG6l.js} +18 -17
  2. package/dist/{App-AakWqQHx.js → App-BG_061Wg.js} +6 -6
  3. package/dist/{Broadcast-Bf5GOV7p.js → Broadcast-DdpNtoOo.js} +8 -8
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BBTBapxi.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-od-JjpnA.js} +6 -7
  5. package/dist/{Card-DmxekNts.js → Card-Bnng5ta4.js} +21 -23
  6. package/dist/{Collections-CL7hOycU.js → Collections-DnD4xZ5L.js} +28 -34
  7. package/dist/{Credit-0eGxacBN.js → Credit-DwblaWn4.js} +8 -8
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BLWeJ73S.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-COETiGQ4.js} +27 -27
  9. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-q7qJ9Ec5.js → EffectSheet.vue_vue_type_style_index_0_lang-CtEk6tOC.js} +6 -6
  10. package/dist/{Experience-NjmDx3_p.js → Experience-Bkn57rfJ.js} +8 -8
  11. package/dist/{Game-q19qmf8t.js → Game-D0s7bZc-.js} +8 -8
  12. package/dist/{Index-BmzHphDm.js → Index-D7Zj0U5i.js} +9 -9
  13. package/dist/{Marketing-BgL2CqkH.js → Marketing-CLwzvII4.js} +5 -5
  14. package/dist/{Member-DXO7yer0.js → Member-D-JxENNb.js} +4 -4
  15. package/dist/MemberList-CMTSjTu-.js +1537 -0
  16. package/dist/MemberTransactions-BNcHZfcd.js +45 -0
  17. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DFiCQcTe.js → MessageInput.vue_vue_type_script_setup_true_lang-B8x9NfzT.js} +2 -2
  18. package/dist/{Mission-DOdkoytR.js → Mission-B-JhXdXX.js} +8 -8
  19. package/dist/{Overview-Bizp0BGu.js → Overview-BZrK3ETv.js} +20 -21
  20. package/dist/{Point-Bvyg1zuh.js → Point-Njw7VSo9.js} +8 -8
  21. package/dist/{Promotion-B75LcnHm.js → Promotion-DjRs0X1X.js} +9 -9
  22. package/dist/Record-BnZXhR7W.js +337 -0
  23. package/dist/{Reward-l1gt8pwu.js → Reward-pD5qUCNJ.js} +14 -14
  24. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-C76emk8A.js → RewardGroup.vue_vue_type_script_setup_true_lang-u8IT5N_z.js} +12 -13
  25. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-B4ak1Gem.js → RuleGroup.vue_vue_type_script_setup_true_lang-t7vrHFiH.js} +14 -15
  26. package/dist/{Segment-DJSkWWH8.js → Segment-XKjH6MDU.js} +17 -18
  27. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-ByqgSxPo.js → SelectItems.vue_vue_type_script_setup_true_lang-CqIHHNJg.js} +2 -2
  28. package/dist/{Setting-DTV24iE5.js → Setting-CjKbl-Em.js} +8 -8
  29. package/dist/{Store-C1obQwdr.js → Store-BXKK7Ys3.js} +19 -20
  30. package/dist/{StoreRewards-apMVv0Ca.js → StoreRewards-C8iQ2BTP.js} +12 -12
  31. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DBzA_4gb.js → StoreTransactions.vue_vue_type_script_setup_true_lang-JdPqalST.js} +330 -363
  32. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-PxZ5Au5X.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CwfgY4Ft.js} +1 -1
  33. package/dist/{Tier-DSvMUZJG.js → Tier-N95LJoLO.js} +20 -21
  34. package/dist/{Title-CWoqOkd2.js → Title-CpnvvVAV.js} +20 -21
  35. package/dist/{Transaction-CaCsXoB5.js → Transaction-BEN_EeUx.js} +2 -2
  36. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DaT8PyWl.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B3NgCEdV.js} +6 -6
  37. package/dist/{Voucher-BBtDXr9q.js → Voucher-DgxD3oco.js} +11 -11
  38. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BCSO2-oB.js → VoucherEditor.vue_vue_type_script_setup_true_lang-D3c0M6ga.js} +10 -10
  39. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BTm3pDid.js → ZodTextField.vue_vue_type_script_setup_true_lang-BOJwFLp-.js} +1 -1
  40. package/dist/{app-D8kcy7_R.js → app-D5HD8YMV.js} +1 -1
  41. package/dist/{app-B8JBXu5M.js → app-DGplfyjK.js} +30 -29
  42. package/dist/app.js +1 -1
  43. package/dist/{business-DN4-BTel.js → business-CO2AZHIm.js} +1 -1
  44. package/dist/{dto-D94IgAXy.js → campaign-C6_Zmo0L.js} +610 -818
  45. package/dist/{campaign-Cf6jJz3e.js → campaign-DoM_vfA0.js} +2 -2
  46. package/dist/{campaign.enum-DVOwgVTa.js → campaign.enum-Bkgm7Eui.js} +1 -1
  47. package/dist/{campaign.fn-D8apF_YE.js → campaign.fn-P4ZkJWZ1.js} +30 -30
  48. package/dist/{collectible.enum-DPsEC03C.js → collectible.enum-BP3FWmgp.js} +1 -1
  49. package/dist/{collection.fn-CzeGWVx2.js → collection.fn-B5hTEOhD.js} +2 -2
  50. package/dist/dto-ao87-Ydo.js +214 -0
  51. package/dist/{effect-CDg44P_g.js → effect-BDo1bV-w.js} +1 -1
  52. package/dist/{email-addresses-CDozpvzz.js → email-addresses-B-oXjMbu.js} +1 -1
  53. package/dist/{export-DQLXrn4F.js → export-BJ93wKMJ.js} +3 -3
  54. package/dist/{helper-DJMf--V-.js → helper-DIBaFgT8.js} +1 -1
  55. package/dist/{index-CVV5I3bh.js → index-BBW2oNKe.js} +1 -1
  56. package/dist/index-BLNNEMcq.js +44 -0
  57. package/dist/{index-DvE5xL4s.js → index-BX4S_sse.js} +6 -6
  58. package/dist/{index-BbPavTej.js → index-BY9zfO2Y.js} +3 -3
  59. package/dist/{index-BgXfVzZF.js → index-BxpCMeMY.js} +71 -66
  60. package/dist/{index-BnbkejyF.js → index-C6RWHkGF.js} +1 -1
  61. package/dist/{index-B0n_PU3b.js → index-CFg7ea6S.js} +1 -1
  62. package/dist/{index-V6yWwXYr.js → index-CcIjFlvm.js} +22 -4
  63. package/dist/{index-Df84_Ww3.js → index-DDoUQHWH.js} +2057 -1010
  64. package/dist/{index-BUZR5Bkw.js → index-H_VNJAQv.js} +1 -1
  65. package/dist/index-KkaBP7vA.js +32 -0
  66. package/dist/{index-DrvefOT4.js → index-sx63iBdE.js} +3 -3
  67. package/dist/index-vh86FiIQ.js +10 -0
  68. package/dist/{index.esm2017-C90-ettH.js → index.esm2017-NXs90PMj.js} +1 -1
  69. package/dist/{loading-B56wz_ef.js → loading-Bnuw5L3Y.js} +4 -4
  70. package/dist/{membership-CF1jgR11.js → membership-CZ_y58_j.js} +3 -3
  71. package/dist/{money-BEEp2WdU.js → money-AY6EDrgr.js} +1 -1
  72. package/dist/{number-u7HbwLPt.js → number-BbJ6Kbwi.js} +1 -1
  73. package/dist/{objectid-S3_nH1F7.js → objectid-DUKoXb-Y.js} +5 -5
  74. package/dist/{reward-BUY77BiP.js → reward-CXtVKCBn.js} +1 -1
  75. package/dist/{rule-BdAPBN8_.js → rule-BMKyg1g0.js} +3 -3
  76. package/dist/{rule-builder-z51VUtHk.js → rule-builder-DqRZOJfw.js} +1 -1
  77. package/dist/{template-B_J4Q9D6.js → template-DJpPUC9p.js} +4 -4
  78. package/dist/{trigger-CGrv0M0q.js → trigger-Jo5dHemf.js} +6 -6
  79. package/dist/{xlsx-CL102mzm.js → usePagination-BJSz3wZu.js} +3183 -2962
  80. package/dist/{user-D02jOhtd.js → user-3cRqdGEW.js} +1 -1
  81. package/dist/{vue-i18n-rCSjqg2P.js → vue-i18n-DjADG98J.js} +169 -169
  82. package/package.json +1 -1
  83. package/dist/MemberList-WGMopz-y.js +0 -1044
  84. package/dist/MemberTransactions-DmQgrLdy.js +0 -38
  85. package/dist/Record-BjAbPbiI.js +0 -209
  86. package/dist/index-BmblCnlD.js +0 -38
  87. package/dist/index-DFbITElv.js +0 -1052
  88. package/dist/usePagination-BeF5K3M7.js +0 -223
@@ -0,0 +1,45 @@
1
+ import { defineComponent as d, ref as p, resolveComponent as _, openBlock as a, createElementBlock as f, createVNode as v, unref as o, createBlock as u, createCommentVNode as b } from "vue";
2
+ import { _ as k, a as x } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-JdPqalST.js";
3
+ import { useRouter as y } from "vue-router";
4
+ const C = { class: "flex flex-col gap-y-32 pb-24" }, F = /* @__PURE__ */ d({
5
+ __name: "MemberTransactions",
6
+ setup(T) {
7
+ const r = y(), t = [
8
+ {
9
+ label: "Collection",
10
+ value: "collection"
11
+ },
12
+ {
13
+ label: "Store",
14
+ value: "store"
15
+ }
16
+ ], l = p(
17
+ t.find(
18
+ (s) => {
19
+ var e;
20
+ return s.value == ((e = r.currentRoute.value.query) == null ? void 0 : e.tab);
21
+ }
22
+ ) || t[0]
23
+ ), n = r.currentRoute.value.params.id;
24
+ return (s, e) => {
25
+ const c = _("FmTabs");
26
+ return a(), f("div", C, [
27
+ v(c, {
28
+ "model-value": o(l).value,
29
+ items: t,
30
+ "onUpdate:modelValue": e[0] || (e[0] = (m) => l.value = t.find((i) => i.value === m))
31
+ }, null, 8, ["model-value"]),
32
+ o(l).value == "collection" ? (a(), u(k, {
33
+ key: 0,
34
+ user: o(n)
35
+ }, null, 8, ["user"])) : o(l).value == "store" ? (a(), u(x, {
36
+ key: 1,
37
+ user: o(n)
38
+ }, null, 8, ["user"])) : b("", !0)
39
+ ]);
40
+ };
41
+ }
42
+ });
43
+ export {
44
+ F as default
45
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as M, shallowRef as R, openBlock as p, createElementBlock as _, normalizeStyle as O, ref as V, resolveComponent as g, createBlock as E, unref as s, isRef as N, withCtx as x, createVNode as h, createElementVNode as v, createCommentVNode as B, withDirectives as D, vShow as A, computed as q, onMounted as J, Fragment as U, createTextVNode as P, toDisplayString as z, renderList as G } from "vue";
2
- import { p as K } from "./loading-B56wz_ef.js";
3
- import { s as W } from "./index-DFbITElv.js";
2
+ import { p as K } from "./loading-Bnuw5L3Y.js";
3
+ import { D as W } from "./index-DDoUQHWH.js";
4
4
  import { _ as Z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  import { _ as Q, S as X } from "./LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js";
6
6
  import { c as Y } from "./object-qECH92oz.js";
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as E, ref as M, computed as $, h as d, onMounted as H, resolveComponent as l, openBlock as p, createElementBlock as h, Fragment as w, createVNode as c, unref as t, createElementVNode as s, withCtx as x, renderList as q, createBlock as b, resolveDynamicComponent as z, toDisplayString as u } from "vue";
2
2
  import { _ as W } from "./campaign-CpzFl8Vr.js";
3
- import { a as G, p as J, u as Q } from "./loading-B56wz_ef.js";
4
- import { g as L, a as B } from "./dto-D94IgAXy.js";
5
- import { u as X } from "./business-DN4-BTel.js";
6
- import { u as Y } from "./campaign-Cf6jJz3e.js";
3
+ import { a as G, p as J, u as Q } from "./loading-Bnuw5L3Y.js";
4
+ import { g as L, a as B } from "./campaign-C6_Zmo0L.js";
5
+ import { u as X } from "./business-CO2AZHIm.js";
6
+ import { u as Y } from "./campaign-DoM_vfA0.js";
7
7
  import { useDialog as Z, components as v } from "@feedmepos/ui-library";
8
8
  import { _ as ee } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
9
- import { u as oe } from "./template-B_J4Q9D6.js";
10
- import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BLWeJ73S.js";
9
+ import { u as oe } from "./template-DJpPUC9p.js";
10
+ import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-COETiGQ4.js";
11
11
  import { s as ne } from "./index-CsaQJMAR.js";
12
- import { u as ae } from "./vue-i18n-rCSjqg2P.js";
13
- import { c as _ } from "./index-BUZR5Bkw.js";
12
+ import { u as ae } from "./vue-i18n-DjADG98J.js";
13
+ import { c as _ } from "./index-H_VNJAQv.js";
14
14
  const se = { class: "px-24 flex flex-col gap-y-16" }, ie = { class: "flex items-center justify-between w-full" }, ce = { class: "flex gap-8 overflow-x-auto" }, re = { 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" }, pe = { class: "fm-typo-en-body-lg-600" }, ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = /* @__PURE__ */ E({
15
15
  __name: "Mission",
16
16
  setup(he) {
@@ -1,27 +1,26 @@
1
1
  import { defineComponent as Y, resolveComponent as _, openBlock as S, createElementBlock as E, Fragment as z, createVNode as d, withCtx as V, createElementVNode as a, toDisplayString as O, unref as t, renderSlot as he, ref as F, computed as G, watch as se, createBlock as j, isRef as J, resolveDynamicComponent as ne, renderList as re, normalizeClass as ie, createTextVNode as de, createCommentVNode as W, h as te, onMounted as ve } from "vue";
2
2
  import { _ as ge } from "./campaign-CpzFl8Vr.js";
3
- import { u as Z } from "./vue-i18n-rCSjqg2P.js";
4
- import { c as we, p as q, u as ce } from "./loading-B56wz_ef.js";
3
+ import { u as Z } from "./vue-i18n-DjADG98J.js";
4
+ import { c as we, p as q, u as ce } from "./loading-Bnuw5L3Y.js";
5
5
  import { J as X } from "./JsonViewer-v8_C7l5N.js";
6
6
  import { Z as N } from "./zod-Bg2FbC-D.js";
7
7
  import { u as K } from "./app-wDQR6dpb.js";
8
- import { u as Q, _ as _e } from "./RewardGroup.vue_vue_type_script_setup_true_lang-C76emk8A.js";
9
- import { u as ue } from "./reward-BUY77BiP.js";
10
- import "./index-Df84_Ww3.js";
11
- import "./index-DvE5xL4s.js";
12
- import { j as le, k as ye } from "./index-DFbITElv.js";
13
- import { a as be, b as xe } from "./index-BgXfVzZF.js";
14
- import "./index-B0n_PU3b.js";
15
- import "./index-BbPavTej.js";
16
- import { C as me } from "./membership-CF1jgR11.js";
17
- import { t as ee } from "./helper-DJMf--V-.js";
8
+ import { u as Q, _ as _e } from "./RewardGroup.vue_vue_type_script_setup_true_lang-u8IT5N_z.js";
9
+ import { u as ue } from "./reward-CXtVKCBn.js";
10
+ import { p as le, q as ye } from "./index-DDoUQHWH.js";
11
+ import "./index-BX4S_sse.js";
12
+ import { a as be, b as xe } from "./index-BxpCMeMY.js";
13
+ import "./index-CFg7ea6S.js";
14
+ import "./index-BY9zfO2Y.js";
15
+ import { C as me } from "./membership-CZ_y58_j.js";
16
+ import { t as ee } from "./helper-DIBaFgT8.js";
18
17
  import { c as H } from "./object-qECH92oz.js";
19
18
  import { useDialog as Re, components as oe } from "@feedmepos/ui-library";
20
- import { _ as Ce } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BTm3pDid.js";
21
- import { a as Se, _ as Fe } from "./trigger-CGrv0M0q.js";
22
- import { O as ke } from "./objectid-S3_nH1F7.js";
23
- import { r as fe } from "./index-BmblCnlD.js";
24
- import { u as $e } from "./business-DN4-BTel.js";
19
+ import { _ as Ce } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BOJwFLp-.js";
20
+ import { a as Se, _ as Fe } from "./trigger-Jo5dHemf.js";
21
+ import { O as ke } from "./objectid-DUKoXb-Y.js";
22
+ import { r as fe } from "./index-KkaBP7vA.js";
23
+ import { u as $e } from "./business-CO2AZHIm.js";
25
24
  const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ve = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Ie = { class: "flex-1" }, Te = { class: "flex items-center gap-8" }, Ue = { class: "fm-typo-en-title-sm-800" }, Ae = { class: "flex gap-8 items-center" }, Le = { class: "space-y-4 hidden xs:block border-b border-fm-color-neutral-gray-100 px-16 flex-1 pb-24" }, Be = { class: "flex items-center justify-between" }, Ee = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Oe = { class: "flex-1 space-y-4" }, je = { class: "fm-typo-en-body-lg-600" }, De = /* @__PURE__ */ Y({
26
25
  __name: "ReferralRewadGroupCard",
27
26
  props: {
@@ -276,8 +275,8 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ve =
276
275
  }, 8, ["modelValue", "rules"])
277
276
  ]),
278
277
  d(g, {
279
- text: t(N).helperText(t(T), "option"),
280
- state: t(N).helperState(t(T), "option")
278
+ text: t(N).helperText(t(T), "threshold"),
279
+ state: t(N).helperState(t(T), "threshold")
281
280
  }, null, 8, ["text", "state"]),
282
281
  r[5] || (r[5] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " When max. referral count is not set, it will default unlimited ", -1))
283
282
  ]),
@@ -726,7 +725,7 @@ const tr = { class: "flex flex-col space-y-16 mt-24" }, or = { class: "flex just
726
725
  }), dr = { class: "fm-typo-en-title-sm-600" }, cr = { class: "grid grid-cols-4 xs:grid-cols-1 gap-4 divide-x xs:divide-x-0" }, ur = { class: "flex gap-x-8" }, mr = { class: "fm-typo-body-lg-600 flex items-center gap-x-4" }, fr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pr = { class: "mb-40" }, hr = {
727
726
  key: 0,
728
727
  class: "flex flex-col items-center justify-center gap-y-16 p-24"
729
- }, vr = { class: "flex flex-col gap-16 text-center" }, gr = { class: "fm-typo-en-title-sm-800" }, wr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Nr = /* @__PURE__ */ Y({
728
+ }, vr = { class: "flex flex-col gap-16 text-center" }, gr = { class: "fm-typo-en-title-sm-800" }, wr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Mr = /* @__PURE__ */ Y({
730
729
  __name: "Overview",
731
730
  setup(k) {
732
731
  const { t: m } = Z(), { minor: I } = ce, p = $e(), w = Q(), { confirmUpdateReferralRecord: f, updateReferralRecord: n } = pe(), c = G(() => {
@@ -1060,5 +1059,5 @@ const tr = { class: "flex flex-col space-y-16 mt-24" }, or = { class: "flex just
1060
1059
  }
1061
1060
  });
1062
1061
  export {
1063
- Nr as default
1062
+ Mr as default
1064
1063
  };
@@ -1,15 +1,15 @@
1
1
  import { defineComponent as j, ref as P, computed as A, h as E, onMounted as M, resolveComponent as l, openBlock as d, createElementBlock as w, Fragment as b, createVNode as r, unref as t, withCtx as g, createElementVNode as n, toDisplayString as c, renderList as H, createBlock as x, resolveDynamicComponent 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 Q, u as W } from "./loading-B56wz_ef.js";
5
- import { u as X } from "./business-DN4-BTel.js";
6
- import { u as Y } from "./campaign-Cf6jJz3e.js";
7
- import { g as V, a as I } from "./dto-D94IgAXy.js";
4
+ import { p as Q, u as W } from "./loading-Bnuw5L3Y.js";
5
+ import { u as X } from "./business-CO2AZHIm.js";
6
+ import { u as Y } from "./campaign-DoM_vfA0.js";
7
+ import { g as V, a as I } from "./campaign-C6_Zmo0L.js";
8
8
  import { _ as Z } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
9
- import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BLWeJ73S.js";
10
- import { u as te } from "./template-B_J4Q9D6.js";
11
- import { u as oe } from "./vue-i18n-rCSjqg2P.js";
12
- import { c as _ } from "./index-BUZR5Bkw.js";
9
+ import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-COETiGQ4.js";
10
+ import { u as te } from "./template-DJpPUC9p.js";
11
+ import { u as oe } from "./vue-i18n-DjADG98J.js";
12
+ import { c as _ } from "./index-H_VNJAQv.js";
13
13
  const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, se = { class: "px-24 flex flex-col gap-y-16" }, ie = { class: "flex items-center justify-between w-full" }, re = { class: "flex gap-8 overflow-x-auto" }, le = { class: "space-y-8" }, ce = { 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" }, pe = { class: "fm-typo-en-body-lg-600" }, ue = { 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 = { class: "flex flex-col gap-16 text-center" }, ge = { class: "fm-typo-en-title-sm-800" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be = /* @__PURE__ */ j({
14
14
  __name: "Point",
15
15
  setup(he) {
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as H, ref as S, computed as q, h as z, onMounted as G, resolveComponent as r, openBlock as m, createElementBlock as h, Fragment as w, createVNode as i, unref as a, createElementVNode as s, withCtx as v, renderList as J, createBlock as b, resolveDynamicComponent as Q, toDisplayString as g } from "vue";
2
2
  import { _ as W } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as X, components as Y } from "@feedmepos/ui-library";
4
- import { c as O, p as I, u as Z } from "./loading-B56wz_ef.js";
5
- import { u as ee } from "./business-DN4-BTel.js";
6
- import { u as oe } from "./campaign-Cf6jJz3e.js";
7
- import { u as te } from "./vue-i18n-rCSjqg2P.js";
8
- import { g as V } from "./dto-D94IgAXy.js";
9
- import { e as L } from "./effect-CDg44P_g.js";
4
+ import { c as O, p as I, u as Z } from "./loading-Bnuw5L3Y.js";
5
+ import { u as ee } from "./business-CO2AZHIm.js";
6
+ import { u as oe } from "./campaign-DoM_vfA0.js";
7
+ import { u as te } from "./vue-i18n-DjADG98J.js";
8
+ import { g as V } from "./campaign-C6_Zmo0L.js";
9
+ import { e as L } from "./effect-BDo1bV-w.js";
10
10
  import { _ as ne } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
11
- import { _ as ae } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BLWeJ73S.js";
12
- import { u as se } from "./template-B_J4Q9D6.js";
13
- import { c as u } from "./index-BUZR5Bkw.js";
11
+ import { _ as ae } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-COETiGQ4.js";
12
+ import { u as se } from "./template-DJpPUC9p.js";
13
+ import { c as u } from "./index-H_VNJAQv.js";
14
14
  const ce = { class: "px-24 flex flex-col gap-y-16" }, ie = { class: "flex items-center justify-between w-full" }, re = { class: "flex gap-8 overflow-x-auto" }, le = { class: "space-y-8" }, me = { class: "flex w-full gap-4 items-center" }, pe = { class: "space-y-4" }, de = { class: "fm-typo-en-body-lg-600" }, ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Le = /* @__PURE__ */ H({
15
15
  __name: "Promotion",
16
16
  setup(_e) {
@@ -0,0 +1,337 @@
1
+ var K = Object.defineProperty;
2
+ var W = (g, i, m) => i in g ? K(g, i, { enumerable: !0, configurable: !0, writable: !0, value: m }) : g[i] = m;
3
+ var $ = (g, i, m) => W(g, typeof i != "symbol" ? i + "" : i, m);
4
+ import { defineComponent as A, ref as V, computed as q, resolveComponent as x, openBlock as B, createBlock as G, unref as s, isRef as H, withCtx as J, createElementBlock as T, createVNode as C, withModifiers as Q, createCommentVNode as X, createElementVNode as I, h as S, onMounted as Z, Fragment as ee } from "vue";
5
+ import { u as D, a as re, _ as te, w as oe } from "./usePagination-BJSz3wZu.js";
6
+ import { g as z } from "./user-3cRqdGEW.js";
7
+ import { components as v } from "@feedmepos/ui-library";
8
+ import { u as U, a as ae, c as se } from "./loading-Bnuw5L3Y.js";
9
+ import { u as ie } from "./vue-i18n-DjADG98J.js";
10
+ import { useCoreStore as ne } from "@feedmepos/mf-common";
11
+ import { r as R } from "./index-KkaBP7vA.js";
12
+ import { c as ce, a as le } from "./object-qECH92oz.js";
13
+ import { u as de } from "./membership-CZ_y58_j.js";
14
+ import { e as f } from "./index-vh86FiIQ.js";
15
+ import { h as me } from "./moment-BWErdI6_.js";
16
+ import { o as ue } from "./objectId-dwaoBfJX.js";
17
+ const pe = {
18
+ key: 0,
19
+ class: "flex justify-end mb-16"
20
+ }, fe = { class: "flex flex-col space-y-16 pr-12" }, ge = /* @__PURE__ */ A({
21
+ __name: "UpdateCriteriaProgressSheet",
22
+ emits: ["refresh"],
23
+ setup(g, { expose: i, emit: m }) {
24
+ const k = m;
25
+ ie();
26
+ const { minor: u } = U, h = V(!1), n = V({}), y = ne(), F = [
27
+ {
28
+ header: "Criteria title",
29
+ accessorFn: (t) => t.name
30
+ },
31
+ {
32
+ header: "Status",
33
+ cell(t) {
34
+ var p;
35
+ const e = t.row.original, o = (p = n.value.criteria_progress) == null ? void 0 : p.find(
36
+ (w) => w.criteria === e._id
37
+ ), c = o ? "Completed" : "Pending", l = o ? "text-fm-color-typo-success bg-fm-color-system-success-100" : "text-fm-color-typo-warning bg-fm-color-system-warning-100";
38
+ return [
39
+ S(v.FmChip, {
40
+ label: c,
41
+ compact: !0,
42
+ class: l
43
+ })
44
+ ];
45
+ }
46
+ },
47
+ {
48
+ id: "actions",
49
+ cell(t) {
50
+ var c;
51
+ const e = t.row.original;
52
+ return [
53
+ !((c = n.value.criteria_progress) == null ? void 0 : c.some(
54
+ (l) => l.criteria === e._id
55
+ )) && e.type == "MANUAL" ? S(v.FmButton, {
56
+ variant: "secondary",
57
+ label: "Mark as completed",
58
+ size: "md",
59
+ onClick: (l) => {
60
+ l.stopPropagation(), r(e._id.toString());
61
+ }
62
+ }) : null
63
+ ];
64
+ }
65
+ }
66
+ ], M = q(() => {
67
+ var e, o, c, l;
68
+ return (((o = (e = n.value) == null ? void 0 : e.criteria_progress) == null ? void 0 : o.filter(
69
+ (p) => {
70
+ var w;
71
+ return (w = n.value) == null ? void 0 : w.criteria.some(
72
+ (d) => d._id.toString() === p.criteria.toString()
73
+ );
74
+ }
75
+ )) || []).length == ((c = n.value) == null ? void 0 : c.criteria.length) && ((l = n.value) == null ? void 0 : l.status) != "COMPLETED";
76
+ });
77
+ async function r(t) {
78
+ var o;
79
+ const e = ce(le(n.value));
80
+ e.criteria_progress = [
81
+ {
82
+ criteria: t,
83
+ ref: `ADMIN:${(o = y.user) == null ? void 0 : o.id}:${(/* @__PURE__ */ new Date()).toISOString()}`,
84
+ completedAt: /* @__PURE__ */ new Date()
85
+ }
86
+ ], u(
87
+ async () => {
88
+ await R.updateCriteriaProgress(
89
+ n.value._id,
90
+ e
91
+ ), h.value = !1, k("refresh");
92
+ },
93
+ {
94
+ message: "Updating criteria progress",
95
+ successMessage: "Criteria progress updated successfully"
96
+ }
97
+ );
98
+ }
99
+ function a(t, e) {
100
+ h.value = t, n.value = e;
101
+ }
102
+ function _() {
103
+ h.value = !1;
104
+ }
105
+ return i({
106
+ showSheet: a,
107
+ hideSheet: _,
108
+ data: n
109
+ }), (t, e) => {
110
+ const o = x("FmButton"), c = x("FmTable"), l = x("FmSideSheet");
111
+ return B(), G(l, {
112
+ "max-width": 768,
113
+ modelValue: s(h),
114
+ "onUpdate:modelValue": e[1] || (e[1] = (p) => H(h) ? h.value = p : null),
115
+ header: "Referee Criteria"
116
+ }, {
117
+ default: J(() => [
118
+ s(M) ? (B(), T("div", pe, [
119
+ C(o, {
120
+ icon: "refresh",
121
+ label: "Refresh",
122
+ onClick: e[0] || (e[0] = Q((p) => r(s(n)._id), ["stop"]))
123
+ })
124
+ ])) : X("", !0),
125
+ I("div", fe, [
126
+ C(c, {
127
+ "row-data": s(n).criteria,
128
+ "hide-footer": !0,
129
+ "page-size": 100,
130
+ "column-defs": F
131
+ }, null, 8, ["row-data"])
132
+ ])
133
+ ]),
134
+ _: 1
135
+ }, 8, ["modelValue"]);
136
+ };
137
+ }
138
+ });
139
+ class he {
140
+ constructor() {
141
+ $(this, "data", []);
142
+ }
143
+ addRecord(i) {
144
+ this.data.push(i);
145
+ }
146
+ buildExcel() {
147
+ const i = D.book_new(), m = D.json_to_sheet(this.data);
148
+ return D.book_append_sheet(i, m, "Referrals"), i;
149
+ }
150
+ }
151
+ const _e = { class: "flex items-center justify-end" }, Be = /* @__PURE__ */ A({
152
+ __name: "Record",
153
+ setup(g) {
154
+ de();
155
+ const { minor: i } = U, m = V(null), k = [
156
+ {
157
+ header: "ID",
158
+ meta: {
159
+ maxWidth: "100px"
160
+ },
161
+ cell(r) {
162
+ return S("div", { class: "flex items-center" }, [
163
+ S(v.FmIcon, {
164
+ name: "content_copy",
165
+ outline: !0,
166
+ size: "sm",
167
+ class: "cursor-pointer mr-4",
168
+ onClick: (a) => {
169
+ a.preventDefault(), a.stopPropagation(), ae(r.row.original._id.toString());
170
+ }
171
+ }),
172
+ S(
173
+ "div",
174
+ { class: "pr-2 text-ellipsis overflow-hidden" },
175
+ r.row.original._id.toString()
176
+ )
177
+ ]);
178
+ },
179
+ enableSorting: !1
180
+ },
181
+ {
182
+ header: "Referer info",
183
+ enableSorting: !0,
184
+ cell(r) {
185
+ return r.row.original.pf_referer ? z(r.row.original.pf_referer, !0) : "N/A";
186
+ }
187
+ },
188
+ {
189
+ header: "Referee info",
190
+ enableSorting: !0,
191
+ cell(r) {
192
+ return r.row.original.pf_referee ? z(r.row.original.pf_referee, !0) : "N/A";
193
+ }
194
+ },
195
+ {
196
+ header: "Referee criteria",
197
+ accessorKey: "criteria",
198
+ id: "criteria",
199
+ cell(r) {
200
+ var e;
201
+ const _ = (((e = r.row.original.criteria_progress) == null ? void 0 : e.filter(
202
+ (o) => r.row.original.criteria.some(
203
+ (c) => c._id.toString() === o.criteria.toString()
204
+ )
205
+ )) || []).length, t = r.row.original.criteria.length;
206
+ return t === 0 ? S("div", "No criteria") : S("div", `${_}/${t} completed criteria`);
207
+ }
208
+ },
209
+ {
210
+ header: "Status",
211
+ id: "status",
212
+ cell(r) {
213
+ const a = r.row.original.status;
214
+ return S(v.FmChip, {
215
+ label: se.title(a.replace("_", " ")),
216
+ compact: !0,
217
+ class: a == "COMPLETED" ? "text-fm-color-typo-success bg-fm-color-system-success-100" : "text-fm-color-typo-primary bg-fm-color-system-primary-100"
218
+ });
219
+ }
220
+ }
221
+ ], { tableMeta: u, rowData: h, onSort: n, debouncedFetchData: y, onSearch: F } = re(R.readRecords);
222
+ async function M() {
223
+ const r = new he(), a = (await R.readRecords({
224
+ limit: 1,
225
+ skip: 0,
226
+ sortBy: f.sortBy,
227
+ descending: f.descending
228
+ })).meta.totalResources ?? 0, _ = f.rowsPerPage;
229
+ await i(
230
+ async () => {
231
+ var t, e, o, c;
232
+ for (let l = 0; l < a; l += _) {
233
+ const p = {
234
+ ...f,
235
+ limit: _,
236
+ skip: f.page - 1,
237
+ sortBy: f.sortBy,
238
+ descending: f.descending
239
+ }, w = await R.readRecords(p);
240
+ for (const d of w.resources) {
241
+ const N = (d.criteria || []).reduce(
242
+ (b, P) => {
243
+ var E;
244
+ const L = ((E = d.criteria_progress) == null ? void 0 : E.filter(
245
+ (O) => d.criteria.some(
246
+ (Y) => Y._id.toString() === O.criteria.toString()
247
+ )
248
+ )) || [];
249
+ return b[P.name] = L.length > 0 ? "Completed" : "In Progress", b;
250
+ },
251
+ {}
252
+ );
253
+ console.log(N);
254
+ const j = {
255
+ ID: d._id.toString(),
256
+ RefererName: ((t = d.pf_referer) == null ? void 0 : t.name) ?? "",
257
+ RefererPhone: ((e = d.pf_referer) == null ? void 0 : e.phoneNumber) ?? "",
258
+ RefereeName: ((o = d.pf_referee) == null ? void 0 : o.name) ?? "",
259
+ RefereePhone: ((c = d.pf_referee) == null ? void 0 : c.phoneNumber) ?? "",
260
+ ReferredAt: me(ue(d._id)).format(
261
+ "DD/MM/YYYY"
262
+ ),
263
+ Status: d.status,
264
+ Criteria: Object.entries(N).map(([b, P]) => `${b}: ${P}`).join(", ")
265
+ };
266
+ r.addRecord(j);
267
+ }
268
+ f.page++;
269
+ }
270
+ await oe(
271
+ r.buildExcel(),
272
+ `referrals-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
273
+ {
274
+ bookType: "xlsx",
275
+ bookSST: !1,
276
+ type: "array"
277
+ }
278
+ ), f.page = 1;
279
+ },
280
+ {
281
+ message: "Exporting referral records...",
282
+ successMessage: "Referral record exported successfully"
283
+ }
284
+ );
285
+ }
286
+ return Z(async () => {
287
+ await y();
288
+ }), (r, a) => {
289
+ const _ = x("FmSearch"), t = x("FmButton");
290
+ return B(), T(ee, null, [
291
+ I("div", null, [
292
+ I("div", _e, [
293
+ C(_, {
294
+ class: "mt-4",
295
+ modelValue: s(u).searchValue,
296
+ "onUpdate:modelValue": [
297
+ a[0] || (a[0] = (e) => s(u).searchValue = e),
298
+ s(F)
299
+ ],
300
+ placeholder: "Search",
301
+ collapsible: ""
302
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
303
+ C(t, {
304
+ icon: "ios_share",
305
+ variant: "tertiary",
306
+ onClick: M
307
+ })
308
+ ]),
309
+ C(te, {
310
+ loading: s(u).isLoading,
311
+ "row-data": s(h),
312
+ "row-count": s(u).totalRows,
313
+ "column-defs": k,
314
+ "shrink-at": !1,
315
+ "page-count": s(u).pageCount,
316
+ "page-index": s(u).pageIndex,
317
+ "page-size": s(u).pageSize,
318
+ onSortChange: s(n),
319
+ onPageChange: a[1] || (a[1] = (e) => s(y)({ pageSize: e.pageSize, pageIndex: e.pageIndex })),
320
+ onRowClick: a[2] || (a[2] = (e) => {
321
+ var o;
322
+ return (o = s(m)) == null ? void 0 : o.showSheet(!0, e.original);
323
+ })
324
+ }, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"])
325
+ ]),
326
+ C(ge, {
327
+ ref_key: "updateCriteriaProgressSheetRef",
328
+ ref: m,
329
+ onRefresh: s(y)
330
+ }, null, 8, ["onRefresh"])
331
+ ], 64);
332
+ };
333
+ }
334
+ });
335
+ export {
336
+ Be as default
337
+ };
@@ -1,25 +1,25 @@
1
1
  import { defineComponent as X, ref as x, computed as $, resolveComponent as f, openBlock as v, createBlock as U, unref as t, isRef as q, withCtx as A, createElementVNode as u, createVNode as d, createCommentVNode as k, createElementBlock as H, Fragment as Y, h as F, onMounted as G, toDisplayString as B } from "vue";
2
2
  import { _ as z } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as Q, components as L } from "@feedmepos/ui-library";
4
- import { f as j, u as J, p as ee } from "./loading-B56wz_ef.js";
5
- import { u as W, C as te } from "./membership-CF1jgR11.js";
6
- import { u as oe } from "./vue-i18n-rCSjqg2P.js";
4
+ import { f as j, u as J, p as ee } from "./loading-Bnuw5L3Y.js";
5
+ import { u as W, C as te } from "./membership-CZ_y58_j.js";
6
+ import { u as oe } from "./vue-i18n-DjADG98J.js";
7
7
  import { c as ae } from "./object-qECH92oz.js";
8
8
  import { Z as O } from "./zod-Bg2FbC-D.js";
9
- import "./index-DvE5xL4s.js";
10
- import { a as N } from "./index-BbPavTej.js";
9
+ import "./index-BX4S_sse.js";
10
+ import { a as N } from "./index-BY9zfO2Y.js";
11
11
  import { useCoreStore as le } from "@feedmepos/mf-common";
12
- import { _ as ne, a as ie } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-BCSO2-oB.js";
13
- import { _ as re } from "./EffectSheet.vue_vue_type_style_index_0_lang-q7qJ9Ec5.js";
12
+ import { _ as ne, a as ie } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-D3c0M6ga.js";
13
+ import { _ as re } from "./EffectSheet.vue_vue_type_style_index_0_lang-CtEk6tOC.js";
14
14
  import { J as K } from "./JsonViewer-v8_C7l5N.js";
15
- import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BTm3pDid.js";
16
- import { i as de } from "./helper-DJMf--V-.js";
17
- import { u as ce, r as M } from "./reward-BUY77BiP.js";
18
- import "./index-CVV5I3bh.js";
19
- import { C as pe } from "./campaign.fn-D8apF_YE.js";
20
- import { e as me } from "./effect-CDg44P_g.js";
15
+ import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BOJwFLp-.js";
16
+ import { i as de } from "./helper-DIBaFgT8.js";
17
+ import { u as ce, r as M } from "./reward-CXtVKCBn.js";
18
+ import "./index-BBW2oNKe.js";
19
+ import { C as pe } from "./campaign.fn-P4ZkJWZ1.js";
20
+ import { e as me } from "./effect-BDo1bV-w.js";
21
21
  import { useRouter as ue } from "vue-router";
22
- import { R as fe } from "./app-B8JBXu5M.js";
22
+ import { R as fe } from "./app-DGplfyjK.js";
23
23
  const ye = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__ */ X({
24
24
  __name: "EditRewardSheet",
25
25
  emits: ["update"],
@@ -1,19 +1,18 @@
1
1
  import { ref as p, defineComponent as T, computed as x, resolveComponent as y, openBlock as U, createBlock as G, unref as e, isRef as $, withCtx as b, createElementVNode as v, createVNode as u, toDisplayString as j } from "vue";
2
- import { u as B } from "./loading-B56wz_ef.js";
2
+ import { u as B } from "./loading-Bnuw5L3Y.js";
3
3
  import { J as P } from "./JsonViewer-v8_C7l5N.js";
4
- import { _ as D } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BTm3pDid.js";
5
- import { _ as I } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-DaT8PyWl.js";
4
+ import { _ as D } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BOJwFLp-.js";
5
+ import { _ as I } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-B3NgCEdV.js";
6
6
  import { Z as L } from "./zod-Bg2FbC-D.js";
7
7
  import { u as V } from "./app-wDQR6dpb.js";
8
8
  import { defineStore as N } from "pinia";
9
- import { r as k } from "./index-BmblCnlD.js";
10
- import "./index-Df84_Ww3.js";
11
- import "./index-DvE5xL4s.js";
12
- import "./index-DFbITElv.js";
13
- import { c as E } from "./index-BgXfVzZF.js";
14
- import "./index-B0n_PU3b.js";
15
- import "./index-BbPavTej.js";
16
- import { u as J } from "./vue-i18n-rCSjqg2P.js";
9
+ import { r as k } from "./index-KkaBP7vA.js";
10
+ import "./index-DDoUQHWH.js";
11
+ import "./index-BX4S_sse.js";
12
+ import { c as E } from "./index-BxpCMeMY.js";
13
+ import "./index-CFg7ea6S.js";
14
+ import "./index-BY9zfO2Y.js";
15
+ import { u as J } from "./vue-i18n-DjADG98J.js";
17
16
  import { c as C } from "./object-qECH92oz.js";
18
17
  import { useDialog as Z } from "@feedmepos/ui-library";
19
18
  const A = N("mf-connect-referral", () => {
@@ -103,7 +102,7 @@ const A = N("mf-connect-referral", () => {
103
102
  }, 8, ["modelValue", "header"]);
104
103
  };
105
104
  }
106
- }), de = /* @__PURE__ */ T({
105
+ }), me = /* @__PURE__ */ T({
107
106
  __name: "RewardGroup",
108
107
  setup(h, { expose: _ }) {
109
108
  const { minor: c } = B, n = Z(), m = A(), s = x(() => {
@@ -145,6 +144,6 @@ const A = N("mf-connect-referral", () => {
145
144
  }
146
145
  });
147
146
  export {
148
- de as _,
147
+ me as _,
149
148
  A as u
150
149
  };