@feedmepos/mf-connect 0.1.38-beta.61 → 0.1.38-beta.63

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 (108) hide show
  1. package/dist/{Analytic-CM7mh-iO.js → Analytic-99208ZGh.js} +14 -14
  2. package/dist/{App-CeCzzsDu.js → App-BkTi1rTp.js} +7 -7
  3. package/dist/{AuditLogs-VWx8DFKA.js → AuditLogs-BqKgDkGp.js} +9 -9
  4. package/dist/{Bin-vUuol_I9.js → Bin-C_vWkAOc.js} +8 -8
  5. package/dist/Broadcast-_s9fmcsY.js +267 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CV-zhJ15.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CgDMf3Yl.js} +6 -6
  7. package/dist/{Card-CeIeGET1.js → Card-RfSe4_GI.js} +17 -17
  8. package/dist/{Collections-CF_OcAL3.js → Collections-DgWI87e9.js} +7 -7
  9. package/dist/Credit-DBy_Xcpq.js +261 -0
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-0DMFuBoG.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D5T444y0.js} +203 -199
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BZfchHlT.js → EffectSheet.vue_vue_type_style_index_0_lang-BwSXXdG-.js} +6 -6
  12. package/dist/Experience-DBg5cZxJ.js +260 -0
  13. package/dist/{FileSaver.min-lgg_oBvT.js → FileSaver.min-Bzi1BTgf.js} +1 -1
  14. package/dist/Game-CSilatA5.js +331 -0
  15. package/dist/{GenerateMaterial-B5A7mx2y.js → GenerateMaterial-7DLj60E8.js} +6 -6
  16. package/dist/{Grab-BgiMqwvj.js → Grab-CM0RcU3-.js} +9 -9
  17. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DZ8DHrQ_.js → ImageInput.vue_vue_type_script_setup_true_lang-D3lV7JVV.js} +1 -1
  18. package/dist/{Index-B85ops8K.js → Index-DIpMb8rL.js} +10 -10
  19. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-B5rIjxYd.js → LottieAnimation.vue_vue_type_script_setup_true_lang-D6L3PiGD.js} +1 -1
  20. package/dist/{MainLayout-CXGVkD-W.js → MainLayout-C0Bq_pRh.js} +1 -1
  21. package/dist/{Marketing-Bnijl7lA.js → Marketing-CiOCRSE8.js} +4 -4
  22. package/dist/{MarketingMaterialEdit-BlUKwSoP.js → MarketingMaterialEdit-BHJPku7e.js} +4 -4
  23. package/dist/{Member-sT853g51.js → Member-Blcc8M5S.js} +11 -11
  24. package/dist/{MemberList-DYT5_fSP.js → MemberList--Ua0eKo0.js} +25 -25
  25. package/dist/{MemberTransactions-Cqce5ebe.js → MemberTransactions-C0_OArai.js} +1 -1
  26. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Dq0Hswj8.js → MessageInput.vue_vue_type_script_setup_true_lang-CO8MuZju.js} +9834 -9724
  27. package/dist/Mission-Dp7QTUdu.js +335 -0
  28. package/dist/{Overview-B0rwrHR1.js → Overview-B-puEtTe.js} +18 -18
  29. package/dist/Point-BMUeLRXE.js +263 -0
  30. package/dist/Promotion-CZjW5Eny.js +397 -0
  31. package/dist/{Queue-SVqRUlD_.js → Queue-CZ8a1tcg.js} +10 -10
  32. package/dist/{Record-BTjg4ihy.js → Record-BJXOqe51.js} +9 -9
  33. package/dist/{Reward-DW58VMRO.js → Reward-CYaP48K9.js} +16 -16
  34. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-s1RI55Rc.js → RewardGroup.vue_vue_type_script_setup_true_lang-Bvq4GrL1.js} +11 -11
  35. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Os17lXBX.js → RuleGroup.vue_vue_type_script_setup_true_lang-DnfvXZOL.js} +14 -14
  36. package/dist/{Segment-Dny8pxP1.js → Segment-D4vjzSgr.js} +24 -24
  37. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Czx7rqiq.js → SelectItems.vue_vue_type_script_setup_true_lang-iDaC99DI.js} +2 -2
  38. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-EgVxUG_N.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-mkt1o9sO.js} +12 -12
  39. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CO0fgI3K.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-UHTvMbYY.js} +4 -4
  40. package/dist/{Setting-CjcnxK34.js → Setting-BxTVlSNI.js} +13 -13
  41. package/dist/{SettingAdvertisements-CIyDF4C8.js → SettingAdvertisements-DvuFXOGs.js} +11 -11
  42. package/dist/{Store-B8k5YVqU.js → Store-xF8dYQbN.js} +20 -20
  43. package/dist/{StoreRewards-BW08rwpL.js → StoreRewards-BxW_FxY3.js} +14 -14
  44. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BfFSfE2H.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DvPC3YQN.js} +19 -19
  45. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CZkKjUNQ.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CDgL0WOA.js} +1 -1
  46. package/dist/{Tier-DKzu4tYw.js → Tier-C73TRPVo.js} +23 -23
  47. package/dist/{Title-BK-TXatJ.js → Title-DD4gP_Kc.js} +20 -20
  48. package/dist/{Transaction-Duayg1jd.js → Transaction-BGheiJ8F.js} +2 -2
  49. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BAR9h1TV.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-ne1fn7b7.js} +6 -6
  50. package/dist/{Voucher-BEVAkNeJ.js → Voucher-CRatGWk7.js} +164 -142
  51. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DvFy9Z6X.js → VoucherEditor.vue_vue_type_script_setup_true_lang-2_F9hEkK.js} +12 -12
  52. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CU_Sx2PM.js → ZodTextField.vue_vue_type_script_setup_true_lang-DNEs_60Z.js} +2 -2
  53. package/dist/{app-IvbII0ql.js → app-UaX9LGGa.js} +7966 -7880
  54. package/dist/app.js +1 -1
  55. package/dist/{business-BFIwFfkq.js → business-bUX6raMw.js} +1 -1
  56. package/dist/{campaign-RuIwxc4y.js → campaign-BwqSJn1x.js} +8 -8
  57. package/dist/{campaign-w9j4I4jn.js → campaign-DUDuTel5.js} +2 -2
  58. package/dist/{campaign.enum-IHLsfdik.js → campaign.enum-1k6333ca.js} +1 -1
  59. package/dist/{campaign.fn-B_P1MkRV.js → campaign.fn-CgJi24jv.js} +31 -31
  60. package/dist/{collectible.enum-CUgSjO08.js → collectible.enum-DkQ5IEM4.js} +1 -1
  61. package/dist/{collection.fn-CrfnNb41.js → collection.fn-Cc4UF4PF.js} +2 -2
  62. package/dist/{dto-jwO_sX9I.js → dto-BauGrz7j.js} +4 -4
  63. package/dist/duplicateCampaign-C1zAMcB8.js +51 -0
  64. package/dist/{effect--0g8PNyt.js → effect-BzcguSGr.js} +1 -1
  65. package/dist/{email-addresses-HtsxvXw9.js → email-addresses-BxvYeGJM.js} +2 -2
  66. package/dist/{export-CFEwMRmd.js → export-CtEjDYVF.js} +2 -2
  67. package/dist/{helper-CCfb24PO.js → helper-B9MQjEoz.js} +1 -1
  68. package/dist/{index-BZEM0T2A.js → index-BhKOx9rm.js} +1 -1
  69. package/dist/{index-Bflu4Rft.js → index-Bx_lUMxi.js} +3 -3
  70. package/dist/{index-wzSeRJAd.js → index-CJIGs8yP.js} +1 -1
  71. package/dist/{index-CkuPY85X.js → index-COST516f.js} +1 -1
  72. package/dist/{index-BR3UbZ0F.js → index-CR8jJQP8.js} +1 -1
  73. package/dist/{index-CZPcwcUo.js → index-CRGgyR29.js} +3 -3
  74. package/dist/{index-DpjYgKTN.js → index-Cr9kGG1v.js} +1 -1
  75. package/dist/{index-CppLPpqB.js → index-Cvcgqzy5.js} +3 -3
  76. package/dist/{index-DDYH-IEX.js → index-DJqWLQvn.js} +1 -1
  77. package/dist/{index-CR3f3BXQ.js → index-DNrDjbLS.js} +1023 -1023
  78. package/dist/{index-B-AMMFfT.js → index-DYDOXl_b.js} +4 -4
  79. package/dist/{index-DdZdHioZ.js → index-hOEO4SV6.js} +6 -6
  80. package/dist/{index-Dic_WcAL.js → index-lbAEZ5CZ.js} +1 -1
  81. package/dist/{index.esm2017-CUnjzfU-.js → index.esm2017-6u5qxmWE.js} +1 -1
  82. package/dist/{loading-CivgDw5C.js → loading-Cpe50hSj.js} +2 -2
  83. package/dist/{lodash-BSbv_9TG.js → lodash-Bdhnyywe.js} +1 -1
  84. package/dist/{membership-j2w1YUO-.js → membership-C_VLzMwg.js} +3 -3
  85. package/dist/{money-DL-x8hiT.js → money-C2cELkXt.js} +1 -1
  86. package/dist/{number-D1yoFGEr.js → number-BFQi0hyw.js} +1 -1
  87. package/dist/objectid-WFNy_Dkj.js +145 -0
  88. package/dist/{plugins-P-V4XWmW.js → plugins-CTcRVNU6.js} +3 -3
  89. package/dist/{reward-BqMlBQRu.js → reward-zY_9dHpb.js} +1 -1
  90. package/dist/{rule-CztsLdki.js → rule-UZYsfn59.js} +3 -3
  91. package/dist/{rule-builder-DANv7Rmz.js → rule-builder-BW49BaXF.js} +1 -1
  92. package/dist/{template-Dbz3FhHK.js → template-CjZH_5cu.js} +6 -6
  93. package/dist/{timezone-BgVqObBq.js → timezone-CQrMBJum.js} +2 -2
  94. package/dist/{trigger-CbriUibd.js → trigger-BHqKZjrT.js} +5 -5
  95. package/dist/{usePagination-DtNK7W0U.js → usePagination-HabuQYCy.js} +1 -1
  96. package/dist/{user-CVapqHfr.js → user-YZUgk9lA.js} +1 -1
  97. package/dist/{vue-i18n-tpDAnnmD.js → vue-i18n-C1KlZBjR.js} +252 -252
  98. package/dist/{xlsx-EewcN2uY.js → xlsx-CMv5r9NR.js} +1 -1
  99. package/dist/{zod-D-wiCQRJ.js → zod-jH-8jgB1.js} +1 -1
  100. package/package.json +3 -3
  101. package/dist/Broadcast-6VXz4-IG.js +0 -233
  102. package/dist/Credit-BUqGOyp_.js +0 -226
  103. package/dist/Experience-BxiFH_uV.js +0 -225
  104. package/dist/Game-BzYW0LfY.js +0 -300
  105. package/dist/Mission-Q5_sGgrm.js +0 -304
  106. package/dist/Point-BGYFMvev.js +0 -228
  107. package/dist/Promotion-0acd63nA.js +0 -364
  108. package/dist/objectid-CHab6j3r.js +0 -145
