@feedmepos/mf-connect 0.1.98-beta.5 → 0.1.98-beta.50

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 (139) hide show
  1. package/dist/{App-D_4snNiy.js → App-XRTSw_F1.js} +812 -666
  2. package/dist/{AuditLogs-KQU1O9_9.js → AuditLogs-CgsvZ-7X.js} +12 -11
  3. package/dist/{Bin-gp_uuNrE.js → Bin-CDwE00an.js} +8 -8
  4. package/dist/{Broadcast-CbBaOlnn.js → Broadcast-BOh56jYG.js} +39 -36
  5. package/dist/CampaignAnalytic-DZkCSGRF.js +1826 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-2bro245w.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DqYRlwCj.js} +7 -5
  7. package/dist/Card-DZ01wmGw.js +1060 -0
  8. package/dist/{Collections-CKeOHYZ4.js → Collections-CaIWOlsO.js} +14 -13
  9. package/dist/Credit-C8TM9q2f.js +286 -0
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bh2O4xdy.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-1UH_Ie4E.js} +34 -30
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BIdb46VQ.js → EffectSheet.vue_vue_type_style_index_0_lang-CVqMqYhi.js} +6 -6
  12. package/dist/{Experience-B-c5SMns.js → Experience-Cy0K8E9P.js} +112 -86
  13. package/dist/{FileSaver.min-DWnvGKCg.js → FileSaver.min-ClaVGDxU.js} +1 -1
  14. package/dist/Game-DxUNIK1H.js +356 -0
  15. package/dist/GiftCardSetup-DPuRb-29.js +662 -0
  16. package/dist/{Grab-BLC4GcgE.js → Grab-VSlV6K7E.js} +32 -31
  17. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-l2CmQ0nR.js → ImageInput.vue_vue_type_script_setup_true_lang-BJQzLNY1.js} +1 -1
  18. package/dist/{Index-DmAG2skd.js → Index-D_xXXqKL.js} +10 -10
  19. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-UmynGH00.js → LocationPicker.vue_vue_type_script_setup_true_lang-BJl8_bKp.js} +1 -1
  20. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BThofu65.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BOaXZf3X.js} +1 -1
  21. package/dist/LoyaltyDashboard-CWPV6CHM.js +2218 -0
  22. package/dist/MainLayout-CeA24f8v.js +143 -0
  23. package/dist/{Marketing-DmY25Ri9.js → Marketing-Bw437-ze.js} +7 -6
  24. package/dist/{MarketingMaterialEdit-DP9pba44.js → MarketingMaterialEdit-x6JdhQDh.js} +15 -14
  25. package/dist/Member-zLjxWmJf.js +626 -0
  26. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DM9c_Ow1.js +1287 -0
  27. package/dist/MemberImportHistory-BvvIfn9o.js +187 -0
  28. package/dist/MemberList-DqqAduX1.js +336 -0
  29. package/dist/{MemberTransactions-XRvUfeFB.js → MemberTransactions-j4nWa843.js} +1 -1
  30. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-g7v3ZoUS.js → MessageInput.vue_vue_type_script_setup_true_lang-z9lYA425.js} +5434 -5279
  31. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +38 -0
  32. package/dist/Mission-CPXEtNBm.js +360 -0
  33. package/dist/Overview-Bel0iCe8.js +1316 -0
  34. package/dist/{Overview-DgmVlUVi.js → Overview-DySRWqyr.js} +21 -20
  35. package/dist/Point-ClovAwUI.js +288 -0
  36. package/dist/Promotion-BiiruWmm.js +423 -0
  37. package/dist/{Queue-DxtykwmI.js → Queue-DY9zRWWp.js} +13 -12
  38. package/dist/{Record-fLCi2Oyh.js → Record-BJ6M5bXk.js} +9 -9
  39. package/dist/Review-Cyi-vRyc.js +45 -0
  40. package/dist/ReviewFacebookCallback-CdSAfiJ7.js +238 -0
  41. package/dist/ReviewGoogleCallback-COen72wx.js +213 -0
  42. package/dist/{Reward-BbdiCAiO.js → Reward-B3--b_8h.js} +35 -35
  43. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Cfjtk46d.js → RewardGroup.vue_vue_type_script_setup_true_lang-DCmSt5io.js} +14 -13
  44. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CYEBeuQQ.js → RuleGroup.vue_vue_type_script_setup_true_lang-F2B47wb8.js} +17 -15
  45. package/dist/{Segment-EkGcR2jo.js → Segment-DydGccSi.js} +31 -29
  46. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DND48RGu.js → SelectItems.vue_vue_type_script_setup_true_lang-Bf_1Lw5R.js} +2 -2
  47. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-sbYDSAFK.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BXrHY1DU.js} +37 -36
  48. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D8RmLtRC.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DhitF847.js} +4 -4
  49. package/dist/{Setting-D3swsR6P.js → Setting-DgXgWy7W.js} +14 -14
  50. package/dist/{SettingAdvertisements-BjhTK11W.js → SettingAdvertisements-TMTfvGdU.js} +12 -12
  51. package/dist/Settings-b3K8fH29.js +230 -0
  52. package/dist/Store-jAGYe4R6.js +2615 -0
  53. package/dist/{StoreRewards-CyrWuwLi.js → StoreRewards-23IXon0V.js} +15 -15
  54. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BUTYIDGo.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BroaESpx.js} +400 -455
  55. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DJQ022R4.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-gnjnQhXP.js} +2 -2
  56. package/dist/{Tier-DrPqr8_e.js → Tier-B_ixl0ZY.js} +44 -41
  57. package/dist/{Title-CaZtz98p.js → Title-CUc90kzn.js} +49 -46
  58. package/dist/Transaction-BNVEjOC4.js +45 -0
  59. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BsBqk0Rs.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CkbKlnrt.js} +6 -6
  60. package/dist/{Voucher-BZcr4D0y.js → Voucher-eALK6zg9.js} +156 -133
  61. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DXQF3LZK.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CEsMYQ-L.js} +12 -12
  62. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DI-tCQeb.js → ZodTextField.vue_vue_type_script_setup_true_lang-BEAJ5tb7.js} +2 -2
  63. package/dist/{app-B0vutEt5.js → app-I3z-EN92.js} +7269 -5971
  64. package/dist/app.js +1 -1
  65. package/dist/{business-IZLJeLD-.js → business-D_ksG_j8.js} +5 -5
  66. package/dist/campaign-BKIxUyuf.js +100 -0
  67. package/dist/{campaign-BPmgteCL.js → campaign-IZaOdcTr.js} +74 -96
  68. package/dist/{campaign.enum-BCdlLIt6.js → campaign.enum-k3u4N6yI.js} +1 -1
  69. package/dist/{campaign.fn-BIFWlQvS.js → campaign.fn-DeQTMPoH.js} +116 -116
  70. package/dist/{collectible.enum-CiuAWn6_.js → collectible.enum-CSQwvFfW.js} +1 -1
  71. package/dist/collection.fn-BtWAPYLz.js +26 -0
  72. package/dist/{duplicateCampaign-BouCkl9n.js → duplicateCampaign-BWdWO-Jv.js} +2 -2
  73. package/dist/{effect-Cov_Xrar.js → effect-BBSG58dq.js} +1 -1
  74. package/dist/{email-addresses-BiopO9xi.js → email-addresses-CJg5ttqC.js} +2 -2
  75. package/dist/{export-DAPTBdHb.js → export-BkjhRe8g.js} +3 -3
  76. package/dist/google-C3S8u0mT.js +4 -0
  77. package/dist/{helper-ClFo4nAk.js → helper-DsSVIIP1.js} +1 -1
  78. package/dist/index-38Rnr26K.js +53 -0
  79. package/dist/{index-N5t83KgP.js → index-BbBies0f.js} +1902 -2559
  80. package/dist/index-BmAoVlN8.js +151 -0
  81. package/dist/{index-BZvvCPbP.js → index-BsAuvfaE.js} +5 -4
  82. package/dist/{index-Kllafq_o.js → index-C-phzlda.js} +105 -123
  83. package/dist/{index-CD_3hR1g.js → index-C0qgi7n9.js} +1 -1
  84. package/dist/index-CPnv5m8Z.js +137 -0
  85. package/dist/{index-BeK9AXvx.js → index-CV1kOec1.js} +1 -1
  86. package/dist/{index-CmgQZKyo.js → index-Ckr8ODhI.js} +1 -1
  87. package/dist/{index-DTSGYksR.js → index-CtF4Z_fd.js} +281 -372
  88. package/dist/{index-k9DTOKkN.js → index-CtXqXihA.js} +4 -1
  89. package/dist/index-DCz9v1dd.js +51 -0
  90. package/dist/index-DdV1nasM.js +896 -0
  91. package/dist/index-ZPKkCZxS.js +72 -0
  92. package/dist/{index-k0hHOUBO.js → index-blX95L2R.js} +579 -571
  93. package/dist/{index-Bm5E2iD6.js → index-f0JDFqAr.js} +14 -14
  94. package/dist/{index-pKdJ8574.js → index-iagCxZ13.js} +5 -5
  95. package/dist/{index-C_AuIVay.js → index-wsdEChJx.js} +5 -5
  96. package/dist/{index.esm2017-ByFUnorr.js → index.esm2017-BMC-Q91P.js} +164 -164
  97. package/dist/{loading-t4ygCIAa.js → loading-3obmcgAf.js} +1 -1
  98. package/dist/{lodash-DwGVChOs.js → lodash-C69G7pFG.js} +1 -1
  99. package/dist/member-import-BxBe9NE7.js +187 -0
  100. package/dist/{membership-CMCTmRdh.js → membership-_XX1_j55.js} +3 -3
  101. package/dist/{money-MhQbdVIt.js → money-DZpYudCC.js} +1 -1
  102. package/dist/{number-klG94_wm.js → number-BbQQzzRA.js} +1 -1
  103. package/dist/objectid-kWi62XJQ.js +145 -0
  104. package/dist/{plugins-2py5EcqG.js → plugins-UfVjLlr4.js} +3 -3
  105. package/dist/remy-Qz_pNsUS.js +13 -0
  106. package/dist/{reward-CE9z-Us7.js → reward-1G2M5tgv.js} +1 -1
  107. package/dist/{rule-BKNHxNrQ.js → rule-DHHGjLt5.js} +3 -3
  108. package/dist/rule-builder-CgNmvg5o.js +126 -0
  109. package/dist/{template-C9yNa_0m.js → template-Ckva65hw.js} +6 -6
  110. package/dist/timezone-Ddve0ese.js +20 -0
  111. package/dist/transaction.fn-7n5XLxfA.js +64 -0
  112. package/dist/{trigger-Dk0tAyDv.js → trigger-F-XaDRpc.js} +14 -14
  113. package/dist/useMarketingMaterialActions-DIhnstdO.js +96 -0
  114. package/dist/{usePagination-cF1F_1NH.js → usePagination-C0TcC_Lo.js} +1 -1
  115. package/dist/{user-CNPPoxKh.js → user-DeuI7T2e.js} +1 -1
  116. package/dist/{vue-i18n-Bk_KpCO_.js → vue-i18n-DRrphfc1.js} +191 -191
  117. package/dist/{xlsx-D3muGzk7.js → xlsx-DaY_eyt1.js} +440 -440
  118. package/dist/{zod-D72USJGr.js → zod-BDdpK5Gp.js} +1 -1
  119. package/package.json +5 -3
  120. package/dist/Card-P7MqKEDT.js +0 -910
  121. package/dist/Credit-Dp5P2k79.js +0 -260
  122. package/dist/Game-CNSbh93g.js +0 -330
  123. package/dist/LoyaltyDashboard-Go9ClMrp.js +0 -1082
  124. package/dist/MainLayout-Dyw9Qqvh.js +0 -41
  125. package/dist/Member-DKXzaqlL.js +0 -280
  126. package/dist/MemberList-BJ5nI3Nz.js +0 -1601
  127. package/dist/Mission-BvHArY3W.js +0 -334
  128. package/dist/Point-BR0R03i6.js +0 -262
  129. package/dist/Promotion-DofFeR2N.js +0 -397
  130. package/dist/Review-7tFJOnrt.js +0 -1076
  131. package/dist/ReviewFacebookCallback-yl0w_vF9.js +0 -243
  132. package/dist/ReviewGoogleCallback-Dn_aF2ZD.js +0 -208
  133. package/dist/Store-U1jysb7b.js +0 -1996
  134. package/dist/Transaction-Bj6bSo8R.js +0 -39
  135. package/dist/campaign-Cxp-DOCG.js +0 -219
  136. package/dist/index-BQ8XZk2Y.js +0 -85
  137. package/dist/index-KmCk2ksK.js +0 -52
  138. package/dist/objectid-C4ak1ctJ.js +0 -145
  139. package/dist/useMarketingMaterialActions-BiXkdMcs.js +0 -107
