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

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 (167) hide show
  1. package/dist/{App-DsB2o1oB.js → App-DievprEi.js} +853 -683
  2. package/dist/{AuditLogs-BcfgiYnJ.js → AuditLogs-DrdqOhZL.js} +16 -13
  3. package/dist/{Bin-DMr7K8Kj.js → Bin-Ci2k3z77.js} +8 -8
  4. package/dist/Broadcast-CpDMAG1o.js +306 -0
  5. package/dist/CampaignAnalytic-uRyGaLaN.js +1830 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CwGoEBsW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DtGe2Og1.js} +8 -5
  7. package/dist/Card-tb98Kyr-.js +1086 -0
  8. package/dist/{Collections-B0uGC2FE.js → Collections-P1S5WjnJ.js} +14 -13
  9. package/dist/Credit-DwK7JYf-.js +286 -0
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-Cyk0iIsd.js +53 -0
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-8r29jKh9.js +4432 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DJLxGk7W.js → EffectSheet.vue_vue_type_style_index_0_lang-BML_-v8I.js} +36 -36
  13. package/dist/Experience-BejtRlOj.js +288 -0
  14. package/dist/{FileSaver.min-BlA0oZEC.js → FileSaver.min-C-hmBaHm.js} +1 -1
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
  16. package/dist/Game-n8qL896g.js +356 -0
  17. package/dist/GiftCardSetup-Bgsfcu7N.js +736 -0
  18. package/dist/GoalPickerPanel.vue_vue_type_script_setup_true_lang-CzL68PPP.js +424 -0
  19. package/dist/Goals-BB8LJlq3.js +247 -0
  20. package/dist/{Grab-DmmwrGzk.js → Grab-COq3Ujst.js} +33 -32
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DNtLW0yQ.js → ImageInput.vue_vue_type_script_setup_true_lang-BmLclEyi.js} +1 -1
  22. package/dist/{Index-m7l4insz.js → Index-BdkIinaE.js} +10 -10
  23. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-B9sJ-M20.js → LocationPicker.vue_vue_type_script_setup_true_lang-DsWv3DVb.js} +1 -1
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Dsg2sWjF.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DvOzGF8c.js} +1 -1
  25. package/dist/LoyaltyDashboard-D4Jtpw0n.js +2911 -0
  26. package/dist/MainLayout-Ca-Xm3eZ.js +143 -0
  27. package/dist/{Marketing-C9pSIdBU.js → Marketing-Cpe4s7NZ.js} +7 -6
  28. package/dist/{MarketingMaterialEdit-BEF2T9LR.js → MarketingMaterialEdit-nTeS9VVx.js} +15 -14
  29. package/dist/Member-DgGZ4Cdg.js +654 -0
  30. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-_O3B-FIA.js +1281 -0
  31. package/dist/MemberImportHistory-rdlbDVWU.js +187 -0
  32. package/dist/MemberList-BC4aRJTt.js +334 -0
  33. package/dist/{MemberTransactions-CAut1TQb.js → MemberTransactions-BFfdTttp.js} +1 -1
  34. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-1AuHixPC.js → MessageInput.vue_vue_type_script_setup_true_lang-DXajAQy9.js} +5928 -5644
  35. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-8xVDzdO3.js +40 -0
  36. package/dist/Mission-BWCNKTjU.js +363 -0
  37. package/dist/Overview--Q7vzhNK.js +1316 -0
  38. package/dist/{Overview-DOJj4XvO.js → Overview-i02Wnyjn.js} +23 -20
  39. package/dist/Point-CiWxqny5.js +297 -0
  40. package/dist/Promotion-B0G9qfBm.js +426 -0
  41. package/dist/{Queue-55G2gtP5.js → Queue-YfwgYmzH.js} +16 -13
  42. package/dist/{Record-DNPI02c6.js → Record-CCuwrPKW.js} +9 -9
  43. package/dist/Review-ymsfdh7Q.js +45 -0
  44. package/dist/ReviewFacebookCallback-DyDExWvP.js +238 -0
  45. package/dist/ReviewGoogleCallback-DNyg3n2S.js +213 -0
  46. package/dist/{Reward-CnP8R2pS.js → Reward-BKIb0ezH.js} +28 -28
  47. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BN71h9IK.js → RewardGroup.vue_vue_type_script_setup_true_lang-DPaaNgpr.js} +26 -23
  48. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CtB9Ls5-.js → RuleGroup.vue_vue_type_script_setup_true_lang-BLFLybFn.js} +198 -186
  49. package/dist/{Segment-CxiQnnyj.js → Segment-D5_pp7fh.js} +278 -276
  50. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B1vj5f7T.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BLLjIA-D.js} +45 -42
  51. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-cWx0G3nM.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRIcZwnU.js} +4 -4
  52. package/dist/Setting-CD78gIMU.js +574 -0
  53. package/dist/{SettingAdvertisements-Vt7w1WN3.js → SettingAdvertisements-C2AIT4s4.js} +12 -12
  54. package/dist/Settings-DI_tryQV.js +230 -0
  55. package/dist/Store-BV2JTRNZ.js +2615 -0
  56. package/dist/{StoreRewards-DILeipMG.js → StoreRewards-Bk55YXyO.js} +15 -15
  57. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BZZ1fqwg.js +1331 -0
  58. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C7lVeybl.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BrEzWVrH.js} +2 -2
  59. package/dist/{Tier-BAZ1xuKL.js → Tier-CO2K30Ew.js} +2576 -757
  60. package/dist/{Title-CcNAt47f.js → Title-qProQh3T.js} +41 -37
  61. package/dist/Transaction-qL5L-fE_.js +45 -0
  62. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-hUjQVZ_U.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Co1BPScS.js} +26 -26
  63. package/dist/Voucher-VFD1LY9Y.js +837 -0
  64. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CTQDxc5l.js → VoucherEditor.vue_vue_type_script_setup_true_lang-9QyTl7iq.js} +118 -124
  65. package/dist/WhatsappAccount-CxSGqm7H.js +325 -0
  66. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-D8L6izf0.js +96 -0
  67. package/dist/WhatsappBot-C4Oz7Xwv.js +441 -0
  68. package/dist/WhatsappBotSettings-CKqaWzwE.js +136 -0
  69. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DuRKA4cj.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bcsi94dw.js} +2 -2
  70. package/dist/{app-Z-UKRG5V.js → app-BEYzXWZO.js} +50954 -42517
  71. package/dist/app.js +1 -1
  72. package/dist/base.export-S_82Elmg.js +75 -0
  73. package/dist/browser-BSAOEeIM.js +1478 -0
  74. package/dist/{business-C7EF6cKC.js → business-DH7djUl8.js} +5 -5
  75. package/dist/campaign-DlHDgoFX.js +100 -0
  76. package/dist/campaign-k_WHxsOR.js +400 -0
  77. package/dist/{campaign.enum-BNN2gLFY.js → campaign.enum-Dx-Zo68Q.js} +1 -1
  78. package/dist/{campaign.fn-Bd34dVnx.js → campaign.fn-B-4JRzft.js} +67 -67
  79. package/dist/{collectible.enum-DO9HdJGH.js → collectible.enum-Liy2wH3s.js} +1 -1
  80. package/dist/collection.fn-zQwWDzZT.js +26 -0
  81. package/dist/currency-CQVHXBFe.js +7 -0
  82. package/dist/{duplicateCampaign-2ODeDw3a.js → duplicateCampaign-YTXMbJTj.js} +11 -11
  83. package/dist/{effect-BcB8IlTI.js → effect-CQkVLHWi.js} +1 -1
  84. package/dist/{email-addresses-BcTeU4Sh.js → email-addresses-BIoVbPGC.js} +209 -201
  85. package/dist/google-C3S8u0mT.js +4 -0
  86. package/dist/{helper-BSgrCJRv.js → helper-BCkTvF4m.js} +1 -1
  87. package/dist/{index-CoHWpylO.js → index-B-bQnb0_.js} +2115 -2557
  88. package/dist/index-BAJOC43K.js +14550 -0
  89. package/dist/{index-HXiYGO4_.js → index-BFIHEBnX.js} +6343 -7693
  90. package/dist/{index-VlFWaBrg.js → index-BJIQe3QJ.js} +1 -1
  91. package/dist/{index-BpI-BI4H.js → index-BJkRTH5T.js} +4 -4
  92. package/dist/index-BOJogkKQ.js +172 -0
  93. package/dist/{index-BoYEqLif.js → index-BRPajAkE.js} +1517 -263
  94. package/dist/{index-CsoBDon4.js → index-BTkxgos0.js} +1590 -1523
  95. package/dist/index-BUP4aHq8.js +32438 -0
  96. package/dist/index-BYvnqARr.js +902 -0
  97. package/dist/{index-hlyg-wxV.js → index-Bonq819P.js} +1 -1
  98. package/dist/{index-CIBPhxlC.js → index-C6mOI2Pp.js} +105 -123
  99. package/dist/{index-Bf6jNZit.js → index-CDIe15AY.js} +24 -9
  100. package/dist/index-CTrcdIkt.js +137 -0
  101. package/dist/index-C_H8jFYf.js +2743 -0
  102. package/dist/index-CpnchVe1.js +74 -0
  103. package/dist/index-D5AR7A5e.js +151 -0
  104. package/dist/index-D7-Q86HI.js +54 -0
  105. package/dist/index-DdOj8Hew.js +53 -0
  106. package/dist/{index-iMPtFp54.js → index-Dvqguh2B.js} +10 -9
  107. package/dist/{index-Bm0QPucw.js → index-hAKRfE-4.js} +14 -14
  108. package/dist/index-o2Ga_qaX.js +39 -0
  109. package/dist/{index.esm2017-CM7OnEyP.js → index.esm2017-D0fhMMPG.js} +128 -128
  110. package/dist/{loading-CSXr0Yqz.js → loading-C686AMVG.js} +1 -1
  111. package/dist/{lodash-Bh7XKI-R.js → lodash-CANlWUWW.js} +1 -1
  112. package/dist/member-import-UzJ6ByIS.js +188 -0
  113. package/dist/membership-DCVzFaFy.js +274 -0
  114. package/dist/{money-BZIST_m9.js → money-DuazwoX7.js} +1 -1
  115. package/dist/{number-DXLR2w95.js → number-B2HFiV0g.js} +1 -1
  116. package/dist/objectid-Bq-oVMdP.js +145 -0
  117. package/dist/onboarding-BxvNxz-9.js +131 -0
  118. package/dist/onboardingSetup-CcvKmyx8.js +17 -0
  119. package/dist/{plugins-4FlbwoES.js → plugins-C39O5j42.js} +13 -12
  120. package/dist/remy-Qz_pNsUS.js +13 -0
  121. package/dist/{reward-DUbl79bZ.js → reward-HYt-2nxt.js} +1 -1
  122. package/dist/{rule-BQUoZ4l_.js → rule-3xNIYM7z.js} +337 -275
  123. package/dist/style.css +1 -1
  124. package/dist/{template-BoiSG7G7.js → template-D37Z_b0m.js} +6 -6
  125. package/dist/timezone-JwnQgpaU.js +20 -0
  126. package/dist/transaction.fn-C5vswLI_.js +71 -0
  127. package/dist/{trigger-D5g5m6tT.js → trigger-Bc6s2cvq.js} +17 -17
  128. package/dist/useMarketingMaterialActions-DMGyAXcy.js +96 -0
  129. package/dist/{usePagination-DHePBBoR.js → usePagination-DLOOwiiY.js} +1 -1
  130. package/dist/{user-C_ToSo-g.js → user-CTIGugVF.js} +1 -1
  131. package/dist/{vue-i18n-BcYh6_51.js → vue-i18n-Dpic36zz.js} +287 -287
  132. package/dist/{xlsx-h4G1C-xj.js → xlsx-CT9_1SFr.js} +786 -786
  133. package/dist/{zod-CgigfJar.js → zod-CGVrMcDl.js} +1 -1
  134. package/package.json +10 -6
  135. package/dist/Broadcast-C9akM-TB.js +0 -266
  136. package/dist/Card-DRkIYs0M.js +0 -910
  137. package/dist/Credit-V5YA_hGx.js +0 -260
  138. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  139. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CYQMXARx.js +0 -3377
  140. package/dist/Experience-WTWy5yY6.js +0 -259
  141. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  142. package/dist/Game-BwOfTCW5.js +0 -330
  143. package/dist/LoyaltyDashboard-CJdhYiea.js +0 -1082
  144. package/dist/MainLayout-Du5kZOtA.js +0 -41
  145. package/dist/Member-DUV_vbPI.js +0 -280
  146. package/dist/MemberList-Ye4nOk-i.js +0 -1601
  147. package/dist/Mission-BBmCGpt8.js +0 -334
  148. package/dist/Point-Bzg6hi6o.js +0 -262
  149. package/dist/Promotion-BMXIp_ef.js +0 -397
  150. package/dist/Review-CYNPPxYU.js +0 -1141
  151. package/dist/ReviewFacebookCallback-0SUkKAaC.js +0 -243
  152. package/dist/ReviewGoogleCallback-BZEzx68n.js +0 -208
  153. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-C4vohf6c.js +0 -181
  154. package/dist/Setting-jHAjccod.js +0 -2047
  155. package/dist/Store-Cu-hKmVa.js +0 -1996
  156. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CGz6CTWA.js +0 -1130
  157. package/dist/Transaction-D7DO3dKQ.js +0 -39
  158. package/dist/Voucher-Cq-n1CaC.js +0 -421
  159. package/dist/campaign--MjoY1Mn.js +0 -219
  160. package/dist/campaign-DHBuP4UA.js +0 -277
  161. package/dist/export-CjB7qxZ9.js +0 -97
  162. package/dist/index-BIAjmMga.js +0 -85
  163. package/dist/index-Bv4MBLQ5.js +0 -52
  164. package/dist/index-hbyCVNa7.js +0 -30289
  165. package/dist/membership-CfredTm3.js +0 -255
  166. package/dist/objectid-Dg4ZodlT.js +0 -145
  167. package/dist/useMarketingMaterialActions-B-Jlw2Z9.js +0 -107
