@feedmepos/mf-connect 0.1.21-prod → 0.1.22-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.
- package/dist/{Analytic-BQiGib08.js → Analytic-CWvtQiXv.js} +10 -10
- package/dist/{App-B8e7d2pF.js → App-BqAI4Hkg.js} +7 -7
- package/dist/{Bin-BLlnEux-.js → Bin-BJRETFYp.js} +7 -7
- package/dist/{Broadcast-BGw646-m.js → Broadcast-BVNKXpst.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BT5rtjPA.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BeauGnZ8.js} +6 -6
- package/dist/{Card-I9YI4BlJ.js → Card-BH5HR_Xt.js} +14 -14
- package/dist/{Collections-BV8_G7vd.js → Collections-DUzS8_tu.js} +5 -5
- package/dist/{Credit-nrEbKUWc.js → Credit-DVyhB8Fx.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BTkAiIvO.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BzSJIIBN.js} +28 -27
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-C-dcVww-.js → EffectSheet.vue_vue_type_style_index_0_lang-CtgRejaJ.js} +6 -6
- package/dist/{Experience-Cj6yrQ-5.js → Experience-Uz-PdyS0.js} +8 -8
- package/dist/{Game-C57UeXHH.js → Game-yRSag2UH.js} +8 -8
- package/dist/{Index-C_m0ldjU.js → Index-D54c-_3K.js} +9 -9
- package/dist/{MainLayout-DpZC6o3R.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js} +19 -53
- package/dist/MainLayout-B1aJoR95.js +41 -0
- package/dist/{Marketing-CH1DN3VY.js → Marketing-wYfRoaP3.js} +12 -12
- package/dist/{Member-BcORjsqn.js → Member-BeX0-b7n.js} +4 -4
- package/dist/{MemberList-Ca75OWm_.js → MemberList-B2dwBE3o.js} +23 -23
- package/dist/{MemberTransactions-B0Oa15-s.js → MemberTransactions-jhOw4vzq.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-B8b8FbZX.js +447 -0
- package/dist/{Mission-o0TjmbH_.js → Mission-DzBDmz68.js} +8 -8
- package/dist/{Overview-EiAhGzV6.js → Overview-DZ1-IMkf.js} +16 -16
- package/dist/{Point-qan2Ihfu.js → Point-aP-KiJV2.js} +8 -8
- package/dist/{Promotion-COVNuE2t.js → Promotion-NYlrI4Ur.js} +9 -9
- package/dist/{Record-Cyd2x4RU.js → Record-C3FG6v0j.js} +6 -6
- package/dist/{Reward-k-AweK42.js → Reward-BkgfktZX.js} +14 -14
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CFhyLvSA.js → RewardGroup.vue_vue_type_script_setup_true_lang-CBkgYcan.js} +10 -10
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-tcfaWFK4.js → RuleGroup.vue_vue_type_script_setup_true_lang-DgTRcfYy.js} +181 -178
- package/dist/{Segment-DIb21-Ns.js → Segment-BdCYCRF-.js} +13 -13
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-D7r3NMJu.js → SelectItems.vue_vue_type_script_setup_true_lang-DIWVzxxW.js} +2 -2
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-B5IaCgiU.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BBXjK-Kc.js} +3 -3
- package/dist/Setting-CklTyVlf.js +1930 -0
- package/dist/{Store-DLEcQWU_.js → Store-Ciud1AgX.js} +145 -143
- package/dist/StoreRewards-DUrZvdAy.js +422 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BpNYA-xj.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DabfW0cB.js} +17 -17
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BlEfnhii.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C4g0D2WQ.js} +1 -1
- package/dist/{Tier-jmOeJ9BB.js → Tier-BcJfsKXP.js} +19 -19
- package/dist/{Title-CsV4jem5.js → Title-rtBtv9oZ.js} +100 -100
- package/dist/{Transaction-Bf8PWUc6.js → Transaction-6fAgm3SK.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-bFnBW5gb.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Bjvkwpb4.js} +6 -6
- package/dist/{Voucher-eayylhcc.js → Voucher-DsSs5cTE.js} +34 -34
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DjlgbRZ4.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CrSH0qWc.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DMh6Q2iI.js → ZodTextField.vue_vue_type_script_setup_true_lang-DxDO6zJg.js} +1 -1
- package/dist/{app-bxGFzJpn.js → app-Cz0McG8i.js} +40 -40
- package/dist/{app-NqEzL0OT.js → app-fPygt_FG.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-D6C_7bDy.js → business-wZVszwRW.js} +1 -1
- package/dist/{campaign-BGzVYFng.js → campaign-B-WMI4r4.js} +9 -9
- package/dist/{campaign-yLK6vWS8.js → campaign-CXOSMRjR.js} +2 -2
- package/dist/{campaign.enum-Dbmht5_i.js → campaign.enum-xd3odOwZ.js} +1 -1
- package/dist/{campaign.fn-Dj2_FuER.js → campaign.fn-CeIsYBHA.js} +34 -34
- package/dist/{collectible.enum-Dnn_Aj65.js → collectible.enum-B7uqKLHE.js} +1 -1
- package/dist/{collection.fn-CoMxWCc1.js → collection.fn-Cj3PpbiS.js} +2 -2
- package/dist/{dto-ClZmLiV_.js → dto-CVyFNO4G.js} +7 -7
- package/dist/{effect-BDMkCpDf.js → effect-D8WiNma1.js} +1 -1
- package/dist/{email-addresses-B3uFvya7.js → email-addresses-CZGh6TJT.js} +1 -1
- package/dist/{export-v3KwUDUd.js → export-B-yEeKMb.js} +3 -3
- package/dist/{helper-CBL7LpuD.js → helper-rlgqVAdj.js} +1 -1
- package/dist/{index-CQAOZuRz.js → index-BC2la2BP.js} +1 -1
- package/dist/{index-DUJOEcLO.js → index-BSWItpEw.js} +1 -1
- package/dist/{index-Cqzz3NCP.js → index-BYP79OMe.js} +225 -218
- package/dist/{index-MMYQth2d.js → index-C73nKr6T.js} +1 -1
- package/dist/{index-g-PCtD2d.js → index-C9Eegvas.js} +1 -1
- package/dist/{index-DAk26zCe.js → index-CH0xVjYG.js} +1 -1
- package/dist/{index-DHbi29uw.js → index-CgA8VVym.js} +3 -3
- package/dist/{index-RwV8duB6.js → index-Cr8x5i6a.js} +12 -5
- package/dist/{index-TyHupXxP.js → index-DENLOr_f.js} +21 -16
- package/dist/{index-DP6beo56.js → index-DVko1T2G.js} +4 -4
- package/dist/{index-C3-pSb8M.js → index-szngpT22.js} +1 -1
- package/dist/{index-CyJqTXt8.js → index-yzjCyahZ.js} +91 -73
- package/dist/{index.esm2017-B9fqtwTI.js → index.esm2017-B852lCgd.js} +38 -38
- package/dist/{loading-DasBRvHo.js → loading-YQhP-YKE.js} +4 -4
- package/dist/{membership-CxFyoQ-0.js → membership-C6EfMXD7.js} +3 -3
- package/dist/{money-CVZMau41.js → money-CSas0WMX.js} +1 -1
- package/dist/{number-q8W5mWjg.js → number-DBcS6xgD.js} +1 -1
- package/dist/{objectid-wDM4YS-R.js → objectid-VFD2vEs_.js} +7 -7
- package/dist/{reward-DvTNcjsB.js → reward-BIMasAXq.js} +1 -1
- package/dist/{rule-Cy2u2C6N.js → rule-BRALPXUn.js} +8 -4
- package/dist/{rule-builder-DQavAK_J.js → rule-builder-CBcoUD6U.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-Be8bixKI.js → template-GsgcvRB8.js} +4 -4
- package/dist/{trigger-Nhtu-Pr4.js → trigger-B8pRScE6.js} +4 -4
- package/dist/{usePagination-Djq5Hy-n.js → usePagination-BtU3EXqo.js} +1 -1
- package/dist/{user-B36pyi6C.js → user-CBmfFwbE.js} +1 -1
- package/dist/{vue-i18n-DaIhSEbY.js → vue-i18n-C5G5eOJh.js} +287 -287
- package/package.json +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-DDBXmzd5.js +0 -215
- package/dist/Setting-ZTPL9b35.js +0 -1877
- package/dist/StoreRewards-B5txZ3P9.js +0 -401
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { defineComponent as ee, computed as j, resolveComponent as h, openBlock as g, createBlock as I, withCtx as T, createElementVNode as x, createElementBlock as B, createVNode as i, createCommentVNode as M, toDisplayString as L, unref as e, Fragment as X, renderList as re, ref as R, isRef as oe, reactive as Ke, onMounted as fe, watch as we, toRaw as He, createTextVNode as de, h as qe } from "vue";
|
|
2
2
|
import { _ as Ye } from "./tier-BJDhpH6X.js";
|
|
3
3
|
import { useDialog as Me, useDialogChild as Oe, components as We } from "@feedmepos/ui-library";
|
|
4
|
-
import { c as
|
|
5
|
-
import { d as se, a as Je, p as xe, u as Ee, n as Ge, f as Fe } from "./loading-
|
|
6
|
-
import { u as ke, C as me } from "./membership-
|
|
4
|
+
import { c as D, e as he, S as ze } from "./index-DVko1T2G.js";
|
|
5
|
+
import { d as se, a as Je, p as xe, u as Ee, n as Ge, f as Fe } from "./loading-YQhP-YKE.js";
|
|
6
|
+
import { u as ke, C as me } from "./membership-C6EfMXD7.js";
|
|
7
7
|
import { a as Xe, c as De } from "./object-qECH92oz.js";
|
|
8
8
|
import { _ as ue } from "./lodash-B5I3zXaY.js";
|
|
9
|
-
import { u as be } from "./vue-i18n-
|
|
9
|
+
import { u as be } from "./vue-i18n-C5G5eOJh.js";
|
|
10
10
|
import { Z, g as J, a as G } from "./zod-Bg2FbC-D.js";
|
|
11
|
-
import { z as Q, R as Ze } from "./app-
|
|
12
|
-
import { k as Qe, l as et, m as tt, n as Ae, o as nt } from "./index-
|
|
11
|
+
import { z as Q, R as Ze } from "./app-Cz0McG8i.js";
|
|
12
|
+
import { k as Qe, l as et, m as tt, n as Ae, o as nt } from "./index-BYP79OMe.js";
|
|
13
13
|
import { u as Se } from "./app-wDQR6dpb.js";
|
|
14
|
-
import { _ as te } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
14
|
+
import { _ as te } from "./ZodTextField.vue_vue_type_script_setup_true_lang-DxDO6zJg.js";
|
|
15
15
|
import { J as Pe } from "./JsonViewer-v8_C7l5N.js";
|
|
16
|
-
import { _ as ot } from "./index-
|
|
16
|
+
import { _ as ot } from "./index-DENLOr_f.js";
|
|
17
17
|
import { _ as at } from "./ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js";
|
|
18
18
|
import { _ as lt } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
19
|
-
import { z as st, a as rt } from "./money-
|
|
20
|
-
import { F as it } from "./number-
|
|
21
|
-
import { t as dt } from "./helper-
|
|
22
|
-
import "./index-
|
|
23
|
-
import "./index-
|
|
24
|
-
import "./index-
|
|
25
|
-
import "./index-
|
|
26
|
-
import { m as ut } from "./index-
|
|
27
|
-
import { m as Ce } from "./index-
|
|
19
|
+
import { z as st, a as rt } from "./money-CSas0WMX.js";
|
|
20
|
+
import { F as it } from "./number-DBcS6xgD.js";
|
|
21
|
+
import { t as dt } from "./helper-rlgqVAdj.js";
|
|
22
|
+
import "./index-BC2la2BP.js";
|
|
23
|
+
import "./index-yzjCyahZ.js";
|
|
24
|
+
import "./index-BSWItpEw.js";
|
|
25
|
+
import "./index-CgA8VVym.js";
|
|
26
|
+
import { m as ut } from "./index-CH0xVjYG.js";
|
|
27
|
+
import { m as Ce } from "./index-Cr8x5i6a.js";
|
|
28
28
|
import { useRouter as ct } from "vue-router";
|
|
29
29
|
function je(v) {
|
|
30
30
|
return se.DineroFactory(v).toUnit();
|
|
@@ -102,7 +102,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
102
102
|
const l = v, f = _, r = j(() => {
|
|
103
103
|
const o = [];
|
|
104
104
|
return l.bundle.price.amount > 0 && o.push(
|
|
105
|
-
`${
|
|
105
|
+
`${D.Config.getCountry().currency.symbol}${je(l.bundle.price)}`
|
|
106
106
|
), l.bundle.coinPrice && o.push(`${l.bundle.coinPrice} point(s)`), o.join(" or ");
|
|
107
107
|
}), b = j(() => {
|
|
108
108
|
var m, u;
|
|
@@ -459,7 +459,7 @@ const Rt = {
|
|
|
459
459
|
return _e(this);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
}, pe = () =>
|
|
462
|
+
}, pe = () => D.Config.getCountry(), ye = {
|
|
463
463
|
get fullCurrency() {
|
|
464
464
|
return pe().currency;
|
|
465
465
|
},
|
|
@@ -467,7 +467,7 @@ const Rt = {
|
|
|
467
467
|
return pe().currency.code;
|
|
468
468
|
},
|
|
469
469
|
get fullTax() {
|
|
470
|
-
return
|
|
470
|
+
return D.Country.getCountryFlattenTaxes(pe().code);
|
|
471
471
|
},
|
|
472
472
|
get taxSystem() {
|
|
473
473
|
return pe().taxSystems;
|
|
@@ -479,7 +479,7 @@ const Rt = {
|
|
|
479
479
|
}));
|
|
480
480
|
},
|
|
481
481
|
groupedTaxOptions() {
|
|
482
|
-
const v =
|
|
482
|
+
const v = D.Country.getCountryFlattenTaxes(pe().code);
|
|
483
483
|
return ye.taxSystem.map((_) => ({
|
|
484
484
|
code: _.code,
|
|
485
485
|
options: v.map((l) => ({ ...l, feedmeTaxCode: ye.generateCode(l) })).filter((l) => l.systemCode === _.code)
|
|
@@ -578,7 +578,7 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
578
578
|
}) : o || f("update:modelValue", void 0));
|
|
579
579
|
});
|
|
580
580
|
const b = j(() => {
|
|
581
|
-
const o = Bt.mode === "development", m =
|
|
581
|
+
const o = Bt.mode === "development", m = D.Config.getCountry().code.toLowerCase(), u = m != "my" ? `.${m}` : "";
|
|
582
582
|
return `https://marketing${o ? "-dev" : ""}${u}.feedmeapi.com/stripe/${ze.getBusinessId()}/webhook`;
|
|
583
583
|
});
|
|
584
584
|
return fe(() => {
|
|
@@ -665,7 +665,7 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
665
665
|
city: "",
|
|
666
666
|
postcode: "",
|
|
667
667
|
state: "",
|
|
668
|
-
country:
|
|
668
|
+
country: D.Config.getCountry().name
|
|
669
669
|
},
|
|
670
670
|
phoneNo: "",
|
|
671
671
|
regNo: "",
|
|
@@ -681,30 +681,30 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
681
681
|
showSheet: d,
|
|
682
682
|
data: o
|
|
683
683
|
}), (V, a) => {
|
|
684
|
-
const S = h("FmIcon"), w = h("FmMenuItem"),
|
|
684
|
+
const S = h("FmIcon"), w = h("FmMenuItem"), A = h("FmMenu"), Y = h("FmSelect"), W = h("FmButton"), K = h("FmSideSheet");
|
|
685
685
|
return g(), I(K, {
|
|
686
686
|
"max-width": 560,
|
|
687
687
|
modelValue: e(b),
|
|
688
|
-
"onUpdate:modelValue": a[15] || (a[15] = (
|
|
688
|
+
"onUpdate:modelValue": a[15] || (a[15] = (z) => oe(b) ? b.value = z : null),
|
|
689
689
|
header: e(f)("connect.store.setting.title")
|
|
690
690
|
}, {
|
|
691
691
|
"side-sheet-footer": T(() => [
|
|
692
692
|
x("div", zt, [
|
|
693
|
-
i(
|
|
693
|
+
i(W, {
|
|
694
694
|
label: e(f)("connect.common.save"),
|
|
695
695
|
onClick: c,
|
|
696
696
|
disabled: !e(t) || e(Se)().isLoading,
|
|
697
697
|
loading: e(Se)().isLoading
|
|
698
698
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
699
|
-
i(
|
|
699
|
+
i(W, {
|
|
700
700
|
label: e(f)("connect.common.cancel"),
|
|
701
|
-
onClick: a[14] || (a[14] = (
|
|
701
|
+
onClick: a[14] || (a[14] = (z) => d(!1)),
|
|
702
702
|
variant: "tertiary"
|
|
703
703
|
}, null, 8, ["label"])
|
|
704
704
|
])
|
|
705
705
|
]),
|
|
706
706
|
default: T(() => {
|
|
707
|
-
var
|
|
707
|
+
var z, ae;
|
|
708
708
|
return [
|
|
709
709
|
i(Pe, { json: e(o) }, null, 8, ["json"]),
|
|
710
710
|
e(o) && e(o).company ? (g(), B("div", Mt, [
|
|
@@ -721,7 +721,7 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
721
721
|
label: e(f)("connect.store.setting.company.reg_no"),
|
|
722
722
|
schema: e(Z).typeAtPath(e(u), "company.regNo")
|
|
723
723
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
724
|
-
e(
|
|
724
|
+
e(D.Config).getCountry().taxSystems.length ? (g(), I(te, {
|
|
725
725
|
key: 0,
|
|
726
726
|
modelValue: e(o).company.sstRegNo,
|
|
727
727
|
"onUpdate:modelValue": [
|
|
@@ -731,7 +731,7 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
731
731
|
label: e(f)("connect.store.setting.company.tax_reg_no"),
|
|
732
732
|
schema: e(Z).typeAtPath(e(u), "company.sstRegNo")
|
|
733
733
|
}, null, 8, ["modelValue", "label", "schema"])) : M("", !0),
|
|
734
|
-
(
|
|
734
|
+
(z = e(o).company) != null && z.sstRegNo && e(o).inclusiveTaxes ? (g(), B("div", Et, [
|
|
735
735
|
x("div", jt, L(e(f)("connect.store.setting.company.tax")), 1),
|
|
736
736
|
i(It, {
|
|
737
737
|
modelValue: e(o).inclusiveTaxes,
|
|
@@ -772,7 +772,7 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
772
772
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
773
773
|
x("div", Ht, [
|
|
774
774
|
x("div", qt, L(e(f)("connect.store.setting.company.address.state")), 1),
|
|
775
|
-
i(
|
|
775
|
+
i(A, {
|
|
776
776
|
placement: "top-end",
|
|
777
777
|
"model-value": e(m)
|
|
778
778
|
}, {
|
|
@@ -792,7 +792,7 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
792
792
|
}, 8, ["modelValue", "schema"])
|
|
793
793
|
]),
|
|
794
794
|
default: T(() => [
|
|
795
|
-
(g(!0), B(X, null, re(e(Rt)[e(
|
|
795
|
+
(g(!0), B(X, null, re(e(Rt)[e(D.Config).getCountry().code].stateItems.filter(
|
|
796
796
|
(s) => {
|
|
797
797
|
var k, U;
|
|
798
798
|
return s.label.toLowerCase().includes(((U = (k = e(o)) == null ? void 0 : k.company) == null ? void 0 : U.address.state.toLowerCase()) ?? "");
|
|
@@ -815,8 +815,8 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
815
815
|
"onUpdate:modelValue": a[12] || (a[12] = (s) => e(o).company.address.country = s),
|
|
816
816
|
items: [
|
|
817
817
|
{
|
|
818
|
-
label: e(
|
|
819
|
-
value: e(
|
|
818
|
+
label: e(D.Config).getCountry().name,
|
|
819
|
+
value: e(D.Config).getCountry().name
|
|
820
820
|
}
|
|
821
821
|
],
|
|
822
822
|
rules: [e(Z).ruleAtPath(e(u), "company.address.country")]
|
|
@@ -838,7 +838,7 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
838
838
|
}
|
|
839
839
|
});
|
|
840
840
|
function Gt(v, _ = !0) {
|
|
841
|
-
return
|
|
841
|
+
return D.DineroFactory(v).toFormat(_);
|
|
842
842
|
}
|
|
843
843
|
const Xt = /* @__PURE__ */ ee({
|
|
844
844
|
__name: "TaxVariantSetting",
|
|
@@ -927,8 +927,8 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
927
927
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
928
928
|
},
|
|
929
929
|
name: "",
|
|
930
|
-
price:
|
|
931
|
-
originalPrice:
|
|
930
|
+
price: D.Dinero.zero().toObject(),
|
|
931
|
+
originalPrice: D.Dinero.zero().toObject(),
|
|
932
932
|
vouchers: [],
|
|
933
933
|
credit: {
|
|
934
934
|
normal: 0,
|
|
@@ -980,9 +980,9 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
980
980
|
var C;
|
|
981
981
|
const n = p.row.original;
|
|
982
982
|
return n.collectible.type == "VOUCHER" || n.selectedReward == null ? n.description : qe(We.FmStepperField, {
|
|
983
|
-
"onUpdate:modelValue": (
|
|
983
|
+
"onUpdate:modelValue": ($) => {
|
|
984
984
|
t.value.titles = t.value.titles.map(
|
|
985
|
-
(E) => E.id == n.collectible._id ? { ...E, dayToExpire:
|
|
985
|
+
(E) => E.id == n.collectible._id ? { ...E, dayToExpire: $ } : E
|
|
986
986
|
);
|
|
987
987
|
},
|
|
988
988
|
modelValue: ((C = n.selectedReward) == null ? void 0 : C.extra) ?? 0,
|
|
@@ -990,14 +990,14 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
990
990
|
helperState: J(d.value, "titles"),
|
|
991
991
|
helperText: G(d.value, "titles"),
|
|
992
992
|
max: 9999,
|
|
993
|
-
rules: [(
|
|
993
|
+
rules: [($) => $ <= 9999 || "Maximum 9999 days allowed"],
|
|
994
994
|
showSteppers: !1,
|
|
995
995
|
disabled: !!t.value.stripePriceId
|
|
996
996
|
});
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
999
|
], a = R([]), S = j(() => b.bundleRewards.map((p) => {
|
|
1000
|
-
const n = w.value.find((
|
|
1000
|
+
const n = w.value.find(($) => $.id == p._id), C = p.type === "VOUCHER" ? `${p.options.maxUse} use(s), ${dt(
|
|
1001
1001
|
p.options.validityOption || {}
|
|
1002
1002
|
)}` : "No expiry";
|
|
1003
1003
|
return {
|
|
@@ -1017,7 +1017,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1017
1017
|
extra: void 0
|
|
1018
1018
|
}))) ?? []
|
|
1019
1019
|
];
|
|
1020
|
-
}),
|
|
1020
|
+
}), A = j(
|
|
1021
1021
|
() => t.value.stripePriceId && t.value.subscriptionValidity ? t.value.subscriptionValidity : 0
|
|
1022
1022
|
);
|
|
1023
1023
|
function Y(p) {
|
|
@@ -1026,26 +1026,26 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1026
1026
|
n.dayToExpire = p;
|
|
1027
1027
|
t.value.credit.free && (t.value.credit.free.day = p);
|
|
1028
1028
|
}
|
|
1029
|
-
function
|
|
1029
|
+
function W() {
|
|
1030
1030
|
const p = S.value, n = t.value;
|
|
1031
1031
|
if (!(!n || !p))
|
|
1032
1032
|
for (let C = 0; C < p.length; C++) {
|
|
1033
|
-
const
|
|
1034
|
-
K.value[C] ?
|
|
1035
|
-
(H) => H.id ==
|
|
1033
|
+
const $ = p[C];
|
|
1034
|
+
K.value[C] ? $.collectible.type == "TITLE" ? n.titles.findIndex(
|
|
1035
|
+
(H) => H.id == $.collectible._id
|
|
1036
1036
|
) < 0 && n.titles.push({
|
|
1037
|
-
id:
|
|
1038
|
-
dayToExpire:
|
|
1037
|
+
id: $.collectible._id,
|
|
1038
|
+
dayToExpire: A.value
|
|
1039
1039
|
}) : n.vouchers.findIndex(
|
|
1040
|
-
(H) => H ==
|
|
1041
|
-
) < 0 && n.vouchers.push(
|
|
1042
|
-
(q) => q !=
|
|
1040
|
+
(H) => H == $.collectible._id
|
|
1041
|
+
) < 0 && n.vouchers.push($.collectible._id) : (n.titles = n.titles.filter((q) => q.id != $.collectible._id), n.vouchers = n.vouchers.filter(
|
|
1042
|
+
(q) => q != $.collectible._id
|
|
1043
1043
|
));
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
1046
|
const K = R({});
|
|
1047
|
-
we(K,
|
|
1048
|
-
const
|
|
1047
|
+
we(K, W, { deep: !0 });
|
|
1048
|
+
const z = j(() => {
|
|
1049
1049
|
var p, n;
|
|
1050
1050
|
return (n = (p = b.storeOption) == null ? void 0 : p.company) == null ? void 0 : n.sstRegNo;
|
|
1051
1051
|
}), ae = j(() => {
|
|
@@ -1059,17 +1059,17 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1059
1059
|
t.value.price,
|
|
1060
1060
|
Number(t.value.credit.normal),
|
|
1061
1061
|
((p = b.storeOption) == null ? void 0 : p.inclusiveTaxes) ?? [],
|
|
1062
|
-
(C = (n = b.storeOption) == null ? void 0 : n.company) != null && C.sstRegNo ? ne.taxSystem.map((
|
|
1062
|
+
(C = (n = b.storeOption) == null ? void 0 : n.company) != null && C.sstRegNo ? ne.taxSystem.map(($) => $.code) : []
|
|
1063
1063
|
);
|
|
1064
1064
|
}), k = j(() => s.value.reduce(
|
|
1065
1065
|
(n, C) => n.add(C.total),
|
|
1066
1066
|
rt()
|
|
1067
1067
|
).toFormat()), U = j(() => {
|
|
1068
|
-
var
|
|
1068
|
+
var $;
|
|
1069
1069
|
const p = pt(
|
|
1070
1070
|
s.value,
|
|
1071
1071
|
t.value.price,
|
|
1072
|
-
((
|
|
1072
|
+
(($ = b.storeOption) == null ? void 0 : $.inclusiveTaxes) ?? []
|
|
1073
1073
|
);
|
|
1074
1074
|
t.value.priceWithTaxes = p;
|
|
1075
1075
|
const n = Gt(p, !1), C = Number(n.replace(/[^\d.-]/g, ""));
|
|
@@ -1078,19 +1078,19 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1078
1078
|
function O() {
|
|
1079
1079
|
t.value.taxTotals = s.value, f("update", Ae.parse(Xe(t.value)));
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function P() {
|
|
1082
1082
|
return ue.cloneDeep(Ve);
|
|
1083
1083
|
}
|
|
1084
|
-
function
|
|
1085
|
-
o.value = p, p && n && (c.value = void 0, m.value = n.categories, t.value = n.bundle ||
|
|
1084
|
+
function N(p, n) {
|
|
1085
|
+
o.value = p, p && n && (c.value = void 0, m.value = n.categories, t.value = n.bundle || P(), u.value.category = n.category, u.value.index = n.index, u.value.originalCategoryIndex = n.category, K.value = S.value.reduce((C, $, E) => (C[E] = !!$.selectedReward, C), {}));
|
|
1086
1086
|
}
|
|
1087
1087
|
return _({
|
|
1088
|
-
showSheet:
|
|
1088
|
+
showSheet: N,
|
|
1089
1089
|
bundleImage: c,
|
|
1090
1090
|
target: u,
|
|
1091
1091
|
data: t
|
|
1092
1092
|
}), (p, n) => {
|
|
1093
|
-
const C = h("FmSwitch"),
|
|
1093
|
+
const C = h("FmSwitch"), $ = h("FmHelperText"), E = h("FmTextField"), q = h("FmSelect"), H = h("FmStepperField"), ie = h("FmMenuItem"), ge = h("FmTable"), ce = h("FmButton"), ve = h("FmSideSheet");
|
|
1094
1094
|
return g(), I(ve, {
|
|
1095
1095
|
"max-width": 768,
|
|
1096
1096
|
modelValue: e(o),
|
|
@@ -1107,7 +1107,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1107
1107
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
1108
1108
|
i(ce, {
|
|
1109
1109
|
label: "Cancel",
|
|
1110
|
-
onClick: n[19] || (n[19] = (le) =>
|
|
1110
|
+
onClick: n[19] || (n[19] = (le) => N(!1)),
|
|
1111
1111
|
variant: "tertiary"
|
|
1112
1112
|
})
|
|
1113
1113
|
])
|
|
@@ -1118,7 +1118,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1118
1118
|
i(Pe, { json: e(t) }, null, 8, ["json"]),
|
|
1119
1119
|
e(t) ? (g(), B("div", Zt, [
|
|
1120
1120
|
x("div", Qt, [
|
|
1121
|
-
e(
|
|
1121
|
+
e(D.Config).getCountry().code == "MY" && ((le = e(b).payoutAccount) == null ? void 0 : le.status) == "APPROVED" && (($e = e(b).payoutAccount) != null && $e.enable) ? (g(), I(C, {
|
|
1122
1122
|
key: 0,
|
|
1123
1123
|
"onUpdate:modelValue": n[0] || (n[0] = (F) => {
|
|
1124
1124
|
e(t).isFeedvibe = F, e(t).isFeedvibe && (e(t).credit.normal = 0, e(t).coinPrice = 0, e(t).titles = [], K.value = {});
|
|
@@ -1128,7 +1128,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1128
1128
|
label: "Feedvibe Campaign",
|
|
1129
1129
|
sublabel: "Bundle will be appear for Feedvibe campaign use"
|
|
1130
1130
|
}, null, 8, ["model-value"])) : M("", !0),
|
|
1131
|
-
e(t).isFeedvibe ? (g(), I(
|
|
1131
|
+
e(t).isFeedvibe ? (g(), I($, {
|
|
1132
1132
|
key: 1,
|
|
1133
1133
|
text: "There will be a 15% charge for FeedVibe bundles sold in the FeedVibe app",
|
|
1134
1134
|
state: "warning"
|
|
@@ -1161,7 +1161,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1161
1161
|
"helper-text": e(G)(e(d), "image")
|
|
1162
1162
|
}, null, 8, ["label", "thumbnail", "file", "helper-state", "helper-text"]),
|
|
1163
1163
|
i(H, {
|
|
1164
|
-
"model-value": e(
|
|
1164
|
+
"model-value": e(D.Dinero).fromFdoDinero(e(t).price).toUnit(),
|
|
1165
1165
|
label: e(r)("connect.store.bundle.edit.bundlePrice"),
|
|
1166
1166
|
min: 0,
|
|
1167
1167
|
"max-fraction-digits": 2,
|
|
@@ -1170,23 +1170,23 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1170
1170
|
}),
|
|
1171
1171
|
"is-currency": !0,
|
|
1172
1172
|
"show-steppers": !1,
|
|
1173
|
-
"helper-text": e(G)(e(d), "price") || `${e(
|
|
1173
|
+
"helper-text": e(G)(e(d), "price") || `${e(D.Dinero).fromNumber({ number: 1 }).toFormat(
|
|
1174
1174
|
!0
|
|
1175
|
-
)} = ${e(
|
|
1175
|
+
)} = ${e(D.Dinero).fromNumber({ number: 1 }).toUnit()} credit`,
|
|
1176
1176
|
"helper-state": e(J)(e(d), "price")
|
|
1177
1177
|
}, {
|
|
1178
1178
|
prepend: T(() => [
|
|
1179
|
-
de(L(e(
|
|
1179
|
+
de(L(e(D.Dinero).defaultCurrency()), 1)
|
|
1180
1180
|
]),
|
|
1181
1181
|
_: 1
|
|
1182
1182
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
1183
1183
|
i(H, {
|
|
1184
|
-
"model-value": e(
|
|
1184
|
+
"model-value": e(D.Dinero).fromFdoDinero(e(t).originalPrice).toUnit(),
|
|
1185
1185
|
label: e(r)("connect.store.bundle.edit.bundleValue"),
|
|
1186
1186
|
min: 0,
|
|
1187
1187
|
"max-fraction-digits": 2,
|
|
1188
1188
|
"onUpdate:modelValue": n[5] || (n[5] = (F) => {
|
|
1189
|
-
e(t).originalPrice || (e(t).originalPrice = e(
|
|
1189
|
+
e(t).originalPrice || (e(t).originalPrice = e(D.Dinero).zero().toObject()), e(t).originalPrice.amount = F * 10 ** e(t).originalPrice.precision;
|
|
1190
1190
|
}),
|
|
1191
1191
|
"is-currency": !0,
|
|
1192
1192
|
"show-steppers": !1,
|
|
@@ -1194,7 +1194,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1194
1194
|
"helper-state": e(J)(e(d), "originalPrice")
|
|
1195
1195
|
}, {
|
|
1196
1196
|
prepend: T(() => [
|
|
1197
|
-
de(L(e(
|
|
1197
|
+
de(L(e(D.Dinero).defaultCurrency()), 1)
|
|
1198
1198
|
]),
|
|
1199
1199
|
_: 1
|
|
1200
1200
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
@@ -1278,7 +1278,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1278
1278
|
e(t).credit.free || (e(t).credit.free = {
|
|
1279
1279
|
amount: 0,
|
|
1280
1280
|
day: 1
|
|
1281
|
-
}), e(t).credit.free.day = e(
|
|
1281
|
+
}), e(t).credit.free.day = e(A) || F;
|
|
1282
1282
|
}),
|
|
1283
1283
|
label: "Free credit valid for",
|
|
1284
1284
|
"show-steppers": !1,
|
|
@@ -1291,7 +1291,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1291
1291
|
_: 1
|
|
1292
1292
|
}, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : M("", !0)
|
|
1293
1293
|
], 64)),
|
|
1294
|
-
e(
|
|
1294
|
+
e(z) ? (g(), B(X, { key: 3 }, [
|
|
1295
1295
|
on,
|
|
1296
1296
|
i(Xt, {
|
|
1297
1297
|
modelValue: e(t).taxes,
|
|
@@ -1355,7 +1355,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1355
1355
|
),
|
|
1356
1356
|
"hide-footer": e(S).length <= 10
|
|
1357
1357
|
}, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"]),
|
|
1358
|
-
i(
|
|
1358
|
+
i($, {
|
|
1359
1359
|
text: e(G)(e(d), "titles"),
|
|
1360
1360
|
state: e(J)(e(d), "titles")
|
|
1361
1361
|
}, null, 8, ["text", "state"])
|
|
@@ -1411,15 +1411,15 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1411
1411
|
search: S,
|
|
1412
1412
|
descending: !1
|
|
1413
1413
|
});
|
|
1414
|
-
m.value = w.resources.map((
|
|
1415
|
-
label: `${
|
|
1416
|
-
value:
|
|
1417
|
-
})), await new Promise((
|
|
1414
|
+
m.value = w.resources.map((A) => ({
|
|
1415
|
+
label: `${A.name} (${A.phoneNumber})`,
|
|
1416
|
+
value: A._id
|
|
1417
|
+
})), await new Promise((A) => setTimeout(A, 100));
|
|
1418
1418
|
}
|
|
1419
1419
|
async function V() {
|
|
1420
1420
|
if (!r.value || !b.value) return;
|
|
1421
1421
|
const S = m.value.find(
|
|
1422
|
-
(
|
|
1422
|
+
(A) => A.value === b.value
|
|
1423
1423
|
);
|
|
1424
1424
|
await xe.confirm(
|
|
1425
1425
|
`Are you sure you want to send bundle ${r.value.name} to ${S == null ? void 0 : S.label}?`,
|
|
@@ -1428,14 +1428,14 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1428
1428
|
"Cancel"
|
|
1429
1429
|
) && await f(
|
|
1430
1430
|
async () => {
|
|
1431
|
-
const
|
|
1431
|
+
const A = {
|
|
1432
1432
|
bundle: r.value._id,
|
|
1433
1433
|
member: b.value,
|
|
1434
1434
|
source: nt.enum.ADMIN,
|
|
1435
1435
|
ref: `ADMIN:${(/* @__PURE__ */ new Date()).toISOString()}:${o.value}`,
|
|
1436
1436
|
withCoin: !1
|
|
1437
1437
|
};
|
|
1438
|
-
await Ce.sendBundle(
|
|
1438
|
+
await Ce.sendBundle(A), y();
|
|
1439
1439
|
},
|
|
1440
1440
|
{
|
|
1441
1441
|
message: "Sending bundle",
|
|
@@ -1444,10 +1444,10 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1444
1444
|
);
|
|
1445
1445
|
}
|
|
1446
1446
|
const a = j(() => {
|
|
1447
|
-
var w,
|
|
1447
|
+
var w, A, Y;
|
|
1448
1448
|
const S = [];
|
|
1449
1449
|
return ((w = r.value) == null ? void 0 : w.price.amount) > 0 && S.push(
|
|
1450
|
-
`${
|
|
1450
|
+
`${D.Config.getCountry().currency.symbol}${je((A = r.value) == null ? void 0 : A.price)}`
|
|
1451
1451
|
), (Y = r.value) != null && Y.coinPrice && S.push(`${r.value.coinPrice} point(s)`), S.join(" or ");
|
|
1452
1452
|
});
|
|
1453
1453
|
return _({
|
|
@@ -1456,15 +1456,15 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1456
1456
|
}), fe(async () => {
|
|
1457
1457
|
await d("");
|
|
1458
1458
|
}), (S, w) => {
|
|
1459
|
-
const
|
|
1459
|
+
const A = h("FmCardMedia"), Y = h("FmCardHeader"), W = h("FmChip"), K = h("FmCardSection"), z = h("FmCard"), ae = h("FmSelect"), s = h("FmTextField"), k = h("FmForm"), U = h("FmButton"), O = h("FmSideSheet");
|
|
1460
1460
|
return g(), I(O, {
|
|
1461
1461
|
"max-width": 560,
|
|
1462
1462
|
"dismiss-away": !0,
|
|
1463
1463
|
header: "Send bundle to member",
|
|
1464
1464
|
modelValue: e(u),
|
|
1465
1465
|
"onUpdate:modelValue": [
|
|
1466
|
-
w[4] || (w[4] = (
|
|
1467
|
-
w[5] || (w[5] = (
|
|
1466
|
+
w[4] || (w[4] = (P) => oe(u) ? u.value = P : null),
|
|
1467
|
+
w[5] || (w[5] = (P) => u.value = P)
|
|
1468
1468
|
]
|
|
1469
1469
|
}, {
|
|
1470
1470
|
"side-sheet-footer": T(() => [
|
|
@@ -1473,15 +1473,15 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1473
1473
|
label: "Send",
|
|
1474
1474
|
loading: e(Se)().isLoading,
|
|
1475
1475
|
onClick: w[2] || (w[2] = async () => {
|
|
1476
|
-
var
|
|
1477
|
-
return (
|
|
1476
|
+
var P;
|
|
1477
|
+
return (P = e(t)) == null ? void 0 : P.validateInputs();
|
|
1478
1478
|
})
|
|
1479
1479
|
}, null, 8, ["loading"]),
|
|
1480
1480
|
i(U, {
|
|
1481
1481
|
label: "Cancel",
|
|
1482
1482
|
type: "button",
|
|
1483
1483
|
variant: "tertiary",
|
|
1484
|
-
onClick: w[3] || (w[3] = (
|
|
1484
|
+
onClick: w[3] || (w[3] = (P) => u.value = !1)
|
|
1485
1485
|
})
|
|
1486
1486
|
])
|
|
1487
1487
|
]),
|
|
@@ -1494,18 +1494,18 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1494
1494
|
blameFormChildOnValidationFailed: ""
|
|
1495
1495
|
}, {
|
|
1496
1496
|
default: T(() => [
|
|
1497
|
-
i(
|
|
1497
|
+
i(z, {
|
|
1498
1498
|
class: "max-w-[700px]",
|
|
1499
1499
|
horizontal: "",
|
|
1500
1500
|
variant: "outlined"
|
|
1501
1501
|
}, {
|
|
1502
1502
|
default: T(() => {
|
|
1503
|
-
var
|
|
1503
|
+
var P, N;
|
|
1504
1504
|
return [
|
|
1505
|
-
(
|
|
1505
|
+
(P = e(r)) != null && P.image ? (g(), I(A, {
|
|
1506
1506
|
key: 0,
|
|
1507
1507
|
width: "100",
|
|
1508
|
-
src: (
|
|
1508
|
+
src: (N = e(r)) == null ? void 0 : N.image
|
|
1509
1509
|
}, null, 8, ["src"])) : M("", !0),
|
|
1510
1510
|
i(K, { class: "flex flex-col gap-16 justify-between" }, {
|
|
1511
1511
|
default: T(() => {
|
|
@@ -1518,22 +1518,22 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1518
1518
|
}, null, 8, ["title", "subtitle"]),
|
|
1519
1519
|
i(K, { class: "p-0" }, {
|
|
1520
1520
|
default: T(() => {
|
|
1521
|
-
var n, C,
|
|
1521
|
+
var n, C, $, E, q, H, ie, ge, ce, ve, le;
|
|
1522
1522
|
return [
|
|
1523
1523
|
x("div", pn, [
|
|
1524
|
-
(n = e(r)) != null && n.isFeedvibe ? (g(), I(
|
|
1524
|
+
(n = e(r)) != null && n.isFeedvibe ? (g(), I(W, {
|
|
1525
1525
|
key: 0,
|
|
1526
1526
|
label: "Feedvibe"
|
|
1527
1527
|
})) : M("", !0),
|
|
1528
|
-
(
|
|
1528
|
+
($ = (C = e(r)) == null ? void 0 : C.titles) != null && $.length ? (g(), I(W, {
|
|
1529
1529
|
key: 1,
|
|
1530
1530
|
label: `${e(r).titles.length} title(s)`
|
|
1531
1531
|
}, null, 8, ["label"])) : M("", !0),
|
|
1532
|
-
(q = (E = e(r)) == null ? void 0 : E.vouchers) != null && q.length ? (g(), I(
|
|
1532
|
+
(q = (E = e(r)) == null ? void 0 : E.vouchers) != null && q.length ? (g(), I(W, {
|
|
1533
1533
|
key: 2,
|
|
1534
1534
|
label: `${e(r).vouchers.length} voucher(s)`
|
|
1535
1535
|
}, null, 8, ["label"])) : M("", !0),
|
|
1536
|
-
(ie = (H = e(r)) == null ? void 0 : H.credit) != null && ie.normal || (ve = (ce = (ge = e(r)) == null ? void 0 : ge.credit) == null ? void 0 : ce.free) != null && ve.amount ? (g(), I(
|
|
1536
|
+
(ie = (H = e(r)) == null ? void 0 : H.credit) != null && ie.normal || (ve = (ce = (ge = e(r)) == null ? void 0 : ge.credit) == null ? void 0 : ce.free) != null && ve.amount ? (g(), I(W, {
|
|
1537
1537
|
key: 3,
|
|
1538
1538
|
label: `${(e(r).credit.normal || 0) + (((le = e(r).credit.free) == null ? void 0 : le.amount) || 0)} credit(s)`
|
|
1539
1539
|
}, null, 8, ["label"])) : M("", !0)
|
|
@@ -1552,20 +1552,20 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1552
1552
|
}),
|
|
1553
1553
|
i(ae, {
|
|
1554
1554
|
modelValue: e(b),
|
|
1555
|
-
"onUpdate:modelValue": w[0] || (w[0] = (
|
|
1555
|
+
"onUpdate:modelValue": w[0] || (w[0] = (P) => oe(b) ? b.value = P : null),
|
|
1556
1556
|
label: "Select member",
|
|
1557
1557
|
searchable: "",
|
|
1558
1558
|
items: e(m),
|
|
1559
1559
|
onSearch: d,
|
|
1560
|
-
rules: [(
|
|
1560
|
+
rules: [(P) => !!P > 0 || "Member is required"],
|
|
1561
1561
|
"helper-text": "Type to search member"
|
|
1562
1562
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
1563
1563
|
i(s, {
|
|
1564
1564
|
modelValue: e(o),
|
|
1565
|
-
"onUpdate:modelValue": w[1] || (w[1] = (
|
|
1565
|
+
"onUpdate:modelValue": w[1] || (w[1] = (P) => oe(o) ? o.value = P : null),
|
|
1566
1566
|
label: "Reference (optional)",
|
|
1567
1567
|
rules: [
|
|
1568
|
-
(
|
|
1568
|
+
(P) => P.length < 50 || "Reference must be less than 50 characters"
|
|
1569
1569
|
]
|
|
1570
1570
|
}, null, 8, ["modelValue", "rules"])
|
|
1571
1571
|
]),
|
|
@@ -1577,7 +1577,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1577
1577
|
};
|
|
1578
1578
|
}
|
|
1579
1579
|
});
|
|
1580
|
-
var bn = { 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", marketingV1Portal: "https://marketing-v1.feedme.cc" };
|
|
1580
|
+
var bn = { 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" };
|
|
1581
1581
|
const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8 items-center" }, hn = { class: "fm-typo-en-body-lg-600" }, _n = { class: "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-24" }, xn = /* @__PURE__ */ x("img", {
|
|
1582
1582
|
src: Ye,
|
|
1583
1583
|
class: "aspect-square w-[150px]"
|
|
@@ -1605,7 +1605,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1605
1605
|
var k;
|
|
1606
1606
|
s === "setting" ? (k = a.value) == null || k.showSheet(!0, u.storeOption) : s === "create_category" ? Y(-1) : s === "create_reward" ? await m.push({ name: Ze["$connect-STORE_REWARDS"] }) : s == "payout" && window.open(bn.paymentPortalUrl, "_blank");
|
|
1607
1607
|
}
|
|
1608
|
-
async function
|
|
1608
|
+
async function A(s) {
|
|
1609
1609
|
await c(
|
|
1610
1610
|
async () => {
|
|
1611
1611
|
var k;
|
|
@@ -1639,9 +1639,9 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1639
1639
|
l("connect.store.category.remove.title")
|
|
1640
1640
|
) || await c(
|
|
1641
1641
|
async () => {
|
|
1642
|
-
const
|
|
1642
|
+
const P = s == -1 ? [...d.value, { name: O, bundles: [] }] : [...d.value].map((N, p) => p == s ? { ...N, name: O } : N).filter((N) => N.name !== null);
|
|
1643
1643
|
await Ce.updateStoreBundle({
|
|
1644
|
-
categories:
|
|
1644
|
+
categories: P
|
|
1645
1645
|
}), await u.readMemberStore();
|
|
1646
1646
|
},
|
|
1647
1647
|
{
|
|
@@ -1651,16 +1651,16 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1651
1651
|
);
|
|
1652
1652
|
});
|
|
1653
1653
|
}
|
|
1654
|
-
async function
|
|
1654
|
+
async function W(s, k, U, O) {
|
|
1655
1655
|
var p, n, C;
|
|
1656
1656
|
k ?? (k = (p = S.value) == null ? void 0 : p.target.category), U ?? (U = (n = S.value) == null ? void 0 : n.target.index), O ?? (O = (C = S.value) == null ? void 0 : C.target.originalCategoryIndex);
|
|
1657
|
-
const
|
|
1658
|
-
for (const
|
|
1659
|
-
for (const E of
|
|
1657
|
+
const P = De(d.value);
|
|
1658
|
+
for (const $ of P)
|
|
1659
|
+
for (const E of $.bundles)
|
|
1660
1660
|
console.log(E, "bundle in payload"), "pf_vouchers" in E && delete E.pf_vouchers;
|
|
1661
|
-
k != O && (
|
|
1662
|
-
const
|
|
1663
|
-
if (!
|
|
1661
|
+
k != O && (P[O].bundles.splice(U, 1), U = P[k].bundles.length), console.log(k, U, O, "ci, bi, originalCategoryIndex");
|
|
1662
|
+
const N = P[k];
|
|
1663
|
+
if (!N) {
|
|
1664
1664
|
Ge.error("Unexpected error", 2e3);
|
|
1665
1665
|
return;
|
|
1666
1666
|
}
|
|
@@ -1670,21 +1670,21 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1670
1670
|
"Delete bundle"
|
|
1671
1671
|
) == !1)
|
|
1672
1672
|
return;
|
|
1673
|
-
|
|
1673
|
+
N.bundles.splice(U, 1);
|
|
1674
1674
|
} else
|
|
1675
|
-
U == -1 ?
|
|
1675
|
+
U == -1 ? N.bundles.push(s) : N.bundles[U] = s;
|
|
1676
1676
|
await c(
|
|
1677
1677
|
async () => {
|
|
1678
|
-
var
|
|
1678
|
+
var $, E;
|
|
1679
1679
|
if (s != null) {
|
|
1680
|
-
const q = (
|
|
1680
|
+
const q = ($ = S.value) == null ? void 0 : $.bundleImage;
|
|
1681
1681
|
q === null && s.image ? (await Fe.delete(s.image), s.image = null) : q && (s.image = await Fe.update(
|
|
1682
1682
|
Fe.bundleImagePath(void 0, q),
|
|
1683
1683
|
q
|
|
1684
1684
|
));
|
|
1685
1685
|
}
|
|
1686
1686
|
await Ce.updateStoreBundle({
|
|
1687
|
-
categories:
|
|
1687
|
+
categories: P
|
|
1688
1688
|
}), await u.readMemberStore(), await u.readMembership(), await u.readRewards(), (E = S.value) == null || E.showSheet(!1);
|
|
1689
1689
|
},
|
|
1690
1690
|
{
|
|
@@ -1700,7 +1700,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1700
1700
|
bundle: s.bundle ? De(s.bundle) : void 0
|
|
1701
1701
|
});
|
|
1702
1702
|
}
|
|
1703
|
-
const
|
|
1703
|
+
const z = R([]);
|
|
1704
1704
|
function ae(s) {
|
|
1705
1705
|
var k;
|
|
1706
1706
|
(k = o.value) == null || k.showSheet({
|
|
@@ -1708,11 +1708,11 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1708
1708
|
});
|
|
1709
1709
|
}
|
|
1710
1710
|
return fe(async () => {
|
|
1711
|
-
var
|
|
1711
|
+
var k, U;
|
|
1712
1712
|
await t(async () => {
|
|
1713
|
-
var
|
|
1714
|
-
if (await u.readMemberStore(), await u.readMembership(), await u.readRewards(), await u.readPayoutAccount(), (
|
|
1715
|
-
switch ((
|
|
1713
|
+
var O, P;
|
|
1714
|
+
if (await u.readMemberStore(), await u.readMembership(), await u.readRewards(), await u.readPayoutAccount(), (O = m.currentRoute.value.query) != null && O.action) {
|
|
1715
|
+
switch ((P = m.currentRoute.value.query) == null ? void 0 : P.action) {
|
|
1716
1716
|
case "update_setting":
|
|
1717
1717
|
w("setting");
|
|
1718
1718
|
break;
|
|
@@ -1723,15 +1723,15 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1723
1723
|
y.open({
|
|
1724
1724
|
title: "Select category",
|
|
1725
1725
|
contentComponent: Ut
|
|
1726
|
-
}).onPrimary((
|
|
1726
|
+
}).onPrimary((N) => {
|
|
1727
1727
|
y.close(), K({
|
|
1728
1728
|
categories: V.value,
|
|
1729
|
-
category:
|
|
1729
|
+
category: N,
|
|
1730
1730
|
index: -1,
|
|
1731
1731
|
bundle: {
|
|
1732
1732
|
...ue.cloneDeep(Ve),
|
|
1733
1733
|
isFeedvibe: !0,
|
|
1734
|
-
price:
|
|
1734
|
+
price: D.Dinero.fromNumber({
|
|
1735
1735
|
number: 10,
|
|
1736
1736
|
precision: 2
|
|
1737
1737
|
}).toObject()
|
|
@@ -1742,29 +1742,31 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1742
1742
|
}
|
|
1743
1743
|
m.replace({ query: {} });
|
|
1744
1744
|
}
|
|
1745
|
-
})
|
|
1746
|
-
|
|
1745
|
+
});
|
|
1746
|
+
const s = ((k = u.payoutAccount) == null ? void 0 : k.status) === "APPROVED" && ((U = u.payoutAccount) == null ? void 0 : U.enable) === !0;
|
|
1747
|
+
z.value = [
|
|
1748
|
+
...s ? [] : [_],
|
|
1747
1749
|
f,
|
|
1748
1750
|
r,
|
|
1749
1751
|
b
|
|
1750
|
-
]
|
|
1752
|
+
];
|
|
1751
1753
|
}), (s, k) => {
|
|
1752
|
-
const U = h("FmPageHead"), O = h("FmButton"),
|
|
1754
|
+
const U = h("FmPageHead"), O = h("FmButton"), P = h("FmCard");
|
|
1753
1755
|
return g(), B(X, null, [
|
|
1754
1756
|
i(U, {
|
|
1755
1757
|
title: e(l)("connect.store.title"),
|
|
1756
|
-
actions: e(
|
|
1758
|
+
actions: e(z),
|
|
1757
1759
|
"onClick:action": w
|
|
1758
1760
|
}, null, 8, ["title", "actions"]),
|
|
1759
1761
|
x("div", gn, [
|
|
1760
1762
|
e(d) && e(d).length > 0 ? (g(), B(X, { key: 0 }, [
|
|
1761
|
-
(g(!0), B(X, null, re(e(d), (
|
|
1762
|
-
key:
|
|
1763
|
+
(g(!0), B(X, null, re(e(d), (N, p) => (g(), B("div", {
|
|
1764
|
+
key: N.name,
|
|
1763
1765
|
class: "space-y-8 py-12"
|
|
1764
1766
|
}, [
|
|
1765
1767
|
x("div", vn, [
|
|
1766
|
-
x("div", hn, L(
|
|
1767
|
-
i(Pe, { json:
|
|
1768
|
+
x("div", hn, L(N.name), 1),
|
|
1769
|
+
i(Pe, { json: N }, null, 8, ["json"]),
|
|
1768
1770
|
i(O, {
|
|
1769
1771
|
icon: "edit",
|
|
1770
1772
|
size: "md",
|
|
@@ -1773,16 +1775,16 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1773
1775
|
}, null, 8, ["onClick"])
|
|
1774
1776
|
]),
|
|
1775
1777
|
x("div", _n, [
|
|
1776
|
-
(g(!0), B(X, null, re(
|
|
1778
|
+
(g(!0), B(X, null, re(N.bundles, (n, C) => (g(), I(Ct, {
|
|
1777
1779
|
bundle: n,
|
|
1778
1780
|
key: n._id,
|
|
1779
|
-
onEdit: (
|
|
1781
|
+
onEdit: ($) => K({
|
|
1780
1782
|
bundle: n,
|
|
1781
1783
|
category: p,
|
|
1782
1784
|
index: C,
|
|
1783
1785
|
categories: e(V)
|
|
1784
1786
|
}),
|
|
1785
|
-
onDelete: (
|
|
1787
|
+
onDelete: ($) => W(null, p, C),
|
|
1786
1788
|
onSend: ae
|
|
1787
1789
|
}, null, 8, ["bundle", "onEdit", "onDelete"]))), 128)),
|
|
1788
1790
|
i(St, {
|
|
@@ -1797,9 +1799,9 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1797
1799
|
i(mn, {
|
|
1798
1800
|
ref_key: "bundleSheetRef",
|
|
1799
1801
|
ref: S,
|
|
1800
|
-
onUpdate:
|
|
1802
|
+
onUpdate: W
|
|
1801
1803
|
}, null, 512)
|
|
1802
|
-
], 64)) : (g(), I(
|
|
1804
|
+
], 64)) : (g(), I(P, {
|
|
1803
1805
|
key: 1,
|
|
1804
1806
|
variant: "outlined",
|
|
1805
1807
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
@@ -1814,7 +1816,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1814
1816
|
variant: "primary",
|
|
1815
1817
|
label: e(l)("connect.store.actions.addCategory"),
|
|
1816
1818
|
icon: "add",
|
|
1817
|
-
onClick: k[0] || (k[0] = (
|
|
1819
|
+
onClick: k[0] || (k[0] = (N) => Y(-1))
|
|
1818
1820
|
}, null, 8, ["label"])
|
|
1819
1821
|
]),
|
|
1820
1822
|
_: 1
|
|
@@ -1822,7 +1824,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1822
1824
|
i(Jt, {
|
|
1823
1825
|
ref_key: "settingSheetRef",
|
|
1824
1826
|
ref: a,
|
|
1825
|
-
onUpdate:
|
|
1827
|
+
onUpdate: A
|
|
1826
1828
|
}, null, 512),
|
|
1827
1829
|
i(fn, {
|
|
1828
1830
|
ref_key: "sendBundleSheetRef",
|