@feedmepos/mf-connect 0.1.0-beta.67 → 0.1.0-beta.68
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-knY-Fody.js → Analytic-Dr_vBJdV.js} +11 -11
- package/dist/{App-CaSjMnkY.js → App-CaBm2a_b.js} +6 -6
- package/dist/{AuditLogs-DyJ0BWHt.js → AuditLogs-CG8qANHb.js} +8 -8
- package/dist/{Bin-D73Ky2O3.js → Bin-B5JKJTO7.js} +8 -8
- package/dist/{Broadcast-BRMyf2ZA.js → Broadcast-ClG7jfNg.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D-0I_Pp2.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-vLDnTuCM.js} +6 -6
- package/dist/{Card-BEgNn8SY.js → Card-B4IvBvWp.js} +15 -15
- package/dist/{Collections-C0KqBg5k.js → Collections-CciZHHgU.js} +5 -5
- package/dist/{Credit-D3Y1U0-i.js → Credit-CzX9eIee.js} +9 -9
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJ7AzlQk.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-B5mpHQ_A.js} +28 -28
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-C9JgRiyA.js → EffectSheet.vue_vue_type_style_index_0_lang-BfKIDLu4.js} +6 -6
- package/dist/{Experience-B0LMRyXY.js → Experience-BwiwVQ5v.js} +9 -9
- package/dist/{Game-Bz0eGUGe.js → Game-BK-04D8X.js} +10 -10
- package/dist/{Index-DV7FO6TN.js → Index-DucrRfw_.js} +10 -10
- package/dist/{Marketing-xdKdn8qo.js → Marketing-CzPjboT3.js} +6 -6
- package/dist/{Member-CGDUgKb7.js → Member-B19Kt5Vh.js} +5 -5
- package/dist/{MemberList-D1OLQAcR.js → MemberList-D5RFMF3q.js} +24 -24
- package/dist/{MemberTransactions-DO59eyLa.js → MemberTransactions-C1c8IqqO.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-bBjpPoOo.js → MessageInput.vue_vue_type_script_setup_true_lang-YrRQIrWo.js} +2 -2
- package/dist/{Mission-CZvAG4ev.js → Mission-CkumSwIo.js} +10 -10
- package/dist/{Overview-DMCKeCar.js → Overview-BtQVmK5W.js} +17 -17
- package/dist/{Point-BMyDzFyO.js → Point-Cc9uYA3T.js} +9 -9
- package/dist/{Promotion-D1nOUTxD.js → Promotion-B5nEZ6zg.js} +10 -10
- package/dist/{Queue-CGl0yzB4.js → Queue-EFdFqhDh.js} +9 -9
- package/dist/{Record-BGmigp0Z.js → Record-HROFl7Rg.js} +7 -7
- package/dist/{Reward-ZYXuU6-e.js → Reward-DcgE8VKA.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-C02Mj9a0.js → RewardGroup.vue_vue_type_script_setup_true_lang-DLpLp66V.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DGS3_lis.js → RuleGroup.vue_vue_type_script_setup_true_lang-DpirS0LA.js} +12 -12
- package/dist/{Segment-BXxgrHVs.js → Segment-YAQ0vnGP.js} +14 -14
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CSVXVt5K.js → SelectItems.vue_vue_type_script_setup_true_lang-C4dd7MvR.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-D9dpqYTQ.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dp3leeOg.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CM9312dS.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DCxtYNPf.js} +3 -3
- package/dist/{Setting-B3HficZP.js → Setting-ywKDTb-y.js} +10 -10
- package/dist/{Store-CWhmG8qW.js → Store-BpNyTqRG.js} +145 -143
- package/dist/StoreRewards-CB6RbBCG.js +423 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CTUT_564.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DJV5z0-C.js} +18 -18
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B059fdPj.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CafBjyAf.js} +1 -1
- package/dist/{Tier-qm79T_vU.js → Tier-C4rNs_1u.js} +20 -20
- package/dist/{Title-DOWrRYW8.js → Title-WidMRNuK.js} +79 -79
- package/dist/{Transaction-DW7bUI7j.js → Transaction-9mPnN60M.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-38On7ek-.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BSFZ1ANF.js} +6 -6
- package/dist/{Voucher-BJBXjxZV.js → Voucher-COXdXwo1.js} +12 -12
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DzdxjFhD.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Do4KVmge.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CJ_O28uk.js → ZodTextField.vue_vue_type_script_setup_true_lang-j9HnVsJg.js} +1 -1
- package/dist/{app-CHUmGvDF.js → app-De2YU1eG.js} +31 -31
- package/dist/{app-BLFTLZqS.js → app-yErmpAtu.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-Dl7vGxa1.js → business-I_jVdgH6.js} +1 -1
- package/dist/{campaign-XH_j4bGc.js → campaign-BhD3GJTV.js} +2 -2
- package/dist/{campaign-DMIBFpmQ.js → campaign-hBoxnj2N.js} +9 -9
- package/dist/{campaign.enum-UniuuBvU.js → campaign.enum-CGoJFEYE.js} +1 -1
- package/dist/{campaign.fn-CDC2Cia7.js → campaign.fn-oZf4Ap3H.js} +79 -79
- package/dist/{collectible.enum-Dx_pgMB9.js → collectible.enum-Bamr_j9I.js} +1 -1
- package/dist/{collection.fn-D0nutrYu.js → collection.fn-6ghcsG31.js} +2 -2
- package/dist/{dto-BAPti0UX.js → dto-DN59QhLX.js} +4 -4
- package/dist/{effect-By6CZhli.js → effect-DmeT_Vh3.js} +1 -1
- package/dist/{email-addresses-DPBu_l0s.js → email-addresses-03aXc59k.js} +1 -1
- package/dist/{export-C6IKCW8q.js → export-BE6_M8Bb.js} +3 -3
- package/dist/{helper-KCTyvhjf.js → helper-tLN9OiIA.js} +1 -1
- package/dist/{index-DxT_ZaWI.js → index-67Wy_uko.js} +6 -6
- package/dist/{index-DQxldvxq.js → index-B7Z-3d-c.js} +4 -4
- package/dist/{index-BHB9VPNm.js → index-BYG3Y7Jt.js} +1 -1
- package/dist/{index-_Fw2-H-c.js → index-BbgMEUR-.js} +1 -1
- package/dist/{index-e0vKYT8t.js → index-Brsh9MIM.js} +1 -1
- package/dist/{index-VPs9NXB7.js → index-BxS4Erew.js} +3 -3
- package/dist/{index-C-HL3cGP.js → index-C5SOcwav.js} +1 -1
- package/dist/{index-DDCO8cDG.js → index-CMv75vbY.js} +21 -16
- package/dist/{index-BVcdkWyy.js → index-DCP09nR1.js} +3 -3
- package/dist/{index-C9bN_nRJ.js → index-DpLHoUON.js} +1 -1
- package/dist/{index-D8dh7Th8.js → index-eFoCe1dL.js} +1 -1
- package/dist/{index-Sw_FxWmd.js → index-z82uP_8V.js} +1 -1
- package/dist/{index.esm2017-CiHGwLIY.js → index.esm2017-BpADxr6a.js} +1 -1
- package/dist/{loading-CmczlXAc.js → loading-BMjK5kC8.js} +1 -1
- package/dist/{membership-D-uWTsu-.js → membership-WJQZsNeC.js} +3 -3
- package/dist/{money-BhXbOy-4.js → money-BDm68J6p.js} +1 -1
- package/dist/{number-CT16ZbSb.js → number-DKFRrFHN.js} +1 -1
- package/dist/{objectid-BGQHcha_.js → objectid-7pRyCpqX.js} +3 -3
- package/dist/{plugins-uP-mKUTQ.js → plugins-CD1G5oN5.js} +4 -4
- package/dist/{reward-D7tB215Q.js → reward-Bb8XHNQp.js} +1 -1
- package/dist/{rule-LLXbjCSc.js → rule-9q4Y1uDS.js} +3 -3
- package/dist/{rule-builder-yxSBBeW6.js → rule-builder-9ePG52rv.js} +1 -1
- package/dist/{template-BRXG9AbZ.js → template-RVlppNNS.js} +4 -4
- package/dist/{trigger-BQTtyAtM.js → trigger-C0R972eV.js} +4 -4
- package/dist/{user-BzRp43jn.js → user-BLjZlAFz.js} +1 -1
- package/dist/{vue-i18n-7zGNsm-H.js → vue-i18n-CQNusyHK.js} +285 -285
- package/dist/{xlsx-mkBvYNNs.js → xlsx-rNL6x1jc.js} +1 -1
- package/package.json +1 -1
- package/dist/StoreRewards-6Cjh9q4d.js +0 -402
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { defineComponent as ee, computed as j, resolveComponent as h, openBlock as g, createBlock as I, withCtx as T, createElementVNode as _, 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 { u as Ee } 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-BxS4Erew.js";
|
|
5
|
+
import { u as Ee } from "./loading-BMjK5kC8.js";
|
|
6
|
+
import { u as ke, C as me } from "./membership-WJQZsNeC.js";
|
|
7
7
|
import { a as Je, c as De } from "./object-qECH92oz.js";
|
|
8
8
|
import { _ as ue } from "./lodash-B5I3zXaY.js";
|
|
9
|
-
import { d as se, a as Ge, p as _e, n as Xe, f as Fe } from "./plugins-
|
|
10
|
-
import { u as be } from "./vue-i18n-
|
|
9
|
+
import { d as se, a as Ge, p as _e, n as Xe, f as Fe } from "./plugins-CD1G5oN5.js";
|
|
10
|
+
import { u as be } from "./vue-i18n-CQNusyHK.js";
|
|
11
11
|
import { Z, g as J, a as G } from "./zod-Bg2FbC-D.js";
|
|
12
|
-
import { z as Q, R as Ze } from "./app-
|
|
13
|
-
import { l as Qe, m as et, n as tt, o as Ae, p as nt } from "./index-
|
|
12
|
+
import { z as Q, R as Ze } from "./app-De2YU1eG.js";
|
|
13
|
+
import { l as Qe, m as et, n as tt, o as Ae, p as nt } from "./index-B7Z-3d-c.js";
|
|
14
14
|
import { u as Se } from "./app-wDQR6dpb.js";
|
|
15
|
-
import { _ as te } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
15
|
+
import { _ as te } from "./ZodTextField.vue_vue_type_script_setup_true_lang-j9HnVsJg.js";
|
|
16
16
|
import { J as Pe } from "./JsonViewer-v8_C7l5N.js";
|
|
17
|
-
import { _ as ot } from "./index-
|
|
17
|
+
import { _ as ot } from "./index-CMv75vbY.js";
|
|
18
18
|
import { _ as at } from "./ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js";
|
|
19
19
|
import { _ as lt } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
20
|
-
import { z as st, a as rt } from "./money-
|
|
21
|
-
import { F as it } from "./number-
|
|
22
|
-
import { t as dt } from "./helper-
|
|
23
|
-
import "./index-
|
|
24
|
-
import "./index-
|
|
25
|
-
import "./index-
|
|
26
|
-
import "./index-
|
|
27
|
-
import { m as ut } from "./index-
|
|
28
|
-
import { m as Ce } from "./index-
|
|
20
|
+
import { z as st, a as rt } from "./money-BDm68J6p.js";
|
|
21
|
+
import { F as it } from "./number-DKFRrFHN.js";
|
|
22
|
+
import { t as dt } from "./helper-tLN9OiIA.js";
|
|
23
|
+
import "./index-BbgMEUR-.js";
|
|
24
|
+
import "./index-67Wy_uko.js";
|
|
25
|
+
import "./index-BYG3Y7Jt.js";
|
|
26
|
+
import "./index-DCP09nR1.js";
|
|
27
|
+
import { m as ut } from "./index-eFoCe1dL.js";
|
|
28
|
+
import { m as Ce } from "./index-C5SOcwav.js";
|
|
29
29
|
import { useRouter as ct } from "vue-router";
|
|
30
30
|
function je(v) {
|
|
31
31
|
return se.DineroFactory(v).toUnit();
|
|
@@ -103,7 +103,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
103
103
|
const l = v, f = x, r = j(() => {
|
|
104
104
|
const o = [];
|
|
105
105
|
return l.bundle.price.amount > 0 && o.push(
|
|
106
|
-
`${
|
|
106
|
+
`${D.Config.getCountry().currency.symbol}${je(l.bundle.price)}`
|
|
107
107
|
), l.bundle.coinPrice && o.push(`${l.bundle.coinPrice} point(s)`), o.join(" or ");
|
|
108
108
|
}), b = j(() => {
|
|
109
109
|
var m, u;
|
|
@@ -460,7 +460,7 @@ const Tt = {
|
|
|
460
460
|
return xe(this);
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
|
-
}, pe = () =>
|
|
463
|
+
}, pe = () => D.Config.getCountry(), ye = {
|
|
464
464
|
get fullCurrency() {
|
|
465
465
|
return pe().currency;
|
|
466
466
|
},
|
|
@@ -468,7 +468,7 @@ const Tt = {
|
|
|
468
468
|
return pe().currency.code;
|
|
469
469
|
},
|
|
470
470
|
get fullTax() {
|
|
471
|
-
return
|
|
471
|
+
return D.Country.getCountryFlattenTaxes(pe().code);
|
|
472
472
|
},
|
|
473
473
|
get taxSystem() {
|
|
474
474
|
return pe().taxSystems;
|
|
@@ -480,7 +480,7 @@ const Tt = {
|
|
|
480
480
|
}));
|
|
481
481
|
},
|
|
482
482
|
groupedTaxOptions() {
|
|
483
|
-
const v =
|
|
483
|
+
const v = D.Country.getCountryFlattenTaxes(pe().code);
|
|
484
484
|
return ye.taxSystem.map((x) => ({
|
|
485
485
|
code: x.code,
|
|
486
486
|
options: v.map((l) => ({ ...l, feedmeTaxCode: ye.generateCode(l) })).filter((l) => l.systemCode === x.code)
|
|
@@ -579,7 +579,7 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
579
579
|
}) : o || f("update:modelValue", void 0));
|
|
580
580
|
});
|
|
581
581
|
const b = j(() => {
|
|
582
|
-
const o = Rt.mode === "development", m =
|
|
582
|
+
const o = Rt.mode === "development", m = D.Config.getCountry().code.toLowerCase(), u = m != "my" ? `.${m}` : "";
|
|
583
583
|
return `https://marketing${o ? "-dev" : ""}${u}.feedmeapi.com/stripe/${ze.getBusinessId()}/webhook`;
|
|
584
584
|
});
|
|
585
585
|
return fe(() => {
|
|
@@ -666,7 +666,7 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
666
666
|
city: "",
|
|
667
667
|
postcode: "",
|
|
668
668
|
state: "",
|
|
669
|
-
country:
|
|
669
|
+
country: D.Config.getCountry().name
|
|
670
670
|
},
|
|
671
671
|
phoneNo: "",
|
|
672
672
|
regNo: "",
|
|
@@ -682,30 +682,30 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
682
682
|
showSheet: d,
|
|
683
683
|
data: o
|
|
684
684
|
}), (V, a) => {
|
|
685
|
-
const S = h("FmIcon"), k = h("FmMenuItem"),
|
|
685
|
+
const S = h("FmIcon"), k = h("FmMenuItem"), A = h("FmMenu"), Y = h("FmSelect"), W = h("FmButton"), K = h("FmSideSheet");
|
|
686
686
|
return g(), I(K, {
|
|
687
687
|
"max-width": 560,
|
|
688
688
|
modelValue: e(b),
|
|
689
|
-
"onUpdate:modelValue": a[15] || (a[15] = (
|
|
689
|
+
"onUpdate:modelValue": a[15] || (a[15] = (z) => oe(b) ? b.value = z : null),
|
|
690
690
|
header: e(f)("connect.store.setting.title")
|
|
691
691
|
}, {
|
|
692
692
|
"side-sheet-footer": T(() => [
|
|
693
693
|
_("div", Yt, [
|
|
694
|
-
i(
|
|
694
|
+
i(W, {
|
|
695
695
|
label: e(f)("connect.common.save"),
|
|
696
696
|
onClick: c,
|
|
697
697
|
disabled: !e(t) || e(Se)().isLoading,
|
|
698
698
|
loading: e(Se)().isLoading
|
|
699
699
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
700
|
-
i(
|
|
700
|
+
i(W, {
|
|
701
701
|
label: e(f)("connect.common.cancel"),
|
|
702
|
-
onClick: a[14] || (a[14] = (
|
|
702
|
+
onClick: a[14] || (a[14] = (z) => d(!1)),
|
|
703
703
|
variant: "tertiary"
|
|
704
704
|
}, null, 8, ["label"])
|
|
705
705
|
])
|
|
706
706
|
]),
|
|
707
707
|
default: T(() => {
|
|
708
|
-
var
|
|
708
|
+
var z, ae;
|
|
709
709
|
return [
|
|
710
710
|
i(Pe, { json: e(o) }, null, 8, ["json"]),
|
|
711
711
|
e(o) && e(o).company ? (g(), B("div", Dt, [
|
|
@@ -722,7 +722,7 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
722
722
|
label: e(f)("connect.store.setting.company.reg_no"),
|
|
723
723
|
schema: e(Z).typeAtPath(e(u), "company.regNo")
|
|
724
724
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
725
|
-
e(
|
|
725
|
+
e(D.Config).getCountry().taxSystems.length ? (g(), I(te, {
|
|
726
726
|
key: 0,
|
|
727
727
|
modelValue: e(o).company.sstRegNo,
|
|
728
728
|
"onUpdate:modelValue": [
|
|
@@ -732,7 +732,7 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
732
732
|
label: e(f)("connect.store.setting.company.tax_reg_no"),
|
|
733
733
|
schema: e(Z).typeAtPath(e(u), "company.sstRegNo")
|
|
734
734
|
}, null, 8, ["modelValue", "label", "schema"])) : M("", !0),
|
|
735
|
-
(
|
|
735
|
+
(z = e(o).company) != null && z.sstRegNo && e(o).inclusiveTaxes ? (g(), B("div", Mt, [
|
|
736
736
|
_("div", Ot, L(e(f)("connect.store.setting.company.tax")), 1),
|
|
737
737
|
i(Ut, {
|
|
738
738
|
modelValue: e(o).inclusiveTaxes,
|
|
@@ -773,7 +773,7 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
773
773
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
774
774
|
_("div", Lt, [
|
|
775
775
|
_("div", Kt, L(e(f)("connect.store.setting.company.address.state")), 1),
|
|
776
|
-
i(
|
|
776
|
+
i(A, {
|
|
777
777
|
placement: "top-end",
|
|
778
778
|
"model-value": e(m)
|
|
779
779
|
}, {
|
|
@@ -793,7 +793,7 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
793
793
|
}, 8, ["modelValue", "schema"])
|
|
794
794
|
]),
|
|
795
795
|
default: T(() => [
|
|
796
|
-
(g(!0), B(X, null, re(e(Tt)[e(
|
|
796
|
+
(g(!0), B(X, null, re(e(Tt)[e(D.Config).getCountry().code].stateItems.filter(
|
|
797
797
|
(s) => {
|
|
798
798
|
var w, U;
|
|
799
799
|
return s.label.toLowerCase().includes(((U = (w = e(o)) == null ? void 0 : w.company) == null ? void 0 : U.address.state.toLowerCase()) ?? "");
|
|
@@ -816,8 +816,8 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
816
816
|
"onUpdate:modelValue": a[12] || (a[12] = (s) => e(o).company.address.country = s),
|
|
817
817
|
items: [
|
|
818
818
|
{
|
|
819
|
-
label: e(
|
|
820
|
-
value: e(
|
|
819
|
+
label: e(D.Config).getCountry().name,
|
|
820
|
+
value: e(D.Config).getCountry().name
|
|
821
821
|
}
|
|
822
822
|
],
|
|
823
823
|
rules: [e(Z).ruleAtPath(e(u), "company.address.country")]
|
|
@@ -839,7 +839,7 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
839
839
|
}
|
|
840
840
|
});
|
|
841
841
|
function zt(v, x = !0) {
|
|
842
|
-
return
|
|
842
|
+
return D.DineroFactory(v).toFormat(x);
|
|
843
843
|
}
|
|
844
844
|
const Jt = /* @__PURE__ */ ee({
|
|
845
845
|
__name: "TaxVariantSetting",
|
|
@@ -928,8 +928,8 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
928
928
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
929
929
|
},
|
|
930
930
|
name: "",
|
|
931
|
-
price:
|
|
932
|
-
originalPrice:
|
|
931
|
+
price: D.Dinero.zero().toObject(),
|
|
932
|
+
originalPrice: D.Dinero.zero().toObject(),
|
|
933
933
|
vouchers: [],
|
|
934
934
|
credit: {
|
|
935
935
|
normal: 0,
|
|
@@ -981,9 +981,9 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
981
981
|
var C;
|
|
982
982
|
const n = p.row.original;
|
|
983
983
|
return n.collectible.type == "VOUCHER" || n.selectedReward == null ? n.description : qe(We.FmStepperField, {
|
|
984
|
-
"onUpdate:modelValue": (
|
|
984
|
+
"onUpdate:modelValue": ($) => {
|
|
985
985
|
t.value.titles = t.value.titles.map(
|
|
986
|
-
(E) => E.id == n.collectible._id ? { ...E, dayToExpire:
|
|
986
|
+
(E) => E.id == n.collectible._id ? { ...E, dayToExpire: $ } : E
|
|
987
987
|
);
|
|
988
988
|
},
|
|
989
989
|
modelValue: ((C = n.selectedReward) == null ? void 0 : C.extra) ?? 0,
|
|
@@ -991,14 +991,14 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
991
991
|
helperState: J(d.value, "titles"),
|
|
992
992
|
helperText: G(d.value, "titles"),
|
|
993
993
|
max: 9999,
|
|
994
|
-
rules: [(
|
|
994
|
+
rules: [($) => $ <= 9999 || "Maximum 9999 days allowed"],
|
|
995
995
|
showSteppers: !1,
|
|
996
996
|
disabled: !!t.value.stripePriceId
|
|
997
997
|
});
|
|
998
998
|
}
|
|
999
999
|
}
|
|
1000
1000
|
], a = R([]), S = j(() => b.bundleRewards.map((p) => {
|
|
1001
|
-
const n = k.value.find((
|
|
1001
|
+
const n = k.value.find(($) => $.id == p._id), C = p.type === "VOUCHER" ? `${p.options.maxUse} use(s), ${dt(
|
|
1002
1002
|
p.options.validityOption || {}
|
|
1003
1003
|
)}` : "No expiry";
|
|
1004
1004
|
return {
|
|
@@ -1018,7 +1018,7 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1018
1018
|
extra: void 0
|
|
1019
1019
|
}))) ?? []
|
|
1020
1020
|
];
|
|
1021
|
-
}),
|
|
1021
|
+
}), A = j(
|
|
1022
1022
|
() => t.value.stripePriceId && t.value.subscriptionValidity ? t.value.subscriptionValidity : 0
|
|
1023
1023
|
);
|
|
1024
1024
|
function Y(p) {
|
|
@@ -1027,26 +1027,26 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1027
1027
|
n.dayToExpire = p;
|
|
1028
1028
|
t.value.credit.free && (t.value.credit.free.day = p);
|
|
1029
1029
|
}
|
|
1030
|
-
function
|
|
1030
|
+
function W() {
|
|
1031
1031
|
const p = S.value, n = t.value;
|
|
1032
1032
|
if (!(!n || !p))
|
|
1033
1033
|
for (let C = 0; C < p.length; C++) {
|
|
1034
|
-
const
|
|
1035
|
-
K.value[C] ?
|
|
1036
|
-
(H) => H.id ==
|
|
1034
|
+
const $ = p[C];
|
|
1035
|
+
K.value[C] ? $.collectible.type == "TITLE" ? n.titles.findIndex(
|
|
1036
|
+
(H) => H.id == $.collectible._id
|
|
1037
1037
|
) < 0 && n.titles.push({
|
|
1038
|
-
id:
|
|
1039
|
-
dayToExpire:
|
|
1038
|
+
id: $.collectible._id,
|
|
1039
|
+
dayToExpire: A.value
|
|
1040
1040
|
}) : n.vouchers.findIndex(
|
|
1041
|
-
(H) => H ==
|
|
1042
|
-
) < 0 && n.vouchers.push(
|
|
1043
|
-
(q) => q !=
|
|
1041
|
+
(H) => H == $.collectible._id
|
|
1042
|
+
) < 0 && n.vouchers.push($.collectible._id) : (n.titles = n.titles.filter((q) => q.id != $.collectible._id), n.vouchers = n.vouchers.filter(
|
|
1043
|
+
(q) => q != $.collectible._id
|
|
1044
1044
|
));
|
|
1045
1045
|
}
|
|
1046
1046
|
}
|
|
1047
1047
|
const K = R({});
|
|
1048
|
-
we(K,
|
|
1049
|
-
const
|
|
1048
|
+
we(K, W, { deep: !0 });
|
|
1049
|
+
const z = j(() => {
|
|
1050
1050
|
var p, n;
|
|
1051
1051
|
return (n = (p = b.storeOption) == null ? void 0 : p.company) == null ? void 0 : n.sstRegNo;
|
|
1052
1052
|
}), ae = j(() => {
|
|
@@ -1060,17 +1060,17 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1060
1060
|
t.value.price,
|
|
1061
1061
|
Number(t.value.credit.normal),
|
|
1062
1062
|
((p = b.storeOption) == null ? void 0 : p.inclusiveTaxes) ?? [],
|
|
1063
|
-
(C = (n = b.storeOption) == null ? void 0 : n.company) != null && C.sstRegNo ? ne.taxSystem.map((
|
|
1063
|
+
(C = (n = b.storeOption) == null ? void 0 : n.company) != null && C.sstRegNo ? ne.taxSystem.map(($) => $.code) : []
|
|
1064
1064
|
);
|
|
1065
1065
|
}), w = j(() => s.value.reduce(
|
|
1066
1066
|
(n, C) => n.add(C.total),
|
|
1067
1067
|
rt()
|
|
1068
1068
|
).toFormat()), U = j(() => {
|
|
1069
|
-
var
|
|
1069
|
+
var $;
|
|
1070
1070
|
const p = pt(
|
|
1071
1071
|
s.value,
|
|
1072
1072
|
t.value.price,
|
|
1073
|
-
((
|
|
1073
|
+
(($ = b.storeOption) == null ? void 0 : $.inclusiveTaxes) ?? []
|
|
1074
1074
|
);
|
|
1075
1075
|
t.value.priceWithTaxes = p;
|
|
1076
1076
|
const n = zt(p, !1), C = Number(n.replace(/[^\d.-]/g, ""));
|
|
@@ -1079,19 +1079,19 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1079
1079
|
function O() {
|
|
1080
1080
|
t.value.taxTotals = s.value, f("update", Ae.parse(Je(t.value)));
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1082
|
+
function P() {
|
|
1083
1083
|
return ue.cloneDeep(Ve);
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1086
|
-
o.value = p, p && n && (c.value = void 0, m.value = n.categories, t.value = n.bundle ||
|
|
1085
|
+
function N(p, n) {
|
|
1086
|
+
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), {}));
|
|
1087
1087
|
}
|
|
1088
1088
|
return x({
|
|
1089
|
-
showSheet:
|
|
1089
|
+
showSheet: N,
|
|
1090
1090
|
bundleImage: c,
|
|
1091
1091
|
target: u,
|
|
1092
1092
|
data: t
|
|
1093
1093
|
}), (p, n) => {
|
|
1094
|
-
const C = h("FmSwitch"),
|
|
1094
|
+
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");
|
|
1095
1095
|
return g(), I(ve, {
|
|
1096
1096
|
"max-width": 768,
|
|
1097
1097
|
modelValue: e(o),
|
|
@@ -1108,7 +1108,7 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1108
1108
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
1109
1109
|
i(ce, {
|
|
1110
1110
|
label: "Cancel",
|
|
1111
|
-
onClick: n[19] || (n[19] = (le) =>
|
|
1111
|
+
onClick: n[19] || (n[19] = (le) => N(!1)),
|
|
1112
1112
|
variant: "tertiary"
|
|
1113
1113
|
})
|
|
1114
1114
|
])
|
|
@@ -1119,7 +1119,7 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1119
1119
|
i(Pe, { json: e(t) }, null, 8, ["json"]),
|
|
1120
1120
|
e(t) ? (g(), B("div", Gt, [
|
|
1121
1121
|
_("div", Xt, [
|
|
1122
|
-
e(
|
|
1122
|
+
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, {
|
|
1123
1123
|
key: 0,
|
|
1124
1124
|
"onUpdate:modelValue": n[0] || (n[0] = (F) => {
|
|
1125
1125
|
e(t).isFeedvibe = F, e(t).isFeedvibe && (e(t).credit.normal = 0, e(t).coinPrice = 0, e(t).titles = [], K.value = {});
|
|
@@ -1129,7 +1129,7 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1129
1129
|
label: "Feedvibe Campaign",
|
|
1130
1130
|
sublabel: "Bundle will be appear for Feedvibe campaign use"
|
|
1131
1131
|
}, null, 8, ["model-value"])) : M("", !0),
|
|
1132
|
-
e(t).isFeedvibe ? (g(), I(
|
|
1132
|
+
e(t).isFeedvibe ? (g(), I($, {
|
|
1133
1133
|
key: 1,
|
|
1134
1134
|
text: "There will be a 15% charge for FeedVibe bundles sold in the FeedVibe app",
|
|
1135
1135
|
state: "warning"
|
|
@@ -1162,7 +1162,7 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1162
1162
|
"helper-text": e(G)(e(d), "image")
|
|
1163
1163
|
}, null, 8, ["label", "thumbnail", "file", "helper-state", "helper-text"]),
|
|
1164
1164
|
i(H, {
|
|
1165
|
-
"model-value": e(
|
|
1165
|
+
"model-value": e(D.Dinero).fromFdoDinero(e(t).price).toUnit(),
|
|
1166
1166
|
label: e(r)("connect.store.bundle.edit.bundlePrice"),
|
|
1167
1167
|
min: 0,
|
|
1168
1168
|
"max-fraction-digits": 2,
|
|
@@ -1171,23 +1171,23 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1171
1171
|
}),
|
|
1172
1172
|
"is-currency": !0,
|
|
1173
1173
|
"show-steppers": !1,
|
|
1174
|
-
"helper-text": e(G)(e(d), "price") || `${e(
|
|
1174
|
+
"helper-text": e(G)(e(d), "price") || `${e(D.Dinero).fromNumber({ number: 1 }).toFormat(
|
|
1175
1175
|
!0
|
|
1176
|
-
)} = ${e(
|
|
1176
|
+
)} = ${e(D.Dinero).fromNumber({ number: 1 }).toUnit()} credit`,
|
|
1177
1177
|
"helper-state": e(J)(e(d), "price")
|
|
1178
1178
|
}, {
|
|
1179
1179
|
prepend: T(() => [
|
|
1180
|
-
de(L(e(
|
|
1180
|
+
de(L(e(D.Dinero).defaultCurrency()), 1)
|
|
1181
1181
|
]),
|
|
1182
1182
|
_: 1
|
|
1183
1183
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
1184
1184
|
i(H, {
|
|
1185
|
-
"model-value": e(
|
|
1185
|
+
"model-value": e(D.Dinero).fromFdoDinero(e(t).originalPrice).toUnit(),
|
|
1186
1186
|
label: e(r)("connect.store.bundle.edit.bundleValue"),
|
|
1187
1187
|
min: 0,
|
|
1188
1188
|
"max-fraction-digits": 2,
|
|
1189
1189
|
"onUpdate:modelValue": n[5] || (n[5] = (F) => {
|
|
1190
|
-
e(t).originalPrice || (e(t).originalPrice = e(
|
|
1190
|
+
e(t).originalPrice || (e(t).originalPrice = e(D.Dinero).zero().toObject()), e(t).originalPrice.amount = F * 10 ** e(t).originalPrice.precision;
|
|
1191
1191
|
}),
|
|
1192
1192
|
"is-currency": !0,
|
|
1193
1193
|
"show-steppers": !1,
|
|
@@ -1195,7 +1195,7 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1195
1195
|
"helper-state": e(J)(e(d), "originalPrice")
|
|
1196
1196
|
}, {
|
|
1197
1197
|
prepend: T(() => [
|
|
1198
|
-
de(L(e(
|
|
1198
|
+
de(L(e(D.Dinero).defaultCurrency()), 1)
|
|
1199
1199
|
]),
|
|
1200
1200
|
_: 1
|
|
1201
1201
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
@@ -1279,7 +1279,7 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1279
1279
|
e(t).credit.free || (e(t).credit.free = {
|
|
1280
1280
|
amount: 0,
|
|
1281
1281
|
day: 1
|
|
1282
|
-
}), e(t).credit.free.day = e(
|
|
1282
|
+
}), e(t).credit.free.day = e(A) || F;
|
|
1283
1283
|
}),
|
|
1284
1284
|
label: "Free credit valid for",
|
|
1285
1285
|
"show-steppers": !1,
|
|
@@ -1292,7 +1292,7 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1292
1292
|
_: 1
|
|
1293
1293
|
}, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : M("", !0)
|
|
1294
1294
|
], 64)),
|
|
1295
|
-
e(
|
|
1295
|
+
e(z) ? (g(), B(X, { key: 3 }, [
|
|
1296
1296
|
n[25] || (n[25] = _("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Taxes", -1)),
|
|
1297
1297
|
i(Jt, {
|
|
1298
1298
|
modelValue: e(t).taxes,
|
|
@@ -1356,7 +1356,7 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1356
1356
|
),
|
|
1357
1357
|
"hide-footer": e(S).length <= 10
|
|
1358
1358
|
}, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"]),
|
|
1359
|
-
i(
|
|
1359
|
+
i($, {
|
|
1360
1360
|
text: e(G)(e(d), "titles"),
|
|
1361
1361
|
state: e(J)(e(d), "titles")
|
|
1362
1362
|
}, null, 8, ["text", "state"])
|
|
@@ -1412,15 +1412,15 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1412
1412
|
search: S,
|
|
1413
1413
|
descending: !1
|
|
1414
1414
|
});
|
|
1415
|
-
m.value = k.resources.map((
|
|
1416
|
-
label: `${
|
|
1417
|
-
value:
|
|
1418
|
-
})), await new Promise((
|
|
1415
|
+
m.value = k.resources.map((A) => ({
|
|
1416
|
+
label: `${A.name} (${A.phoneNumber})`,
|
|
1417
|
+
value: A._id
|
|
1418
|
+
})), await new Promise((A) => setTimeout(A, 100));
|
|
1419
1419
|
}
|
|
1420
1420
|
async function V() {
|
|
1421
1421
|
if (!r.value || !b.value) return;
|
|
1422
1422
|
const S = m.value.find(
|
|
1423
|
-
(
|
|
1423
|
+
(A) => A.value === b.value
|
|
1424
1424
|
);
|
|
1425
1425
|
await _e.confirm(
|
|
1426
1426
|
`Are you sure you want to send bundle ${r.value.name} to ${S == null ? void 0 : S.label}?`,
|
|
@@ -1429,14 +1429,14 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1429
1429
|
"Cancel"
|
|
1430
1430
|
) && await f(
|
|
1431
1431
|
async () => {
|
|
1432
|
-
const
|
|
1432
|
+
const A = {
|
|
1433
1433
|
bundle: r.value._id,
|
|
1434
1434
|
member: b.value,
|
|
1435
1435
|
source: nt.enum.ADMIN,
|
|
1436
1436
|
ref: `ADMIN:${(/* @__PURE__ */ new Date()).toISOString()}:${o.value}`,
|
|
1437
1437
|
withCoin: !1
|
|
1438
1438
|
};
|
|
1439
|
-
await Ce.sendBundle(
|
|
1439
|
+
await Ce.sendBundle(A), y();
|
|
1440
1440
|
},
|
|
1441
1441
|
{
|
|
1442
1442
|
message: "Sending bundle",
|
|
@@ -1445,10 +1445,10 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1445
1445
|
);
|
|
1446
1446
|
}
|
|
1447
1447
|
const a = j(() => {
|
|
1448
|
-
var k,
|
|
1448
|
+
var k, A, Y;
|
|
1449
1449
|
const S = [];
|
|
1450
1450
|
return ((k = r.value) == null ? void 0 : k.price.amount) > 0 && S.push(
|
|
1451
|
-
`${
|
|
1451
|
+
`${D.Config.getCountry().currency.symbol}${je((A = r.value) == null ? void 0 : A.price)}`
|
|
1452
1452
|
), (Y = r.value) != null && Y.coinPrice && S.push(`${r.value.coinPrice} point(s)`), S.join(" or ");
|
|
1453
1453
|
});
|
|
1454
1454
|
return x({
|
|
@@ -1457,15 +1457,15 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1457
1457
|
}), fe(async () => {
|
|
1458
1458
|
await d("");
|
|
1459
1459
|
}), (S, k) => {
|
|
1460
|
-
const
|
|
1460
|
+
const A = h("FmCardMedia"), Y = h("FmCardHeader"), W = h("FmChip"), K = h("FmCardSection"), z = h("FmCard"), ae = h("FmSelect"), s = h("FmTextField"), w = h("FmForm"), U = h("FmButton"), O = h("FmSideSheet");
|
|
1461
1461
|
return g(), I(O, {
|
|
1462
1462
|
"max-width": 560,
|
|
1463
1463
|
"dismiss-away": !0,
|
|
1464
1464
|
header: "Send bundle to member",
|
|
1465
1465
|
modelValue: e(u),
|
|
1466
1466
|
"onUpdate:modelValue": [
|
|
1467
|
-
k[4] || (k[4] = (
|
|
1468
|
-
k[5] || (k[5] = (
|
|
1467
|
+
k[4] || (k[4] = (P) => oe(u) ? u.value = P : null),
|
|
1468
|
+
k[5] || (k[5] = (P) => u.value = P)
|
|
1469
1469
|
]
|
|
1470
1470
|
}, {
|
|
1471
1471
|
"side-sheet-footer": T(() => [
|
|
@@ -1474,15 +1474,15 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1474
1474
|
label: "Send",
|
|
1475
1475
|
loading: e(Se)().isLoading,
|
|
1476
1476
|
onClick: k[2] || (k[2] = async () => {
|
|
1477
|
-
var
|
|
1478
|
-
return (
|
|
1477
|
+
var P;
|
|
1478
|
+
return (P = e(t)) == null ? void 0 : P.validateInputs();
|
|
1479
1479
|
})
|
|
1480
1480
|
}, null, 8, ["loading"]),
|
|
1481
1481
|
i(U, {
|
|
1482
1482
|
label: "Cancel",
|
|
1483
1483
|
type: "button",
|
|
1484
1484
|
variant: "tertiary",
|
|
1485
|
-
onClick: k[3] || (k[3] = (
|
|
1485
|
+
onClick: k[3] || (k[3] = (P) => u.value = !1)
|
|
1486
1486
|
})
|
|
1487
1487
|
])
|
|
1488
1488
|
]),
|
|
@@ -1495,18 +1495,18 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1495
1495
|
blameFormChildOnValidationFailed: ""
|
|
1496
1496
|
}, {
|
|
1497
1497
|
default: T(() => [
|
|
1498
|
-
i(
|
|
1498
|
+
i(z, {
|
|
1499
1499
|
class: "max-w-[700px]",
|
|
1500
1500
|
horizontal: "",
|
|
1501
1501
|
variant: "outlined"
|
|
1502
1502
|
}, {
|
|
1503
1503
|
default: T(() => {
|
|
1504
|
-
var
|
|
1504
|
+
var P, N;
|
|
1505
1505
|
return [
|
|
1506
|
-
(
|
|
1506
|
+
(P = e(r)) != null && P.image ? (g(), I(A, {
|
|
1507
1507
|
key: 0,
|
|
1508
1508
|
width: "100",
|
|
1509
|
-
src: (
|
|
1509
|
+
src: (N = e(r)) == null ? void 0 : N.image
|
|
1510
1510
|
}, null, 8, ["src"])) : M("", !0),
|
|
1511
1511
|
i(K, { class: "flex flex-col gap-16 justify-between" }, {
|
|
1512
1512
|
default: T(() => {
|
|
@@ -1519,22 +1519,22 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1519
1519
|
}, null, 8, ["title", "subtitle"]),
|
|
1520
1520
|
i(K, { class: "p-0" }, {
|
|
1521
1521
|
default: T(() => {
|
|
1522
|
-
var n, C,
|
|
1522
|
+
var n, C, $, E, q, H, ie, ge, ce, ve, le;
|
|
1523
1523
|
return [
|
|
1524
1524
|
_("div", un, [
|
|
1525
|
-
(n = e(r)) != null && n.isFeedvibe ? (g(), I(
|
|
1525
|
+
(n = e(r)) != null && n.isFeedvibe ? (g(), I(W, {
|
|
1526
1526
|
key: 0,
|
|
1527
1527
|
label: "Feedvibe"
|
|
1528
1528
|
})) : M("", !0),
|
|
1529
|
-
(
|
|
1529
|
+
($ = (C = e(r)) == null ? void 0 : C.titles) != null && $.length ? (g(), I(W, {
|
|
1530
1530
|
key: 1,
|
|
1531
1531
|
label: `${e(r).titles.length} title(s)`
|
|
1532
1532
|
}, null, 8, ["label"])) : M("", !0),
|
|
1533
|
-
(q = (E = e(r)) == null ? void 0 : E.vouchers) != null && q.length ? (g(), I(
|
|
1533
|
+
(q = (E = e(r)) == null ? void 0 : E.vouchers) != null && q.length ? (g(), I(W, {
|
|
1534
1534
|
key: 2,
|
|
1535
1535
|
label: `${e(r).vouchers.length} voucher(s)`
|
|
1536
1536
|
}, null, 8, ["label"])) : M("", !0),
|
|
1537
|
-
(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(
|
|
1537
|
+
(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, {
|
|
1538
1538
|
key: 3,
|
|
1539
1539
|
label: `${(e(r).credit.normal || 0) + (((le = e(r).credit.free) == null ? void 0 : le.amount) || 0)} credit(s)`
|
|
1540
1540
|
}, null, 8, ["label"])) : M("", !0)
|
|
@@ -1553,20 +1553,20 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1553
1553
|
}),
|
|
1554
1554
|
i(ae, {
|
|
1555
1555
|
modelValue: e(b),
|
|
1556
|
-
"onUpdate:modelValue": k[0] || (k[0] = (
|
|
1556
|
+
"onUpdate:modelValue": k[0] || (k[0] = (P) => oe(b) ? b.value = P : null),
|
|
1557
1557
|
label: "Select member",
|
|
1558
1558
|
searchable: "",
|
|
1559
1559
|
items: e(m),
|
|
1560
1560
|
onSearch: d,
|
|
1561
|
-
rules: [(
|
|
1561
|
+
rules: [(P) => !!P > 0 || "Member is required"],
|
|
1562
1562
|
"helper-text": "Type to search member"
|
|
1563
1563
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
1564
1564
|
i(s, {
|
|
1565
1565
|
modelValue: e(o),
|
|
1566
|
-
"onUpdate:modelValue": k[1] || (k[1] = (
|
|
1566
|
+
"onUpdate:modelValue": k[1] || (k[1] = (P) => oe(o) ? o.value = P : null),
|
|
1567
1567
|
label: "Reference (optional)",
|
|
1568
1568
|
rules: [
|
|
1569
|
-
(
|
|
1569
|
+
(P) => P.length < 50 || "Reference must be less than 50 characters"
|
|
1570
1570
|
]
|
|
1571
1571
|
}, null, 8, ["modelValue", "rules"])
|
|
1572
1572
|
]),
|
|
@@ -1603,7 +1603,7 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1603
1603
|
var w;
|
|
1604
1604
|
s === "setting" ? (w = a.value) == null || w.showSheet(!0, u.storeOption) : s === "create_category" ? Y(-1) : s === "create_reward" ? await m.push({ name: Ze["$connect-STORE_REWARDS"] }) : s == "payout" && window.open(pn.paymentPortalUrl, "_blank");
|
|
1605
1605
|
}
|
|
1606
|
-
async function
|
|
1606
|
+
async function A(s) {
|
|
1607
1607
|
await c(
|
|
1608
1608
|
async () => {
|
|
1609
1609
|
var w;
|
|
@@ -1637,9 +1637,9 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1637
1637
|
l("connect.store.category.remove.title")
|
|
1638
1638
|
) || await c(
|
|
1639
1639
|
async () => {
|
|
1640
|
-
const
|
|
1640
|
+
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);
|
|
1641
1641
|
await Ce.updateStoreBundle({
|
|
1642
|
-
categories:
|
|
1642
|
+
categories: P
|
|
1643
1643
|
}), await u.readMemberStore();
|
|
1644
1644
|
},
|
|
1645
1645
|
{
|
|
@@ -1649,16 +1649,16 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1649
1649
|
);
|
|
1650
1650
|
});
|
|
1651
1651
|
}
|
|
1652
|
-
async function
|
|
1652
|
+
async function W(s, w, U, O) {
|
|
1653
1653
|
var p, n, C;
|
|
1654
1654
|
w ?? (w = (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);
|
|
1655
|
-
const
|
|
1656
|
-
for (const
|
|
1657
|
-
for (const E of
|
|
1655
|
+
const P = De(d.value);
|
|
1656
|
+
for (const $ of P)
|
|
1657
|
+
for (const E of $.bundles)
|
|
1658
1658
|
console.log(E, "bundle in payload"), "pf_vouchers" in E && delete E.pf_vouchers;
|
|
1659
|
-
w != O && (
|
|
1660
|
-
const
|
|
1661
|
-
if (!
|
|
1659
|
+
w != O && (P[O].bundles.splice(U, 1), U = P[w].bundles.length), console.log(w, U, O, "ci, bi, originalCategoryIndex");
|
|
1660
|
+
const N = P[w];
|
|
1661
|
+
if (!N) {
|
|
1662
1662
|
Xe.error("Unexpected error", 2e3);
|
|
1663
1663
|
return;
|
|
1664
1664
|
}
|
|
@@ -1668,21 +1668,21 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1668
1668
|
"Delete bundle"
|
|
1669
1669
|
) == !1)
|
|
1670
1670
|
return;
|
|
1671
|
-
|
|
1671
|
+
N.bundles.splice(U, 1);
|
|
1672
1672
|
} else
|
|
1673
|
-
U == -1 ?
|
|
1673
|
+
U == -1 ? N.bundles.push(s) : N.bundles[U] = s;
|
|
1674
1674
|
await c(
|
|
1675
1675
|
async () => {
|
|
1676
|
-
var
|
|
1676
|
+
var $, E;
|
|
1677
1677
|
if (s != null) {
|
|
1678
|
-
const q = (
|
|
1678
|
+
const q = ($ = S.value) == null ? void 0 : $.bundleImage;
|
|
1679
1679
|
q === null && s.image ? (await Fe.delete(s.image), s.image = null) : q && (s.image = await Fe.update(
|
|
1680
1680
|
Fe.bundleImagePath(void 0, q),
|
|
1681
1681
|
q
|
|
1682
1682
|
));
|
|
1683
1683
|
}
|
|
1684
1684
|
await Ce.updateStoreBundle({
|
|
1685
|
-
categories:
|
|
1685
|
+
categories: P
|
|
1686
1686
|
}), await u.readMemberStore(), await u.readMembership(), await u.readRewards(), (E = S.value) == null || E.showSheet(!1);
|
|
1687
1687
|
},
|
|
1688
1688
|
{
|
|
@@ -1698,7 +1698,7 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1698
1698
|
bundle: s.bundle ? De(s.bundle) : void 0
|
|
1699
1699
|
});
|
|
1700
1700
|
}
|
|
1701
|
-
const
|
|
1701
|
+
const z = R([]);
|
|
1702
1702
|
function ae(s) {
|
|
1703
1703
|
var w;
|
|
1704
1704
|
(w = o.value) == null || w.showSheet({
|
|
@@ -1706,11 +1706,11 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1706
1706
|
});
|
|
1707
1707
|
}
|
|
1708
1708
|
return fe(async () => {
|
|
1709
|
-
var
|
|
1709
|
+
var w, U;
|
|
1710
1710
|
await t(async () => {
|
|
1711
|
-
var
|
|
1712
|
-
if (await u.readMemberStore(), await u.readMembership(), await u.readRewards(),
|
|
1713
|
-
switch ((
|
|
1711
|
+
var O, P;
|
|
1712
|
+
if (await u.readMemberStore(), await u.readMembership(), await u.readRewards(), (O = m.currentRoute.value.query) != null && O.action) {
|
|
1713
|
+
switch ((P = m.currentRoute.value.query) == null ? void 0 : P.action) {
|
|
1714
1714
|
case "update_setting":
|
|
1715
1715
|
k("setting");
|
|
1716
1716
|
break;
|
|
@@ -1721,15 +1721,15 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1721
1721
|
y.open({
|
|
1722
1722
|
title: "Select category",
|
|
1723
1723
|
contentComponent: $t
|
|
1724
|
-
}).onPrimary((
|
|
1724
|
+
}).onPrimary((N) => {
|
|
1725
1725
|
y.close(), K({
|
|
1726
1726
|
categories: V.value,
|
|
1727
|
-
category:
|
|
1727
|
+
category: N,
|
|
1728
1728
|
index: -1,
|
|
1729
1729
|
bundle: {
|
|
1730
1730
|
...ue.cloneDeep(Ve),
|
|
1731
1731
|
isFeedvibe: !0,
|
|
1732
|
-
price:
|
|
1732
|
+
price: D.Dinero.fromNumber({
|
|
1733
1733
|
number: 10,
|
|
1734
1734
|
precision: 2
|
|
1735
1735
|
}).toObject()
|
|
@@ -1740,29 +1740,31 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1740
1740
|
}
|
|
1741
1741
|
m.replace({ query: {} });
|
|
1742
1742
|
}
|
|
1743
|
-
})
|
|
1744
|
-
|
|
1743
|
+
});
|
|
1744
|
+
const s = ((w = u.payoutAccount) == null ? void 0 : w.status) === "APPROVED" && ((U = u.payoutAccount) == null ? void 0 : U.enable) === !0;
|
|
1745
|
+
z.value = [
|
|
1746
|
+
...s ? [] : [x],
|
|
1745
1747
|
f,
|
|
1746
1748
|
r,
|
|
1747
1749
|
b
|
|
1748
|
-
]
|
|
1750
|
+
];
|
|
1749
1751
|
}), (s, w) => {
|
|
1750
|
-
const U = h("FmPageHead"), O = h("FmButton"),
|
|
1752
|
+
const U = h("FmPageHead"), O = h("FmButton"), P = h("FmCard");
|
|
1751
1753
|
return g(), B(X, null, [
|
|
1752
1754
|
i(U, {
|
|
1753
1755
|
title: e(l)("connect.store.title"),
|
|
1754
|
-
actions: e(
|
|
1756
|
+
actions: e(z),
|
|
1755
1757
|
"onClick:action": k
|
|
1756
1758
|
}, null, 8, ["title", "actions"]),
|
|
1757
1759
|
_("div", yn, [
|
|
1758
1760
|
e(d) && e(d).length > 0 ? (g(), B(X, { key: 0 }, [
|
|
1759
|
-
(g(!0), B(X, null, re(e(d), (
|
|
1760
|
-
key:
|
|
1761
|
+
(g(!0), B(X, null, re(e(d), (N, p) => (g(), B("div", {
|
|
1762
|
+
key: N.name,
|
|
1761
1763
|
class: "space-y-8 py-12"
|
|
1762
1764
|
}, [
|
|
1763
1765
|
_("div", fn, [
|
|
1764
|
-
_("div", bn, L(
|
|
1765
|
-
i(Pe, { json:
|
|
1766
|
+
_("div", bn, L(N.name), 1),
|
|
1767
|
+
i(Pe, { json: N }, null, 8, ["json"]),
|
|
1766
1768
|
i(O, {
|
|
1767
1769
|
icon: "edit",
|
|
1768
1770
|
size: "md",
|
|
@@ -1771,16 +1773,16 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1771
1773
|
}, null, 8, ["onClick"])
|
|
1772
1774
|
]),
|
|
1773
1775
|
_("div", gn, [
|
|
1774
|
-
(g(!0), B(X, null, re(
|
|
1776
|
+
(g(!0), B(X, null, re(N.bundles, (n, C) => (g(), I(_t, {
|
|
1775
1777
|
bundle: n,
|
|
1776
1778
|
key: n._id,
|
|
1777
|
-
onEdit: (
|
|
1779
|
+
onEdit: ($) => K({
|
|
1778
1780
|
bundle: n,
|
|
1779
1781
|
category: p,
|
|
1780
1782
|
index: C,
|
|
1781
1783
|
categories: e(V)
|
|
1782
1784
|
}),
|
|
1783
|
-
onDelete: (
|
|
1785
|
+
onDelete: ($) => W(null, p, C),
|
|
1784
1786
|
onSend: ae
|
|
1785
1787
|
}, null, 8, ["bundle", "onEdit", "onDelete"]))), 128)),
|
|
1786
1788
|
i(Ct, {
|
|
@@ -1795,9 +1797,9 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1795
1797
|
i(dn, {
|
|
1796
1798
|
ref_key: "bundleSheetRef",
|
|
1797
1799
|
ref: S,
|
|
1798
|
-
onUpdate:
|
|
1800
|
+
onUpdate: W
|
|
1799
1801
|
}, null, 512)
|
|
1800
|
-
], 64)) : (g(), I(
|
|
1802
|
+
], 64)) : (g(), I(P, {
|
|
1801
1803
|
key: 1,
|
|
1802
1804
|
variant: "outlined",
|
|
1803
1805
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
@@ -1815,7 +1817,7 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1815
1817
|
variant: "primary",
|
|
1816
1818
|
label: e(l)("connect.store.actions.addCategory"),
|
|
1817
1819
|
icon: "add",
|
|
1818
|
-
onClick: w[0] || (w[0] = (
|
|
1820
|
+
onClick: w[0] || (w[0] = (N) => Y(-1))
|
|
1819
1821
|
}, null, 8, ["label"])
|
|
1820
1822
|
]),
|
|
1821
1823
|
_: 1
|
|
@@ -1823,7 +1825,7 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1823
1825
|
i(Wt, {
|
|
1824
1826
|
ref_key: "settingSheetRef",
|
|
1825
1827
|
ref: a,
|
|
1826
|
-
onUpdate:
|
|
1828
|
+
onUpdate: A
|
|
1827
1829
|
}, null, 512),
|
|
1828
1830
|
i(mn, {
|
|
1829
1831
|
ref_key: "sendBundleSheetRef",
|