@@ -0,0 +1,426 @@
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-C39O5j42.js";
5
+ import { u as pe } from "./loading-C686AMVG.js";
6
+ import { u as de } from "./business-DH7djUl8.js";
7
+ import { u as fe } from "./campaign-DlHDgoFX.js";
8
+ import { u as ye } from "./vue-i18n-Dpic36zz.js";
9
+ import { g as q, a as ge, b as K } from "./campaign-k_WHxsOR.js";
10
+ import { c as he, p as _e } from "./duplicateCampaign-YTXMbJTj.js";
11
+ import { e as E } from "./effect-CQkVLHWi.js";
12
+ import { c as Q } from "./string-Gcy5IM_H.js";
13
+ import "./index-Bonq819P.js";
14
+ import { _ as we } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-8r29jKh9.js";
15
+ import { c as g } from "./index-D5AR7A5e.js";
16
+ import { u as be } from "./template-D37Z_b0m.js";
17
+ import { _ as H } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
18
+ import { u as ve } from "./onboardingSetup-CcvKmyx8.js";
19
+ import { useRouter as Ce } from "vue-router";
20
+ import { R as Se } from "./app-BEYzXWZO.js";
21
+ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
22
+ __name: "QueueSheet",
23
+ emits: ["update:model-value"],
24
+ setup(G, { expose: n, emit: B }) {
25
+ const d = C(!1), b = C([]);
26
+ async function I() {
27
+ d.value = !0;
28
+ const s = await g.getPromotionQueue();
29
+ console.log(s, "jobs"), b.value = s;
30
+ }
31
+ const S = [
32
+ {
33
+ header: "Started At",
34
+ accessorFn: (s) => s.createdAt,
35
+ enableSorting: !0
36
+ },
37
+ {
38
+ header: "Campaigns",
39
+ accessorFn: (s) => s.campaigns
40
+ // cell(props) {
41
+ // const r = props.row.original;
42
+ // return h('div', {
43
+ // innerHTML: r.campaigns.map((c: any) => c.name).join(', '),
44
+ // });
45
+ // },
46
+ }
47
+ ];
48
+ return n({
49
+ showSheet: I
50
+ }), (s, u) => {
51
+ const v = p("FmTable"), R = p("FmSideSheet");
52
+ return y(), T(R, {
53
+ "max-width": 550,
54
+ header: "Promotion Sync Queue",
55
+ modelValue: a(d),
56
+ "onUpdate:modelValue": [
57
+ u[1] || (u[1] = (f) => ie(d) ? d.value = f : null),
58
+ u[2] || (u[2] = (f) => d.value = f)
59
+ ]
60
+ }, {
61
+ 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
71
+ }, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"])
72
+ ])
73
+ ]),
74
+ _: 1
75
+ }, 8, ["modelValue"]);
76
+ };
77
+ }
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({
79
+ __name: "Promotion",
80
+ setup(G) {
81
+ const { t: n } = ye(), B = {
82
+ label: n("connect.promotion.createCampaign"),
83
+ value: "create",
84
+ isPrimary: !0,
85
+ prependIcon: "add"
86
+ }, d = {
87
+ label: "Force sync",
88
+ value: "sync",
89
+ isPrimary: !1,
90
+ prependIcon: "refresh"
91
+ }, b = {
92
+ label: "Queue",
93
+ value: "queue",
94
+ isPrimary: !1,
95
+ prependIcon: "work_history"
96
+ }, I = be("PROMOTION", ue()), S = de(), s = fe(), { global: u, minor: v } = pe, R = Ce(), f = [
97
+ {
98
+ label: "Bill promotion",
99
+ value: "BILL"
100
+ },
101
+ {
102
+ label: "Item promotion",
103
+ value: "ITEM"
104
+ }
105
+ ], c = C({
106
+ searchKey: "",
107
+ location: [],
108
+ effectType: []
109
+ });
110
+ function Y(e) {
111
+ const o = c.value.location;
112
+ return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((m) => {
113
+ var l;
114
+ return (l = e == null ? void 0 : e.targetLocation) == null ? void 0 : l.includes(m);
115
+ }) : e.targetLocation.includes(o);
116
+ }
117
+ function J(e) {
118
+ var l, k;
119
+ const o = c.value.effectType;
120
+ if (!o || o.length === 0) return !0;
121
+ const m = (k = (l = e.effect) == null ? void 0 : l.options) == null ? void 0 : k.target;
122
+ return o.includes(m);
123
+ }
124
+ const h = se(
125
+ () => s.campaigns.promotion.filter(
126
+ (e) => Y(e) && J(e)
127
+ )
128
+ ), W = [
129
+ {
130
+ header: n("connect.promotion.promotionTitle"),
131
+ accessorFn: (e) => e.name
132
+ },
133
+ {
134
+ header: n("connect.promotion.campaignDate"),
135
+ accessorFn: (e) => q(e)
136
+ },
137
+ {
138
+ header: n("connect.promotion.status"),
139
+ accessorFn: (e) => ge(e),
140
+ cell(e) {
141
+ return K(e.row.original);
142
+ }
143
+ },
144
+ {
145
+ header: n("connect.promotion.type"),
146
+ accessorFn: (e) => `${Q.title(e.effect.options.target)} promotion`
147
+ },
148
+ {
149
+ header: n("connect.promotion.summary"),
150
+ accessorFn: (e) => E(e.effect)
151
+ },
152
+ {
153
+ header: n("connect.promotion.actions"),
154
+ cell(e) {
155
+ return P("div", { class: "flex items-center gap-8 justify-end" }, [
156
+ P(M.FmButton, {
157
+ variant: "tertiary",
158
+ icon: "insights",
159
+ iconColor: "neutral-gray-400",
160
+ onClick: async (o) => {
161
+ o.stopPropagation(), await $(e.row.original);
162
+ }
163
+ }),
164
+ P(M.FmButton, {
165
+ variant: "tertiary",
166
+ icon: "content_copy",
167
+ iconColor: "neutral-gray-400",
168
+ onClick: async (o) => {
169
+ o.stopPropagation(), await U(e.row.original);
170
+ }
171
+ }),
172
+ P(M.FmButton, {
173
+ variant: "tertiary",
174
+ icon: "delete",
175
+ iconColor: "neutral-gray-400",
176
+ onClick: (o) => {
177
+ o.stopPropagation(), D(e.row.original);
178
+ }
179
+ })
180
+ ]);
181
+ }
182
+ }
183
+ ], x = C(), N = C();
184
+ async function D(e) {
185
+ await j.remove(
186
+ n("connect.promotion.confirmRemove", { name: e.name })
187
+ ) && await v(
188
+ async () => {
189
+ await g.delete(e._id), await s.read("PROMOTION");
190
+ },
191
+ {
192
+ message: n("connect.promotion.removing", { name: e.name }),
193
+ successMessage: n("connect.promotion.removedSuccessfully", {
194
+ name: e.name
195
+ })
196
+ }
197
+ );
198
+ }
199
+ async function F(e) {
200
+ e ? await o() : I.open(async (m) => {
201
+ await o(m);
202
+ });
203
+ async function o(m) {
204
+ var l;
205
+ (l = x.value) == null || l.showSheet(
206
+ !0,
207
+ "PROMOTION",
208
+ e ? await g.readById(e._id) : void 0,
209
+ m
210
+ );
211
+ }
212
+ }
213
+ async function $(e) {
214
+ await R.push({
215
+ name: Se["$connect-CAMPAIGN_PROMOTION_ANALYTIC"],
216
+ params: { id: e._id }
217
+ });
218
+ }
219
+ async function U(e) {
220
+ var l;
221
+ if (!await he(e.name))
222
+ return;
223
+ const o = await g.readById(e._id), m = _e(o);
224
+ (l = x.value) == null || l.showSheet(
225
+ !0,
226
+ "PROMOTION",
227
+ m,
228
+ o.template
229
+ );
230
+ }
231
+ async function X(e) {
232
+ await v(
233
+ async () => {
234
+ e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await s.read("PROMOTION");
235
+ },
236
+ {
237
+ message: n(
238
+ e.campaign._id ? "connect.promotion.updating" : "connect.promotion.creating"
239
+ ),
240
+ successMessage: n(
241
+ e.campaign._id ? "connect.promotion.updatedSuccessfully" : "connect.promotion.createdSuccessfully"
242
+ )
243
+ }
244
+ );
245
+ }
246
+ async function Z(e) {
247
+ var o;
248
+ switch (e) {
249
+ case "create":
250
+ F();
251
+ break;
252
+ case "sync":
253
+ await j.confirm(
254
+ "Are you sure you want to synchronize all promotions to POS?",
255
+ "Force sync"
256
+ ) && v(
257
+ async () => {
258
+ await g.syncAllPromotion();
259
+ },
260
+ {
261
+ message: "Syncing promotions...",
262
+ successMessage: "All promotions synced"
263
+ }
264
+ );
265
+ break;
266
+ case "queue":
267
+ (o = N.value) == null || o.showSheet();
268
+ break;
269
+ }
270
+ }
271
+ const ee = ve();
272
+ return re(async () => {
273
+ var e;
274
+ 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"));
277
+ }), (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, {
281
+ title: a(n)("connect.promotion.title"),
282
+ actions: a(h).length > 0 ? [B, d, b] : [],
283
+ "onClick:action": Z
284
+ }, null, 8, ["title", "actions"]),
285
+ i("div", ke, [
286
+ r(l, {
287
+ modelValue: c.value.searchKey,
288
+ "onUpdate:modelValue": o[0] || (o[0] = (t) => c.value.searchKey = t),
289
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
290
+ placeholder: a(n)("connect.promotion.search"),
291
+ collapsible: ""
292
+ }, 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, {
297
+ label: `${a(n)("connect.common.location")}: `,
298
+ "right-icon": "keyboard_arrow_down",
299
+ modelValue: c.value.location,
300
+ "onUpdate:modelValue": o[1] || (o[1] = (t) => c.value.location = t),
301
+ icon: "storefront",
302
+ "show-item-label": !0,
303
+ items: a(S).locationOptions
304
+ }, null, 8, ["label", "modelValue", "items"]),
305
+ r(H, {
306
+ label: "Type:",
307
+ "right-icon": "keyboard_arrow_down",
308
+ modelValue: c.value.effectType,
309
+ "onUpdate:modelValue": o[2] || (o[2] = (t) => c.value.effectType = t),
310
+ icon: "filter_list",
311
+ "show-item-label": !0,
312
+ items: f
313
+ }, null, 8, ["modelValue"])
314
+ ]),
315
+ r(l, {
316
+ modelValue: c.value.searchKey,
317
+ "onUpdate:modelValue": o[3] || (o[3] = (t) => c.value.searchKey = t),
318
+ class: "xs:hidden sm:hidden",
319
+ placeholder: "search",
320
+ collapsible: ""
321
+ }, null, 8, ["modelValue"])
322
+ ]),
323
+ r(k, {
324
+ class: "xs:hidden sm:hidden",
325
+ "row-data": a(h),
326
+ "column-defs": W,
327
+ "search-value": c.value.searchKey,
328
+ "column-filter": [],
329
+ onRowClick: o[4] || (o[4] = (t) => F(t.original)),
330
+ "hide-footer": a(h).length < 10
331
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
332
+ r(ne, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
333
+ default: V(() => [
334
+ (y(!0), L(A, null, le(a(h).filter(
335
+ (t) => t.name.toLowerCase().includes(c.value.searchKey.toLowerCase())
336
+ ), (t) => (y(), T(te, {
337
+ key: t._id.toString(),
338
+ onClick: (_) => F(t),
339
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
340
+ }, {
341
+ default: V(() => [
342
+ i("div", Te, [
343
+ i("div", Ve, [
344
+ (y(), T(ce(a(K)(t)))),
345
+ r(oe, {
346
+ class: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
347
+ compact: !0,
348
+ label: `${a(Q).title(t.effect.options.target)} promotion`
349
+ }, null, 8, ["label"])
350
+ ]),
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)
355
+ ])
356
+ ]),
357
+ i("div", Me, [
358
+ r(O, {
359
+ icon: "insights",
360
+ "icon-color": "neutral-gray-400",
361
+ variant: "tertiary",
362
+ onClick: async (_) => {
363
+ _.stopPropagation(), await $(t);
364
+ }
365
+ }, null, 8, ["onClick"]),
366
+ r(O, {
367
+ icon: "content_copy",
368
+ "icon-color": "neutral-gray-400",
369
+ variant: "tertiary",
370
+ onClick: async (_) => {
371
+ _.stopPropagation(), await U(t);
372
+ }
373
+ }, null, 8, ["onClick"]),
374
+ r(O, {
375
+ icon: "delete",
376
+ "icon-color": "neutral-gray-400",
377
+ variant: "tertiary",
378
+ onClick: (_) => (_.stopPropagation(), D(t))
379
+ }, null, 8, ["onClick"])
380
+ ])
381
+ ]),
382
+ _: 2
383
+ }, 1032, ["onClick"]))), 128))
384
+ ]),
385
+ _: 1
386
+ })
387
+ ], 64)) : (y(), T(ae, {
388
+ key: 1,
389
+ variant: "outlined",
390
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
391
+ }, {
392
+ default: V(() => [
393
+ o[6] || (o[6] = i("img", {
394
+ src: me,
395
+ class: "aspect-square w-[150px]"
396
+ }, 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)
400
+ ]),
401
+ r(O, {
402
+ variant: "primary",
403
+ label: a(n)("connect.promotion.createPromotionCampaign"),
404
+ icon: "add",
405
+ onClick: o[5] || (o[5] = (t) => F())
406
+ }, null, 8, ["label"])
407
+ ]),
408
+ _: 1
409
+ }))
410
+ ]),
411
+ r(we, {
412
+ ref_key: "sheetRef",
413
+ ref: x,
414
+ "onSubmit:modelValue": X
415
+ }, null, 512),
416
+ r(Fe, {
417
+ ref_key: "queueSheetRef",
418
+ ref: N
419
+ }, null, 512)
420
+ ], 64);
421
+ };
422
+ }
423
+ });
424
+ export {
425
+ io as default
426
+ };
@@ -1,19 +1,22 @@
1
1
  import { defineComponent as h, h as n, ref as A, watch as B, onBeforeMount as U, resolveComponent as V, openBlock as z, createElementBlock as O, Fragment as q, createVNode as m, unref as o, createElementVNode as g } from "vue";
