@feedmepos/mf-connect 0.1.97-prod → 0.1.98-beta.2

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/{App-DHAyGCKP.js → App-BWBeJksP.js} +118 -106
  2. package/dist/AuditLogs-CWVUX5o0.js +2013 -0
  3. package/dist/{Bin-BxyU2xtK.js → Bin-jXmZpGfg.js} +8 -8
  4. package/dist/{Broadcast-BJjehb02.js → Broadcast-C76pTADb.js} +18 -17
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BCxP8rEW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-9kfq8OXE.js} +5 -6
  6. package/dist/{Card-BYDuADCn.js → Card-qXn83BYu.js} +19 -19
  7. package/dist/{Collections-BlPEkNm8.js → Collections-DGXUQSbz.js} +197 -185
  8. package/dist/{Credit-D9Eqxv2E.js → Credit-CpmrPZx9.js} +18 -17
  9. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +58 -0
  10. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DAnw5TFZ.js +3377 -0
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hpNgkLOt.js → EffectSheet.vue_vue_type_style_index_0_lang-BCAotF0P.js} +6 -6
  12. package/dist/{Experience-DGumSpYK.js → Experience-CuOq7hd3.js} +35 -34
  13. package/dist/{FileSaver.min-D_TpPHp3.js → FileSaver.min-Cjv6SzrG.js} +1 -1
  14. package/dist/{Game-DDsYLdKu.js → Game-D0KfLD-b.js} +16 -15
  15. package/dist/Grab-L1h7bHD7.js +300 -0
  16. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-R00i7YNe.js → ImageInput.vue_vue_type_script_setup_true_lang-DMAaHxzm.js} +1 -1
  17. package/dist/{Index-DwRbFOsj.js → Index-DxwMHEV3.js} +10 -10
  18. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-i9-B25xO.js +48 -0
  19. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-D_HOJBzW.js → LottieAnimation.vue_vue_type_script_setup_true_lang-D84v7zC_.js} +1 -1
  20. package/dist/LoyaltyDashboard-B5wg1EUC.js +1082 -0
  21. package/dist/{MainLayout-BEUAguIP.js → MainLayout-Cgi3Z3EM.js} +1 -1
  22. package/dist/{Marketing-WdhEZvmz.js → Marketing-Cl5OSBI1.js} +4 -4
  23. package/dist/{MarketingMaterialEdit-DUIkUA79.js → MarketingMaterialEdit-CzYTbdJd.js} +214 -211
  24. package/dist/{Member-jL3RMGsZ.js → Member-D29x5Cic.js} +20 -20
  25. package/dist/{MemberList-B1bdPK63.js → MemberList-DDPe6Ymr.js} +50 -51
  26. package/dist/{MemberTransactions-BNKJ0wtr.js → MemberTransactions-3mboVWAx.js} +1 -1
  27. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Cvsz00_4.js → MessageInput.vue_vue_type_script_setup_true_lang-C2HlA9O8.js} +11 -11
  28. package/dist/{Mission-CoXzS7U6.js → Mission-CMPc4NLe.js} +35 -34
  29. package/dist/{Overview-B16wZUSV.js → Overview-sJ2kuP4U.js} +19 -19
  30. package/dist/{Point-CORBv0y2.js → Point-BBP4UEhf.js} +30 -29
  31. package/dist/{Promotion-DQ4WnFkH.js → Promotion-Bt0RLGsd.js} +111 -105
  32. package/dist/{Queue-BW97QEY2.js → Queue-CzVsoIDM.js} +43 -43
  33. package/dist/{Record-DZOhwf13.js → Record-CAoGgaxo.js} +10 -10
  34. package/dist/Review-CVBJlwGK.js +959 -0
  35. package/dist/ReviewFacebookCallback-RGWdxXYf.js +243 -0
  36. package/dist/ReviewGoogleCallback-L7_Jjbkx.js +208 -0
  37. package/dist/{Reward-Bi9mpuyH.js → Reward-CrpFlr0a.js} +17 -17
  38. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Dtosx1wE.js → RewardGroup.vue_vue_type_script_setup_true_lang-DW-WFNI6.js} +12 -12
  39. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DlcsO8fk.js +1911 -0
  40. package/dist/{Segment-COhS8SPv.js → Segment-Cy-QwYQQ.js} +77 -78
  41. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-By_BQodK.js → SelectItems.vue_vue_type_script_setup_true_lang-ovvxxcrQ.js} +3 -3
  42. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BoEnwoYd.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-D69bJtyd.js} +12 -12
  43. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DonadRJT.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DQyoPZ_6.js} +4 -4
  44. package/dist/{Setting-BNtYrzdN.js → Setting-DEQIJ4fY.js} +259 -248
  45. package/dist/{SettingAdvertisements-Cne8GikV.js → SettingAdvertisements-NuwjCPLN.js} +13 -13
  46. package/dist/{Store-iTgtmUVL.js → Store-Cw2J_ecA.js} +24 -24
  47. package/dist/{StoreRewards-DLawXBsl.js → StoreRewards-BK5rDAaK.js} +16 -16
  48. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B3jwaYHX.js +1130 -0
  49. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D_OdWctk.js +7007 -0
  50. package/dist/{Tier-BbZMbFSd.js → Tier-CwZ40RYc.js} +544 -469
  51. package/dist/{Title-Co5XWIJm.js → Title-DU7KmsK2.js} +93 -92
  52. package/dist/{Transaction-CoUbt5rr.js → Transaction-Uh5Ozt93.js} +2 -2
  53. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CzJpNT94.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BtnUNkcS.js} +6 -6
  54. package/dist/{Voucher-CXojttH0.js → Voucher-BF6ARaRe.js} +28 -27
  55. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Bxkds9_4.js → VoucherEditor.vue_vue_type_script_setup_true_lang-C7msPJdi.js} +12 -12
  56. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CHVqFzLm.js → ZodTextField.vue_vue_type_script_setup_true_lang-BrR2WA1K.js} +2 -2
  57. package/dist/{app-_LtKE4PZ.js → app-DlECkPwT.js} +3408 -2913
  58. package/dist/app.js +4 -3
  59. package/dist/{business-CchrWCX9.js → business-BSe9C-xG.js} +1 -1
  60. package/dist/{campaign-N2x2N6OP.js → campaign-BNS2RxKc.js} +114 -64
  61. package/dist/{campaign-D2RzC0L1.js → campaign-CXw3jpdr.js} +13 -7
  62. package/dist/{campaign.enum-DqJsu1At.js → campaign.enum-CnMa2Tia.js} +3 -2
  63. package/dist/{campaign.fn-Da4r_dvc.js → campaign.fn-CNOinW8t.js} +131 -131
  64. package/dist/{collectible.enum-CHheiKkA.js → collectible.enum-BIvEz79q.js} +1 -1
  65. package/dist/duplicateCampaign-Co2TdbrL.js +51 -0
  66. package/dist/{effect-DADvE7lZ.js → effect-Bt8PE3-M.js} +1 -1
  67. package/dist/{email-addresses-DzUHQuVs.js → email-addresses-Dh95ALqP.js} +2 -2
  68. package/dist/{export-uzECYleM.js → export-DIIgAwP7.js} +3 -3
  69. package/dist/{helper-DMsYRFIM.js → helper-8zEdQ9jm.js} +1 -1
  70. package/dist/{index-CEVpWmjC.js → index-0BNEvaYc.js} +7 -7
  71. package/dist/{index-r8TuEpzi.js → index-BAlFstx4.js} +1 -1
  72. package/dist/{index-C2h4SP0A.js → index-BP5qSDQw.js} +806 -205
  73. package/dist/{index-KYtKBtvK.js → index-Bqxe3Gbq.js} +3 -3
  74. package/dist/{index-CrPHsZg1.js → index-CWypTyOP.js} +1554 -1270
  75. package/dist/{index-DXl_Qtu-.js → index-CfxDirFl.js} +1 -1
  76. package/dist/{index-Bc-pgOn6.js → index-DDp0nMys.js} +1 -1
  77. package/dist/index-DW4-mTTG.js +52 -0
  78. package/dist/{timezone-B_KZGqyd.js → index-DdCPfF8x.js} +21 -20
  79. package/dist/index-IPOrNVQw.js +67 -0
  80. package/dist/{index-XJX8_Wlh.js → index-SsUBL4IR.js} +1 -1
  81. package/dist/{index-Ct1Qf7kH.js → index-VS1hWlhk.js} +1 -1
  82. package/dist/{index-B9RmImNP.js → index-ZKJoXi1-.js} +3 -3
  83. package/dist/{index-DQ6H1MEw.js → index-rwlkBKrS.js} +1996 -1968
  84. package/dist/{index.esm2017-D9jjiQqn.js → index.esm2017-CgR02aQB.js} +209 -209
  85. package/dist/{loading-DK8UdxtS.js → loading-CxY9qhzD.js} +1 -1
  86. package/dist/{lodash-CgcQgDO8.js → lodash-CELsN1M_.js} +1 -1
  87. package/dist/{membership-Cs4GzRnn.js → membership-BoQMuerb.js} +3 -3
  88. package/dist/{money-TgbWserQ.js → money-CH913hGN.js} +1 -1
  89. package/dist/{number-fLCh4B45.js → number-CO-WbLdr.js} +1 -1
  90. package/dist/object-BYyQ0PZp.js +18 -0
  91. package/dist/objectid-BM2Ygj-U.js +145 -0
  92. package/dist/{plugins-DYcrIMpx.js → plugins-YK45gSb1.js} +94 -95
  93. package/dist/{reward-uQ8Oz8Fd.js → reward-3aFPahH6.js} +1 -1
  94. package/dist/{rule-BcbgF0xS.js → rule-DC9my0Vg.js} +505 -487
  95. package/dist/style.css +1 -1
  96. package/dist/template-tDq12e1p.js +188 -0
  97. package/dist/{trigger-c-_77EFL.js → trigger-DoPHRgKt.js} +5 -5
  98. package/dist/{useMarketingMaterialActions-BCqwGe4e.js → useMarketingMaterialActions-CEd6ODsz.js} +3 -3
  99. package/dist/{usePagination-C3cT5BmC.js → usePagination-C8FUj5q_.js} +1 -1
  100. package/dist/{user-CRIo5MyA.js → user-Dhlhrnf8.js} +1 -1
  101. package/dist/{vue-i18n-BU_SuDqj.js → vue-i18n-B-92uhPn.js} +175 -175
  102. package/dist/{xlsx-Bw1AshOG.js → xlsx-Dmxne1eM.js} +166 -166
  103. package/dist/{zod-CzlTW8Al.js → zod-Dcdy9Dm3.js} +1 -1
  104. package/package.json +8 -4
  105. package/dist/Analytic-Ccb5IKBy.js +0 -426
  106. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bf8Rc-Eh.js +0 -2223
  107. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CrvTdEPu.js +0 -1888
  108. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cl8JEYjx.js +0 -1118
  109. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DEEz7iEu.js +0 -142
  110. package/dist/collection.fn-BqDPyvUe.js +0 -26
  111. package/dist/dto-CstKk_3g.js +0 -216
  112. package/dist/index-_KlH62Ed.js +0 -55
  113. package/dist/object-qECH92oz.js +0 -26
  114. package/dist/objectid-CVxLIQ5K.js +0 -145
  115. package/dist/rule-builder-CIkRKgap.js +0 -102
  116. package/dist/template-wZEVj8lZ.js +0 -236
