@feedmepos/mf-connect 0.1.94-prod → 0.1.96-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 (96) hide show
  1. package/dist/{Analytic-C4SizezK.js → Analytic-l10g_BkW.js} +11 -11
  2. package/dist/{App-D-hFna2n.js → App-NtFnJR3D.js} +7 -7
  3. package/dist/{Bin-X8fj4bMG.js → Bin-DvJgE8J0.js} +8 -8
  4. package/dist/{Broadcast-BOkgPTzN.js → Broadcast-BygITJjC.js} +8 -8
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D-L47c1P.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BVuhePfe.js} +6 -6
  6. package/dist/{Card-D7kESx0U.js → Card-BY8qbjNS.js} +18 -18
  7. package/dist/{Collections-DPnFPw6r.js → Collections-CXZxfQmy.js} +8 -8
  8. package/dist/{Credit-BGAaT3HG.js → Credit-Dj4gJd18.js} +8 -8
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-KSIiiB9Q.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Djcv8RCR.js} +32 -32
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-D_NFLsFg.js → EffectSheet.vue_vue_type_style_index_0_lang-IH5P2GQ4.js} +6 -6
  11. package/dist/{Experience-Be4o2OU-.js → Experience-CKLT-XKN.js} +8 -8
  12. package/dist/{FileSaver.min-DgSK_XrR.js → FileSaver.min-CqZKU_4D.js} +1 -1
  13. package/dist/{Game-CghN-1RX.js → Game-CMXXSxs7.js} +9 -9
  14. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BSy4d3G0.js → ImageInput.vue_vue_type_script_setup_true_lang-B4u8lwM_.js} +1 -1
  15. package/dist/{Index-k0G9w0yK.js → Index-CFGAKZTu.js} +10 -10
  16. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DESyMHTm.js → LottieAnimation.vue_vue_type_script_setup_true_lang-UfQtiVK3.js} +1 -1
  17. package/dist/{MainLayout-CUwuE1cx.js → MainLayout-UCAW-wwn.js} +1 -1
  18. package/dist/{Marketing-RvxBD37i.js → Marketing-HU2MkAbE.js} +4 -4
  19. package/dist/{MarketingMaterialEdit-DjSHYb5a.js → MarketingMaterialEdit-CS7hzmeA.js} +6 -6
  20. package/dist/{Member-BU1ztsog.js → Member-BG1gvC8G.js} +11 -11
  21. package/dist/{MemberList-CuJqyXl1.js → MemberList-C7l5YNJF.js} +26 -26
  22. package/dist/{MemberTransactions-ChtN45nv.js → MemberTransactions-RQD9xfSN.js} +1 -1
  23. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BWy4TCWA.js → MessageInput.vue_vue_type_script_setup_true_lang-CcTrvGEk.js} +3616 -3613
  24. package/dist/{Mission-CXO13wYt.js → Mission-B2ynmUaz.js} +9 -9
  25. package/dist/{Overview-BFk6RUfT.js → Overview-DI1MMGCM.js} +18 -18
  26. package/dist/{Point-CRb_e9_T.js → Point-DkLfnk6D.js} +8 -8
  27. package/dist/{Promotion-CzBnL4Fb.js → Promotion-BDsMtw76.js} +9 -9
  28. package/dist/{Queue-yBpxPpYt.js → Queue-Bu5PffRS.js} +10 -10
  29. package/dist/{Record-D-TG01TU.js → Record-C9zk5pr8.js} +9 -9
  30. package/dist/{Reward-BB3e02sP.js → Reward-DLyMbKCK.js} +16 -16
  31. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-C5QV98fT.js → RewardGroup.vue_vue_type_script_setup_true_lang-XWcV6P7K.js} +11 -11
  32. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-P8tL3nbd.js → RuleGroup.vue_vue_type_script_setup_true_lang-BW2MrhuC.js} +14 -14
  33. package/dist/{Segment-DRpWquZa.js → Segment-CkvTGYMI.js} +24 -24
  34. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DxXuh-ka.js → SelectItems.vue_vue_type_script_setup_true_lang-CmoGA4QY.js} +2 -2
  35. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-We5j9lt4.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-D0fupqWp.js} +12 -12
  36. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DxyoCl-_.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CdPBhSHS.js} +4 -4
  37. package/dist/{Setting-C9yjOZ87.js → Setting-3aaebMiz.js} +402 -394
  38. package/dist/{SettingAdvertisements-BrL7fzyo.js → SettingAdvertisements-B1rlNyFd.js} +12 -12
  39. package/dist/{Store-o2A42oM9.js → Store-7BnWIZ7G.js} +21 -21
  40. package/dist/{StoreRewards-DTc-tze9.js → StoreRewards-CjcrPRwJ.js} +203 -200
  41. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-dqWyzeNQ.js → StoreTransactions.vue_vue_type_script_setup_true_lang-C3mmS25r.js} +20 -20
  42. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B9vyfEJ4.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-TVsbx26f.js} +2 -2
  43. package/dist/{Tier--mkd2R5v.js → Tier-BJpbCCsL.js} +21 -21
  44. package/dist/{Title-Bbfla0cr.js → Title-CqpbvePy.js} +20 -20
  45. package/dist/{Transaction-qaZkcgDb.js → Transaction-B8gpL3cS.js} +2 -2
  46. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DtEayEDZ.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DDoia_qu.js} +6 -6
  47. package/dist/{Voucher-DrD1klPQ.js → Voucher-DQ6i1GyQ.js} +12 -12
  48. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-8A08tw4v.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BudfxMvl.js} +12 -12
  49. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CeEj5YEr.js → ZodTextField.vue_vue_type_script_setup_true_lang-B43ehs2w.js} +2 -2
  50. package/dist/{app-C9NBtsS0.js → app-Cdi9yyaa.js} +44 -44
  51. package/dist/app.js +1 -1
  52. package/dist/{business-Cop7N-Vb.js → business-BPhMhPp8.js} +1 -1
  53. package/dist/{campaign-BFh9kyiE.js → campaign-DHqBhgh5.js} +1 -1
  54. package/dist/{campaign-ChpQh36F.js → campaign-DLWpOBzd.js} +8 -8
  55. package/dist/{campaign.enum-CtjZDqiv.js → campaign.enum-C7BourYN.js} +1 -1
  56. package/dist/{campaign.fn-DjB4VMSG.js → campaign.fn-PjAM2LtF.js} +3 -3
  57. package/dist/{collectible.enum-BhdvsWLA.js → collectible.enum-EoZwnXkR.js} +1 -1
  58. package/dist/{collection.fn-COF73byG.js → collection.fn-Ds616d3q.js} +2 -2
  59. package/dist/{dto-BkAaTaPc.js → dto-5fg5RWhP.js} +4 -4
  60. package/dist/{effect-DP_xPr78.js → effect-BJva6Fjl.js} +1 -1
  61. package/dist/{email-addresses-LLl_hPXN.js → email-addresses-CuhtzvMR.js} +2 -2
  62. package/dist/{export-DyEK7it9.js → export-D2wb3Zzg.js} +3 -3
  63. package/dist/{helper-CF1K9DOV.js → helper-B80tn5O6.js} +1 -1
  64. package/dist/{index-E4w9XPhA.js → index-B0S0BGjb.js} +1 -1
  65. package/dist/{index-CcrMHlm_.js → index-B85ryzLj.js} +6 -6
  66. package/dist/{index-CZxm2IMs.js → index-BVXwb1vw.js} +6 -1
  67. package/dist/{index-cElMnA7z.js → index-C7XyuCH8.js} +3 -3
  68. package/dist/{index-ByGqfGwa.js → index-CCfDzgJb.js} +1 -1
  69. package/dist/{index-C7HSy1e4.js → index-CmGQazKB.js} +1 -1
  70. package/dist/{index-4Aw-NLqp.js → index-D1_JoBc_.js} +1 -1
  71. package/dist/{index-D5hUx20Z.js → index-DA5sHUgD.js} +1 -1
  72. package/dist/{index-D1wvIKRJ.js → index-DDLHaeVd.js} +4 -4
  73. package/dist/{index-CH9Gn4Rm.js → index-Dg-VScjz.js} +3 -3
  74. package/dist/{index-BXfpnzN1.js → index-HzTI8A55.js} +3 -3
  75. package/dist/{index-D_ndielx.js → index-v9zPLkiJ.js} +2 -2
  76. package/dist/{index.esm2017-GRwgxV0t.js → index.esm2017-CfogVJWR.js} +1 -1
  77. package/dist/{loading-CO0M0nxr.js → loading-_HLw0JNH.js} +1 -1
  78. package/dist/{lodash-DFmiQacb.js → lodash-7LLl_N0k.js} +1 -1
  79. package/dist/{membership-D6_22-xF.js → membership-Dl34LatD.js} +3 -3
  80. package/dist/{money-DSbd6SFQ.js → money-Ca4jlK9c.js} +1 -1
  81. package/dist/{number-B1QtQcvF.js → number-CWjqupZw.js} +1 -1
  82. package/dist/{objectid-B6FzEMG3.js → objectid-BGNEnJDn.js} +2 -2
  83. package/dist/{plugins-DE4E1cJ1.js → plugins-uNooTC4W.js} +3 -3
  84. package/dist/{reward-CRYdTCfB.js → reward-BRIYprM8.js} +1 -1
  85. package/dist/{rule-hw_oJ1Qa.js → rule-CkUScWS-.js} +3 -3
  86. package/dist/{rule-builder-XPwqTNXn.js → rule-builder-Ds-h-MuV.js} +1 -1
  87. package/dist/{template-CQ7GNSMx.js → template-0zuNVS82.js} +7 -7
  88. package/dist/{timezone-BtHXV2BF.js → timezone-BIzl2Gac.js} +2 -2
  89. package/dist/{trigger-Cy3QPbyW.js → trigger-Dd92AYz3.js} +5 -5
  90. package/dist/{useMarketingMaterialActions-Df19Yv2i.js → useMarketingMaterialActions-DlEYiRxQ.js} +3 -3
  91. package/dist/{usePagination-D97nnJ4X.js → usePagination--trERWY4.js} +1 -1
  92. package/dist/{user-BaohGxnu.js → user-CI-tPhnX.js} +1 -1
  93. package/dist/{vue-i18n-BfQcuJ7l.js → vue-i18n-BIM-SckA.js} +165 -165
  94. package/dist/{xlsx-DQ7q1MfO.js → xlsx-BtsmiXIl.js} +1 -1
  95. package/dist/{zod-PPTUgHOO.js → zod-Cq4jls5y.js} +1 -1
  96. package/package.json +1 -1