2
- import { u as G, _ as L } from "./usePagination-DHePBBoR.js";
3
- import { _ as S } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
2
+ import { u as G, _ as L } from "./usePagination-DLOOwiiY.js";
3
+ import { _ as S } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
4
4
  import { c as u } from "./string-Gcy5IM_H.js";
5
- import { c as Y } from "./plugins-4FlbwoES.js";
5
+ import { c as Y } from "./plugins-C39O5j42.js";
6
6
  import { useDialog as j, components as y } from "@feedmepos/ui-library";
7
- import "./index-BoYEqLif.js";
8
- import { N as c, c as d } from "./index-CoHWpylO.js";
9
- import "./index-CsoBDon4.js";
10
- import "./index-hbyCVNa7.js";
11
- import "./index-iMPtFp54.js";
7
+ import "./index-BRPajAkE.js";
8
+ import "./index-B-bQnb0_.js";
9
+ import "./index-BTkxgos0.js";
10
+ import "./index-BFIHEBnX.js";
11
+ import { n as c, a as d } from "./index-BYvnqARr.js";
12
+ import "./index-Dvqguh2B.js";
13
+ import "./index-o2Ga_qaX.js";
14
+ import "./index-BOJogkKQ.js";
12
15
  import { h as b } from "./moment-D7p2TMB-.js";
