@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
@@ -1,397 +0,0 @@
1
- import { defineComponent as Q, ref as w, resolveComponent as d, openBlock as f, createBlock as S, unref as a, isRef as te, withCtx as k, createElementVNode as i, createVNode as c, computed as ne, h as I, onMounted as ae, createElementBlock as L, Fragment as B, renderList as se, resolveDynamicComponent as ie, toDisplayString as h } from "vue";
2
- import { _ as re } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as le, components as N } from "@feedmepos/ui-library";
4
- import { p as $ } from "./plugins-CyYjHO_X.js";
5
- import { u as ce } from "./loading-BxpiUNaf.js";
6
- import { u as me } from "./business-C0zArPJj.js";
7
- import { c as y, u as ue } from "./campaign-C_49MeEc.js";
8
- import { u as de } from "./vue-i18n-Q-nKu_E3.js";
9
- import { g as j, a as pe, b as q } from "./campaign-BHl5a5Z1.js";
10
- import { c as fe, p as ye } from "./duplicateCampaign-C27ikU2f.js";
11
- import { e as K } from "./effect-CARgKjhU.js";
12
- import { c as U } from "./string-Gcy5IM_H.js";
13
- import { _ as ge } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-jmfMQG79.js";
14
- import { u as he } from "./template-ByceGw-A.js";
15
- import { _ as E } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
16
- const _e = { class: "space-y-8" }, be = /* @__PURE__ */ Q({
17
- __name: "QueueSheet",
18
- emits: ["update:model-value"],
19
- setup(H, { expose: n, emit: R }) {
20
- const p = w(!1), _ = w([]);
21
- async function P() {
22
- p.value = !0;
23
- const r = await y.getPromotionQueue();
24
- console.log(r, "jobs"), _.value = r;
25
- }
26
- const v = [
27
- {
28
- header: "Started At",
29
- accessorFn: (r) => r.createdAt,
30
- enableSorting: !0
31
- },
32
- {
33
- header: "Campaigns",
34
- accessorFn: (r) => r.campaigns
35
- // cell(props) {
36
- // const r = props.row.original;
37
- // return h('div', {
38
- // innerHTML: r.campaigns.map((c: any) => c.name).join(', '),
39
- // });
40
- // },
41
- }
42
- ];
43
- return n({
44
- showSheet: P
45
- }), (r, u) => {
46
- const b = d("FmTable"), T = d("FmSideSheet");
47
- return f(), S(T, {
48
- "max-width": 550,
49
- header: "Promotion Sync Queue",
50
- modelValue: a(p),
51
- "onUpdate:modelValue": [
52
- u[1] || (u[1] = (s) => te(p) ? p.value = s : null),
53
- u[2] || (u[2] = (s) => p.value = s)
54
- ]
55
- }, {
56
- default: k(() => [
57
- i("div", _e, [
58
- u[3] || (u[3] = i("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Promotion synchronizing to your restaurant(s) is queued here. Depending on the number of campaigns and restaurants, this process may take several minutes. No task displayed here means there are no pending promotions to sync. ", -1)),
59
- c(b, {
60
- modelValue: r.tableRef,
61
- "onUpdate:modelValue": u[0] || (u[0] = (s) => r.tableRef = s),
62
- "column-filter": r.jobFilters,
63
- "column-defs": v,
64
- "row-data": a(_),
65
- "hide-footer": a(_).length <= 10
66
- }, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"])
67
- ])
68
- ]),
69
- _: 1
70
- }, 8, ["modelValue"]);
71
- };
72
- }
73
- }), we = { class: "px-24 flex flex-col gap-y-16" }, ve = { class: "flex items-center justify-between w-full" }, Ce = { class: "flex gap-8 overflow-x-auto" }, xe = { class: "space-y-8" }, Fe = { class: "flex w-full gap-4 items-center" }, Se = { class: "space-y-4" }, ke = { class: "fm-typo-en-body-lg-600" }, Pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ve = { class: "flex items-center gap-8" }, Oe = { class: "flex flex-col gap-16 text-center" }, Ie = { class: "fm-typo-en-title-sm-800" }, Le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge = /* @__PURE__ */ Q({
74
- __name: "Promotion",
75
- setup(H) {
76
- const { t: n } = de(), R = {
77
- label: n("connect.promotion.createCampaign"),
78
- value: "create",
79
- isPrimary: !0,
80
- prependIcon: "add"
81
- }, p = {
82
- label: "Force sync",
83
- value: "sync",
84
- isPrimary: !1,
85
- prependIcon: "refresh"
86
- }, _ = {
87
- label: "Queue",
88
- value: "queue",
89
- isPrimary: !1,
90
- prependIcon: "work_history"
91
- }, P = he("PROMOTION", le()), v = me(), r = ue(), { global: u, minor: b } = ce, T = [
92
- {
93
- label: "Bill promotion",
94
- value: "BILL"
95
- },
96
- {
97
- label: "Item promotion",
98
- value: "ITEM"
99
- }
100
- ], s = w({
101
- searchKey: "",
102
- location: [],
103
- effectType: []
104
- });
105
- function z(e) {
106
- const o = s.value.location;
107
- return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((m) => {
108
- var l;
109
- return (l = e == null ? void 0 : e.targetLocation) == null ? void 0 : l.includes(m);
110
- }) : e.targetLocation.includes(o);
111
- }
112
- function G(e) {
113
- var l, x;
114
- const o = s.value.effectType;
115
- if (!o || o.length === 0) return !0;
116
- const m = (x = (l = e.effect) == null ? void 0 : l.options) == null ? void 0 : x.target;
117
- return o.includes(m);
118
- }
119
- const g = ne(
120
- () => r.campaigns.promotion.filter(
121
- (e) => z(e) && G(e)
122
- )
123
- ), J = [
124
- {
125
- header: n("connect.promotion.promotionTitle"),
126
- accessorFn: (e) => e.name
127
- },
128
- {
129
- header: n("connect.promotion.campaignDate"),
130
- accessorFn: (e) => j(e)
131
- },
132
- {
133
- header: n("connect.promotion.status"),
134
- accessorFn: (e) => pe(e),
135
- cell(e) {
136
- return q(e.row.original);
137
- }
138
- },
139
- {
140
- header: n("connect.promotion.type"),
141
- accessorFn: (e) => `${U.title(e.effect.options.target)} promotion`
142
- },
143
- {
144
- header: n("connect.promotion.summary"),
145
- accessorFn: (e) => K(e.effect)
146
- },
147
- {
148
- header: n("connect.promotion.actions"),
149
- cell(e) {
150
- return I("div", { class: "flex items-center gap-8 justify-end" }, [
151
- I(N.FmButton, {
152
- variant: "tertiary",
153
- icon: "content_copy",
154
- iconColor: "neutral-gray-400",
155
- onClick: async (o) => {
156
- o.stopPropagation(), await M(e.row.original);
157
- }
158
- }),
159
- I(N.FmButton, {
160
- variant: "tertiary",
161
- icon: "delete",
162
- iconColor: "neutral-gray-400",
163
- onClick: (o) => {
164
- o.stopPropagation(), D(e.row.original);
165
- }
166
- })
167
- ]);
168
- }
169
- }
170
- ], V = w(), A = w();
171
- async function D(e) {
172
- await $.remove(
173
- n("connect.promotion.confirmRemove", { name: e.name })
174
- ) && await b(
175
- async () => {
176
- await y.delete(e._id), await r.read("PROMOTION");
177
- },
178
- {
179
- message: n("connect.promotion.removing", { name: e.name }),
180
- successMessage: n("connect.promotion.removedSuccessfully", {
181
- name: e.name
182
- })
183
- }
184
- );
185
- }
186
- async function C(e) {
187
- e ? await o() : P.open(async (m) => {
188
- await o(m);
189
- });
190
- async function o(m) {
191
- var l;
192
- (l = V.value) == null || l.showSheet(
193
- !0,
194
- "PROMOTION",
195
- e ? await y.readById(e._id) : void 0,
196
- m
197
- );
198
- }
199
- }
200
- async function M(e) {
201
- var l;
202
- if (!await fe(e.name))
203
- return;
204
- const o = await y.readById(e._id), m = ye(o);
205
- (l = V.value) == null || l.showSheet(
206
- !0,
207
- "PROMOTION",
208
- m,
209
- o.template
210
- );
211
- }
212
- async function W(e) {
213
- await b(
214
- async () => {
215
- e.campaign._id ? await y.update(e.campaign._id, e) : await y.create(e), await r.read("PROMOTION");
216
- },
217
- {
218
- message: n(
219
- e.campaign._id ? "connect.promotion.updating" : "connect.promotion.creating"
220
- ),
221
- successMessage: n(
222
- e.campaign._id ? "connect.promotion.updatedSuccessfully" : "connect.promotion.createdSuccessfully"
223
- )
224
- }
225
- );
226
- }
227
- async function X(e) {
228
- var o;
229
- switch (e) {
230
- case "create":
231
- C();
232
- break;
233
- case "sync":
234
- await $.confirm(
235
- "Are you sure you want to synchronize all promotions to POS?",
236
- "Force sync"
237
- ) && b(
238
- async () => {
239
- await y.syncAllPromotion();
240
- },
241
- {
242
- message: "Syncing promotions...",
243
- successMessage: "All promotions synced"
244
- }
245
- );
246
- break;
247
- case "queue":
248
- (o = A.value) == null || o.showSheet();
249
- break;
250
- }
251
- }
252
- return ae(async () => {
253
- await u(async () => {
254
- await v.readLocations(), await r.read("PROMOTION");
255
- });
256
- }), (e, o) => {
257
- const m = d("FmPageHead"), l = d("FmSearch"), x = d("FmTable"), Y = d("FmChip"), O = d("FmButton"), Z = d("FmListItem"), ee = d("FmList"), oe = d("FmCard");
258
- return f(), L(B, null, [
259
- c(m, {
260
- title: a(n)("connect.promotion.title"),
261
- actions: a(g).length > 0 ? [R, p, _] : [],
262
- "onClick:action": X
263
- }, null, 8, ["title", "actions"]),
264
- i("div", we, [
265
- c(l, {
266
- modelValue: s.value.searchKey,
267
- "onUpdate:modelValue": o[0] || (o[0] = (t) => s.value.searchKey = t),
268
- class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
269
- placeholder: a(n)("connect.promotion.search"),
270
- collapsible: ""
271
- }, null, 8, ["modelValue", "placeholder"]),
272
- a(g) && a(g).length > 0 ? (f(), L(B, { key: 0 }, [
273
- i("div", ve, [
274
- i("div", Ce, [
275
- c(E, {
276
- label: `${a(n)("connect.common.location")}: `,
277
- "right-icon": "keyboard_arrow_down",
278
- modelValue: s.value.location,
279
- "onUpdate:modelValue": o[1] || (o[1] = (t) => s.value.location = t),
280
- icon: "storefront",
281
- "show-item-label": !0,
282
- items: a(v).locationOptions
283
- }, null, 8, ["label", "modelValue", "items"]),
284
- c(E, {
285
- label: "Type:",
286
- "right-icon": "keyboard_arrow_down",
287
- modelValue: s.value.effectType,
288
- "onUpdate:modelValue": o[2] || (o[2] = (t) => s.value.effectType = t),
289
- icon: "filter_list",
290
- "show-item-label": !0,
291
- items: T
292
- }, null, 8, ["modelValue"])
293
- ]),
294
- c(l, {
295
- modelValue: s.value.searchKey,
296
- "onUpdate:modelValue": o[3] || (o[3] = (t) => s.value.searchKey = t),
297
- class: "xs:hidden sm:hidden",
298
- placeholder: "search",
299
- collapsible: ""
300
- }, null, 8, ["modelValue"])
301
- ]),
302
- c(x, {
303
- class: "xs:hidden sm:hidden",
304
- "row-data": a(g),
305
- "column-defs": J,
306
- "search-value": s.value.searchKey,
307
- "column-filter": [],
308
- onRowClick: o[4] || (o[4] = (t) => C(t.original)),
309
- "hide-footer": a(g).length < 10
310
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
311
- c(ee, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
312
- default: k(() => [
313
- (f(!0), L(B, null, se(a(g).filter(
314
- (t) => t.name.toLowerCase().includes(s.value.searchKey.toLowerCase())
315
- ), (t) => (f(), S(Z, {
316
- key: t._id.toString(),
317
- onClick: (F) => C(t),
318
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
319
- }, {
320
- default: k(() => [
321
- i("div", xe, [
322
- i("div", Fe, [
323
- (f(), S(ie(a(q)(t)))),
324
- c(Y, {
325
- class: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
326
- compact: !0,
327
- label: `${a(U).title(t.effect.options.target)} promotion`
328
- }, null, 8, ["label"])
329
- ]),
330
- i("div", Se, [
331
- i("div", ke, h(t.name), 1),
332
- i("div", Pe, h(a(K)(t.effect)), 1),
333
- i("div", Te, h(a(n)("connect.promotion.campaignDate")) + ": " + h(a(j)(t)), 1)
334
- ])
335
- ]),
336
- i("div", Ve, [
337
- c(O, {
338
- icon: "content_copy",
339
- "icon-color": "neutral-gray-400",
340
- variant: "tertiary",
341
- onClick: async (F) => {
342
- F.stopPropagation(), await M(t);
343
- }
344
- }, null, 8, ["onClick"]),
345
- c(O, {
346
- icon: "delete",
347
- "icon-color": "neutral-gray-400",
348
- variant: "tertiary",
349
- onClick: (F) => (F.stopPropagation(), D(t))
350
- }, null, 8, ["onClick"])
351
- ])
352
- ]),
353
- _: 2
354
- }, 1032, ["onClick"]))), 128))
355
- ]),
356
- _: 1
357
- })
358
- ], 64)) : (f(), S(oe, {
359
- key: 1,
360
- variant: "outlined",
361
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
362
- }, {
363
- default: k(() => [
364
- o[6] || (o[6] = i("img", {
365
- src: re,
366
- class: "aspect-square w-[150px]"
367
- }, null, -1)),
368
- i("div", Oe, [
369
- i("div", Ie, h(a(n)("connect.promotion.createPromotionCampaign")), 1),
370
- i("div", Le, h(a(n)("connect.promotion.description")), 1)
371
- ]),
372
- c(O, {
373
- variant: "primary",
374
- label: a(n)("connect.promotion.createPromotionCampaign"),
375
- icon: "add",
376
- onClick: o[5] || (o[5] = (t) => C())
377
- }, null, 8, ["label"])
378
- ]),
379
- _: 1
380
- }))
381
- ]),
382
- c(ge, {
383
- ref_key: "sheetRef",
384
- ref: V,
385
- "onSubmit:modelValue": W
386
- }, null, 512),
387
- c(be, {
388
- ref_key: "queueSheetRef",
389
- ref: A
390
- }, null, 512)
391
- ], 64);
392
- };
393
- }
394
- });
395
- export {
396
- Ge as default
397
- };