@feedmepos/mf-connect 0.1.124-dev → 0.1.124-prod

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/dist/{App-C7BnLHSt.js → App-DMh2xABv.js} +493 -502
  2. package/dist/{Bin-Bq7yY0I2.js → Bin-C_pkPgIo.js} +8 -8
  3. package/dist/{Broadcast-D52rPmVl.js → Broadcast-6ZJzdY0b.js} +21 -22
  4. package/dist/{CampaignAnalytic-DpiWtzIp.js → CampaignAnalytic-CLd5ecQe.js} +7 -7
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B1eAAN64.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C4OWhhAx.js} +9 -8
  6. package/dist/{Card-BQc7vud2.js → Card-CkS8F43U.js} +22 -22
  7. package/dist/{Collections--VzkneGp.js → Collections-BA9I-dDz.js} +185 -197
  8. package/dist/{Credit-DhfAcw-p.js → Credit-CXm0A-qe.js} +20 -21
  9. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-D2Csdg-3.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DzsHTlrN.js} +1 -1
  10. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C5INV6R7.js +3493 -0
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Cr2_XbyY.js → EffectSheet.vue_vue_type_style_index_0_lang-zSPUBUSz.js} +16 -16
  12. package/dist/{Experience-CUwbHfo5.js → Experience-Bq4ykqTJ.js} +31 -32
  13. package/dist/{FileSaver.min-DvZpiwMd.js → FileSaver.min-BtBxrIBi.js} +1 -1
  14. package/dist/{Game-CI5-y0JJ.js → Game-DpLFmP-G.js} +18 -19
  15. package/dist/{GiftCardSetup-CGacqQ0j.js → GiftCardSetup-BqOqEUim.js} +31 -31
  16. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-B6POxDLJ.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-B06xj5q7.js} +7 -7
  17. package/dist/{Goals-fqJY9iMx.js → Goals-DMlNeiUc.js} +4 -4
  18. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DTKf7uR-.js → ImageInput.vue_vue_type_script_setup_true_lang-DPWRgxG_.js} +1 -1
  19. package/dist/{Index-CT1Gnjsv.js → Index-Cw07jj0k.js} +10 -10
  20. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BRQ12Yum.js → LocationPicker.vue_vue_type_script_setup_true_lang-CLjjquVP.js} +1 -1
  21. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BRzuWJ1Y.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DHOShJQp.js} +1 -1
  22. package/dist/{LoyaltyDashboard-IJIDEBWf.js → LoyaltyDashboard-DzSiK6M7.js} +15 -15
  23. package/dist/{MainLayout-BMghr-wf.js → MainLayout-1EF680_j.js} +1 -1
  24. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-BitJKgvd.js → MainLayout.vue_vue_type_script_setup_true_lang-Df9pBgH9.js} +3 -3
  25. package/dist/{Marketing-Ckr9cp3w.js → Marketing-T-epFsvG.js} +4 -4
  26. package/dist/{MarketingMaterialEdit-BIZnE8CY.js → MarketingMaterialEdit-CVhPfyEp.js} +211 -214
  27. package/dist/{Member-d1nPxr74.js → Member-BUZOPyQR.js} +7 -7
  28. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-zURjtl1z.js +1308 -0
  29. package/dist/{MemberImportHistory-CxX9iYhV.js → MemberImportHistory-DGz9i6L7.js} +7 -7
  30. package/dist/{MemberList-DUzYpxhj.js → MemberList-CNdSrzBa.js} +105 -103
  31. package/dist/{MemberTransactions-BFM3ybeo.js → MemberTransactions-CdQMuQsd.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-B5j0YBix.js → MessageInput.vue_vue_type_script_setup_true_lang-CWKVXeCa.js} +12 -12
  33. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DsSHSbBB.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-xZitIoXE.js} +1 -1
  34. package/dist/{Mission-De9BF5wb.js → Mission-CYxgMBPt.js} +21 -22
  35. package/dist/{Overview-Pmxqv6qp.js → Overview-DSm8AfDB.js} +20 -20
  36. package/dist/{Overview-DeHo3gef.js → Overview-qZ1KKw9D.js} +144 -145
  37. package/dist/{Point-DE_Cc85N.js → Point-BGlbT9OK.js} +21 -22
  38. package/dist/{Promotion-cZDzgho4.js → Promotion-CtlrUFa8.js} +131 -137
  39. package/dist/{Queue-DmDbrtTk.js → Queue-Dc_z9MKc.js} +45 -45
  40. package/dist/{Record-uxNNOvmK.js → Record-DVKrhFwJ.js} +9 -9
  41. package/dist/{Review-CIIn_Bdx.js → Review-Bh8Tw_QU.js} +2 -2
  42. package/dist/ReviewFacebookCallback-ZZ0pxplM.js +238 -0
  43. package/dist/{ReviewGoogleCallback-B7kmGwb_.js → ReviewGoogleCallback-CsSCz_C5.js} +5 -5
  44. package/dist/{Reward-Bj1snFu8.js → Reward-DY1Q3m1w.js} +16 -16
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BO-36dE4.js → RewardGroup.vue_vue_type_script_setup_true_lang-4A91EkSW.js} +13 -13
  46. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-JA0XIgqb.js +1884 -0
  47. package/dist/{Segment-BgJgWa6C.js → Segment-D6LchJFl.js} +306 -303
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-D2TDoZgQ.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CSAtkMnJ.js} +14 -14
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CEBH11hR.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-Co1MQoVq.js} +4 -4
  50. package/dist/Setting-UkdSKiUb.js +578 -0
  51. package/dist/{SettingAdvertisements-vdUtIXwC.js → SettingAdvertisements-DK97gcus.js} +12 -12
  52. package/dist/Settings-BFcVswDS.js +179 -0
  53. package/dist/{Store-DgltT0RA.js → Store-2VVStL5_.js} +28 -28
  54. package/dist/{StoreRewards-BXH_5cYL.js → StoreRewards-f3Pyb9hu.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BmnyPSVT.js +1297 -0
  56. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CCWNzg4p.js +142 -0
  57. package/dist/{Tier-CqfHGUX0.js → Tier-D4Of9P17.js} +687 -2575
  58. package/dist/{Title-B5VnUNiS.js → Title-Cg6X9UkB.js} +94 -95
  59. package/dist/{Transaction-BZh1Q9Lj.js → Transaction-LJbjQnj_.js} +2 -2
  60. package/dist/Upselling-B-VwbtjT.js +214 -0
  61. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Buj7CRlQ.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DqH6Upx-.js} +26 -26
  62. package/dist/{Voucher-CZJdV2Ok.js → Voucher-BJG6VKXt.js} +19 -19
  63. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-65x2VrpD.js → VoucherEditor.vue_vue_type_script_setup_true_lang-7kYeJthi.js} +12 -12
  64. package/dist/{WhatsappAccount-DsRilNC5.js → WhatsappAccount-Dc1fJWWj.js} +6 -6
  65. package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-Bn26qwx5.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BV0Bsl7a.js} +1 -1
  66. package/dist/{WhatsappBot-CpzMaTss.js → WhatsappBot-Coq1WP96.js} +6 -6
  67. package/dist/{WhatsappBotLogs-DRF8VufQ.js → WhatsappBotLogs-EH9PQVn9.js} +6 -6
  68. package/dist/{WhatsappBotSettings-DSUPGC-p.js → WhatsappBotSettings-fNRFecJX.js} +4 -4
  69. package/dist/{WhatsappLayout-BCWYcQmD.js → WhatsappLayout-x9Ovpu6e.js} +3 -3
  70. package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DyxyISRP.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DZlT0uLW.js} +3 -3
  71. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Db-Z7cY_.js → ZodTextField.vue_vue_type_script_setup_true_lang-DSJncfI_.js} +2 -2
  72. package/dist/{app-BQeODViN.js → app-BMFxxLUm.js} +15017 -14861
  73. package/dist/app.js +3 -4
  74. package/dist/{base.export-kSFLDDoC.js → base.export-LmQ51u5f.js} +2 -2
  75. package/dist/{business-EP-Do3Ew.js → business-DZWViiMC.js} +1 -1
  76. package/dist/{campaign-BjnUPowX.js → campaign-C9xvGyrL.js} +28 -34
  77. package/dist/{campaign-C8GgaCub.js → campaign-DZDGbR4W.js} +94 -121
  78. package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-BqekIiiN.js} +1 -2
  79. package/dist/{campaign.fn-DQ--gL4B.js → campaign.fn-OVkj0QLu.js} +87 -87
  80. package/dist/{collection.fn-BhXecwh5.js → collection.fn-DrNrla0B.js} +2 -2
  81. package/dist/{currency-CGMNh1Q_.js → currency-BZv2gSlF.js} +1 -1
  82. package/dist/{effect-Bc6oGIWd.js → effect-CvumfBMY.js} +1 -1
  83. package/dist/{email-addresses-B3KWfUMk.js → email-addresses-79tPeI4j.js} +25 -25
  84. package/dist/{feature-flag-HhjvSuDm.js → feature-flag-CYXnrECh.js} +185 -171
  85. package/dist/google-C3S8u0mT.js +4 -0
  86. package/dist/{helper-D1BYvcED.js → helper-DFjsyjri.js} +1 -1
  87. package/dist/{index-GQv1_jaJ.js → index-B_8PAyia.js} +2 -2
  88. package/dist/{index-C-46QHFh.js → index-Ba1t5vQv.js} +234 -380
  89. package/dist/{index-Yw4M7v7m.js → index-BiPRZRyE.js} +2614 -2699
  90. package/dist/{index-BkevK_Hp.js → index-Bnane9cm.js} +1 -1
  91. package/dist/{index-VLFerh-X.js → index-Bt-n8QuD.js} +10 -10
  92. package/dist/{index-VyoufKYY.js → index-C-pVo6PI.js} +1 -1
  93. package/dist/{index-CsYTLmPa.js → index-C43KoLej.js} +4 -4
  94. package/dist/{index-DeqpfWLa.js → index-C5bC2n8X.js} +3 -3
  95. package/dist/{index-Br2SLVsn.js → index-C6Rx7pjc.js} +251 -608
  96. package/dist/{index-BIBcfAw5.js → index-C6ZTa-eq.js} +1 -1
  97. package/dist/{index-gMrtUwSD.js → index-CA7oIW_T.js} +316 -316
  98. package/dist/{index-Bunp1bt_.js → index-CAWnce4u.js} +1 -1
  99. package/dist/{index-cPPWotJe.js → index-CBd91xYU.js} +10 -10
  100. package/dist/{index-C3MK8Twg.js → index-CNzQ3FLi.js} +1 -1
  101. package/dist/{index-Ptcqv0W6.js → index-CW4rNV1_.js} +2 -2
  102. package/dist/{index-DOSuhtdE.js → index-CcCiEG6N.js} +1 -1
  103. package/dist/{index-DiCgGQoC.js → index-DWZzsJHU.js} +2 -2
  104. package/dist/{index-oIo5Cful.js → index-DZrX13oF.js} +462 -533
  105. package/dist/{index-D2TnjKPP.js → index-MhAbTpBy.js} +23 -23
  106. package/dist/{index-DCC3pLug.js → index-_-nCOZ1D.js} +6 -19
  107. package/dist/{index.esm2017-DUZpLdEB.js → index.esm2017-DtTjnHHc.js} +57 -57
  108. package/dist/{loading-DhpcQgdj.js → loading-DkqEFbrR.js} +1 -1
  109. package/dist/{lodash-r4AR7GJC.js → lodash-BxU_5gPB.js} +1 -1
  110. package/dist/{member-import-CogEef9H.js → member-import-B3NBqSF6.js} +1 -1
  111. package/dist/{membership-BQFkjRjs.js → membership-Dr5BxoL-.js} +2 -2
  112. package/dist/{money-Ifqd4pyC.js → money-D58xuACG.js} +1 -1
  113. package/dist/{number-C9Tw_Ncm.js → number-C9CiD5ci.js} +1 -1
  114. package/dist/objectid-CgTtbB6Q.js +145 -0
  115. package/dist/{onboarding-D4dm_rxU.js → onboarding-BssUSfGQ.js} +36 -36
  116. package/dist/{onboardingSetup-DtNZUoRr.js → onboardingSetup-Dc_lD-K8.js} +2 -2
  117. package/dist/{plugins-DGI9Fkiu.js → plugins-D7Xjefvk.js} +3 -3
  118. package/dist/{reward-DTtejZqM.js → reward-CACqYkQp.js} +1 -1
  119. package/dist/{rule-C4N3ce3c.js → rule-BRaTrwKz.js} +492 -572
  120. package/dist/rule-builder-DZOASGFD.js +102 -0
  121. package/dist/style.css +1 -1
  122. package/dist/template-DdeVPIBt.js +275 -0
  123. package/dist/{timezone-5rYhX7XZ.js → timezone-CgVEOC5i.js} +1 -1
  124. package/dist/{transaction.fn-Ba_U7HdT.js → transaction.fn-C64l_ja_.js} +2 -2
  125. package/dist/{trigger-B8I1aO6Y.js → trigger-d2RIqXLt.js} +9 -9
  126. package/dist/{useMarketingMaterialActions-CTOFHmlL.js → useMarketingMaterialActions-Drf2MY9h.js} +4 -4
  127. package/dist/{usePagination-3wAPVCOp.js → usePagination-IUw34YLE.js} +1 -1
  128. package/dist/{user-Ds4DW_-Y.js → user-ClGyYHyS.js} +1 -1
  129. package/dist/vue-i18n-Cby9s0nj.js +2365 -0
  130. package/dist/{xlsx-xlOCvuAq.js → xlsx-HvtVSofi.js} +166 -166
  131. package/dist/{zod-GVNjvrpT.js → zod-IPdjFU_b.js} +1 -1
  132. package/package.json +2 -6
  133. package/dist/AuditLogs-BPKQdFga.js +0 -2016
  134. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DFz_2GZ1.js +0 -4439
  135. package/dist/Grab-CAx1cCE4.js +0 -301
  136. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DI4XM_rJ.js +0 -1281
  137. package/dist/ReviewFacebookCallback-CO6FxHzc.js +0 -225
  138. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-b7ZEMd4s.js +0 -1923
  139. package/dist/Setting-DpEI72mW.js +0 -574
  140. package/dist/Settings-C6yJ1WEB.js +0 -286
  141. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DqlluwMB.js +0 -1319
  142. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DjCO9U0c.js +0 -7007
  143. package/dist/Upselling-Cf24ub-9.js +0 -1055
  144. package/dist/duplicateCampaign-icqF8Na9.js +0 -51
  145. package/dist/google-BQK68wbe.js +0 -5
  146. package/dist/objectid-D7dqM1a3.js +0 -145
  147. package/dist/template-YhWRyNGp.js +0 -227
  148. package/dist/vue-i18n-Bqlt_-jA.js +0 -2365