@@ -0,0 +1,423 @@
1
+ import { defineComponent as z, ref as C, resolveComponent as p, openBlock as y, createBlock as T, unref as a, isRef as ae, withCtx as O, createElementVNode as i, createVNode as r, computed as ie, h as P, onMounted as se, createElementBlock as L, Fragment as A, renderList as re, resolveDynamicComponent as le, toDisplayString as w } from "vue";
2
+ import { _ as ce } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as me, components as B } from "@feedmepos/ui-library";
4
+ import { p as U } from "./plugins-UfVjLlr4.js";
5
+ import { u as ue } from "./loading-3obmcgAf.js";
6
+ import { u as pe } from "./business-D_ksG_j8.js";
7
+ import { u as de } from "./campaign-BKIxUyuf.js";
8
+ import { u as fe } from "./vue-i18n-DRrphfc1.js";
9
+ import { g as q, a as ye, b as K } from "./campaign-IZaOdcTr.js";
10
+ import { c as ge, p as _e } from "./duplicateCampaign-BWdWO-Jv.js";
11
+ import { e as E } from "./effect-BBSG58dq.js";
12
+ import { c as Q } from "./string-Gcy5IM_H.js";
13
+ import "./index-Ckr8ODhI.js";
14
+ import { _ as he } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-1UH_Ie4E.js";
15
+ import { c as g } from "./index-BmAoVlN8.js";
16
+ import { u as we } from "./template-Ckva65hw.js";
17
+ import { _ as H } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
18
+ import { useRouter as be } from "vue-router";
19
+ import { R as ve } from "./app-I3z-EN92.js";
20
+ const Ce = { class: "space-y-8" }, xe = /* @__PURE__ */ z({
21
+ __name: "QueueSheet",
22
+ emits: ["update:model-value"],
23
+ setup(G, { expose: n, emit: M }) {
24
+ const d = C(!1), b = C([]);
25
+ async function V() {
26
+ d.value = !0;
27
+ const s = await g.getPromotionQueue();
28
+ console.log(s, "jobs"), b.value = s;
29
+ }
30
+ const x = [
31
+ {
32
+ header: "Started At",
33
+ accessorFn: (s) => s.createdAt,
34
+ enableSorting: !0
35
+ },
36
+ {
37
+ header: "Campaigns",
38
+ accessorFn: (s) => s.campaigns
39
+ // cell(props) {
40
+ // const r = props.row.original;
41
+ // return h('div', {
42
+ // innerHTML: r.campaigns.map((c: any) => c.name).join(', '),
43
+ // });
44
+ // },
45
+ }
46
+ ];
47
+ return n({
48
+ showSheet: V
49
+ }), (s, u) => {
50
+ const v = p("FmTable"), I = p("FmSideSheet");
51
+ return y(), T(I, {
52
+ "max-width": 550,
53
+ header: "Promotion Sync Queue",
54
+ modelValue: a(d),
55
+ "onUpdate:modelValue": [
56
+ u[1] || (u[1] = (f) => ae(d) ? d.value = f : null),
57
+ u[2] || (u[2] = (f) => d.value = f)
58
+ ]
59
+ }, {
60
+ default: O(() => [
61
+ i("div", Ce, [
62
+ 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)),
63
+ r(v, {
64
+ modelValue: s.tableRef,
65
+ "onUpdate:modelValue": u[0] || (u[0] = (f) => s.tableRef = f),
66
+ "column-filter": s.jobFilters,
67
+ "column-defs": x,
68
+ "row-data": a(b),
69
+ "hide-footer": a(b).length <= 10
70
+ }, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"])
71
+ ])
72
+ ]),
73
+ _: 1
74
+ }, 8, ["modelValue"]);
75
+ };
76
+ }
77
+ }), Fe = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-center justify-between w-full" }, Se = { class: "flex gap-8 overflow-x-auto" }, Pe = { class: "space-y-8" }, Te = { class: "flex w-full gap-4 items-center" }, Oe = { class: "space-y-4" }, Ve = { class: "fm-typo-en-body-lg-600" }, Ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Le = { class: "flex items-center gap-8" }, Ae = { class: "flex flex-col gap-16 text-center" }, Be = { class: "fm-typo-en-title-sm-800" }, Me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, to = /* @__PURE__ */ z({
78
+ __name: "Promotion",
79
+ setup(G) {
80
+ const { t: n } = fe(), M = {
81
+ label: n("connect.promotion.createCampaign"),
82
+ value: "create",
83
+ isPrimary: !0,
84
+ prependIcon: "add"
85
+ }, d = {
86
+ label: "Force sync",
87
+ value: "sync",
88
+ isPrimary: !1,
89
+ prependIcon: "refresh"
90
+ }, b = {
91
+ label: "Queue",
92
+ value: "queue",
93
+ isPrimary: !1,
94
+ prependIcon: "work_history"
95
+ }, V = we("PROMOTION", me()), x = pe(), s = de(), { global: u, minor: v } = ue, I = be(), f = [
96
+ {
97
+ label: "Bill promotion",
98
+ value: "BILL"
99
+ },
100
+ {
101
+ label: "Item promotion",
102
+ value: "ITEM"
103
+ }
104
+ ], c = C({
105
+ searchKey: "",
106
+ location: [],
107
+ effectType: []
108
+ });
109
+ function Y(e) {
110
+ const o = c.value.location;
111
+ return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((m) => {
112
+ var l;
113
+ return (l = e == null ? void 0 : e.targetLocation) == null ? void 0 : l.includes(m);
114
+ }) : e.targetLocation.includes(o);
115
+ }
116
+ function J(e) {
117
+ var l, k;
118
+ const o = c.value.effectType;
119
+ if (!o || o.length === 0) return !0;
120
+ const m = (k = (l = e.effect) == null ? void 0 : l.options) == null ? void 0 : k.target;
121
+ return o.includes(m);
122
+ }
123
+ const _ = ie(
124
+ () => s.campaigns.promotion.filter(
125
+ (e) => Y(e) && J(e)
126
+ )
127
+ ), W = [
128
+ {
129
+ header: n("connect.promotion.promotionTitle"),
130
+ accessorFn: (e) => e.name
131
+ },
132
+ {
133
+ header: n("connect.promotion.campaignDate"),
134
+ accessorFn: (e) => q(e)
135
+ },
136
+ {
137
+ header: n("connect.promotion.status"),
138
+ accessorFn: (e) => ye(e),
139
+ cell(e) {
140
+ return K(e.row.original);
141
+ }
142
+ },
143
+ {
144
+ header: n("connect.promotion.type"),
145
+ accessorFn: (e) => `${Q.title(e.effect.options.target)} promotion`
146
+ },
147
+ {
148
+ header: n("connect.promotion.summary"),
149
+ accessorFn: (e) => E(e.effect)
150
+ },
151
+ {
152
+ header: n("connect.promotion.actions"),
153
+ cell(e) {
154
+ return P("div", { class: "flex items-center gap-8 justify-end" }, [
155
+ P(B.FmButton, {
156
+ variant: "tertiary",
157
+ icon: "insights",
158
+ iconColor: "neutral-gray-400",
159
+ onClick: async (o) => {
160
+ o.stopPropagation(), await $(e.row.original);
161
+ }
162
+ }),
163
+ P(B.FmButton, {
164
+ variant: "tertiary",
165
+ icon: "content_copy",
166
+ iconColor: "neutral-gray-400",
167
+ onClick: async (o) => {
168
+ o.stopPropagation(), await j(e.row.original);
169
+ }
170
+ }),
171
+ P(B.FmButton, {
172
+ variant: "tertiary",
173
+ icon: "delete",
174
+ iconColor: "neutral-gray-400",
175
+ onClick: (o) => {
176
+ o.stopPropagation(), D(e.row.original);
177
+ }
178
+ })
179
+ ]);
180
+ }
181
+ }
182
+ ], R = C(), N = C();
183
+ async function D(e) {
184
+ await U.remove(
185
+ n("connect.promotion.confirmRemove", { name: e.name })
186
+ ) && await v(
187
+ async () => {
188
+ await g.delete(e._id), await s.read("PROMOTION");
189
+ },
190
+ {
191
+ message: n("connect.promotion.removing", { name: e.name }),
192
+ successMessage: n("connect.promotion.removedSuccessfully", {
193
+ name: e.name
194
+ })
195
+ }
196
+ );
197
+ }
198
+ async function F(e) {
199
+ e ? await o() : V.open(async (m) => {
200
+ await o(m);
201
+ });
202
+ async function o(m) {
203
+ var l;
204
+ (l = R.value) == null || l.showSheet(
205
+ !0,
206
+ "PROMOTION",
207
+ e ? await g.readById(e._id) : void 0,
208
+ m
209
+ );
210
+ }
211
+ }
212
+ async function $(e) {
213
+ await I.push({
214
+ name: ve["$connect-CAMPAIGN_PROMOTION_ANALYTIC"],
215
+ params: { id: e._id }
216
+ });
217
+ }
218
+ async function j(e) {
219
+ var l;
220
+ if (!await ge(e.name))
221
+ return;
222
+ const o = await g.readById(e._id), m = _e(o);
223
+ (l = R.value) == null || l.showSheet(
224
+ !0,
225
+ "PROMOTION",
226
+ m,
227
+ o.template
228
+ );
229
+ }
230
+ async function X(e) {
231
+ await v(
232
+ async () => {
233
+ e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await s.read("PROMOTION");
234
+ },
235
+ {
236
+ message: n(
237
+ e.campaign._id ? "connect.promotion.updating" : "connect.promotion.creating"
238
+ ),
239
+ successMessage: n(
240
+ e.campaign._id ? "connect.promotion.updatedSuccessfully" : "connect.promotion.createdSuccessfully"
241
+ )
242
+ }
243
+ );
244
+ }
245
+ async function Z(e) {
246
+ var o;
247
+ switch (e) {
248
+ case "create":
249
+ F();
250
+ break;
251
+ case "sync":
252
+ await U.confirm(
253
+ "Are you sure you want to synchronize all promotions to POS?",
254
+ "Force sync"
255
+ ) && v(
256
+ async () => {
257
+ await g.syncAllPromotion();
258
+ },
259
+ {
260
+ message: "Syncing promotions...",
261
+ successMessage: "All promotions synced"
262
+ }
263
+ );
264
+ break;
265
+ case "queue":
266
+ (o = N.value) == null || o.showSheet();
267
+ break;
268
+ }
269
+ }
270
+ return se(async () => {
271
+ await u(async () => {
272
+ await x.readLocations(), await s.read("PROMOTION");
273
+ });
274
+ }), (e, o) => {
275
+ const m = p("FmPageHead"), l = p("FmSearch"), k = p("FmTable"), ee = p("FmChip"), S = p("FmButton"), oe = p("FmListItem"), te = p("FmList"), ne = p("FmCard");
276
+ return y(), L(A, null, [
277
+ r(m, {
278
+ title: a(n)("connect.promotion.title"),
279
+ actions: a(_).length > 0 ? [M, d, b] : [],
280
+ "onClick:action": Z
281
+ }, null, 8, ["title", "actions"]),
282
+ i("div", Fe, [
283
+ r(l, {
284
+ modelValue: c.value.searchKey,
285
+ "onUpdate:modelValue": o[0] || (o[0] = (t) => c.value.searchKey = t),
286
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
287
+ placeholder: a(n)("connect.promotion.search"),
288
+ collapsible: ""
289
+ }, null, 8, ["modelValue", "placeholder"]),
290
+ a(_) && a(_).length > 0 ? (y(), L(A, { key: 0 }, [
291
+ i("div", ke, [
292
+ i("div", Se, [
293
+ r(H, {
294
+ label: `${a(n)("connect.common.location")}: `,
295
+ "right-icon": "keyboard_arrow_down",
296
+ modelValue: c.value.location,
297
+ "onUpdate:modelValue": o[1] || (o[1] = (t) => c.value.location = t),
298
+ icon: "storefront",
299
+ "show-item-label": !0,
300
+ items: a(x).locationOptions
301
+ }, null, 8, ["label", "modelValue", "items"]),
302
+ r(H, {
303
+ label: "Type:",
304
+ "right-icon": "keyboard_arrow_down",
305
+ modelValue: c.value.effectType,
306
+ "onUpdate:modelValue": o[2] || (o[2] = (t) => c.value.effectType = t),
307
+ icon: "filter_list",
308
+ "show-item-label": !0,
309
+ items: f
310
+ }, null, 8, ["modelValue"])
311
+ ]),
312
+ r(l, {
313
+ modelValue: c.value.searchKey,
314
+ "onUpdate:modelValue": o[3] || (o[3] = (t) => c.value.searchKey = t),
315
+ class: "xs:hidden sm:hidden",
316
+ placeholder: "search",
317
+ collapsible: ""
318
+ }, null, 8, ["modelValue"])
319
+ ]),
320
+ r(k, {
321
+ class: "xs:hidden sm:hidden",
322
+ "row-data": a(_),
323
+ "column-defs": W,
324
+ "search-value": c.value.searchKey,
325
+ "column-filter": [],
326
+ onRowClick: o[4] || (o[4] = (t) => F(t.original)),
327
+ "hide-footer": a(_).length < 10
328
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
329
+ r(te, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
330
+ default: O(() => [
331
+ (y(!0), L(A, null, re(a(_).filter(
332
+ (t) => t.name.toLowerCase().includes(c.value.searchKey.toLowerCase())
333
+ ), (t) => (y(), T(oe, {
334
+ key: t._id.toString(),
335
+ onClick: (h) => F(t),
336
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
337
+ }, {
338
+ default: O(() => [
339
+ i("div", Pe, [
340
+ i("div", Te, [
341
+ (y(), T(le(a(K)(t)))),
342
+ r(ee, {
343
+ class: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
344
+ compact: !0,
345
+ label: `${a(Q).title(t.effect.options.target)} promotion`
346
+ }, null, 8, ["label"])
347
+ ]),
348
+ i("div", Oe, [
349
+ i("div", Ve, w(t.name), 1),
350
+ i("div", Ie, w(a(E)(t.effect)), 1),
351
+ i("div", Re, w(a(n)("connect.promotion.campaignDate")) + ": " + w(a(q)(t)), 1)
352
+ ])
353
+ ]),
354
+ i("div", Le, [
355
+ r(S, {
356
+ icon: "insights",
357
+ "icon-color": "neutral-gray-400",
358
+ variant: "tertiary",
359
+ onClick: async (h) => {
360
+ h.stopPropagation(), await $(t);
361
+ }
362
+ }, null, 8, ["onClick"]),
363
+ r(S, {
364
+ icon: "content_copy",
365
+ "icon-color": "neutral-gray-400",
366
+ variant: "tertiary",
367
+ onClick: async (h) => {
368
+ h.stopPropagation(), await j(t);
369
+ }
370
+ }, null, 8, ["onClick"]),
371
+ r(S, {
372
+ icon: "delete",
373
+ "icon-color": "neutral-gray-400",
374
+ variant: "tertiary",
375
+ onClick: (h) => (h.stopPropagation(), D(t))
376
+ }, null, 8, ["onClick"])
377
+ ])
378
+ ]),
379
+ _: 2
380
+ }, 1032, ["onClick"]))), 128))
381
+ ]),
382
+ _: 1
383
+ })
384
+ ], 64)) : (y(), T(ne, {
385
+ key: 1,
386
+ variant: "outlined",
387
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
388
+ }, {
389
+ default: O(() => [
390
+ o[6] || (o[6] = i("img", {
391
+ src: ce,
392
+ class: "aspect-square w-[150px]"
393
+ }, null, -1)),
394
+ i("div", Ae, [
395
+ i("div", Be, w(a(n)("connect.promotion.createPromotionCampaign")), 1),
396
+ i("div", Me, w(a(n)("connect.promotion.description")), 1)
397
+ ]),
398
+ r(S, {
399
+ variant: "primary",
400
+ label: a(n)("connect.promotion.createPromotionCampaign"),
401
+ icon: "add",
402
+ onClick: o[5] || (o[5] = (t) => F())
403
+ }, null, 8, ["label"])
404
+ ]),
405
+ _: 1
406
+ }))
407
+ ]),
408
+ r(he, {
409
+ ref_key: "sheetRef",
410
+ ref: R,
411
+ "onSubmit:modelValue": X
412
+ }, null, 512),
413
+ r(xe, {
414
+ ref_key: "queueSheetRef",
415
+ ref: N
416
+ }, null, 512)
417
+ ], 64);
418
+ };
419
+ }
420
+ });
421
+ export {
422
+ to as default
423
+ };
@@ -1,19 +1,20 @@
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-cF1F_1NH.js";
2
+ import { u as G, _ as L } from "./usePagination-C0TcC_Lo.js";
3
3
  import { _ as S } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
