@feedmepos/mf-connect 0.1.98-beta.73 → 0.1.98-beta.75

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 (128) hide show
  1. package/dist/{App-C4XD_vWL.js → App-BU-KKX-n.js} +550 -526
  2. package/dist/{AuditLogs-DpevHGsA.js → AuditLogs-CmLqBgj6.js} +15 -13
  3. package/dist/{Bin-FRrYZ8pV.js → Bin-Zbera_MK.js} +8 -8
  4. package/dist/{Broadcast-CoefxWt-.js → Broadcast-CYgMTWI5.js} +89 -86
  5. package/dist/{CampaignAnalytic-CdZjzsLr.js → CampaignAnalytic-UNTkez3N.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DQOLEDzY.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CfaXdAeW.js} +8 -6
  7. package/dist/{Card-BABL96V6.js → Card-CdoDOGUZ.js} +25 -23
  8. package/dist/{Collections-D6XuhBO1.js → Collections-CdeMQQCd.js} +8 -8
  9. package/dist/{Credit-D2WTeN8Z.js → Credit-BAP0k14-.js} +12 -12
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-B0KkvFWi.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CBn5qXw2.js} +1 -1
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-G2oU70Ef.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bk9ZmCSP.js} +38 -35
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-C4RByg0k.js → EffectSheet.vue_vue_type_style_index_0_lang-OUHg9s8b.js} +6 -6
  13. package/dist/{Experience-CUqmspwT.js → Experience-Dq4FXfGp.js} +87 -84
  14. package/dist/{FileSaver.min-DX17A8Gj.js → FileSaver.min-CCrEHqr_.js} +1 -1
  15. package/dist/{Game-D8IvyDdA.js → Game-BjgPoHzZ.js} +13 -13
  16. package/dist/{GiftCardSetup-BOSKBH8c.js → GiftCardSetup-CLKjBRXP.js} +10 -10
  17. package/dist/GoalPickerPanel.vue_vue_type_script_setup_true_lang-zCMcelvk.js +417 -0
  18. package/dist/Goals-B_DvaaRc.js +244 -0
  19. package/dist/{Grab-CnBGt_H2.js → Grab-C9QKHF9-.js} +9 -9
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BI00YCKv.js → ImageInput.vue_vue_type_script_setup_true_lang-CYoMZ7Rd.js} +1 -1
  21. package/dist/{Index-BovDOTbf.js → Index-DjyD4Ukt.js} +10 -10
  22. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-D8auavm7.js → LocationPicker.vue_vue_type_script_setup_true_lang-D32lT_JS.js} +1 -1
  23. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BM99IoIG.js → LottieAnimation.vue_vue_type_script_setup_true_lang-C8pCFjzw.js} +1 -1
  24. package/dist/{LoyaltyDashboard-DiCQnQ76.js → LoyaltyDashboard-gEfgYtBH.js} +1213 -1170
  25. package/dist/{MainLayout-Cg37dK-P.js → MainLayout-BZd3nvw4.js} +3 -3
  26. package/dist/{Marketing-DRCT9dBo.js → Marketing-vXzXx-ht.js} +4 -4
  27. package/dist/{MarketingMaterialEdit-DcE0A8_A.js → MarketingMaterialEdit-CodE48Pa.js} +6 -6
  28. package/dist/{Member-C8T1-ywK.js → Member-DmjIle-d.js} +7 -7
  29. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-CTl8LtJ9.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-BkOC-rzc.js} +27 -25
  30. package/dist/{MemberImportHistory-CYCxxxN7.js → MemberImportHistory-Ds92Kmv3.js} +7 -7
  31. package/dist/{MemberList-Ddlnm4JX.js → MemberList-DRAygZjh.js} +14 -14
  32. package/dist/{MemberTransactions-DwyZTeZb.js → MemberTransactions-COQKjSaO.js} +1 -1
  33. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BWCxGlQO.js → MessageInput.vue_vue_type_script_setup_true_lang-C1N1Q9KC.js} +10 -10
  34. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-LdVeH7gh.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-hUZ6DRV3.js} +1 -1
  35. package/dist/{Mission-CW0y8Bzw.js → Mission-DVEvVeg9.js} +84 -81
  36. package/dist/{Overview-i2XPL7Pu.js → Overview-Lb2EDuKr.js} +4 -4
  37. package/dist/{Overview-CO4T3l6l.js → Overview-dKPDCTby.js} +23 -21
  38. package/dist/{Point-CNWdfqQZ.js → Point-HERJxwkG.js} +108 -99
  39. package/dist/{Promotion-DAemCP79.js → Promotion-C1O48NJ4.js} +96 -93
  40. package/dist/{Queue-DI50gMny.js → Queue-CIlcqlHV.js} +15 -13
  41. package/dist/{Record-DX3WHXku.js → Record-CbAQRpe2.js} +9 -9
  42. package/dist/{Review-DzSNG4Le.js → Review-C_aPrryB.js} +2 -2
  43. package/dist/{ReviewFacebookCallback-CrdRUN3t.js → ReviewFacebookCallback-zLjyKeV8.js} +5 -5
  44. package/dist/{ReviewGoogleCallback-Da28WNzU.js → ReviewGoogleCallback-DzJFf6UO.js} +5 -5
  45. package/dist/{Reward-DUQAE99I.js → Reward-kLTp1_Ph.js} +16 -16
  46. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BGAOPkwD.js → RewardGroup.vue_vue_type_script_setup_true_lang-dzsAihqZ.js} +26 -24
  47. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-B9Dbe9no.js → RuleGroup.vue_vue_type_script_setup_true_lang-BQDwwF1P.js} +17 -15
  48. package/dist/{Segment-BgVf2-G2.js → Segment-Blo6pvlP.js} +35 -32
  49. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DDLXF5HM.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DI2f-icN.js} +31 -29
  50. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-9UiH43em.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRYqib7b.js} +4 -4
  51. package/dist/Setting-BqfHAaJ4.js +573 -0
  52. package/dist/{SettingAdvertisements-C40QcuSn.js → SettingAdvertisements-BBWGPfr6.js} +12 -12
  53. package/dist/{Settings-DT9bypKs.js → Settings-xIvDU54B.js} +5 -5
  54. package/dist/{Store-DQyOUfEJ.js → Store-B4LKdCMI.js} +30 -27
  55. package/dist/{StoreRewards-Dr_c0PbO.js → StoreRewards-DioYcpoB.js} +15 -15
  56. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Bh5h8Lc_.js → StoreTransactions.vue_vue_type_script_setup_true_lang-D8Aomf51.js} +45 -43
  57. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-LquvtnTy.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-zau-k4F2.js} +2 -2
  58. package/dist/{Tier-DmqfEWcB.js → Tier-Byj8iaqs.js} +915 -922
  59. package/dist/{Title-Dx6pcJfP.js → Title-B47H9-3j.js} +25 -23
  60. package/dist/{Transaction-CD6agt6m.js → Transaction-Dv5d9njL.js} +2 -2
  61. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CNjBtitb.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BuitfoqE.js} +6 -6
  62. package/dist/Voucher-Cxz8pkd-.js +837 -0
  63. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Bv--fzY0.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CyF6pfdh.js} +12 -12
  64. package/dist/WhatsappBot-DEt2cwdQ.js +577 -0
  65. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Bq_7U0NO.js → ZodTextField.vue_vue_type_script_setup_true_lang-CoxyeE0y.js} +2 -2
  66. package/dist/{app-CmqX1V1B.js → app-Cy05FPyq.js} +1471 -918
  67. package/dist/app.js +1 -1
  68. package/dist/{base.export-guVE-B2c.js → base.export-CtX7g_L1.js} +2 -2
  69. package/dist/browser-BSAOEeIM.js +1478 -0
  70. package/dist/{business-DXmGtwPm.js → business-DwhrC6ZF.js} +1 -1
  71. package/dist/{campaign-CVXbgs-y.js → campaign-BPm7kwff.js} +2 -2
  72. package/dist/{campaign-D9Jufumh.js → campaign-RHNw7ITA.js} +9 -9
  73. package/dist/{campaign.enum-CXhYMbkx.js → campaign.enum-Dx-Zo68Q.js} +1 -1
  74. package/dist/{campaign.fn-DoJPn6yl.js → campaign.fn-Bg4cy9as.js} +77 -77
  75. package/dist/{collectible.enum-Tk6LIMMm.js → collectible.enum-Liy2wH3s.js} +1 -1
  76. package/dist/{collection.fn-DCVNYQau.js → collection.fn-TRu13bwb.js} +2 -2
  77. package/dist/{currency-BYhkCI6F.js → currency-B8eK9hdV.js} +1 -1
  78. package/dist/{duplicateCampaign-BOVBZHFs.js → duplicateCampaign-CGXCaVuj.js} +2 -2
  79. package/dist/{effect-e6wYWgc8.js → effect-OZ5p9rDk.js} +1 -1
  80. package/dist/{email-addresses-Dcd_vAeM.js → email-addresses-BZjfvPMn.js} +2 -2
  81. package/dist/{helper-DluoQ6zi.js → helper-WVL8SABi.js} +1 -1
  82. package/dist/{index-DB51l5yi.js → index-BGpXgY7W.js} +1 -1
  83. package/dist/{index-ChYMoLaB.js → index-BY_JWg4s.js} +1 -1
  84. package/dist/{index-qkkPuNFM.js → index-BrnzIo_o.js} +168 -155
  85. package/dist/{index-C9JY8Ru6.js → index-BzKV72Cd.js} +2 -2
  86. package/dist/index-C7RUAv0i.js +167 -0
  87. package/dist/index-C_H8jFYf.js +2743 -0
  88. package/dist/{index-BFzBAm6P.js → index-CcYZyfxy.js} +1 -1
  89. package/dist/{index-DIP_uzZm.js → index-CdUgMl41.js} +18 -17
  90. package/dist/{index-DoiGG41P.js → index-CicyjdaK.js} +8 -7
  91. package/dist/index-Cp2qabkb.js +28 -0
  92. package/dist/{index-DKrJlWH3.js → index-D5hnwmRx.js} +4 -4
  93. package/dist/{index-CiJQlOu7.js → index-D755ywwR.js} +11 -9
  94. package/dist/{index-CDdNExzM.js → index-DQO1iioy.js} +1 -1
  95. package/dist/{index-C-oypk0K.js → index-DcO-Tg44.js} +8027 -10766
  96. package/dist/{index-SQItAw7w.js → index-Df6TpLRF.js} +3 -3
  97. package/dist/{index-CBRWvjup.js → index-DzNxG_QU.js} +1202 -79
  98. package/dist/{index-2QCDTrA9.js → index-J5zd25r3.js} +2 -2
  99. package/dist/{index-BpAhyOgv.js → index-KakYLwk1.js} +1 -1
  100. package/dist/{index-BAs9N7bi.js → index-MRXHlUhf.js} +20 -19
  101. package/dist/{index-SS72WJs_.js → index-U0xt4ckb.js} +1 -1
  102. package/dist/{index-kPcRcSFx.js → index-co2uO7IC.js} +2 -2
  103. package/dist/{index.esm2017-BLVWhb4f.js → index.esm2017-xVDCuu7s.js} +37 -37
  104. package/dist/{loading-ClX4Z1ZH.js → loading-BiPCW0qK.js} +1 -1
  105. package/dist/{lodash-Cxh2BWuW.js → lodash-P_PMkPFg.js} +1 -1
  106. package/dist/{member-import-DKfSDn0D.js → member-import-Dc0ZuxZn.js} +6 -5
  107. package/dist/{membership-BBAosVNQ.js → membership-GQhLFMct.js} +3 -3
  108. package/dist/{money-CWzvdiFT.js → money-kIVXcKX4.js} +1 -1
  109. package/dist/{number-Cp7TGBzd.js → number-D15D84XS.js} +1 -1
  110. package/dist/{objectid-CXWfUmP_.js → objectid-DbtWoaPC.js} +12 -12
  111. package/dist/onboarding-B9rm_U_k.js +129 -0
  112. package/dist/onboardingSetup-DFET-PDE.js +17 -0
  113. package/dist/{plugins-BKD6oEHa.js → plugins-DrEJvnRW.js} +3 -3
  114. package/dist/{reward-CrjStT4w.js → reward-C8T99546.js} +1 -1
  115. package/dist/{rule-CBZRptRM.js → rule-BB_Uo0iG.js} +20 -18
  116. package/dist/{template-D4qWK9tk.js → template-B7oaySuH.js} +6 -6
  117. package/dist/{timezone-t0WxSk3e.js → timezone-DN2mMeK6.js} +1 -1
  118. package/dist/{transaction.fn-DZp6Drqf.js → transaction.fn-BHBTwOI9.js} +2 -2
  119. package/dist/{trigger-DN5yeimJ.js → trigger-D5xsNhoR.js} +5 -5
  120. package/dist/{useMarketingMaterialActions-ChkZyyRO.js → useMarketingMaterialActions-CKtANGYF.js} +3 -3
  121. package/dist/{usePagination-Vda9U5Dh.js → usePagination-Cxv7buJt.js} +1 -1
  122. package/dist/{user-jEjTV3E6.js → user-CXp-0Sc-.js} +1 -1
  123. package/dist/{vue-i18n-Bg_RJ_GV.js → vue-i18n-DU1J-6Fe.js} +455 -455
  124. package/dist/{xlsx-unW4U5Tx.js → xlsx-CaGnvtHp.js} +224 -224
  125. package/dist/{zod-DIsCEUuE.js → zod-DPK1tAj-.js} +1 -1
  126. package/package.json +1 -1
  127. package/dist/Setting-3jW6EbKA.js +0 -2047
  128. package/dist/Voucher-P4dyOeUd.js +0 -444