@@ -1,181 +1,184 @@
1
- import { defineComponent as Z, ref as U, computed as q, onMounted as z, resolveComponent as C, openBlock as y, createBlock as E, unref as e, isRef as ee, withCtx as S, createElementVNode as n, createVNode as c, createElementBlock as L, createTextVNode as te, resolveDynamicComponent as N, toDisplayString as D, Fragment as W, createCommentVNode as I, h as x } from "vue";
1
+ import { defineComponent as Z, ref as A, computed as q, onMounted as z, resolveComponent as F, openBlock as y, createBlock as E, unref as e, isRef as ee, withCtx as V, createElementVNode as s, createVNode as c, createElementBlock as D, createTextVNode as te, resolveDynamicComponent as N, toDisplayString as H, Fragment as W, createCommentVNode as P, h as C } from "vue";
2
2
  import { _ as oe } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as J, components as $ } from "@feedmepos/ui-library";
4
- import "./index-ByGqfGwa.js";
5
- import { u as ae } from "./loading-CO0M0nxr.js";
6
- import { C as Q, u as se } from "./membership-D6_22-xF.js";
7
- import { p as P, f as K } from "./plugins-DE4E1cJ1.js";
4
+ import "./index-CCfDzgJb.js";
5
+ import { u as ae } from "./loading-_HLw0JNH.js";
6
+ import { C as Q, u as ne } from "./membership-Dl34LatD.js";
7
+ import { p as B, f as K } from "./plugins-uNooTC4W.js";
8
8
  import { useCoreStore as X } from "@feedmepos/mf-common";