4
4
  import { c as u } from "./string-Gcy5IM_H.js";
5
- import { c as Y } from "./plugins-2py5EcqG.js";
5
+ import { c as Y } from "./plugins-UfVjLlr4.js";
6
6
  import { useDialog as j, components as y } from "@feedmepos/ui-library";
7
- import "./index-DTSGYksR.js";
8
- import { N as c, c as d } from "./index-N5t83KgP.js";
9
- import "./index-k0hHOUBO.js";
10
- import "./index-C_AuIVay.js";
11
- import "./index-pKdJ8574.js";
7
+ import "./index-CtF4Z_fd.js";
8
+ import "./index-BbBies0f.js";
9
+ import "./index-blX95L2R.js";
10
+ import "./index-wsdEChJx.js";
11
+ import { n as c, a as d } from "./index-DdV1nasM.js";
12
+ import "./index-iagCxZ13.js";
12
13
  import { h as b } from "./moment-D7p2TMB-.js";
13
- import { u as W } from "./vue-i18n-Bk_KpCO_.js";
14
- import { u as H, v as K, w as Q } from "./index.esm2017-ByFUnorr.js";
14
+ import { u as W } from "./vue-i18n-DRrphfc1.js";
15
+ import { u as H, v as K, w as Q } from "./index.esm2017-BMC-Q91P.js";
15
16
  import { useRoute as $ } from "vue-router";
