@feedmepos/mf-connect 0.1.0-beta.6 → 0.1.0-beta.61

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 (119) hide show
  1. package/dist/Analytic-u9mtlxSv.js +427 -0
  2. package/dist/{App-C2616cfr.js → App-BwTQE7Ft.js} +445 -420
  3. package/dist/AuditLogs-BVMRclSw.js +1886 -0
  4. package/dist/Bin-Cca-XOkz.js +166 -0
  5. package/dist/{Broadcast-CqSwLTAq.js → Broadcast-DRQgpwdP.js} +56 -54
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DrR9Pmtb.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CeUu_T1u.js} +6 -8
  7. package/dist/Card-CnbB_u31.js +896 -0
  8. package/dist/Collections-BjlfOSC3.js +459 -0
  9. package/dist/{Credit-CPcLgnsq.js → Credit-BoElrcx9.js} +36 -34
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
  11. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-B3WVwem6.js +2181 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-D2buK6Dj.js → EffectSheet.vue_vue_type_style_index_0_lang-CGfpziKs.js} +18 -18
  14. package/dist/{Experience-BoBikt-x.js → Experience-SdGBf4vU.js} +32 -30
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
  16. package/dist/{Game-DR8PyYZa.js → Game-ChLHibpB.js} +39 -37
  17. package/dist/Index-D7Kq6uyf.js +259 -0
  18. package/dist/Marketing-BDajIqR_.js +20071 -0
  19. package/dist/Member-BPZryqWL.js +317 -0
  20. package/dist/MemberList-C52Dop8Z.js +1598 -0
  21. package/dist/MemberTransactions-DHU78kgS.js +45 -0
  22. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhtIZCjT.js → MessageInput.vue_vue_type_script_setup_true_lang-js1F2E4N.js} +83 -71
  23. package/dist/{Mission-CMpvz9zN.js → Mission-BQR3qjAu.js} +101 -87
  24. package/dist/Overview-BbLYWXjG.js +1078 -0
  25. package/dist/{Point-DkZn6p9s.js → Point-DbTcWJbQ.js} +55 -53
  26. package/dist/{Promotion-B7YzwPc_.js → Promotion-CIrpWBQD.js} +65 -57
  27. package/dist/Queue-B0Mfq2Vn.js +244 -0
  28. package/dist/Record-Z6ZrJeLc.js +340 -0
  29. package/dist/Reward-D6k0QFQA.js +442 -0
  30. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-GJ6j_jOh.js +150 -0
  31. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-gQxmX9ur.js +1637 -0
  32. package/dist/Segment-D6MF-EO8.js +568 -0
  33. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BWG-pz6F.js +181 -0
  34. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-HgorlHNz.js +147 -0
  35. package/dist/Setting--OFDS95z.js +1931 -0
  36. package/dist/Store-BqlRTC-c.js +1751 -0
  37. package/dist/{StoreRewards-6BzVwZqr.js → StoreRewards-BTu0IdDN.js} +33 -32
  38. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BX053DJA.js +943 -0
  39. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B6cAveco.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BAkuqLwy.js} +1 -1
  40. package/dist/{Tier-CW-46oJS.js → Tier-CE9LYAEX.js} +327 -318
  41. package/dist/{Title-CE9rWVdi.js → Title-DOOASUMI.js} +199 -184
  42. package/dist/{Transaction-B21RrC4M.js → Transaction-DPxUOBP-.js} +2 -2
  43. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-CKwf0F_i.js +130 -0
  44. package/dist/Voucher-D69DD02z.js +354 -0
  45. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-CFL0Nsez.js +419 -0
  46. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BiVZwBuG.js → ZodTextField.vue_vue_type_script_setup_true_lang-Byh6_EJM.js} +1 -1
  47. package/dist/app-C2u1t47T.js +7059 -0
  48. package/dist/app-DgfmbHZe.js +33357 -0
  49. package/dist/app.js +1 -1
  50. package/dist/{business-aHhRUXc0.js → business-BqCJB_vA.js} +1 -1
  51. package/dist/{campaign-DH9NUNf_.js → campaign-CWMPCmmU.js} +2 -2
  52. package/dist/campaign-D0dTbl5b.js +1810 -0
  53. package/dist/campaign.enum-DhE8N4pA.js +20 -0
  54. package/dist/campaign.fn-BpO-RQih.js +758 -0
  55. package/dist/collectible.enum-rWEc6Tsw.js +19 -0
  56. package/dist/{collection.fn-CYlsA-kW.js → collection.fn-biX2iFDQ.js} +2 -2
  57. package/dist/dto-3m7xZwfI.js +214 -0
  58. package/dist/{effect-LSc9YanX.js → effect-ZMGRxKCZ.js} +9 -9
  59. package/dist/email-addresses-lgY03bkq.js +705 -0
  60. package/dist/{export-Cf0-C5Ly.js → export-BOzeYUy8.js} +5 -5
  61. package/dist/{helper-CiZpeMCM.js → helper-CO29wun4.js} +1 -1
  62. package/dist/index-B3V7krW_.js +29000 -0
  63. package/dist/index-BVbiAxW8.js +115 -0
  64. package/dist/{index-D_83JP2i.js → index-Bvch9tuP.js} +48 -4
  65. package/dist/index-CYOwwy3h.js +44 -0
  66. package/dist/{index-D6cEOHP4.js → index-CbYXYVYp.js} +1501 -1480
  67. package/dist/{index-DtsDOuDx.js → index-ChrOXJDq.js} +24 -21
  68. package/dist/index-CsaQJMAR.js +66 -0
  69. package/dist/index-DNGenFnf.js +32 -0
  70. package/dist/{index-BVb5-Ht8.js → index-Dd22X409.js} +259 -173
  71. package/dist/{index-kPhrD63q.js → index-LYAWIqjk.js} +1 -1
  72. package/dist/index-Xh9cW6Y9.js +54 -0
  73. package/dist/{index-gxwjKu3-.js → index-XhqaicYu.js} +2212 -871
  74. package/dist/{index-DW3PRjPL.js → index-YsC4VklJ.js} +1 -1
  75. package/dist/index-vh86FiIQ.js +10 -0
  76. package/dist/{index.esm2017-B7oVYIbY.js → index.esm2017-CJ1flA6S.js} +121 -121
  77. package/dist/loading-CUs_CN1k.js +71 -0
  78. package/dist/{membership-Dw1ylJ9Y.js → membership-D-GVacos.js} +54 -46
  79. package/dist/money-CMtSALkX.js +15 -0
  80. package/dist/number-CDwwgAYM.js +12 -0
  81. package/dist/objectid-Bf9yKD81.js +145 -0
  82. package/dist/{loading-7yq1tinq.js → plugins-9sQTEyth.js} +3871 -3943
  83. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  84. package/dist/reward-DblXGhWc.js +36 -0
  85. package/dist/{rule-C0Q_SHow.js → rule-Cy8cTzuw.js} +180 -177
  86. package/dist/{rule-builder-iu17XIof.js → rule-builder-Cn5vZgFN.js} +1 -1
  87. package/dist/style.css +1 -1
  88. package/dist/{template-CyOanTMu.js → template-Cal94dUy.js} +5 -5
  89. package/dist/trigger-C1nwLSP8.js +144 -0
  90. package/dist/user-ir4Rn5bP.js +54 -0
  91. package/dist/{vue-i18n-B0fLJH7a.js → vue-i18n-eOHBBaH5.js} +243 -243
  92. package/dist/{xlsx-BYO_bB9J.js → xlsx-DulnT75_.js} +1 -1
  93. package/package.json +11 -7
  94. package/dist/Analytic-muDf0oMG.js +0 -622
  95. package/dist/Card-bhLoK0ZV.js +0 -825
  96. package/dist/Collections-DjtsAiol.js +0 -453
  97. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-U_QZneS6.js +0 -2813
  98. package/dist/Marketing-Dny2nMUl.js +0 -316
  99. package/dist/Member-CP_smyk8.js +0 -69
  100. package/dist/MemberList-CR3eYI9p.js +0 -1733
  101. package/dist/MemberTransactions-RTx_lKFb.js +0 -38
  102. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Cs67_GLE.js +0 -1753
  103. package/dist/Segment-Bb4gHt5V.js +0 -437
  104. package/dist/Setting-Xj0AVzh3.js +0 -1901
  105. package/dist/Store-BWRHQ6Ie.js +0 -1511
  106. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BsFnT8BS.js +0 -890
  107. package/dist/Voucher-KK9fBI0u.js +0 -490
  108. package/dist/app-CjhXHUQv.js +0 -53428
  109. package/dist/app-Dvf_JNMf.js +0 -5764
  110. package/dist/dto-DArfyZAI.js +0 -2770
  111. package/dist/index-Bi_LGEtY.js +0 -99
  112. package/dist/index-CiQDG7Cm.js +0 -762
  113. package/dist/index-CuvNtC_M.js +0 -61
  114. package/dist/index-DQfjSSMF.js +0 -206
  115. package/dist/index-DcxssxPi.js +0 -29193
  116. package/dist/index-DqJVH2kv.js +0 -298
  117. package/dist/money-CPd0XTNv.js +0 -15
  118. package/dist/number-BgXY4un8.js +0 -12
  119. package/dist/user-Bm4KttFq.js +0 -37