9
- import { u as ne } from "./vue-i18n-BfQcuJ7l.js";
10
- import { F as re } from "./index-BXfpnzN1.js";
11
- import { c as ie } from "./object-qECH92oz.js";
9
+ import { u as se } from "./vue-i18n-BIM-SckA.js";
10
+ import { F as ie } from "./index-HzTI8A55.js";
11
+ import { c as re } from "./object-qECH92oz.js";
12
12
  import { u as Y } from "./app-wDQR6dpb.js";
13
- import { u as le } from "./business-Cop7N-Vb.js";
14
- import { Z as h } from "./zod-PPTUgHOO.js";
15
- import { _ as de } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CeEj5YEr.js";
16
- import { _ as ce } from "./ImageInput.vue_vue_type_script_setup_true_lang-BSy4d3G0.js";
17
- import { _ as me } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-B9vyfEJ4.js";
18
- import { _ as pe, a as ue } from "./EffectSheet.vue_vue_type_style_index_0_lang-D_NFLsFg.js";
19
- import { i as fe, F as ye, h as j, t as we } from "./helper-CF1K9DOV.js";
13
+ import { u as le } from "./business-BPhMhPp8.js";
14
+ import { Z as h } from "./zod-Cq4jls5y.js";
15
+ import { _ as de } from "./ZodTextField.vue_vue_type_script_setup_true_lang-B43ehs2w.js";
16
+ import { _ as ce } from "./ImageInput.vue_vue_type_script_setup_true_lang-B4u8lwM_.js";
17
+ import { _ as me } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-TVsbx26f.js";
18
+ import { _ as pe, a as ue } from "./EffectSheet.vue_vue_type_style_index_0_lang-IH5P2GQ4.js";
19
+ import { i as fe, F as ye, h as j, t as we } from "./helper-B80tn5O6.js";
20
20
  import { useRouter as ge } from "vue-router";
