@feedmepos/mf-connect 0.1.0-beta.5 → 0.1.0-beta.50

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 (112) hide show
  1. package/dist/Analytic-D-yp03jJ.js +427 -0
  2. package/dist/{App-C8Qfnkhz.js → App-CeQWTGNK.js} +441 -420
  3. package/dist/AuditLogs-2qzwcMXR.js +1885 -0
  4. package/dist/Bin-D1b2NbbA.js +191 -0
  5. package/dist/{Broadcast-BK-1MQkL.js → Broadcast-bKF9mIns.js} +13 -12
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BLzpFQoc.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B_q5K-cx.js} +6 -8
  7. package/dist/Card-BCAyfBLi.js +896 -0
  8. package/dist/{Collections-TA4iW1r0.js → Collections-Yz3F55bv.js} +27 -31
  9. package/dist/{Credit-Df9iFQjZ.js → Credit-Ceptt_g_.js} +17 -16
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
  11. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-CLFeMi0j.js +169 -0
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-TjNinQ8e.js +2181 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BCRVyPwl.js → EffectSheet.vue_vue_type_style_index_0_lang-D3Bt-Vuu.js} +6 -6
  14. package/dist/{Experience-ByLFXKn6.js → Experience-DskHKzfo.js} +26 -25
  15. package/dist/{Game-B6Ez0pfW.js → Game-IJ6X0AXM.js} +21 -20
  16. package/dist/Index-CEl2y9X6.js +259 -0
  17. package/dist/Marketing-CWekLb4c.js +20071 -0
  18. package/dist/{Member-TobP1ISp.js → Member-BUZPQ5Lb.js} +4 -4
  19. package/dist/MemberList-BmVNqvbm.js +1598 -0
  20. package/dist/MemberTransactions-B3XhEOK_.js +45 -0
  21. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CZ-w6iZi.js → MessageInput.vue_vue_type_script_setup_true_lang-C6YIbQtM.js} +6 -6
  22. package/dist/{Mission-D9uTVo0G.js → Mission-Ci9ed_ph.js} +97 -84
  23. package/dist/Overview-CU9uhC-k.js +1078 -0
  24. package/dist/{Point-4rDr-53e.js → Point-wuuR7AEb.js} +26 -25
  25. package/dist/{Promotion-BKO_dtQk.js → Promotion-BMi3kyE8.js} +55 -48
  26. package/dist/Record-Wmh-g8WY.js +340 -0
  27. package/dist/Reward-BL4lxhIB.js +442 -0
  28. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CqXuTxun.js +150 -0
  29. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dbik0PEw.js +1637 -0
  30. package/dist/Segment-DObdjyYi.js +568 -0
  31. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BAuM6qP5.js +181 -0
  32. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-BfyRVxWM.js +147 -0
  33. package/dist/{Setting-B7oISD0D.js → Setting-Dqgnd7TR.js} +610 -586
  34. package/dist/Store--Z4So__g.js +1744 -0
  35. package/dist/{StoreRewards-AMxIYhjZ.js → StoreRewards-DPFVXWwm.js} +33 -32
  36. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CNsdA106.js +939 -0
  37. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B2szciPk.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CGOmGozY.js} +1 -1
  38. package/dist/{Tier-DkxdNj-K.js → Tier-36IfhsnP.js} +327 -318
  39. package/dist/{Title-VFpCOsMO.js → Title-XH56OOug.js} +199 -184
  40. package/dist/{Transaction-BgKD8n2L.js → Transaction-BUQcSmBs.js} +2 -2
  41. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-BVCfeG5T.js +130 -0
  42. package/dist/Voucher-CvmH0kcF.js +353 -0
  43. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BQOD6uEf.js +419 -0
  44. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B2FGvyza.js → ZodTextField.vue_vue_type_script_setup_true_lang-CcIcCt4N.js} +1 -1
  45. package/dist/{app-DUl5dav5.js → app-DeW5_DB0.js} +1754 -1496
  46. package/dist/{app-DA-t-2Zt.js → app-TN8KEPMu.js} +1 -1
  47. package/dist/app.js +1 -1
  48. package/dist/{business-CeCitOY4.js → business-D1mLhSME.js} +1 -1
  49. package/dist/campaign-0tnkhu78.js +1810 -0
  50. package/dist/{campaign-CcLM6e4s.js → campaign-B-12Im0w.js} +2 -2
  51. package/dist/campaign.enum-C8m-HHZE.js +20 -0
  52. package/dist/campaign.fn-CxkhbK9i.js +758 -0
  53. package/dist/collectible.enum-6Syq-vQ6.js +19 -0
  54. package/dist/{collection.fn-CAEP7YxB.js → collection.fn-BUj75Jp2.js} +2 -2
  55. package/dist/dto-8wODhIIC.js +214 -0
  56. package/dist/{effect-Dt7rXOBy.js → effect-BEZEjcJu.js} +9 -9
  57. package/dist/email-addresses-PwjkdYYD.js +705 -0
  58. package/dist/{export-CyioiboQ.js → export-BB-0vgwy.js} +5 -5
  59. package/dist/{helper-FA_9AhGV.js → helper-DOt8-wns.js} +1 -1
  60. package/dist/{index-DLN4Kzz_.js → index-B1qUjniH.js} +1 -1
  61. package/dist/index-BTMIZz4v.js +44 -0
  62. package/dist/{index-igxrd5jC.js → index-By-GlmG7.js} +1500 -1479
  63. package/dist/index-C7zBkoZ4.js +115 -0
  64. package/dist/{index-CyNdsVrw.js → index-CNlHabtk.js} +1 -1
  65. package/dist/{index-DbbO3wip.js → index-CXGiIgdK.js} +48 -4
  66. package/dist/{index-C20XBD7G.js → index-Cjn1LVjC.js} +2192 -931
  67. package/dist/index-CpfUrdgw.js +29000 -0
  68. package/dist/index-CsaQJMAR.js +66 -0
  69. package/dist/index-DZuEmMyY.js +54 -0
  70. package/dist/{index-CCdXvb92.js → index-D_zwqIhq.js} +1 -1
  71. package/dist/index-DabUEw_c.js +32 -0
  72. package/dist/{index-BiFueJiF.js → index-X-FfC49l.js} +258 -192
  73. package/dist/index-vh86FiIQ.js +10 -0
  74. package/dist/{index.esm2017-Dl_CdTcK.js → index.esm2017-DJOUiVjR.js} +33 -33
  75. package/dist/loading-aCWVsOPY.js +71 -0
  76. package/dist/{membership-DFiY8aVd.js → membership-1etsHC5G.js} +54 -46
  77. package/dist/money-DzWRURZ5.js +15 -0
  78. package/dist/number-BxIQO1i3.js +12 -0
  79. package/dist/objectid-DjhmYkn-.js +145 -0
  80. package/dist/{loading-CZ0fiViM.js → plugins-CSPFAU50.js} +2990 -3062
  81. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  82. package/dist/reward-Bh4Li9f0.js +36 -0
  83. package/dist/{rule-C3e1xTqN.js → rule-CHTTTUFB.js} +180 -177
  84. package/dist/{rule-builder-MEVb_AiZ.js → rule-builder-OHfUJTIA.js} +1 -1
  85. package/dist/style.css +1 -1
  86. package/dist/{template-C2OKWd_e.js → template-ZGxXqkaC.js} +5 -5
  87. package/dist/trigger-Ogu5FDs0.js +144 -0
  88. package/dist/user-DBuU81tO.js +54 -0
  89. package/dist/{vue-i18n-CjxDUnX6.js → vue-i18n-CKpKQ6iE.js} +216 -216
  90. package/dist/{xlsx-CtXdl3ls.js → xlsx-DJDZBIeg.js} +1 -1
  91. package/package.json +9 -7
  92. package/dist/Analytic-C_ZFR5jh.js +0 -622
  93. package/dist/Card-C7dUFJKe.js +0 -825
  94. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bgl90veU.js +0 -2813
  95. package/dist/Marketing-BaqZUeVI.js +0 -316
  96. package/dist/MemberList-B9cutmEh.js +0 -1733
  97. package/dist/MemberTransactions-DRHA7AOF.js +0 -38
  98. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BHCoDSTg.js +0 -1753
  99. package/dist/Segment-Dj8nc3AE.js +0 -437
  100. package/dist/Store-CJ3wcohQ.js +0 -1511
  101. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-wXUTfQQF.js +0 -890
  102. package/dist/Voucher-BbTLt8Pt.js +0 -490
  103. package/dist/dto-CRJma6eX.js +0 -2770
  104. package/dist/index-B1e0LtDe.js +0 -99
  105. package/dist/index-Be2ZYDy_.js +0 -298
  106. package/dist/index-CDkITvze.js +0 -762
  107. package/dist/index-CuvNtC_M.js +0 -61
  108. package/dist/index-DPP5F3bT.js +0 -206
  109. package/dist/index-Dbo3DDwp.js +0 -29193
  110. package/dist/money-D8hUEfP4.js +0 -15
  111. package/dist/number-DL3GAeVt.js +0 -12
  112. package/dist/user-Bm4KttFq.js +0 -37
