@feedmepos/mf-connect 0.1.38-beta.22 → 0.1.38-beta.24

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 (96) hide show
  1. package/dist/{Analytic-CpzRbw6Z.js → Analytic-DIIOqI6t.js} +14 -14
  2. package/dist/{App-mXF5fxjZ.js → App-CdcDgvY7.js} +7 -7
  3. package/dist/{AuditLogs-CMqOkUZr.js → AuditLogs-CXwAnFj2.js} +11 -11
  4. package/dist/{Bin-8pdgFB9Z.js → Bin-Cz_EmQvg.js} +8 -8
  5. package/dist/{Broadcast-BPbUMgv9.js → Broadcast-BMa1Vabz.js} +9 -9
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B_J1oubC.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CV52UDC7.js} +6 -6
  7. package/dist/{Card-I1TPvKP2.js → Card-DY0aZEMz.js} +18 -18
  8. package/dist/{Collections-Bm7uK5bU.js → Collections-DJBPF3Sn.js} +7 -7
  9. package/dist/{Credit-D0atXzoF.js → Credit-OufxE9gh.js} +11 -11
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CFbgEftO.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CHx2S5GA.js} +50 -50
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CKfJClbj.js → EffectSheet.vue_vue_type_style_index_0_lang-CTwdP77j.js} +20 -20
  12. package/dist/{Experience-yPl537Z0.js → Experience-DNSdiaZp.js} +9 -9
  13. package/dist/{Game-D51In5o6.js → Game-CvpiNxP8.js} +10 -10
  14. package/dist/{Grab-CfFzOqVf.js → Grab-R7UK3MBX.js} +9 -9
  15. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js} +8 -8
  16. package/dist/{Index-e2fXLyP2.js → Index-BlCJP1AU.js} +54 -54
  17. package/dist/{Marketing-Co80L4R4.js → Marketing-dvZJgjik.js} +10 -10
  18. package/dist/{Member-Lbt60sle.js → Member-BQ8lPxer.js} +10 -10
  19. package/dist/{MemberList-BH4vPGKI.js → MemberList-btOTrbQl.js} +31 -31
  20. package/dist/{MemberTransactions-DeuCZtvO.js → MemberTransactions-Bn7IENl9.js} +1 -1
  21. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhvpOc4l.js → MessageInput.vue_vue_type_script_setup_true_lang-BnitWB_t.js} +2286 -2220
  22. package/dist/{Mission-flrnw4_V.js → Mission-CSZUxBZY.js} +10 -10
  23. package/dist/{Overview-BeSCDO-z.js → Overview-AWsKlfo9.js} +21 -21
  24. package/dist/{Point-CbPJF6zY.js → Point-Cs5ARAYb.js} +9 -9
  25. package/dist/{Promotion-ppwYxK04.js → Promotion-DhDB8Tbd.js} +10 -10
  26. package/dist/{Queue-BSRSIphF.js → Queue-CBe6W47A.js} +11 -11
  27. package/dist/{Record-A2ryIllF.js → Record-DOLUX9X4.js} +9 -9
  28. package/dist/{Reward-RAkE3L2b.js → Reward-DSGRvZ7y.js} +15 -15
  29. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-_TAl6moR.js → RewardGroup.vue_vue_type_script_setup_true_lang-DSGR-FDc.js} +11 -11
  30. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BZYLaJ1g.js → RuleGroup.vue_vue_type_script_setup_true_lang-Cbya-iI4.js} +185 -185
  31. package/dist/{Segment-CYVaOnLd.js → Segment-CRF7F3fy.js} +232 -232
  32. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-dKRYAPAC.js → SelectItems.vue_vue_type_script_setup_true_lang-CMFXf3f7.js} +14 -14
  33. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BuxR6tGK.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CkZPsecz.js} +11 -11
  34. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-HZ-szV_4.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-B-9A5Vw1.js} +3 -3
  35. package/dist/{Setting-BdVOv2fF.js → Setting-BKgJWdj1.js} +17 -17
  36. package/dist/{Store-C2vl-tSY.js → Store-CNHfu-Pl.js} +34 -34
  37. package/dist/{StoreRewards-OwfwKw4Z.js → StoreRewards-CrVvj8j9.js} +15 -15
  38. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-B7G-XEv7.js → StoreTransactions.vue_vue_type_script_setup_true_lang-cgoFRRLh.js} +21 -21
  39. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C0Jw4qmp.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BdM-2lqP.js} +1 -1
  40. package/dist/{Tier-CQWqWYQp.js → Tier-DvOUwWQz.js} +21 -21
  41. package/dist/{Title-B03AazFm.js → Title-CRspZyr_.js} +20 -20
  42. package/dist/{Transaction-CsmWCDjS.js → Transaction-BGc7qOQt.js} +2 -2
  43. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-D9MhrUdC.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Ca9QWPNE.js} +6 -6
  44. package/dist/{Voucher-BjTCDioi.js → Voucher-zROvoGPm.js} +13 -13
  45. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-D3cSsXPi.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CD2C0b2B.js} +86 -86
  46. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CcR6Ak9O.js → ZodTextField.vue_vue_type_script_setup_true_lang-xRq5NUye.js} +1 -1
  47. package/dist/app-CcrKXI5U.js +57962 -0
  48. package/dist/{app-BZS8hbi4.js → app-H6IgvNco.js} +32 -32
  49. package/dist/app.js +1 -1
  50. package/dist/{business-Oqy7tPH9.js → business-CPwOvpGD.js} +1 -1
  51. package/dist/{campaign-Bpu-WkHc.js → campaign-BGNxmSrr.js} +9 -9
  52. package/dist/{campaign-BFjMsenC.js → campaign-Dozf5twL.js} +2 -2
  53. package/dist/{campaign.enum-tI-fq-RU.js → campaign.enum-BFrMGQ7T.js} +1 -1
  54. package/dist/{campaign.fn-DnSyzNCW.js → campaign.fn-CIx0A0Ps.js} +30 -30
  55. package/dist/{collectible.enum-BT9B1DAn.js → collectible.enum-CYwwPBvg.js} +1 -1
  56. package/dist/{collection.fn-Q0ICmTCt.js → collection.fn-CxI950TL.js} +2 -2
  57. package/dist/{dto-BKZbH_5Z.js → dto-C2_6bjCG.js} +4 -4
  58. package/dist/{effect-Ev5GOyak.js → effect-XJbcCeBx.js} +1 -1
  59. package/dist/{email-addresses-HSXm7NzC.js → email-addresses-DRcfKo6t.js} +1 -1
  60. package/dist/{export-Dmw7vq5n.js → export-BFUNdp3a.js} +3 -3
  61. package/dist/{helper-DrBwjXJd.js → helper-B40jlG60.js} +1 -1
  62. package/dist/{index-B2HJgRP8.js → index-6JDE5-xO.js} +1 -1
  63. package/dist/{index-CLEOWcJj.js → index-B4Pwokmt.js} +1 -1
  64. package/dist/{index-YYhOm5p5.js → index-BFps3TvZ.js} +9 -7
  65. package/dist/{index-Cvk2jznV.js → index-BW9fkuya.js} +1 -1
  66. package/dist/{index-SlOkYO1R.js → index-BcpAuaGd.js} +1 -1
  67. package/dist/{index-DbDvM2VB.js → index-CL0BybAT.js} +1 -1
  68. package/dist/{index-DCtGS9iJ.js → index-Ch9Aa7hb.js} +7 -7
  69. package/dist/{index-Crg_hMJc.js → index-Crkl2Pua.js} +2 -2
  70. package/dist/{index-BJuCnCo9.js → index-D7FM5qup.js} +1 -1
  71. package/dist/{index-DYsVl8va.js → index-DkWYIiiy.js} +3 -3
  72. package/dist/{index-D1XdOqxU.js → index-Dlsfhj3g.js} +1 -1
  73. package/dist/{index-XDMj6KjH.js → index-F7hZ1yOK.js} +3 -3
  74. package/dist/{index-paKrqchu.js → index-RhUqg1Tl.js} +1 -1
  75. package/dist/{index-DhP0hPJy.js → index-Ta6CTZmb.js} +3 -3
  76. package/dist/{index.esm2017-CKyZQ9bN.js → index.esm2017-DlJnPRKQ.js} +1 -1
  77. package/dist/{loading-fAKR7hYD.js → loading-B3wvtmgh.js} +1 -1
  78. package/dist/{membership-CaZBYwW5.js → membership-DpfpIT9v.js} +3 -3
  79. package/dist/{money-DOhWY3sh.js → money-XJk2AEf9.js} +1 -1
  80. package/dist/{number-DGtIZHGZ.js → number-Ec4tNVBZ.js} +1 -1
  81. package/dist/{objectid-C0hgqKv3.js → objectid-D7z8NSmH.js} +4 -4
  82. package/dist/{plugins-FfzNmwCE.js → plugins-DZ3ydcdc.js} +2 -2
  83. package/dist/{reward-DzIcFmd0.js → reward-DURL6iKv.js} +1 -1
  84. package/dist/{rule-DK-66nJF.js → rule-BMJqZD3D.js} +3 -3
  85. package/dist/{rule-builder-BlS3MdnW.js → rule-builder-Dgnn6yE8.js} +20 -18
  86. package/dist/style.css +1 -1
  87. package/dist/{template-Wtw44sTH.js → template-DfVuvLbx.js} +5 -5
  88. package/dist/{timezone-SzPXGYwV.js → timezone-4zA4Eck_.js} +1 -1
  89. package/dist/{trigger-CehCt6EJ.js → trigger-CWh9m2Sd.js} +4 -4
  90. package/dist/usePagination-Ds-cuHop.js +223 -0
  91. package/dist/{user-BRklsZN_.js → user-BcxMf5qG.js} +1 -1
  92. package/dist/{vue-i18n-D8X2q1qS.js → vue-i18n-BQiDu4pW.js} +158 -158
  93. package/dist/{xlsx-Dzv15YMt.js → xlsx-DrYIuf7U.js} +1 -1
  94. package/package.json +4 -4
  95. package/dist/app-8DN8-SZI.js +0 -33357
  96. package/dist/usePagination-BeF5K3M7.js +0 -223