@@ -1,444 +0,0 @@
1
- import { defineComponent as ne, ref as T, computed as ae, h as m, onMounted as re, resolveComponent as f, openBlock as d, createElementBlock as P, Fragment as R, createVNode as s, unref as t, createElementVNode as i, withCtx as I, renderList as ie, createBlock as g, resolveDynamicComponent as ce, createCommentVNode as L, toDisplayString as _ } from "vue";
2
- import { _ as se } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as le, components as p } from "@feedmepos/ui-library";
4
- import { _ as N } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
5
- import { c as me, p as ue } from "./plugins-BKD6oEHa.js";
6
- import { useCoreStore as de } from "@feedmepos/mf-common";
7
- import { u as pe } from "./loading-ClX4Z1ZH.js";
8
- import { u as fe } from "./business-DXmGtwPm.js";
9
- import { u as ye } from "./campaign-CVXbgs-y.js";
10
- import { a as he, b as D, c as K } from "./campaign-D9Jufumh.js";
11
- import { c as ge, p as _e } from "./duplicateCampaign-BOVBZHFs.js";
12
- import "./index-SS72WJs_.js";
13
- import { u as ve } from "./template-D4qWK9tk.js";
14
- import { _ as Ce } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-G2oU70Ef.js";
15
- import { _ as we } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-9UiH43em.js";
16
- import { u as be } from "./vue-i18n-Bg_RJ_GV.js";
17
- import { T as ke } from "./trigger-DN5yeimJ.js";
18
- import { useRouter as xe } from "vue-router";
19
- import { c as v } from "./index-2QCDTrA9.js";
20
- import { R as A } from "./app-CmqX1V1B.js";
21
- var Fe = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
22
- const Ve = { class: "px-24 flex flex-col gap-y-16" }, Se = { class: "flex items-center justify-between w-full" }, Ue = { class: "flex gap-8 overflow-x-auto" }, Te = { class: "space-y-8" }, Pe = { class: "flex w-full gap-4 items-center" }, Re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ie = { class: "space-y-4" }, Le = { class: "fm-typo-en-body-lg-600" }, Ae = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ee = { class: "flex gap-8 items-center" }, Be = { class: "flex flex-col gap-16 text-center" }, Oe = { class: "fm-typo-en-title-sm-800" }, Me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, io = /* @__PURE__ */ ne({
23
- __name: "Voucher",
24
- setup(He) {
25
- const { t: a } = be(), j = {
26
- label: a("connect.voucher.createCampaign"),
27
- value: "create",
28
- isPrimary: !0,
29
- prependIcon: "add"
30
- }, E = le(), q = ve("VOUCHER", E), G = fe(), y = ye(), { global: X, minor: B } = pe, k = xe(), l = T({
31
- searchKey: "",
32
- location: [],
33
- triggerType: []
34
- }), C = ae(
35
- () => y.campaigns.voucher.filter(
36
- (e) => z(e) && Q(e)
37
- )
38
- ), W = ke.VOUCHER.map((e) => ({
39
- label: e.name,
40
- value: e.value
41
- }));
42
- function z(e) {
43
- const o = l.value.location;
44
- return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some(
45
- (r) => {
46
- var c;
47
- return (c = e == null ? void 0 : e.targetLocation) == null ? void 0 : c.includes(r);
48
- }
49
- ) : e.targetLocation.includes(o);
50
- }
51
- function x(e) {
52
- return e.hideInApp === !1;
53
- }
54
- function F(e) {
55
- return e.event.type === "SIMPLE_CLAIM" && !x(e);
56
- }
57
- function Q(e) {
58
- const o = l.value.triggerType;
59
- if (!o || o.length === 0) return !0;
60
- const r = e.event.type;
61
- return o.includes(r);
62
- }
63
- const Y = [
64
- {
65
- header: a("connect.voucher.voucherTitle"),
66
- accessorFn: (e) => e.name,
67
- cell(e) {
68
- const o = [e.row.original.name];
69
- return x(e.row.original) && o.push(
70
- m(p.FmChip, {
71
- label: "Feedvibe",
72
- class: "text-fm-color-primary bg-fm-color-system-warning-100",
73
- compact: !0
74
- })
75
- ), m("div", { class: "flex items-center gap-4" }, o);
76
- }
77
- },
78
- {
79
- header: a("connect.voucher.status"),
80
- accessorFn: (e) => he(e),
81
- cell(e) {
82
- return D(e.row.original);
83
- }
84
- },
85
- {
86
- header: a("connect.voucher.summary"),
87
- accessorFn: (e) => K(e)
88
- },
89
- {
90
- header: a("connect.voucher.quota"),
91
- accessorFn: (e) => {
92
- var o;
93
- return ((o = e.pf_collectible) == null ? void 0 : o.options.maxReceive) ?? "Unlimited";
94
- }
95
- },
96
- {
97
- header: a("connect.voucher.claimed"),
98
- accessorFn: (e) => {
99
- var o;
100
- return ((o = e == null ? void 0 : e.pf_collectible) == null ? void 0 : o.currentReceive) ?? 0;
101
- }
102
- },
103
- {
104
- header: a("connect.voucher.actions"),
105
- cell(e) {
106
- return m("div", { class: "flex items-center justify-end" }, [
107
- m(p.FmButton, {
108
- icon: "insights",
109
- variant: "tertiary",
110
- iconColor: "neutral-gray-400",
111
- onClick: async (o) => {
112
- o.stopPropagation(), await M(e.row.original);
113
- }
114
- }),
115
- m(p.FmButton, {
116
- icon: "visibility",
117
- variant: "tertiary",
118
- iconColor: "neutral-gray-400",
119
- onClick: async (o) => {
120
- o.stopPropagation(), await k.push({
121
- name: A["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
122
- params: { id: e.row.original._id }
123
- });
124
- }
125
- }),
126
- m(
127
- p.FmMenu,
128
- {
129
- placement: "bottom-end",
130
- onClick: (o) => {
131
- o.stopPropagation();
132
- }
133
- },
134
- {
135
- "menu-button": () => m(p.FmButton, {
136
- icon: "more_vert",
137
- iconColor: "neutral-gray-400",
138
- variant: "tertiary"
139
- }),
140
- default: () => {
141
- const o = [
142
- m(p.FmMenuItem, {
143
- label: a("connect.voucher.duplicate"),
144
- onClick: async (r) => {
145
- r.stopPropagation(), await H(e.row.original);
146
- }
147
- }),
148
- m(
149
- p.FmMenuItem,
150
- {
151
- onClick: async (r) => {
152
- r.stopPropagation(), O(e.row.original);
153
- }
154
- },
155
- {
156
- label: m(
157
- "div",
158
- {
159
- class: "text-fm-color-typo-error fm-typo-en-body-md-400"
160
- },
161
- a("connect.voucher.remove")
162
- )
163
- }
164
- )
165
- ];
166
- return F(e.row.original) && (o.unshift(
167
- m(p.FmMenuItem, {
168
- label: a("connect.voucher.send"),
169
- onClick: async (r) => {
170
- var c;
171
- r.stopPropagation(), (c = S.value) == null || c.showSheet({
172
- campaignId: e.row.original._id
173
- });
174
- }
175
- })
176
- ), o.unshift(
177
- m(p.FmMenuItem, {
178
- label: a("connect.voucher.share"),
179
- onClick: async (r) => {
180
- r.stopPropagation(), await me(
181
- `https://${de().currentBusiness.value._id}.${Fe.appUrl}/vouchers/${e.row.original._id}`,
182
- {
183
- successMessage: "Voucher link copied to clipboard"
184
- }
185
- );
186
- }
187
- })
188
- )), o;
189
- }
190
- }
191
- )
192
- ]);
193
- }
194
- }
195
- ], V = T(), S = T();
196
- async function O(e) {
197
- await ue.remove(a("connect.voucher.confirmRemove", { name: e.name })) && await B(
198
- async () => {
199
- await v.delete(e._id), await y.read("VOUCHER");
200
- },
201
- {
202
- message: a("connect.voucher.removing", { name: e.name }),
203
- successMessage: a("connect.voucher.removedSuccessfully", {
204
- name: e.name
205
- })
206
- }
207
- );
208
- }
209
- async function w(e) {
210
- e ? await o(await v.readById(e._id)) : q.open(async (r) => {
211
- await o(void 0, r);
212
- });
213
- async function o(r, c) {
214
- var b;
215
- (b = V.value) == null || b.showSheet(!0, "VOUCHER", r, c);
216
- }
217
- }
218
- async function M(e) {
219
- await k.push({
220
- name: A["$connect-CAMPAIGN_VOUCHER_ANALYTIC"],
221
- params: { id: e._id }
222
- });
223
- }
224
- async function H(e) {
225
- var c;
226
- if (!await ge(e.name))
227
- return;
228
- const o = await v.readById(e._id), r = _e(o);
229
- (c = V.value) == null || c.showSheet(
230
- !0,
231
- "VOUCHER",
232
- r,
233
- o.template
234
- );
235
- }
236
- async function Z(e) {
237
- e.campaign._id && await new Promise((o) => {
238
- E.open({
239
- title: "Confirmation",
240
- message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
241
- primaryActions: { text: "Update all", close: !0 },
242
- secondaryActions: { text: "Update future only", close: !0 }
243
- }).onPrimary(async () => {
244
- var r;
245
- e.updateCollections = !0, (r = window.top) == null || r.postMessage("updateAllVoucher", "*"), o();
246
- }).onSecondary(async () => {
247
- o();
248
- });
249
- }), await B(
250
- async () => {
251
- e.campaign._id ? await v.update(e.campaign._id, e) : await v.create(e), await y.read("VOUCHER");
252
- },
253
- {
254
- message: a(
255
- e.campaign._id ? "connect.voucher.updating" : "connect.voucher.creating"
256
- ),
257
- successMessage: a(
258
- e.campaign._id ? "connect.voucher.updatedSuccessfully" : "connect.voucher.createdSuccessfully"
259
- )
260
- }
261
- );
262
- }
263
- return re(async () => {
264
- await X(async () => {
265
- await y.read("VOUCHER");
266
- });
267
- }), (e, o) => {
268
- const r = f("FmPageHead"), c = f("FmSearch"), b = f("FmTable"), J = f("FmChip"), h = f("FmButton"), ee = f("FmListItem"), oe = f("FmList"), te = f("FmCard");
269
- return d(), P(R, null, [
270
- s(r, {
271
- title: t(a)("connect.voucher.title"),
272
- actions: t(C).length > 0 ? [j] : [],
273
- "onClick:action": o[0] || (o[0] = () => w())
274
- }, null, 8, ["title", "actions"]),
275
- i("div", Ve, [
276
- s(c, {
277
- modelValue: t(l).searchKey,
278
- "onUpdate:modelValue": o[1] || (o[1] = (n) => t(l).searchKey = n),
279
- class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
280
- placeholder: t(a)("connect.voucher.search"),
281
- collapsible: ""
282
- }, null, 8, ["modelValue", "placeholder"]),
283
- t(y).campaigns.voucher && t(y).campaigns.voucher.length > 0 ? (d(), P(R, { key: 0 }, [
284
- i("div", Se, [
285
- i("div", Ue, [
286
- s(N, {
287
- label: `${t(a)("connect.common.location")}: `,
288
- "right-icon": "keyboard_arrow_down",
289
- modelValue: t(l).location,
290
- "onUpdate:modelValue": o[2] || (o[2] = (n) => t(l).location = n),
291
- icon: "storefront",
292
- "show-item-label": !0,
293
- items: t(G).locationOptions
294
- }, null, 8, ["label", "modelValue", "items"]),
295
- s(N, {
296
- label: "Type:",
297
- "right-icon": "keyboard_arrow_down",
298
- modelValue: t(l).triggerType,
299
- "onUpdate:modelValue": o[3] || (o[3] = (n) => t(l).triggerType = n),
300
- icon: "filter_list",
301
- "show-item-label": !0,
302
- items: t(W)
303
- }, null, 8, ["modelValue", "items"])
304
- ]),
305
- s(c, {
306
- modelValue: t(l).searchKey,
307
- "onUpdate:modelValue": o[4] || (o[4] = (n) => t(l).searchKey = n),
308
- class: "xs:hidden sm:hidden",
309
- placeholder: t(a)("connect.voucher.search"),
310
- collapsible: ""
311
- }, null, 8, ["modelValue", "placeholder"])
312
- ]),
313
- s(b, {
314
- class: "xs:hidden sm:hidden",
315
- "row-data": t(C),
316
- "column-defs": Y,
317
- "search-value": t(l).searchKey,
318
- "column-filter": [],
319
- onRowClick: o[5] || (o[5] = (n) => w(n.original)),
320
- "hide-footer": t(C).length < 10
321
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
322
- s(oe, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
323
- default: I(() => [
324
- (d(!0), P(R, null, ie(t(C).filter(
325
- (n) => n.name.toLowerCase().includes(t(l).searchKey.toLowerCase())
326
- ), (n) => (d(), g(ee, {
327
- key: n._id.toString(),
328
- onClick: (U) => w(n),
329
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
330
- }, {
331
- default: I(() => {
332
- var U;
333
- return [
334
- i("div", Te, [
335
- i("div", Pe, [
336
- (d(), g(ce(t(D)(n)))),
337
- x(n) ? (d(), g(J, {
338
- key: 0,
339
- label: "Feedvibe",
340
- class: "text-fm-color-primary bg-fm-color-system-warning-100",
341
- compact: ""
342
- })) : L("", !0),
343
- i("div", Re, _(((U = n.pf_collectible) == null ? void 0 : U.currentReceive) ?? 0) + " claimed ", 1)
344
- ]),
345
- i("div", Ie, [
346
- i("div", Le, _(n.name), 1),
347
- i("div", Ae, _(t(K)(n)), 1)
348
- ])
349
- ]),
350
- i("div", Ee, [
351
- s(h, {
352
- icon: "insights",
353
- "icon-color": "neutral-gray-400",
354
- variant: "tertiary",
355
- onClick: async (u) => {
356
- u.stopPropagation(), await M(n);
357
- }
358
- }, null, 8, ["onClick"]),
359
- s(h, {
360
- icon: "content_copy",
361
- "icon-color": "neutral-gray-400",
362
- variant: "tertiary",
363
- onClick: async (u) => {
364
- u.stopPropagation(), await H(n);
365
- }
366
- }, null, 8, ["onClick"]),
367
- F(n) ? (d(), g(h, {
368
- key: 0,
369
- icon: "visibility",
370
- "icon-color": "neutral-gray-400",
371
- variant: "tertiary",
372
- onClick: async (u) => {
373
- u.stopPropagation(), await t(k).push({
374
- name: t(A)["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
375
- params: { id: n._id }
376
- });
377
- }
378
- }, null, 8, ["onClick"])) : L("", !0),
379
- F(n) ? (d(), g(h, {
380
- key: 1,
381
- icon: "send",
382
- "icon-color": "neutral-gray-400",
383
- variant: "tertiary",
384
- onClick: (u) => {
385
- var $;
386
- u.stopPropagation(), ($ = t(S)) == null || $.showSheet({
387
- campaignId: n._id
388
- });
389
- }
390
- }, null, 8, ["onClick"])) : L("", !0),
391
- s(h, {
392
- icon: "delete",
393
- "icon-color": "neutral-gray-400",
394
- variant: "tertiary",
395
- onClick: (u) => (u.stopPropagation(), O(n))
396
- }, null, 8, ["onClick"])
397
- ])
398
- ];
399
- }),
400
- _: 2
401
- }, 1032, ["onClick"]))), 128))
402
- ]),
403
- _: 1
404
- })
405
- ], 64)) : (d(), g(te, {
406
- key: 1,
407
- variant: "outlined",
408
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
409
- }, {
410
- default: I(() => [
411
- o[7] || (o[7] = i("img", {
412
- src: se,
413
- class: "aspect-square w-[150px]"
414
- }, null, -1)),
415
- i("div", Be, [
416
- i("div", Oe, _(t(a)("connect.voucher.createVoucherCampaign")), 1),
417
- i("div", Me, _(t(a)("connect.voucher.description")), 1)
418
- ]),
419
- s(h, {
420
- variant: "primary",
421
- label: t(a)("connect.voucher.createVoucherCampaign"),
422
- icon: "add",
423
- onClick: o[6] || (o[6] = (n) => w())
424
- }, null, 8, ["label"])
425
- ]),
426
- _: 1
427
- })),
428
- s(Ce, {
429
- ref_key: "sheetRef",
430
- ref: V,
431
- "onSubmit:modelValue": Z
432
- }, null, 512),
433
- s(we, {
434
- ref_key: "sendVoucherSheetRef",
435
- ref: S
436
- }, null, 512)
437
- ])
438
- ], 64);
439
- };
440
- }
441
- });
442
- export {
443
- io as default
444
- };