@@ -1,26 +1,27 @@
1
- import { defineComponent as j, ref as V, computed as A, h as E, onMounted as M, resolveComponent as l, openBlock as d, createElementBlock as h, Fragment as b, createVNode as r, unref as t, withCtx as g, createElementVNode as n, toDisplayString as c, renderList as H, createBlock as w, resolveDynamicComponent as q } from "vue";
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 b, Fragment as w, createVNode as r, unref as t, withCtx as y, createElementVNode as n, toDisplayString as c, renderList as H, createBlock as C, 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-7yq1tinq.js";
5
- import { u as X } from "./business-aHhRUXc0.js";
6
- import { u as Y } from "./campaign-DH9NUNf_.js";
7
- import { g as I, b as P } from "./dto-DArfyZAI.js";
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-U_QZneS6.js";
10
- import { u as te } from "./template-CyOanTMu.js";
11
- import { u as oe } from "./vue-i18n-B0fLJH7a.js";
12
- import { c as _ } from "./index-Bi_LGEtY.js";
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({
4
+ import { p as Q } from "./plugins-9sQTEyth.js";
5
+ import { u as W } from "./loading-CUs_CN1k.js";
6
+ import { u as X } from "./business-BqCJB_vA.js";
7
+ import { u as Y } from "./campaign-CWMPCmmU.js";
8
+ import { g as Z, a as V, b as I } from "./campaign-D0dTbl5b.js";
9
+ import { _ as ee } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
10
+ import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-B3WVwem6.js";
11
+ import { u as oe } from "./template-Cal94dUy.js";
12
+ import { u as ae } from "./vue-i18n-eOHBBaH5.js";
13
+ import { c as _ } from "./index-BVbiAxW8.js";
14
+ const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-center justify-between w-full" }, le = { class: "flex gap-8 overflow-x-auto" }, ce = { class: "space-y-8" }, me = { class: "flex w-full gap-4 items-center" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pe = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, fe = { 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" }, ye = { class: "flex flex-col gap-16 text-center" }, _e = { class: "fm-typo-en-title-sm-800" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ke = /* @__PURE__ */ j({
14
15
  __name: "Point",
15
- setup(he) {
16
- const { t: s } = oe(), B = {
16
+ setup(be) {
17
+ const { t: s } = ae(), B = {
17
18
  label: s("connect.program.common.actions.create", {
18
19
  type: s("connect.program.point.title").toLowerCase()
19
20
  }),
20
21
  value: "create",
21
22
  isPrimary: !0,
22
23
  prependIcon: "add"
23
- }, $ = te("COIN", G()), x = X(), m = Y(), { global: K, minor: C } = W, i = V({
24
+ }, $ = oe("COIN", G()), h = X(), m = Y(), { global: K, minor: x } = W, i = P({
24
25
  searchKey: "",
25
26
  location: null
26
27
  }), u = A(
@@ -34,13 +35,14 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
34
35
  },
35
36
  {
36
37
  header: s("connect.program.common.table.status"),
38
+ accessorFn: (e) => Z(e),
37
39
  cell(e) {
38
- return I(e.row.original);
40
+ return V(e.row.original);
39
41
  }
40
42
  },
41
43
  {
42
44
  header: s("connect.program.common.table.summary"),
43
- accessorFn: (e) => P(e)
45
+ accessorFn: (e) => I(e)
44
46
  },
45
47
  {
46
48
  header: s("connect.program.common.table.actions"),
@@ -55,9 +57,9 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
55
57
  });
56
58
  }
57
59
  }
58
- ], v = V();
60
+ ], v = P();
59
61
  async function F(e) {
60
- await Q.remove(`Are you sure you want to remove ${e.name}?`) && await C(
62
+ await Q.remove(`Are you sure you want to remove ${e.name}?`) && await x(
61
63
  async () => {
62
64
  await _.delete(e._id), await m.read("COIN");
63
65
  },
@@ -72,8 +74,8 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
72
74
  await o(p);
73
75
  });
74
76
  async function o(p) {
75
- var y;
76
- (y = v.value) == null || y.showSheet(
77
+ var g;
78
+ (g = v.value) == null || g.showSheet(
77
79
  !0,
78
80
  "COIN",
79
81
  e ? await _.readById(e._id) : void 0,
@@ -82,7 +84,7 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
82
84
  }
83
85
  }
84
86
  async function R(e) {
85
- await C(
87
+ await x(
86
88
  async () => {
87
89
  e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await m.read("COIN");
88
90
  },
@@ -97,22 +99,22 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
97
99
  await m.read("COIN");
98
100
  });
99
101
  }), (e, o) => {
100
- const p = l("FmPill"), y = l("FmPageHead"), k = l("FmSearch"), O = l("FmTable"), S = l("FmButton"), U = l("FmListItem"), D = l("FmList"), T = l("FmCard");
101
- return d(), h(b, null, [
102
- r(y, {
102
+ const p = l("FmPill"), g = l("FmPageHead"), k = l("FmSearch"), O = l("FmTable"), S = l("FmButton"), U = l("FmListItem"), D = l("FmList"), T = l("FmCard");
103
+ return d(), b(w, null, [
104
+ r(g, {
103
105
  title: t(s)("connect.program.point.title"),
104
- actions: t(u).length > 0 ? [B] : [],
106
+ actions: t(u).length > 0 && t(h).isPremium ? [B] : [],
105
107
  "onClick:action": o[0] || (o[0] = () => f())
106
108
  }, {
107
- title: g(() => [
108
- n("div", ae, [
109
- n("span", ne, c(t(s)("connect.program.point.title")), 1),
109
+ title: y(() => [
110
+ n("div", ne, [
111
+ n("span", se, c(t(s)("connect.program.point.title")), 1),
110
112
  r(p, { variant: "premium" })
111
113
  ])
112
114
  ]),
113
115
  _: 1
114
116
  }, 8, ["title", "actions"]),
115
- n("div", se, [
117
+ n("div", ie, [
116
118
  r(k, {
117
119
  modelValue: t(i).searchKey,
118
120
  "onUpdate:modelValue": o[1] || (o[1] = (a) => t(i).searchKey = a),
@@ -120,17 +122,17 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
120
122
  placeholder: "search",
121
123
  collapsible: ""
122
124
  }, null, 8, ["modelValue"]),
123
- t(m).campaigns.point && t(m).campaigns.point.length > 0 ? (d(), h(b, { key: 0 }, [
124
- n("div", ie, [
125
- n("div", re, [
126
- r(Z, {
125
+ t(m).campaigns.point && t(m).campaigns.point.length > 0 ? (d(), b(w, { key: 0 }, [
126
+ n("div", re, [
127
+ n("div", le, [
128
+ r(ee, {
127
129
  modelValue: t(i).location,
128
130
  "onUpdate:modelValue": o[2] || (o[2] = (a) => t(i).location = a),
129
131
  label: "Location: ",
130
132
  "show-item-label": !0,
131
133
  icon: "storefront",
132
134
  placement: "bottom-start",
133
- items: t(x).locationItems
135
+ items: t(h).locationItems
134
136
  }, null, 8, ["modelValue", "items"])
135
137
  ]),
136
138
  r(k, {
@@ -151,25 +153,25 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
151
153
  "hide-footer": t(u).length < 10
152
154
  }, null, 8, ["row-data", "search-value", "hide-footer"]),
153
155
  r(D, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
154
- default: g(() => [
155
- (d(!0), h(b, null, H(t(u).filter(
156
+ default: y(() => [
157
+ (d(!0), b(w, null, H(t(u).filter(
156
158
  (a) => a.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
157
- ), (a) => (d(), w(U, {
159
+ ), (a) => (d(), C(U, {
158
160
  key: a._id.toString(),
159
161
  onClick: (L) => f(a),
160
162
  class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
161
163
  }, {
162
- default: g(() => [
163
- n("div", le, [
164
- n("div", ce, [
165
- (d(), w(q(t(I)(a)))),
166
- n("div", me, c(t(s)("program.point.used", { count: a.currentReceive ?? 0 })), 1)
164
+ default: y(() => [
165
+ n("div", ce, [
166
+ n("div", me, [
167
+ (d(), C(q(t(V)(a)))),
168
+ n("div", de, c(t(s)("program.point.used", { count: a.currentReceive ?? 0 })), 1)
167
169
  ]),
168
- n("div", de, [
169
- n("div", pe, c(a.name), 1),
170
- n("div", ue, c(t(P)(a)), 1)
170
+ n("div", pe, [
171
+ n("div", ue, c(a.name), 1),
172
+ n("div", fe, c(t(I)(a)), 1)
171
173
  ]),
172
- n("div", fe, " Point received: " + c(a.currentReceive ?? 0), 1)
174
+ n("div", ge, " Point received: " + c(a.currentReceive ?? 0), 1)
173
175
  ]),
174
176
  r(S, {
175
177
  icon: "delete",
@@ -183,31 +185,31 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
183
185
  ]),
184
186
  _: 1
185
187
  })
186
- ], 64)) : (d(), w(T, {
188
+ ], 64)) : (d(), C(T, {
187
189
  key: 1,
188
190
  variant: "outlined",
189
191
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
190
192
  }, {
191
- default: g(() => [
193
+ default: y(() => [
192
194
  o[6] || (o[6] = n("img", {
193
195
  src: z,
194
196
  class: "aspect-square w-[150px]"
195
197
  }, null, -1)),
196
198
  n("div", ye, [
197
- n("div", ge, c(t(s)("connect.program.point.empty_state.title")), 1),
198
- n("div", _e, c(t(s)("connect.program.point.empty_state.description")), 1)
199
+ n("div", _e, c(t(s)("connect.program.point.empty_state.title")), 1),
200
+ n("div", he, c(t(s)("connect.program.point.empty_state.description")), 1)
199
201
  ]),
200
202
  r(S, {
201
203
  variant: "primary",
202
204
  label: "Create point program",
203
- disabled: !t(x).isPremium,
205
+ disabled: !t(h).isPremium,
204
206
  icon: "add",
205
207
  onClick: o[5] || (o[5] = (a) => f())
206
208
  }, null, 8, ["disabled"])
207
209
  ]),
208
210
  _: 1
209
211
  })),
210
- r(ee, {
212
+ r(te, {
211
213
  ref_key: "sheetRef",
212
214
  ref: v,
213
215
  "onSubmit:modelValue": R
@@ -218,5 +220,5 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
218
220
  }
219
221
  });
220
222
  export {
221
- Be as default
223
+ Ke as default
222
224
  };
@@ -1,19 +1,20 @@
1
- import { defineComponent as H, ref as S, computed as q, h as z, onMounted as G, resolveComponent as l, openBlock as m, createElementBlock as h, Fragment as w, createVNode as r, unref as a, createElementVNode as s, withCtx as v, renderList as J, createBlock as b, resolveDynamicComponent as Q, toDisplayString as g } from "vue";
1
+ import { defineComponent as H, ref as P, 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-7yq1tinq.js";
5
- import { u as ee } from "./business-aHhRUXc0.js";
6
- import { u as oe } from "./campaign-DH9NUNf_.js";
7
- import { u as te } from "./vue-i18n-B0fLJH7a.js";
8
- import { g as V } from "./dto-DArfyZAI.js";
9
- import { e as L } from "./effect-LSc9YanX.js";
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-U_QZneS6.js";
12
- import { u as se } from "./template-CyOanTMu.js";
13
- import { c as u } from "./index-Bi_LGEtY.js";
14
- const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-center justify-between w-full" }, le = { class: "flex gap-8 overflow-x-auto" }, ce = { 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({
4
+ import { c as O, p as I } from "./plugins-9sQTEyth.js";
5
+ import { u as Z } from "./loading-CUs_CN1k.js";
6
+ import { u as ee } from "./business-BqCJB_vA.js";
7
+ import { u as oe } from "./campaign-CWMPCmmU.js";
8
+ import { u as te } from "./vue-i18n-eOHBBaH5.js";
9
+ import { g as ne, a as V } from "./campaign-D0dTbl5b.js";
10
+ import { e as L } from "./effect-ZMGRxKCZ.js";
11
+ import { _ as ae } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
12
+ import { _ as se } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-B3WVwem6.js";
13
+ import { u as ce } from "./template-Cal94dUy.js";
14
+ import { c as u } from "./index-BVbiAxW8.js";
15
+ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-center justify-between w-full" }, le = { class: "flex gap-8 overflow-x-auto" }, me = { class: "space-y-8" }, pe = { class: "flex w-full gap-4 items-center" }, de = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, 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__ */ H({
15
16
  __name: "Promotion",
16
- setup(_e) {
17
+ setup(he) {
17
18
  const { t } = te(), T = {
18
19
  label: t("connect.promotion.createCampaign"),
19
20
  value: "create",
@@ -24,12 +25,12 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
24
25
  value: "sync",
25
26
  isPrimary: !1,
26
27
  prependIcon: "refresh"
27
- }, M = se("PROMOTION", X()), x = ee(), f = oe(), { global: R, minor: _ } = Z, i = S({
28
+ }, M = ce("PROMOTION", X()), x = ee(), f = oe(), { global: R, minor: _ } = Z, c = P({
28
29
  searchKey: "",
29
30
  location: null
30
- }), c = q(
31
+ }), l = q(
31
32
  () => f.campaigns.promotion.filter(
32
- (e) => !i.value.location || !e.targetLocation || e.targetLocation.includes(i.value.location)
33
+ (e) => !c.value.location || !e.targetLocation || e.targetLocation.includes(c.value.location)
33
34
  )
34
35
  ), K = [
35
36
  {
@@ -38,6 +39,7 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
38
39
  },
39
40
  {
40
41
  header: t("connect.promotion.status"),
42
+ accessorFn: (e) => ne(e),
41
43
  cell(e) {
42
44
  return V(e.row.original);
43
45
  }
@@ -63,15 +65,19 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
63
65
  });
64
66
  }
65
67
  }
66
- ], C = S();
68
+ ], C = P();
67
69
  async function F(e) {
68
- await I.remove(t("promotion.confirmRemove", { name: e.name })) && await _(
70
+ await I.remove(
71
+ t("connect.promotion.confirmRemove", { name: e.name })
72
+ ) && await _(
69
73
  async () => {
70
74
  await u.delete(e._id), await f.read("PROMOTION");
71
75
  },
72
76
  {
73
- message: t("promotion.removing", { name: e.name }),
74
- successMessage: t("promotion.removedSuccessfully", { name: e.name })
77
+ message: t("connect.promotion.removing", { name: e.name }),
78
+ successMessage: t("connect.promotion.removedSuccessfully", {
79
+ name: e.name
80
+ })
75
81
  }
76
82
  );
77
83
  }
@@ -95,9 +101,11 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
95
101
  e.campaign._id ? await u.update(e.campaign._id, e) : await u.create(e), await f.read("PROMOTION");
96
102
  },
97
103
  {
98
- message: t(e.campaign._id ? "promotion.updating" : "promotion.creating"),
104
+ message: t(
105
+ e.campaign._id ? "connect.promotion.updating" : "connect.promotion.creating"
106
+ ),
99
107
  successMessage: t(
100
- e.campaign._id ? "promotion.updatedSuccessfully" : "promotion.createdSuccessfully"
108
+ e.campaign._id ? "connect.promotion.updatedSuccessfully" : "connect.promotion.createdSuccessfully"
101
109
  )
102
110
  }
103
111
  );
@@ -128,27 +136,27 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
128
136
  await x.readLocations(), await f.read("PROMOTION");
129
137
  });
130
138
  }), (e, n) => {
131
- const p = l("FmPageHead"), d = l("FmSearch"), $ = l("FmTable"), D = l("FmChip"), k = l("FmButton"), U = l("FmListItem"), j = l("FmList"), E = l("FmCard");
139
+ const p = r("FmPageHead"), d = r("FmSearch"), $ = r("FmTable"), D = r("FmChip"), k = r("FmButton"), U = r("FmListItem"), j = r("FmList"), E = r("FmCard");
132
140
  return m(), h(w, null, [
133
- r(p, {
141
+ i(p, {
134
142
  title: a(t)("connect.promotion.title"),
135
- actions: a(c).length > 0 ? [T, B] : [],
143
+ actions: a(l).length > 0 ? [T, B] : [],
136
144
  "onClick:action": A
137
145
  }, null, 8, ["title", "actions"]),
138
146
  s("div", ie, [
139
- r(d, {
140
- modelValue: i.value.searchKey,
141
- "onUpdate:modelValue": n[0] || (n[0] = (o) => i.value.searchKey = o),
147
+ i(d, {
148
+ modelValue: c.value.searchKey,
149
+ "onUpdate:modelValue": n[0] || (n[0] = (o) => c.value.searchKey = o),
142
150
  class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
143
151
  placeholder: a(t)("connect.promotion.search"),
144
152
  collapsible: ""
145
153
  }, null, 8, ["modelValue", "placeholder"]),
146
- a(c) && a(c).length > 0 ? (m(), h(w, { key: 0 }, [
154
+ a(l) && a(l).length > 0 ? (m(), h(w, { key: 0 }, [
147
155
  s("div", re, [
148
156
  s("div", le, [
149
- r(ne, {
150
- modelValue: i.value.location,
151
- "onUpdate:modelValue": n[1] || (n[1] = (o) => i.value.location = o),
157
+ i(ae, {
158
+ modelValue: c.value.location,
159
+ "onUpdate:modelValue": n[1] || (n[1] = (o) => c.value.location = o),
152
160
  label: a(t)("connect.promotion.location"),
153
161
  "show-item-label": !0,
154
162
  icon: "storefront",
@@ -156,52 +164,52 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
156
164
  items: a(x).locationItems
157
165
  }, null, 8, ["modelValue", "label", "items"])
158
166
  ]),
159
- r(d, {
160
- modelValue: i.value.searchKey,
161
- "onUpdate:modelValue": n[2] || (n[2] = (o) => i.value.searchKey = o),
167
+ i(d, {
168
+ modelValue: c.value.searchKey,
169
+ "onUpdate:modelValue": n[2] || (n[2] = (o) => c.value.searchKey = o),
162
170
  class: "xs:hidden",
163
171
  placeholder: "search",
164
172
  collapsible: ""
165
173
  }, null, 8, ["modelValue"])
166
174
  ]),
167
- r($, {
175
+ i($, {
168
176
  class: "xs:hidden",
169
- "row-data": a(c),
177
+ "row-data": a(l),
170
178
  "column-defs": K,
171
- "search-value": i.value.searchKey,
179
+ "search-value": c.value.searchKey,
172
180
  "column-filter": [],
173
181
  onRowClick: n[3] || (n[3] = (o) => y(o.original)),
174
- "hide-footer": a(c).length < 10
182
+ "hide-footer": a(l).length < 10
175
183
  }, null, 8, ["row-data", "search-value", "hide-footer"]),
176
- r(j, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
184
+ i(j, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
177
185
  default: v(() => [
178
- (m(!0), h(w, null, J(a(c).filter(
179
- (o) => o.name.toLowerCase().includes(i.value.searchKey.toLowerCase())
186
+ (m(!0), h(w, null, J(a(l).filter(
187
+ (o) => o.name.toLowerCase().includes(c.value.searchKey.toLowerCase())
180
188
  ), (o) => (m(), b(U, {
181
189
  key: o._id.toString(),
182
- onClick: (P) => y(o),
190
+ onClick: (S) => y(o),
183
191
  class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
184
192
  }, {
185
193
  default: v(() => [
186
- s("div", ce, [
187
- s("div", me, [
194
+ s("div", me, [
195
+ s("div", pe, [
188
196
  (m(), b(Q(a(V)(o)))),
189
- r(D, {
197
+ i(D, {
190
198
  class: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
191
199
  compact: !0,
192
200
  label: `${a(O).title(o.effect.options.target)} promotion`
193
201
  }, null, 8, ["label"])
194
202
  ]),
195
- s("div", pe, [
196
- s("div", de, g(o.name), 1),
197
- s("div", ue, g(a(L)(o.effect)), 1)
203
+ s("div", de, [
204
+ s("div", ue, g(o.name), 1),
205
+ s("div", fe, g(a(L)(o.effect)), 1)
198
206
  ])
199
207
  ]),
200
- r(k, {
208
+ i(k, {
201
209
  icon: "delete",
202
210
  "icon-color": "neutral-gray-400",
203
211
  variant: "tertiary",
204
- onClick: (P) => (P.stopPropagation(), F(o))
212
+ onClick: (S) => (S.stopPropagation(), F(o))
205
213
  }, null, 8, ["onClick"])
206
214
  ]),
207
215
  _: 2
@@ -219,11 +227,11 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
219
227
  src: W,
220
228
  class: "aspect-square w-[150px]"
221
229
  }, null, -1)),
222
- s("div", fe, [
223
- s("div", ye, g(a(t)("connect.promotion.createPromotionCampaign")), 1),
224
- s("div", ge, g(a(t)("connect.promotion.description")), 1)
230
+ s("div", ye, [
231
+ s("div", ge, g(a(t)("connect.promotion.createPromotionCampaign")), 1),
232
+ s("div", _e, g(a(t)("connect.promotion.description")), 1)
225
233
  ]),
226
- r(k, {
234
+ i(k, {
227
235
  variant: "primary",
228
236
  label: a(t)("connect.promotion.createPromotionCampaign"),
229
237
  icon: "add",
@@ -233,7 +241,7 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
233
241
  _: 1
234
242
  }))
235
243
  ]),
236
- r(ae, {
244
+ i(se, {
237
245
  ref_key: "sheetRef",
238
246
  ref: C,
239
247
  "onSubmit:modelValue": N
@@ -243,5 +251,5 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
243
251
  }
244
252
  });
245
253
  export {
246
- Le as default
254
+ Be as default
247
255
  };