@feedmepos/mf-connect 0.1.115-dev → 0.1.115-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 (154) hide show
  1. package/README.md +1 -66
  2. package/dist/{App-43mZfFAr.js → App-CvtSY8ZO.js} +618 -652
  3. package/dist/{Bin-CA7v180Y.js → Bin-B3gS9QVZ.js} +8 -8
  4. package/dist/{Broadcast-qmdifF2Y.js → Broadcast-DAeb-HaN.js} +21 -22
  5. package/dist/{CampaignAnalytic-xnrDxqaH.js → CampaignAnalytic-BfTaHVem.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zjk-QdtX.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zsei4OfG.js} +9 -9
  7. package/dist/{Card-D8icsk7L.js → Card-JFeVIwFs.js} +24 -25
  8. package/dist/{Collections--THcD-E_.js → Collections-xcDpEhIm.js} +185 -197
  9. package/dist/{Credit-JrbtVMBp.js → Credit-C9HJZjDS.js} +20 -21
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DrwKtnE5.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DSqVY91w.js} +1 -1
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D_jXVE2I.js +3494 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hVgqWdD0.js → EffectSheet.vue_vue_type_style_index_0_lang-C3J0rCTt.js} +32 -32
  13. package/dist/{Experience-CFeRqBoj.js → Experience-DszS8gto.js} +31 -32
  14. package/dist/{FileSaver.min-CCXIBm58.js → FileSaver.min-CFVQKaC-.js} +1 -1
  15. package/dist/{Game-CPxq6Ex3.js → Game-DhgeN7E2.js} +18 -19
  16. package/dist/{GiftCardSetup-D0esVZDp.js → GiftCardSetup-CWm6IhrS.js} +75 -75
  17. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-CJ1-vL-K.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-BuKADvmK.js} +7 -7
  18. package/dist/{Goals-DaKI6uXt.js → Goals-DtRVierH.js} +4 -4
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BOnL0GxM.js → ImageInput.vue_vue_type_script_setup_true_lang-DlEFyu6h.js} +1 -1
  20. package/dist/{Index-2kENoaZm.js → Index-DFRcu_qE.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BtWnJKU_.js → LocationPicker.vue_vue_type_script_setup_true_lang-B3Br4Xvi.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CX_Sspu5.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CjNJj3qj.js} +1 -1
  23. package/dist/{LoyaltyDashboard-CB93Fz8u.js → LoyaltyDashboard-BWHKDPzk.js} +15 -15
  24. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-Du8fw5v_.js → MainLayout-BmpNNAiE.js} +4 -5
  25. package/dist/Marketing-BKK45Eve.js +236 -0
  26. package/dist/{remy-icon-BhUGu2NI.js → MarketingMaterialEdit-x3c_N7Gs.js} +1031 -2
  27. package/dist/{Member-B--nYyr0.js → Member-xEzrBW_p.js} +7 -7
  28. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-BBlzO7Db.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DRoC-I0t.js} +50 -43
  29. package/dist/{MemberImportHistory-D52Y4RTC.js → MemberImportHistory-CEQpBBF8.js} +7 -7
  30. package/dist/{MemberList-13Owa1fj.js → MemberList-CCvzkHv8.js} +105 -103
  31. package/dist/{MemberTransactions-CpXEWNbq.js → MemberTransactions-Bmh39J2W.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DlELjFM0.js → MessageInput.vue_vue_type_script_setup_true_lang-D3Pmk80l.js} +14 -14
  33. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-C_y0rM8c.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DIBKAwHP.js} +1 -1
  34. package/dist/{Mission-Ci-UzXSu.js → Mission-CpUo2Bgw.js} +21 -22
  35. package/dist/{Overview-CKxSfAGF.js → Overview-CwQqQ1Tn.js} +144 -145
  36. package/dist/{Overview-CXen9Ram.js → Overview-DcDZmDXA.js} +22 -23
  37. package/dist/{Point-CR3YOaag.js → Point-CUNQsQIx.js} +21 -22
  38. package/dist/{Promotion-tw3J4ul-.js → Promotion-Cqdim7aW.js} +131 -137
  39. package/dist/{Queue-BZGA5ZXt.js → Queue-CNBVh1UG.js} +45 -46
  40. package/dist/{Record-BTevVXnT.js → Record-BYwz4l4o.js} +9 -9
  41. package/dist/{Review-BU7c8ZF0.js → Review-CqLcZFj8.js} +2 -2
  42. package/dist/ReviewFacebookCallback-DbSCILNN.js +238 -0
  43. package/dist/{ReviewGoogleCallback-xpdPHSdg.js → ReviewGoogleCallback-Dg8R7QlO.js} +5 -5
  44. package/dist/{Reward-jlA_7cxz.js → Reward-M8GZ8eHq.js} +29 -29
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-D3z_n42G.js → RewardGroup.vue_vue_type_script_setup_true_lang-BkM9-Sx-.js} +15 -16
  46. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CnaL93TF.js +1883 -0
  47. package/dist/{Segment-C1Bwm--Q.js → Segment-CrMi6xrp.js} +305 -304
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B6apgWTM.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DKH5_9db.js} +30 -31
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-B7m2F9UV.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CyeAQ-hg.js} +4 -4
  50. package/dist/Setting-BnFRI0Se.js +2037 -0
  51. package/dist/{SettingAdvertisements-4XEAJzlL.js → SettingAdvertisements-Dh7v4c1D.js} +12 -12
  52. package/dist/Settings-BvT8_tkQ.js +179 -0
  53. package/dist/{Store-C56dXtc4.js → Store-CV-BmK5b.js} +30 -31
  54. package/dist/{StoreRewards-DQ1Q6WS6.js → StoreRewards-DPhSLvSZ.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CDu1QySl.js +1264 -0
  56. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Dqz6jTlH.js +142 -0
  57. package/dist/{Tier-D4CPZqw7.js → Tier-ChvYps23.js} +687 -2576
  58. package/dist/{Title-DCbwhUic.js → Title-v-Ivswr1.js} +92 -94
  59. package/dist/{Transaction-C5LrasXr.js → Transaction-CRqE1Ix0.js} +2 -2
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Cl9b4mrK.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B0Uh9iuj.js} +26 -26
  61. package/dist/{Voucher-rrVbNZKR.js → Voucher-Bg8FOuzD.js} +19 -19
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BIq227nz.js → VoucherEditor.vue_vue_type_script_setup_true_lang-HKxivQMF.js} +16 -16
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C39_95SZ.js → ZodTextField.vue_vue_type_script_setup_true_lang-8d290Dcp.js} +2 -2
  64. package/dist/{app-CgimGODl.js → app-DdNKsn2Q.js} +7107 -8874
  65. package/dist/app.js +3 -4
  66. package/dist/{base.export-D2P6HFvo.js → base.export-R97FrSQL.js} +2 -2
  67. package/dist/{business-Bu5TqSA0.js → business-Ce8vq3wQ.js} +1 -1
  68. package/dist/{campaign-zJxttSIk.js → campaign-BTllt2LH.js} +25 -31
  69. package/dist/{campaign-BFIXSgdJ.js → campaign-C19If7bW.js} +94 -121
  70. package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-9CCbalR4.js} +2 -3
  71. package/dist/{campaign.fn-gvjlcEfe.js → campaign.fn-B4g03h0A.js} +78 -78
  72. package/dist/{collectible.enum-Liy2wH3s.js → collectible.enum-MvqF7mSg.js} +1 -1
  73. package/dist/{collection.fn-DOm0HsSh.js → collection.fn-CR0bD33S.js} +2 -2
  74. package/dist/{currency-BpbQvbm8.js → currency-DmlguGIM.js} +1 -1
  75. package/dist/{effect-D-GtNB3n.js → effect-Dx3zfl28.js} +1 -1
  76. package/dist/{email-addresses-BKMoAtMi.js → email-addresses-De5PGOY4.js} +2 -2
  77. package/dist/{feature-flag-BJ_eyKsq.js → feature-flag-CD9V1V0h.js} +74 -74
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-CkfjBgMM.js → helper-CEiv7SaO.js} +1 -1
  80. package/dist/{index-zTvr2GR4.js → index-649OZ_e1.js} +2 -2
  81. package/dist/{index-feCrYhi6.js → index-B8meeQoD.js} +1 -1
  82. package/dist/{index-CIej31pF.js → index-B8yWVB8P.js} +3 -4
  83. package/dist/{index-BKsxIwbi.js → index-BAXKd9Gg.js} +198 -198
  84. package/dist/{index-BAtUrtqM.js → index-BDPnyro2.js} +6 -19
  85. package/dist/{index-DUAZOMVJ.js → index-BR9h5DTI.js} +1 -1
  86. package/dist/{index-DwU3fsLW.js → index-BVdYxi3l.js} +15 -29
  87. package/dist/{index-D0JK99Ko.js → index-BW6eb3n6.js} +252 -611
  88. package/dist/{index-LygS9WsG.js → index-BYI9ttxy.js} +10767 -8028
  89. package/dist/{index-BdEXUNoG.js → index-BquSqx6K.js} +4 -4
  90. package/dist/{index-BpTIulTX.js → index-CBJy9bxB.js} +1 -1
  91. package/dist/{index-B6kU3PkV.js → index-CPODug8b.js} +2613 -2700
  92. package/dist/{index-CfQuYqXn.js → index-CWUrODxL.js} +1 -1
  93. package/dist/{index-DKxN1mMS.js → index-CqOCJTeR.js} +232 -390
  94. package/dist/{index-CuREApMc.js → index-D4d3l0gw.js} +7 -8
  95. package/dist/{index-Bhl5IRXy.js → index-DT3S00_Y.js} +10 -11
  96. package/dist/{index-DqGs6RJG.js → index-IZRfmmde.js} +581 -683
  97. package/dist/{index-CQ8XFbBk.js → index-__UT3_Ey.js} +2 -2
  98. package/dist/{index-CCEXSPxk.js → index-xct3mnu8.js} +7 -7
  99. package/dist/{index.esm2017-DZi9IQPS.js → index.esm2017-AVbZ9btd.js} +177 -177
  100. package/dist/{loading-Brid2wnu.js → loading-BvHm1m3K.js} +1 -1
  101. package/dist/{lodash-C1epw3Kv.js → lodash-Dvrceo7x.js} +1 -1
  102. package/dist/{member-import-DAIxTIiu.js → member-import-c9avpiSS.js} +5 -6
  103. package/dist/{membership-BZmljFhF.js → membership-D-pZS634.js} +3 -3
  104. package/dist/{money-cLcyGcSZ.js → money-D4skwMkD.js} +1 -1
  105. package/dist/{number-C2jPLJr2.js → number-DJ6ncfT6.js} +1 -1
  106. package/dist/objectid-DEMM_jdR.js +145 -0
  107. package/dist/{onboarding-oRfy_g05.js → onboarding-t7R1d3h-.js} +25 -25
  108. package/dist/{onboardingSetup-BLD6m8HY.js → onboardingSetup-lTaJc0oT.js} +2 -2
  109. package/dist/{plugins-CUsr9vB0.js → plugins-DQNOWwRC.js} +3 -3
  110. package/dist/{reward-UOT03odb.js → reward-BK150pjm.js} +1 -1
  111. package/dist/{rule-BgJnPjkI.js → rule-COcdAnUu.js} +492 -572
  112. package/dist/rule-builder-Deufb6h_.js +102 -0
  113. package/dist/style.css +1 -1
  114. package/dist/template-DeebIqJ_.js +236 -0
  115. package/dist/{timezone-BXA4wq7Y.js → timezone-BP6UC4KL.js} +1 -1
  116. package/dist/{transaction.fn-CQ4fpRt3.js → transaction.fn-BY0hzon0.js} +2 -2
  117. package/dist/{trigger-DXJCGT0q.js → trigger-DVBjVPbN.js} +8 -8
  118. package/dist/useMarketingMaterialActions-DpQCQHFI.js +96 -0
  119. package/dist/{usePagination-Pp4okWr8.js → usePagination-QT552XyF.js} +1 -1
  120. package/dist/{user-B3gXcAIy.js → user-CmAxNc7T.js} +1 -1
  121. package/dist/vue-i18n-Cze706-f.js +2365 -0
  122. package/dist/{xlsx-CCaDUTgW.js → xlsx-DAczoc8y.js} +224 -224
  123. package/dist/{zod-CPwjOxvW.js → zod-Aj-GuVQL.js} +1 -1
  124. package/package.json +2 -6
  125. package/dist/AuditLogs-BPpdm96t.js +0 -2016
  126. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DgdAlHU7.js +0 -4442
  127. package/dist/Grab-BWzdN_cd.js +0 -301
  128. package/dist/MainLayout-DwnjGXh6.js +0 -4
  129. package/dist/Marketing-DCco__2F.js +0 -273
  130. package/dist/MarketingMaterialEdit-BbgFtrYP.js +0 -1037
  131. package/dist/ReviewFacebookCallback-BnMF6Arh.js +0 -225
  132. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CsHxqH9h.js +0 -1923
  133. package/dist/Setting-CDM4RhLW.js +0 -574
  134. package/dist/Settings-D-0tvZRr.js +0 -286
  135. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-LLD91Rz6.js +0 -1319
  136. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Bvy4NJMd.js +0 -7007
  137. package/dist/WhatsappAccount-oJDo5zTr.js +0 -159
  138. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-aCQCYFYq.js +0 -39
  139. package/dist/WhatsappBot-Cl64wG_F.js +0 -876
  140. package/dist/WhatsappBotLogs-D3uT4EiB.js +0 -372
  141. package/dist/WhatsappBotSettings-Cs1lLxh-.js +0 -705
  142. package/dist/WhatsappLayout-C639d2HP.js +0 -21
  143. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DpPxWp2x.js +0 -253
  144. package/dist/browser-BSAOEeIM.js +0 -1478
  145. package/dist/duplicateCampaign-CvsvjRE9.js +0 -51
  146. package/dist/feature-flag-Bo-k5sIG.js +0 -50
  147. package/dist/google-BQK68wbe.js +0 -5
  148. package/dist/index-C-iwb2Ln.js +0 -109
  149. package/dist/index-C_H8jFYf.js +0 -2743
  150. package/dist/index-DQ8JJhxs.js +0 -74
  151. package/dist/objectid-C-wocWKI.js +0 -145
  152. package/dist/template-BZyFhr73.js +0 -188
  153. package/dist/useMarketingMaterialActions-B-Wib5ga.js +0 -125
  154. package/dist/vue-i18n-DWGiC_vs.js +0 -2365