@@ -1,301 +0,0 @@
1
- import { defineComponent as q, ref as L, computed as z, h as J, onMounted as Q, resolveComponent as u, openBlock as f, createElementBlock as k, Fragment as F, createVNode as l, unref as i, withCtx as x, createElementVNode as m, renderList as W, createBlock as O, resolveDynamicComponent as X, toDisplayString as Y } from "vue";
2
- import { _ as Z } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as ee, components as te } from "@feedmepos/ui-library";
4
- import { p as P } from "./plugins-DGI9Fkiu.js";
5
- import { u as oe } from "./loading-DhpcQgdj.js";
6
- import { u as ne } from "./business-EP-Do3Ew.js";
7
- import { u as ae } from "./campaign-BjnUPowX.js";
8
- import { u as re } from "./vue-i18n-Bqlt_-jA.js";
9
- import { h as d } from "./moment-D7p2TMB-.js";
10
- import { a as se, b as V } from "./campaign-C8GgaCub.js";
11
- import { s as ie, _ as ce } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DFz_2GZ1.js";
12
- import { u as le } from "./template-YhWRyNGp.js";
13
- import { _ as $ } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
14
- import { c as C } from "./index-GQv1_jaJ.js";
15
- const me = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-center justify-between w-full" }, de = { class: "flex gap-8 overflow-x-auto" }, pe = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = /* @__PURE__ */ q({
16
- __name: "Grab",
17
- setup(_e) {
18
- const { t: o } = re(), I = {
19
- label: o("connect.grab.createCampaign"),
20
- value: "create",
21
- isPrimary: !0,
22
- prependIcon: "add"
23
- }, A = le("GRAB", ee()), S = ne(), g = ae(), { global: R, minor: T } = oe, K = [
24
- {
25
- label: "Bill promotion",
26
- value: "BILL"
27
- },
28
- {
29
- label: "Item promotion",
30
- value: "ITEM"
31
- }
32
- ], c = L({
33
- searchKey: "",
34
- location: [],
35
- effectType: []
36
- });
37
- function E(e) {
38
- const t = c.value.location;
39
- return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((a) => {
40
- var s;
41
- return (s = e == null ? void 0 : e.targetLocation) == null ? void 0 : s.includes(a);
42
- }) : e.targetLocation.includes(t);
43
- }
44
- function j(e) {
45
- var s, r;
46
- const t = c.value.effectType;
47
- if (!t || t.length === 0) return !0;
48
- const a = (r = (s = e.effect) == null ? void 0 : s.options) == null ? void 0 : r.target;
49
- return t.includes(a);
50
- }
51
- const p = z(
52
- () => g.campaigns.grab.filter(
53
- (e) => E(e) && j(e)
54
- )
55
- ), G = [
56
- {
57
- header: o("connect.grab.promotionTitle"),
58
- accessorFn: (e) => e.name
59
- },
60
- {
61
- header: o("connect.grab.period"),
62
- accessorFn: (e) => {
63
- const t = d(e.timeframeOptions.start).format("DD/MM/YYYY"), a = d(e.timeframeOptions.end).format("DD/MM/YYYY");
64
- return `${t} - ${a}`;
65
- }
66
- },
67
- {
68
- header: o("connect.grab.status"),
69
- accessorFn: (e) => se(e),
70
- cell(e) {
71
- return V(e.row.original);
72
- }
73
- },
74
- {
75
- header: o("connect.grab.summary"),
76
- cell(e) {
77
- const t = ie(e.row.original.discount);
78
- return t ? `${t.type} - ${t.adjustment}` : "-";
79
- }
80
- },
81
- {
82
- header: o("connect.grab.actions"),
83
- cell(e) {
84
- return J(te.FmButton, {
85
- variant: "tertiary",
86
- icon: "delete",
87
- iconColor: "neutral-gray-400",
88
- onClick: (t) => {
89
- t.stopPropagation(), D(e.row.original);
90
- }
91
- });
92
- }
93
- }
94
- ], B = L();
95
- async function D(e) {
96
- await P.remove(o("connect.grab.confirmRemove", { name: e.name })) && await T(
97
- async () => {
98
- await C.delete(e._id), await g.read("PROMOTION");
99
- },
100
- {
101
- message: o("connect.grab.removing", { name: e.name }),
102
- successMessage: o("connect.grab.removedSuccessfully", {
103
- name: e.name
104
- })
105
- }
106
- );
107
- }
108
- async function b(e) {
109
- e ? await t() : A.open(async (a) => {
110
- await t(a);
111
- });
112
- async function t(a) {
113
- var s;
114
- (s = B.value) == null || s.showSheet(
115
- !0,
116
- "GRAB",
117
- e ? await C.readById(e._id) : void 0,
118
- a
119
- );
120
- }
121
- }
122
- async function N(e) {
123
- var a;
124
- const t = await U(e.campaign);
125
- if (t.length > 0) {
126
- const s = t.map(
127
- (r) => `"${r.name}" (${d(r.timeframeOptions.start).format("DD/MM/YYYY")} - ${d(r.timeframeOptions.end).format("DD/MM/YYYY")})`
128
- ).join(`
129
- `);
130
- return await ((a = P.dialog) == null ? void 0 : a.open({
131
- title: o("connect.grab.conflictDetected"),
132
- message: o("connect.grab.conflictMessage", {
133
- conflicts: s
134
- }),
135
- closeButton: !0,
136
- overlay: !0,
137
- primaryActions: {
138
- close: !0,
139
- text: "OK"
140
- }
141
- })), !1;
142
- }
143
- await T(
144
- async () => (e.campaign._id ? await C.update(e.campaign._id, e) : await C.create(e), await g.read("PROMOTION"), !0),
145
- {
146
- message: o(
147
- e.campaign._id ? "connect.grab.updating" : "connect.grab.creating"
148
- ),
149
- successMessage: o(
150
- e.campaign._id ? "connect.grab.updatedSuccessfully" : "connect.grab.createdSuccessfully"
151
- )
152
- }
153
- );
154
- }
155
- async function U(e) {
156
- const t = g.campaigns.grab, a = [], s = !!e._id;
157
- for (const r of t) {
158
- if (s && r._id === e._id) continue;
159
- const _ = d(e.timeframeOptions.start), y = d(e.timeframeOptions.end), h = d(r.timeframeOptions.start), v = d(r.timeframeOptions.end);
160
- if (_.isBefore(v) && y.isAfter(h) || h.isBefore(y) && v.isAfter(_)) {
161
- const n = e.discount, w = r.discount;
162
- n.scope.type === w.scope.type && a.push(r);
163
- }
164
- }
165
- return a;
166
- }
167
- async function H(e) {
168
- switch (e) {
169
- case "create":
170
- b();
171
- break;
172
- }
173
- }
174
- return Q(async () => {
175
- await R(async () => {
176
- await S.readLocations(), await g.read("PROMOTION");
177
- });
178
- }), (e, t) => {
179
- const a = u("FmPill"), s = u("FmPageHead"), r = u("FmSearch"), _ = u("FmTable"), y = u("FmButton"), h = u("FmListItem"), v = u("FmList"), M = u("FmCard");
180
- return f(), k(F, null, [
181
- l(s, {
182
- title: i(o)("connect.grab.title"),
183
- actions: i(p).length > 0 ? [I] : [],
184
- "onClick:action": H
185
- }, {
186
- prepend: x(() => [
187
- l(a, { variant: "beta" }),
188
- l(a, { variant: "premium" })
189
- ]),
190
- _: 1
191
- }, 8, ["title", "actions"]),
192
- m("div", me, [
193
- l(r, {
194
- modelValue: c.value.searchKey,
195
- "onUpdate:modelValue": t[0] || (t[0] = (n) => c.value.searchKey = n),
196
- class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
197
- placeholder: i(o)("connect.grab.search"),
198
- collapsible: ""
199
- }, null, 8, ["modelValue", "placeholder"]),
200
- i(p) && i(p).length > 0 ? (f(), k(F, { key: 0 }, [
201
- m("div", ue, [
202
- m("div", de, [
203
- l($, {
204
- label: `${i(o)("connect.common.location")}: `,
205
- "right-icon": "keyboard_arrow_down",
206
- modelValue: c.value.location,
207
- "onUpdate:modelValue": t[1] || (t[1] = (n) => c.value.location = n),
208
- icon: "storefront",
209
- "show-item-label": !0,
210
- items: i(S).locationOptions
211
- }, null, 8, ["label", "modelValue", "items"]),
212
- l($, {
213
- label: "Type:",
214
- "right-icon": "keyboard_arrow_down",
215
- modelValue: c.value.effectType,
216
- "onUpdate:modelValue": t[2] || (t[2] = (n) => c.value.effectType = n),
217
- icon: "filter_list",
218
- "show-item-label": !0,
219
- items: K
220
- }, null, 8, ["modelValue"])
221
- ]),
222
- l(r, {
223
- modelValue: c.value.searchKey,
224
- "onUpdate:modelValue": t[3] || (t[3] = (n) => c.value.searchKey = n),
225
- class: "xs:hidden",
226
- placeholder: "search",
227
- collapsible: ""
228
- }, null, 8, ["modelValue"])
229
- ]),
230
- l(_, {
231
- class: "xs:hidden",
232
- "row-data": i(p),
233
- "column-defs": G,
234
- "search-value": c.value.searchKey,
235
- "column-filter": [],
236
- onRowClick: t[4] || (t[4] = (n) => b(n.original)),
237
- "hide-footer": i(p).length < 10
238
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
239
- l(v, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
240
- default: x(() => [
241
- (f(!0), k(F, null, W(i(p).filter(
242
- (n) => n.name.toLowerCase().includes(c.value.searchKey.toLowerCase())
243
- ), (n) => (f(), O(h, {
244
- key: n._id.toString(),
245
- onClick: (w) => b(n),
246
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
247
- }, {
248
- default: x(() => [
249
- m("div", pe, [
250
- m("div", fe, [
251
- (f(), O(X(i(V)(n))))
252
- ])
253
- ]),
254
- l(y, {
255
- icon: "delete",
256
- "icon-color": "neutral-gray-400",
257
- variant: "tertiary",
258
- onClick: (w) => (w.stopPropagation(), D(n))
259
- }, null, 8, ["onClick"])
260
- ]),
261
- _: 2
262
- }, 1032, ["onClick"]))), 128))
263
- ]),
264
- _: 1
265
- })
266
- ], 64)) : (f(), O(M, {
267
- key: 1,
268
- variant: "outlined",
269
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
270
- }, {
271
- default: x(() => [
272
- t[6] || (t[6] = m("img", {
273
- src: Z,
274
- class: "aspect-square w-[150px]"
275
- }, null, -1)),
276
- m("div", ge, [
277
- m("div", ye, Y(i(o)("connect.grab.createPromotionCampaign")), 1),
278
- m("div", be, Y(i(o)("connect.grab.description")), 1)
279
- ]),
280
- l(y, {
281
- variant: "primary",
282
- label: i(o)("connect.grab.createPromotionCampaign"),
283
- icon: "add",
284
- onClick: t[5] || (t[5] = (n) => b())
285
- }, null, 8, ["label"])
286
- ]),
287
- _: 1
288
- }))
289
- ]),
290
- l(ce, {
291
- ref_key: "sheetRef",
292
- ref: B,
293
- "onSubmit:modelValue": N
294
- }, null, 512)
295
- ], 64);
296
- };
297
- }
298
- });
299
- export {
300
- Pe as default
301
- };