13
- import { u as W } from "./vue-i18n-BcYh6_51.js";
14
- import { u as H, v as K, w as Q } from "./index.esm2017-CM7OnEyP.js";
16
+ import { u as W } from "./vue-i18n-Dpic36zz.js";
17
+ import { u as H, v as K, w as Q } from "./index.esm2017-D0fhMMPG.js";
15
18
  import { useRoute as $ } from "vue-router";
16
- import { g as J, S as Z, u as X } from "./index-HXiYGO4_.js";
19
+ import { g as J, S as Z, u as X } from "./index-BUP4aHq8.js";
17
20
  import { o as ee } from "./objectId-dwaoBfJX.js";
18
21
  const te = () => {
19
22
  if (!Z.getBusinessId()) throw new Error("Invalid business ID");
@@ -28,7 +31,7 @@ const te = () => {
28
31
  }
29
32
  };
30
33
  var ae = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com", importFilesBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" };
31
- const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-center justify-between" }, se = { class: "flex gap-8 items-center w-full overflow-x-scroll" }, xe = /* @__PURE__ */ h({
34
+ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-center justify-between" }, se = { class: "flex gap-8 items-center w-full overflow-x-scroll" }, De = /* @__PURE__ */ h({
32
35
  __name: "Queue",
33
36
  setup(p) {
34
37
  const v = $().query.type, { t: x } = W(), E = j(), C = [
@@ -256,5 +259,5 @@ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-ce
256
259
  }
257
260
  });
