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

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-C4XD_vWL.js → App-COUNgNnC.js} +493 -474
  2. package/dist/{AuditLogs-DpevHGsA.js → AuditLogs-CY45tdqr.js} +14 -13
  3. package/dist/{Bin-FRrYZ8pV.js → Bin-COrX2Oq4.js} +8 -8
  4. package/dist/{Broadcast-CoefxWt-.js → Broadcast-BQxJ8Edf.js} +89 -86
  5. package/dist/{CampaignAnalytic-CdZjzsLr.js → CampaignAnalytic-CSYrBckT.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DQOLEDzY.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DQUQxU1_.js} +7 -6
  7. package/dist/{Card-BABL96V6.js → Card-62iX4uef.js} +24 -23
  8. package/dist/{Collections-D6XuhBO1.js → Collections-BxexBaGi.js} +8 -8
  9. package/dist/{Credit-D2WTeN8Z.js → Credit-B5fLK5ot.js} +12 -12
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-B0KkvFWi.js → DateRangeChip.vue_vue_type_script_setup_true_lang-C738fOnK.js} +1 -1
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-G2oU70Ef.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CloubCwR.js} +36 -35
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-C4RByg0k.js → EffectSheet.vue_vue_type_style_index_0_lang-tFwP9_hm.js} +6 -6
  13. package/dist/{Experience-CUqmspwT.js → Experience-BReFp_Dz.js} +87 -84
  14. package/dist/{FileSaver.min-DX17A8Gj.js → FileSaver.min-o09GwL8H.js} +1 -1
  15. package/dist/{Game-D8IvyDdA.js → Game-DTDVEBrO.js} +13 -13
  16. package/dist/{GiftCardSetup-BOSKBH8c.js → GiftCardSetup-CP7Pdqcb.js} +10 -10
  17. package/dist/GoalPickerPanel.vue_vue_type_script_setup_true_lang-DzV35QnL.js +417 -0
  18. package/dist/Goals-BNspliQP.js +244 -0
  19. package/dist/{Grab-CnBGt_H2.js → Grab-C3xNIYzE.js} +9 -9
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BI00YCKv.js → ImageInput.vue_vue_type_script_setup_true_lang-BidKqIgw.js} +1 -1
  21. package/dist/{Index-BovDOTbf.js → Index-CRlr03xg.js} +10 -10
  22. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-D8auavm7.js → LocationPicker.vue_vue_type_script_setup_true_lang-_YyfSHpE.js} +1 -1
  23. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BM99IoIG.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CMfRL6Ef.js} +1 -1
  24. package/dist/{LoyaltyDashboard-DiCQnQ76.js → LoyaltyDashboard-BQpKd2JC.js} +1213 -1170
  25. package/dist/{MainLayout-Cg37dK-P.js → MainLayout-BIVZ2S6v.js} +3 -3
  26. package/dist/{Marketing-DRCT9dBo.js → Marketing-8SvgFvTs.js} +4 -4
  27. package/dist/{MarketingMaterialEdit-DcE0A8_A.js → MarketingMaterialEdit-DXaM4RKu.js} +6 -6
  28. package/dist/{Member-C8T1-ywK.js → Member-DucF8ody.js} +7 -7
  29. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-CTl8LtJ9.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CMQ1b_BI.js} +26 -25
  30. package/dist/{MemberImportHistory-CYCxxxN7.js → MemberImportHistory-BB-pNBDA.js} +7 -7
  31. package/dist/{MemberList-Ddlnm4JX.js → MemberList-CazaLinm.js} +14 -14
  32. package/dist/{MemberTransactions-DwyZTeZb.js → MemberTransactions-0PaBQaYk.js} +1 -1
  33. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BWCxGlQO.js → MessageInput.vue_vue_type_script_setup_true_lang-Dv2rIoW2.js} +10 -10
  34. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-LdVeH7gh.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DWn3ajhn.js} +1 -1
  35. package/dist/{Mission-CW0y8Bzw.js → Mission-DxH1u9Ps.js} +84 -81
  36. package/dist/{Overview-i2XPL7Pu.js → Overview-BcDJv-LJ.js} +4 -4
  37. package/dist/{Overview-CO4T3l6l.js → Overview-vepmOail.js} +22 -21
  38. package/dist/{Point-CNWdfqQZ.js → Point-LgZ_UrwI.js} +108 -99
  39. package/dist/{Promotion-DAemCP79.js → Promotion-CC6Drl2T.js} +96 -93
  40. package/dist/{Queue-DI50gMny.js → Queue-CeYuqidN.js} +14 -13
  41. package/dist/{Record-DX3WHXku.js → Record-B17ZYsb5.js} +9 -9
  42. package/dist/{Review-DzSNG4Le.js → Review-D6yhv3J7.js} +2 -2
  43. package/dist/{ReviewFacebookCallback-CrdRUN3t.js → ReviewFacebookCallback-BAB4epr8.js} +5 -5
  44. package/dist/{ReviewGoogleCallback-Da28WNzU.js → ReviewGoogleCallback-CZccpOLv.js} +5 -5
  45. package/dist/{Reward-DUQAE99I.js → Reward-PdgtYMnB.js} +16 -16
  46. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BGAOPkwD.js → RewardGroup.vue_vue_type_script_setup_true_lang-CiVHQa5M.js} +25 -24
  47. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-B9Dbe9no.js → RuleGroup.vue_vue_type_script_setup_true_lang-_rUcf5lG.js} +16 -15
  48. package/dist/{Segment-BgVf2-G2.js → Segment-DVK6xqb9.js} +27 -26
  49. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DDLXF5HM.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CiR-d0s-.js} +16 -15
  50. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-9UiH43em.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CkPnwcE1.js} +4 -4
  51. package/dist/{Setting-3jW6EbKA.js → Setting-D9x8t85J.js} +14 -14
  52. package/dist/{SettingAdvertisements-C40QcuSn.js → SettingAdvertisements-VUfOdSPw.js} +12 -12
  53. package/dist/{Settings-DT9bypKs.js → Settings-B_cbux1z.js} +5 -5
  54. package/dist/{Store-DQyOUfEJ.js → Store-BmMCgHeP.js} +28 -27
  55. package/dist/{StoreRewards-Dr_c0PbO.js → StoreRewards-D_TSVQMf.js} +15 -15
  56. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Bh5h8Lc_.js → StoreTransactions.vue_vue_type_script_setup_true_lang-qMRV_p8H.js} +29 -28
  57. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-LquvtnTy.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DKOE5bcU.js} +2 -2
  58. package/dist/{Tier-DmqfEWcB.js → Tier-BNQ_RmZV.js} +914 -922
  59. package/dist/{Title-Dx6pcJfP.js → Title-DHicIYnB.js} +24 -23
  60. package/dist/{Transaction-CD6agt6m.js → Transaction-B57Begy_.js} +2 -2
  61. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CNjBtitb.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Cw852iqb.js} +6 -6
  62. package/dist/Voucher-DIZfWgdX.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-BhYXVG4z.js} +12 -12
  64. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Bq_7U0NO.js → ZodTextField.vue_vue_type_script_setup_true_lang-RnvpoPAb.js} +2 -2
  65. package/dist/{app-CmqX1V1B.js → app-D59Y5Pmz.js} +510 -201
  66. package/dist/app.js +1 -1
  67. package/dist/{base.export-guVE-B2c.js → base.export-Bp2NvmoR.js} +2 -2
  68. package/dist/{business-DXmGtwPm.js → business-CZnoeYYk.js} +1 -1
  69. package/dist/{campaign-CVXbgs-y.js → campaign-C0od4X1k.js} +2 -2
  70. package/dist/{campaign-D9Jufumh.js → campaign-CXR35buF.js} +9 -9
  71. package/dist/{campaign.enum-CXhYMbkx.js → campaign.enum-DlrjqgBa.js} +1 -1
  72. package/dist/{campaign.fn-DoJPn6yl.js → campaign.fn-bEy0au5e.js} +30 -30
  73. package/dist/{collectible.enum-Tk6LIMMm.js → collectible.enum-Czi69PBO.js} +1 -1
  74. package/dist/{collection.fn-DCVNYQau.js → collection.fn-DzPeFXPq.js} +2 -2
  75. package/dist/{currency-BYhkCI6F.js → currency-DktN5oXx.js} +1 -1
  76. package/dist/{duplicateCampaign-BOVBZHFs.js → duplicateCampaign-Dc_9ZYk5.js} +2 -2
  77. package/dist/{effect-e6wYWgc8.js → effect-KY41iVGx.js} +1 -1
  78. package/dist/{email-addresses-Dcd_vAeM.js → email-addresses-CRGGbqZn.js} +2 -2
  79. package/dist/{helper-DluoQ6zi.js → helper-BT8y_Hpb.js} +1 -1
  80. package/dist/{index-CBRWvjup.js → index-0awpDQm_.js} +1109 -32
  81. package/dist/{index-DB51l5yi.js → index-11j23Lx1.js} +1 -1
  82. package/dist/{index-BFzBAm6P.js → index-377HHaUi.js} +1 -1
  83. package/dist/{index-DoiGG41P.js → index-B30DDvin.js} +3 -3
  84. package/dist/{index-ChYMoLaB.js → index-BE8jnf9X.js} +1 -1
  85. package/dist/{index-DIP_uzZm.js → index-BWR1QjWQ.js} +5 -5
  86. package/dist/{index-CiJQlOu7.js → index-BZnzbUL3.js} +10 -9
  87. package/dist/{index-C-oypk0K.js → index-BhJpa8K-.js} +3 -3
  88. package/dist/{index-2QCDTrA9.js → index-BzKHBymK.js} +2 -2
  89. package/dist/{index-CDdNExzM.js → index-CMJp7VdE.js} +1 -1
  90. package/dist/{index-DKrJlWH3.js → index-CTPFlKiY.js} +4 -4
  91. package/dist/{index-SQItAw7w.js → index-CTe-H50U.js} +3 -3
  92. package/dist/{index-BAs9N7bi.js → index-CYgzVl3H.js} +3 -3
  93. package/dist/index-ClNPGM0y.js +166 -0
  94. package/dist/{index-qkkPuNFM.js → index-D-V84VLW.js} +131 -119
  95. package/dist/{index-SS72WJs_.js → index-D2FgYlbx.js} +1 -1
  96. package/dist/{index-BpAhyOgv.js → index-DiicsY5E.js} +1 -1
  97. package/dist/{index-kPcRcSFx.js → index-E4B5H1FX.js} +2 -2
  98. package/dist/{index-C9JY8Ru6.js → index-G8qEVB7S.js} +2 -2
  99. package/dist/{index.esm2017-BLVWhb4f.js → index.esm2017-DKzsf5EJ.js} +1 -1
  100. package/dist/{loading-ClX4Z1ZH.js → loading-AuVL4WdD.js} +1 -1
  101. package/dist/{lodash-Cxh2BWuW.js → lodash-Bm8ZbAXg.js} +1 -1
  102. package/dist/{member-import-DKfSDn0D.js → member-import-Kq5CMrPF.js} +1 -1
  103. package/dist/{membership-BBAosVNQ.js → membership-8f9xLURB.js} +3 -3
  104. package/dist/{money-CWzvdiFT.js → money-JRN61MHj.js} +1 -1
  105. package/dist/{number-Cp7TGBzd.js → number-Dd6DRScj.js} +1 -1
  106. package/dist/{objectid-CXWfUmP_.js → objectid-_tuwJN_b.js} +9 -9
  107. package/dist/onboarding-DOPR1c3u.js +129 -0
  108. package/dist/onboardingSetup-DOR-OW92.js +17 -0
  109. package/dist/{plugins-BKD6oEHa.js → plugins-DPFr2tq7.js} +3 -3
  110. package/dist/{reward-CrjStT4w.js → reward-B-yDjlsA.js} +1 -1
  111. package/dist/{rule-CBZRptRM.js → rule-DRN4bolS.js} +19 -18
  112. package/dist/{template-D4qWK9tk.js → template-7UtS_hVI.js} +6 -6
  113. package/dist/{timezone-t0WxSk3e.js → timezone-BmZfPTab.js} +1 -1
  114. package/dist/{transaction.fn-DZp6Drqf.js → transaction.fn-C9WOWjoC.js} +2 -2
  115. package/dist/{trigger-DN5yeimJ.js → trigger-BDKxlupM.js} +5 -5
  116. package/dist/{useMarketingMaterialActions-ChkZyyRO.js → useMarketingMaterialActions-DJ7__20D.js} +3 -3
  117. package/dist/{usePagination-Vda9U5Dh.js → usePagination-Czb6ZvSX.js} +1 -1
  118. package/dist/{user-jEjTV3E6.js → user-C-y46MEn.js} +1 -1
  119. package/dist/{vue-i18n-Bg_RJ_GV.js → vue-i18n-l6QdWh8z.js} +326 -326
  120. package/dist/{xlsx-unW4U5Tx.js → xlsx-Dbm5Y1eY.js} +440 -440
  121. package/dist/{zod-DIsCEUuE.js → zod-DciqV0cq.js} +1 -1
  122. package/package.json +1 -1
  123. package/dist/Voucher-P4dyOeUd.js +0 -444
@@ -1,4 +1,4 @@
1
- import { i as Z } from "./plugins-BKD6oEHa.js";
1
+ import { i as Z } from "./plugins-DPFr2tq7.js";
2
2
  import { h as f } from "vue";
3
3
  function u(e, o) {
4
4
  return e.path.join(".") === o;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-connect",
3
- "version": "0.1.98-beta.73",
3
+ "version": "0.1.98-beta.74",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -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
- };