@@ -1,35 +1,35 @@
1
- import { defineComponent as ee, ref as z, resolveComponent as F, openBlock as p, createElementBlock as k, createElementVNode as i, createVNode as r, unref as t, createCommentVNode as le, withCtx as E, Fragment as O, renderList as ie, createBlock as J, toDisplayString as R, normalizeClass as re, onMounted as Se, computed as ce, isRef as Ie, createSlots as Me, h as Y, onBeforeMount as Te } from "vue";
1
+ import { defineComponent as ee, ref as z, resolveComponent as S, openBlock as p, createElementBlock as k, createElementVNode as l, createVNode as r, unref as t, createCommentVNode as le, withCtx as E, Fragment as O, renderList as ie, createBlock as J, toDisplayString as R, normalizeClass as re, onMounted as Se, computed as ce, isRef as Ie, createSlots as Me, h as Y, onBeforeMount as Te } from "vue";
2
2
  import { _ as Ee } from "./campaign-CpzFl8Vr.js";
3
- import { n as Ae, p as De } from "./plugins-FfzNmwCE.js";
4
- import { u as $e } from "./loading-fAKR7hYD.js";
3
+ import { n as Ae, p as De } from "./plugins-DZ3ydcdc.js";
4
+ import { u as $e } from "./loading-B3wvtmgh.js";
5
5
  import { FmButtonVariant as ae, useSnackbar as Re, components as X } from "@feedmepos/ui-library";
6
- import { u as we, _ as Fe } from "./usePagination-BeF5K3M7.js";
7
- import { u as be } from "./vue-i18n-D8X2q1qS.js";
8
- import "./index-YYhOm5p5.js";
9
- import { i as Pe, j as $, c as fe } from "./index-DCtGS9iJ.js";
10
- import "./index-Crg_hMJc.js";
11
- import "./index-D1XdOqxU.js";
12
- import "./index-DYsVl8va.js";
13
- import { u as ne, w as he } from "./xlsx-Dzv15YMt.js";
14
- import { e as Be, M as Ne } from "./email-addresses-HSXm7NzC.js";
6
+ import { u as we, _ as Fe } from "./usePagination-Ds-cuHop.js";
7
+ import { u as be } from "./vue-i18n-BQiDu4pW.js";
8
+ import "./index-BFps3TvZ.js";
9
+ import { i as Pe, j as $, c as fe } from "./index-Ch9Aa7hb.js";
10
+ import "./index-Crkl2Pua.js";
11
+ import "./index-Dlsfhj3g.js";
12
+ import "./index-DkWYIiiy.js";
13
+ import { u as ne, w as he } from "./xlsx-DrYIuf7U.js";
14
+ import { e as Be, M as Ne } from "./email-addresses-DRcfKo6t.js";
15
15
  import { Z as Ve } from "./zod-Bg2FbC-D.js";
16
16
  import { u as Ye } from "./app-wDQR6dpb.js";
17
- import { F as ye, z as Ue } from "./index-DhP0hPJy.js";
18
- import { R as ge } from "./rule-builder-BlS3MdnW.js";
19
- import { _ as Le } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CcR6Ak9O.js";
20
- import { _ as ze } from "./RuleGroup.vue_vue_type_script_setup_true_lang-BZYLaJ1g.js";
21
- import { u as Oe, v as je, w as qe } from "./index.esm2017-CKyZQ9bN.js";
17
+ import { F as ye, z as Ue } from "./index-Ta6CTZmb.js";
18
+ import { R as ge } from "./rule-builder-Dgnn6yE8.js";
19
+ import { _ as Le } from "./ZodTextField.vue_vue_type_script_setup_true_lang-xRq5NUye.js";
20
+ import { _ as ze } from "./RuleGroup.vue_vue_type_script_setup_true_lang-Cbya-iI4.js";
21
+ import { u as Oe, v as je, w as qe } from "./index.esm2017-DlJnPRKQ.js";
22
22
  import { F as Ge } from "./FileSaver.min-NlMItPOc.js";
23
23
  import { h as H } from "./moment-D7p2TMB-.js";
24
- import { s as B, u as He } from "./membership-CaZBYwW5.js";
24
+ import { s as B, u as He } from "./membership-DpfpIT9v.js";
25
25
  import { o as Je } from "./objectId-dwaoBfJX.js";
