@feedmepos/mf-connect 0.1.98-beta.3 → 0.1.98-beta.30

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 (123) hide show
  1. package/dist/{App-DEtGn29M.js → App-DUpK_Q7f.js} +808 -665
  2. package/dist/{AuditLogs-Mrm0iq9P.js → AuditLogs-DWYbj4lo.js} +9 -9
  3. package/dist/{Bin-D9Pu0L6h.js → Bin-DieOnDz0.js} +8 -8
  4. package/dist/{Broadcast-BZDQtN8x.js → Broadcast-UQ-vMYLl.js} +39 -36
  5. package/dist/CampaignAnalytic-CfvtyBoa.js +1656 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bxlbz-JW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CuJWOZ3o.js} +6 -5
  7. package/dist/{Card-BdMSuxr4.js → Card-Te7LGbdC.js} +18 -18
  8. package/dist/{Collections-D2IOFKrJ.js → Collections-C-QeTQej.js} +14 -13
  9. package/dist/Credit-B459_0Nt.js +286 -0
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-jmfMQG79.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Dp3i8kku.js} +34 -30
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BYQDCpXN.js → EffectSheet.vue_vue_type_style_index_0_lang-XgrUL64F.js} +6 -6
  12. package/dist/{Experience-Dm5TDsKH.js → Experience-BUiwaqiZ.js} +112 -86
  13. package/dist/{FileSaver.min-G6JMp965.js → FileSaver.min-BBLnxnqN.js} +1 -1
  14. package/dist/Game-iOJbGiNe.js +356 -0
  15. package/dist/{Grab-BXfBhrCM.js → Grab-bC6BeXxc.js} +32 -31
  16. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-C7EIMTui.js → ImageInput.vue_vue_type_script_setup_true_lang-eiJJrTiu.js} +1 -1
  17. package/dist/{Index-DfPPobH8.js → Index-Utb2MWAQ.js} +10 -10
  18. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Cpx1HMpd.js → LocationPicker.vue_vue_type_script_setup_true_lang-B7iWGh2L.js} +1 -1
  19. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Csse-q2U.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CppfUz1y.js} +1 -1
  20. package/dist/LoyaltyDashboard-BHSHnBpi.js +1345 -0
  21. package/dist/{MainLayout-DxAYEJg1.js → MainLayout-DMqkiGFT.js} +1 -1
  22. package/dist/{Marketing-CPQQG8Y9.js → Marketing-DGfDqW7v.js} +4 -4
  23. package/dist/{MarketingMaterialEdit-ssilnzNw.js → MarketingMaterialEdit-p5QBPd83.js} +6 -6
  24. package/dist/{Member-DmoUk3Dx.js → Member-C2KIOib-.js} +11 -11
  25. package/dist/{MemberList-Cm2BWPrW.js → MemberList-Esp9384f.js} +36 -35
  26. package/dist/{MemberTransactions-Cxr87RMl.js → MemberTransactions-CKYG04pY.js} +1 -1
  27. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DpUg4Uwi.js → MessageInput.vue_vue_type_script_setup_true_lang-CItc3B3N.js} +5434 -5279
  28. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +38 -0
  29. package/dist/Mission-BlckuFfz.js +360 -0
  30. package/dist/{Overview-CfigslHq.js → Overview-B5PSmDQr.js} +18 -18
  31. package/dist/Overview-suva6hd8.js +1104 -0
  32. package/dist/Point-CVexYech.js +288 -0
  33. package/dist/Promotion-VW7rqIn-.js +423 -0
  34. package/dist/{Queue-B7kxDPZV.js → Queue-Dh4C5OO9.js} +12 -12
  35. package/dist/{Record-BGULqygn.js → Record-CYGrQ_Cb.js} +9 -9
  36. package/dist/Review-mxbjxTB1.js +45 -0
  37. package/dist/ReviewFacebookCallback-C-pSgxeh.js +238 -0
  38. package/dist/ReviewGoogleCallback-CnNbGQdM.js +213 -0
  39. package/dist/{Reward-C0w5c1Th.js → Reward-CQ8AgV1m.js} +16 -16
  40. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CspVlyRZ.js → RewardGroup.vue_vue_type_script_setup_true_lang-DxaejEKe.js} +11 -11
  41. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-QYsK7vE4.js → RuleGroup.vue_vue_type_script_setup_true_lang-CxHheatc.js} +16 -15
  42. package/dist/{Segment-I_p06AoA.js → Segment-Crm395ad.js} +39 -37
  43. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DV79EJm9.js → SelectItems.vue_vue_type_script_setup_true_lang-CnA8A--R.js} +2 -2
  44. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CUwwzTTV.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dd-mYmBN.js} +12 -12
  45. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D2Nv32U5.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DgkPQA3H.js} +4 -4
  46. package/dist/{Setting-DOMSAMUz.js → Setting-AKRWf4zD.js} +40 -40
  47. package/dist/{SettingAdvertisements-IeGC6PHz.js → SettingAdvertisements-DD9U8S6N.js} +12 -12
  48. package/dist/Settings-D7c8sBA8.js +179 -0
  49. package/dist/{Store-DLzj0qGi.js → Store-BN3RP_u-.js} +21 -21
  50. package/dist/{StoreRewards-BPhAkGNl.js → StoreRewards-BXc96ZMM.js} +15 -15
  51. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DpcaOgdN.js → StoreTransactions.vue_vue_type_script_setup_true_lang-B76NSzNg.js} +190 -187
  52. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DUdAxdEO.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DnhMV2aq.js} +2 -2
  53. package/dist/{Tier-7MveQA4f.js → Tier-Bbktc4H8.js} +36 -34
  54. package/dist/{Title-kyAzLGqm.js → Title-BU8pzF9c.js} +39 -37
  55. package/dist/{Transaction-Chl3d3Ai.js → Transaction-B3_M0MMz.js} +2 -2
  56. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CZsaFtae.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DtFoQXUu.js} +6 -6
  57. package/dist/{Voucher-CxIPPul5.js → Voucher-CJruHWmd.js} +156 -133
  58. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BntA1IAx.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DzIQ_1Nb.js} +12 -12
  59. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CiOmadge.js → ZodTextField.vue_vue_type_script_setup_true_lang-Lq5Z_Glg.js} +2 -2
  60. package/dist/{app-5YllsPJi.js → app-CmK_zWVU.js} +3356 -2864
  61. package/dist/app.js +1 -1
  62. package/dist/{business-C0zArPJj.js → business-Br3Sboxg.js} +1 -1
  63. package/dist/campaign-53KorSW_.js +100 -0
  64. package/dist/{campaign-BHl5a5Z1.js → campaign-Dz57HOfP.js} +74 -96
  65. package/dist/{campaign.enum-CHWTkc9k.js → campaign.enum-Dx-Zo68Q.js} +1 -1
  66. package/dist/{campaign.fn-BtwnAETQ.js → campaign.fn-D-J5-IK0.js} +127 -127
  67. package/dist/{collectible.enum-BvoISTK3.js → collectible.enum-Liy2wH3s.js} +1 -1
  68. package/dist/collection.fn-cEP4Vjv6.js +26 -0
  69. package/dist/{duplicateCampaign-C27ikU2f.js → duplicateCampaign-bBnEmbXg.js} +2 -2
  70. package/dist/{effect-CARgKjhU.js → effect-RQs_nrvo.js} +1 -1
  71. package/dist/{email-addresses-CnTsfZHe.js → email-addresses-CAX-uL1B.js} +2 -2
  72. package/dist/{export-CO8-3Ob9.js → export-DSgRDjwv.js} +3 -3
  73. package/dist/google-C3S8u0mT.js +4 -0
  74. package/dist/{helper-C617AZcV.js → helper-DlEUDhaf.js} +1 -1
  75. package/dist/{index-CMfyVF2h.js → index-BA0GllA8.js} +105 -123
  76. package/dist/index-BHdJaRRQ.js +146 -0
  77. package/dist/{index-9AxeGyVh.js → index-BpXYj8xl.js} +272 -369
  78. package/dist/index-C8cXXcLk.js +45 -0
  79. package/dist/{index-Da8trM3D.js → index-CBvgQWbo.js} +1 -1
  80. package/dist/{index-gPrU9b68.js → index-CHmtKN0J.js} +8027 -10766
  81. package/dist/{index-hKv7PcTR.js → index-CJ0Ofs8g.js} +1 -1
  82. package/dist/{index-CFO8nwbC.js → index-CQ40sF6g.js} +8 -7
  83. package/dist/index-C_H8jFYf.js +2743 -0
  84. package/dist/{index-DMvP3cOz.js → index-CbBnibrX.js} +184 -210
  85. package/dist/{index-DIcwj1r2.js → index-Cm4hBY6K.js} +1 -1
  86. package/dist/{index-CtXx42Yb.js → index-D3obFXMZ.js} +1 -1
  87. package/dist/{index-B0BE7PIS.js → index-DJQCoy-g.js} +1 -1
  88. package/dist/{index-DNf6qgpV.js → index-DansV6RZ.js} +2 -2
  89. package/dist/{index-wL9aIsub.js → index-Dpyep_-G.js} +587 -578
  90. package/dist/{index-B2ZvboNZ.js → index-ZFdRmzK7.js} +1 -1
  91. package/dist/{index-CEJgFylS.js → index-fVWfEBZV.js} +26 -17
  92. package/dist/{index.esm2017-BFgbXDc8.js → index.esm2017-GDYw3ujs.js} +105 -105
  93. package/dist/{loading-BxpiUNaf.js → loading-CevzAqpQ.js} +1 -1
  94. package/dist/{lodash-rPOvq9te.js → lodash-CcmP-ZWD.js} +1 -1
  95. package/dist/{membership-lfX5TNVQ.js → membership-CP-ZGC-Y.js} +3 -3
  96. package/dist/{money-CuUoYzPn.js → money-B_CYilsX.js} +1 -1
  97. package/dist/{number-DMk8hvKt.js → number-CqWVPhp0.js} +1 -1
  98. package/dist/objectid-DkTaCd6K.js +145 -0
  99. package/dist/{plugins-CyYjHO_X.js → plugins-Br271boW.js} +3 -3
  100. package/dist/{reward-BxwaSc-X.js → reward-CKQRdG-H.js} +1 -1
  101. package/dist/{rule-76SluGaP.js → rule-D0Rv4CuV.js} +3 -3
  102. package/dist/rule-builder-BUn6UMwW.js +126 -0
  103. package/dist/{template-ByceGw-A.js → template-D5GB4cAl.js} +6 -6
  104. package/dist/timezone-DqRsL54X.js +20 -0
  105. package/dist/{trigger-CxM5x3Sj.js → trigger-Ci92pTJU.js} +5 -5
  106. package/dist/{useMarketingMaterialActions-CHXVZ61f.js → useMarketingMaterialActions-C_mu-ac8.js} +3 -3
  107. package/dist/{usePagination-BKfoMHBB.js → usePagination-CWQ2WXiM.js} +1 -1
  108. package/dist/{user-Cqjv0IpD.js → user-CeAfYeZW.js} +1 -1
  109. package/dist/{vue-i18n-Q-nKu_E3.js → vue-i18n-P_SZNhrt.js} +419 -419
  110. package/dist/{xlsx-D1LobU8O.js → xlsx-CTo0cmDn.js} +1 -1
  111. package/dist/{zod-B5vUvKbD.js → zod-CPa57Pxb.js} +1 -1
  112. package/package.json +3 -3
  113. package/dist/Credit-BWyLeJpj.js +0 -260
  114. package/dist/Game-BB81nS7Y.js +0 -330
  115. package/dist/LoyaltyDashboard-BWC3rDDk.js +0 -1082
  116. package/dist/Mission-ChWPNxbI.js +0 -334
  117. package/dist/Point-Ko81Ny1q.js +0 -262
  118. package/dist/Promotion-CfyscRNN.js +0 -397
  119. package/dist/Review-C7Nx6a5t.js +0 -959
  120. package/dist/ReviewFacebookCallback-DKmL0TYZ.js +0 -243
  121. package/dist/ReviewGoogleCallback-C6iFFEfS.js +0 -208
  122. package/dist/campaign-C_49MeEc.js +0 -219
  123. package/dist/objectid-VPzb0Etb.js +0 -145