16
- import { g as J, S as Z, u as X } from "./index-BZvvCPbP.js";
17
+ import { g as J, S as Z, u as X } from "./index-BsAuvfaE.js";
17
18
  import { o as ee } from "./objectId-dwaoBfJX.js";
18
19
  const te = () => {
19
20
  if (!Z.getBusinessId()) throw new Error("Invalid business ID");
@@ -28,7 +29,7 @@ const te = () => {
28
29
  }
29
30
  };
30
31
  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({
32
+ 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" }, Ee = /* @__PURE__ */ h({
32
33
  __name: "Queue",
33
34
  setup(p) {
34
35
  const v = $().query.type, { t: x } = W(), E = j(), C = [
@@ -256,5 +257,5 @@ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-ce
256
257
  }
257
258
  });
258
259
  export {
259
- xe as default
260
+ Ee as default
260
261
  };
@@ -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-cF1F_1NH.js";
6
- import { g as A } from "./user-CNPPoxKh.js";
5
+ import { u as oe, _ as ae } from "./usePagination-C0TcC_Lo.js";
6
+ import { g as A } from "./user-DeuI7T2e.js";
7
7
  import { components as R } from "@feedmepos/ui-library";
8
- import "./index-C_AuIVay.js";
9
- import { u as j } from "./vue-i18n-Bk_KpCO_.js";
10
- import { u as L } from "./loading-t4ygCIAa.js";
8
+ import "./index-wsdEChJx.js";
9
+ import { u as j } from "./vue-i18n-DRrphfc1.js";
10
+ import { u as L } from "./loading-3obmcgAf.js";
11
11
  import { useCoreStore as se } from "@feedmepos/mf-common";
12
- import { r as v } from "./index-BeK9AXvx.js";
12
+ import { r as v } from "./index-CV1kOec1.js";
13
13
  import { c as ie, a as ne } from "./object-BYyQ0PZp.js";
14
- import { u as ce } from "./membership-CMCTmRdh.js";
14
+ import { u as ce } from "./membership-_XX1_j55.js";
15
15
  import { c as le } from "./string-Gcy5IM_H.js";
16
- import { c as de } from "./plugins-2py5EcqG.js";
17
- import { u as V, w as me } from "./xlsx-D3muGzk7.js";
16
+ import { c as de } from "./plugins-UfVjLlr4.js";
17
+ import { u as V, w as me } from "./xlsx-DaY_eyt1.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-DRrphfc1.js";
3
+ import { R as r } from "./app-I3z-EN92.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
+ };