@@ -0,0 +1,45 @@
1
+ import { defineComponent as d, ref as p, resolveComponent as _, openBlock as a, createElementBlock as f, createVNode as v, unref as o, createBlock as u, createCommentVNode as b } from "vue";
2
+ import { _ as k, a as x } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-CNsdA106.js";
3
+ import { useRouter as y } from "vue-router";
4
+ const C = { class: "flex flex-col gap-y-32 pb-24" }, F = /* @__PURE__ */ d({
5
+ __name: "MemberTransactions",
6
+ setup(T) {
7
+ const r = y(), t = [
8
+ {
9
+ label: "Collection",
10
+ value: "collection"
11
+ },
12
+ {
13
+ label: "Store",
14
+ value: "store"
15
+ }
16
+ ], l = p(
17
+ t.find(
18
+ (s) => {
19
+ var e;
20
+ return s.value == ((e = r.currentRoute.value.query) == null ? void 0 : e.tab);
21
+ }
22
+ ) || t[0]
23
+ ), n = r.currentRoute.value.params.id;
24
+ return (s, e) => {
25
+ const c = _("FmTabs");
26
+ return a(), f("div", C, [
27
+ v(c, {
28
+ "model-value": o(l).value,
29
+ items: t,
30
+ "onUpdate:modelValue": e[0] || (e[0] = (m) => l.value = t.find((i) => i.value === m))
31
+ }, null, 8, ["model-value"]),
32
+ o(l).value == "collection" ? (a(), u(k, {
33
+ key: 0,
34
+ user: o(n)
35
+ }, null, 8, ["user"])) : o(l).value == "store" ? (a(), u(x, {
36
+ key: 1,
37
+ user: o(n)
38
+ }, null, 8, ["user"])) : b("", !0)
39
+ ]);
40
+ };
41
+ }
42
+ });
43
+ export {
44
+ F as default
45
+ };
@@ -1,6 +1,6 @@
1
- import { defineComponent as M, shallowRef as R, openBlock as p, createElementBlock as _, normalizeStyle as O, ref as V, resolveComponent as g, createBlock as E, unref as s, isRef as N, withCtx as x, createVNode as h, createElementVNode as v, createCommentVNode as B, withDirectives as D, vShow as A, computed as q, onMounted as J, Fragment as U, createTextVNode as P, toDisplayString as z, renderList as G } from "vue";
2
- import { p as K } from "./loading-CZ0fiViM.js";
3
- import { r as W } from "./index-CDkITvze.js";
1
+ import { defineComponent as M, shallowRef as R, openBlock as p, createElementBlock as _, normalizeStyle as O, ref as V, resolveComponent as g, createBlock as E, unref as s, isRef as N, withCtx as x, createVNode as h, createElementVNode as v, createCommentVNode as B, withDirectives as D, vShow as A, computed as q, onMounted as G, Fragment as U, createTextVNode as J, toDisplayString as P, renderList as z } from "vue";
2
+ import { p as K } from "./plugins-CSPFAU50.js";
3
+ import { G as W } from "./index-Cjn1LVjC.js";
4
4
  import { _ as Z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  import { _ as Q, S as X } from "./LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js";
6
6
  import { c as Y } from "./object-qECH92oz.js";
@@ -348,7 +348,7 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
348
348
  }