@@ -1,16 +1,17 @@
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";
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";
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-DYcrIMpx.js";
5
- import { u as Y } from "./loading-DK8UdxtS.js";
6
- import { u as Z } from "./business-CchrWCX9.js";
7
- import { u as ee, c as f } from "./campaign-D2RzC0L1.js";
8
- import { g as te, a as $, b as N } from "./campaign-N2x2N6OP.js";
9
- import { u as oe, c as ae, p as ne } from "./template-wZEVj8lZ.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-Bf8Rc-Eh.js";
12
- import { u as re } from "./vue-i18n-BU_SuDqj.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({
4
+ import { p as X } from "./plugins-YK45gSb1.js";
5
+ import { u as Y } from "./loading-CxY9qhzD.js";
6
+ import { u as Z } from "./business-BSe9C-xG.js";
7
+ import { u as ee, c as f } from "./campaign-CXw3jpdr.js";
8
+ import { a as te, b as $, c as N } from "./campaign-BNS2RxKc.js";
9
+ import { c as oe, p as ae } from "./duplicateCampaign-Co2TdbrL.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-DAnw5TFZ.js";
12
+ import { u as se } from "./template-tDq12e1p.js";
13
+ import { u as re } from "./vue-i18n-B-92uhPn.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({
14
15
  __name: "Point",
