@feedmepos/mf-connect 0.1.82-prod → 0.1.83-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 (103) hide show
  1. package/dist/{Analytic-D850nvXy.js → Analytic-1OYb8L9c.js} +11 -11
  2. package/dist/{App-Dwp2SQFt.js → App-oQ4_lEV2.js} +7 -7
  3. package/dist/{Bin-t3dMVk18.js → Bin-CQ8CYWAf.js} +8 -8
  4. package/dist/Broadcast-BLq5lca6.js +265 -0
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CFa7asTL.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-0BKgyMxn.js} +6 -6
  6. package/dist/{Card-DueuT99c.js → Card-BbcMCzvO.js} +19 -19
  7. package/dist/{Collections-D50oEyeZ.js → Collections-0LOyEUoF.js} +8 -8
  8. package/dist/Credit-Crrc3MSu.js +259 -0
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DysfUOSp.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-NtZKuPgi.js} +245 -241
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-L0-aFhRw.js → EffectSheet.vue_vue_type_style_index_0_lang-DQaMkTla.js} +6 -6
  11. package/dist/Experience-DJiUmONI.js +258 -0
  12. package/dist/{FileSaver.min-DH3eS7yi.js → FileSaver.min-CFEGc8v5.js} +1 -1
  13. package/dist/Game-ChHy4S4P.js +329 -0
  14. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BIKcbIag.js → ImageInput.vue_vue_type_script_setup_true_lang-BBavh70d.js} +1 -1
  15. package/dist/{Index-BucLJQqP.js → Index-CL5auUCN.js} +10 -10
  16. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CIoZurPE.js → LottieAnimation.vue_vue_type_script_setup_true_lang-H5IjhmOA.js} +1 -1
  17. package/dist/{MainLayout-DYGrSfgc.js → MainLayout-Bf4G5U5F.js} +1 -1
  18. package/dist/{Marketing-CsAIdNjF.js → Marketing-cNwSm-dt.js} +6 -6
  19. package/dist/{Member-D4HF_VGN.js → Member-fT7a7zFo.js} +11 -11
  20. package/dist/{MemberList-CPoA4ovd.js → MemberList-gEN36Erj.js} +27 -27
  21. package/dist/{MemberTransactions-AMv9NeIb.js → MemberTransactions-C4YgiUw-.js} +1 -1
  22. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhhSwnK0.js → MessageInput.vue_vue_type_script_setup_true_lang-BNDrmYqp.js} +9 -9
  23. package/dist/Mission-Bz9P2pjX.js +333 -0
  24. package/dist/{Overview-ByO2p2Wx.js → Overview-BG3Z7Daz.js} +19 -19
  25. package/dist/Point-BBeSJ5p5.js +261 -0
  26. package/dist/Promotion-VmaOESn2.js +390 -0
  27. package/dist/{Queue-BD29Mmbf.js → Queue-DKtUhOBh.js} +11 -11
  28. package/dist/{Record-CNLiN6YR.js → Record-Cb45m9I8.js} +9 -9
  29. package/dist/{Reward-Ceo3M1yD.js → Reward-D_uvCEMe.js} +16 -16
  30. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CJWQEL9W.js → RewardGroup.vue_vue_type_script_setup_true_lang-yUUMGEUJ.js} +12 -12
  31. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CWuWGs6r.js → RuleGroup.vue_vue_type_script_setup_true_lang-CIb7igvo.js} +15 -15
  32. package/dist/{Segment-BOQUlP-m.js → Segment-BJ8XUyeG.js} +25 -25
  33. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BcXeiz0p.js → SelectItems.vue_vue_type_script_setup_true_lang-ht4qyiQM.js} +2 -2
  34. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CJ--FC-i.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DC6OQ7Zb.js} +12 -12
  35. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-9emjG6Nc.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-i_BRgBRC.js} +4 -4
  36. package/dist/{Setting-CWapXD31.js → Setting-CS1wSxO9.js} +14 -14
  37. package/dist/{SettingAdvertisements-QEf2eyem.js → SettingAdvertisements-CWP7VthZ.js} +12 -12
  38. package/dist/{Store-Bfm2olbH.js → Store-cy0uZfSE.js} +22 -22
  39. package/dist/{StoreRewards-DNDkyxxn.js → StoreRewards-DDAvmlEn.js} +15 -15
  40. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-zKLbY4Qb.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CevWXAb6.js} +20 -20
  41. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D3-wIOQ7.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CPJ4fCu-.js} +1 -1
  42. package/dist/{Tier-uC45o2AK.js → Tier-CUT_0eYp.js} +22 -22
  43. package/dist/{Title-zDjlDJCB.js → Title-DcelZU7H.js} +20 -20
  44. package/dist/{Transaction-Bo9FEjMQ.js → Transaction-CwcJnFIO.js} +2 -2
  45. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BR5F0bWS.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BuDS-vUd.js} +6 -6
  46. package/dist/{Voucher-B7BTa4Vt.js → Voucher-z6o5rwFx.js} +162 -141
  47. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CjrjJW7x.js → VoucherEditor.vue_vue_type_script_setup_true_lang-FVdeM5pH.js} +12 -12
  48. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DeAkLgaX.js → ZodTextField.vue_vue_type_script_setup_true_lang-BGuVeHZU.js} +2 -2
  49. package/dist/{app-CkUBXnib.js → app-BUFlIAB5.js} +73 -43
  50. package/dist/app.js +1 -1
  51. package/dist/{business-C8P05bjQ.js → business-CEL6Cxr7.js} +1 -1
  52. package/dist/{campaign-DcLhSQVQ.js → campaign-Bz3O-DFr.js} +1 -1
  53. package/dist/{campaign-CyYAvl3p.js → campaign-CfB7ZWIg.js} +8 -8
  54. package/dist/{campaign.enum-h6B-mP82.js → campaign.enum-CCKHGvL9.js} +1 -1
  55. package/dist/{campaign.fn-CStjDAoU.js → campaign.fn-Cu0sRSpP.js} +114 -114
  56. package/dist/{collectible.enum-DT-wjl-a.js → collectible.enum-DeWSJ9OK.js} +1 -1
  57. package/dist/{collection.fn-14o3RW2e.js → collection.fn-hPDt2qvz.js} +2 -2
  58. package/dist/{dto-Bv09Baex.js → dto-BKwcpb4T.js} +4 -4
  59. package/dist/{effect-CF0s7QWQ.js → effect-D070CPN_.js} +1 -1
  60. package/dist/{email-addresses-B5qrHbxg.js → email-addresses-C0fE6EMy.js} +2 -2
  61. package/dist/{export-B6nvdBmg.js → export-CG1ypExs.js} +3 -3
  62. package/dist/{helper-B4-2ut7E.js → helper-C9NBolO7.js} +1 -1
  63. package/dist/{index-B-y0UTZw.js → index-4gCsL8Hl.js} +6 -6
  64. package/dist/{index-D5xt8OjL.js → index-6rFsv3Yg.js} +1 -1
  65. package/dist/{index-BebGg-0n.js → index-B30LtrWw.js} +1 -1
  66. package/dist/{index-DVb99_67.js → index-B613auFn.js} +1 -1
  67. package/dist/{index-HhVIn4Bn.js → index-BGi7UFjn.js} +1 -1
  68. package/dist/{index-DzQjej5Y.js → index-BXSp11TE.js} +4 -4
  69. package/dist/{index-DRX9TTMn.js → index-CM-qkxMr.js} +3 -3
  70. package/dist/{index-DesSizn4.js → index-CZoTFXja.js} +3 -3
  71. package/dist/{index-DG_Ej3ec.js → index-D7AT7i0e.js} +3 -3
  72. package/dist/{index-DIQ2MyWF.js → index-DDMr6_UT.js} +4 -4
  73. package/dist/{index-XDg25M5a.js → index-DGNPGZh4.js} +1 -1
  74. package/dist/{index-CR8brl_k.js → index-DLnZyneY.js} +1 -1
  75. package/dist/{index-Ct90ybe0.js → index-DcfdUpTw.js} +1 -1
  76. package/dist/{index.esm2017-1A2eV8x_.js → index.esm2017-D0u5JnGx.js} +1 -1
  77. package/dist/{loading-B0_BwPgo.js → loading-Rn4BXFlo.js} +1 -1
  78. package/dist/{lodash-DxIglhqk.js → lodash-Ds-QoR_N.js} +1 -1
  79. package/dist/{membership-H_whlbUP.js → membership-BjklIT2n.js} +3 -3
  80. package/dist/{money-DEE8QW6m.js → money-DMyZXL-e.js} +1 -1
  81. package/dist/{number-BmN5A4Cu.js → number-Cyny8l0t.js} +1 -1
  82. package/dist/{objectid-B8LZDZOt.js → objectid-Bs1Sha1n.js} +6 -6
  83. package/dist/{plugins-DTrOHd7d.js → plugins-BdQ8LmZm.js} +3 -3
  84. package/dist/{reward-CsJhkkaT.js → reward-ZGs3fpY1.js} +1 -1
  85. package/dist/{rule-ByMxYH4c.js → rule-BH0ICJcx.js} +3 -3
  86. package/dist/{rule-builder-DwGwUlV1.js → rule-builder-D2sz7Xd9.js} +1 -1
  87. package/dist/template-_QJbP7yG.js +236 -0
  88. package/dist/{timezone-Bpe-fhwZ.js → timezone-ulqdIvC-.js} +2 -2
  89. package/dist/{trigger-CEprJYiD.js → trigger-BiXZCT3j.js} +5 -5
  90. package/dist/{usePagination-Du6qS5aj.js → usePagination-Ck7buuI_.js} +1 -1
  91. package/dist/{user-Be8HNWuo.js → user-BWTfkoD6.js} +1 -1
  92. package/dist/{vue-i18n-fg0FtbNR.js → vue-i18n-CmMTYitu.js} +158 -158
  93. package/dist/{xlsx-CSQJ3YWk.js → xlsx-BF8PJO-P.js} +1 -1
  94. package/dist/{zod-BB7zZ5ec.js → zod-C5iXeYjP.js} +1 -1
  95. package/package.json +1 -1
  96. package/dist/Broadcast-DORnkgZc.js +0 -232
  97. package/dist/Credit-CIWSRGuJ.js +0 -225
  98. package/dist/Experience-qABtjxNP.js +0 -224
  99. package/dist/Game-D67q1zKd.js +0 -299
  100. package/dist/Mission-CRinLn7e.js +0 -303
  101. package/dist/Point-4JqzbNgP.js +0 -227
  102. package/dist/Promotion-DlWVF6hF.js +0 -358
  103. package/dist/template-Bdwy6QXF.js +0 -188