@@ -1,71 +1,72 @@
1
- import { defineComponent as oe, ref as V, computed as te, h as m, onMounted as ne, resolveComponent as d, openBlock as u, createElementBlock as S, Fragment as U, createVNode as l, unref as t, createElementVNode as c, withCtx as T, renderList as ae, createBlock as h, resolveDynamicComponent as re, createCommentVNode as R, toDisplayString as g } from "vue";
2
- import { _ as ce } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as ie, components as p } from "@feedmepos/ui-library";
4
- import { _ as O } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
5
- import { a as se, p as le } from "./plugins-P-V4XWmW.js";
6
- import { useCoreStore as me } from "@feedmepos/mf-common";
7
- import { u as ue } from "./loading-CivgDw5C.js";
8
- import { u as de } from "./business-BFIwFfkq.js";
9
- import { u as pe } from "./campaign-w9j4I4jn.js";
10
- import { a as fe, b as M, c as H } from "./campaign-RuIwxc4y.js";
11
- import "./index-BZEM0T2A.js";
12
- import { u as he } from "./template-Dbz3FhHK.js";
13
- import { _ as ye } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-0DMFuBoG.js";
14
- import { _ as ge } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-CO0fgI3K.js";
15
- import { u as ve } from "./vue-i18n-tpDAnnmD.js";
16
- import { T as _e } from "./trigger-CbriUibd.js";
17
- import { useRouter as Ce } from "vue-router";
18
- import { c as b } from "./index-DpjYgKTN.js";
19
- import { R as $ } from "./app-IvbII0ql.js";
20
- var be = { 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/" };
21
- const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-center justify-between w-full" }, ke = { class: "flex gap-8 overflow-x-auto" }, Fe = { class: "space-y-8" }, Ve = { class: "flex w-full gap-4 items-center" }, Se = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ue = { class: "space-y-4" }, Te = { class: "fm-typo-en-body-lg-600" }, Re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Le = { class: "flex gap-8 items-center" }, Pe = { class: "flex flex-col gap-16 text-center" }, Ee = { class: "fm-typo-en-title-sm-800" }, Ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, oo = /* @__PURE__ */ oe({
1
+ import { defineComponent as te, ref as U, computed as ne, h as m, onMounted as ae, resolveComponent as d, openBlock as u, createElementBlock as T, Fragment as P, createVNode as l, unref as t, createElementVNode as c, withCtx as R, renderList as re, createBlock as h, resolveDynamicComponent as ce, createCommentVNode as L, toDisplayString as v } from "vue";
2
+ import { _ as ie } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as se, components as p } from "@feedmepos/ui-library";
4
+ import { _ as H } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
5
+ import { a as le, p as me } from "./plugins-CTcRVNU6.js";
6
+ import { useCoreStore as ue } from "@feedmepos/mf-common";
7
+ import { u as de } from "./loading-Cpe50hSj.js";
8
+ import { u as pe } from "./business-bUX6raMw.js";
9
+ import { u as fe } from "./campaign-DUDuTel5.js";
10
+ import { a as ye, b as $, c as D } from "./campaign-BwqSJn1x.js";
11
+ import { c as he, p as ge } from "./duplicateCampaign-C1zAMcB8.js";
12
+ import "./index-BhKOx9rm.js";
13
+ import { u as ve } from "./template-CjZH_5cu.js";
14
+ import { _ as _e } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-D5T444y0.js";
15
+ import { _ as Ce } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-UHTvMbYY.js";
16
+ import { u as we } from "./vue-i18n-C1KlZBjR.js";
17
+ import { T as be } from "./trigger-BHqKZjrT.js";
18
+ import { useRouter as ke } from "vue-router";
19
+ import { c as _ } from "./index-Cr9kGG1v.js";
20
+ import { R as K } from "./app-UaX9LGGa.js";
21
+ var xe = { 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 Fe = { class: "px-24 flex flex-col gap-y-16" }, Ve = { class: "flex items-center justify-between w-full" }, Se = { class: "flex gap-8 overflow-x-auto" }, Ue = { class: "space-y-8" }, Te = { class: "flex w-full gap-4 items-center" }, Pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Re = { class: "space-y-4" }, Le = { class: "fm-typo-en-body-lg-600" }, Ie = { 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" }, Ae = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ro = /* @__PURE__ */ te({
22
23
  __name: "Voucher",
23
- setup(Ae) {
24
- const { t: a } = ve(), K = {
24
+ setup(Me) {
25
+ const { t: a } = we(), N = {
25
26
  label: a("connect.voucher.createCampaign"),
26
27
  value: "create",
27
28
  isPrimary: !0,
28
29
  prependIcon: "add"
29
- }, L = ie(), N = he("VOUCHER", L), D = de(), f = pe(), { global: j, minor: P } = ue, E = Ce(), i = V({
30
+ }, I = se(), j = ve("VOUCHER", I), q = pe(), y = fe(), { global: G, minor: E } = de, B = ke(), s = U({
30
31
  searchKey: "",
31
32
  location: [],
32
33
  triggerType: []
33
- }), v = te(
34
- () => f.campaigns.voucher.filter(
35
- (e) => G(e) && X(e)
34
+ }), C = ne(
35
+ () => y.campaigns.voucher.filter(
36
+ (e) => W(e) && z(e)
36
37
  )
37
- ), q = _e.VOUCHER.map((e) => ({
38
+ ), X = be.VOUCHER.map((e) => ({
38
39
  label: e.name,
39
40
  value: e.value
40
41
  }));
41
- function G(e) {
42
- const o = i.value.location;
42
+ function W(e) {
43
+ const o = s.value.location;
43
44
  return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some(
44
45
  (r) => {
45
- var s;
46
- return (s = e == null ? void 0 : e.targetLocation) == null ? void 0 : s.includes(r);
46
+ var i;
47
+ return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(r);
47
48
  }
48
49
  ) : e.targetLocation.includes(o);
49
50
  }
50
- function w(e) {
51
+ function k(e) {
51
52
  return e.hideInApp === !1;
52
53
  }
53
54
  function x(e) {
54
- return e.event.type === "SIMPLE_CLAIM" && !w(e);
55
+ return e.event.type === "SIMPLE_CLAIM" && !k(e);
55
56
  }
56
- function X(e) {
57
- const o = i.value.triggerType;
57
+ function z(e) {
58
+ const o = s.value.triggerType;
58
59
  if (!o || o.length === 0) return !0;
59
60
  const r = e.event.type;
60
61
  return o.includes(r);
61
62
  }
62
- const W = [
63
+ const Q = [
63
64
  {
64
65
  header: a("connect.voucher.voucherTitle"),
65
66
  accessorFn: (e) => e.name,
66
67
  cell(e) {
67
68
  const o = [e.row.original.name];
68
- return w(e.row.original) && o.push(
69
+ return k(e.row.original) && o.push(
69
70
  m(p.FmChip, {
70
71
  label: "Feedvibe",
71
72
  class: "text-fm-color-primary bg-fm-color-system-warning-100",
@@ -76,14 +77,14 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
76
77
  },
77
78
  {
78
79
  header: a("connect.voucher.status"),
79
- accessorFn: (e) => fe(e),
80
+ accessorFn: (e) => ye(e),
80
81
  cell(e) {
81
- return M(e.row.original);
82
+ return $(e.row.original);
82
83
  }
83
84
  },
84
85
  {
85
86
  header: a("connect.voucher.summary"),
86
- accessorFn: (e) => H(e)
87
+ accessorFn: (e) => D(e)
87
88
  },
88
89
  {
89
90
  header: a("connect.voucher.quota"),
@@ -108,8 +109,8 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
108
109
  variant: "tertiary",
109
110
  iconColor: "neutral-gray-400",
110
111
  onClick: async (o) => {
111
- o.stopPropagation(), await E.push({
112
- name: $["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
112
+ o.stopPropagation(), await B.push({
113
+ name: K["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
113
114
  params: { id: e.row.original._id }
114
115
  });
115
116
  }
@@ -130,11 +131,17 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
130
131
  }),
131
132
  default: () => {
132
133
  const o = [
134
+ m(p.FmMenuItem, {
135
+ label: a("connect.voucher.duplicate"),
136
+ onClick: async (r) => {
137
+ r.stopPropagation(), await A(e.row.original);
138
+ }
139
+ }),
133
140
  m(
134
141
  p.FmMenuItem,
135
142
  {
136
143
  onClick: async (r) => {
137
- r.stopPropagation(), A(e.row.original);
144
+ r.stopPropagation(), O(e.row.original);
138
145
  }
139
146
  },
140
147
  {
@@ -152,8 +159,8 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
152
159
  m(p.FmMenuItem, {
153
160
  label: a("connect.voucher.send"),
154
161
  onClick: async (r) => {
155
- var s;
156
- r.stopPropagation(), (s = k.value) == null || s.showSheet({
162
+ var i;
163
+ r.stopPropagation(), (i = V.value) == null || i.showSheet({
157
164
  campaignId: e.row.original._id
158
165
  });
159
166
  }
@@ -162,8 +169,8 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
162
169
  m(p.FmMenuItem, {
163
170
  label: a("connect.voucher.share"),
164
171
  onClick: async (r) => {
165
- r.stopPropagation(), await se(
166
- `https://${me().currentBusiness.value._id}.${be.appUrl}/vouchers/${e.row.original._id}`,
172
+ r.stopPropagation(), await le(
173
+ `https://${ue().currentBusiness.value._id}.${xe.appUrl}/vouchers/${e.row.original._id}`,
167
174
  {
168
175
  successMessage: "Voucher link copied to clipboard"
169
176
  }
@@ -177,11 +184,11 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
177
184
  ]);
178
185
  }
179
186
  }
180
- ], I = V(), k = V();
181
- async function A(e) {
182
- await le.remove(a("connect.voucher.confirmRemove", { name: e.name })) && await P(
187
+ ], F = U(), V = U();
188
+ async function O(e) {
189
+ await me.remove(a("connect.voucher.confirmRemove", { name: e.name })) && await E(
183
190
  async () => {
184
- await b.delete(e._id), await f.read("VOUCHER");
191
+ await _.delete(e._id), await y.read("VOUCHER");
185
192
  },
186
193
  {
187
194
  message: a("connect.voucher.removing", { name: e.name }),
@@ -191,23 +198,30 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
191
198
  }
192
199
  );
193
200
  }
194
- async function _(e) {
195
- e ? await o() : N.open(async (r) => {
196
- await o(r);
201
+ async function w(e) {
202
+ e ? await o(await _.readById(e._id)) : j.open(async (r) => {
203
+ await o(void 0, r);
197
204
  });
198
- async function o(r) {
199
- var s;
200
- (s = I.value) == null || s.showSheet(
201
- !0,
202
- "VOUCHER",
203
- e ? await b.readById(e._id) : void 0,
204
- r
205
- );
205
+ async function o(r, i) {
206
+ var b;
207
+ (b = F.value) == null || b.showSheet(!0, "VOUCHER", r, i);
206
208
  }
207
209
  }
208
- async function z(e) {
210
+ async function A(e) {
211
+ var i;
212
+ if (!await he(e.name))
213
+ return;
214
+ const o = await _.readById(e._id), r = ge(o);
215
+ (i = F.value) == null || i.showSheet(
216
+ !0,
217
+ "VOUCHER",
218
+ r,
219
+ o.template
220
+ );
221
+ }
222
+ async function Z(e) {
209
223
  e.campaign._id && await new Promise((o) => {
210
- L.open({
224
+ I.open({
211
225
  title: "Confirmation",
212
226
  message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
213
227
  primaryActions: { text: "Update all", close: !0 },
@@ -218,9 +232,9 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
218
232
  }).onSecondary(async () => {
219
233
  o();
220
234
  });
221
- }), await P(
235
+ }), await E(
222
236
  async () => {
223
- e.campaign._id ? await b.update(e.campaign._id, e) : await b.create(e), await f.read("VOUCHER");
237
+ e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await y.read("VOUCHER");
224
238
  },
225
239
  {
226
240
  message: a(
@@ -232,123 +246,131 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
232
246
  }
233
247
  );
234
248
  }
235
- return ne(async () => {
236
- await j(async () => {
237
- await f.read("VOUCHER");
249
+ return ae(async () => {
250
+ await G(async () => {
251
+ await y.read("VOUCHER");
238
252
  });
239
253
  }), (e, o) => {
240
- const r = d("FmPageHead"), s = d("FmSearch"), Q = d("FmTable"), Z = d("FmChip"), C = d("FmButton"), J = d("FmListItem"), Y = d("FmList"), ee = d("FmCard");
241
- return u(), S(U, null, [
254
+ const r = d("FmPageHead"), i = d("FmSearch"), b = d("FmTable"), J = d("FmChip"), g = d("FmButton"), Y = d("FmListItem"), ee = d("FmList"), oe = d("FmCard");
255
+ return u(), T(P, null, [
242
256
  l(r, {
243
257
  title: t(a)("connect.voucher.title"),
244
- actions: t(v).length > 0 ? [K] : [],
245
- "onClick:action": o[0] || (o[0] = () => _())
258
+ actions: t(C).length > 0 ? [N] : [],
259
+ "onClick:action": o[0] || (o[0] = () => w())
246
260
  }, null, 8, ["title", "actions"]),
247
- c("div", we, [
248
- l(s, {
249
- modelValue: t(i).searchKey,
250
- "onUpdate:modelValue": o[1] || (o[1] = (n) => t(i).searchKey = n),
261
+ c("div", Fe, [
262
+ l(i, {
263
+ modelValue: t(s).searchKey,
264
+ "onUpdate:modelValue": o[1] || (o[1] = (n) => t(s).searchKey = n),
251
265
  class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
252
266
  placeholder: t(a)("connect.voucher.search"),
253
267
  collapsible: ""
254
268
  }, null, 8, ["modelValue", "placeholder"]),
255
- t(f).campaigns.voucher && t(f).campaigns.voucher.length > 0 ? (u(), S(U, { key: 0 }, [
256
- c("div", xe, [
257
- c("div", ke, [
258
- l(O, {
269
+ t(y).campaigns.voucher && t(y).campaigns.voucher.length > 0 ? (u(), T(P, { key: 0 }, [
270
+ c("div", Ve, [
271
+ c("div", Se, [
272
+ l(H, {
259
273
  label: `${t(a)("connect.common.location")}: `,
260
274
  "right-icon": "keyboard_arrow_down",
261
- modelValue: t(i).location,
262
- "onUpdate:modelValue": o[2] || (o[2] = (n) => t(i).location = n),
275
+ modelValue: t(s).location,
276
+ "onUpdate:modelValue": o[2] || (o[2] = (n) => t(s).location = n),
263
277
  icon: "storefront",
264
278
  "show-item-label": !0,
265
- items: t(D).locationOptions
279
+ items: t(q).locationOptions
266
280
  }, null, 8, ["label", "modelValue", "items"]),
267
- l(O, {
281
+ l(H, {
268
282
  label: "Type:",
269
283
  "right-icon": "keyboard_arrow_down",
270
- modelValue: t(i).triggerType,
271
- "onUpdate:modelValue": o[3] || (o[3] = (n) => t(i).triggerType = n),
284
+ modelValue: t(s).triggerType,
285
+ "onUpdate:modelValue": o[3] || (o[3] = (n) => t(s).triggerType = n),
272
286
  icon: "filter_list",
273
287
  "show-item-label": !0,
274
- items: t(q)
288
+ items: t(X)
275
289
  }, null, 8, ["modelValue", "items"])
276
290
  ]),
277
- l(s, {
278
- modelValue: t(i).searchKey,
279
- "onUpdate:modelValue": o[4] || (o[4] = (n) => t(i).searchKey = n),
291
+ l(i, {
292
+ modelValue: t(s).searchKey,
293
+ "onUpdate:modelValue": o[4] || (o[4] = (n) => t(s).searchKey = n),
280
294
  class: "xs:hidden sm:hidden",
281
295
  placeholder: t(a)("connect.voucher.search"),
282
296
  collapsible: ""
283
297
  }, null, 8, ["modelValue", "placeholder"])
284
298
  ]),
285
- l(Q, {
299
+ l(b, {
286
300
  class: "xs:hidden sm:hidden",
287
- "row-data": t(v),
288
- "column-defs": W,
289
- "search-value": t(i).searchKey,
301
+ "row-data": t(C),
302
+ "column-defs": Q,
303
+ "search-value": t(s).searchKey,
290
304
  "column-filter": [],
291
- onRowClick: o[5] || (o[5] = (n) => _(n.original)),
292
- "hide-footer": t(v).length < 10
305
+ onRowClick: o[5] || (o[5] = (n) => w(n.original)),
306
+ "hide-footer": t(C).length < 10
293
307
  }, null, 8, ["row-data", "search-value", "hide-footer"]),
294
- l(Y, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
295
- default: T(() => [
296
- (u(!0), S(U, null, ae(t(v).filter(
297
- (n) => n.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
298
- ), (n) => (u(), h(J, {
308
+ l(ee, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
309
+ default: R(() => [
310
+ (u(!0), T(P, null, re(t(C).filter(
311
+ (n) => n.name.toLowerCase().includes(t(s).searchKey.toLowerCase())
312
+ ), (n) => (u(), h(Y, {
299
313
  key: n._id.toString(),
300
- onClick: (F) => _(n),
314
+ onClick: (S) => w(n),
301
315
  class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
302
316
  }, {
303
- default: T(() => {
304
- var F;
317
+ default: R(() => {
318
+ var S;
305
319
  return [
306
- c("div", Fe, [
307
- c("div", Ve, [
308
- (u(), h(re(t(M)(n)))),
309
- w(n) ? (u(), h(Z, {
320
+ c("div", Ue, [
321
+ c("div", Te, [
322
+ (u(), h(ce(t($)(n)))),
323
+ k(n) ? (u(), h(J, {
310
324
  key: 0,
311
325
  label: "Feedvibe",
312
326
  class: "text-fm-color-primary bg-fm-color-system-warning-100",
313
327
  compact: ""
314
- })) : R("", !0),
315
- c("div", Se, g(((F = n.pf_collectible) == null ? void 0 : F.currentReceive) ?? 0) + " claimed ", 1)
328
+ })) : L("", !0),
329
+ c("div", Pe, v(((S = n.pf_collectible) == null ? void 0 : S.currentReceive) ?? 0) + " claimed ", 1)
316
330
  ]),
317
- c("div", Ue, [
318
- c("div", Te, g(n.name), 1),
319
- c("div", Re, g(t(H)(n)), 1)
331
+ c("div", Re, [
332
+ c("div", Le, v(n.name), 1),
333
+ c("div", Ie, v(t(D)(n)), 1)
320
334
  ])
321
335
  ]),
322
- c("div", Le, [
323
- x(n) ? (u(), h(C, {
336
+ c("div", Ee, [
337
+ l(g, {
338
+ icon: "content_copy",
339
+ "icon-color": "neutral-gray-400",
340
+ variant: "tertiary",
341
+ onClick: async (f) => {
342
+ f.stopPropagation(), await A(n);
343
+ }
344
+ }, null, 8, ["onClick"]),
345
+ x(n) ? (u(), h(g, {
324
346
  key: 0,
325
347
  icon: "visibility",
326
348
  "icon-color": "neutral-gray-400",
327
349
  variant: "tertiary",
328
- onClick: async (y) => {
329
- y.stopPropagation(), await t(E).push({
330
- name: t($)["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
350
+ onClick: async (f) => {
351
+ f.stopPropagation(), await t(B).push({
352
+ name: t(K)["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
331
353
  params: { id: n._id }
332
354
  });
333
355
  }
334
- }, null, 8, ["onClick"])) : R("", !0),
335
- x(n) ? (u(), h(C, {
356
+ }, null, 8, ["onClick"])) : L("", !0),
357
+ x(n) ? (u(), h(g, {
336
358
  key: 1,
337
359
  icon: "send",
338
360
  "icon-color": "neutral-gray-400",
339
361
  variant: "tertiary",
340
- onClick: (y) => {
341
- var B;
342
- y.stopPropagation(), (B = t(k)) == null || B.showSheet({
362
+ onClick: (f) => {
363
+ var M;
364
+ f.stopPropagation(), (M = t(V)) == null || M.showSheet({
343
365
  campaignId: n._id
344
366
  });
345
367
  }
346
- }, null, 8, ["onClick"])) : R("", !0),
347
- l(C, {
368
+ }, null, 8, ["onClick"])) : L("", !0),
369
+ l(g, {
348
370
  icon: "delete",
349
371
  "icon-color": "neutral-gray-400",
350
372
  variant: "tertiary",
351
- onClick: (y) => (y.stopPropagation(), A(n))
373
+ onClick: (f) => (f.stopPropagation(), O(n))
352
374
  }, null, 8, ["onClick"])
353
375
  ])
354
376
  ];
@@ -358,37 +380,37 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
358
380
  ]),
359
381
  _: 1
360
382
  })
361
- ], 64)) : (u(), h(ee, {
383
+ ], 64)) : (u(), h(oe, {
362
384
  key: 1,
363
385
  variant: "outlined",
364
386
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
365
387
  }, {
366
- default: T(() => [
388
+ default: R(() => [
367
389
  o[7] || (o[7] = c("img", {
368
- src: ce,
390
+ src: ie,
369
391
  class: "aspect-square w-[150px]"
370
392
  }, null, -1)),
371
- c("div", Pe, [
372
- c("div", Ee, g(t(a)("connect.voucher.createVoucherCampaign")), 1),
373
- c("div", Ie, g(t(a)("connect.voucher.description")), 1)
393
+ c("div", Be, [
394
+ c("div", Oe, v(t(a)("connect.voucher.createVoucherCampaign")), 1),
395
+ c("div", Ae, v(t(a)("connect.voucher.description")), 1)
374
396
  ]),
375
- l(C, {
397
+ l(g, {
376
398
  variant: "primary",
377
399
  label: t(a)("connect.voucher.createVoucherCampaign"),
378
400
  icon: "add",
379
- onClick: o[6] || (o[6] = (n) => _())
401
+ onClick: o[6] || (o[6] = (n) => w())
380
402
  }, null, 8, ["label"])
381
403
  ]),
382
404
  _: 1
383
405
  })),
384
- l(ye, {
406
+ l(_e, {
385
407
  ref_key: "sheetRef",
386
- ref: I,
387
- "onSubmit:modelValue": z
408
+ ref: F,
409
+ "onSubmit:modelValue": Z
388
410
  }, null, 512),
389
- l(ge, {
411
+ l(Ce, {
390
412
  ref_key: "sendVoucherSheetRef",
391
- ref: k
413
+ ref: V
392
414
  }, null, 512)
393
415
  ])
394
416
  ], 64);
@@ -396,5 +418,5 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
396
418
  }
397
419
  });
398
420
  export {
399
- oo as default
421
+ ro as default
400
422
  };
@@ -1,17 +1,17 @@
1
1
  import { defineComponent as B, ref as k, resolveComponent as g, openBlock as d, createBlock as F, withCtx as y, renderSlot as J, createVNode as m, createTextVNode as U, toDisplayString as f, createElementVNode as s, computed as N, createElementBlock as P, Fragment as w, renderList as K, unref as e, normalizeClass as Q, createCommentVNode as I, resolveDynamicComponent as H } from "vue";
2
- import { u as G } from "./vue-i18n-tpDAnnmD.js";
3
- import { c as j } from "./index-CppLPpqB.js";
4
- import { e as W, F as Y } from "./index-Bflu4Rft.js";
5
- import { C as ee } from "./membership-j2w1YUO-.js";
6
- import { Z as V } from "./zod-D-wiCQRJ.js";
7
- import { _ as te } from "./SelectItems.vue_vue_type_script_setup_true_lang-Czx7rqiq.js";
8
- import { u as le } from "./business-BFIwFfkq.js";
2
+ import { u as G } from "./vue-i18n-C1KlZBjR.js";
3
+ import { c as j } from "./index-Cvcgqzy5.js";
4
+ import { e as W, F as Y } from "./index-Bx_lUMxi.js";
5
+ import { C as ee } from "./membership-C_VLzMwg.js";
6
+ import { Z as V } from "./zod-jH-8jgB1.js";
7
+ import { _ as te } from "./SelectItems.vue_vue_type_script_setup_true_lang-iDaC99DI.js";
8
+ import { u as le } from "./business-bUX6raMw.js";
9
9
  import { useCoreStore as oe } from "@feedmepos/mf-common";
10
- import { _ as ne } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CU_Sx2PM.js";
11
- import { _ as ae } from "./ImageInput.vue_vue_type_script_setup_true_lang-DZ8DHrQ_.js";
12
- import { _ as ie, a as se } from "./EffectSheet.vue_vue_type_style_index_0_lang-BZfchHlT.js";
13
- import { _ as me } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-CZkKjUNQ.js";
14
- import { i as re } from "./helper-CCfb24PO.js";
10
+ import { _ as ne } from "./ZodTextField.vue_vue_type_script_setup_true_lang-DNEs_60Z.js";
11
+ import { _ as ae } from "./ImageInput.vue_vue_type_script_setup_true_lang-D3lV7JVV.js";
12
+ import { _ as ie, a as se } from "./EffectSheet.vue_vue_type_style_index_0_lang-BwSXXdG-.js";
13
+ import { _ as me } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-CDgL0WOA.js";
14
+ import { i as re } from "./helper-B9MQjEoz.js";
15
15
  const ue = { class: "flex justify-end gap-8 w-full" }, ce = /* @__PURE__ */ B({
16
16
  __name: "MenuSheet",
17
17
  props: {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as f, useAttrs as y, resolveComponent as b, openBlock as l, createBlock as v, mergeProps as x, unref as t, createSlots as g, withCtx as h, createElementVNode as a, toDisplayString as n, renderSlot as k, createElementBlock as F, createCommentVNode as S } from "vue";
2
- import { Z as d } from "./zod-D-wiCQRJ.js";
3
- import { u as V } from "./vue-i18n-tpDAnnmD.js";
2
+ import { Z as d } from "./zod-jH-8jgB1.js";
3
+ import { u as V } from "./vue-i18n-C1KlZBjR.js";
4
4
  const B = { class: "fm-typo-en-body-lg-400 flex gap-4 text-fm-color-typo-primary items-center" }, C = {
5
5
  key: 0,
6
6
  class: "text-fm-color-typo-tertiary"