15
16
  setup(xe) {
16
17
  const { t: i } = re(), D = {
@@ -20,7 +21,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
20
21
  value: "create",
21
22
  isPrimary: !0,
22
23
  prependIcon: "add"
23
- }, K = oe("COIN", W()), C = Z(), d = ee(), { global: O, minor: S } = Y, l = I({
24
+ }, K = se("COIN", W()), C = Z(), p = ee(), { global: O, minor: S } = Y, l = I({
24
25
  searchKey: "",
25
26
  location: []
26
27
  });
@@ -32,7 +33,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
32
33
  }) : e.targetLocation.includes(t);
33
34
  }
34
35
  const g = q(
35
- () => d.campaigns.point.filter((e) => A(e))
36
+ () => p.campaigns.point.filter((e) => A(e))
36
37
  ), R = [
37
38
  {
38
39
  header: i("connect.program.common.table.title"),
@@ -76,7 +77,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
76
77
  async function L(e) {
77
78
  await X.remove(`Are you sure you want to remove ${e.name}?`) && await S(
78
79
  async () => {
79
- await f.delete(e._id), await d.read("COIN");
80
+ await f.delete(e._id), await p.read("COIN");
80
81
  },
81
82
  {
82
83
  message: `Removing ${e.name}`,
@@ -100,9 +101,9 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
100
101
  }
101
102
  async function P(e) {
102
103
  var r;
103
- if (!await ae(e.name))
104
+ if (!await oe(e.name))
104
105
  return;
105
- const t = await f.readById(e._id), c = ne(t, {
106
+ const t = await f.readById(e._id), c = ae(t, {
106
107
  keepCollectible: !0
107
108
  });
108
109
  (r = w.value) == null || r.showSheet(
@@ -115,7 +116,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
115
116
  async function U(e) {
116
117
  await S(
117
118
  async () => {
118
- e.campaign._id ? await f.update(e.campaign._id, e) : await f.create(e), await d.read("COIN");
119
+ e.campaign._id ? await f.update(e.campaign._id, e) : await f.create(e), await p.read("COIN");
119
120
  },
120
121
  {
121
122
  message: `${e.campaign._id ? "Updating" : "Creating"} point program`,
@@ -125,11 +126,11 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
125
126
  }
126
127
  return z(async () => {
127
128
  await O(async () => {
128
- await d.read("COIN");
129
+ await p.read("COIN");
129
130
  });
130
131
  }), (e, t) => {
131
132
  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");
132
- return p(), v(k, null, [
133
+ return d(), v(k, null, [
133
134
  s(r, {
134
135
  title: o(i)("connect.program.point.title"),
135
136
  actions: o(g).length > 0 && o(C).isPremium ? [D] : [],
@@ -151,10 +152,10 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
151
152
  placeholder: "search",
152
153
  collapsible: ""
153
154
  }, null, 8, ["modelValue"]),
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, {
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, {
158
159
  label: `${o(i)("connect.common.location")}: `,
159
160
  "right-icon": "keyboard_arrow_down",
160
161
  modelValue: o(l).location,
@@ -183,9 +184,9 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
183
184
  }, null, 8, ["row-data", "search-value", "hide-footer"]),
184
185
  s(E, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
185
186
  default: h(() => [
186
- (p(!0), v(k, null, G(o(g).filter(
187
+ (d(!0), v(k, null, G(o(g).filter(
187
188
  (a) => a.name.toLowerCase().includes(o(l).searchKey.toLowerCase())
188
- ), (a) => (p(), F(T, {
189
+ ), (a) => (d(), F(T, {
189
190
  key: a._id.toString(),
190
191
  onClick: (_) => y(a),
191
192
  class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
@@ -193,7 +194,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
193
194
  default: h(() => [
194
195
  n("div", ue, [
195
196
  n("div", fe, [
196
- (p(), F(J(o($)(a))))
197
+ (d(), F(J(o($)(a))))
197
198
  ]),
198
199
  n("div", ge, [
199
200
  n("div", ye, u(a.name), 1),
@@ -222,7 +223,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
222
223
  ]),
223
224
  _: 1
224
225
  })
225
- ], 64)) : (p(), F(M, {
226
+ ], 64)) : (d(), F(M, {
226
227
  key: 1,
227
228
  variant: "outlined",
228
229
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
@@ -246,7 +247,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
246
247
  ]),
247
248
  _: 1
248
249
  })),
249
- s(se, {
250
+ s(ie, {
250
251
  ref_key: "sheetRef",
251
252
  ref: w,
252
253
  "onSubmit:modelValue": U
@@ -257,5 +258,5 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
257
258
  }
258
259
  });
259
260
  export {
260
- Ke as default
261
+ Oe as default
261
262
  };
@@ -1,36 +1,37 @@
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-DYcrIMpx.js";
5
- import { u as le } from "./loading-DK8UdxtS.js";
6
- import { u as ce } from "./business-CchrWCX9.js";
7
- import { c as y, u as me } from "./campaign-D2RzC0L1.js";
8
- import { u as ue } from "./vue-i18n-BU_SuDqj.js";
9
- import { g as de, a as D } from "./campaign-N2x2N6OP.js";
10
- import { u as pe, c as fe, p as ye } from "./template-wZEVj8lZ.js";
11
- import { e as q } from "./effect-DADvE7lZ.js";
12
- import { c as K } from "./string-Gcy5IM_H.js";
13
- import { _ as ge } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bf8Rc-Eh.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({
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-YK45gSb1.js";
5
+ import { u as ce } from "./loading-CxY9qhzD.js";
6
+ import { u as me } from "./business-BSe9C-xG.js";
7
+ import { c as y, u as ue } from "./campaign-CXw3jpdr.js";
8
+ import { u as de } from "./vue-i18n-B-92uhPn.js";
9
+ import { g as j, a as pe, b as q } from "./campaign-BNS2RxKc.js";
10
+ import { c as fe, p as ye } from "./duplicateCampaign-Co2TdbrL.js";
11
+ import { e as K } from "./effect-Bt8PE3-M.js";
12
+ import { c as U } from "./string-Gcy5IM_H.js";
13
+ import { _ as ge } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DAnw5TFZ.js";
14
+ import { u as he } from "./template-tDq12e1p.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({
16
17
  __name: "QueueSheet",
17
18
  emits: ["update:model-value"],
18
- setup(Q, { expose: n, emit: R }) {
19
- const p = w(!1), h = w([]);
19
+ setup(H, { expose: n, emit: R }) {
20
+ const p = w(!1), _ = w([]);
20
21
  async function P() {
21
22
  p.value = !0;
22
- const i = await y.getPromotionQueue();
23
- console.log(i, "jobs"), h.value = i;
23
+ const r = await y.getPromotionQueue();
24
+ console.log(r, "jobs"), _.value = r;
24
25
  }
25
26
  const v = [
26
27
  {
27
28
  header: "Started At",
28
- accessorFn: (i) => i.createdAt,
29
+ accessorFn: (r) => r.createdAt,
29
30
  enableSorting: !0
30
31
  },
31
32
  {
32
33
  header: "Campaigns",
33
- accessorFn: (i) => i.campaigns
34
+ accessorFn: (r) => r.campaigns
34
35
  // cell(props) {
35
36
  // const r = props.row.original;
36
37
  // return h('div', {
@@ -41,27 +42,27 @@ const he = { class: "space-y-8" }, _e = /* @__PURE__ */ E({
41
42
  ];
42
43
  return n({
43
44
  showSheet: P
44
- }), (i, u) => {
45
- const _ = d("FmTable"), T = d("FmSideSheet");
45
+ }), (r, u) => {
46
+ const b = d("FmTable"), T = d("FmSideSheet");
46
47
  return f(), S(T, {
47
48
  "max-width": 550,
48
49
  header: "Promotion Sync Queue",
49
50
  modelValue: a(p),
50
51
  "onUpdate:modelValue": [
51
- u[1] || (u[1] = (s) => oe(p) ? p.value = s : null),
52
+ u[1] || (u[1] = (s) => te(p) ? p.value = s : null),
52
53
  u[2] || (u[2] = (s) => p.value = s)
53
54
  ]
54
55
  }, {
55
56
  default: k(() => [
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,
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,
62
63
  "column-defs": v,
63
- "row-data": a(h),
64
- "hide-footer": a(h).length <= 10
64
+ "row-data": a(_),
65
+ "hide-footer": a(_).length <= 10
65
66
  }, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"])
66
67
  ])
67
68
  ]),
@@ -69,10 +70,10 @@ const he = { class: "space-y-8" }, _e = /* @__PURE__ */ E({
69
70
  }, 8, ["modelValue"]);
70
71
  };
71
72
  }
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({
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({
73
74
  __name: "Promotion",
74
- setup(Q) {
75
- const { t: n } = ue(), R = {
75
+ setup(H) {
76
+ const { t: n } = de(), R = {
76
77
  label: n("connect.promotion.createCampaign"),
77
78
  value: "create",
78
79
  isPrimary: !0,
@@ -82,12 +83,12 @@ const he = { class: "space-y-8" }, _e = /* @__PURE__ */ E({
82
83
  value: "sync",
83
84
  isPrimary: !1,
84
85
  prependIcon: "refresh"
85
- }, h = {
86
+ }, _ = {
86
87
  label: "Queue",
87
88
  value: "queue",
88
89
  isPrimary: !1,
89
90
  prependIcon: "work_history"
90
- }, P = pe("PROMOTION", re()), v = ce(), i = me(), { global: u, minor: _ } = le, T = [
91
+ }, P = he("PROMOTION", le()), v = me(), r = ue(), { global: u, minor: b } = ce, T = [
91
92
  {
92
93
  label: "Bill promotion",
93
94
  value: "BILL"
@@ -101,74 +102,78 @@ const he = { class: "space-y-8" }, _e = /* @__PURE__ */ E({
101
102
  location: [],
102
103
  effectType: []
103
104
  });
104
- function H(e) {
105
+ function z(e) {
105
106
  const o = s.value.location;
106
107
  return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((m) => {
107
108
  var l;
108
109
  return (l = e == null ? void 0 : e.targetLocation) == null ? void 0 : l.includes(m);
109
110
  }) : e.targetLocation.includes(o);
110
111
  }
111
- function z(e) {
112
- var l, C;
112
+ function G(e) {
113
+ var l, x;
113
114
  const o = s.value.effectType;
114
115
  if (!o || o.length === 0) return !0;
115
- const m = (C = (l = e.effect) == null ? void 0 : l.options) == null ? void 0 : C.target;
116
+ const m = (x = (l = e.effect) == null ? void 0 : l.options) == null ? void 0 : x.target;
116
117
  return o.includes(m);
117
118
  }
118
- const g = te(
119
- () => i.campaigns.promotion.filter(
120
- (e) => H(e) && z(e)
119
+ const g = ne(
120
+ () => r.campaigns.promotion.filter(
121
+ (e) => z(e) && G(e)
121
122
  )
122
- ), G = [
123
+ ), J = [
123
124
  {
124
125
  header: n("connect.promotion.promotionTitle"),
125
126
  accessorFn: (e) => e.name
126
127
  },
128
+ {
129
+ header: n("connect.promotion.campaignDate"),
130
+ accessorFn: (e) => j(e)
131
+ },
127
132
  {
128
133
  header: n("connect.promotion.status"),
129
- accessorFn: (e) => de(e),
134
+ accessorFn: (e) => pe(e),
130
135
  cell(e) {
131
- return D(e.row.original);
136
+ return q(e.row.original);
132
137
  }
133
138
  },
134
139
  {
135
140
  header: n("connect.promotion.type"),
136
- accessorFn: (e) => `${K.title(e.effect.options.target)} promotion`
141
+ accessorFn: (e) => `${U.title(e.effect.options.target)} promotion`
137
142
  },
138
143
  {
139
144
  header: n("connect.promotion.summary"),
140
- accessorFn: (e) => q(e.effect)
145
+ accessorFn: (e) => K(e.effect)
141
146
  },
142
147
  {
143
148
  header: n("connect.promotion.actions"),
144
149
  cell(e) {
145
150
  return I("div", { class: "flex items-center gap-8 justify-end" }, [
146
- I($.FmButton, {
151
+ I(N.FmButton, {
147
152
  variant: "tertiary",
148
153
  icon: "content_copy",
149
154
  iconColor: "neutral-gray-400",
150
155
  onClick: async (o) => {
151
- o.stopPropagation(), await N(e.row.original);
156
+ o.stopPropagation(), await M(e.row.original);
152
157
  }
153
158
  }),
154
- I($.FmButton, {
159
+ I(N.FmButton, {
155
160
  variant: "tertiary",
156
161
  icon: "delete",
157
162
  iconColor: "neutral-gray-400",
158
163
  onClick: (o) => {
159
- o.stopPropagation(), M(e.row.original);
164
+ o.stopPropagation(), D(e.row.original);
160
165
  }
161
166
  })
162
167
  ]);
163
168
  }
164
169
  }
165
170
  ], V = w(), A = w();
166
- async function M(e) {
167
- await j.remove(
171
+ async function D(e) {
172
+ await $.remove(
168
173
  n("connect.promotion.confirmRemove", { name: e.name })
169
- ) && await _(
174
+ ) && await b(
170
175
  async () => {
171
- await y.delete(e._id), await i.read("PROMOTION");
176
+ await y.delete(e._id), await r.read("PROMOTION");
172
177
  },
173
178
  {
174
179
  message: n("connect.promotion.removing", { name: e.name }),
@@ -178,7 +183,7 @@ const he = { class: "space-y-8" }, _e = /* @__PURE__ */ E({
178
183
  }
179
184
  );
180
185
  }
181
- async function b(e) {
186
+ async function C(e) {
182
187
  e ? await o() : P.open(async (m) => {
183
188
  await o(m);
184
189
  });
@@ -192,7 +197,7 @@ const he = { class: "space-y-8" }, _e = /* @__PURE__ */ E({
192
197
  );
193
198
  }
194
199
  }
195
- async function N(e) {
200
+ async function M(e) {
196
201
  var l;
197
202
  if (!await fe(e.name))
198
203
  return;
@@ -204,10 +209,10 @@ const he = { class: "space-y-8" }, _e = /* @__PURE__ */ E({
204
209
  o.template
205
210
  );
206
211
  }
207
- async function J(e) {
208
- await _(
212
+ async function W(e) {
213
+ await b(
209
214
  async () => {
210
- e.campaign._id ? await y.update(e.campaign._id, e) : await y.create(e), await i.read("PROMOTION");
215
+ e.campaign._id ? await y.update(e.campaign._id, e) : await y.create(e), await r.read("PROMOTION");
211
216
  },
212
217
  {
213
218
  message: n(
@@ -219,17 +224,17 @@ const he = { class: "space-y-8" }, _e = /* @__PURE__ */ E({
219
224
  }
220
225
  );
221
226
  }
222
- async function W(e) {
227
+ async function X(e) {
223
228
  var o;
224
229
  switch (e) {
225
230
  case "create":
226
- b();
231
+ C();
227
232
  break;
228
233
  case "sync":
229
- await j.confirm(
234
+ await $.confirm(
230
235
  "Are you sure you want to synchronize all promotions to POS?",
231
236
  "Force sync"
232
- ) && _(
237
+ ) && b(
233
238
  async () => {
234
239
  await y.syncAllPromotion();
235
240
  },
@@ -244,19 +249,19 @@ const he = { class: "space-y-8" }, _e = /* @__PURE__ */ E({
244
249
  break;
245
250
  }
246
251
  }
247
- return ne(async () => {
252
+ return ae(async () => {
248
253
  await u(async () => {
249
- await v.readLocations(), await i.read("PROMOTION");
254
+ await v.readLocations(), await r.read("PROMOTION");
250
255
  });
251
256
  }), (e, o) => {
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");
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");
253
258
  return f(), L(B, null, [
254
259
  c(m, {
255
260
  title: a(n)("connect.promotion.title"),
256
- actions: a(g).length > 0 ? [R, p, h] : [],
257
- "onClick:action": W
261
+ actions: a(g).length > 0 ? [R, p, _] : [],
262
+ "onClick:action": X
258
263
  }, null, 8, ["title", "actions"]),
259
- r("div", we, [
264
+ i("div", we, [
260
265
  c(l, {
261
266
  modelValue: s.value.searchKey,
262
267
  "onUpdate:modelValue": o[0] || (o[0] = (t) => s.value.searchKey = t),
@@ -265,9 +270,9 @@ const he = { class: "space-y-8" }, _e = /* @__PURE__ */ E({
265
270
  collapsible: ""
266
271
  }, null, 8, ["modelValue", "placeholder"]),
267
272
  a(g) && a(g).length > 0 ? (f(), L(B, { key: 0 }, [
268
- r("div", ve, [
269
- r("div", be, [
270
- c(U, {
273
+ i("div", ve, [
274
+ i("div", Ce, [
275
+ c(E, {
271
276
  label: `${a(n)("connect.common.location")}: `,
272
277
  "right-icon": "keyboard_arrow_down",
273
278
  modelValue: s.value.location,
@@ -276,7 +281,7 @@ const he = { class: "space-y-8" }, _e = /* @__PURE__ */ E({
276
281
  "show-item-label": !0,
277
282
  items: a(v).locationOptions
278
283
  }, null, 8, ["label", "modelValue", "items"]),
279
- c(U, {
284
+ c(E, {
280
285
  label: "Type:",
281
286
  "right-icon": "keyboard_arrow_down",
282
287
  modelValue: s.value.effectType,
@@ -294,53 +299,54 @@ const he = { class: "space-y-8" }, _e = /* @__PURE__ */ E({
294
299
  collapsible: ""
295
300
  }, null, 8, ["modelValue"])
296
301
  ]),
297
- c(C, {
302
+ c(x, {
298
303
  class: "xs:hidden sm:hidden",
299
304
  "row-data": a(g),
300
- "column-defs": G,
305
+ "column-defs": J,
301
306
  "search-value": s.value.searchKey,
302
307
  "column-filter": [],
303
- onRowClick: o[4] || (o[4] = (t) => b(t.original)),
308
+ onRowClick: o[4] || (o[4] = (t) => C(t.original)),
304
309
  "hide-footer": a(g).length < 10
305
310
  }, null, 8, ["row-data", "search-value", "hide-footer"]),
306
- c(Z, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
311
+ c(ee, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
307
312
  default: k(() => [
308
- (f(!0), L(B, null, ae(a(g).filter(
313
+ (f(!0), L(B, null, se(a(g).filter(
309
314
  (t) => t.name.toLowerCase().includes(s.value.searchKey.toLowerCase())
310
- ), (t) => (f(), S(Y, {
315
+ ), (t) => (f(), S(Z, {
311
316
  key: t._id.toString(),
312
- onClick: (x) => b(t),
317
+ onClick: (F) => C(t),
313
318
  class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
314
319
  }, {
315
320
  default: k(() => [
316
- r("div", Ce, [
317
- r("div", xe, [
318
- (f(), S(se(a(D)(t)))),
319
- c(X, {
321
+ i("div", xe, [
322
+ i("div", Fe, [
323
+ (f(), S(ie(a(q)(t)))),
324
+ c(Y, {
320
325
  class: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
321
326
  compact: !0,
322
- label: `${a(K).title(t.effect.options.target)} promotion`
327
+ label: `${a(U).title(t.effect.options.target)} promotion`
323
328
  }, null, 8, ["label"])
324
329
  ]),
325
- r("div", Fe, [
326
- r("div", Se, F(t.name), 1),
327
- r("div", ke, F(a(q)(t.effect)), 1)
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)
328
334
  ])
329
335
  ]),
330
- r("div", Pe, [
336
+ i("div", Ve, [
331
337
  c(O, {
332
338
  icon: "content_copy",
333
339
  "icon-color": "neutral-gray-400",
334
340
  variant: "tertiary",
335
- onClick: async (x) => {
336
- x.stopPropagation(), await N(t);
341
+ onClick: async (F) => {
342
+ F.stopPropagation(), await M(t);
337
343
  }
338
344
  }, null, 8, ["onClick"]),
339
345
  c(O, {
340
346
  icon: "delete",
341
347
  "icon-color": "neutral-gray-400",
342
348
  variant: "tertiary",
343
- onClick: (x) => (x.stopPropagation(), M(t))
349
+ onClick: (F) => (F.stopPropagation(), D(t))
344
350
  }, null, 8, ["onClick"])
345
351
  ])
346
352
  ]),
@@ -349,25 +355,25 @@ const he = { class: "space-y-8" }, _e = /* @__PURE__ */ E({
349
355
  ]),
350
356
  _: 1
351
357
  })
352
- ], 64)) : (f(), S(ee, {
358
+ ], 64)) : (f(), S(oe, {
353
359
  key: 1,
354
360
  variant: "outlined",
355
361
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
356
362
  }, {
357
363
  default: k(() => [
358
- o[6] || (o[6] = r("img", {
359
- src: ie,
364
+ o[6] || (o[6] = i("img", {
365
+ src: re,
360
366
  class: "aspect-square w-[150px]"
361
367
  }, null, -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)
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)
365
371
  ]),
366
372
  c(O, {
367
373
  variant: "primary",
368
374
  label: a(n)("connect.promotion.createPromotionCampaign"),
369
375
  icon: "add",
370
- onClick: o[5] || (o[5] = (t) => b())
376
+ onClick: o[5] || (o[5] = (t) => C())
371
377
  }, null, 8, ["label"])
372
378
  ]),
373
379
  _: 1
@@ -376,9 +382,9 @@ const he = { class: "space-y-8" }, _e = /* @__PURE__ */ E({
376
382
  c(ge, {
377
383
  ref_key: "sheetRef",
378
384
  ref: V,
379
- "onSubmit:modelValue": J
385
+ "onSubmit:modelValue": W
380
386
  }, null, 512),
381
- c(_e, {
387
+ c(be, {
382
388
  ref_key: "queueSheetRef",
383
389
  ref: A
384
390
  }, null, 512)
@@ -387,5 +393,5 @@ const he = { class: "space-y-8" }, _e = /* @__PURE__ */ E({
387
393
  }
388
394
  });
389
395
  export {
390
- Qe as default
396
+ Ge as default
391
397
  };