349
349
  return `Character used: ${t} ≈ ${Math.ceil(t / 160)} SMS (Every 160 characters will be sent as 1 SMS)`;
350
350
  });
351
- return J(() => {
351
+ return G(() => {
352
352
  u("update:model-value", {
353
353
  ...a.modelValue,
354
354
  variables: a.variables
@@ -390,7 +390,7 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
390
390
  "helper-text": s(f)
391
391
  }, {
392
392
  "helper-text": x(() => [
393
- P(z(s(f)), 1)
393
+ J(P(s(f)), 1)
394
394
  ]),
395
395
  _: 1
396
396
  }, 8, ["model-value", "placeholder", "helper-state", "helper-text"]),
@@ -404,7 +404,7 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
404
404
  })
405
405
  ]),
406
406
  default: x(() => [
407
- (p(!0), _(U, null, G(e.variables.filter(
407
+ (p(!0), _(U, null, z(e.variables.filter(
408
408
  (c) => e.triggerType == "SCHEDULE" ? !c.startsWith("transaction.") : !0
409
409
  ), (c) => {
410
410
  var C;
@@ -1,42 +1,43 @@
1
- import { defineComponent as $, ref as V, computed as E, h as m, onMounted as A, resolveComponent as r, openBlock as d, createElementBlock as h, Fragment as b, createVNode as c, unref as t, createElementVNode as s, withCtx as w, renderList as H, createBlock as x, resolveDynamicComponent as q, toDisplayString as p } from "vue";
2
- import { _ as z } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as G, components as v } from "@feedmepos/ui-library";
4
- import { a as J, p as Q, u as W } from "./loading-CZ0fiViM.js";
5
- import { u as X } from "./business-CeCitOY4.js";
6
- import { u as Y } from "./campaign-CcLM6e4s.js";
7
- import { g as L, b as M } from "./dto-CRJma6eX.js";
8
- import { _ as Z } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
9
- import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bgl90veU.js";
10
- import { u as oe } from "./template-C2OKWd_e.js";
11
- import { s as te } from "./index-CuvNtC_M.js";
12
- import { u as ne } from "./vue-i18n-CjxDUnX6.js";
13
- import { c as _ } from "./index-B1e0LtDe.js";
14
- const ae = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-center justify-between w-full" }, ie = { class: "flex gap-8 overflow-x-auto" }, ce = { class: "space-y-8" }, re = { class: "flex w-full gap-4 items-center" }, le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, me = { class: "space-y-4" }, de = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "flex flex-col gap-16 text-center" }, ge = { class: "fm-typo-en-title-sm-800" }, ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be = /* @__PURE__ */ $({
1
+ import { defineComponent as E, ref as M, computed as $, h as d, onMounted as H, resolveComponent as l, openBlock as p, createElementBlock as h, Fragment as w, createVNode as c, unref as t, createElementVNode as s, withCtx as x, renderList as q, createBlock as b, resolveDynamicComponent as z, toDisplayString as u } from "vue";
2
+ import { _ as W } from "./campaign-CpzFl8Vr.js";
3
+ import { u as G } from "./loading-aCWVsOPY.js";
4
+ import { g as L, a as B } from "./campaign-0tnkhu78.js";
5
+ import { a as J, p as Q } from "./plugins-CSPFAU50.js";
6
+ import { u as X } from "./business-D1mLhSME.js";
7
+ import { u as Y } from "./campaign-B-12Im0w.js";
8
+ import { useDialog as Z, components as v } from "@feedmepos/ui-library";
9
+ import { _ as ee } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
10
+ import { u as oe } from "./template-ZGxXqkaC.js";
11
+ import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-TjNinQ8e.js";
12
+ import { s as ne } from "./index-CsaQJMAR.js";
13
+ import { u as ae } from "./vue-i18n-CKpKQ6iE.js";
14
+ import { c as _ } from "./index-C7zBkoZ4.js";
15
+ const se = { class: "px-24 flex flex-col gap-y-16" }, ie = { class: "flex items-center justify-between w-full" }, ce = { class: "flex gap-8 overflow-x-auto" }, re = { class: "space-y-8" }, le = { class: "flex w-full gap-4 items-center" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "space-y-4" }, pe = { class: "fm-typo-en-body-lg-600" }, ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ke = /* @__PURE__ */ E({
15
16
  __name: "Mission",
16
- setup(_e) {
17
- const { t: n } = ne(), B = {
17
+ setup(he) {
18
+ const { t: n } = ae(), P = {
18
19
  label: n("connect.program.common.actions.create", {
19
20
  type: n("connect.program.mission.title").toLowerCase()
20
21
  }),
21
22
  value: "create",
22
23
  isPrimary: !0,
23
24
  prependIcon: "add"
24
- }, K = oe("MISSION", G()), N = X(), l = Y(), { global: P, minor: C } = W, i = V({
25
+ }, C = Z(), K = oe("MISSION", C), N = X(), m = Y(), { global: R, minor: S } = G, i = M({
25
26
  searchKey: "",
26
27
  location: null
27
- }), u = E(
28
- () => l.campaigns.mission.filter(
28
+ }), g = $(
29
+ () => m.campaigns.mission.filter(
29
30
  (e) => !i.value.location || !e.targetLocation || e.targetLocation.includes(i.value.location)
30
31
  )
31
- ), R = [
32
+ ), T = [
32
33
  {
33
34
  header: n("connect.program.common.table.title"),
34
35
  accessorKey: "name",
35
36
  // accessorFn: (v) => v.name,
36
37
  cell(e) {
37
- return m("div", { class: "flex items-center justify-between gap-4" }, [
38
- m("div", { class: "flex items-center" }, [
39
- m(
38
+ return d("div", { class: "flex items-center justify-between gap-4" }, [
39
+ d("div", { class: "flex items-center" }, [
40
+ d(
40
41
  v.FmTooltip,
41
42
  {
42
43
  content: e.row.original._id,
@@ -45,7 +46,7 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-
45
46
  }
46
47
  },
47
48
  [
48
- m(v.FmIcon, {
49
+ d(v.FmIcon, {
49
50
  name: "info",
50
51
  outline: !0,
51
52
  size: "sm"
@@ -53,13 +54,13 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-
53
54
  ]
54
55
  )
55
56
  ]),
56
- m("div", { class: "flex-1" }, e.row.original.name)
57
+ d("div", { class: "flex-1" }, e.row.original.name)
57
58
  ]);
58
59
  }
59
60
  },
60
61
  {
61
62
  header: n("connect.campaign.mission.type"),
62
- accessorFn: (e) => te(e.mission.type)
63
+ accessorFn: (e) => ne(e.mission.type)
63
64
  //v.effect,
64
65
  },
65
66
  {
@@ -70,7 +71,7 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-
70
71
  },
71
72
  {
72
73
  header: n("connect.program.common.table.summary"),
73
- accessorFn: (e) => M(e)
74
+ accessorFn: (e) => B(e)
74
75
  //v.effect,
75
76
  },
76
77
  {
@@ -83,23 +84,23 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-
83
84
  {
84
85
  header: n("connect.program.common.table.actions"),
85
86
  cell(e) {
86
- return m(v.FmButton, {
87
+ return d(v.FmButton, {
87
88
  variant: "tertiary",
88
89
  icon: "delete",
89
90
  iconColor: "neutral-gray-400",
90
91
  onClick: (o) => {
91
- o.stopPropagation(), F(e.row.original);
92
+ o.stopPropagation(), k(e.row.original);
92
93
  }
93
94
  });
94
95
  }
95
96
  }
96
- ], S = V();
97
- async function F(e) {
97
+ ], F = M();
98
+ async function k(e) {
98
99
  await Q.remove(
99
100
  n("connect.program.common.remove.confirm", { name: e.name })
100
- ) && await C(
101
+ ) && await S(
101
102
  async () => {
102
- await _.delete(e._id), await l.read("MISSION");
103
+ await _.delete(e._id), await m.read("MISSION");
103
104
  },
104
105
  {
105
106
  message: n("connect.program.common.remove.removing", { name: e.name }),
@@ -110,23 +111,35 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-
110
111
  );
111
112
  }
112
113
  async function y(e) {
113
- e ? await o() : K.open(async (f) => {
114
- await o(f);
114
+ e ? await o() : K.open(async (r) => {
115
+ await o(r);
115
116
  });
116
- async function o(f) {
117
- var g;
118
- (g = S.value) == null || g.showSheet(
117
+ async function o(r) {
118
+ var f;
119
+ (f = F.value) == null || f.showSheet(
119
120
  !0,
120
121
  "MISSION",
121
122
  e ? await _.readById(e._id) : void 0,
122
- f
123
+ r
123
124
  );
124
125
  }
125
126
  }
126
- async function T(e) {
127
- await C(
127
+ async function U(e) {
128
+ e.campaign._id && e.campaign.rewards.some((o) => o.type === "VOUCHER") && await new Promise((o) => {
129
+ C.open({
130
+ title: "Confirmation",
131
+ message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
132
+ primaryActions: { text: "Update all", close: !0 },
133
+ secondaryActions: { text: "Update future only", close: !0 }
134
+ }).onPrimary(async () => {
135
+ var r;
136
+ e.updateCollections = !0, (r = window.top) == null || r.postMessage("updateAllVoucher", "*"), o();
137
+ }).onSecondary(async () => {
138
+ o();
139
+ });
140
+ }), await S(
128
141
  async () => {
129
- e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await l.read("MISSION");
142
+ e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await m.read("MISSION");
130
143
  },
131
144
  {
132
145
  message: n(
@@ -140,30 +153,30 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-
140
153
  }
141
154
  );
142
155
  }
143
- return A(async () => {
144
- await P(async () => {
145
- await l.read("MISSION"), console.log(u);
156
+ return H(async () => {
157
+ await R(async () => {
158
+ await m.read("MISSION"), console.log(g);
146
159
  });
147
160
  }), (e, o) => {
148
- const f = r("FmPageHead"), g = r("FmSearch"), O = r("FmTable"), k = r("FmButton"), j = r("FmListItem"), D = r("FmList"), U = r("FmCard");
149
- return d(), h(b, null, [
150
- c(f, {
161
+ const r = l("FmPageHead"), f = l("FmSearch"), O = l("FmTable"), I = l("FmButton"), A = l("FmListItem"), D = l("FmList"), j = l("FmCard");
162
+ return p(), h(w, null, [
163
+ c(r, {
151
164
  title: t(n)("connect.campaign.mission.title"),
152
- actions: t(u).length > 0 ? [B] : [],
165
+ actions: t(g).length > 0 ? [P] : [],
153
166
  "onClick:action": o[0] || (o[0] = () => y())
154
167
  }, null, 8, ["title", "actions"]),
155
- s("div", ae, [
156
- c(g, {
168
+ s("div", se, [
169
+ c(f, {
157
170
  modelValue: t(i).searchKey,
158
171
  "onUpdate:modelValue": o[1] || (o[1] = (a) => t(i).searchKey = a),
159
172
  class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
160
173
  placeholder: t(n)("connect.program.common.search"),
161
174
  collapsible: ""
162
175
  }, null, 8, ["modelValue", "placeholder"]),
163
- t(l).campaigns.mission && t(l).campaigns.mission.length > 0 ? (d(), h(b, { key: 0 }, [
164
- s("div", se, [
165
- s("div", ie, [
166
- c(Z, {
176
+ t(m).campaigns.mission && t(m).campaigns.mission.length > 0 ? (p(), h(w, { key: 0 }, [
177
+ s("div", ie, [
178
+ s("div", ce, [
179
+ c(ee, {
167
180
  modelValue: t(i).location,
168
181
  "onUpdate:modelValue": o[2] || (o[2] = (a) => t(i).location = a),
169
182
  label: t(n)("connect.program.common.location"),
@@ -173,7 +186,7 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-
173
186
  items: t(N).locationItems
174
187
  }, null, 8, ["modelValue", "label", "items"])
175
188
  ]),
176
- c(g, {
189
+ c(f, {
177
190
  modelValue: t(i).searchKey,
178
191
  "onUpdate:modelValue": o[3] || (o[3] = (a) => t(i).searchKey = a),
179
192
  class: "xs:hidden",
@@ -183,39 +196,39 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-
183
196
  ]),
184
197
  c(O, {
185
198
  class: "xs:hidden",
186
- "row-data": t(u),
187
- "column-defs": R,
199
+ "row-data": t(g),
200
+ "column-defs": T,
188
201
  "search-value": t(i).searchKey,
189
202
  "column-filter": [],
190
203
  onRowClick: o[4] || (o[4] = (a) => y(a.original)),
191
- "hide-footer": t(u).length < 10
204
+ "hide-footer": t(g).length < 10
192
205
  }, null, 8, ["row-data", "search-value", "hide-footer"]),
193
206
  c(D, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
194
- default: w(() => [
195
- (d(!0), h(b, null, H(t(u).filter(
207
+ default: x(() => [
208
+ (p(!0), h(w, null, q(t(g).filter(
196
209
  (a) => a.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
197
- ), (a) => (d(), x(j, {
210
+ ), (a) => (p(), b(A, {
198
211
  key: a._id.toString(),
199
- onClick: (I) => y(a),
212
+ onClick: (V) => y(a),
200
213
  class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
201
214
  }, {
202
- default: w(() => [
203
- s("div", ce, [
204
- s("div", re, [
205
- (d(), x(q(t(L)(a)))),
206
- s("div", le, p(a.currentReceive ?? 0) + " used ", 1)
215
+ default: x(() => [
216
+ s("div", re, [
217
+ s("div", le, [
218
+ (p(), b(z(t(L)(a)))),
219
+ s("div", me, u(a.currentReceive ?? 0) + " used ", 1)
207
220
  ]),
208
- s("div", me, [
209
- s("div", de, p(a.name), 1),
210
- s("div", pe, p(t(M)(a)), 1)
221
+ s("div", de, [
222
+ s("div", pe, u(a.name), 1),
223
+ s("div", ue, u(t(B)(a)), 1)
211
224
  ]),
212
- s("div", ue, " Token received: " + p(a.currentReceive ?? 0), 1)
225
+ s("div", ge, " Token received: " + u(a.currentReceive ?? 0), 1)
213
226
  ]),
214
- c(k, {
227
+ c(I, {
215
228
  icon: "delete",
216
229
  "icon-color": "neutral-gray-400",
217
230
  variant: "tertiary",
218
- onClick: (I) => (I.stopPropagation(), F(a))
231
+ onClick: (V) => (V.stopPropagation(), k(a))
219
232
  }, null, 8, ["onClick"])
220
233
  ]),
221
234
  _: 2
@@ -223,21 +236,21 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-
223
236
  ]),
224
237
  _: 1
225
238
  })
226
- ], 64)) : (d(), x(U, {
239
+ ], 64)) : (p(), b(j, {
227
240
  key: 1,
228
241
  variant: "outlined",
229
242
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
230
243
  }, {
231
- default: w(() => [
244
+ default: x(() => [
232
245
  o[6] || (o[6] = s("img", {
233
- src: z,
246
+ src: W,
234
247
  class: "aspect-square w-[150px]"
235
248
  }, null, -1)),
236
249
  s("div", fe, [
237
- s("div", ge, p(t(n)("connect.campaign.mission.createProgram")), 1),
238
- s("div", ye, p(t(n)("connect.campaign.mission.description")), 1)
250
+ s("div", ye, u(t(n)("connect.campaign.mission.createProgram")), 1),
251
+ s("div", _e, u(t(n)("connect.campaign.mission.description")), 1)
239
252
  ]),
240
- c(k, {
253
+ c(I, {
241
254
  variant: "primary",
242
255
  label: t(n)("connect.campaign.mission.create"),
243
256
  icon: "add",
@@ -246,10 +259,10 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-
246
259
  ]),
247
260
  _: 1
248
261
  })),
249
- c(ee, {
262
+ c(te, {
250
263
  ref_key: "sheetRef",
251
- ref: S,
252
- "onSubmit:modelValue": T
264
+ ref: F,
265
+ "onSubmit:modelValue": U
253
266
  }, null, 512)
254
267
  ])
255
268
  ], 64);
@@ -257,5 +270,5 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-
257
270
  }
258
271
  });
259
272
  export {
260
- Be as default
273
+ Ke as default
261
274
  };