@@ -1,70 +1,70 @@
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-DTrOHd7d.js";
6
- import { useCoreStore as me } from "@feedmepos/mf-common";
7
- import { u as ue } from "./loading-B0_BwPgo.js";
8
- import { u as de } from "./business-C8P05bjQ.js";
9
- import { u as pe, c as b } from "./campaign-DcLhSQVQ.js";
10
- import { g as fe, a as M, b as H } from "./campaign-CyYAvl3p.js";
11
- import "./index-XDg25M5a.js";
12
- import { u as he } from "./template-Bdwy6QXF.js";
13
- import { _ as ye } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DysfUOSp.js";
14
- import { _ as ge } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-9emjG6Nc.js";
15
- import { u as _e } from "./vue-i18n-fg0FtbNR.js";
16
- import { T as ve } from "./trigger-CEprJYiD.js";
17
- import { useRouter as Ce } from "vue-router";
18
- import { R as $ } from "./app-CkUBXnib.js";
19
- var be = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", licensePortalUrl: "https://license.feedme.cc/", marketingV1Portal: "https://marketing-v1.feedme.cc", voucherAppUrl: "https://voucher.feedme.cc/" };
20
- 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" }, eo = /* @__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 _ } 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-BdQ8LmZm.js";
6
+ import { useCoreStore as ue } from "@feedmepos/mf-common";
7
+ import { u as de } from "./loading-Rn4BXFlo.js";
8
+ import { u as pe } from "./business-CEL6Cxr7.js";
9
+ import { u as fe, c as v } from "./campaign-Bz3O-DFr.js";
10
+ import { g as ye, a as $, b as D } from "./campaign-CfB7ZWIg.js";
11
+ import { c as he, p as ge, u as _e } from "./template-_QJbP7yG.js";
12
+ import "./index-DGNPGZh4.js";
13
+ import { _ as ve } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-NtZKuPgi.js";
14
+ import { _ as Ce } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-i_BRgBRC.js";
15
+ import { u as we } from "./vue-i18n-CmMTYitu.js";
16
+ import { T as be } from "./trigger-BiXZCT3j.js";
17
+ import { useRouter as ke } from "vue-router";
18
+ import { R as K } from "./app-BUFlIAB5.js";
19
+ var xe = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", licensePortalUrl: "https://license.feedme.cc/", marketingV1Portal: "https://marketing-v1.feedme.cc", voucherAppUrl: "https://voucher.feedme.cc/" };
20
+ 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" }, no = /* @__PURE__ */ te({
21
21
  __name: "Voucher",