@@ -1,42 +1,41 @@
1
- import { defineComponent as z, ref as C, resolveComponent as p, openBlock as y, createBlock as T, unref as a, isRef as ie, withCtx as V, createElementVNode as i, createVNode as r, computed as se, h as P, onMounted as re, createElementBlock as L, Fragment as A, renderList as le, resolveDynamicComponent as ce, toDisplayString as w } from "vue";
2
- import { _ as me } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as ue, components as M } from "@feedmepos/ui-library";
4
- import { p as j } from "./plugins-CUsr9vB0.js";
5
- import { u as pe } from "./loading-Brid2wnu.js";
6
- import { u as de } from "./business-Bu5TqSA0.js";
7
- import { u as fe } from "./campaign-zJxttSIk.js";
8
- import { u as ye } from "./vue-i18n-DWGiC_vs.js";
9
- import { g as q, a as ge, b as K } from "./campaign-BFIXSgdJ.js";
10
- import { c as he, p as _e } from "./duplicateCampaign-CvsvjRE9.js";
11
- import { e as E } from "./effect-D-GtNB3n.js";
12
- import { c as Q } from "./string-Gcy5IM_H.js";
13
- import "./index-feCrYhi6.js";
14
- import { _ as we } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DgdAlHU7.js";
15
- import { c as g } from "./index-zTvr2GR4.js";
16
- import { u as be } from "./template-BZyFhr73.js";
17
- import { _ as H } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
18
- import { u as ve } from "./onboardingSetup-BLD6m8HY.js";
19
- import { useRouter as Ce } from "vue-router";
20
- import { R as Se } from "./app-CgimGODl.js";
21
- const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
1
+ import { defineComponent as H, ref as b, resolveComponent as p, openBlock as y, createBlock as T, unref as a, isRef as ae, withCtx as V, createElementVNode as r, createVNode as s, computed as ie, h as O, onMounted as se, createElementBlock as A, Fragment as L, renderList as re, resolveDynamicComponent as le, toDisplayString as P } from "vue";
2
+ import { _ as ce } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as me, components as M } from "@feedmepos/ui-library";
4
+ import { p as D } from "./plugins-DQNOWwRC.js";
5
+ import { u as ue } from "./loading-BvHm1m3K.js";
6
+ import { u as pe } from "./business-Ce8vq3wQ.js";
7
+ import { u as de } from "./campaign-BTllt2LH.js";
8
+ import { u as fe } from "./vue-i18n-Cze706-f.js";
9
+ import { g as ye, a as q } from "./campaign-C19If7bW.js";
10
+ import { u as ge, c as he, p as _e } from "./template-DeebIqJ_.js";
11
+ import { e as K } from "./effect-Dx3zfl28.js";
12
+ import { c as E } from "./string-Gcy5IM_H.js";
13
+ import "./index-B8meeQoD.js";
14
+ import { _ as we } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-D_jXVE2I.js";
15
+ import { c as g } from "./index-649OZ_e1.js";
16
+ import { _ as Q } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
17
+ import { u as ve } from "./onboardingSetup-lTaJc0oT.js";
18
+ import { useRouter as be } from "vue-router";
19
+ import { R as Ce } from "./app-DdNKsn2Q.js";
20
+ const Se = { class: "space-y-8" }, ke = /* @__PURE__ */ H({
22
21
  __name: "QueueSheet",
23
22
  emits: ["update:model-value"],
24
- setup(G, { expose: n, emit: B }) {
25
- const d = C(!1), b = C([]);
23
+ setup(z, { expose: n, emit: B }) {
24
+ const d = b(!1), w = b([]);
26
25
  async function I() {
27
26
  d.value = !0;
28
- const s = await g.getPromotionQueue();
29
- console.log(s, "jobs"), b.value = s;
27
+ const i = await g.getPromotionQueue();
28
+ console.log(i, "jobs"), w.value = i;
30
29
  }
31
- const S = [
30
+ const C = [
32
31
  {
33
32
  header: "Started At",
34
- accessorFn: (s) => s.createdAt,
33
+ accessorFn: (i) => i.createdAt,
35
34
  enableSorting: !0
36
35
  },
37
36
  {
38
37
  header: "Campaigns",
39
- accessorFn: (s) => s.campaigns
38
+ accessorFn: (i) => i.campaigns
40
39
  // cell(props) {
41
40
  // const r = props.row.original;
42
41
  // return h('div', {
@@ -47,27 +46,27 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
47
46
  ];
48
47
  return n({
49
48
  showSheet: I
50
- }), (s, u) => {
49
+ }), (i, u) => {
51
50
  const v = p("FmTable"), R = p("FmSideSheet");
52
51
  return y(), T(R, {
53
52
  "max-width": 550,
54
53
  header: "Promotion Sync Queue",
55
54
  modelValue: a(d),
56
55
  "onUpdate:modelValue": [
57
- u[1] || (u[1] = (f) => ie(d) ? d.value = f : null),
56
+ u[1] || (u[1] = (f) => ae(d) ? d.value = f : null),
58
57
  u[2] || (u[2] = (f) => d.value = f)
59
58
  ]
60
59
  }, {
61
60
  default: V(() => [
62
- i("div", xe, [
63
- 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)),
64
- r(v, {
65
- modelValue: s.tableRef,
66
- "onUpdate:modelValue": u[0] || (u[0] = (f) => s.tableRef = f),
67
- "column-filter": s.jobFilters,
68
- "column-defs": S,
69
- "row-data": a(b),
70
- "hide-footer": a(b).length <= 10
61
+ r("div", Se, [
62
+ 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)),
63
+ s(v, {
64
+ modelValue: i.tableRef,
65
+ "onUpdate:modelValue": u[0] || (u[0] = (f) => i.tableRef = f),
66
+ "column-filter": i.jobFilters,
67
+ "column-defs": C,
68
+ "row-data": a(w),
69
+ "hide-footer": a(w).length <= 10
71
70
  }, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"])
72
71
  ])
73
72
  ]),
@@ -75,10 +74,10 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
75
74
  }, 8, ["modelValue"]);
76
75
  };
77
76
  }
78
- }), ke = { class: "px-24 flex flex-col gap-y-16" }, Oe = { class: "flex items-center justify-between w-full" }, Pe = { class: "flex gap-8 overflow-x-auto" }, Te = { class: "space-y-8" }, Ve = { class: "flex w-full gap-4 items-center" }, Ie = { class: "space-y-4" }, Re = { class: "fm-typo-en-body-lg-600" }, Le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ae = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me = { class: "flex items-center gap-8" }, Be = { class: "flex flex-col gap-16 text-center" }, Ne = { class: "fm-typo-en-title-sm-800" }, De = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, io = /* @__PURE__ */ z({
77
+ }), xe = { class: "px-24 flex flex-col gap-y-16" }, Fe = { class: "flex items-center justify-between w-full" }, Oe = { class: "flex gap-8 overflow-x-auto" }, Pe = { class: "space-y-8" }, Te = { class: "flex w-full gap-4 items-center" }, Ve = { class: "space-y-4" }, Ie = { class: "fm-typo-en-body-lg-600" }, Re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ae = { class: "flex items-center gap-8" }, Le = { class: "flex flex-col gap-16 text-center" }, Me = { class: "fm-typo-en-title-sm-800" }, Be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, to = /* @__PURE__ */ H({
79
78
  __name: "Promotion",
80
- setup(G) {
81
- const { t: n } = ye(), B = {
79
+ setup(z) {
80
+ const { t: n } = fe(), B = {
82
81
  label: n("connect.promotion.createCampaign"),
83
82
  value: "create",
84
83
  isPrimary: !0,
@@ -88,12 +87,12 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
88
87
  value: "sync",
89
88
  isPrimary: !1,
90
89
  prependIcon: "refresh"
91
- }, b = {
90
+ }, w = {
92
91
  label: "Queue",
93
92
  value: "queue",
94
93
  isPrimary: !1,
95
94
  prependIcon: "work_history"
96
- }, I = be("PROMOTION", ue()), S = de(), s = fe(), { global: u, minor: v } = pe, R = Ce(), f = [
95
+ }, I = ge("PROMOTION", me()), C = pe(), i = de(), { global: u, minor: v } = ue, R = be(), f = [
97
96
  {
98
97
  label: "Bill promotion",
99
98
  value: "BILL"
@@ -102,91 +101,87 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
102
101
  label: "Item promotion",
103
102
  value: "ITEM"
104
103
  }
105
- ], c = C({
104
+ ], c = b({
106
105
  searchKey: "",
107
106
  location: [],
108
107
  effectType: []
109
108
  });
110
- function Y(e) {
109
+ function G(e) {
111
110
  const o = c.value.location;
112
111
  return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((m) => {
113
112
  var l;
114
113
  return (l = e == null ? void 0 : e.targetLocation) == null ? void 0 : l.includes(m);
115
114
  }) : e.targetLocation.includes(o);
116
115
  }
117
- function J(e) {
118
- var l, k;
116
+ function Y(e) {
117
+ var l, x;
119
118
  const o = c.value.effectType;
120
119
  if (!o || o.length === 0) return !0;
121
- const m = (k = (l = e.effect) == null ? void 0 : l.options) == null ? void 0 : k.target;
120
+ const m = (x = (l = e.effect) == null ? void 0 : l.options) == null ? void 0 : x.target;
122
121
  return o.includes(m);
123
122
  }
124
- const h = se(
125
- () => s.campaigns.promotion.filter(
126
- (e) => Y(e) && J(e)
123
+ const h = ie(
124
+ () => i.campaigns.promotion.filter(
125
+ (e) => G(e) && Y(e)
127
126
  )
128
- ), W = [
127
+ ), J = [
129
128
  {
130
129
  header: n("connect.promotion.promotionTitle"),
131
130
  accessorFn: (e) => e.name
132
131
  },
133
- {
134
- header: n("connect.promotion.campaignDate"),
135
- accessorFn: (e) => q(e)
136
- },
137
132
  {
138
133
  header: n("connect.promotion.status"),
139
- accessorFn: (e) => ge(e),
134
+ accessorFn: (e) => ye(e),
140
135
  cell(e) {
141
- return K(e.row.original);
136
+ return q(e.row.original);
142
137
  }
143
138
  },
144
139
  {
145
140
  header: n("connect.promotion.type"),
146
- accessorFn: (e) => `${Q.title(e.effect.options.target)} promotion`
141
+ accessorFn: (e) => `${E.title(e.effect.options.target)} promotion`
147
142
  },
148
143
  {
149
144
  header: n("connect.promotion.summary"),
150
- accessorFn: (e) => E(e.effect)
145
+ accessorFn: (e) => K(e.effect)
151
146
  },
152
147
  {
153
148
  header: n("connect.promotion.actions"),
154
149
  cell(e) {
155
- return P("div", { class: "flex items-center gap-8 justify-end" }, [
156
- P(M.FmButton, {
150
+ return O("div", { class: "flex items-center gap-8 justify-end" }, [
151
+ O(M.FmButton, {
157
152
  variant: "tertiary",
158
153
  icon: "insights",
159
154
  iconColor: "neutral-gray-400",
160
155
  onClick: async (o) => {
161
- o.stopPropagation(), await $(e.row.original);
156
+ o.stopPropagation(), await U(e.row.original);
162
157
  }
163
158
  }),
164
- P(M.FmButton, {
159
+ O(M.FmButton, {
165
160
  variant: "tertiary",
166
161
  icon: "content_copy",
167
162
  iconColor: "neutral-gray-400",
168
163
  onClick: async (o) => {
169
- o.stopPropagation(), await U(e.row.original);
164
+ o.stopPropagation(), await j(e.row.original);
170
165
  }
171
166
  }),
172
- P(M.FmButton, {
167
+ O(M.FmButton, {
173
168
  variant: "tertiary",
174
169
  icon: "delete",
175
170
  iconColor: "neutral-gray-400",
176
171
  onClick: (o) => {
177
- o.stopPropagation(), D(e.row.original);
172
+ o.stopPropagation(), $(e.row.original);
178
173
  }
179
174
  })
180
175
  ]);
181
176
  }
182
177
  }
183
- ], x = C(), N = C();
184
- async function D(e) {
185
- await j.remove(
178
+ ], S = b(), N = b();
179
+ async function $(e) {
180
+ await D.remove(
186
181
  n("connect.promotion.confirmRemove", { name: e.name })
187
182
  ) && await v(
188
183
  async () => {
189
- await g.delete(e._id), await s.read("PROMOTION");
184
+ await g.delete(e._id), await i.read("PROMOTION");
190
185
  },
191
186
  {
192
187
  message: n("connect.promotion.removing", { name: e.name }),
@@ -196,13 +191,13 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
196
191
  }
197
192
  );
198
193
  }
199
- async function F(e) {
194
+ async function k(e) {
200
195
  e ? await o() : I.open(async (m) => {
201
196
  await o(m);
202
197
  });
203
198
  async function o(m) {
204
199
  var l;
205
- (l = x.value) == null || l.showSheet(
200
+ (l = S.value) == null || l.showSheet(
206
201
  !0,
207
202
  "PROMOTION",
208
203
  e ? await g.readById(e._id) : void 0,
@@ -210,28 +205,28 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
210
205
  );
211
206
  }
212
207
  }
213
- async function $(e) {
208
+ async function U(e) {
214
209
  await R.push({
215
- name: Se["$connect-CAMPAIGN_PROMOTION_ANALYTIC"],
210
+ name: Ce["$connect-CAMPAIGN_PROMOTION_ANALYTIC"],
216
211
  params: { id: e._id }
217
212
  });
218
213
  }
219
- async function U(e) {
214
+ async function j(e) {
220
215
  var l;
221
216
  if (!await he(e.name))
222
217
  return;
223
218
  const o = await g.readById(e._id), m = _e(o);
224
- (l = x.value) == null || l.showSheet(
219
+ (l = S.value) == null || l.showSheet(
225
220
  !0,
226
221
  "PROMOTION",
227
222
  m,
228
223
  o.template
229
224
  );
230
225
  }
231
- async function X(e) {
226
+ async function W(e) {
232
227
  await v(
233
228
  async () => {
234
- e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await s.read("PROMOTION");
229
+ e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await i.read("PROMOTION");
235
230
  },
236
231
  {
237
232
  message: n(
@@ -243,14 +238,14 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
243
238
  }
244
239
  );
245
240
  }
246
- async function Z(e) {
241
+ async function X(e) {
247
242
  var o;
248
243
  switch (e) {
249
244
  case "create":
250
- F();
245
+ k();
251
246
  break;
252
247
  case "sync":
253
- await j.confirm(
248
+ await D.confirm(
254
249
  "Are you sure you want to synchronize all promotions to POS?",
255
250
  "Force sync"
256
251
  ) && v(
@@ -268,41 +263,41 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
268
263
  break;
269
264
  }
270
265
  }
271
- const ee = ve();
272
- return re(async () => {
266
+ const Z = ve();
267
+ return se(async () => {
273
268
  var e;
274
269
  await u(async () => {
275
- await S.readLocations(), await s.read("PROMOTION");
276
- }), await ee.consume() === "PROMOTION_CUSTOM" && ((e = x.value) == null || e.showSheet(!0, "PROMOTION"));
270
+ await C.readLocations(), await i.read("PROMOTION");
271
+ }), await Z.consume() === "PROMOTION_CUSTOM" && ((e = S.value) == null || e.showSheet(!0, "PROMOTION"));
277
272
  }), (e, o) => {
278
- const m = p("FmPageHead"), l = p("FmSearch"), k = p("FmTable"), oe = p("FmChip"), O = p("FmButton"), te = p("FmListItem"), ne = p("FmList"), ae = p("FmCard");
279
- return y(), L(A, null, [
280
- r(m, {
273
+ const m = p("FmPageHead"), l = p("FmSearch"), x = p("FmTable"), ee = p("FmChip"), F = p("FmButton"), oe = p("FmListItem"), te = p("FmList"), ne = p("FmCard");
274
+ return y(), A(L, null, [
275
+ s(m, {
281
276
  title: a(n)("connect.promotion.title"),
282
- actions: a(h).length > 0 ? [B, d, b] : [],
283
- "onClick:action": Z
277
+ actions: a(h).length > 0 ? [B, d, w] : [],
278
+ "onClick:action": X
284
279
  }, null, 8, ["title", "actions"]),
285
- i("div", ke, [
286
- r(l, {
280
+ r("div", xe, [
281
+ s(l, {
287
282
  modelValue: c.value.searchKey,
288
283
  "onUpdate:modelValue": o[0] || (o[0] = (t) => c.value.searchKey = t),
289
284
  class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
290
285
  placeholder: a(n)("connect.promotion.search"),
291
286
  collapsible: ""
292
287
  }, null, 8, ["modelValue", "placeholder"]),
293
- a(h) && a(h).length > 0 ? (y(), L(A, { key: 0 }, [
294
- i("div", Oe, [
295
- i("div", Pe, [
296
- r(H, {
288
+ a(h) && a(h).length > 0 ? (y(), A(L, { key: 0 }, [
289
+ r("div", Fe, [
290
+ r("div", Oe, [
291
+ s(Q, {
297
292
  label: `${a(n)("connect.common.location")}: `,
298
293
  "right-icon": "keyboard_arrow_down",
299
294
  modelValue: c.value.location,
300
295
  "onUpdate:modelValue": o[1] || (o[1] = (t) => c.value.location = t),
301
296
  icon: "storefront",
302
297
  "show-item-label": !0,
303
- items: a(S).locationOptions
298
+ items: a(C).locationOptions
304
299
  }, null, 8, ["label", "modelValue", "items"]),
305
- r(H, {
300
+ s(Q, {
306
301
  label: "Type:",
307
302
  "right-icon": "keyboard_arrow_down",
308
303
  modelValue: c.value.effectType,
@@ -312,7 +307,7 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
312
307
  items: f
313
308
  }, null, 8, ["modelValue"])
314
309
  ]),
315
- r(l, {
310
+ s(l, {
316
311
  modelValue: c.value.searchKey,
317
312
  "onUpdate:modelValue": o[3] || (o[3] = (t) => c.value.searchKey = t),
318
313
  class: "xs:hidden sm:hidden",
@@ -320,62 +315,61 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
320
315
  collapsible: ""
321
316
  }, null, 8, ["modelValue"])
322
317
  ]),
323
- r(k, {
318
+ s(x, {
324
319
  class: "xs:hidden sm:hidden",
325
320
  "row-data": a(h),
326
- "column-defs": W,
321
+ "column-defs": J,
327
322
  "search-value": c.value.searchKey,
328
323
  "column-filter": [],
329
- onRowClick: o[4] || (o[4] = (t) => F(t.original)),
324
+ onRowClick: o[4] || (o[4] = (t) => k(t.original)),
330
325
  "hide-footer": a(h).length < 10
331
326
  }, null, 8, ["row-data", "search-value", "hide-footer"]),
332
- r(ne, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
327
+ s(te, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
333
328
  default: V(() => [
334
- (y(!0), L(A, null, le(a(h).filter(
329
+ (y(!0), A(L, null, re(a(h).filter(
335
330
  (t) => t.name.toLowerCase().includes(c.value.searchKey.toLowerCase())
336
- ), (t) => (y(), T(te, {
331
+ ), (t) => (y(), T(oe, {
337
332
  key: t._id.toString(),
338
- onClick: (_) => F(t),
333
+ onClick: (_) => k(t),
339
334
  class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
340
335
  }, {
341
336
  default: V(() => [
342
- i("div", Te, [
343
- i("div", Ve, [
344
- (y(), T(ce(a(K)(t)))),
345
- r(oe, {
337
+ r("div", Pe, [
338
+ r("div", Te, [
339
+ (y(), T(le(a(q)(t)))),
340
+ s(ee, {
346
341
  class: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
347
342
  compact: !0,
348
- label: `${a(Q).title(t.effect.options.target)} promotion`
343
+ label: `${a(E).title(t.effect.options.target)} promotion`
349
344
  }, null, 8, ["label"])
350
345
  ]),
351
- i("div", Ie, [
352
- i("div", Re, w(t.name), 1),
353
- i("div", Le, w(a(E)(t.effect)), 1),
354
- i("div", Ae, w(a(n)("connect.promotion.campaignDate")) + ": " + w(a(q)(t)), 1)
346
+ r("div", Ve, [
347
+ r("div", Ie, P(t.name), 1),
348
+ r("div", Re, P(a(K)(t.effect)), 1)
355
349
  ])
356
350
  ]),
357
- i("div", Me, [
358
- r(O, {
351
+ r("div", Ae, [
352
+ s(F, {
359
353
  icon: "insights",
360
354
  "icon-color": "neutral-gray-400",
361
355
  variant: "tertiary",
362
356
  onClick: async (_) => {
363
- _.stopPropagation(), await $(t);
357
+ _.stopPropagation(), await U(t);
364
358
  }
365
359
  }, null, 8, ["onClick"]),
366
- r(O, {
360
+ s(F, {
367
361
  icon: "content_copy",
368
362
  "icon-color": "neutral-gray-400",
369
363
  variant: "tertiary",
370
364
  onClick: async (_) => {
371
- _.stopPropagation(), await U(t);
365
+ _.stopPropagation(), await j(t);
372
366
  }
373
367
  }, null, 8, ["onClick"]),
374
- r(O, {
368
+ s(F, {
375
369
  icon: "delete",
376
370
  "icon-color": "neutral-gray-400",
377
371
  variant: "tertiary",
378
- onClick: (_) => (_.stopPropagation(), D(t))
372
+ onClick: (_) => (_.stopPropagation(), $(t))
379
373
  }, null, 8, ["onClick"])
380
374
  ])
381
375
  ]),
@@ -384,36 +378,36 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
384
378
  ]),
385
379
  _: 1
386
380
  })
387
- ], 64)) : (y(), T(ae, {
381
+ ], 64)) : (y(), T(ne, {
388
382
  key: 1,
389
383
  variant: "outlined",
390
384
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
391
385
  }, {
392
386
  default: V(() => [
393
- o[6] || (o[6] = i("img", {
394
- src: me,
387
+ o[6] || (o[6] = r("img", {
388
+ src: ce,
395
389
  class: "aspect-square w-[150px]"
396
390
  }, null, -1)),
397
- i("div", Be, [
398
- i("div", Ne, w(a(n)("connect.promotion.createPromotionCampaign")), 1),
399
- i("div", De, w(a(n)("connect.promotion.description")), 1)
391
+ r("div", Le, [
392
+ r("div", Me, P(a(n)("connect.promotion.createPromotionCampaign")), 1),
393
+ r("div", Be, P(a(n)("connect.promotion.description")), 1)
400
394
  ]),
401
- r(O, {
395
+ s(F, {
402
396
  variant: "primary",
403
397
  label: a(n)("connect.promotion.createPromotionCampaign"),
404
398
  icon: "add",
405
- onClick: o[5] || (o[5] = (t) => F())
399
+ onClick: o[5] || (o[5] = (t) => k())
406
400
  }, null, 8, ["label"])
407
401
  ]),
408
402
  _: 1
409
403
  }))
410
404
  ]),
411
- r(we, {
405
+ s(we, {
412
406
  ref_key: "sheetRef",
413
- ref: x,
414
- "onSubmit:modelValue": X
407
+ ref: S,
408
+ "onSubmit:modelValue": W
415
409
  }, null, 512),
416
- r(Fe, {
410
+ s(ke, {
417
411
  ref_key: "queueSheetRef",
418
412
  ref: N
419
413
  }, null, 512)
@@ -422,5 +416,5 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
422
416
  }
423
417
  });
424
418
  export {
425
- io as default
419
+ to as default
426
420
  };