@feedmepos/mf-connect 0.1.98-beta.8 → 0.1.98-prod

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/dist/Analytic-BHDjuMfN.js +426 -0
  2. package/dist/{App-DsB2o1oB.js → App-BSSze_b9.js} +106 -118
  3. package/dist/{Bin-DMr7K8Kj.js → Bin-DfzoQbE0.js} +8 -8
  4. package/dist/{Broadcast-C9akM-TB.js → Broadcast-DsqO4SXX.js} +17 -18
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CwGoEBsW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DQ0x2VJp.js} +6 -5
  6. package/dist/{Card-DRkIYs0M.js → Card-VxbqomXV.js} +19 -19
  7. package/dist/{Collections-B0uGC2FE.js → Collections-CvD98I3M.js} +185 -197
  8. package/dist/{Credit-V5YA_hGx.js → Credit-BhM2m2L2.js} +53 -54
  9. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DvfrrjHc.js +2223 -0
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DJLxGk7W.js → EffectSheet.vue_vue_type_style_index_0_lang-CPx9U9fU.js} +6 -6
  11. package/dist/{Experience-WTWy5yY6.js → Experience-uWQRb-qf.js} +34 -35
  12. package/dist/{FileSaver.min-BlA0oZEC.js → FileSaver.min-DKNoHTvP.js} +1 -1
  13. package/dist/{Game-BwOfTCW5.js → Game-BgT3oNx7.js} +15 -16
  14. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DNtLW0yQ.js → ImageInput.vue_vue_type_script_setup_true_lang-ClqrJbU6.js} +1 -1
  15. package/dist/{Index-m7l4insz.js → Index-D3RgVj9V.js} +10 -10
  16. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Dsg2sWjF.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CkCpumzB.js} +1 -1
  17. package/dist/{MainLayout-Du5kZOtA.js → MainLayout-B2RiPsIR.js} +1 -1
  18. package/dist/{Marketing-C9pSIdBU.js → Marketing-FrE7k7eW.js} +4 -4
  19. package/dist/{MarketingMaterialEdit-BEF2T9LR.js → MarketingMaterialEdit-DGNjEUu-.js} +211 -214
  20. package/dist/{Member-DUV_vbPI.js → Member-CgTagUQ9.js} +20 -20
  21. package/dist/{MemberList-Ye4nOk-i.js → MemberList-CKbzsDMX.js} +51 -50
  22. package/dist/{MemberTransactions-CAut1TQb.js → MemberTransactions-CnY5cFdv.js} +1 -1
  23. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-1AuHixPC.js → MessageInput.vue_vue_type_script_setup_true_lang-DqivG_O4.js} +11 -11
  24. package/dist/{Mission-BBmCGpt8.js → Mission-BGNqy7wQ.js} +34 -35
  25. package/dist/{Overview-DOJj4XvO.js → Overview-CnpF74wa.js} +19 -19
  26. package/dist/{Point-Bzg6hi6o.js → Point-BHgIy7Bz.js} +29 -30
  27. package/dist/{Promotion-BMXIp_ef.js → Promotion-CNQvO5Lq.js} +105 -111
  28. package/dist/{Queue-55G2gtP5.js → Queue-CoPBE0UP.js} +43 -43
  29. package/dist/{Record-DNPI02c6.js → Record-BuDQ15FJ.js} +10 -10
  30. package/dist/{Reward-CnP8R2pS.js → Reward-BQlCO3Dk.js} +17 -17
  31. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BN71h9IK.js → RewardGroup.vue_vue_type_script_setup_true_lang-nhNr_T7D.js} +12 -12
  32. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-lnxwLa8o.js +1888 -0
  33. package/dist/{Segment-CxiQnnyj.js → Segment-DKFAXGzY.js} +78 -77
  34. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-C4vohf6c.js → SelectItems.vue_vue_type_script_setup_true_lang-CUR7djaM.js} +3 -3
  35. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B1vj5f7T.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CZ3s2W8Q.js} +12 -12
  36. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-cWx0G3nM.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BbilZk82.js} +4 -4
  37. package/dist/{Setting-jHAjccod.js → Setting-hrDZ1cQR.js} +248 -259
  38. package/dist/{SettingAdvertisements-Vt7w1WN3.js → SettingAdvertisements-CQsx4JqQ.js} +13 -13
  39. package/dist/{Store-Cu-hKmVa.js → Store-Cgmsklnt.js} +24 -24
  40. package/dist/{StoreRewards-DILeipMG.js → StoreRewards-CrPO4DKG.js} +16 -16
  41. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-yesp6BoT.js +1118 -0
  42. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BnKybdKJ.js +142 -0
  43. package/dist/{Tier-BAZ1xuKL.js → Tier-DgKMMyKr.js} +469 -544
  44. package/dist/{Title-CcNAt47f.js → Title-BKijiEFV.js} +92 -93
  45. package/dist/{Transaction-D7DO3dKQ.js → Transaction-zHL4q_wj.js} +2 -2
  46. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-hUjQVZ_U.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DjafpVOa.js} +6 -6
  47. package/dist/{Voucher-Cq-n1CaC.js → Voucher-DW4-SD1w.js} +27 -28
  48. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CTQDxc5l.js → VoucherEditor.vue_vue_type_script_setup_true_lang-y2wm2Bcu.js} +12 -12
  49. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DuRKA4cj.js → ZodTextField.vue_vue_type_script_setup_true_lang-BWZUE554.js} +2 -2
  50. package/dist/{app-Z-UKRG5V.js → app-B23RANXL.js} +3083 -3663
  51. package/dist/app.js +3 -4
  52. package/dist/{business-C7EF6cKC.js → business-BFU-2tpT.js} +1 -1
  53. package/dist/{campaign-DHBuP4UA.js → campaign-BEKKOWya.js} +64 -114
  54. package/dist/{campaign--MjoY1Mn.js → campaign-CwlWx58O.js} +7 -13
  55. package/dist/{campaign.enum-BNN2gLFY.js → campaign.enum-5KIiekYl.js} +2 -3
  56. package/dist/{campaign.fn-Bd34dVnx.js → campaign.fn-CyWn_KL-.js} +130 -130
  57. package/dist/{collectible.enum-DO9HdJGH.js → collectible.enum-DmmR-4Nj.js} +1 -1
  58. package/dist/collection.fn-BB1OjBHL.js +26 -0
  59. package/dist/dto-p31OYANk.js +216 -0
  60. package/dist/{effect-BcB8IlTI.js → effect-DNDXE2iM.js} +1 -1
  61. package/dist/{email-addresses-BcTeU4Sh.js → email-addresses-DXSkxrZ6.js} +2 -2
  62. package/dist/{export-CjB7qxZ9.js → export-zMj-UAnF.js} +3 -3
  63. package/dist/{helper-BSgrCJRv.js → helper-D32ml7Qv.js} +1 -1
  64. package/dist/{index-HXiYGO4_.js → index-9jgqbdnt.js} +7 -7
  65. package/dist/{index-hlyg-wxV.js → index-B2OiTtF5.js} +1 -1
  66. package/dist/{index-CoHWpylO.js → index-B9-jeiQR.js} +1281 -1518
  67. package/dist/{index-iMPtFp54.js → index-BWHk6oqv.js} +3 -3
  68. package/dist/{index-hbyCVNa7.js → index-BmmFSQPd.js} +3 -3
  69. package/dist/{index-CsoBDon4.js → index-CA09A75h.js} +1968 -1996
  70. package/dist/index-Cc15IFUt.js +55 -0
  71. package/dist/{index-BpI-BI4H.js → index-CcnOzrwY.js} +1 -1
  72. package/dist/{index-VlFWaBrg.js → index-DSGHkaP0.js} +1 -1
  73. package/dist/{index-BoYEqLif.js → index-DvHLsdIR.js} +205 -817
  74. package/dist/{index-Bf6jNZit.js → index-PrTZHXNT.js} +1 -1
  75. package/dist/{index-BIAjmMga.js → index-txVWLdtz.js} +1 -1
  76. package/dist/{index.esm2017-CM7OnEyP.js → index.esm2017-BJG8dqci.js} +209 -209
  77. package/dist/{loading-CSXr0Yqz.js → loading-DuZVM_Ow.js} +1 -1
  78. package/dist/{lodash-Bh7XKI-R.js → lodash-DqQem5rZ.js} +1 -1
  79. package/dist/{membership-CfredTm3.js → membership-CvoEzwor.js} +3 -3
  80. package/dist/{money-BZIST_m9.js → money-B9PJ_JYh.js} +1 -1
  81. package/dist/{number-DXLR2w95.js → number-GIC15kny.js} +1 -1
  82. package/dist/object-qECH92oz.js +26 -0
  83. package/dist/objectid-CtJ4pTf2.js +145 -0
  84. package/dist/{plugins-4FlbwoES.js → plugins-XAhAFHmZ.js} +95 -94
  85. package/dist/{reward-DUbl79bZ.js → reward-Dy0Z6PLL.js} +1 -1
  86. package/dist/{rule-BQUoZ4l_.js → rule-CUu9I1Ly.js} +487 -505
  87. package/dist/rule-builder-DPmaehAO.js +102 -0
  88. package/dist/style.css +1 -1
  89. package/dist/template-BHtdbnoX.js +236 -0
  90. package/dist/{index-CIBPhxlC.js → timezone-BE1YhvLN.js} +20 -21
  91. package/dist/{trigger-D5g5m6tT.js → trigger-BcHfjuiZ.js} +5 -5
  92. package/dist/{useMarketingMaterialActions-B-Jlw2Z9.js → useMarketingMaterialActions-YQq4LWOp.js} +3 -3
  93. package/dist/{usePagination-DHePBBoR.js → usePagination-B1KK2gTx.js} +1 -1
  94. package/dist/{user-C_ToSo-g.js → user-BTRRi1B3.js} +1 -1
  95. package/dist/{vue-i18n-BcYh6_51.js → vue-i18n-D8NX5Rry.js} +298 -298
  96. package/dist/{xlsx-h4G1C-xj.js → xlsx-C9LzK7Kg.js} +1 -1
  97. package/dist/{zod-CgigfJar.js → zod-D3ciRzE4.js} +1 -1
  98. package/package.json +4 -8
  99. package/dist/AuditLogs-BcfgiYnJ.js +0 -2013
  100. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  101. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CYQMXARx.js +0 -3377
  102. package/dist/Grab-DmmwrGzk.js +0 -300
  103. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-B9sJ-M20.js +0 -48
  104. package/dist/LoyaltyDashboard-CJdhYiea.js +0 -1082
  105. package/dist/Review-CYNPPxYU.js +0 -1141
  106. package/dist/ReviewFacebookCallback-0SUkKAaC.js +0 -243
  107. package/dist/ReviewGoogleCallback-BZEzx68n.js +0 -208
  108. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CtB9Ls5-.js +0 -1911
  109. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CGz6CTWA.js +0 -1130
  110. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-C7lVeybl.js +0 -7007
  111. package/dist/duplicateCampaign-2ODeDw3a.js +0 -51
  112. package/dist/index-Bm0QPucw.js +0 -67
  113. package/dist/index-Bv4MBLQ5.js +0 -52
  114. package/dist/object-BYyQ0PZp.js +0 -18
  115. package/dist/objectid-Dg4ZodlT.js +0 -145
  116. package/dist/template-BoiSG7G7.js +0 -188