22
- setup(Ae) {
23
- const { t: a } = _e(), K = {
22
+ setup(Me) {
23
+ const { t: a } = we(), N = {
24
24
  label: a("connect.voucher.createCampaign"),
25
25
  value: "create",
26
26
  isPrimary: !0,
27
27
  prependIcon: "add"
28
- }, L = ie(), N = he("VOUCHER", L), D = de(), f = pe(), { global: j, minor: P } = ue, E = Ce(), i = V({
28
+ }, I = se(), j = _e("VOUCHER", I), q = pe(), y = fe(), { global: G, minor: E } = de, B = ke(), s = U({
29
29
  searchKey: "",
30
30
  location: [],
31
31
  triggerType: []
32
- }), _ = te(
33
- () => f.campaigns.voucher.filter(
34
- (e) => G(e) && X(e)
32
+ }), C = ne(
33
+ () => y.campaigns.voucher.filter(
34
+ (e) => W(e) && z(e)
35
35
  )
36
- ), q = ve.VOUCHER.map((e) => ({
36
+ ), X = be.VOUCHER.map((e) => ({
37
37
  label: e.name,
38
38
  value: e.value
39
39
  }));
40
- function G(e) {
41
- const o = i.value.location;
40
+ function W(e) {
41
+ const o = s.value.location;
42
42
  return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some(
43
43
  (r) => {
44
- var s;
45
- return (s = e == null ? void 0 : e.targetLocation) == null ? void 0 : s.includes(r);
44
+ var i;
45
+ return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(r);
46
46
  }
47
47
  ) : e.targetLocation.includes(o);
48
48
  }
49
- function w(e) {
49
+ function k(e) {
50
50
  return e.hideInApp === !1;
51
51
  }
52
52
  function x(e) {
53
- return e.event.type === "SIMPLE_CLAIM" && !w(e);
53
+ return e.event.type === "SIMPLE_CLAIM" && !k(e);
54
54
  }
55
- function X(e) {
56
- const o = i.value.triggerType;
55
+ function z(e) {
56
+ const o = s.value.triggerType;
57
57
  if (!o || o.length === 0) return !0;
58
58
  const r = e.event.type;
59
59
  return o.includes(r);
60
60
  }
61
- const W = [
61
+ const Q = [
62
62
  {
63
63
  header: a("connect.voucher.voucherTitle"),
64
64
  accessorFn: (e) => e.name,
65
65
  cell(e) {
66
66
  const o = [e.row.original.name];
67
- return w(e.row.original) && o.push(
67
+ return k(e.row.original) && o.push(
68
68
  m(p.FmChip, {
69
69
  label: "Feedvibe",
70
70
  class: "text-fm-color-primary bg-fm-color-system-warning-100",
@@ -75,14 +75,14 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
75
75
  },
76
76
  {
77
77
  header: a("connect.voucher.status"),
78
- accessorFn: (e) => fe(e),
78
+ accessorFn: (e) => ye(e),
79
79
  cell(e) {
80
- return M(e.row.original);
80
+ return $(e.row.original);
81
81
  }
82
82
  },
83
83
  {
84
84
  header: a("connect.voucher.summary"),
85
- accessorFn: (e) => H(e)
85
+ accessorFn: (e) => D(e)
86
86
  },
87
87
  {
88
88
  header: a("connect.voucher.quota"),
@@ -107,8 +107,8 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
107
107
  variant: "tertiary",
108
108
  iconColor: "neutral-gray-400",
109
109
  onClick: async (o) => {
110
- o.stopPropagation(), await E.push({
111
- name: $["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
110
+ o.stopPropagation(), await B.push({
111
+ name: K["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
112
112
  params: { id: e.row.original._id }
113
113
  });
114
114
  }
@@ -129,11 +129,17 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
129
129
  }),
130
130
  default: () => {
131
131
  const o = [
132
+ m(p.FmMenuItem, {
133
+ label: a("connect.voucher.duplicate"),
134
+ onClick: async (r) => {
135
+ r.stopPropagation(), await A(e.row.original);
136
+ }
137
+ }),
132
138
  m(
133
139
  p.FmMenuItem,
134
140
  {
135
141
  onClick: async (r) => {
136
- r.stopPropagation(), A(e.row.original);
142
+ r.stopPropagation(), O(e.row.original);
137
143
  }
138
144
  },
139
145
  {
@@ -151,8 +157,8 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
151
157
  m(p.FmMenuItem, {
152
158
  label: a("connect.voucher.send"),
153
159
  onClick: async (r) => {
154
- var s;
155
- r.stopPropagation(), (s = k.value) == null || s.showSheet({
160
+ var i;
161
+ r.stopPropagation(), (i = V.value) == null || i.showSheet({
156
162
  campaignId: e.row.original._id
157
163
  });
158
164
  }
@@ -161,8 +167,8 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
161
167
  m(p.FmMenuItem, {
162
168
  label: a("connect.voucher.share"),
163
169
  onClick: async (r) => {
164
- r.stopPropagation(), await se(
165
- `https://${me().currentBusiness.value._id}.${be.appUrl}/vouchers/${e.row.original._id}`,
170
+ r.stopPropagation(), await le(
171
+ `https://${ue().currentBusiness.value._id}.${xe.appUrl}/vouchers/${e.row.original._id}`,
166
172
  {
167
173
  successMessage: "Voucher link copied to clipboard"
168
174
  }
@@ -176,11 +182,11 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
176
182
  ]);
177
183
  }
178
184
  }
179
- ], I = V(), k = V();
180
- async function A(e) {
181
- await le.remove(a("connect.voucher.confirmRemove", { name: e.name })) && await P(
185
+ ], F = U(), V = U();
186
+ async function O(e) {
187
+ await me.remove(a("connect.voucher.confirmRemove", { name: e.name })) && await E(
182
188
  async () => {
183
- await b.delete(e._id), await f.read("VOUCHER");
189
+ await v.delete(e._id), await y.read("VOUCHER");
184
190
  },
185
191
  {
186
192
  message: a("connect.voucher.removing", { name: e.name }),
@@ -190,23 +196,30 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
190
196
  }
191
197
  );
192
198
  }
193
- async function v(e) {
194
- e ? await o() : N.open(async (r) => {
195
- await o(r);
199
+ async function w(e) {
200
+ e ? await o(await v.readById(e._id)) : j.open(async (r) => {
201
+ await o(void 0, r);
196
202
  });
197
- async function o(r) {
198
- var s;
199
- (s = I.value) == null || s.showSheet(
200
- !0,
201
- "VOUCHER",
202
- e ? await b.readById(e._id) : void 0,
203
- r
204
- );
203
+ async function o(r, i) {
204
+ var b;
205
+ (b = F.value) == null || b.showSheet(!0, "VOUCHER", r, i);
205
206
  }
206
207
  }
207
- async function z(e) {
208
+ async function A(e) {
209
+ var i;
210
+ if (!await he(e.name))
211
+ return;
212
+ const o = await v.readById(e._id), r = ge(o);
213
+ (i = F.value) == null || i.showSheet(
214
+ !0,
215
+ "VOUCHER",
216
+ r,
217
+ o.template
218
+ );
219
+ }
220
+ async function Z(e) {
208
221
  e.campaign._id && await new Promise((o) => {
209
- L.open({
222
+ I.open({
210
223
  title: "Confirmation",
211
224
  message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
212
225
  primaryActions: { text: "Update all", close: !0 },
@@ -217,9 +230,9 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
217
230
  }).onSecondary(async () => {
218
231
  o();
219
232
  });
220
- }), await P(
233
+ }), await E(
221
234
  async () => {
222
- e.campaign._id ? await b.update(e.campaign._id, e) : await b.create(e), await f.read("VOUCHER");
235
+ e.campaign._id ? await v.update(e.campaign._id, e) : await v.create(e), await y.read("VOUCHER");
223
236
  },
224
237
  {
225
238
  message: a(
@@ -231,123 +244,131 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
231
244
  }
232
245
  );
233
246
  }
234
- return ne(async () => {
235
- await j(async () => {
236
- await f.read("VOUCHER");
247
+ return ae(async () => {
248
+ await G(async () => {
249
+ await y.read("VOUCHER");
237
250
  });
238
251
  }), (e, o) => {
239
- 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");
240
- return u(), S(U, null, [
252
+ 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");
253
+ return u(), T(P, null, [
241
254
  l(r, {
242
255
  title: t(a)("connect.voucher.title"),
243
- actions: t(_).length > 0 ? [K] : [],
244
- "onClick:action": o[0] || (o[0] = () => v())
256
+ actions: t(C).length > 0 ? [N] : [],
257
+ "onClick:action": o[0] || (o[0] = () => w())
245
258
  }, null, 8, ["title", "actions"]),
246
- c("div", we, [
247
- l(s, {
248
- modelValue: t(i).searchKey,
249
- "onUpdate:modelValue": o[1] || (o[1] = (n) => t(i).searchKey = n),
259
+ c("div", Fe, [
260
+ l(i, {
261
+ modelValue: t(s).searchKey,
262
+ "onUpdate:modelValue": o[1] || (o[1] = (n) => t(s).searchKey = n),
250
263
  class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
251
264
  placeholder: t(a)("connect.voucher.search"),
252
265
  collapsible: ""
253
266
  }, null, 8, ["modelValue", "placeholder"]),
254
- t(f).campaigns.voucher && t(f).campaigns.voucher.length > 0 ? (u(), S(U, { key: 0 }, [
255
- c("div", xe, [
256
- c("div", ke, [
257
- l(O, {
267
+ t(y).campaigns.voucher && t(y).campaigns.voucher.length > 0 ? (u(), T(P, { key: 0 }, [
268
+ c("div", Ve, [
269
+ c("div", Se, [
270
+ l(H, {
258
271
  label: `${t(a)("connect.common.location")}: `,
259
272
  "right-icon": "keyboard_arrow_down",
260
- modelValue: t(i).location,
261
- "onUpdate:modelValue": o[2] || (o[2] = (n) => t(i).location = n),
273
+ modelValue: t(s).location,
274
+ "onUpdate:modelValue": o[2] || (o[2] = (n) => t(s).location = n),
262
275
  icon: "storefront",
263
276
  "show-item-label": !0,
264
- items: t(D).locationOptions
277
+ items: t(q).locationOptions
265
278
  }, null, 8, ["label", "modelValue", "items"]),
266
- l(O, {
279
+ l(H, {
267
280
  label: "Type:",
268
281
  "right-icon": "keyboard_arrow_down",
269
- modelValue: t(i).triggerType,
270
- "onUpdate:modelValue": o[3] || (o[3] = (n) => t(i).triggerType = n),
282
+ modelValue: t(s).triggerType,
283
+ "onUpdate:modelValue": o[3] || (o[3] = (n) => t(s).triggerType = n),
271
284
  icon: "filter_list",
272
285
  "show-item-label": !0,
273
- items: t(q)
286
+ items: t(X)
274
287
  }, null, 8, ["modelValue", "items"])
275
288
  ]),
276
- l(s, {
277
- modelValue: t(i).searchKey,
278
- "onUpdate:modelValue": o[4] || (o[4] = (n) => t(i).searchKey = n),
289
+ l(i, {
290
+ modelValue: t(s).searchKey,
291
+ "onUpdate:modelValue": o[4] || (o[4] = (n) => t(s).searchKey = n),
279
292
  class: "xs:hidden sm:hidden",
280
293
  placeholder: t(a)("connect.voucher.search"),
281
294
  collapsible: ""
282
295
  }, null, 8, ["modelValue", "placeholder"])
283
296
  ]),
284
- l(Q, {
297
+ l(b, {
285
298
  class: "xs:hidden sm:hidden",
286
- "row-data": t(_),
287
- "column-defs": W,
288
- "search-value": t(i).searchKey,
299
+ "row-data": t(C),
300
+ "column-defs": Q,
301
+ "search-value": t(s).searchKey,
289
302
  "column-filter": [],
290
- onRowClick: o[5] || (o[5] = (n) => v(n.original)),
291
- "hide-footer": t(_).length < 10
303
+ onRowClick: o[5] || (o[5] = (n) => w(n.original)),
304
+ "hide-footer": t(C).length < 10
292
305
  }, null, 8, ["row-data", "search-value", "hide-footer"]),
293
- l(Y, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
294
- default: T(() => [
295
- (u(!0), S(U, null, ae(t(_).filter(
296
- (n) => n.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
297
- ), (n) => (u(), h(J, {
306
+ l(ee, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
307
+ default: R(() => [
308
+ (u(!0), T(P, null, re(t(C).filter(
309
+ (n) => n.name.toLowerCase().includes(t(s).searchKey.toLowerCase())
310
+ ), (n) => (u(), h(Y, {
298
311
  key: n._id.toString(),
299
- onClick: (F) => v(n),
312
+ onClick: (S) => w(n),
300
313
  class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
301
314
  }, {
302
- default: T(() => {
303
- var F;
315
+ default: R(() => {
316
+ var S;
304
317
  return [
305
- c("div", Fe, [
306
- c("div", Ve, [
307
- (u(), h(re(t(M)(n)))),
308
- w(n) ? (u(), h(Z, {
318
+ c("div", Ue, [
319
+ c("div", Te, [
320
+ (u(), h(ce(t($)(n)))),
321
+ k(n) ? (u(), h(J, {
309
322
  key: 0,
310
323
  label: "Feedvibe",
311
324
  class: "text-fm-color-primary bg-fm-color-system-warning-100",
312
325
  compact: ""
313
- })) : R("", !0),
314
- c("div", Se, g(((F = n.pf_collectible) == null ? void 0 : F.currentReceive) ?? 0) + " claimed ", 1)
326
+ })) : L("", !0),
327
+ c("div", Pe, _(((S = n.pf_collectible) == null ? void 0 : S.currentReceive) ?? 0) + " claimed ", 1)
315
328
  ]),
316
- c("div", Ue, [
317
- c("div", Te, g(n.name), 1),
318
- c("div", Re, g(t(H)(n)), 1)
329
+ c("div", Re, [
330
+ c("div", Le, _(n.name), 1),
331
+ c("div", Ie, _(t(D)(n)), 1)
319
332
  ])
320
333
  ]),
321
- c("div", Le, [
322
- x(n) ? (u(), h(C, {
334
+ c("div", Ee, [
335
+ l(g, {
336
+ icon: "content_copy",
337
+ "icon-color": "neutral-gray-400",
338
+ variant: "tertiary",
339
+ onClick: async (f) => {
340
+ f.stopPropagation(), await A(n);
341
+ }
342
+ }, null, 8, ["onClick"]),
343
+ x(n) ? (u(), h(g, {
323
344
  key: 0,
324
345
  icon: "visibility",
325
346
  "icon-color": "neutral-gray-400",
326
347
  variant: "tertiary",
327
- onClick: async (y) => {
328
- y.stopPropagation(), await t(E).push({
329
- name: t($)["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
348
+ onClick: async (f) => {
349
+ f.stopPropagation(), await t(B).push({
350
+ name: t(K)["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
330
351
  params: { id: n._id }
331
352
  });
332
353
  }
333
- }, null, 8, ["onClick"])) : R("", !0),
334
- x(n) ? (u(), h(C, {
354
+ }, null, 8, ["onClick"])) : L("", !0),
355
+ x(n) ? (u(), h(g, {
335
356
  key: 1,
336
357
  icon: "send",
337
358
  "icon-color": "neutral-gray-400",
338
359
  variant: "tertiary",
339
- onClick: (y) => {
340
- var B;
341
- y.stopPropagation(), (B = t(k)) == null || B.showSheet({
360
+ onClick: (f) => {
361
+ var M;
362
+ f.stopPropagation(), (M = t(V)) == null || M.showSheet({
342
363
  campaignId: n._id
343
364
  });
344
365
  }
345
- }, null, 8, ["onClick"])) : R("", !0),
346
- l(C, {
366
+ }, null, 8, ["onClick"])) : L("", !0),
367
+ l(g, {
347
368
  icon: "delete",
348
369
  "icon-color": "neutral-gray-400",
349
370
  variant: "tertiary",
350
- onClick: (y) => (y.stopPropagation(), A(n))
371
+ onClick: (f) => (f.stopPropagation(), O(n))
351
372
  }, null, 8, ["onClick"])
352
373
  ])
353
374
  ];
@@ -357,37 +378,37 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
357
378
  ]),
358
379
  _: 1
359
380
  })
360
- ], 64)) : (u(), h(ee, {
381
+ ], 64)) : (u(), h(oe, {
361
382
  key: 1,
362
383
  variant: "outlined",
363
384
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
364
385
  }, {
365
- default: T(() => [
386
+ default: R(() => [
366
387
  o[7] || (o[7] = c("img", {
367
- src: ce,
388
+ src: ie,
368
389
  class: "aspect-square w-[150px]"
369
390
  }, null, -1)),
370
- c("div", Pe, [
371
- c("div", Ee, g(t(a)("connect.voucher.createVoucherCampaign")), 1),
372
- c("div", Ie, g(t(a)("connect.voucher.description")), 1)
391
+ c("div", Be, [
392
+ c("div", Oe, _(t(a)("connect.voucher.createVoucherCampaign")), 1),
393
+ c("div", Ae, _(t(a)("connect.voucher.description")), 1)
373
394
  ]),
374
- l(C, {
395
+ l(g, {
375
396
  variant: "primary",
376
397
  label: t(a)("connect.voucher.createVoucherCampaign"),
377
398
  icon: "add",
378
- onClick: o[6] || (o[6] = (n) => v())
399
+ onClick: o[6] || (o[6] = (n) => w())
379
400
  }, null, 8, ["label"])
380
401
  ]),
381
402
  _: 1
382
403
  })),
383
- l(ye, {
404
+ l(ve, {
384
405
  ref_key: "sheetRef",
385
- ref: I,
386
- "onSubmit:modelValue": z
406
+ ref: F,
407
+ "onSubmit:modelValue": Z
387
408
  }, null, 512),
388
- l(ge, {
409
+ l(Ce, {
389
410
  ref_key: "sendVoucherSheetRef",
390
- ref: k
411
+ ref: V
391
412
  }, null, 512)
392
413
  ])
393
414
  ], 64);
@@ -395,5 +416,5 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
395
416
  }
396
417
  });
397
418
  export {
398
- eo as default
419
+ no as default
399
420
  };
@@ -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-fg0FtbNR.js";
3
- import { c as j } from "./index-DRX9TTMn.js";
4
- import { e as W, F as Y } from "./index-DesSizn4.js";
5
- import { C as ee } from "./membership-H_whlbUP.js";
6
- import { Z as V } from "./zod-BB7zZ5ec.js";
7
- import { _ as te } from "./SelectItems.vue_vue_type_script_setup_true_lang-BcXeiz0p.js";
8
- import { u as le } from "./business-C8P05bjQ.js";
2
+ import { u as G } from "./vue-i18n-CmMTYitu.js";
3
+ import { c as j } from "./index-CM-qkxMr.js";
4
+ import { e as W, F as Y } from "./index-CZoTFXja.js";
5
+ import { C as ee } from "./membership-BjklIT2n.js";
6
+ import { Z as V } from "./zod-C5iXeYjP.js";
7
+ import { _ as te } from "./SelectItems.vue_vue_type_script_setup_true_lang-ht4qyiQM.js";
8
+ import { u as le } from "./business-CEL6Cxr7.js";
9
9
  import { useCoreStore as oe } from "@feedmepos/mf-common";
10
- import { _ as ne } from "./ZodTextField.vue_vue_type_script_setup_true_lang-DeAkLgaX.js";
11
- import { _ as ae } from "./ImageInput.vue_vue_type_script_setup_true_lang-BIKcbIag.js";
12
- import { _ as ie, a as se } from "./EffectSheet.vue_vue_type_style_index_0_lang-L0-aFhRw.js";
13
- import { _ as me } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-D3-wIOQ7.js";
14
- import { i as re } from "./helper-B4-2ut7E.js";
10
+ import { _ as ne } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BGuVeHZU.js";
11
+ import { _ as ae } from "./ImageInput.vue_vue_type_script_setup_true_lang-BBavh70d.js";
12
+ import { _ as ie, a as se } from "./EffectSheet.vue_vue_type_style_index_0_lang-DQaMkTla.js";
13
+ import { _ as me } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-CPJ4fCu-.js";
14
+ import { i as re } from "./helper-C9NBolO7.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-BB7zZ5ec.js";
3
- import { u as V } from "./vue-i18n-fg0FtbNR.js";
2
+ import { Z as d } from "./zod-C5iXeYjP.js";
3
+ import { u as V } from "./vue-i18n-CmMTYitu.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"