258
261
  export {
259
- xe as default
262
+ De as default
260
263
  };
@@ -2,19 +2,19 @@ var q = Object.defineProperty;
2
2
  var G = (g, o, m) => o in g ? q(g, o, { enumerable: !0, configurable: !0, writable: !0, value: m }) : g[o] = m;
3
3
  var z = (g, o, m) => G(g, typeof o != "symbol" ? o + "" : o, m);
4
4
  import { defineComponent as T, ref as B, computed as H, resolveComponent as C, openBlock as I, createBlock as J, unref as n, isRef as Q, withCtx as X, createElementBlock as U, createVNode as w, withModifiers as Z, createCommentVNode as ee, createElementVNode as N, h, onMounted as re, Fragment as te } from "vue";
5
- import { u as oe, _ as ae } from "./usePagination-DHePBBoR.js";
6
- import { g as A } from "./user-C_ToSo-g.js";
5
+ import { u as oe, _ as ae } from "./usePagination-DLOOwiiY.js";
6
+ import { g as A } from "./user-CTIGugVF.js";
7
7
  import { components as R } from "@feedmepos/ui-library";
8
- import "./index-hbyCVNa7.js";
9
- import { u as j } from "./vue-i18n-BcYh6_51.js";
10
- import { u as L } from "./loading-CSXr0Yqz.js";
8
+ import "./index-BFIHEBnX.js";
9
+ import { u as j } from "./vue-i18n-Dpic36zz.js";
10
+ import { u as L } from "./loading-C686AMVG.js";
11
11
  import { useCoreStore as se } from "@feedmepos/mf-common";