@@ -1,17 +1,16 @@
1
- import { defineComponent as H, ref as I, computed as q, h as x, onMounted as z, resolveComponent as m, openBlock as d, createElementBlock as v, Fragment as k, createVNode as s, unref as o, withCtx as h, createElementVNode as n, toDisplayString as u, renderList as G, createBlock as F, resolveDynamicComponent as J } from "vue";
1
+ import { defineComponent as H, ref as I, computed as q, h as x, onMounted as z, resolveComponent as m, openBlock as p, createElementBlock as v, Fragment as k, createVNode as s, unref as o, withCtx as h, createElementVNode as n, toDisplayString as u, renderList as G, createBlock as F, resolveDynamicComponent as J } from "vue";
2
2
  import { _ as Q } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as W, components as V } from "@feedmepos/ui-library";
4
- import { p as X } from "./plugins-4FlbwoES.js";
5
- import { u as Y } from "./loading-CSXr0Yqz.js";
6
- import { u as Z } from "./business-C7EF6cKC.js";
7
- import { u as ee, c as f } from "./campaign--MjoY1Mn.js";
8
- import { a as te, b as $, c as N } from "./campaign-DHBuP4UA.js";
9
- import { c as oe, p as ae } from "./duplicateCampaign-2ODeDw3a.js";
10
- import { _ as ne } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
11
- import { _ as ie } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-CYQMXARx.js";
12
- import { u as se } from "./template-BoiSG7G7.js";
13
- import { u as re } from "./vue-i18n-BcYh6_51.js";
14
- const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-center justify-between w-full" }, de = { class: "flex gap-8 overflow-x-auto" }, ue = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "space-y-4" }, ye = { class: "fm-typo-en-body-lg-600" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, he = { class: "flex items-center gap-8" }, Ce = { class: "flex flex-col gap-16 text-center" }, we = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Oe = /* @__PURE__ */ H({
4
+ import { p as X } from "./plugins-XAhAFHmZ.js";
5
+ import { u as Y } from "./loading-DuZVM_Ow.js";
6
+ import { u as Z } from "./business-BFU-2tpT.js";
7
+ import { u as ee, c as f } from "./campaign-CwlWx58O.js";
8
+ import { g as te, a as $, b as N } from "./campaign-BEKKOWya.js";
9
+ import { u as oe, c as ae, p as ne } from "./template-BHtdbnoX.js";
10
+ import { _ as ie } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
11
+ import { _ as se } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DvfrrjHc.js";
12
+ import { u as re } from "./vue-i18n-D8NX5Rry.js";
13
+ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, me = { class: "px-24 flex flex-col gap-y-16" }, de = { class: "flex items-center justify-between w-full" }, pe = { class: "flex gap-8 overflow-x-auto" }, ue = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "space-y-4" }, ye = { class: "fm-typo-en-body-lg-600" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, he = { class: "flex items-center gap-8" }, Ce = { class: "flex flex-col gap-16 text-center" }, we = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ke = /* @__PURE__ */ H({
15
14
  __name: "Point",
16
15
  setup(xe) {
17
16
  const { t: i } = re(), D = {
@@ -21,7 +20,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
21
20
  value: "create",
22
21
  isPrimary: !0,
23
22
  prependIcon: "add"
24
- }, K = se("COIN", W()), C = Z(), p = ee(), { global: O, minor: S } = Y, l = I({
23
+ }, K = oe("COIN", W()), C = Z(), d = ee(), { global: O, minor: S } = Y, l = I({
25
24
  searchKey: "",
26
25
  location: []
27
26
  });
@@ -33,7 +32,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
33
32
  }) : e.targetLocation.includes(t);
34
33
  }
35
34
  const g = q(
36
- () => p.campaigns.point.filter((e) => A(e))
35
+ () => d.campaigns.point.filter((e) => A(e))
37
36
  ), R = [
38
37
  {
39
38
  header: i("connect.program.common.table.title"),
@@ -77,7 +76,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
77
76
  async function L(e) {
78
77
  await X.remove(`Are you sure you want to remove ${e.name}?`) && await S(
79
78
  async () => {
80
- await f.delete(e._id), await p.read("COIN");
79
+ await f.delete(e._id), await d.read("COIN");
81
80
  },
82
81
  {
83
82
  message: `Removing ${e.name}`,
@@ -101,9 +100,9 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
101
100
  }
102
101
  async function P(e) {
103
102
  var r;
104
- if (!await oe(e.name))
103
+ if (!await ae(e.name))
105
104
  return;
106
- const t = await f.readById(e._id), c = ae(t, {
105
+ const t = await f.readById(e._id), c = ne(t, {
107
106
  keepCollectible: !0
108
107
  });
109
108
  (r = w.value) == null || r.showSheet(
@@ -116,7 +115,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
116
115
  async function U(e) {
117
116
  await S(
118
117
  async () => {
119
- e.campaign._id ? await f.update(e.campaign._id, e) : await f.create(e), await p.read("COIN");
118
+ e.campaign._id ? await f.update(e.campaign._id, e) : await f.create(e), await d.read("COIN");
120
119
  },
121
120
  {
122
121
  message: `${e.campaign._id ? "Updating" : "Creating"} point program`,
@@ -126,11 +125,11 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
126
125
  }
127
126
  return z(async () => {
128
127
  await O(async () => {
129
- await p.read("COIN");
128
+ await d.read("COIN");
130
129
  });
131
130
  }), (e, t) => {
132
131
  const c = m("FmPill"), r = m("FmPageHead"), B = m("FmSearch"), j = m("FmTable"), b = m("FmButton"), T = m("FmListItem"), E = m("FmList"), M = m("FmCard");
133
- return d(), v(k, null, [
132
+ return p(), v(k, null, [
134
133
  s(r, {
135
134
  title: o(i)("connect.program.point.title"),
136
135
  actions: o(g).length > 0 && o(C).isPremium ? [D] : [],
@@ -152,10 +151,10 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
152
151
  placeholder: "search",
153
152
  collapsible: ""
154
153
  }, null, 8, ["modelValue"]),
155
- o(p).campaigns.point && o(p).campaigns.point.length > 0 ? (d(), v(k, { key: 0 }, [
156
- n("div", pe, [
157
- n("div", de, [
158
- s(ne, {
154
+ o(d).campaigns.point && o(d).campaigns.point.length > 0 ? (p(), v(k, { key: 0 }, [
155
+ n("div", de, [
156
+ n("div", pe, [
157
+ s(ie, {
159
158
  label: `${o(i)("connect.common.location")}: `,
160
159
  "right-icon": "keyboard_arrow_down",
161
160
  modelValue: o(l).location,
@@ -184,9 +183,9 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
184
183
  }, null, 8, ["row-data", "search-value", "hide-footer"]),
185
184
  s(E, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
186
185
  default: h(() => [
187
- (d(!0), v(k, null, G(o(g).filter(
186
+ (p(!0), v(k, null, G(o(g).filter(
188
187
  (a) => a.name.toLowerCase().includes(o(l).searchKey.toLowerCase())
189
- ), (a) => (d(), F(T, {
188
+ ), (a) => (p(), F(T, {
190
189
  key: a._id.toString(),
191
190
  onClick: (_) => y(a),
192
191
  class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
@@ -194,7 +193,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
194
193
  default: h(() => [
195
194
  n("div", ue, [
196
195
  n("div", fe, [
197
- (d(), F(J(o($)(a))))
196
+ (p(), F(J(o($)(a))))
198
197
  ]),
199
198
  n("div", ge, [
200
199
  n("div", ye, u(a.name), 1),
@@ -223,7 +222,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
223
222
  ]),
224
223
  _: 1
225
224
  })
226
- ], 64)) : (d(), F(M, {
225
+ ], 64)) : (p(), F(M, {
227
226
  key: 1,
228
227
  variant: "outlined",
229
228
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
@@ -247,7 +246,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
247
246
  ]),
248
247
  _: 1
249
248
  })),
250
- s(ie, {
249
+ s(se, {
251
250
  ref_key: "sheetRef",
252
251
  ref: w,
253
252
  "onSubmit:modelValue": U
@@ -258,5 +257,5 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
258
257
  }
259
258
  });
260
259
  export {
261
- Oe as default
260
+ Ke as default
262
261
  };
@@ -1,37 +1,36 @@
1
- import { defineComponent as Q, ref as w, resolveComponent as d, openBlock as f, createBlock as S, unref as a, isRef as te, withCtx as k, createElementVNode as i, createVNode as c, computed as ne, h as I, onMounted as ae, createElementBlock as L, Fragment as B, renderList as se, resolveDynamicComponent as ie, toDisplayString as h } from "vue";
2
- import { _ as re } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as le, components as N } from "@feedmepos/ui-library";
4
- import { p as $ } from "./plugins-4FlbwoES.js";
5
- import { u as ce } from "./loading-CSXr0Yqz.js";
6
- import { u as me } from "./business-C7EF6cKC.js";
7
- import { c as y, u as ue } from "./campaign--MjoY1Mn.js";
8
- import { u as de } from "./vue-i18n-BcYh6_51.js";
9
- import { g as j, a as pe, b as q } from "./campaign-DHBuP4UA.js";
10
- import { c as fe, p as ye } from "./duplicateCampaign-2ODeDw3a.js";
11
- import { e as K } from "./effect-BcB8IlTI.js";
12
- import { c as U } from "./string-Gcy5IM_H.js";
13
- import { _ as ge } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-CYQMXARx.js";
14
- import { u as he } from "./template-BoiSG7G7.js";
15
- import { _ as E } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
16
- const _e = { class: "space-y-8" }, be = /* @__PURE__ */ Q({
1
+ import { defineComponent as E, ref as w, resolveComponent as d, openBlock as f, createBlock as S, unref as a, isRef as oe, withCtx as k, createElementVNode as r, createVNode as c, computed as te, h as I, onMounted as ne, createElementBlock as L, Fragment as B, renderList as ae, resolveDynamicComponent as se, toDisplayString as F } from "vue";
2
+ import { _ as ie } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as re, components as $ } from "@feedmepos/ui-library";
4
+ import { p as j } from "./plugins-XAhAFHmZ.js";
5
+ import { u as le } from "./loading-DuZVM_Ow.js";
6
+ import { u as ce } from "./business-BFU-2tpT.js";
7
+ import { c as y, u as me } from "./campaign-CwlWx58O.js";
8
+ import { u as ue } from "./vue-i18n-D8NX5Rry.js";
9
+ import { g as de, a as D } from "./campaign-BEKKOWya.js";
10
+ import { u as pe, c as fe, p as ye } from "./template-BHtdbnoX.js";
11
+ import { e as q } from "./effect-DNDXE2iM.js";
12
+ import { c as K } from "./string-Gcy5IM_H.js";
13
+ import { _ as ge } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DvfrrjHc.js";
14
+ import { _ as U } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
15
+ const he = { class: "space-y-8" }, _e = /* @__PURE__ */ E({
17
16
  __name: "QueueSheet",
18
17
  emits: ["update:model-value"],
19
- setup(H, { expose: n, emit: R }) {
20
- const p = w(!1), _ = w([]);
18
+ setup(Q, { expose: n, emit: R }) {
19
+ const p = w(!1), h = w([]);
21
20
  async function P() {
22
21
  p.value = !0;
23
- const r = await y.getPromotionQueue();
24
- console.log(r, "jobs"), _.value = r;
22
+ const i = await y.getPromotionQueue();
23
+ console.log(i, "jobs"), h.value = i;
25
24
  }
26
25
  const v = [
27
26
  {
28
27
  header: "Started At",
29
- accessorFn: (r) => r.createdAt,
28
+ accessorFn: (i) => i.createdAt,
30
29
  enableSorting: !0
31
30
  },
32
31
  {
33
32
  header: "Campaigns",
34
- accessorFn: (r) => r.campaigns
33
+ accessorFn: (i) => i.campaigns
35
34
  // cell(props) {
36
35
  // const r = props.row.original;
37
36
  // return h('div', {
@@ -42,27 +41,27 @@ const _e = { class: "space-y-8" }, be = /* @__PURE__ */ Q({
42
41
  ];
43
42
  return n({
44
43
  showSheet: P
45
- }), (r, u) => {
46
- const b = d("FmTable"), T = d("FmSideSheet");
44
+ }), (i, u) => {
45
+ const _ = d("FmTable"), T = d("FmSideSheet");
47
46
  return f(), S(T, {
48
47
  "max-width": 550,
49
48
  header: "Promotion Sync Queue",
50
49
  modelValue: a(p),
51
50
  "onUpdate:modelValue": [
52
- u[1] || (u[1] = (s) => te(p) ? p.value = s : null),
51
+ u[1] || (u[1] = (s) => oe(p) ? p.value = s : null),
53
52
  u[2] || (u[2] = (s) => p.value = s)
54
53
  ]
55
54
  }, {
56
55
  default: k(() => [
57
- i("div", _e, [
58
- u[3] || (u[3] = i("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Promotion synchronizing to your restaurant(s) is queued here. Depending on the number of campaigns and restaurants, this process may take several minutes. No task displayed here means there are no pending promotions to sync. ", -1)),
59
- c(b, {
60
- modelValue: r.tableRef,
61
- "onUpdate:modelValue": u[0] || (u[0] = (s) => r.tableRef = s),
62
- "column-filter": r.jobFilters,
56
+ r("div", he, [
57
+ u[3] || (u[3] = r("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Promotion synchronizing to your restaurant(s) is queued here. Depending on the number of campaigns and restaurants, this process may take several minutes. No task displayed here means there are no pending promotions to sync. ", -1)),
58
+ c(_, {
59
+ modelValue: i.tableRef,
60
+ "onUpdate:modelValue": u[0] || (u[0] = (s) => i.tableRef = s),
61
+ "column-filter": i.jobFilters,
63
62
  "column-defs": v,
64
- "row-data": a(_),
65
- "hide-footer": a(_).length <= 10
63
+ "row-data": a(h),
64
+ "hide-footer": a(h).length <= 10
66
65
  }, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"])
67
66
  ])
68
67
  ]),
@@ -70,10 +69,10 @@ const _e = { class: "space-y-8" }, be = /* @__PURE__ */ Q({
70
69
  }, 8, ["modelValue"]);
71
70
  };
72
71
  }
73
- }), we = { class: "px-24 flex flex-col gap-y-16" }, ve = { class: "flex items-center justify-between w-full" }, Ce = { class: "flex gap-8 overflow-x-auto" }, xe = { class: "space-y-8" }, Fe = { class: "flex w-full gap-4 items-center" }, Se = { class: "space-y-4" }, ke = { class: "fm-typo-en-body-lg-600" }, Pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ve = { class: "flex items-center gap-8" }, Oe = { class: "flex flex-col gap-16 text-center" }, Ie = { class: "fm-typo-en-title-sm-800" }, Le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge = /* @__PURE__ */ Q({
72
+ }), we = { class: "px-24 flex flex-col gap-y-16" }, ve = { class: "flex items-center justify-between w-full" }, be = { class: "flex gap-8 overflow-x-auto" }, Ce = { class: "space-y-8" }, xe = { class: "flex w-full gap-4 items-center" }, Fe = { class: "space-y-4" }, Se = { class: "fm-typo-en-body-lg-600" }, ke = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = { class: "flex items-center gap-8" }, Te = { class: "flex flex-col gap-16 text-center" }, Ve = { class: "fm-typo-en-title-sm-800" }, Oe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qe = /* @__PURE__ */ E({
74
73
  __name: "Promotion",
75
- setup(H) {
76
- const { t: n } = de(), R = {
74
+ setup(Q) {
75
+ const { t: n } = ue(), R = {
77
76
  label: n("connect.promotion.createCampaign"),
78
77
  value: "create",
79
78
  isPrimary: !0,
@@ -83,12 +82,12 @@ const _e = { class: "space-y-8" }, be = /* @__PURE__ */ Q({
83
82
  value: "sync",
84
83
  isPrimary: !1,
85
84
  prependIcon: "refresh"
86
- }, _ = {
85
+ }, h = {
87
86
  label: "Queue",
88
87
  value: "queue",
89
88
  isPrimary: !1,
90
89
  prependIcon: "work_history"
91
- }, P = he("PROMOTION", le()), v = me(), r = ue(), { global: u, minor: b } = ce, T = [
90
+ }, P = pe("PROMOTION", re()), v = ce(), i = me(), { global: u, minor: _ } = le, T = [
92
91
  {
93
92
  label: "Bill promotion",
94
93
  value: "BILL"
@@ -102,78 +101,74 @@ const _e = { class: "space-y-8" }, be = /* @__PURE__ */ Q({
102
101
  location: [],
103
102
  effectType: []
104
103
  });
105
- function z(e) {
104
+ function H(e) {
106
105
  const o = s.value.location;
107
106
  return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((m) => {
108
107
  var l;
109
108
  return (l = e == null ? void 0 : e.targetLocation) == null ? void 0 : l.includes(m);
110
109
  }) : e.targetLocation.includes(o);
111
110
  }
112
- function G(e) {
113
- var l, x;
111
+ function z(e) {
112
+ var l, C;
114
113
  const o = s.value.effectType;
115
114
  if (!o || o.length === 0) return !0;
116
- const m = (x = (l = e.effect) == null ? void 0 : l.options) == null ? void 0 : x.target;
115
+ const m = (C = (l = e.effect) == null ? void 0 : l.options) == null ? void 0 : C.target;
117
116
  return o.includes(m);
118
117
  }
119
- const g = ne(
120
- () => r.campaigns.promotion.filter(
121
- (e) => z(e) && G(e)
118
+ const g = te(
119
+ () => i.campaigns.promotion.filter(
120
+ (e) => H(e) && z(e)
122
121
  )
123
- ), J = [
122
+ ), G = [
124
123
  {
125
124
  header: n("connect.promotion.promotionTitle"),
126
125
  accessorFn: (e) => e.name
127
126
  },
128
- {
129
- header: n("connect.promotion.campaignDate"),
130
- accessorFn: (e) => j(e)
131
- },
132
127
  {
133
128
  header: n("connect.promotion.status"),
134
- accessorFn: (e) => pe(e),
129
+ accessorFn: (e) => de(e),
135
130
  cell(e) {
136
- return q(e.row.original);
131
+ return D(e.row.original);
137
132
  }
138
133
  },
139
134
  {
140
135
  header: n("connect.promotion.type"),
141
- accessorFn: (e) => `${U.title(e.effect.options.target)} promotion`
136
+ accessorFn: (e) => `${K.title(e.effect.options.target)} promotion`
142
137
  },
143
138
  {
144
139
  header: n("connect.promotion.summary"),
145
- accessorFn: (e) => K(e.effect)
140
+ accessorFn: (e) => q(e.effect)
146
141
  },
147
142
  {
148
143
  header: n("connect.promotion.actions"),
149
144
  cell(e) {
150
145
  return I("div", { class: "flex items-center gap-8 justify-end" }, [
151
- I(N.FmButton, {
146
+ I($.FmButton, {
152
147
  variant: "tertiary",
153
148
  icon: "content_copy",
154
149
  iconColor: "neutral-gray-400",
155
150
  onClick: async (o) => {
156
- o.stopPropagation(), await M(e.row.original);
151
+ o.stopPropagation(), await N(e.row.original);
157
152
  }
158
153
  }),
159
- I(N.FmButton, {
154
+ I($.FmButton, {
160
155
  variant: "tertiary",
161
156
  icon: "delete",
162
157
  iconColor: "neutral-gray-400",
163
158
  onClick: (o) => {
164
- o.stopPropagation(), D(e.row.original);
159
+ o.stopPropagation(), M(e.row.original);
165
160
  }
166
161
  })
167
162
  ]);
168
163
  }
169
164
  }
170
165
  ], V = w(), A = w();
171
- async function D(e) {
172
- await $.remove(
166
+ async function M(e) {
167
+ await j.remove(
173
168
  n("connect.promotion.confirmRemove", { name: e.name })
174
- ) && await b(
169
+ ) && await _(
175
170
  async () => {
176
- await y.delete(e._id), await r.read("PROMOTION");
171
+ await y.delete(e._id), await i.read("PROMOTION");
177
172
  },
178
173
  {
179
174
  message: n("connect.promotion.removing", { name: e.name }),
@@ -183,7 +178,7 @@ const _e = { class: "space-y-8" }, be = /* @__PURE__ */ Q({
183
178
  }
184
179
  );
185
180
  }
186
- async function C(e) {
181
+ async function b(e) {
187
182
  e ? await o() : P.open(async (m) => {
188
183
  await o(m);
189
184
  });
@@ -197,7 +192,7 @@ const _e = { class: "space-y-8" }, be = /* @__PURE__ */ Q({
197
192
  );
198
193
  }
199
194
  }
200
- async function M(e) {
195
+ async function N(e) {
201
196
  var l;
202
197
  if (!await fe(e.name))
203
198
  return;
@@ -209,10 +204,10 @@ const _e = { class: "space-y-8" }, be = /* @__PURE__ */ Q({
209
204
  o.template
210
205
  );
211
206
  }
212
- async function W(e) {
213
- await b(
207
+ async function J(e) {
208
+ await _(
214
209
  async () => {
215
- e.campaign._id ? await y.update(e.campaign._id, e) : await y.create(e), await r.read("PROMOTION");
210
+ e.campaign._id ? await y.update(e.campaign._id, e) : await y.create(e), await i.read("PROMOTION");
216
211
  },
217
212
  {
218
213
  message: n(
@@ -224,17 +219,17 @@ const _e = { class: "space-y-8" }, be = /* @__PURE__ */ Q({
224
219
  }
225
220
  );
226
221
  }
227
- async function X(e) {
222
+ async function W(e) {
228
223
  var o;
229
224
  switch (e) {
230
225
  case "create":
231
- C();
226
+ b();
232
227
  break;
233
228
  case "sync":
234
- await $.confirm(
229
+ await j.confirm(
235
230
  "Are you sure you want to synchronize all promotions to POS?",
236
231
  "Force sync"
237
- ) && b(
232
+ ) && _(
238
233
  async () => {
239
234
  await y.syncAllPromotion();
240
235
  },
@@ -249,19 +244,19 @@ const _e = { class: "space-y-8" }, be = /* @__PURE__ */ Q({
249
244
  break;
250
245
  }
251
246
  }
252
- return ae(async () => {
247
+ return ne(async () => {
253
248
  await u(async () => {
254
- await v.readLocations(), await r.read("PROMOTION");
249
+ await v.readLocations(), await i.read("PROMOTION");
255
250
  });
256
251
  }), (e, o) => {
257
- const m = d("FmPageHead"), l = d("FmSearch"), x = d("FmTable"), Y = d("FmChip"), O = d("FmButton"), Z = d("FmListItem"), ee = d("FmList"), oe = d("FmCard");
252
+ const m = d("FmPageHead"), l = d("FmSearch"), C = d("FmTable"), X = d("FmChip"), O = d("FmButton"), Y = d("FmListItem"), Z = d("FmList"), ee = d("FmCard");
258
253
  return f(), L(B, null, [
259
254
  c(m, {
260
255
  title: a(n)("connect.promotion.title"),
261
- actions: a(g).length > 0 ? [R, p, _] : [],
262
- "onClick:action": X
256
+ actions: a(g).length > 0 ? [R, p, h] : [],
257
+ "onClick:action": W
263
258
  }, null, 8, ["title", "actions"]),
264
- i("div", we, [
259
+ r("div", we, [
265
260
  c(l, {
266
261
  modelValue: s.value.searchKey,
267
262
  "onUpdate:modelValue": o[0] || (o[0] = (t) => s.value.searchKey = t),
@@ -270,9 +265,9 @@ const _e = { class: "space-y-8" }, be = /* @__PURE__ */ Q({
270
265
  collapsible: ""
271
266
  }, null, 8, ["modelValue", "placeholder"]),
272
267
  a(g) && a(g).length > 0 ? (f(), L(B, { key: 0 }, [
273
- i("div", ve, [
274
- i("div", Ce, [
275
- c(E, {
268
+ r("div", ve, [
269
+ r("div", be, [
270
+ c(U, {
276
271
  label: `${a(n)("connect.common.location")}: `,
277
272
  "right-icon": "keyboard_arrow_down",
278
273
  modelValue: s.value.location,
@@ -281,7 +276,7 @@ const _e = { class: "space-y-8" }, be = /* @__PURE__ */ Q({
281
276
  "show-item-label": !0,
282
277
  items: a(v).locationOptions
283
278
  }, null, 8, ["label", "modelValue", "items"]),
284
- c(E, {
279
+ c(U, {
285
280
  label: "Type:",
286
281
  "right-icon": "keyboard_arrow_down",
287
282
  modelValue: s.value.effectType,
@@ -299,54 +294,53 @@ const _e = { class: "space-y-8" }, be = /* @__PURE__ */ Q({
299
294
  collapsible: ""
300
295
  }, null, 8, ["modelValue"])
301
296
  ]),
302
- c(x, {
297
+ c(C, {
303
298
  class: "xs:hidden sm:hidden",
304
299
  "row-data": a(g),
305
- "column-defs": J,
300
+ "column-defs": G,
306
301
  "search-value": s.value.searchKey,
307
302
  "column-filter": [],
308
- onRowClick: o[4] || (o[4] = (t) => C(t.original)),
303
+ onRowClick: o[4] || (o[4] = (t) => b(t.original)),
309
304
  "hide-footer": a(g).length < 10
310
305
  }, null, 8, ["row-data", "search-value", "hide-footer"]),
311
- c(ee, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
306
+ c(Z, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
312
307
  default: k(() => [
313
- (f(!0), L(B, null, se(a(g).filter(
308
+ (f(!0), L(B, null, ae(a(g).filter(
314
309
  (t) => t.name.toLowerCase().includes(s.value.searchKey.toLowerCase())
315
- ), (t) => (f(), S(Z, {
310
+ ), (t) => (f(), S(Y, {
316
311
  key: t._id.toString(),
317
- onClick: (F) => C(t),
312
+ onClick: (x) => b(t),
318
313
  class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
319
314
  }, {
320
315
  default: k(() => [
321
- i("div", xe, [
322
- i("div", Fe, [
323
- (f(), S(ie(a(q)(t)))),
324
- c(Y, {
316
+ r("div", Ce, [
317
+ r("div", xe, [
318
+ (f(), S(se(a(D)(t)))),
319
+ c(X, {
325
320
  class: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
326
321
  compact: !0,
327
- label: `${a(U).title(t.effect.options.target)} promotion`
322
+ label: `${a(K).title(t.effect.options.target)} promotion`
328
323
  }, null, 8, ["label"])
329
324
  ]),
330
- i("div", Se, [
331
- i("div", ke, h(t.name), 1),
332
- i("div", Pe, h(a(K)(t.effect)), 1),
333
- i("div", Te, h(a(n)("connect.promotion.campaignDate")) + ": " + h(a(j)(t)), 1)
325
+ r("div", Fe, [
326
+ r("div", Se, F(t.name), 1),
327
+ r("div", ke, F(a(q)(t.effect)), 1)
334
328
  ])
335
329
  ]),
336
- i("div", Ve, [
330
+ r("div", Pe, [
337
331
  c(O, {
338
332
  icon: "content_copy",
339
333
  "icon-color": "neutral-gray-400",
340
334
  variant: "tertiary",
341
- onClick: async (F) => {
342
- F.stopPropagation(), await M(t);
335
+ onClick: async (x) => {
336
+ x.stopPropagation(), await N(t);
343
337
  }
344
338
  }, null, 8, ["onClick"]),
345
339
  c(O, {
346
340
  icon: "delete",
347
341
  "icon-color": "neutral-gray-400",
348
342
  variant: "tertiary",
349
- onClick: (F) => (F.stopPropagation(), D(t))
343
+ onClick: (x) => (x.stopPropagation(), M(t))
350
344
  }, null, 8, ["onClick"])
351
345
  ])
352
346
  ]),
@@ -355,25 +349,25 @@ const _e = { class: "space-y-8" }, be = /* @__PURE__ */ Q({
355
349
  ]),
356
350
  _: 1
357
351
  })
358
- ], 64)) : (f(), S(oe, {
352
+ ], 64)) : (f(), S(ee, {
359
353
  key: 1,
360
354
  variant: "outlined",
361
355
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
362
356
  }, {
363
357
  default: k(() => [
364
- o[6] || (o[6] = i("img", {
365
- src: re,
358
+ o[6] || (o[6] = r("img", {
359
+ src: ie,
366
360
  class: "aspect-square w-[150px]"
367
361
  }, null, -1)),
368
- i("div", Oe, [
369
- i("div", Ie, h(a(n)("connect.promotion.createPromotionCampaign")), 1),
370
- i("div", Le, h(a(n)("connect.promotion.description")), 1)
362
+ r("div", Te, [
363
+ r("div", Ve, F(a(n)("connect.promotion.createPromotionCampaign")), 1),
364
+ r("div", Oe, F(a(n)("connect.promotion.description")), 1)
371
365
  ]),
372
366
  c(O, {
373
367
  variant: "primary",
374
368
  label: a(n)("connect.promotion.createPromotionCampaign"),
375
369
  icon: "add",
376
- onClick: o[5] || (o[5] = (t) => C())
370
+ onClick: o[5] || (o[5] = (t) => b())
377
371
  }, null, 8, ["label"])
378
372
  ]),
379
373
  _: 1
@@ -382,9 +376,9 @@ const _e = { class: "space-y-8" }, be = /* @__PURE__ */ Q({
382
376
  c(ge, {
383
377
  ref_key: "sheetRef",
384
378
  ref: V,
385
- "onSubmit:modelValue": W
379
+ "onSubmit:modelValue": J
386
380
  }, null, 512),
387
- c(be, {
381
+ c(_e, {
388
382
  ref_key: "queueSheetRef",
389
383
  ref: A
390
384
  }, null, 512)
@@ -393,5 +387,5 @@ const _e = { class: "space-y-8" }, be = /* @__PURE__ */ Q({
393
387
  }
394
388
  });
395
389
  export {
396
- Ge as default
390
+ Qe as default
397
391
  };