26
- import { u as Ce } from "./business-Oqy7tPH9.js";
27
- import { f as Qe } from "./number-DGtIZHGZ.js";
28
- import { t as We } from "./money-DOhWY3sh.js";
29
- import "./index-SlOkYO1R.js";
26
+ import { u as Ce } from "./business-CPwOvpGD.js";
27
+ import { f as Qe } from "./number-Ec4tNVBZ.js";
28
+ import { t as We } from "./money-XJk2AEf9.js";
29
+ import "./index-BcpAuaGd.js";
30
30
  import { useRouter as Ze } from "vue-router";
31
- import { m as ve } from "./index-BJuCnCo9.js";
32
- import { R as _e } from "./app-BZS8hbi4.js";
31
+ import { m as ve } from "./index-D7FM5qup.js";
32
+ import { R as _e } from "./app-H6IgvNco.js";
33
33
  const Ke = Pe.extend({
34
34
  _id: ye.optional(),
35
35
  business: ye.optional(),
@@ -57,8 +57,8 @@ const et = { class: "flex flex-col space-y-16" }, tt = {
57
57
  importFile: {}
58
58
  },
59
59
  emits: ["update:file"],
60
- setup(e, { emit: _ }) {
61
- const x = e, C = _, { t: m } = be(), y = z(null), f = z(null), b = ["Id"], s = [
60
+ setup(e, { emit: v }) {
61
+ const _ = e, C = v, { t: m } = be(), f = z(null), w = z(null), F = ["Id"], n = [
62
62
  {
63
63
  label: "CSV",
64
64
  icon: "csv",
@@ -70,91 +70,91 @@ const et = { class: "flex flex-col space-y-16" }, tt = {
70
70
  value: "xlsx"
71
71
  }
72
72
  ];
73
- async function n() {
74
- if (x.importFile)
73
+ async function i() {
74
+ if (_.importFile)
75
75
  try {
76
- const S = Oe(void 0, Xe.importFilesBucketUrl), g = je(S, x.importFile), w = await qe(g);
77
- window.open(w, "_blank");
78
- } catch (S) {
79
- console.log(S), Ae.error("Failed to download uploaded file");
76
+ const h = Oe(void 0, Xe.importFilesBucketUrl), y = je(h, _.importFile), x = await qe(y);
77
+ window.open(x, "_blank");
78
+ } catch (h) {
79
+ console.log(h), Ae.error("Failed to download uploaded file");
80
80
  }
81
81
  }
82
- async function c(S) {
83
- switch (S) {
82
+ async function c(h) {
83
+ switch (h) {
84
84
  case "csv":
85
- const g = new Blob([b.join(",")], {
85
+ const y = new Blob([F.join(",")], {
86
86
  type: "text/csv;charset=utf-8;"
87
87
  });
88
- Ge.saveAs(g, "ImportSegmentTemplate.csv");
88
+ Ge.saveAs(y, "ImportSegmentTemplate.csv");
89
89
  break;
90
90
  case "xlsx":
91
- const w = ne.aoa_to_sheet([b]), I = ne.book_new();
92
- ne.book_append_sheet(I, w, "Sheet1"), he(I, "ImportSegmentTemplate.xlsx");
91
+ const x = ne.aoa_to_sheet([F]), I = ne.book_new();
92
+ ne.book_append_sheet(I, x, "Sheet1"), he(I, "ImportSegmentTemplate.xlsx");
93
93
  break;
94
94
  }
95
95
  }
96
- function h(S) {
97
- y.value = S, C("update:file", y.value);
96
+ function b(h) {
97
+ f.value = h, C("update:file", f.value);
98
98
  }
99
- function A(S) {
100
- var w, I;
101
- const g = ((I = (w = S.target) == null ? void 0 : w.files) == null ? void 0 : I[0]) ?? null;
102
- h(g);
99
+ function A(h) {
100
+ var x, I;
101
+ const y = ((I = (x = h.target) == null ? void 0 : x.files) == null ? void 0 : I[0]) ?? null;
102
+ b(y);
103
103
  }
104
- return (S, g) => {
105
- const w = F("FmButton"), I = F("FmMenuItem"), d = F("FmMenu"), l = F("FmDropField");
104
+ return (h, y) => {
105
+ const x = S("FmButton"), I = S("FmMenuItem"), d = S("FmMenu"), s = S("FmDropField");
106
106
  return p(), k("div", et, [
107
- g[2] || (g[2] = i("div", { class: "fm-typo-en-title-sm-800" }, "Upload File", -1)),
108
- S.importFile ? (p(), k("div", tt, [
109
- r(w, {
107
+ y[2] || (y[2] = l("div", { class: "fm-typo-en-title-sm-800" }, "Upload File", -1)),
108
+ e.importFile ? (p(), k("div", tt, [
109
+ r(x, {
110
110
  label: t(m)("View uploaded file"),
111
111
  variant: t(ae).Plain,
112
112
  icon: "file_present",
113
- onClick: n
113
+ onClick: i
114
114
  }, null, 8, ["label", "variant"])
115
115
  ])) : le("", !0),
116
- i("div", null, [
117
- i("div", ot, [
116
+ l("div", null, [
117
+ l("div", ot, [
118
118
  r(d, { class: "" }, {
119
119
  "menu-button": E(() => [
120
- r(w, {
120
+ r(x, {
121
121
  variant: "tertiary",
122
122
  icon: "download",
123
123
  label: "Download Template"
124
124
  })
125
125
  ]),
126
126
  default: E(() => [
127
- (p(), k(O, null, ie(s, (v) => r(I, {
128
- key: v.value,
129
- icon: v.icon,
130
- label: v.label,
131
- onClick: (U) => c(v.value),
127
+ (p(), k(O, null, ie(n, (g) => r(I, {
128
+ key: g.value,
129
+ icon: g.icon,
130
+ label: g.label,
131
+ onClick: (U) => c(g.value),
132
132
  selectable: ""
133
133
  }, null, 8, ["icon", "label", "onClick"])), 64))
134
134
  ]),
135
135
  _: 1
136
136
  })
137
137
  ]),
138
- y.value ? (p(), k("div", at, [
139
- r(w, {
138
+ f.value ? (p(), k("div", at, [
139
+ r(x, {
140
140
  variant: t(ae).Tertiary,
141
141
  "prepend-icon": "attach_file"
142
142
  }, null, 8, ["variant"]),
143
- i("p", nt, R(y.value.name), 1),
144
- i("label", {
143
+ l("p", nt, R(f.value.name), 1),
144
+ l("label", {
145
145
  ref_key: "fileLabelRef",
146
- ref: f,
146
+ ref: w,
147
147
  htmlFor: "file"
148
148
  }, [
149
- r(w, {
149
+ r(x, {
150
150
  variant: t(ae).Plain,
151
151
  label: t(m)("Replace File"),
152
- onClick: g[1] || (g[1] = () => {
153
- var v;
154
- return (v = f.value) == null ? void 0 : v.click();
152
+ onClick: y[1] || (y[1] = () => {
153
+ var g;
154
+ return (g = w.value) == null ? void 0 : g.click();
155
155
  })
156
156
  }, null, 8, ["variant", "label"]),
157
- i("input", {
157
+ l("input", {
158
158
  id: "file",
159
159
  accept: ".csv",
160
160
  class: "hidden",
@@ -163,9 +163,9 @@ const et = { class: "flex flex-col space-y-16" }, tt = {
163
163
  onChange: A
164
164
  }, null, 32)
165
165
  ], 512)
166
- ])) : (p(), J(l, {
166
+ ])) : (p(), J(s, {
167
167
  key: 0,
168
- onFileUpload: g[0] || (g[0] = (v) => h(v)),
168
+ onFileUpload: y[0] || (y[0] = (g) => b(g)),
169
169
  accept: ".csv, .xlsx",
170
170
  "max-file-size": 2e7
171
171
  }))
@@ -180,69 +180,69 @@ const et = { class: "flex flex-col space-y-16" }, tt = {
180
180
  segment: {}
181
181
  },
182
182
  setup(e) {
183
- const _ = e, x = [
183
+ const v = e, _ = [
184
184
  {
185
185
  header: "Name",
186
- accessorFn: (n) => n.name
186
+ accessorFn: (i) => i.name
187
187
  },
188
188
  {
189
189
  header: "Id",
190
- accessorFn: (n) => n._id
190
+ accessorFn: (i) => i._id
191
191
  },
192
192
  {
193
193
  header: "Customer Since",
194
- accessorFn: (n) => H(Je(n._id.toString())).format("DD MMM YYYY")
194
+ accessorFn: (i) => H(Je(i._id.toString())).format("DD MMM YYYY")
195
195
  },
196
196
  {
197
197
  header: "Phone",
198
- accessorFn: (n) => n.phoneNumber
198
+ accessorFn: (i) => i.phoneNumber
199
199
  },
200
200
  {
201
201
  header: "Birthday",
202
- accessorFn: (n) => H(n.birthday).format("DD MMM YYYY")
202
+ accessorFn: (i) => H(i.birthday).format("DD MMM YYYY")
203
203
  },
204
204
  {
205
205
  header: "Last Visit",
206
- accessorFn: (n) => H(n.stats.lastVisit).format("DD MMM YYYY")
206
+ accessorFn: (i) => H(i.stats.lastVisit).format("DD MMM YYYY")
207
207
  }
208
208
  ];
209
- async function C(n) {
210
- return _.segment._id ? (console.log(n), await B.paginateSegmentUsers(
211
- _.segment._id,
212
- n
209
+ async function C(i) {
210
+ return v.segment._id ? (console.log(i), await B.paginateSegmentUsers(
211
+ v.segment._id,
212
+ i
213
213
  )) : {
214
214
  resources: [],
215
215
  meta: {
216
216
  totalResources: 0,
217
217
  totalPages: 0,
218
- skip: n.skip,
219
- limit: n.limit,
220
- sortBy: n.sortBy
218
+ skip: i.skip,
219
+ limit: i.limit,
220
+ sortBy: i.sortBy
221
221
  }
222
222
  };
223
223
  }
224
- const { tableMeta: m, rowData: y, onSort: f, debouncedFetchData: b, onSearch: s } = we(C);
224
+ const { tableMeta: m, rowData: f, onSort: w, debouncedFetchData: F, onSearch: n } = we(C);
225
225
  return Se(async () => {
226
- await b();
227
- }), (n, c) => (p(), k("div", lt, [
228
- i("div", it, R(_.title), 1),
229
- i("div", rt, [
230
- i("div", ct, R(n.segment.members.length), 1),
231
- i("div", dt, [
232
- c[1] || (c[1] = i("div", null, "contacts in your segment", -1)),
233
- i("div", null, "as of " + R(t(H)(n.segment.lastUpdated).format("DD MMM YYYY")), 1)
226
+ await F();
227
+ }), (i, c) => (p(), k("div", lt, [
228
+ l("div", it, R(v.title), 1),
229
+ l("div", rt, [
230
+ l("div", ct, R(e.segment.members.length), 1),
231
+ l("div", dt, [
232
+ c[1] || (c[1] = l("div", null, "contacts in your segment", -1)),
233
+ l("div", null, "as of " + R(t(H)(e.segment.lastUpdated).format("DD MMM YYYY")), 1)
234
234
  ])
235
235
  ]),
236
236
  r(Fe, {
237
237
  loading: t(m).isLoading,
238
- "row-data": t(y),
238
+ "row-data": t(f),
239
239
  "row-count": t(m).totalRows,
240
- "column-defs": x,
240
+ "column-defs": _,
241
241
  "page-size": t(m).pageSize,
242
242
  "page-count": t(m).pageCount,
243
243
  "page-index": t(m).pageIndex,
244
- onSortChange: t(f),
245
- onPageChange: c[0] || (c[0] = (h) => t(b)({ pageSize: h.pageSize, pageIndex: h.pageIndex }))
244
+ onSortChange: t(w),
245
+ onPageChange: c[0] || (c[0] = (b) => t(F)({ pageSize: b.pageSize, pageIndex: b.pageIndex }))
246
246
  }, null, 8, ["loading", "row-data", "row-count", "page-size", "page-count", "page-index", "onSortChange"])
247
247
  ]));
248
248
  }
@@ -253,8 +253,8 @@ const et = { class: "flex flex-col space-y-16" }, tt = {
253
253
  errorText: {}
254
254
  },
255
255
  emits: ["update:model-value"],
256
- setup(e, { emit: _ }) {
257
- const x = e, C = _, m = [
256
+ setup(e, { emit: v }) {
257
+ const _ = e, C = v, m = [
258
258
  {
259
259
  label: "Dynamic",
260
260
  sublabel: "Segment statistics are based on rules configured and will be recalculated automatically when rule changes.",
@@ -266,34 +266,34 @@ const et = { class: "flex flex-col space-y-16" }, tt = {
266
266
  value: $.enum.STATIC
267
267
  }
268
268
  ];
269
- function y(f) {
270
- f !== x.modelValue && C("update:model-value", f);
269
+ function f(w) {
270
+ w !== _.modelValue && C("update:model-value", w);
271
271
  }
272
- return (f, b) => {
273
- const s = F("FmCard"), n = F("FmHelperText");
272
+ return (w, F) => {
273
+ const n = S("FmCard"), i = S("FmHelperText");
274
274
  return p(), k("div", pt, [
275
- i("div", mt, [
276
- (p(), k(O, null, ie(m, (c) => r(s, {
275
+ l("div", mt, [
276
+ (p(), k(O, null, ie(m, (c) => r(n, {
277
277
  variant: "outlined",
278
278
  class: re(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-2", {
279
279
  "col-span-2": m.length == 1,
280
- "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": f.modelValue === c.value,
281
- "hover:bg-fm-color-opacity-sm": f.modelValue !== c.value
280
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": e.modelValue === c.value,
281
+ "hover:bg-fm-color-opacity-sm": e.modelValue !== c.value
282
282
  }]),
283
- onClick: (h) => y(c.value),
283
+ onClick: (b) => f(c.value),
284
284
  key: c.value
285
285
  }, {
286
286
  default: E(() => [
287
- i("div", ft, R(c.label), 1),
288
- i("div", yt, R(c.sublabel), 1)
287
+ l("div", ft, R(c.label), 1),
288
+ l("div", yt, R(c.sublabel), 1)
289
289
  ]),
290
290
  _: 2
291
291
  }, 1032, ["class", "onClick"])), 64))
292
292
  ]),
293
- f.errorText ? (p(), J(n, {
293
+ e.errorText ? (p(), J(i, {
294
294
  key: 0,
295
295
  class: "!mt-4",
296
- text: f.errorText,
296
+ text: e.errorText,
297
297
  state: "error"
298
298
  }, null, 8, ["text"])) : le("", !0)
299
299
  ]);
@@ -314,78 +314,78 @@ const et = { class: "flex flex-col space-y-16" }, tt = {
314
314
  }, bt = { class: "flex items-center gap-8" }, ht = /* @__PURE__ */ ee({
315
315
  __name: "SegmentSheet",
316
316
  emits: ["update:model-value"],
317
- setup(e, { expose: _, emit: x }) {
318
- const C = Ye(), m = z(!1), y = z(!1), f = {
317
+ setup(e, { expose: v, emit: _ }) {
318
+ const C = Ye(), m = z(!1), f = z(!1), w = {
319
319
  name: "",
320
320
  isActive: !0,
321
321
  type: $.enum.DYNAMIC,
322
322
  rule: ge.scaffoldGroup(),
323
323
  members: []
324
- }, b = Ke, s = z(f), n = ce(() => {
325
- const d = b.safeParse(s.value);
324
+ }, F = Ke, n = z(w), i = ce(() => {
325
+ const d = F.safeParse(n.value);
326
326
  return d.success ? [] : d.error.errors;
327
327
  });
328
328
  function c(d) {
329
- m.value = !0, y.value = !1, d ? s.value = {
329
+ m.value = !0, f.value = !1, d ? n.value = {
330
330
  ...d,
331
331
  isActive: d.isActive !== !1,
332
332
  type: d.type ?? (d.importFile ? $.enum.STATIC : $.enum.DYNAMIC)
333
- } : s.value = { ...f };
333
+ } : n.value = { ...w };
334
334
  }
335
- function h() {
335
+ function b() {
336
336
  m.value = !1;
337
337
  }
338
338
  async function A() {
339
- b.safeParse(s.value).success && (y.value = !0);
339
+ F.safeParse(n.value).success && (f.value = !0);
340
340
  }
341
- function S(d) {
342
- d === $.enum.STATIC ? h() : y.value = !1;
341
+ function h(d) {
342
+ d === $.enum.STATIC ? b() : f.value = !1;
343
343
  }
344
- async function g() {
345
- s.value.type === $.enum.STATIC ? (s.value.rule = ge.scaffoldGroup(), s.value.isActive = !0) : s.value.file = void 0, I("update:model-value", s.value);
344
+ async function y() {
345
+ n.value.type === $.enum.STATIC ? (n.value.rule = ge.scaffoldGroup(), n.value.isActive = !0) : n.value.file = void 0, I("update:model-value", n.value);
346
346
  }
347
- async function w(d) {
348
- s.value.type = d;
347
+ async function x(d) {
348
+ n.value.type = d;
349
349
  }
350
350
  Se(async () => {
351
351
  });
352
- const I = x;
353
- return _({
352
+ const I = _;
353
+ return v({
354
354
  showSheet: c,
355
- hideSheet: h
356
- }), (d, l) => {
357
- const v = F("FmButton"), U = F("FmSwitch"), a = F("FmSideSheet");
355
+ hideSheet: b
356
+ }), (d, s) => {
357
+ const g = S("FmButton"), U = S("FmSwitch"), a = S("FmSideSheet");
358
358
  return p(), J(a, {
359
359
  modelValue: t(m),
360
- "onUpdate:modelValue": l[8] || (l[8] = (o) => Ie(m) ? m.value = o : null),
360
+ "onUpdate:modelValue": s[8] || (s[8] = (o) => Ie(m) ? m.value = o : null),
361
361
  header: "Add segment",
362
362
  "dismiss-away": "",
363
363
  "close-button": !0,
364
364
  "max-width": 1100
365
365
  }, Me({
366
366
  "side-sheet-footer": E(() => [
367
- i("div", bt, [
368
- t(y) || t(s).type === t($).enum.STATIC ? (p(), k(O, { key: 0 }, [
369
- r(v, {
367
+ l("div", bt, [
368
+ t(f) || t(n).type === t($).enum.STATIC ? (p(), k(O, { key: 0 }, [
369
+ r(g, {
370
370
  label: "Save Segment",
371
- onClick: g,
371
+ onClick: y,
372
372
  loading: t(C).isLoading,
373
- disabled: t(n).length > 0 || t(C).isLoading
373
+ disabled: t(i).length > 0 || t(C).isLoading
374
374
  }, null, 8, ["loading", "disabled"]),
375
- r(v, {
375
+ r(g, {
376
376
  label: "Cancel",
377
- onClick: l[6] || (l[6] = (o) => S(t(s).type)),
377
+ onClick: s[6] || (s[6] = (o) => h(t(n).type)),
378
378
  variant: "tertiary"
379
379
  })
380
380
  ], 64)) : (p(), k(O, { key: 1 }, [
381
- r(v, {
381
+ r(g, {
382
382
  label: "Review Segment",
383
- disabled: t(n).length > 0 || t(C).isLoading,
383
+ disabled: t(i).length > 0 || t(C).isLoading,
384
384
  onClick: A
385
385
  }, null, 8, ["disabled"]),
386
- r(v, {
386
+ r(g, {
387
387
  label: "Cancel",
388
- onClick: l[7] || (l[7] = (o) => h()),
388
+ onClick: s[7] || (s[7] = (o) => b()),
389
389
  variant: "tertiary"
390
390
  })
391
391
  ], 64))
@@ -394,49 +394,49 @@ const et = { class: "flex flex-col space-y-16" }, tt = {
394
394
  default: E(() => {
395
395
  var o;
396
396
  return [
397
- t(y) ? (p(), J(ut, {
397
+ t(f) ? (p(), J(ut, {
398
398
  key: 1,
399
- title: t(s).name,
400
- segment: t(s)
399
+ title: t(n).name,
400
+ segment: t(n)
401
401
  }, null, 8, ["title", "segment"])) : (p(), k("div", _t, [
402
402
  r(Le, {
403
- modelValue: t(s).name,
404
- "onUpdate:modelValue": l[1] || (l[1] = (u) => t(s).name = u),
403
+ modelValue: t(n).name,
404
+ "onUpdate:modelValue": s[1] || (s[1] = (u) => t(n).name = u),
405
405
  label: "Segment title",
406
- schema: t(Ve).typeAtPath(t(b), "name")
406
+ schema: t(Ve).typeAtPath(t(F), "name")
407
407
  }, null, 8, ["modelValue", "schema"]),
408
- i("div", xt, [
409
- l[10] || (l[10] = i("div", { class: "fm-typo-en-title-sm-800" }, "Segment Type", -1)),
408
+ l("div", xt, [
409
+ s[10] || (s[10] = l("div", { class: "fm-typo-en-title-sm-800" }, "Segment Type", -1)),
410
410
  r(gt, {
411
- "model-value": t(s).type,
412
- "onUpdate:modelValue": l[2] || (l[2] = (u) => {
413
- w(u);
411
+ "model-value": t(n).type,
412
+ "onUpdate:modelValue": s[2] || (s[2] = (u) => {
413
+ x(u);
414
414
  })
415
415
  }, null, 8, ["model-value"])
416
416
  ]),
417
- t(s).type === t($).enum.DYNAMIC ? (p(), k("div", St, [
418
- l[11] || (l[11] = i("div", { class: "fm-typo-en-title-sm-800" }, "Segment Filter", -1)),
417
+ t(n).type === t($).enum.DYNAMIC ? (p(), k("div", St, [
418
+ s[11] || (s[11] = l("div", { class: "fm-typo-en-title-sm-800" }, "Segment Filter", -1)),
419
419
  r(ze, {
420
420
  "trigger-type": "MEMBERSHIP_JOINED",
421
421
  includeOnly: "user",
422
- "model-value": (o = t(s)) == null ? void 0 : o.rule,
423
- "onUpdate:modelValue": l[3] || (l[3] = (u) => {
424
- t(s).rule = u;
422
+ "model-value": (o = t(n)) == null ? void 0 : o.rule,
423
+ "onUpdate:modelValue": s[3] || (s[3] = (u) => {
424
+ t(n).rule = u;
425
425
  })
426
426
  }, null, 8, ["model-value"])
427
427
  ])) : (p(), k("div", wt, [
428
428
  r(st, {
429
- importFile: t(s).importFile,
430
- "onUpdate:file": l[4] || (l[4] = (u) => {
431
- t(s).file = u;
429
+ importFile: t(n).importFile,
430
+ "onUpdate:file": s[4] || (s[4] = (u) => {
431
+ t(n).file = u;
432
432
  })
433
433
  }, null, 8, ["importFile"])
434
434
  ])),
435
- t(s).type === t($).enum.DYNAMIC ? (p(), k("div", Ft, [
436
- l[12] || (l[12] = i("div", { class: "fm-typo-en-title-sm-800" }, "Segment Status", -1)),
435
+ t(n).type === t($).enum.DYNAMIC ? (p(), k("div", Ft, [
436
+ s[12] || (s[12] = l("div", { class: "fm-typo-en-title-sm-800" }, "Segment Status", -1)),
437
437
  r(U, {
438
- "model-value": t(s).isActive ?? !0,
439
- "onUpdate:modelValue": l[5] || (l[5] = (u) => t(s).isActive = u),
438
+ "model-value": t(n).isActive ?? !0,
439
+ "onUpdate:modelValue": s[5] || (s[5] = (u) => t(n).isActive = u),
440
440
  label: "Active",
441
441
  sublabel: "When enabled, this will recalculate the segment statistics daily.",
442
442
  "label-placement": "right"
@@ -447,16 +447,16 @@ const et = { class: "flex flex-col space-y-16" }, tt = {
447
447
  }),
448
448
  _: 2
449
449
  }, [
450
- t(y) ? {
450
+ t(f) ? {
451
451
  name: "side-sheet-header",
452
452
  fn: E(() => [
453
- i("div", vt, [
454
- r(v, {
453
+ l("div", vt, [
454
+ r(g, {
455
455
  icon: "arrow_back",
456
456
  variant: "tertiary",
457
- onClick: l[0] || (l[0] = (o) => y.value = !1)
457
+ onClick: s[0] || (s[0] = (o) => f.value = !1)
458
458
  }),
459
- l[9] || (l[9] = i("div", null, "Review segment", -1))
459
+ s[9] || (s[9] = l("div", null, "Review segment", -1))
460
460
  ])
461
461
  ]),
462
462
  key: "0"
@@ -466,18 +466,18 @@ const et = { class: "flex flex-col space-y-16" }, tt = {
466
466
  }
467
467
  }), xe = He(), Ct = Ce();
468
468
  function se(e) {
469
- const _ = H(e);
470
- return _.isValid() ? _.format("DD/MM/YYYY") : "";
469
+ const v = H(e);
470
+ return v.isValid() ? v.format("DD/MM/YYYY") : "";
471
471
  }
472
472
  const kt = {
473
473
  mapMemberExportRow: (e) => {
474
- var n, c, h, A, S, g, w, I, d, l, v, U, a, o, u, P, D, N, V, j, q, G, te, M, Q, de, ue, pe;
475
- const _ = ce(() => Ct.locations.map((T) => ({
474
+ var i, c, b, A, h, y, x, I, d, s, g, U, a, o, u, P, D, N, V, j, q, G, te, M, Q, de, ue, pe;
475
+ const v = ce(() => Ct.locations.map((T) => ({
476
476
  label: T.name,
477
477
  value: T._id
478
- }))), x = (n = Be.parseOneAddress(
478
+ }))), _ = (i = Be.parseOneAddress(
479
479
  e == null ? void 0 : e.email
480
- )) != null && n.domain.includes("feedmepos.com") ? void 0 : e.email, C = (h = ((c = e == null ? void 0 : e.collection) == null ? void 0 : c.TITLE) || []) == null ? void 0 : h.reduce(
480
+ )) != null && i.domain.includes("feedmepos.com") ? void 0 : e.email, C = (b = ((c = e == null ? void 0 : e.collection) == null ? void 0 : c.TITLE) || []) == null ? void 0 : b.reduce(
481
481
  (T, L) => {
482
482
  var Z, K;
483
483
  const W = (K = (Z = xe.sortedTitles) == null ? void 0 : Z.find(
@@ -495,21 +495,21 @@ const kt = {
495
495
  return T[L.name] = W ? H(W).format("DD/MM/YYYY") : "", T;
496
496
  },
497
497
  {}
498
- ), y = ((g = (S = (A = e.collection) == null ? void 0 : A.CREDIT) == null ? void 0 : S.at(0)) == null ? void 0 : g.balance) || 0, f = ((l = (d = (I = (w = e.collection) == null ? void 0 : w.CREDIT) == null ? void 0 : I.at(0)) == null ? void 0 : d.expiryBalance) == null ? void 0 : l.reduce(
498
+ ), f = ((y = (h = (A = e.collection) == null ? void 0 : A.CREDIT) == null ? void 0 : h.at(0)) == null ? void 0 : y.balance) || 0, w = ((s = (d = (I = (x = e.collection) == null ? void 0 : x.CREDIT) == null ? void 0 : I.at(0)) == null ? void 0 : d.expiryBalance) == null ? void 0 : s.reduce(
499
499
  (T, L) => T + L.amount,
500
500
  0
501
- )) || 0, b = Qe(y, 2);
501
+ )) || 0, F = Qe(f, 2);
502
502
  return {
503
503
  ID: e._id.toString(),
504
- Name: ((v = e.name) == null ? void 0 : v.trim()) || "",
504
+ Name: ((g = e.name) == null ? void 0 : g.trim()) || "",
505
505
  Phone: ((U = e == null ? void 0 : e.phoneNumber) == null ? void 0 : U.trim()) || "",
506
- Email: x || "",
506
+ Email: _ || "",
507
507
  Gender: e.gender || "",
508
508
  CardNo: e.cardNo || "",
509
509
  Birthday: e != null && e.birthday ? se(e == null ? void 0 : e.birthday) : "",
510
- Credit: parseFloat((Number(b) - Number(f)).toFixed(2)),
511
- FreeCredit: Number(f.toFixed(2)),
512
- TotalCredit: Number(b),
510
+ Credit: parseFloat((Number(F) - Number(w)).toFixed(2)),
511
+ FreeCredit: Number(w.toFixed(2)),
512
+ TotalCredit: Number(F),
513
513
  Exp: e != null && e.collection ? ((u = (o = (a = e.collection) == null ? void 0 : a.POINT) == null ? void 0 : o.at(0)) == null ? void 0 : u.balance) ?? 0 : 0,
514
514
  Point: e != null && e.collection ? ((N = (D = (P = e.collection) == null ? void 0 : P.COIN) == null ? void 0 : D.at(0)) == null ? void 0 : N.balance) ?? 0 : 0,
515
515
  Level: e != null && e.collection ? ((q = (j = (V = e.collection) == null ? void 0 : V.TIER) == null ? void 0 : j.at(0)) == null ? void 0 : q.balance) ?? 0 : 0,
@@ -526,7 +526,7 @@ const kt = {
526
526
  LastSeasonTierEarned: ((de = e.stats) == null ? void 0 : de.lastSeasonTierEarned) || 0,
527
527
  LastSeasonPointEarned: ((ue = e.stats) == null ? void 0 : ue.lastSeasonPointEarned) || 0,
528
528
  JoinedAt: se(e.joinAt || void 0),
529
- JoinedAtLocation: e.location && ((pe = _.value.find((T) => T.value == e.location)) == null ? void 0 : pe.label) || "-",
529
+ JoinedAtLocation: e.location && ((pe = v.value.find((T) => T.value == e.location)) == null ? void 0 : pe.label) || "-",
530
530
  VisitFrequency: `${Number(
531
531
  Math.ceil(e.stats.avgVisitFrequency).toFixed(0)
532
532
  )}`
@@ -535,13 +535,13 @@ const kt = {
535
535
  }, It = { class: "flex items-center" }, Mt = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, Tt = { class: "px-24 flex flex-col gap-y-16" }, Et = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, At = { class: "fm-typo-en-body-md-600" }, Dt = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, po = /* @__PURE__ */ ee({
536
536
  __name: "Segment",
537
537
  setup(e) {
538
- const { minor: _ } = $e, { t: x } = be(), C = Ce(), { mapMemberExportRow: m } = kt, y = Re(), f = Ze(), b = z(0), s = [
538
+ const { minor: v } = $e, { t: _ } = be(), C = Ce(), { mapMemberExportRow: m } = kt, f = Re(), w = Ze(), F = z(0), n = [
539
539
  {
540
- header: x("connect.loyalty.segment.table.name"),
540
+ header: _("connect.loyalty.segment.table.name"),
541
541
  accessorFn: (a) => a.name
542
542
  },
543
543
  {
544
- header: x("connect.loyalty.segment.table.status"),
544
+ header: _("connect.loyalty.segment.table.status"),
545
545
  enableSorting: !1,
546
546
  cell(a) {
547
547
  const o = a.row.original.isActive === !1 ? "Inactive" : "Active";
@@ -553,15 +553,15 @@ const kt = {
553
553
  }
554
554
  },
555
555
  {
556
- header: x("connect.loyalty.segment.table.total_customers"),
556
+ header: _("connect.loyalty.segment.table.total_customers"),
557
557
  accessorFn: (a) => a.memberCount ?? 0
558
558
  },
559
559
  {
560
- header: x("connect.loyalty.segment.table.customer_percentage"),
561
- accessorFn: (a) => ((a.memberCount ?? 0) * 100 / b.value).toFixed(2)
560
+ header: _("connect.loyalty.segment.table.customer_percentage"),
561
+ accessorFn: (a) => ((a.memberCount ?? 0) * 100 / F.value).toFixed(2)
562
562
  },
563
563
  {
564
- header: x("connect.loyalty.segment.table.actions"),
564
+ header: _("connect.loyalty.segment.table.actions"),
565
565
  meta: {
566
566
  maxWidth: "100px"
567
567
  },
@@ -586,7 +586,7 @@ const kt = {
586
586
  X.FmMenuItem,
587
587
  {
588
588
  onClick: async (o) => {
589
- o.stopPropagation(), w(a.row.original);
589
+ o.stopPropagation(), x(a.row.original);
590
590
  }
591
591
  },
592
592
  {
@@ -603,7 +603,7 @@ const kt = {
603
603
  X.FmMenuItem,
604
604
  {
605
605
  onClick: async (o) => {
606
- o.stopPropagation(), g(a.row.original);
606
+ o.stopPropagation(), y(a.row.original);
607
607
  }
608
608
  },
609
609
  {
@@ -622,19 +622,19 @@ const kt = {
622
622
  ]);
623
623
  }
624
624
  }
625
- ], n = z(null), { tableMeta: c, rowData: h, debouncedFetchData: A } = we(
625
+ ], i = z(null), { tableMeta: c, rowData: b, debouncedFetchData: A } = we(
626
626
  B.readAll
627
627
  );
628
- async function S() {
629
- await _(
628
+ async function h() {
629
+ await v(
630
630
  async () => {
631
631
  await B.refreshSegments(), await A({ pageSize: 10, pageIndex: 0 });
632
632
  },
633
633
  { message: "Refreshing segmentations" }
634
634
  );
635
635
  }
636
- async function g(a) {
637
- await De.remove(`Are you sure you want to remove ${a.name}?`) && await _(
636
+ async function y(a) {
637
+ await De.remove(`Are you sure you want to remove ${a.name}?`) && await v(
638
638
  async () => {
639
639
  await B.delete(a._id), await A({ pageSize: 10, pageIndex: 0 });
640
640
  },
@@ -644,7 +644,7 @@ const kt = {
644
644
  }
645
645
  );
646
646
  }
647
- async function w(a) {
647
+ async function x(a) {
648
648
  const o = {
649
649
  sortBy: "_id",
650
650
  descending: !1,
@@ -657,7 +657,7 @@ const kt = {
657
657
  sortBy: o.sortBy,
658
658
  descending: o.descending
659
659
  })).meta.totalResources ?? 0, D = o.rowsPerPage;
660
- await _(
660
+ await v(
661
661
  async () => {
662
662
  for (let N = 0; N < P; N += D) {
663
663
  const V = {
@@ -693,7 +693,7 @@ const kt = {
693
693
  );
694
694
  }
695
695
  async function I(a) {
696
- await _(
696
+ await v(
697
697
  async () => {
698
698
  var o;
699
699
  if (a.type === $.enum.STATIC) {
@@ -705,12 +705,12 @@ const kt = {
705
705
  const { file: P, ...D } = a;
706
706
  u.append("segment", JSON.stringify(D)), await B.createStatic(u);
707
707
  }
708
- a.file && y.open({
708
+ a.file && f.open({
709
709
  type: "info",
710
710
  title: "Import begins soon. Check Queue for updates.",
711
711
  action: "View",
712
712
  onAction: async () => {
713
- await f.push({
713
+ await w.push({
714
714
  name: _e["$connect-QUEUE"],
715
715
  query: { type: [fe.enum.SEGMENTATION_IMPORTED] }
716
716
  });
@@ -721,7 +721,7 @@ const kt = {
721
721
  await B.update(a._id, D);
722
722
  } else
723
723
  await B.create(a);
724
- await A({ pageSize: 10, pageIndex: 0 }), (o = n.value) == null || o.hideSheet();
724
+ await A({ pageSize: 10, pageIndex: 0 }), (o = i.value) == null || o.hideSheet();
725
725
  },
726
726
  {
727
727
  message: "Saving segment",
@@ -731,15 +731,15 @@ const kt = {
731
731
  }
732
732
  function d(a) {
733
733
  var o;
734
- (o = n.value) == null || o.showSheet(a);
734
+ (o = i.value) == null || o.showSheet(a);
735
735
  }
736
- const l = {
737
- label: x("connect.navigation.queue"),
736
+ const s = {
737
+ label: _("connect.navigation.queue"),
738
738
  value: "queue",
739
739
  isPrimary: !1,
740
740
  prependIcon: "work_history"
741
- }, v = ce(() => C.isPremium ? [
742
- l,
741
+ }, g = ce(() => C.isPremium ? [
742
+ s,
743
743
  {
744
744
  label: "Refresh segments",
745
745
  value: "refresh",
@@ -758,10 +758,10 @@ const kt = {
758
758
  d();
759
759
  break;
760
760
  case "refresh":
761
- S();
761
+ h();
762
762
  break;
763
763
  case "queue":
764
- f.push({
764
+ w.push({
765
765
  name: _e["$connect-QUEUE"],
766
766
  query: { type: [fe.enum.SEGMENTATION_IMPORTED] }
767
767
  });
@@ -776,30 +776,30 @@ const kt = {
776
776
  search: void 0,
777
777
  descending: !1
778
778
  });
779
- b.value = a.totalResources ?? 0, await A({ pageSize: 10, pageIndex: 0 }), await C.readPremium(), await C.readLocations();
779
+ F.value = a.totalResources ?? 0, await A({ pageSize: 10, pageIndex: 0 }), await C.readPremium(), await C.readLocations();
780
780
  }), (a, o) => {
781
- const u = F("FmPill"), P = F("FmPageHead"), D = F("FmIcon"), N = F("FmMenuItem"), V = F("FmMenu"), j = F("FmListItem"), q = F("FmList"), G = F("FmButton"), te = F("FmCard");
781
+ const u = S("FmPill"), P = S("FmPageHead"), D = S("FmIcon"), N = S("FmMenuItem"), V = S("FmMenu"), j = S("FmListItem"), q = S("FmList"), G = S("FmButton"), te = S("FmCard");
782
782
  return p(), k(O, null, [
783
783
  r(P, {
784
784
  title: "Segments",
785
- actions: t(v),
785
+ actions: t(g),
786
786
  "onClick:action": o[0] || (o[0] = (M) => U(M))
787
787
  }, {
788
788
  title: E(() => [
789
- i("div", It, [
790
- i("span", Mt, R(t(x)("connect.loyalty.segment.title")), 1),
789
+ l("div", It, [
790
+ l("span", Mt, R(t(_)("connect.loyalty.segment.title")), 1),
791
791
  r(u, { variant: "premium" })
792
792
  ])
793
793
  ]),
794
794
  _: 1
795
795
  }, 8, ["actions"]),
796
- i("div", Tt, [
797
- t(h).length > 0 || t(c).searchValue || t(c).isLoading ? (p(), k(O, { key: 0 }, [
796
+ l("div", Tt, [
797
+ t(b).length > 0 || t(c).searchValue || t(c).isLoading ? (p(), k(O, { key: 0 }, [
798
798
  r(Fe, {
799
799
  loading: t(c).isLoading,
800
- "row-data": t(h),
800
+ "row-data": t(b),
801
801
  "row-count": t(c).totalRows,
802
- "column-defs": s,
802
+ "column-defs": n,
803
803
  "shrink-at": !1,
804
804
  "page-count": t(c).pageCount,
805
805
  "page-index": t(c).pageIndex,
@@ -811,16 +811,16 @@ const kt = {
811
811
  }, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onPageChange"]),
812
812
  r(q, { class: "w-full hidden xs:block" }, {
813
813
  default: E(() => [
814
- (p(!0), k(O, null, ie(t(h), (M) => (p(), J(j, {
814
+ (p(!0), k(O, null, ie(t(b), (M) => (p(), J(j, {
815
815
  key: M._id.toString(),
816
816
  tag: "label",
817
817
  onClick: (Q) => d(M)
818
818
  }, {
819
819
  default: E(() => [
820
- i("div", null, [
821
- i("div", Et, R((M.memberCount ?? 0).toLocaleString()) + " total customers ", 1),
822
- i("div", At, R(M.name), 1),
823
- i("div", Dt, R(((M.memberCount ?? 0) * 100 / t(b)).toFixed(2)) + "% of customers ", 1)
820
+ l("div", null, [
821
+ l("div", Et, R((M.memberCount ?? 0).toLocaleString()) + " total customers ", 1),
822
+ l("div", At, R(M.name), 1),
823
+ l("div", Dt, R(((M.memberCount ?? 0) * 100 / t(F)).toFixed(2)) + "% of customers ", 1)
824
824
  ])
825
825
  ]),
826
826
  append: E(() => [
@@ -832,7 +832,7 @@ const kt = {
832
832
  r(N, {
833
833
  class: "text-fm-color-typo-error fm-typo-en-body-md-400",
834
834
  label: "Remove",
835
- "onUpdate:modelValue": (Q) => Q && g(M)
835
+ "onUpdate:modelValue": (Q) => Q && y(M)
836
836
  }, null, 8, ["onUpdate:modelValue"])
837
837
  ]),
838
838
  _: 2
@@ -849,13 +849,13 @@ const kt = {
849
849
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
850
850
  }, {
851
851
  default: E(() => [
852
- o[3] || (o[3] = i("img", {
852
+ o[3] || (o[3] = l("img", {
853
853
  src: Ee,
854
854
  class: "aspect-square w-[150px]"
855
855
  }, null, -1)),
856
- o[4] || (o[4] = i("div", { class: "flex flex-col gap-16 text-center" }, [
857
- i("div", { class: "fm-typo-en-title-sm-800" }, "Create customer segments"),
858
- i("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Segments allow you to categorize your customers based on various criteria, enabling targeted marketing and personalized experiences. ")
856
+ o[4] || (o[4] = l("div", { class: "flex flex-col gap-16 text-center" }, [
857
+ l("div", { class: "fm-typo-en-title-sm-800" }, "Create customer segments"),
858
+ l("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Segments allow you to categorize your customers based on various criteria, enabling targeted marketing and personalized experiences. ")
859
859
  ], -1)),
860
860
  r(G, {
861
861
  variant: "primary",
@@ -869,7 +869,7 @@ const kt = {
869
869
  })),
870
870
  r(ht, {
871
871
  ref_key: "sheetRef",
872
- ref: n,
872
+ ref: i,
873
873
  "onUpdate:modelValue": I
874
874
  }, null, 512)
875
875
  ])