12
- import { r as v } from "./index-VlFWaBrg.js";
12
+ import { r as v } from "./index-BJIQe3QJ.js";
13
13
  import { c as ie, a as ne } from "./object-BYyQ0PZp.js";
14
- import { u as ce } from "./membership-CfredTm3.js";
14
+ import { u as ce } from "./membership-DCVzFaFy.js";
15
15
  import { c as le } from "./string-Gcy5IM_H.js";
16
- import { c as de } from "./plugins-4FlbwoES.js";
17
- import { u as V, w as me } from "./xlsx-h4G1C-xj.js";
16
+ import { c as de } from "./plugins-C39O5j42.js";
17
+ import { u as V, w as me } from "./xlsx-CT9_1SFr.js";
18
18
  import { e as f } from "./index-vh86FiIQ.js";
19
19
  import { h as ue } from "./moment-D7p2TMB-.js";
20
20
  import { o as pe } from "./objectId-dwaoBfJX.js";
@@ -0,0 +1,45 @@
1
+ import { defineComponent as d, computed as v, resolveComponent as n, openBlock as f, createElementBlock as E, Fragment as R, createVNode as a, unref as l, createElementVNode as s } from "vue";
2
+ import { u as b } from "./vue-i18n-Dpic36zz.js";
3
+ import { R as r } from "./app-BEYzXWZO.js";
4
+ import { useRouter as V } from "vue-router";
5
+ const w = { class: "flex flex-col" }, T = { class: "px-24" }, S = /* @__PURE__ */ d({
6
+ __name: "Review",
7
+ setup(g) {
8
+ const { t } = b(), c = V(), o = [
9
+ {
10
+ label: t("connect.review.tabs.overview"),
11
+ value: r["$connect-REVIEW_OVERVIEW"]
12
+ },
13
+ {
14
+ label: t("connect.review.tabs.settings"),
15
+ value: r["$connect-REVIEW_SETTINGS"]
16
+ }
17
+ ], m = v(
18
+ () => o.find((e) => e.value === c.currentRoute.value.name) ?? o[0]
19
+ );
20
+ async function u(e) {
21
+ await c.push({ name: e });
22
+ }
23
+ return (e, x) => {
24
+ const i = n("FmPageHead"), _ = n("FmTabs"), p = n("RouterView");
25
+ return f(), E(R, null, [
26
+ a(i, {
27
+ title: l(t)("connect.navigation.review")
28
+ }, null, 8, ["title"]),
29
+ s("div", w, [
30
+ s("div", T, [
31
+ a(_, {
32
+ "model-value": l(m).value,
33
+ items: o,
34
+ "onUpdate:modelValue": u
35
+ }, null, 8, ["model-value"])
36
+ ]),
37
+ a(p)
38
+ ])
39
+ ], 64);
40
+ };
41
+ }
42
+ });
43
+ export {
44
+ S as default
45
+ };