21
- import { m as G } from "./index-CZxm2IMs.js";
22
- import { R as B } from "./app-C9NBtsS0.js";
23
- const ve = {
21
+ import { m as G } from "./index-BVXwb1vw.js";
22
+ import { R as L } from "./app-Cdi9yyaa.js";
23
+ function ve(w) {
24
+ return !!(w != null && w.isAdmin) || !!(w != null && w.isStaff);
25
+ }
26
+ const be = {
24
27
  key: 0,
25
28
  class: "flex flex-col space-y-16 pr-12"
26
- }, be = { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, Re = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary flex items-center justify-between" }, _e = { class: "flex items-center gap-8" }, xe = /* @__PURE__ */ Z({
29
+ }, Re = { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, _e = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary flex items-center justify-between" }, xe = { class: "flex items-center gap-8" }, Ce = /* @__PURE__ */ Z({
27
30
  __name: "EditRewardSheet",
28
31
  emits: ["update"],
29
- setup(H, { expose: r, emit: T }) {
30
- const k = T, u = le(), l = X(), w = U(!1), s = U(), F = U(), V = U(!1), g = re, v = q(
32
+ setup(w, { expose: i, emit: k }) {
33
+ const U = k, u = le(), l = X(), g = A(!1), n = A(), S = A(), O = A(!1), v = ie, b = q(
31
34
  () => {
32
35
  var d;
33
- return Q[((d = s.value) == null ? void 0 : d.type) || "VOUCHER"];
36
+ return Q[((d = n.value) == null ? void 0 : d.type) || "VOUCHER"];
34
37
  }
35
- ), b = q(() => {
36
- const d = g.safeParse(s.value);
38
+ ), R = q(() => {
39
+ const d = v.safeParse(n.value);
37
40
  return d.success ? [] : d.error.errors;
38
41
  });
39
42
  function M() {
40
- const d = g.safeParse(s.value);
43
+ const d = v.safeParse(n.value);
41
44
  if (d.success) {
42
45
  const a = { ...d.data };
43
- V.value && (a.capabilities = ye), k("update", a);
46
+ O.value && (a.capabilities = ye), U("update", a);
44
47
  }
45
48
  }
46
- function A(d, a, O = {
49
+ function I(d, a, T = {
47
50
  isStoreReward: !1,
48
51
  type: "VOUCHER"
49
52
  }) {
50
- w.value = d, d && (F.value = void 0, V.value = O.isFeedvibe ?? !1, s.value = a || fe(O.type, {
53
+ g.value = d, d && (S.value = void 0, O.value = T.isFeedvibe ?? !1, n.value = a || fe(T.type, {
51
54
  business: l.currentBusiness.value._id,
52
- noCampaign: O.isStoreReward == !0
55
+ noCampaign: T.isStoreReward == !0
53
56
  }));
54
57
  }
55
58
  return z(async () => {
56
59
  await u.readLocations();
57
- }), r({
58
- showSheet: A,
59
- data: s,
60
- rewardImage: F
60
+ }), i({
61
+ showSheet: I,
62
+ data: n,
63
+ rewardImage: S
61
64
  }), (d, a) => {
62
- const O = C("FmTextarea"), t = C("FmHelperText"), o = C("FmButton"), m = C("FmSideSheet");
65
+ const T = F("FmTextarea"), t = F("FmHelperText"), o = F("FmButton"), m = F("FmSideSheet");
63
66
  return y(), E(m, {
64
67
  "max-width": 560,
65
- modelValue: e(w),
66
- "onUpdate:modelValue": a[7] || (a[7] = (p) => ee(w) ? w.value = p : null),
68
+ modelValue: e(g),
69
+ "onUpdate:modelValue": a[7] || (a[7] = (p) => ee(g) ? g.value = p : null),
67
70
  header: "Store setting"
68
71
  }, {
69
- "side-sheet-footer": S(() => [
70
- n("div", _e, [
72
+ "side-sheet-footer": V(() => [
73
+ s("div", xe, [
71
74
  c(o, {
72
75
  label: "Submit",
73
76
  onClick: M,
74
- disabled: e(b).length > 0 || e(Y)().isLoading,
77
+ disabled: e(R).length > 0 || e(Y)().isLoading,
75
78
  loading: e(Y)().isLoading
76
79
  }, null, 8, ["disabled", "loading"]),
77
80
  c(o, {
78
81
  label: "Cancel",
79
- onClick: a[6] || (a[6] = (p) => A(!1)),
82
+ onClick: a[6] || (a[6] = (p) => I(!1)),
80
83
  variant: "tertiary"
81
84
  })
82
85
  ])
83
86
  ]),
84
- default: S(() => {
85
- var p, R, _;
87
+ default: V(() => {
88
+ var p, _, x;
86
89
  return [
87
- e(s) ? (y(), L("div", ve, [
88
- n("div", be, [
90
+ e(n) ? (y(), D("div", be, [
91
+ s("div", Re, [
89
92
  a[8] || (a[8] = te(" Reward information ", -1)),
90
- (y(), E(N(e(v).chip())))
93
+ (y(), E(N(e(b).chip())))
91
94
  ]),
92
95
  c(de, {
93
- modelValue: e(s).name,
94
- "onUpdate:modelValue": a[0] || (a[0] = (i) => e(s).name = i),
95
- label: `${e(v).name} name`,
96
- schema: e(h).typeAtPath(e(g), "name", [e(s).type])
96
+ modelValue: e(n).name,
97
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => e(n).name = r),
98
+ label: `${e(b).name} name`,
99
+ schema: e(h).typeAtPath(e(v), "name", [e(n).type])
97
100
  }, null, 8, ["modelValue", "label", "schema"]),
98
- c(O, {
101
+ c(T, {
99
102
  class: "!mb-[-16px]",
100
- modelValue: e(s).description,
101
- "onUpdate:modelValue": a[1] || (a[1] = (i) => e(s).description = i),
102
- rules: [e(h).ruleAtPath(e(g), "description", [e(s).type])]
103
+ modelValue: e(n).description,
104
+ "onUpdate:modelValue": a[1] || (a[1] = (r) => e(n).description = r),
105
+ rules: [e(h).ruleAtPath(e(v), "description", [e(n).type])]
103
106
  }, {
104
- label: S(() => [
107
+ label: V(() => [
105
108
  (y(), E(N(
106
109
  e(h).toInputLabel(
107
- e(h).typeAtPath(e(g), "description", [e(s).type]),
108
- `${e(v).name} description`
110
+ e(h).typeAtPath(e(v), "description", [e(n).type]),
111
+ `${e(b).name} description`
109
112
  )
110
113
  )))
111
114
  ]),
112
115
  _: 1
113
116
  }, 8, ["modelValue", "rules"]),
114
- n("div", Re, [
115
- n("div", null, D(e(v).name) + " description should not exceed 200 characters. ", 1),
116
- n("div", null, D(((p = e(s).description) == null ? void 0 : p.length) ?? 0) + "/200", 1)
117
+ s("div", _e, [
118
+ s("div", null, H(e(b).name) + " description should not exceed 200 characters. ", 1),
119
+ s("div", null, H(((p = e(n).description) == null ? void 0 : p.length) ?? 0) + "/200", 1)
117
120
  ]),
118
121
  c(ce, {
119
122
  class: "w-1/2 xs:w-2/3",
120
123
  "aspect-ratio": "16/9",
121
- file: e(F) ?? void 0,
122
- thumbnail: e(s).image ?? void 0,
123
- "onUpdate:file": a[2] || (a[2] = async (i) => {
124
- F.value = i, i || (e(s).image = null);
124
+ file: e(S) ?? void 0,
125
+ thumbnail: e(n).image ?? void 0,
126
+ "onUpdate:file": a[2] || (a[2] = async (r) => {
127
+ S.value = r, r || (e(n).image = null);
125
128
  })
126
129
  }, {
127
- label: S(() => [
130
+ label: V(() => [
128
131
  (y(), E(N(
129
132
  e(h).toInputLabel(
130
- e(h).typeAtPath(e(g), "image", [e(s).type]),
131
- `${e(v).name} image`
133
+ e(h).typeAtPath(e(v), "image", [e(n).type]),
134
+ `${e(b).name} image`
132
135
  )
133
136
  )))
134
137
  ]),
135
138
  _: 1
136
139
  }, 8, ["file", "thumbnail"]),
137
- e(s).type === "VOUCHER" ? (y(), L(W, { key: 0 }, [
138
- a[9] || (a[9] = n("div", { class: "fm-typo-en-title-sm-800" }, "Discount", -1)),
140
+ e(n).type === "VOUCHER" ? (y(), D(W, { key: 0 }, [
141
+ a[9] || (a[9] = s("div", { class: "fm-typo-en-title-sm-800" }, "Discount", -1)),
139
142
  c(pe, {
140
- "model-value": e(s).extras.effect,
141
- "onUpdate:modelValue": a[3] || (a[3] = (i) => {
142
- e(s).extras.effect = i;
143
+ "model-value": e(n).extras.effect,
144
+ "onUpdate:modelValue": a[3] || (a[3] = (r) => {
145
+ e(n).extras.effect = r;
143
146
  })
144
147
  }, null, 8, ["model-value"]),
145
- e(s).extras.effect == null ? (y(), E(t, {
148
+ e(n).extras.effect == null ? (y(), E(t, {
146
149
  key: 0,
147
150
  class: "!mt-8",
148
151
  text: "Effect is required",
149
152
  state: "error"
150
- })) : I("", !0),
151
- a[10] || (a[10] = n("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, " Usage configuration ", -1)),
153
+ })) : P("", !0),
154
+ a[10] || (a[10] = s("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, " Usage configuration ", -1)),
152
155
  c(ue, {
153
- "model-value": e(s).options,
154
- "no-campaign": e(s).noCampaign,
155
- "onUpdate:modelValue": a[4] || (a[4] = (i) => e(s).options = i),
156
- schema: e(h).typeAtPath(e(g), "options", ["VOUCHER"])
156
+ "model-value": e(n).options,
157
+ "no-campaign": e(n).noCampaign,
158
+ "onUpdate:modelValue": a[4] || (a[4] = (r) => e(n).options = r),
159
+ schema: e(h).typeAtPath(e(v), "options", ["VOUCHER"])
157
160
  }, null, 8, ["model-value", "no-campaign", "schema"])
158
- ], 64)) : I("", !0),
159
- a[11] || (a[11] = n("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Availability", -1)),
160
- e(s).type === "VOUCHER" ? (y(), E(me, {
161
+ ], 64)) : P("", !0),
162
+ a[11] || (a[11] = s("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Availability", -1)),
163
+ e(n).type === "VOUCHER" ? (y(), E(me, {
161
164
  key: 1,
162
- "model-value": ((_ = (R = e(s).extras) == null ? void 0 : R.targetLocation) == null ? void 0 : _.map(String)) ?? null,
165
+ "model-value": ((x = (_ = e(n).extras) == null ? void 0 : _.targetLocation) == null ? void 0 : x.map(String)) ?? null,
163
166
  type: "select",
164
- "onUpdate:modelValue": a[5] || (a[5] = (i) => {
165
- e(s).extras.targetLocation = i;
167
+ "onUpdate:modelValue": a[5] || (a[5] = (r) => {
168
+ e(n).extras.targetLocation = r;
166
169
  }),
167
170
  rules: [
168
- e(h).ruleAtPath(e(g), "extras.targetLocation", ["VOUCHER"])
171
+ e(h).ruleAtPath(e(v), "extras.targetLocation", ["VOUCHER"])
169
172
  ]
170
- }, null, 8, ["model-value", "rules"])) : I("", !0)
171
- ])) : I("", !0)
173
+ }, null, 8, ["model-value", "rules"])) : P("", !0)
174
+ ])) : P("", !0)
172
175
  ];
173
176
  }),
174
177
  _: 1
175
178
  }, 8, ["modelValue"]);
176
179
  };
177
180
  }
178
- }), Ce = { class: "flex flex-nowrap gap-x-2 grow h-full" }, Fe = { class: "flex flex-col grow p-24" }, he = { class: "grow pb-16 pr-16 pt-6 w-full" }, Ee = { class: "gap-24 grid grid-cols-1 lg:grid-cols-2" }, Se = /* @__PURE__ */ Z({
181
+ }), Fe = { class: "flex flex-nowrap gap-x-2 grow h-full" }, Se = { class: "flex flex-col grow p-24" }, he = { class: "grow pb-16 pr-16 pt-6 w-full" }, Ee = { class: "gap-24 grid grid-cols-1 lg:grid-cols-2" }, Ve = /* @__PURE__ */ Z({
179
182
  __name: "RewardTypeDialog",
180
183
  props: {
181
184
  onOk: {
@@ -183,42 +186,42 @@ const ve = {
183
186
  required: !0
184
187
  }
185
188
  },
186
- setup(H) {
187
- const r = J(), T = H;
188
- function k(u) {
189
- T.onOk(u), r.close();
189
+ setup(w) {
190
+ const i = J(), k = w;
191
+ function U(u) {
192
+ k.onOk(u), i.close();
190
193
  }
191
194
  return (u, l) => {
192
- const w = C("FmCard");
193
- return y(), E(w, { class: "max-w-6xl" }, {
194
- default: S(() => [
195
- n("div", Ce, [
196
- n("div", Fe, [
197
- l[4] || (l[4] = n("div", { class: "space-y-4" }, [
198
- n("div", { class: "fm-typo-en-title-sm-800" }, "Store rewards"),
199
- n("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, " Select a reward type to get started. ")
195
+ const g = F("FmCard");
196
+ return y(), E(g, { class: "max-w-6xl" }, {
197
+ default: V(() => [
198
+ s("div", Fe, [
199
+ s("div", Se, [
200
+ l[4] || (l[4] = s("div", { class: "space-y-4" }, [
201
+ s("div", { class: "fm-typo-en-title-sm-800" }, "Store rewards"),
202
+ s("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, " Select a reward type to get started. ")
200
203
  ], -1)),
201
- n("div", he, [
202
- n("div", Ee, [
203
- c(w, {
204
+ s("div", he, [
205
+ s("div", Ee, [
206
+ c(g, {
204
207
  variant: "outlined",
205
208
  class: "box-border cursor-pointer h-full p-16 scroll-p-4 space-y-8",
206
- onClick: l[0] || (l[0] = (s) => k("general"))
209
+ onClick: l[0] || (l[0] = (n) => U("general"))
207
210
  }, {
208
- default: S(() => [...l[2] || (l[2] = [
209
- n("div", { class: "fm-typo-en-title-sm-800" }, "General Reward", -1),
210
- n("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " A standard voucher reward that can be freely edited and managed. ", -1)
211
+ default: V(() => [...l[2] || (l[2] = [
212
+ s("div", { class: "fm-typo-en-title-sm-800" }, "General Reward", -1),
213
+ s("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " A standard voucher reward that can be freely edited and managed. ", -1)
211
214
  ])]),
212
215
  _: 1
213
216
  }),
214
- c(w, {
217
+ c(g, {
215
218
  variant: "outlined",
216
219
  class: "box-border cursor-pointer h-full p-16 scroll-p-4 space-y-8",
217
- onClick: l[1] || (l[1] = (s) => k("feedvibe"))
220
+ onClick: l[1] || (l[1] = (n) => U("feedvibe"))
218
221
  }, {
219
- default: S(() => [...l[3] || (l[3] = [
220
- n("div", { class: "fm-typo-en-title-sm-800" }, "FeedVibe Reward", -1),
221
- n("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " A locked reward for FeedVibe bundles. Cannot be edited or deleted after creation. ", -1)
222
+ default: V(() => [...l[3] || (l[3] = [
223
+ s("div", { class: "fm-typo-en-title-sm-800" }, "FeedVibe Reward", -1),
224
+ s("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " A locked reward for FeedVibe bundles. Cannot be edited or deleted after creation. ", -1)
222
225
  ])]),
223
226
  _: 1
224
227
  })
@@ -231,20 +234,20 @@ const ve = {
231
234
  });
232
235
  };
233
236
  }
234
- }), Ve = { class: "px-24 flex flex-col gap-y-16" }, Oe = { class: "flex items-center justify-between w-full" }, Te = { class: "flex flex-col gap-16 text-center" }, ke = { class: "fm-typo-en-title-sm-800" }, Ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, tt = /* @__PURE__ */ Z({
237
+ }), Oe = { class: "px-24 flex flex-col gap-y-16" }, Te = { class: "flex items-center justify-between w-full" }, ke = { class: "flex flex-col gap-16 text-center" }, Ue = { class: "fm-typo-en-title-sm-800" }, Ae = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ot = /* @__PURE__ */ Z({
235
238
  __name: "StoreRewards",
236
- setup(H) {
237
- const { t: r } = ne(), T = J(), k = {
238
- label: r("connect.storeRewards.create"),
239
+ setup(w) {
240
+ const { t: i } = se(), k = J(), U = {
241
+ label: i("connect.storeRewards.create"),
239
242
  value: "create",
240
243
  isPrimary: !0,
241
244
  prependIcon: "add"
242
- }, u = se(), l = X(), { global: w, minor: s } = ae, F = ge(), V = U({
245
+ }, u = ne(), l = X(), { global: g, minor: n } = ae, S = ge(), O = A({
243
246
  searchKey: "",
244
247
  columnFilters: []
245
- }), g = [
248
+ }), v = [
246
249
  {
247
- header: r("connect.storeRewards.table.name"),
250
+ header: i("connect.storeRewards.table.name"),
248
251
  accessorFn: (t) => t.name,
249
252
  cell(t) {
250
253
  const o = t.row.original, m = j(
@@ -253,10 +256,10 @@ const ve = {
253
256
  "selectable",
254
257
  !1
255
258
  );
256
- return x("div", { class: "flex items-center gap-8" }, [
257
- x("span", {}, o.name),
259
+ return C("div", { class: "flex items-center gap-8" }, [
260
+ C("span", {}, o.name),
258
261
  ...m ? [
259
- x($.FmChip, {
262
+ C($.FmChip, {
260
263
  label: "Feedvibe",
261
264
  class: "text-fm-color-primary bg-fm-color-system-warning-100",
262
265
  compact: !0
@@ -267,30 +270,30 @@ const ve = {
267
270
  },
268
271
  {
269
272
  id: "type",
270
- header: r("connect.storeRewards.table.type"),
273
+ header: i("connect.storeRewards.table.type"),
271
274
  accessorFn: (t) => t.type,
272
275
  cell(t) {
273
276
  return Q[t.row.original.type].chip();
274
277
  }
275
278
  },
276
279
  {
277
- header: r("connect.storeRewards.table.validity"),
280
+ header: i("connect.storeRewards.table.validity"),
278
281
  accessorFn: (t) => we(
279
282
  "validityOption" in t.options ? t.options.validityOption || {} : {}
280
283
  )
281
284
  },
282
285
  {
283
- header: r("connect.storeRewards.table.used"),
286
+ header: i("connect.storeRewards.table.used"),
284
287
  meta: {
285
288
  textAlign: "left"
286
289
  },
287
290
  accessorFn: (t) => t.currentReceive ?? 0
288
291
  },
289
292
  {
290
- header: r("connect.storeRewards.table.actions"),
293
+ header: i("connect.storeRewards.table.actions"),
291
294
  cell(t) {
292
- return x("div", { class: "flex items-center justify-end gap-4" }, [
293
- x(
295
+ return C("div", { class: "flex items-center justify-end gap-4" }, [
296
+ C(
294
297
  $.FmMenu,
295
298
  {
296
299
  placement: "bottom-end",
@@ -299,13 +302,13 @@ const ve = {
299
302
  }
300
303
  },
301
304
  {
302
- "menu-button": () => x($.FmButton, {
305
+ "menu-button": () => C($.FmButton, {
303
306
  icon: "more_vert",
304
307
  iconColor: "neutral-gray-400",
305
308
  variant: "tertiary"
306
309
  }),
307
310
  default: () => [
308
- x($.FmMenuItem, {
311
+ C($.FmMenuItem, {
309
312
  label: "View collections",
310
313
  onClick: async (o) => {
311
314
  o.stopPropagation(), M(t.row.original._id);
@@ -316,15 +319,15 @@ const ve = {
316
319
  "STORE_BUNDLE:FEEDVIBE",
317
320
  "deletable"
318
321
  ) ? [
319
- x(
322
+ C(
320
323
  $.FmMenuItem,
321
324
  {
322
325
  onClick: async (o) => {
323
- o.stopPropagation(), A(t.row.original);
326
+ o.stopPropagation(), I(t.row.original);
324
327
  }
325
328
  },
326
329
  {
327
- label: x(
330
+ label: C(
328
331
  "div",
329
332
  {
330
333
  class: "text-fm-color-typo-error fm-typo-en-body-md-400"
@@ -340,42 +343,42 @@ const ve = {
340
343
  ]);
341
344
  }
342
345
  }
343
- ], v = q(
346
+ ], b = q(
344
347
  () => u.bundleRewards.filter((t) => t.type == "VOUCHER")
345
- ), b = U();
348
+ ), R = A();
346
349
  function M(t) {
347
- F.push({
348
- name: B["$connect-STORE_REWARD_COLLECTIONS"],
350
+ S.push({
351
+ name: L["$connect-STORE_REWARD_COLLECTIONS"],
349
352
  params: { id: t }
350
353
  });
351
354
  }
352
- async function A(t) {
355
+ async function I(t) {
353
356
  if (t.type === "TITLE") {
354
- await P.confirm(
355
- r("connect.storeRewards.remove.message"),
356
- r("connect.storeRewards.remove.title"),
357
- r("connect.storeRewards.remove.action")
358
- ) && await F.push({ name: B["$connect-PROGRAM_TITLE"] });
357
+ await B.confirm(
358
+ i("connect.storeRewards.remove.message"),
359
+ i("connect.storeRewards.remove.title"),
360
+ i("connect.storeRewards.remove.action")
361
+ ) && await S.push({ name: L["$connect-PROGRAM_TITLE"] });
359
362
  return;
360
363
  }
361
- await P.remove(
362
- r("connect.storeRewards.delete.confirm"),
363
- r("connect.storeRewards.delete.title")
364
- ) && await s(
364
+ await B.remove(
365
+ i("connect.storeRewards.delete.confirm"),
366
+ i("connect.storeRewards.delete.title")
367
+ ) && await n(
365
368
  async () => {
366
369
  await G.deleteReward(t._id), await u.readMembership(), await u.readRewards();
367
370
  },
368
371
  {
369
- message: r("connect.storeRewards.delete.message"),
370
- successMessage: r("connect.storeRewards.delete.success")
372
+ message: i("connect.storeRewards.delete.message"),
373
+ successMessage: i("connect.storeRewards.delete.success")
371
374
  }
372
375
  );
373
376
  }
374
377
  function d() {
375
378
  return new Promise((t) => {
376
- T.open({
379
+ k.open({
377
380
  title: "Create reward",
378
- dialogComponent: x(Se, {
381
+ dialogComponent: C(Ve, {
379
382
  onOk: (o) => {
380
383
  t(o);
381
384
  }
@@ -386,14 +389,14 @@ const ve = {
386
389
  });
387
390
  }
388
391
  async function a(t) {
389
- var R, _, i;
390
- const o = t ? ie(u.bundleRewards.find((f) => f._id === t)) : void 0, m = ((R = l.sessionUser.value) == null ? void 0 : R.role.isAdmin) ?? !1, p = !!o && !j(
392
+ var _, x, r;
393
+ const o = t ? re(u.bundleRewards.find((f) => f._id === t)) : void 0, m = ve((_ = l.sessionUser.value) == null ? void 0 : _.role), p = !!o && !j(
391
394
  o.capabilities,
392
395
  "STORE_BUNDLE:FEEDVIBE",
393
396
  "editable"
394
397
  );
395
398
  if (p && !m) {
396
- await P.confirm(
399
+ await B.confirm(
397
400
  "This reward is managed by FeedVibe and cannot be edited.",
398
401
  "Cannot edit reward",
399
402
  "OK"
@@ -401,42 +404,42 @@ const ve = {
401
404
  return;
402
405
  }
403
406
  if ((o == null ? void 0 : o.type) === "TITLE") {
404
- await P.confirm(
407
+ await B.confirm(
405
408
  "You cannot edit a title here, please edit it at the Program > Title section.",
406
409
  "Update reward",
407
410
  "Go to title section"
408
- ) && await F.push({ name: B["$connect-PROGRAM_TITLE"] });
411
+ ) && await S.push({ name: L["$connect-PROGRAM_TITLE"] });
409
412
  return;
410
413
  }
411
414
  if (!o) {
412
415
  const f = await d();
413
416
  if (!f) return;
414
- (_ = b.value) == null || _.showSheet(!0, void 0, {
417
+ (x = R.value) == null || x.showSheet(!0, void 0, {
415
418
  isStoreReward: !0,
416
419
  type: "VOUCHER",
417
420
  isFeedvibe: f === "feedvibe"
418
421
  });
419
422
  return;
420
423
  }
421
- (i = b.value) == null || i.showSheet(!0, o, {
424
+ (r = R.value) == null || r.showSheet(!0, o, {
422
425
  isStoreReward: !0,
423
426
  type: "VOUCHER",
424
427
  // Preserve the FeedVibe lock when an admin edits a locked reward.
425
428
  isFeedvibe: p
426
429
  });
427
430
  }
428
- async function O(t) {
431
+ async function T(t) {
429
432
  let o = !1;
430
433
  t._id && t.type === "VOUCHER" && await new Promise((m) => {
431
- T.open({
434
+ k.open({
432
435
  title: "Confirmation",
433
- message: r("connect.campaign.voucher.updateConfirm.message"),
436
+ message: i("connect.campaign.voucher.updateConfirm.message"),
434
437
  primaryActions: {
435
- text: r("connect.campaign.voucher.updateConfirm.updateAll"),
438
+ text: i("connect.campaign.voucher.updateConfirm.updateAll"),
436
439
  close: !0
437
440
  },
438
441
  secondaryActions: {
439
- text: r("connect.campaign.voucher.updateConfirm.updateFuture"),
442
+ text: i("connect.campaign.voucher.updateConfirm.updateFuture"),
440
443
  close: !0
441
444
  }
442
445
  }).onPrimary(async () => {
@@ -444,19 +447,19 @@ const ve = {
444
447
  }).onSecondary(async () => {
445
448
  m();
446
449
  });
447
- }), await s(
450
+ }), await n(
448
451
  async () => {
449
- var m, p, R, _;
450
- (m = b.value) != null && m.rewardImage && t.image ? await K.delete(t.image) : (p = b.value) != null && p.rewardImage && (t.image = await K.update(
452
+ var m, p, _, x;
453
+ (m = R.value) != null && m.rewardImage && t.image ? await K.delete(t.image) : (p = R.value) != null && p.rewardImage && (t.image = await K.update(
451
454
  t.image || K.collectibleImagePath(
452
455
  void 0,
453
- b.value.rewardImage
456
+ R.value.rewardImage
454
457
  ),
455
- (R = b.value) == null ? void 0 : R.rewardImage
458
+ (_ = R.value) == null ? void 0 : _.rewardImage
456
459
  )), t._id ? await G.updateReward(t._id, {
457
460
  ...t,
458
461
  updateCollection: o
459
- }) : await G.createReward(t), await u.readRewards(), (_ = b.value) == null || _.showSheet(!1);
462
+ }) : await G.createReward(t), await u.readRewards(), (x = R.value) == null || x.showSheet(!1);
460
463
  },
461
464
  {
462
465
  message: "Updating reward",
@@ -465,67 +468,67 @@ const ve = {
465
468
  );
466
469
  }
467
470
  return z(async () => {
468
- await w(async () => {
471
+ await g(async () => {
469
472
  await u.readMembership(), await u.readRewards();
470
473
  });
471
474
  }), (t, o) => {
472
- const m = C("FmPageHead"), p = C("FmSearch"), R = C("FmTable"), _ = C("FmButton"), i = C("FmCard");
473
- return y(), L(W, null, [
475
+ const m = F("FmPageHead"), p = F("FmSearch"), _ = F("FmTable"), x = F("FmButton"), r = F("FmCard");
476
+ return y(), D(W, null, [
474
477
  c(m, {
475
- title: e(r)("connect.storeRewards.title"),
476
- description: e(r)("connect.storeRewards.description"),
477
- actions: [k],
478
+ title: e(i)("connect.storeRewards.title"),
479
+ description: e(i)("connect.storeRewards.description"),
480
+ actions: [U],
478
481
  "back-button": !0,
479
482
  "onClick:action": o[0] || (o[0] = () => a()),
480
- "onClick:back": o[1] || (o[1] = () => e(F).push({ name: e(B)["$connect-STORE"] }))
483
+ "onClick:back": o[1] || (o[1] = () => e(S).push({ name: e(L)["$connect-STORE"] }))
481
484
  }, null, 8, ["title", "description", "actions"]),
482
- n("div", Ve, [
483
- e(v) && e(v).length > 0 ? (y(), L(W, { key: 0 }, [
484
- n("div", Oe, [
485
- o[6] || (o[6] = n("div", { class: "flex gap-8" }, null, -1)),
485
+ s("div", Oe, [
486
+ e(b) && e(b).length > 0 ? (y(), D(W, { key: 0 }, [
487
+ s("div", Te, [
488
+ o[6] || (o[6] = s("div", { class: "flex gap-8" }, null, -1)),
486
489
  c(p, {
487
- modelValue: e(V).searchKey,
488
- "onUpdate:modelValue": o[2] || (o[2] = (f) => e(V).searchKey = f),
490
+ modelValue: e(O).searchKey,
491
+ "onUpdate:modelValue": o[2] || (o[2] = (f) => e(O).searchKey = f),
489
492
  class: "",
490
493
  placeholder: "search",
491
494
  collapsible: ""
492
495
  }, null, 8, ["modelValue"])
493
496
  ]),
494
- c(R, {
495
- "row-data": e(v),
496
- "column-defs": g,
497
- "search-value": e(V).searchKey,
498
- "column-filter": e(V).columnFilters,
497
+ c(_, {
498
+ "row-data": e(b),
499
+ "column-defs": v,
500
+ "search-value": e(O).searchKey,
501
+ "column-filter": e(O).columnFilters,
499
502
  onRowClick: o[3] || (o[3] = (f) => a(f.original._id)),
500
- "hide-footer": e(v).length < 10
503
+ "hide-footer": e(b).length < 10
501
504
  }, null, 8, ["row-data", "search-value", "column-filter", "hide-footer"])
502
- ], 64)) : (y(), E(i, {
505
+ ], 64)) : (y(), E(r, {
503
506
  key: 1,
504
507
  variant: "outlined",
505
508
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
506
509
  }, {
507
- default: S(() => [
508
- o[7] || (o[7] = n("img", {
510
+ default: V(() => [
511
+ o[7] || (o[7] = s("img", {
509
512
  src: oe,
510
513
  class: "aspect-square w-[150px]"
511
514
  }, null, -1)),
512
- n("div", Te, [
513
- n("div", ke, D(e(r)("connect.storeRewards.empty.title")), 1),
514
- n("div", Ue, D(e(r)("connect.storeRewards.empty.description")), 1)
515
+ s("div", ke, [
516
+ s("div", Ue, H(e(i)("connect.storeRewards.empty.title")), 1),
517
+ s("div", Ae, H(e(i)("connect.storeRewards.empty.description")), 1)
515
518
  ]),
516
- c(_, {
519
+ c(x, {
517
520
  variant: "primary",
518
- label: e(r)("connect.storeRewards.empty.action"),
521
+ label: e(i)("connect.storeRewards.empty.action"),
519
522
  onClick: o[4] || (o[4] = (f) => a()),
520
523
  icon: "add"
521
524
  }, null, 8, ["label"])
522
525
  ]),
523
526
  _: 1
524
527
  })),
525
- c(xe, {
528
+ c(Ce, {
526
529
  ref_key: "rewardSheetRef",
527
- ref: b,
528
- onUpdate: o[5] || (o[5] = (f) => O(f))
530
+ ref: R,
531
+ onUpdate: o[5] || (o[5] = (f) => T(f))
529
532
  }, null, 512)
530
533
  ])
531
534
  ], 64);
@@ -533,5 +536,5 @@ const ve = {
533
536
  }
534
537
  });
535
538
  export {
536
- tt as default
539
+ ot as default
537
540
  };