@@ -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-Br271boW.js";
5
+ import { u as ue } from "./loading-CevzAqpQ.js";
6
+ import { u as pe } from "./business-Br3Sboxg.js";
7
+ import { u as de } from "./campaign-53KorSW_.js";
8
+ import { u as fe } from "./vue-i18n-P_SZNhrt.js";
9
+ import { g as q, a as ye, b as K } from "./campaign-Dz57HOfP.js";
10
+ import { c as ge, p as _e } from "./duplicateCampaign-bBnEmbXg.js";
11
+ import { e as E } from "./effect-RQs_nrvo.js";
12
+ import { c as Q } from "./string-Gcy5IM_H.js";
13
+ import "./index-D3obFXMZ.js";
14
+ import { _ as he } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-Dp3i8kku.js";
15
+ import { c as g } from "./index-BHdJaRRQ.js";
16
+ import { u as we } from "./template-D5GB4cAl.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-CmK_zWVU.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,19 @@
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-BKfoMHBB.js";
2
+ import { u as G, _ as L } from "./usePagination-CWQ2WXiM.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-CyYjHO_X.js";
5
+ import { c as Y } from "./plugins-Br271boW.js";
6
6
  import { useDialog as j, components as y } from "@feedmepos/ui-library";
7
- import "./index-9AxeGyVh.js";
8
- import { N as c, c as d } from "./index-DMvP3cOz.js";
9
- import "./index-wL9aIsub.js";
10
- import "./index-gPrU9b68.js";
11
- import "./index-CFO8nwbC.js";
7
+ import "./index-BpXYj8xl.js";
8
+ import { K as c, c as d } from "./index-CbBnibrX.js";
9
+ import "./index-Dpyep_-G.js";
10
+ import "./index-CHmtKN0J.js";
11
+ import "./index-CQ40sF6g.js";
12
12
  import { h as b } from "./moment-D7p2TMB-.js";
