@feedmepos/mf-connect 0.1.36-prod → 0.1.38-beta.1

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 (113) hide show
  1. package/dist/Analytic-O-qZWrFp.js +761 -0
  2. package/dist/{App-JwvQzmaf.js → App-BWZ2EE71.js} +364 -352
  3. package/dist/AuditLogs-DlmcFEta.js +1887 -0
  4. package/dist/{Bin-Boq091DE.js → Bin-C-Ha-4yF.js} +8 -8
  5. package/dist/{Broadcast-D7BIjPzg.js → Broadcast-Bo3QS8lS.js} +27 -25
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-ZFe69JWe.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-4vUMzH-l.js} +18 -18
  7. package/dist/{Card-C7v8otBk.js → Card-Bs1TDE0e.js} +159 -159
  8. package/dist/{Collections-C_pyDZJp.js → Collections-Dy5RN7Js.js} +103 -91
  9. package/dist/{Credit-B6I7vIo2.js → Credit-Bqc4dw1s.js} +74 -74
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DHQBxqsk.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D6AmN3o3.js} +490 -488
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-cqK2WTuO.js → EffectSheet.vue_vue_type_style_index_0_lang-BzwADnKp.js} +91 -89
  13. package/dist/{Experience-RU6iI7eH.js → Experience-C2e2T7B-.js} +42 -42
  14. package/dist/{FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js → FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js} +2 -6
  15. package/dist/{Game-B9Ojuamc.js → Game-C86eEhcx.js} +32 -32
  16. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
  17. package/dist/{Index-Dv-YN9YC.js → Index-BRGweFco.js} +10 -10
  18. package/dist/Marketing-CnnrnXbS.js +20073 -0
  19. package/dist/{Member-BX81V3ON.js → Member-B3o0Zhcw.js} +76 -76
  20. package/dist/MemberList-BpE1IjED.js +1606 -0
  21. package/dist/MemberOverview-wL_ailso.js +58 -0
  22. package/dist/{MemberTransactions-C0FinB5E.js → MemberTransactions-C4hao-d9.js} +1 -1
  23. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DZS17c8D.js → MessageInput.vue_vue_type_script_setup_true_lang-D9zfmqLs.js} +36 -36
  24. package/dist/{Mission-BV76Qq3Y.js → Mission-BURXfzjd.js} +21 -21
  25. package/dist/{Overview-CMK4VRZl.js → Overview-D_hrrM4O.js} +335 -335
  26. package/dist/{Point-CQWKh1jv.js → Point-CJXkJY5Q.js} +43 -41
  27. package/dist/Promotion-CunJrh42.js +289 -0
  28. package/dist/{Queue-CFNfJSux.js → Queue-v5Itg9J4.js} +52 -52
  29. package/dist/{Record-7_ssnQnB.js → Record-DJe4tg9R.js} +9 -9
  30. package/dist/{Reward-DOe1Tn2f.js → Reward-Y9aHpny5.js} +173 -173
  31. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BsgR-dCL.js → RewardGroup.vue_vue_type_script_setup_true_lang-1KAjCblO.js} +11 -11
  32. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BPw5L06B.js → RuleGroup.vue_vue_type_script_setup_true_lang-Cr99ikbK.js} +635 -548
  33. package/dist/Segment-DVT8uDn8.js +882 -0
  34. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DPsLdEU8.js → SelectItems.vue_vue_type_script_setup_true_lang-BhJ-oVMb.js} +2 -2
  35. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BAJLRxOM.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-b5bjfBvc.js} +11 -11
  36. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DUUzFkIc.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DoKAgSLE.js} +3 -3
  37. package/dist/{Setting-Bojfmtwf.js → Setting-BU5778gG.js} +432 -432
  38. package/dist/{Store-dfiUtq-f.js → Store-IWg0POAU.js} +211 -211
  39. package/dist/StoreRewards-CIjHcVoh.js +423 -0
  40. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cx05-OPF.js +1029 -0
  41. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D8ey57Te.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BcOvr526.js} +1 -1
  42. package/dist/{Tier-BIDShXJ6.js → Tier-iN30KD7g.js} +107 -107
  43. package/dist/{Title-CDdkVwEu.js → Title-Duh_Srek.js} +133 -131
  44. package/dist/{Transaction-lAUnd1c_.js → Transaction-DLBA7Svl.js} +2 -2
  45. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BwaD8Nwy.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DLD5d43d.js} +6 -6
  46. package/dist/{Voucher-BARDbixZ.js → Voucher-cTvlMN0Y.js} +153 -123
  47. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DkjojUvD.js +419 -0
  48. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CIk3GKLH.js → ZodTextField.vue_vue_type_script_setup_true_lang-C5S-bi5J.js} +1 -1
  49. package/dist/{app-Cq8zUKBx.js → app-A3oEKLq5.js} +1 -1
  50. package/dist/{app-KtD-iU16.js → app-De-yQ1CJ.js} +164 -125
  51. package/dist/app.js +4 -3
  52. package/dist/business-B2JBpm4y.js +79 -0
  53. package/dist/{campaign-NqTts9bj.js → campaign-Bhur0NJx.js} +9 -9
  54. package/dist/{campaign-DwArKZ1r.js → campaign-vkzui6F2.js} +5 -3
  55. package/dist/{campaign.enum-DQayyk1f.js → campaign.enum-DCYkKGhd.js} +1 -1
  56. package/dist/{campaign.fn-6uf_Z5m1.js → campaign.fn--affTEi5.js} +161 -161
  57. package/dist/{collectible.enum-CgjtJh8V.js → collectible.enum-CLBCnfev.js} +1 -1
  58. package/dist/{collection.fn-DuqcY399.js → collection.fn-bA8q0KYy.js} +2 -2
  59. package/dist/{dto-CQRn2lAW.js → dto-RCcWeYE0.js} +4 -4
  60. package/dist/{effect-B-sUUnjd.js → effect-D7qRfPe_.js} +1 -1
  61. package/dist/{email-addresses-D-kPsNBn.js → email-addresses-a8PqViID.js} +1 -1
  62. package/dist/{export-B28oHptg.js → export-BneqNRn4.js} +3 -3
  63. package/dist/{helper-DuBp_oW-.js → helper-DfvvxOyO.js} +1 -1
  64. package/dist/{index-CCNfzZ5t.js → index-2LpkG8Ye.js} +1 -1
  65. package/dist/{index-C2wsUy05.js → index-4kMeSNTr.js} +11447 -10969
  66. package/dist/{index-BgdUU6Za.js → index-B0T9GDIZ.js} +1 -1
  67. package/dist/{index-CczG_ilB.js → index-BWTvsoH0.js} +1 -1
  68. package/dist/index-CMBPIb8x.js +32260 -0
  69. package/dist/{index-DF4V4vur.js → index-CTKMdxSm.js} +1 -1
  70. package/dist/index-CVAWGMus.js +56 -0
  71. package/dist/index-CbsJ6vMJ.js +31 -0
  72. package/dist/{index-CSWnS__O.js → index-CrFUhsZO.js} +1 -1
  73. package/dist/index-CsaQJMAR.js +66 -0
  74. package/dist/{index-CmOaBe_x.js → index-CtDqXnOp.js} +535 -460
  75. package/dist/{index-CECYN1oL.js → index-D0GnMoag.js} +181 -79
  76. package/dist/{index-BCslSeGm.js → index-DMrIQqFt.js} +1 -1
  77. package/dist/{index-BZYbNzed.js → index-DeXvASjP.js} +3 -3
  78. package/dist/{index-CUdis4Jl.js → index-y-7yUm2e.js} +10 -9
  79. package/dist/{index.esm2017-CVwbgLS0.js → index.esm2017-JtyypweZ.js} +127 -127
  80. package/dist/{loading-C-BSh5_w.js → loading-a-FqrwqI.js} +1 -1
  81. package/dist/{membership-BPpTsVq5.js → membership-CGVtil5J.js} +3 -3
  82. package/dist/{money-BSxQcP_f.js → money-CTc1l_Cq.js} +1 -1
  83. package/dist/{number-p7RPdTQ7.js → number-W3R-0nYP.js} +1 -1
  84. package/dist/objectid-BU0Y8iAN.js +145 -0
  85. package/dist/{plugins-5mIceCPA.js → plugins-D2sSgTSl.js} +2 -2
  86. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  87. package/dist/{reward-CaZY5kqg.js → reward-atP8vnNn.js} +1 -1
  88. package/dist/{rule-builder-yn_upY7a.js → rule-builder-BB29ZJ_C.js} +17 -17
  89. package/dist/{rule-DB6XK-iD.js → rule-eA5IvnjB.js} +3 -3
  90. package/dist/style.css +1 -1
  91. package/dist/{template-DbmV0nWD.js → template-DhBeDaAm.js} +64 -64
  92. package/dist/{trigger-DPl3HG2o.js → trigger-Bq_pZj1J.js} +7 -7
  93. package/dist/{usePagination-JoYaROkV.js → usePagination-BeF5K3M7.js} +85 -85
  94. package/dist/{user-DzwHXhvX.js → user-B-bhVFIG.js} +1 -1
  95. package/dist/{vue-i18n-BnN9jlFK.js → vue-i18n-D-h8VDSx.js} +343 -343
  96. package/dist/{xlsx-CrsYUgcS.js → xlsx-DsByAcZl.js} +226 -226
  97. package/package.json +5 -3
  98. package/dist/Analytic-C1LCniPD.js +0 -427
  99. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
  100. package/dist/Marketing-CFgCJV0g.js +0 -317
  101. package/dist/MemberList-BjX8ND1p.js +0 -1606
  102. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  103. package/dist/Promotion-CnFaEvhL.js +0 -255
  104. package/dist/Segment-DUP0JWK5.js +0 -882
  105. package/dist/StoreRewards-DJj-oM2n.js +0 -423
  106. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-oRUpDbZ_.js +0 -995
  107. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-bDQs5ACo.js +0 -419
  108. package/dist/business-CFMUx5qO.js +0 -78
  109. package/dist/index-CuJ5OZqA.js +0 -29566
  110. package/dist/index-CuvNtC_M.js +0 -61
  111. package/dist/index-Dbd4WA4r.js +0 -61
  112. package/dist/index-mtAI1Gyn.js +0 -44
  113. package/dist/objectid-DkD1hn1F.js +0 -145
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as d, ref as f, resolveComponent as s, openBlock as t, createElementBlock as v, Fragment as b, createVNode as r, unref as o, createElementVNode as k, createBlock as l, KeepAlive as x, resolveDynamicComponent as m, createCommentVNode as F } from "vue";
2
- import { _ as g, a as y } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-oRUpDbZ_.js";
3
- import { u as C } from "./vue-i18n-BnN9jlFK.js";
2
+ import { _ as g, a as y } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-Cx05-OPF.js";
3
+ import { u as C } from "./vue-i18n-D-h8VDSx.js";
4
4
  const T = { class: "px-24 flex flex-col gap-y-32 pb-24" }, P = /* @__PURE__ */ d({
5
5
  __name: "Transaction",
6
6
  setup(V) {
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as y, computed as b, openBlock as i, createBlock as R, unref as l, ref as E, watch as k, resolveComponent as h, createElementBlock as g, createElementVNode as B, Fragment as O, renderList as T, createVNode as V, isRef as U, createCommentVNode as v } from "vue";
2
- import "./index-CUdis4Jl.js";
3
- import { i as C, R as e } from "./rule-builder-yn_upY7a.js";
4
- import { _ as I } from "./RuleGroup.vue_vue_type_script_setup_true_lang-BPw5L06B.js";
5
- import { p as N } from "./plugins-5mIceCPA.js";
6
- import { u as S } from "./membership-BPpTsVq5.js";
2
+ import "./index-y-7yUm2e.js";
3
+ import { i as C, R as e } from "./rule-builder-BB29ZJ_C.js";
4
+ import { _ as I } from "./RuleGroup.vue_vue_type_script_setup_true_lang-Cr99ikbK.js";
5
+ import { p as N } from "./plugins-D2sSgTSl.js";
6
+ import { u as S } from "./membership-CGVtil5J.js";
7
7
  import { _ as j } from "./CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js";
8
- import { u as x } from "./vue-i18n-BnN9jlFK.js";
8
+ import { u as x } from "./vue-i18n-D-h8VDSx.js";
9
9
  const A = /* @__PURE__ */ y({
10
10
  __name: "SegmentConfigurator",
11
11
  props: {
@@ -1,55 +1,73 @@
1
- import { defineComponent as z, ref as k, computed as Q, h as m, onMounted as Z, resolveComponent as d, openBlock as u, createElementBlock as S, Fragment as F, createVNode as s, unref as t, createElementVNode as r, withCtx as V, renderList as J, createBlock as y, resolveDynamicComponent as Y, toDisplayString as _, createCommentVNode as E } from "vue";
2
- import { _ as ee } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as oe, components as h } from "@feedmepos/ui-library";
4
- import { p as A, a as te } from "./plugins-5mIceCPA.js";
5
- import { useCoreStore as ae } from "@feedmepos/mf-common";
6
- import { u as ne } from "./loading-C-BSh5_w.js";
7
- import { u as ce } from "./business-CFMUx5qO.js";
8
- import { u as re } from "./campaign-DwArKZ1r.js";
9
- import { g as ie, a as B, b as O } from "./campaign-NqTts9bj.js";
10
- import "./index-CSWnS__O.js";
11
- import { u as se } from "./template-DbmV0nWD.js";
12
- import { _ as le } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DHQBxqsk.js";
13
- import { _ as me } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
14
- import { _ as ue } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-DUUzFkIc.js";
15
- import { u as de } from "./vue-i18n-BnN9jlFK.js";
16
- import { useRouter as pe } from "vue-router";
17
- import { c as w } from "./index-CczG_ilB.js";
18
- import { R as H } from "./app-KtD-iU16.js";
19
- var he = { 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" };
20
- const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-center justify-between w-full" }, _e = { class: "flex gap-8 overflow-x-auto" }, ge = { class: "space-y-8" }, ve = { class: "flex w-full gap-4 items-center" }, Ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, we = { class: "space-y-4" }, be = { class: "fm-typo-en-body-lg-600" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ke = { class: "flex gap-8 items-center" }, Se = /* @__PURE__ */ r("img", {
21
- src: ee,
22
- class: "aspect-square w-[150px]"
23
- }, null, -1), Fe = { class: "flex flex-col gap-16 text-center" }, Ve = { class: "fm-typo-en-title-sm-800" }, Ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, We = /* @__PURE__ */ z({
1
+ import { defineComponent as Y, ref as x, computed as ee, h as m, onMounted as oe, resolveComponent as d, openBlock as u, createElementBlock as V, Fragment as S, createVNode as l, unref as t, createElementVNode as c, withCtx as F, renderList as te, createBlock as h, resolveDynamicComponent as ne, toDisplayString as g, createCommentVNode as E } from "vue";
2
+ import { _ as ae } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as re, components as f } from "@feedmepos/ui-library";
4
+ import { _ as M } from "./FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js";
5
+ import { p as A, a as ce } from "./plugins-D2sSgTSl.js";
6
+ import { useCoreStore as ie } from "@feedmepos/mf-common";
7
+ import { u as se } from "./loading-a-FqrwqI.js";
8
+ import { u as le } from "./business-B2JBpm4y.js";
9
+ import { u as me } from "./campaign-vkzui6F2.js";
10
+ import { g as ue, a as O, b as B } from "./campaign-Bhur0NJx.js";
11
+ import "./index-CrFUhsZO.js";
12
+ import { u as de } from "./template-DhBeDaAm.js";
13
+ import { _ as pe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-D6AmN3o3.js";
14
+ import { _ as fe } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-DoKAgSLE.js";
15
+ import { u as ye } from "./vue-i18n-D-h8VDSx.js";
16
+ import { T as he } from "./trigger-Bq_pZj1J.js";
17
+ import { useRouter as ge } from "vue-router";
18
+ import { c as w } from "./index-BWTvsoH0.js";
19
+ import { R as H } from "./app-De-yQ1CJ.js";
20
+ var _e = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
21
+ const ve = { class: "px-24 flex flex-col gap-y-16" }, Ce = { class: "flex items-center justify-between w-full" }, we = { class: "flex gap-8 overflow-x-auto" }, be = { class: "space-y-8" }, ke = { class: "flex w-full gap-4 items-center" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ve = { class: "space-y-4" }, Se = { class: "fm-typo-en-body-lg-600" }, Fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Le = { class: "flex gap-8 items-center" }, Te = { class: "flex flex-col gap-16 text-center" }, Ue = { class: "fm-typo-en-title-sm-800" }, Pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Je = /* @__PURE__ */ Y({
24
22
  __name: "Voucher",
25
- setup(Le) {
26
- const { t: a } = de(), T = {
23
+ setup(Ie) {
24
+ const { t: a } = ye(), $ = {
27
25
  label: a("connect.voucher.createCampaign"),
28
26
  value: "create",
29
27
  isPrimary: !0,
30
28
  prependIcon: "add"
31
- }, I = oe(), $ = se("VOUCHER", I), K = ce(), p = re(), { global: N, minor: L } = ne, P = pe(), i = k({
29
+ }, L = re(), K = de("VOUCHER", L), N = le(), p = me(), { global: D, minor: T } = se, U = ge(), i = x({
32
30
  searchKey: "",
33
- location: null
34
- }), g = Q(
31
+ location: [],
32
+ triggerType: []
33
+ }), _ = ee(
35
34
  () => p.campaigns.voucher.filter(
36
- (e) => !i.value.location || !e.targetLocation || e.targetLocation.includes(i.value.location)
35
+ (e) => q(e) && G(e)
37
36
  )
38
- ), D = [
37
+ ), j = he.VOUCHER.map((e) => ({
38
+ label: e.name,
39
+ value: e.value
40
+ }));
41
+ function q(e) {
42
+ const o = i.value.location;
43
+ return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some(
44
+ (r) => {
45
+ var s;
46
+ return (s = e == null ? void 0 : e.targetLocation) == null ? void 0 : s.includes(r);
47
+ }
48
+ ) : e.targetLocation.includes(o);
49
+ }
50
+ function G(e) {
51
+ const o = i.value.triggerType;
52
+ if (!o || o.length === 0) return !0;
53
+ const r = e.event.type;
54
+ return o.includes(r);
55
+ }
56
+ const X = [
39
57
  {
40
58
  header: a("connect.voucher.voucherTitle"),
41
59
  accessorFn: (e) => e.name
42
60
  },
43
61
  {
44
62
  header: a("connect.voucher.status"),
45
- accessorFn: (e) => ie(e),
63
+ accessorFn: (e) => ue(e),
46
64
  cell(e) {
47
- return B(e.row.original);
65
+ return O(e.row.original);
48
66
  }
49
67
  },
50
68
  {
51
69
  header: a("connect.voucher.summary"),
52
- accessorFn: (e) => O(e)
70
+ accessorFn: (e) => B(e)
53
71
  },
54
72
  {
55
73
  header: a("connect.voucher.quota"),
@@ -69,19 +87,19 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
69
87
  header: a("connect.voucher.actions"),
70
88
  cell(e) {
71
89
  return m("div", { class: "flex items-center justify-end" }, [
72
- m(h.FmButton, {
90
+ m(f.FmButton, {
73
91
  icon: "visibility",
74
92
  variant: "tertiary",
75
93
  iconColor: "neutral-gray-400",
76
94
  onClick: async (o) => {
77
- o.stopPropagation(), await P.push({
95
+ o.stopPropagation(), await U.push({
78
96
  name: H["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
79
97
  params: { id: e.row.original._id }
80
98
  });
81
99
  }
82
100
  }),
83
101
  m(
84
- h.FmMenu,
102
+ f.FmMenu,
85
103
  {
86
104
  placement: "bottom-end",
87
105
  onClick: (o) => {
@@ -89,7 +107,7 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
89
107
  }
90
108
  },
91
109
  {
92
- "menu-button": () => m(h.FmButton, {
110
+ "menu-button": () => m(f.FmButton, {
93
111
  icon: "more_vert",
94
112
  iconColor: "neutral-gray-400",
95
113
  variant: "tertiary"
@@ -97,10 +115,10 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
97
115
  default: () => {
98
116
  const o = [
99
117
  m(
100
- h.FmMenuItem,
118
+ f.FmMenuItem,
101
119
  {
102
- onClick: async (c) => {
103
- c.stopPropagation(), M(e.row.original);
120
+ onClick: async (r) => {
121
+ r.stopPropagation(), I(e.row.original);
104
122
  }
105
123
  },
106
124
  {
@@ -115,27 +133,27 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
115
133
  )
116
134
  ];
117
135
  return e.row.original.event.type === "SIMPLE_CLAIM" && (o.unshift(
118
- m(h.FmMenuItem, {
136
+ m(f.FmMenuItem, {
119
137
  label: a("connect.voucher.send"),
120
- onClick: async (c) => {
121
- var l;
122
- c.stopPropagation(), (l = b.value) == null || l.showSheet({
138
+ onClick: async (r) => {
139
+ var s;
140
+ r.stopPropagation(), (s = b.value) == null || s.showSheet({
123
141
  campaignId: e.row.original._id
124
142
  });
125
143
  }
126
144
  })
127
145
  ), o.unshift(
128
- m(h.FmMenuItem, {
146
+ m(f.FmMenuItem, {
129
147
  label: a("connect.voucher.share"),
130
- onClick: async (c) => {
131
- if (c.stopPropagation(), e.row.original.event.type !== "SIMPLE_CLAIM")
148
+ onClick: async (r) => {
149
+ if (r.stopPropagation(), e.row.original.event.type !== "SIMPLE_CLAIM")
132
150
  return await A.confirm(
133
151
  "Cannot share a voucher that is not a simple claim.",
134
152
  "Share Voucher",
135
153
  "OK"
136
154
  );
137
- await te(
138
- `https://${ae().currentBusiness.value._id}.${he.appUrl}/vouchers/${e.row.original._id}`,
155
+ await ce(
156
+ `https://${ie().currentBusiness.value._id}.${_e.appUrl}/vouchers/${e.row.original._id}`,
139
157
  {
140
158
  successMessage: "Voucher link copied to clipboard"
141
159
  }
@@ -149,9 +167,9 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
149
167
  ]);
150
168
  }
151
169
  }
152
- ], U = k(), b = k();
153
- async function M(e) {
154
- await A.remove(a("connect.voucher.confirmRemove", { name: e.name })) && await L(
170
+ ], P = x(), b = x();
171
+ async function I(e) {
172
+ await A.remove(a("connect.voucher.confirmRemove", { name: e.name })) && await T(
155
173
  async () => {
156
174
  await w.delete(e._id), await p.read("VOUCHER");
157
175
  },
@@ -164,33 +182,33 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
164
182
  );
165
183
  }
166
184
  async function v(e) {
167
- e ? await o() : $.open(async (c) => {
168
- await o(c);
185
+ e ? await o() : K.open(async (r) => {
186
+ await o(r);
169
187
  });
170
- async function o(c) {
171
- var l;
172
- (l = U.value) == null || l.showSheet(
188
+ async function o(r) {
189
+ var s;
190
+ (s = P.value) == null || s.showSheet(
173
191
  !0,
174
192
  "VOUCHER",
175
193
  e ? await w.readById(e._id) : void 0,
176
- c
194
+ r
177
195
  );
178
196
  }
179
197
  }
180
- async function j(e) {
198
+ async function W(e) {
181
199
  e.campaign._id && await new Promise((o) => {
182
- I.open({
200
+ L.open({
183
201
  title: "Confirmation",
184
202
  message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
185
203
  primaryActions: { text: "Update all", close: !0 },
186
204
  secondaryActions: { text: "Update future only", close: !0 }
187
205
  }).onPrimary(async () => {
188
- var c;
189
- e.updateCollections = !0, (c = window.top) == null || c.postMessage("updateAllVoucher", "*"), o();
206
+ var r;
207
+ e.updateCollections = !0, (r = window.top) == null || r.postMessage("updateAllVoucher", "*"), o();
190
208
  }).onSecondary(async () => {
191
209
  o();
192
210
  });
193
- }), await L(
211
+ }), await T(
194
212
  async () => {
195
213
  e.campaign._id ? await w.update(e.campaign._id, e) : await w.create(e), await p.read("VOUCHER");
196
214
  },
@@ -204,108 +222,117 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
204
222
  }
205
223
  );
206
224
  }
207
- return Z(async () => {
208
- await N(async () => {
225
+ return oe(async () => {
226
+ await D(async () => {
209
227
  await p.read("VOUCHER");
210
228
  });
211
229
  }), (e, o) => {
212
- const c = d("FmPageHead"), l = d("FmSearch"), q = d("FmTable"), C = d("FmButton"), G = d("FmListItem"), X = d("FmList"), W = d("FmCard");
213
- return u(), S(F, null, [
214
- s(c, {
230
+ const r = d("FmPageHead"), s = d("FmSearch"), z = d("FmTable"), C = d("FmButton"), Q = d("FmListItem"), Z = d("FmList"), J = d("FmCard");
231
+ return u(), V(S, null, [
232
+ l(r, {
215
233
  title: t(a)("connect.voucher.title"),
216
- actions: t(g).length > 0 ? [T] : [],
234
+ actions: t(_).length > 0 ? [$] : [],
217
235
  "onClick:action": o[0] || (o[0] = () => v())
218
236
  }, null, 8, ["title", "actions"]),
219
- r("div", fe, [
220
- s(l, {
237
+ c("div", ve, [
238
+ l(s, {
221
239
  modelValue: t(i).searchKey,
222
240
  "onUpdate:modelValue": o[1] || (o[1] = (n) => t(i).searchKey = n),
223
241
  class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
224
242
  placeholder: t(a)("connect.voucher.search"),
225
243
  collapsible: ""
226
244
  }, null, 8, ["modelValue", "placeholder"]),
227
- t(p).campaigns.voucher && t(p).campaigns.voucher.length > 0 ? (u(), S(F, { key: 0 }, [
228
- r("div", ye, [
229
- r("div", _e, [
230
- s(me, {
245
+ t(p).campaigns.voucher && t(p).campaigns.voucher.length > 0 ? (u(), V(S, { key: 0 }, [
246
+ c("div", Ce, [
247
+ c("div", we, [
248
+ l(M, {
249
+ label: `${t(a)("connect.common.location")}: `,
250
+ "right-icon": "keyboard_arrow_down",
231
251
  modelValue: t(i).location,
232
252
  "onUpdate:modelValue": o[2] || (o[2] = (n) => t(i).location = n),
233
- label: t(a)("connect.voucher.location"),
234
- "show-item-label": !0,
235
253
  icon: "storefront",
236
- placement: "bottom-start",
237
- items: t(K).locationItems
238
- }, null, 8, ["modelValue", "label", "items"])
254
+ "show-item-label": !0,
255
+ items: t(N).locationOptions
256
+ }, null, 8, ["label", "modelValue", "items"]),
257
+ l(M, {
258
+ label: "Type:",
259
+ "right-icon": "keyboard_arrow_down",
260
+ modelValue: t(i).triggerType,
261
+ "onUpdate:modelValue": o[3] || (o[3] = (n) => t(i).triggerType = n),
262
+ icon: "filter_list",
263
+ "show-item-label": !0,
264
+ items: t(j)
265
+ }, null, 8, ["modelValue", "items"])
239
266
  ]),
240
- s(l, {
267
+ l(s, {
241
268
  modelValue: t(i).searchKey,
242
- "onUpdate:modelValue": o[3] || (o[3] = (n) => t(i).searchKey = n),
269
+ "onUpdate:modelValue": o[4] || (o[4] = (n) => t(i).searchKey = n),
243
270
  class: "xs:hidden",
244
271
  placeholder: t(a)("connect.voucher.search"),
245
272
  collapsible: ""
246
273
  }, null, 8, ["modelValue", "placeholder"])
247
274
  ]),
248
- s(q, {
275
+ l(z, {
249
276
  class: "xs:hidden",
250
- "row-data": t(g),
251
- "column-defs": D,
277
+ "row-data": t(_),
278
+ "column-defs": X,
252
279
  "search-value": t(i).searchKey,
253
280
  "column-filter": [],
254
- onRowClick: o[4] || (o[4] = (n) => v(n.original)),
255
- "hide-footer": t(g).length < 10
281
+ onRowClick: o[5] || (o[5] = (n) => v(n.original)),
282
+ "hide-footer": t(_).length < 10
256
283
  }, null, 8, ["row-data", "search-value", "hide-footer"]),
257
- s(X, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
258
- default: V(() => [
259
- (u(!0), S(F, null, J(t(g).filter(
284
+ l(Z, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
285
+ default: F(() => [
286
+ (u(!0), V(S, null, te(t(_).filter(
260
287
  (n) => n.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
261
- ), (n) => (u(), y(G, {
288
+ ), (n) => (u(), h(Q, {
262
289
  key: n._id.toString(),
263
- onClick: (x) => v(n),
290
+ onClick: (k) => v(n),
264
291
  class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
265
292
  }, {
266
- default: V(() => {
267
- var x;
293
+ default: F(() => {
294
+ var k;
268
295
  return [
269
- r("div", ge, [
270
- r("div", ve, [
271
- (u(), y(Y(t(B)(n)))),
272
- r("div", Ce, _(((x = n.pf_collectible) == null ? void 0 : x.currentReceive) ?? 0) + " claimed ", 1)
296
+ c("div", be, [
297
+ c("div", ke, [
298
+ (u(), h(ne(t(O)(n)))),
299
+ c("div", xe, g(((k = n.pf_collectible) == null ? void 0 : k.currentReceive) ?? 0) + " claimed ", 1)
273
300
  ]),
274
- r("div", we, [
275
- r("div", be, _(n.name), 1),
276
- r("div", xe, _(t(O)(n)), 1)
301
+ c("div", Ve, [
302
+ c("div", Se, g(n.name), 1),
303
+ c("div", Fe, g(t(B)(n)), 1)
277
304
  ])
278
305
  ]),
279
- r("div", ke, [
280
- n.event.type === "SIMPLE_CLAIM" ? (u(), y(C, {
306
+ c("div", Le, [
307
+ n.event.type === "SIMPLE_CLAIM" ? (u(), h(C, {
281
308
  key: 0,
282
309
  icon: "visibility",
283
310
  "icon-color": "neutral-gray-400",
284
311
  variant: "tertiary",
285
- onClick: async (f) => {
286
- f.stopPropagation(), await t(P).push({
312
+ onClick: async (y) => {
313
+ y.stopPropagation(), await t(U).push({
287
314
  name: t(H)["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
288
315
  params: { id: n._id }
289
316
  });
290
317
  }
291
318
  }, null, 8, ["onClick"])) : E("", !0),
292
- n.event.type === "SIMPLE_CLAIM" ? (u(), y(C, {
319
+ n.event.type === "SIMPLE_CLAIM" ? (u(), h(C, {
293
320
  key: 1,
294
321
  icon: "send",
295
322
  "icon-color": "neutral-gray-400",
296
323
  variant: "tertiary",
297
- onClick: (f) => {
324
+ onClick: (y) => {
298
325
  var R;
299
- f.stopPropagation(), (R = t(b)) == null || R.showSheet({
326
+ y.stopPropagation(), (R = t(b)) == null || R.showSheet({
300
327
  campaignId: n._id
301
328
  });
302
329
  }
303
330
  }, null, 8, ["onClick"])) : E("", !0),
304
- s(C, {
331
+ l(C, {
305
332
  icon: "delete",
306
333
  "icon-color": "neutral-gray-400",
307
334
  variant: "tertiary",
308
- onClick: (f) => (f.stopPropagation(), M(n))
335
+ onClick: (y) => (y.stopPropagation(), I(n))
309
336
  }, null, 8, ["onClick"])
310
337
  ])
311
338
  ];
@@ -315,32 +342,35 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
315
342
  ]),
316
343
  _: 1
317
344
  })
318
- ], 64)) : (u(), y(W, {
345
+ ], 64)) : (u(), h(J, {
319
346
  key: 1,
320
347
  variant: "outlined",
321
348
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
322
349
  }, {
323
- default: V(() => [
324
- Se,
325
- r("div", Fe, [
326
- r("div", Ve, _(t(a)("connect.voucher.createVoucherCampaign")), 1),
327
- r("div", Ie, _(t(a)("connect.voucher.description")), 1)
350
+ default: F(() => [
351
+ o[7] || (o[7] = c("img", {
352
+ src: ae,
353
+ class: "aspect-square w-[150px]"
354
+ }, null, -1)),
355
+ c("div", Te, [
356
+ c("div", Ue, g(t(a)("connect.voucher.createVoucherCampaign")), 1),
357
+ c("div", Pe, g(t(a)("connect.voucher.description")), 1)
328
358
  ]),
329
- s(C, {
359
+ l(C, {
330
360
  variant: "primary",
331
361
  label: t(a)("connect.voucher.createVoucherCampaign"),
332
362
  icon: "add",
333
- onClick: o[5] || (o[5] = (n) => v())
363
+ onClick: o[6] || (o[6] = (n) => v())
334
364
  }, null, 8, ["label"])
335
365
  ]),
336
366
  _: 1
337
367
  })),
338
- s(le, {
368
+ l(pe, {
339
369
  ref_key: "sheetRef",
340
- ref: U,
341
- "onSubmit:modelValue": j
370
+ ref: P,
371
+ "onSubmit:modelValue": W
342
372
  }, null, 512),
343
- s(ue, {
373
+ l(fe, {
344
374
  ref_key: "sendVoucherSheetRef",
345
375
  ref: b
346
376
  }, null, 512)
@@ -350,5 +380,5 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
350
380
  }
351
381
  });
352
382
  export {
353
- We as default
383
+ Je as default
354
384
  };