13
- import { u as W } from "./vue-i18n-Q-nKu_E3.js";
14
- import { u as H, v as K, w as Q } from "./index.esm2017-BFgbXDc8.js";
13
+ import { u as K } from "./vue-i18n-P_SZNhrt.js";
14
+ import { u as W, v as H, w as Q } from "./index.esm2017-GDYw3ujs.js";
15
15
  import { useRoute as $ } from "vue-router";
16
- import { g as J, S as Z, u as X } from "./index-DNf6qgpV.js";
16
+ import { g as J, S as Z, u as X } from "./index-DansV6RZ.js";
17
17
  import { o as ee } from "./objectId-dwaoBfJX.js";
18
18
  const te = () => {
19
19
  if (!Z.getBusinessId()) throw new Error("Invalid business ID");
@@ -31,7 +31,7 @@ var ae = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDo
31
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
32
  __name: "Queue",
33
33
  setup(p) {
34
- const v = $().query.type, { t: x } = W(), E = j(), C = [
34
+ const v = $().query.type, { t: x } = K(), E = j(), C = [
35
35
  {
36
36
  header: "ID",
37
37
  accessorKey: "_id",
@@ -159,7 +159,7 @@ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-ce
159
159
  });
160
160
  }
161
161
  const T = async (t) => {
162
- const e = H(void 0, ae.importFilesBucketUrl), r = K(e, t);
162
+ const e = W(void 0, ae.importFilesBucketUrl), r = H(e, t);
163
163
  return await Q(r);
164
164
  }, R = c.options.map((t) => ({ label: u.title(t), value: t })), s = A({
165
165
  type: v ?? [
@@ -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-BKfoMHBB.js";
6
- import { g as A } from "./user-Cqjv0IpD.js";
5
+ import { u as oe, _ as ae } from "./usePagination-CWQ2WXiM.js";
6
+ import { g as A } from "./user-CeAfYeZW.js";
7
7
  import { components as R } from "@feedmepos/ui-library";
8
- import "./index-gPrU9b68.js";
9
- import { u as j } from "./vue-i18n-Q-nKu_E3.js";
10
- import { u as L } from "./loading-BxpiUNaf.js";
8
+ import "./index-CHmtKN0J.js";
9
+ import { u as j } from "./vue-i18n-P_SZNhrt.js";
10
+ import { u as L } from "./loading-CevzAqpQ.js";
11
11
  import { useCoreStore as se } from "@feedmepos/mf-common";
12
- import { r as v } from "./index-Da8trM3D.js";
12
+ import { r as v } from "./index-CBvgQWbo.js";
13
13
  import { c as ie, a as ne } from "./object-BYyQ0PZp.js";
14
- import { u as ce } from "./membership-lfX5TNVQ.js";
14
+ import { u as ce } from "./membership-CP-ZGC-Y.js";
15
15
  import { c as le } from "./string-Gcy5IM_H.js";
16
- import { c as de } from "./plugins-CyYjHO_X.js";
17
- import { u as V, w as me } from "./xlsx-D1LobU8O.js";
16
+ import { c as de } from "./plugins-Br271boW.js";
17
+ import { u as V, w as me } from "./xlsx-CTo0cmDn.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-P_SZNhrt.js";
3
+ import { R as r } from "./app-CmK_zWVU.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
+ };