@feedmepos/mf-connect 0.1.38-beta.48 → 0.1.38-beta.49
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-BdTI8QeJ.js → Analytic-BQGW_-c3.js} +13 -13
- package/dist/{App-CqE8tmm5.js → App-BYOr_3in.js} +7 -7
- package/dist/{AuditLogs-N6PJ7zmZ.js → AuditLogs-B_T5_CiH.js} +9 -9
- package/dist/{Bin-CH0XJZhw.js → Bin-C1xrtDE0.js} +8 -8
- package/dist/{Broadcast-BDQ22JfE.js → Broadcast-GxpCUcrZ.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-7LjzxM8q.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DUnMhv4S.js} +7 -7
- package/dist/{Card-CzEPaCa3.js → Card-0oDoiIRu.js} +18 -18
- package/dist/{Collections-Dg6YTOHB.js → Collections-rYjZyG69.js} +6 -6
- package/dist/{Credit-6_sZp_Zw.js → Credit-DsH1Bc3y.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CC9UAteP.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-B7eMDETW.js} +202 -193
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Nzn5Hyxa.js → EffectSheet.vue_vue_type_style_index_0_lang--iiw8XH6.js} +7 -7
- package/dist/{Experience-CMLOrZkY.js → Experience-DlX6PfWR.js} +8 -8
- package/dist/{Game-DJseO_du.js → Game-D0QqnZ2e.js} +9 -9
- package/dist/{Grab-micp3m5W.js → Grab-6F-Z0_F6.js} +8 -8
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BiCXHRaH.js → ImageInput.vue_vue_type_script_setup_true_lang-DZHaJART.js} +1 -1
- package/dist/{Index-DLpDi_cy.js → Index-xZ25tvPZ.js} +10 -10
- package/dist/{Marketing-DqJO7WgB.js → Marketing-Chdt0nui.js} +7 -7
- package/dist/{Member-aW1AkGtG.js → Member-CNE_CmUr.js} +11 -11
- package/dist/{MemberList-CSEXOjId.js → MemberList-DyIkeWwP.js} +25 -25
- package/dist/{MemberTransactions-6ex8Ib2y.js → MemberTransactions-SYjVSwvU.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CpF8IiNa.js → MessageInput.vue_vue_type_script_setup_true_lang-CCkSlsWQ.js} +8 -8
- package/dist/{Mission-B8ljYU3c.js → Mission-CgWBJtr6.js} +9 -9
- package/dist/{Overview-qb9NE2q5.js → Overview-BtsOQR97.js} +19 -19
- package/dist/{Point-Cm1cT5hm.js → Point-BJoB6lGN.js} +8 -8
- package/dist/{Promotion-Cs2ctN6u.js → Promotion-Bspz7mj9.js} +9 -9
- package/dist/{Queue-BT0uPunD.js → Queue-DFPvtMwZ.js} +10 -10
- package/dist/{Record-DDdJneoU.js → Record-DmJXlqg1.js} +8 -8
- package/dist/{Reward-n_n4NfyX.js → Reward-CS2dRJRI.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Dr6UhxJP.js → RewardGroup.vue_vue_type_script_setup_true_lang-IlNqykKZ.js} +12 -12
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CbispEAQ.js → RuleGroup.vue_vue_type_script_setup_true_lang-BDFJqGHC.js} +15 -15
- package/dist/{Segment-N1gQ8qm8.js → Segment-C0u4NNJx.js} +23 -23
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Dy1Mb5IT.js → SelectItems.vue_vue_type_script_setup_true_lang-C4i9ZzGe.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B2HDsU1M.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-AP5kVvEF.js} +13 -13
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cbb2bUx4.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BKZKWxKi.js} +3 -3
- package/dist/{Setting-DtrEdA8n.js → Setting-BefPl5s7.js} +14 -14
- package/dist/{SettingAdvertisements-BsaUI4ee.js → SettingAdvertisements-DGNSNlfS.js} +12 -12
- package/dist/{Store-7K4dCqLz.js → Store-Ci8NoL5C.js} +613 -608
- package/dist/StoreRewards-DYmb7TZc.js +535 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-gQAVfOaO.js → StoreTransactions.vue_vue_type_script_setup_true_lang-C2oHSA6v.js} +20 -20
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BKtZYIXq.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DgQwfKcF.js} +1 -1
- package/dist/{Tier-BrBKiJVi.js → Tier-4boFdwfx.js} +23 -23
- package/dist/{Title-D0JZ5a1W.js → Title-Cgh40Avw.js} +21 -21
- package/dist/{Transaction-1Ezo434J.js → Transaction-Z2U5elSk.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DXtCFYQD.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B5-J1FET.js} +6 -6
- package/dist/{Voucher-BUpNoMai.js → Voucher-W8Oxnzpv.js} +12 -12
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-B89f69_4.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CHYLFObC.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CP9MxTZp.js → ZodTextField.vue_vue_type_script_setup_true_lang-B61Mje_C.js} +2 -2
- package/dist/{app-n25mH1jh.js → app-BU48DR8E.js} +33 -33
- package/dist/{app-H4ENNOaz.js → app-CrFBlZQC.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-EBXezo6J.js → business-BXXPV_BJ.js} +1 -1
- package/dist/{campaign-DesdjAY6.js → campaign-CFNs4abH.js} +8 -8
- package/dist/{campaign-BN0i6iJO.js → campaign-Dan0mmow.js} +1 -1
- package/dist/{campaign.enum-qxS2fQk7.js → campaign.enum-C2FJOSn5.js} +1 -1
- package/dist/{campaign.fn-I2uFvg7P.js → campaign.fn-_QD-klUZ.js} +140 -140
- package/dist/{collectible.enum-Baqpjq8J.js → collectible.enum-ef49SjA4.js} +1 -1
- package/dist/{collection.fn-BdQIdCAt.js → collection.fn-BLlJd7Mr.js} +2 -2
- package/dist/{dto-Br-8HD59.js → dto-BJeHlJPS.js} +4 -4
- package/dist/{effect-DyFXnYmQ.js → effect-D5J5xLJX.js} +1 -1
- package/dist/{email-addresses-MSrP4LTD.js → email-addresses-CgCtARgI.js} +1 -1
- package/dist/{export-BY865yv2.js → export-Zzk4jiBl.js} +3 -3
- package/dist/{helper-HqVx57H2.js → helper-BLELjodn.js} +22 -7
- package/dist/{index-D-iMf42_.js → index-7_8Sujrx.js} +3 -3
- package/dist/{index-bv1tZyOP.js → index-BGHhNcXH.js} +1 -1
- package/dist/{index-CzgqyTL1.js → index-BS1mIYfK.js} +1 -1
- package/dist/{index-D7PO0UKQ.js → index-BqvUAoPO.js} +1 -1
- package/dist/{index-BrnFRS32.js → index-C-YRCQZ4.js} +1 -1
- package/dist/{index---uN-pH0.js → index-CJHTigmz.js} +1022 -1022
- package/dist/{index-ztHZzIr9.js → index-CvmXvyLj.js} +1 -1
- package/dist/{index-DC2GrowN.js → index-DITIOfs4.js} +1 -1
- package/dist/{index-BLJr7LtA.js → index-DZanCQd8.js} +3 -3
- package/dist/{index-cMmTqITC.js → index-DemX8i2v.js} +6 -6
- package/dist/{index-BfMLNFI8.js → index-Dgnwhbhv.js} +528 -519
- package/dist/{index-C8k1aJKs.js → index-OZj06Ttw.js} +558 -555
- package/dist/{index-BWpdwY5c.js → index-_uDo6MR6.js} +1 -1
- package/dist/{index.esm2017-BwT_KNxm.js → index.esm2017-CT9d1NRD.js} +1 -1
- package/dist/{loading-8oJ7H0gh.js → loading-up7stUln.js} +1 -1
- package/dist/{membership-Ba0jBtyb.js → membership-BbEmnTSf.js} +3 -3
- package/dist/{money-z1PZr-eS.js → money-DVfpKSC6.js} +1 -1
- package/dist/{number-DzTfLPeS.js → number-BAwtHKVN.js} +1 -1
- package/dist/{objectid-BR4MDrG1.js → objectid-D72PsUrT.js} +4 -4
- package/dist/{plugins-B2ZWqCHm.js → plugins-C7_WZRNH.js} +3 -3
- package/dist/{reward-Bked_Y9c.js → reward-XSRjQepF.js} +1 -1
- package/dist/{rule-BhElycg_.js → rule-CRsnYcDX.js} +3 -3
- package/dist/{rule-builder-xM8Eeaql.js → rule-builder-BO6eO4WG.js} +1 -1
- package/dist/{template-DXtQ1Ded.js → template-Dml8mXUA.js} +5 -5
- package/dist/{timezone-CfHsyzQT.js → timezone-CBvYuUvv.js} +1 -1
- package/dist/{trigger-DMMWDpq3.js → trigger-CNN8uWUi.js} +5 -5
- package/dist/user-DYhRGvv5.js +55 -0
- package/dist/{vue-i18n-Ckgo63dC.js → vue-i18n-Bq3nuxaj.js} +157 -157
- package/dist/{xlsx-BNwJhY08.js → xlsx-DNBXAk5t.js} +1 -1
- package/dist/{zod-DsT4pGmM.js → zod-BSmgtLPD.js} +1 -1
- package/package.json +1 -1
- package/dist/StoreRewards-CJN8n2d1.js +0 -423
- package/dist/user-CKJkW0xd.js +0 -54
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { defineComponent as te, computed as L, resolveComponent as _, openBlock as h, createBlock as M, withCtx as N, createElementVNode as V, createElementBlock as D, createVNode as r, createCommentVNode as
|
|
1
|
+
import { defineComponent as te, computed as L, resolveComponent as _, openBlock as h, createBlock as M, withCtx as N, createElementVNode as V, createElementBlock as D, createVNode as r, createCommentVNode as E, toDisplayString as K, unref as e, Fragment as Y, renderList as ue, ref as I, isRef as se, reactive as Ye, onMounted as ve, watch as Pe, toRaw as ze, createTextVNode as ce, h as Je } from "vue";
|
|
2
2
|
import { _ as Ge } from "./tier-BJDhpH6X.js";
|
|
3
3
|
import { useDialog as Ee, useDialogChild as je, components as Xe } from "@feedmepos/ui-library";
|
|
4
|
-
import { c as
|
|
5
|
-
import { u as Le } from "./loading-
|
|
6
|
-
import { u as
|
|
7
|
-
import { m as Qe, n as et, o as tt, p as Ae, q as nt } from "./index-
|
|
4
|
+
import { c as A, e as Ce, S as Ze } from "./index-DZanCQd8.js";
|
|
5
|
+
import { u as Le } from "./loading-up7stUln.js";
|
|
6
|
+
import { u as Te, C as pe } from "./membership-BbEmnTSf.js";
|
|
7
|
+
import { m as Qe, n as et, o as tt, p as Ae, q as nt } from "./index-Dgnwhbhv.js";
|
|
8
8
|
import { a as ot, c as Fe } from "./object-qECH92oz.js";
|
|
9
9
|
import { _ as ae } from "./lodash-B5I3zXaY.js";
|
|
10
|
-
import { c as de } from "./index
|
|
11
|
-
import { u as he } from "./vue-i18n-
|
|
12
|
-
import { Z as Q, g as G, a as X } from "./zod-
|
|
13
|
-
import { z as ee, R as at } from "./app-
|
|
10
|
+
import { c as de } from "./index-CJHTigmz.js";
|
|
11
|
+
import { u as he } from "./vue-i18n-Bq3nuxaj.js";
|
|
12
|
+
import { Z as Q, g as G, a as X } from "./zod-BSmgtLPD.js";
|
|
13
|
+
import { z as ee, R as at } from "./app-BU48DR8E.js";
|
|
14
14
|
import { u as Se } from "./app-wDQR6dpb.js";
|
|
15
|
-
import { _ as le } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
import { a as lt, p as ye, n as st, f as Ve } from "./plugins-
|
|
17
|
-
import { J as
|
|
18
|
-
import { _ as rt } from "./index-
|
|
19
|
-
import { _ as it } from "./ImageInput.vue_vue_type_script_setup_true_lang-
|
|
15
|
+
import { _ as le } from "./ZodTextField.vue_vue_type_script_setup_true_lang-B61Mje_C.js";
|
|
16
|
+
import { a as lt, p as ye, n as st, f as Ve } from "./plugins-C7_WZRNH.js";
|
|
17
|
+
import { J as ke } from "./JsonViewer-v8_C7l5N.js";
|
|
18
|
+
import { _ as rt } from "./index-OZj06Ttw.js";
|
|
19
|
+
import { _ as it } from "./ImageInput.vue_vue_type_script_setup_true_lang-DZHaJART.js";
|
|
20
20
|
import { _ as dt } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
21
|
-
import { z as ut, a as ct } from "./money-
|
|
22
|
-
import { F as mt } from "./number-
|
|
23
|
-
import {
|
|
24
|
-
import "./index-
|
|
25
|
-
import "./index-
|
|
26
|
-
import "./index-
|
|
27
|
-
import "./index-
|
|
28
|
-
import { m as
|
|
29
|
-
import { m as be } from "./index-
|
|
30
|
-
import { useRouter as
|
|
21
|
+
import { z as ut, a as ct } from "./money-DVfpKSC6.js";
|
|
22
|
+
import { F as mt } from "./number-BAwtHKVN.js";
|
|
23
|
+
import { a as pt, t as ft } from "./helper-BLELjodn.js";
|
|
24
|
+
import "./index-_uDo6MR6.js";
|
|
25
|
+
import "./index-DemX8i2v.js";
|
|
26
|
+
import "./index-CvmXvyLj.js";
|
|
27
|
+
import "./index-7_8Sujrx.js";
|
|
28
|
+
import { m as yt } from "./index-DITIOfs4.js";
|
|
29
|
+
import { m as be } from "./index-BGHhNcXH.js";
|
|
30
|
+
import { useRouter as bt } from "vue-router";
|
|
31
31
|
function Ke(x) {
|
|
32
32
|
return de.DineroFactory(x).toUnit();
|
|
33
33
|
}
|
|
34
|
-
function He(x, S, a,
|
|
34
|
+
function He(x, S, a, g, s = [], v = []) {
|
|
35
35
|
const o = rt.compact(
|
|
36
|
-
S.map((t) => x.find((
|
|
37
|
-
),
|
|
38
|
-
(t,
|
|
39
|
-
var
|
|
36
|
+
S.map((t) => x.find((u) => u.systemCode === t.systemCode && u.taxCode === t.taxCode)).filter((t) => !!t && v.includes(t.systemCode))
|
|
37
|
+
), c = o.reduce(
|
|
38
|
+
(t, u) => {
|
|
39
|
+
var f;
|
|
40
40
|
return Object.assign(t, {
|
|
41
|
-
[
|
|
42
|
-
inclusive: ((
|
|
41
|
+
[u.taxCode]: {
|
|
42
|
+
inclusive: ((f = s.find((d) => d.systemCode === u.systemCode)) == null ? void 0 : f.inclusive) || !1,
|
|
43
43
|
adjustment: {
|
|
44
44
|
level: 1,
|
|
45
45
|
type: {
|
|
46
46
|
type: "BY_MULTIPLIER",
|
|
47
47
|
amount: {
|
|
48
|
-
amount:
|
|
49
|
-
precision:
|
|
48
|
+
amount: u.rate.amount,
|
|
49
|
+
precision: u.rate.precision,
|
|
50
50
|
currency: "MYR"
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -64,11 +64,11 @@ function He(x, S, a, b, s = [], g = []) {
|
|
|
64
64
|
level: 0,
|
|
65
65
|
type: {
|
|
66
66
|
type: "BY_AMOUNT",
|
|
67
|
-
amount: de.DineroFactory(a).subtract(de.Dinero.fromNumber({ number:
|
|
67
|
+
amount: de.DineroFactory(a).subtract(de.Dinero.fromNumber({ number: g }).toObject()).toObject()
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
|
-
taxes:
|
|
71
|
+
taxes: c
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
adjustments: {},
|
|
@@ -86,86 +86,86 @@ function He(x, S, a, b, s = [], g = []) {
|
|
|
86
86
|
}));
|
|
87
87
|
}
|
|
88
88
|
function qe(x, S, a) {
|
|
89
|
-
return x ? x.reduce((
|
|
90
|
-
var
|
|
91
|
-
return (
|
|
89
|
+
return x ? x.reduce((g, s) => {
|
|
90
|
+
var v;
|
|
91
|
+
return (v = a.find((o) => o.systemCode === s.systemCode)) != null && v.inclusive || (g = de.DineroFactory(g.toObject()).add(s.total)), g;
|
|
92
92
|
}, de.DineroFactory(S)).toObject() : de.DineroFactory(S).toObject();
|
|
93
93
|
}
|
|
94
|
-
const
|
|
94
|
+
const gt = { class: "relative h-[120px] aspect-video flex items-center justify-center border rounded-md border-fm-color-neutral-gray-300" }, vt = ["src"], ht = {
|
|
95
95
|
key: 2,
|
|
96
96
|
class: "absolute top-2 left-2"
|
|
97
|
-
},
|
|
97
|
+
}, xt = { class: "absolute top-0 right-0" }, Ct = { class: "fm-typo-en-body-lg-600" }, _t = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, St = { class: "flex gap-8 items-center flex-wrap" }, Ft = /* @__PURE__ */ te({
|
|
98
98
|
__name: "StoreBundleCard",
|
|
99
99
|
props: {
|
|
100
100
|
bundle: { type: Object, required: !0 }
|
|
101
101
|
},
|
|
102
102
|
emits: ["edit", "delete", "send"],
|
|
103
103
|
setup(x, { emit: S }) {
|
|
104
|
-
const a = x,
|
|
104
|
+
const a = x, g = S, s = L(() => {
|
|
105
105
|
const o = [];
|
|
106
106
|
return a.bundle.price.amount > 0 && o.push(
|
|
107
|
-
`${
|
|
107
|
+
`${A.Config.getCountry().currency.symbol}${Ke(a.bundle.price)}`
|
|
108
108
|
), a.bundle.coinPrice && o.push(`${a.bundle.coinPrice} point(s)`), o.join(" or ");
|
|
109
|
-
}),
|
|
110
|
-
var
|
|
109
|
+
}), v = L(() => {
|
|
110
|
+
var c, i;
|
|
111
111
|
const o = [];
|
|
112
|
-
if (a.bundle.titles.length > 0 && o.push(`${a.bundle.titles.length} title(s)`), a.bundle.vouchers.length > 0 && o.push(`${a.bundle.vouchers.length} voucher(s)`), a.bundle.credit.normal || (
|
|
112
|
+
if (a.bundle.titles.length > 0 && o.push(`${a.bundle.titles.length} title(s)`), a.bundle.vouchers.length > 0 && o.push(`${a.bundle.vouchers.length} voucher(s)`), a.bundle.credit.normal || (c = a.bundle.credit.free) != null && c.amount) {
|
|
113
113
|
const t = a.bundle.credit.normal + (((i = a.bundle.credit.free) == null ? void 0 : i.amount) ?? 0);
|
|
114
114
|
o.push(`${t} credit(s)`);
|
|
115
115
|
}
|
|
116
116
|
return o;
|
|
117
117
|
});
|
|
118
|
-
return (o,
|
|
119
|
-
const i = _("FmIcon"), t = _("FmChip"),
|
|
120
|
-
return h(), M(
|
|
118
|
+
return (o, c) => {
|
|
119
|
+
const i = _("FmIcon"), t = _("FmChip"), u = _("FmButton"), f = _("FmMenuItem"), d = _("FmMenu"), T = _("FmCard");
|
|
120
|
+
return h(), M(T, {
|
|
121
121
|
variant: "outlined",
|
|
122
122
|
class: "flex flex-col gap-y-8 p-16 min-h-[240px] h-full text-center items-center"
|
|
123
123
|
}, {
|
|
124
124
|
default: N(() => [
|
|
125
|
-
V("div",
|
|
125
|
+
V("div", gt, [
|
|
126
126
|
x.bundle.image ? (h(), D("img", {
|
|
127
127
|
key: 1,
|
|
128
128
|
src: x.bundle.image,
|
|
129
129
|
class: "w-full h-full object-contain aspect-video"
|
|
130
|
-
}, null, 8,
|
|
130
|
+
}, null, 8, vt)) : (h(), M(i, {
|
|
131
131
|
key: 0,
|
|
132
132
|
name: "image",
|
|
133
133
|
outline: !0,
|
|
134
134
|
size: "md",
|
|
135
135
|
class: "text-fm-color-neutral-gray-200"
|
|
136
136
|
})),
|
|
137
|
-
x.bundle.isFeedvibe ? (h(), D("div",
|
|
137
|
+
x.bundle.isFeedvibe ? (h(), D("div", ht, [
|
|
138
138
|
r(t, {
|
|
139
139
|
label: "Feedvibe",
|
|
140
140
|
class: "text-fm-color-primary bg-fm-color-system-warning-100",
|
|
141
141
|
compact: ""
|
|
142
142
|
})
|
|
143
|
-
])) :
|
|
144
|
-
V("div",
|
|
145
|
-
r(
|
|
143
|
+
])) : E("", !0),
|
|
144
|
+
V("div", xt, [
|
|
145
|
+
r(d, { placement: "bottom-end" }, {
|
|
146
146
|
"menu-button": N(() => [
|
|
147
|
-
r(
|
|
147
|
+
r(u, {
|
|
148
148
|
icon: "more_vert",
|
|
149
149
|
variant: "tertiary"
|
|
150
150
|
})
|
|
151
151
|
]),
|
|
152
152
|
default: N(() => [
|
|
153
|
-
r(
|
|
154
|
-
onClick:
|
|
153
|
+
r(f, {
|
|
154
|
+
onClick: c[0] || (c[0] = (l) => g("edit", x.bundle)),
|
|
155
155
|
icon: "edit",
|
|
156
156
|
label: "Edit"
|
|
157
157
|
}),
|
|
158
|
-
x.bundle.stripePriceId ?
|
|
158
|
+
x.bundle.stripePriceId ? E("", !0) : (h(), M(f, {
|
|
159
159
|
key: 0,
|
|
160
|
-
onClick:
|
|
160
|
+
onClick: c[1] || (c[1] = (l) => g("send", x.bundle)),
|
|
161
161
|
icon: "send",
|
|
162
162
|
label: "Send"
|
|
163
163
|
})),
|
|
164
|
-
r(
|
|
165
|
-
onClick:
|
|
164
|
+
r(f, {
|
|
165
|
+
onClick: c[2] || (c[2] = (l) => g("delete", x.bundle)),
|
|
166
166
|
icon: "delete"
|
|
167
167
|
}, {
|
|
168
|
-
label: N(() => [...
|
|
168
|
+
label: N(() => [...c[3] || (c[3] = [
|
|
169
169
|
V("div", { class: "text-fm-color-typo-error fm-typo-en-body-md-400" }, " Delete ", -1)
|
|
170
170
|
])]),
|
|
171
171
|
_: 1
|
|
@@ -175,11 +175,11 @@ const bt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
175
175
|
})
|
|
176
176
|
])
|
|
177
177
|
]),
|
|
178
|
-
V("div",
|
|
179
|
-
V("div",
|
|
180
|
-
V("div",
|
|
181
|
-
(h(!0), D(Y, null, ue(e(
|
|
182
|
-
key:
|
|
178
|
+
V("div", Ct, K(x.bundle.name), 1),
|
|
179
|
+
V("div", _t, K(e(s) || "Free"), 1),
|
|
180
|
+
V("div", St, [
|
|
181
|
+
(h(!0), D(Y, null, ue(e(v), (l, w) => (h(), M(t, {
|
|
182
|
+
key: w,
|
|
183
183
|
label: l
|
|
184
184
|
}, null, 8, ["label"]))), 128))
|
|
185
185
|
])
|
|
@@ -188,20 +188,20 @@ const bt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
188
188
|
});
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
-
}),
|
|
191
|
+
}), Vt = /* @__PURE__ */ te({
|
|
192
192
|
__name: "AddBundleCard",
|
|
193
193
|
emits: ["create"],
|
|
194
194
|
setup(x, { emit: S }) {
|
|
195
|
-
const { t: a } = he(),
|
|
196
|
-
return (s,
|
|
197
|
-
const o = _("FmButton"),
|
|
198
|
-
return h(), M(
|
|
195
|
+
const { t: a } = he(), g = S;
|
|
196
|
+
return (s, v) => {
|
|
197
|
+
const o = _("FmButton"), c = _("FmCard");
|
|
198
|
+
return h(), M(c, {
|
|
199
199
|
variant: "outlined",
|
|
200
200
|
class: "flex flex-col gap-y-8 p-16 h-full min-h-[240px] items-center justify-center"
|
|
201
201
|
}, {
|
|
202
202
|
default: N(() => [
|
|
203
203
|
r(o, {
|
|
204
|
-
onClick:
|
|
204
|
+
onClick: v[0] || (v[0] = (i) => g("create")),
|
|
205
205
|
label: e(a)("connect.store.actions.addBundle"),
|
|
206
206
|
icon: "add",
|
|
207
207
|
variant: "secondary"
|
|
@@ -211,7 +211,7 @@ const bt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
211
211
|
});
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
|
-
}),
|
|
214
|
+
}), wt = { class: "space-y-16" }, Pt = { class: "flex w-full justify-between pb-16" }, Tt = { class: "flex items-center justify-end gap-8" }, kt = /* @__PURE__ */ te({
|
|
215
215
|
__name: "CategoryDialog",
|
|
216
216
|
props: {
|
|
217
217
|
action: {
|
|
@@ -224,38 +224,38 @@ const bt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
226
|
setup(x) {
|
|
227
|
-
const { t: S } = he(), a = x,
|
|
227
|
+
const { t: S } = he(), a = x, g = Ee(), { emitData: s, emitAction: v } = je(), o = I(a.initialValue), c = ee.string().min(1);
|
|
228
228
|
function i() {
|
|
229
|
-
s(o.value),
|
|
229
|
+
s(o.value), v("primary"), g.close();
|
|
230
230
|
}
|
|
231
231
|
function t() {
|
|
232
|
-
s(null),
|
|
232
|
+
s(null), v("primary"), g.close();
|
|
233
233
|
}
|
|
234
|
-
return (
|
|
235
|
-
const
|
|
236
|
-
return h(), D("div",
|
|
237
|
-
r(
|
|
234
|
+
return (u, f) => {
|
|
235
|
+
const d = _("FmTextField"), T = _("FmButton");
|
|
236
|
+
return h(), D("div", wt, [
|
|
237
|
+
r(d, {
|
|
238
238
|
modelValue: e(o),
|
|
239
|
-
"onUpdate:modelValue":
|
|
239
|
+
"onUpdate:modelValue": f[0] || (f[0] = (l) => se(o) ? o.value = l : null),
|
|
240
240
|
label: e(S)("connect.store.category.label"),
|
|
241
|
-
rules: [e(Q).toRule(e(
|
|
241
|
+
rules: [e(Q).toRule(e(c))]
|
|
242
242
|
}, null, 8, ["modelValue", "label", "rules"]),
|
|
243
|
-
V("div",
|
|
243
|
+
V("div", Pt, [
|
|
244
244
|
V("div", null, [
|
|
245
|
-
x.action == "edit" ? (h(), M(
|
|
245
|
+
x.action == "edit" ? (h(), M(T, {
|
|
246
246
|
key: 0,
|
|
247
247
|
onClick: t,
|
|
248
248
|
label: e(S)("connect.common.delete"),
|
|
249
249
|
variant: "destructive"
|
|
250
|
-
}, null, 8, ["label"])) :
|
|
250
|
+
}, null, 8, ["label"])) : E("", !0)
|
|
251
251
|
]),
|
|
252
|
-
V("div",
|
|
253
|
-
r(
|
|
252
|
+
V("div", Tt, [
|
|
253
|
+
r(T, {
|
|
254
254
|
label: e(S)("connect.common.cancel"),
|
|
255
255
|
variant: "tertiary",
|
|
256
|
-
onClick:
|
|
256
|
+
onClick: f[1] || (f[1] = (l) => e(g).close())
|
|
257
257
|
}, null, 8, ["label"]),
|
|
258
|
-
r(
|
|
258
|
+
r(T, {
|
|
259
259
|
label: x.action == "edit" ? e(S)("connect.common.edit") : e(S)("connect.common.add"),
|
|
260
260
|
disabled: !e(o),
|
|
261
261
|
onClick: i
|
|
@@ -265,38 +265,38 @@ const bt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
265
265
|
]);
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
|
-
}),
|
|
268
|
+
}), $t = { class: "space-y-16" }, Rt = { class: "flex items-center justify-end gap-8 pb-16" }, Ut = /* @__PURE__ */ te({
|
|
269
269
|
__name: "SelectCategoryDialog",
|
|
270
270
|
setup(x) {
|
|
271
|
-
const { emitData: S, emitAction: a } = je(),
|
|
272
|
-
() =>
|
|
271
|
+
const { emitData: S, emitAction: a } = je(), g = Te(), s = I(), v = L(
|
|
272
|
+
() => g.sortedStoreCategories.map((o, c) => ({
|
|
273
273
|
label: o.name,
|
|
274
|
-
value:
|
|
274
|
+
value: c
|
|
275
275
|
}))
|
|
276
276
|
);
|
|
277
|
-
return (o,
|
|
277
|
+
return (o, c) => {
|
|
278
278
|
const i = _("FmSelect"), t = _("FmButton");
|
|
279
|
-
return h(), D("div",
|
|
280
|
-
|
|
279
|
+
return h(), D("div", $t, [
|
|
280
|
+
c[4] || (c[4] = V("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Select a category to create FeedMe CNY 2025 bundle ", -1)),
|
|
281
281
|
r(i, {
|
|
282
282
|
placeholder: "Select a category",
|
|
283
|
-
items: e(
|
|
283
|
+
items: e(v),
|
|
284
284
|
modelValue: e(s),
|
|
285
285
|
"onUpdate:modelValue": [
|
|
286
|
-
|
|
287
|
-
|
|
286
|
+
c[0] || (c[0] = (u) => se(s) ? s.value = u : null),
|
|
287
|
+
c[1] || (c[1] = (u) => e(S)(u))
|
|
288
288
|
],
|
|
289
289
|
label: "Category"
|
|
290
290
|
}, null, 8, ["items", "modelValue"]),
|
|
291
|
-
V("div",
|
|
291
|
+
V("div", Rt, [
|
|
292
292
|
r(t, {
|
|
293
293
|
variant: "tertiary",
|
|
294
294
|
label: "Cancel",
|
|
295
|
-
onClick:
|
|
295
|
+
onClick: c[2] || (c[2] = (u) => e(a)("tertiary"))
|
|
296
296
|
}),
|
|
297
297
|
r(t, {
|
|
298
298
|
label: "Select",
|
|
299
|
-
onClick:
|
|
299
|
+
onClick: c[3] || (c[3] = (u) => e(a)("primary")),
|
|
300
300
|
disabled: e(s) == null
|
|
301
301
|
}, null, 8, ["disabled"])
|
|
302
302
|
])
|
|
@@ -307,7 +307,7 @@ const bt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
307
307
|
function _e(x) {
|
|
308
308
|
return x.states.map((S) => ({ label: S, value: S }));
|
|
309
309
|
}
|
|
310
|
-
const
|
|
310
|
+
const Bt = {
|
|
311
311
|
[Ce.F_COUNTRY.enum.MY]: {
|
|
312
312
|
states: [
|
|
313
313
|
"Johor",
|
|
@@ -461,7 +461,7 @@ const Ut = {
|
|
|
461
461
|
return _e(this);
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
}, fe = () =>
|
|
464
|
+
}, fe = () => A.Config.getCountry(), ge = {
|
|
465
465
|
get fullCurrency() {
|
|
466
466
|
return fe().currency;
|
|
467
467
|
},
|
|
@@ -469,7 +469,7 @@ const Ut = {
|
|
|
469
469
|
return fe().currency.code;
|
|
470
470
|
},
|
|
471
471
|
get fullTax() {
|
|
472
|
-
return
|
|
472
|
+
return A.Country.getCountryFlattenTaxes(fe().code);
|
|
473
473
|
},
|
|
474
474
|
get taxSystem() {
|
|
475
475
|
return fe().taxSystems;
|
|
@@ -481,7 +481,7 @@ const Ut = {
|
|
|
481
481
|
}));
|
|
482
482
|
},
|
|
483
483
|
groupedTaxOptions() {
|
|
484
|
-
const x =
|
|
484
|
+
const x = A.Country.getCountryFlattenTaxes(fe().code);
|
|
485
485
|
return ge.taxSystem.map((S) => ({
|
|
486
486
|
code: S.code,
|
|
487
487
|
options: x.map((a) => ({ ...a, feedmeTaxCode: ge.generateCode(a) })).filter((a) => a.systemCode === S.code)
|
|
@@ -494,7 +494,7 @@ const Ut = {
|
|
|
494
494
|
generateCode(x) {
|
|
495
495
|
return `${x.systemCode}/${x.taxCode}`;
|
|
496
496
|
}
|
|
497
|
-
}, W = ge,
|
|
497
|
+
}, W = ge, Nt = /* @__PURE__ */ te({
|
|
498
498
|
__name: "TaxInclusiveSetting",
|
|
499
499
|
props: {
|
|
500
500
|
modelValue: {
|
|
@@ -505,53 +505,53 @@ const Ut = {
|
|
|
505
505
|
},
|
|
506
506
|
emits: ["update:model-value"],
|
|
507
507
|
setup(x, { emit: S }) {
|
|
508
|
-
const a = x,
|
|
509
|
-
function o(
|
|
510
|
-
const
|
|
511
|
-
|
|
512
|
-
systemCode:
|
|
513
|
-
inclusive:
|
|
514
|
-
}),
|
|
508
|
+
const a = x, g = W.taxSystem, s = S, v = I(a.modelValue);
|
|
509
|
+
function o(u, f) {
|
|
510
|
+
const d = ae.clone(a.modelValue), T = d.findIndex((l) => l.systemCode === u);
|
|
511
|
+
T >= 0 ? d[T].inclusive = f : d.push({
|
|
512
|
+
systemCode: u,
|
|
513
|
+
inclusive: f
|
|
514
|
+
}), v.value = d, s("update:model-value", d);
|
|
515
515
|
}
|
|
516
|
-
function
|
|
517
|
-
return
|
|
518
|
-
const
|
|
516
|
+
function c() {
|
|
517
|
+
return g.map((u) => {
|
|
518
|
+
const f = a.modelValue ? a.modelValue.find((d) => d.systemCode === u.code) : !1;
|
|
519
519
|
return {
|
|
520
|
-
label:
|
|
520
|
+
label: u.name,
|
|
521
521
|
config: {
|
|
522
|
-
value:
|
|
522
|
+
value: f ? f.inclusive : !1
|
|
523
523
|
},
|
|
524
|
-
input: (
|
|
525
|
-
o(
|
|
524
|
+
input: (d) => {
|
|
525
|
+
o(u.code, d);
|
|
526
526
|
}
|
|
527
527
|
};
|
|
528
528
|
});
|
|
529
529
|
}
|
|
530
|
-
const i = Ye(
|
|
531
|
-
function t(
|
|
532
|
-
return `${
|
|
530
|
+
const i = Ye(c());
|
|
531
|
+
function t(u, f) {
|
|
532
|
+
return `${u} ${f ? "Inclusive" : "Exclusive"}`;
|
|
533
533
|
}
|
|
534
534
|
return ve(() => {
|
|
535
|
-
a.modelValue.length || o(
|
|
535
|
+
a.modelValue.length || o(g[0].code, !1);
|
|
536
536
|
}), Pe(
|
|
537
537
|
() => a.modelValue,
|
|
538
|
-
(
|
|
539
|
-
|
|
538
|
+
(u, f) => {
|
|
539
|
+
u != f && !u.length && o(g[0].code, !1);
|
|
540
540
|
}
|
|
541
|
-
), (
|
|
542
|
-
const
|
|
543
|
-
return h(!0), D(Y, null, ue(e(i), (
|
|
544
|
-
var
|
|
541
|
+
), (u, f) => {
|
|
542
|
+
const d = _("FmSwitch");
|
|
543
|
+
return h(!0), D(Y, null, ue(e(i), (T, l) => {
|
|
544
|
+
var w;
|
|
545
545
|
return h(), D("div", { key: l }, [
|
|
546
|
-
r(
|
|
547
|
-
"model-value": ((
|
|
546
|
+
r(d, {
|
|
547
|
+
"model-value": ((w = e(v)[l]) == null ? void 0 : w.inclusive) || !1,
|
|
548
548
|
"label-placement": "left",
|
|
549
|
-
"onUpdate:modelValue": ($) =>
|
|
549
|
+
"onUpdate:modelValue": ($) => T.input($)
|
|
550
550
|
}, {
|
|
551
551
|
label: N(() => {
|
|
552
552
|
var $;
|
|
553
553
|
return [
|
|
554
|
-
V("div", null, K(t(
|
|
554
|
+
V("div", null, K(t(T.label, (($ = e(v)[l]) == null ? void 0 : $.inclusive) || !1)), 1)
|
|
555
555
|
];
|
|
556
556
|
}),
|
|
557
557
|
_: 2
|
|
@@ -561,83 +561,83 @@ const Ut = {
|
|
|
561
561
|
};
|
|
562
562
|
}
|
|
563
563
|
});
|
|
564
|
-
var
|
|
565
|
-
const
|
|
564
|
+
var It = { mode: "development", appMode: "mf" };
|
|
565
|
+
const Dt = { class: "space-y-8" }, Mt = {
|
|
566
566
|
key: 0,
|
|
567
567
|
class: "space-y-16"
|
|
568
|
-
},
|
|
568
|
+
}, Ot = /* @__PURE__ */ te({
|
|
569
569
|
__name: "StripeSetting",
|
|
570
570
|
props: {
|
|
571
571
|
modelValue: {}
|
|
572
572
|
},
|
|
573
573
|
emits: ["update:modelValue"],
|
|
574
574
|
setup(x, { emit: S }) {
|
|
575
|
-
const a = x,
|
|
576
|
-
Pe(s, (o,
|
|
577
|
-
|
|
575
|
+
const a = x, g = S, s = I(!1);
|
|
576
|
+
Pe(s, (o, c) => {
|
|
577
|
+
c != o && (!a.modelValue && o ? g("update:modelValue", {
|
|
578
578
|
apiKey: "",
|
|
579
579
|
webhookSecret: ""
|
|
580
|
-
}) : o ||
|
|
580
|
+
}) : o || g("update:modelValue", void 0));
|
|
581
581
|
});
|
|
582
|
-
const
|
|
583
|
-
const o =
|
|
582
|
+
const v = L(() => {
|
|
583
|
+
const o = It.mode === "development", c = A.Config.getCountry().code.toLowerCase(), i = c != "my" ? `.${c}` : "";
|
|
584
584
|
return `https://marketing${o ? "-dev" : ""}${i}.feedmeapi.com/stripe/${Ze.getBusinessId()}/webhook`;
|
|
585
585
|
});
|
|
586
586
|
return ve(() => {
|
|
587
587
|
s.value = !!a.modelValue;
|
|
588
|
-
}), (o,
|
|
589
|
-
const i = _("FmSwitch"), t = _("FmTextField"),
|
|
590
|
-
return h(), D("div",
|
|
588
|
+
}), (o, c) => {
|
|
589
|
+
const i = _("FmSwitch"), t = _("FmTextField"), u = _("FmButton");
|
|
590
|
+
return h(), D("div", Dt, [
|
|
591
591
|
r(i, {
|
|
592
592
|
modelValue: e(s),
|
|
593
|
-
"onUpdate:modelValue":
|
|
593
|
+
"onUpdate:modelValue": c[0] || (c[0] = (f) => se(s) ? s.value = f : null),
|
|
594
594
|
value: "true",
|
|
595
595
|
label: "Enable Stripe"
|
|
596
596
|
}, null, 8, ["modelValue"]),
|
|
597
|
-
a.modelValue ? (h(), D("div",
|
|
597
|
+
a.modelValue ? (h(), D("div", Mt, [
|
|
598
598
|
r(t, {
|
|
599
599
|
label: "API Key",
|
|
600
600
|
modelValue: a.modelValue.apiKey,
|
|
601
|
-
"onUpdate:modelValue":
|
|
601
|
+
"onUpdate:modelValue": c[1] || (c[1] = (f) => a.modelValue.apiKey = f),
|
|
602
602
|
"helper-text": "Go to Stripe Dashboard get your API Key and paste here."
|
|
603
603
|
}, null, 8, ["modelValue"]),
|
|
604
604
|
r(t, {
|
|
605
605
|
label: "Webhook URL",
|
|
606
|
-
"model-value": e(
|
|
606
|
+
"model-value": e(v),
|
|
607
607
|
readonly: "",
|
|
608
608
|
"helper-text": "Copy this URL to your Stripe dashboard"
|
|
609
609
|
}, {
|
|
610
610
|
append: N(() => [
|
|
611
|
-
r(
|
|
611
|
+
r(u, {
|
|
612
612
|
icon: "content_copy",
|
|
613
613
|
variant: "tertiary",
|
|
614
|
-
onClick:
|
|
614
|
+
onClick: c[2] || (c[2] = (f) => e(lt)(e(v)))
|
|
615
615
|
})
|
|
616
616
|
]),
|
|
617
617
|
_: 1
|
|
618
618
|
}, 8, ["model-value"]),
|
|
619
619
|
r(t, {
|
|
620
620
|
modelValue: a.modelValue.webhookSecret,
|
|
621
|
-
"onUpdate:modelValue":
|
|
621
|
+
"onUpdate:modelValue": c[3] || (c[3] = (f) => a.modelValue.webhookSecret = f),
|
|
622
622
|
label: "Webhook Secret",
|
|
623
623
|
"helper-text": `Copy the webhook signing secret from your Stripe account and paste
|
|
624
624
|
here.`
|
|
625
625
|
}, null, 8, ["modelValue"])
|
|
626
|
-
])) :
|
|
626
|
+
])) : E("", !0)
|
|
627
627
|
]);
|
|
628
628
|
};
|
|
629
629
|
}
|
|
630
|
-
}),
|
|
630
|
+
}), At = {
|
|
631
631
|
key: 0,
|
|
632
632
|
class: "space-y-16 pr-12"
|
|
633
|
-
},
|
|
633
|
+
}, Et = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, jt = {
|
|
634
634
|
key: 1,
|
|
635
635
|
class: "space-y-16"
|
|
636
|
-
},
|
|
636
|
+
}, Lt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Kt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Ht = { class: "grid grid-cols-2 gap-x-16 gap-y-16" }, qt = { class: "space-y-4" }, Wt = { class: "fm-typo-en-body-lg-400" }, Yt = { class: "space-y-16" }, zt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Jt = { class: "flex items-center gap-8" }, Gt = /* @__PURE__ */ te({
|
|
637
637
|
__name: "StoreSettingSheet",
|
|
638
638
|
emits: ["update"],
|
|
639
639
|
setup(x, { expose: S, emit: a }) {
|
|
640
|
-
const { t:
|
|
640
|
+
const { t: g } = he(), s = a, v = I(!1), o = I(), c = I(!1), i = Qe.extend({
|
|
641
641
|
company: et.extend({
|
|
642
642
|
name: ee.string().min(1, "Company name is required"),
|
|
643
643
|
regNo: ee.string().min(1, "Registration number is required"),
|
|
@@ -653,11 +653,11 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
653
653
|
sstRegNo: ee.string().optional()
|
|
654
654
|
})
|
|
655
655
|
}), t = L(() => i.safeParse(o.value).success);
|
|
656
|
-
function
|
|
657
|
-
const
|
|
658
|
-
|
|
656
|
+
function u() {
|
|
657
|
+
const T = i.safeParse(o.value);
|
|
658
|
+
T.success && s("update", T.data);
|
|
659
659
|
}
|
|
660
|
-
function
|
|
660
|
+
function f() {
|
|
661
661
|
return {
|
|
662
662
|
company: {
|
|
663
663
|
name: "",
|
|
@@ -667,7 +667,7 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
667
667
|
city: "",
|
|
668
668
|
postcode: "",
|
|
669
669
|
state: "",
|
|
670
|
-
country:
|
|
670
|
+
country: A.Config.getCountry().name
|
|
671
671
|
},
|
|
672
672
|
phoneNo: "",
|
|
673
673
|
regNo: "",
|
|
@@ -676,31 +676,31 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
676
676
|
inclusiveTaxes: []
|
|
677
677
|
};
|
|
678
678
|
}
|
|
679
|
-
function
|
|
680
|
-
|
|
679
|
+
function d(T, l) {
|
|
680
|
+
v.value = T, T && (o.value = l != null && l.company ? ae.cloneDeep(l) : f());
|
|
681
681
|
}
|
|
682
682
|
return S({
|
|
683
|
-
showSheet:
|
|
683
|
+
showSheet: d,
|
|
684
684
|
data: o
|
|
685
|
-
}), (
|
|
686
|
-
const
|
|
685
|
+
}), (T, l) => {
|
|
686
|
+
const w = _("FmIcon"), $ = _("FmMenuItem"), j = _("FmMenu"), ne = _("FmSelect"), Z = _("FmButton"), H = _("FmSideSheet");
|
|
687
687
|
return h(), M(H, {
|
|
688
688
|
"max-width": 560,
|
|
689
|
-
modelValue: e(
|
|
690
|
-
"onUpdate:modelValue": l[15] || (l[15] = (z) => se(
|
|
691
|
-
header: e(
|
|
689
|
+
modelValue: e(v),
|
|
690
|
+
"onUpdate:modelValue": l[15] || (l[15] = (z) => se(v) ? v.value = z : null),
|
|
691
|
+
header: e(g)("connect.store.setting.title")
|
|
692
692
|
}, {
|
|
693
693
|
"side-sheet-footer": N(() => [
|
|
694
|
-
V("div",
|
|
694
|
+
V("div", Jt, [
|
|
695
695
|
r(Z, {
|
|
696
|
-
label: e(
|
|
697
|
-
onClick:
|
|
696
|
+
label: e(g)("connect.common.save"),
|
|
697
|
+
onClick: u,
|
|
698
698
|
disabled: !e(t) || e(Se)().isLoading,
|
|
699
699
|
loading: e(Se)().isLoading
|
|
700
700
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
701
701
|
r(Z, {
|
|
702
|
-
label: e(
|
|
703
|
-
onClick: l[14] || (l[14] = (z) =>
|
|
702
|
+
label: e(g)("connect.common.cancel"),
|
|
703
|
+
onClick: l[14] || (l[14] = (z) => d(!1)),
|
|
704
704
|
variant: "tertiary"
|
|
705
705
|
}, null, 8, ["label"])
|
|
706
706
|
])
|
|
@@ -708,103 +708,103 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
708
708
|
default: N(() => {
|
|
709
709
|
var z, oe;
|
|
710
710
|
return [
|
|
711
|
-
r(
|
|
712
|
-
e(o) && e(o).company ? (h(), D("div",
|
|
713
|
-
V("div",
|
|
711
|
+
r(ke, { json: e(o) }, null, 8, ["json"]),
|
|
712
|
+
e(o) && e(o).company ? (h(), D("div", At, [
|
|
713
|
+
V("div", Et, K(e(g)("connect.store.setting.company.legal_info")), 1),
|
|
714
714
|
r(le, {
|
|
715
715
|
modelValue: e(o).company.name,
|
|
716
716
|
"onUpdate:modelValue": l[0] || (l[0] = (F) => e(o).company.name = F),
|
|
717
|
-
label: e(
|
|
717
|
+
label: e(g)("connect.store.setting.company.name"),
|
|
718
718
|
schema: e(Q).typeAtPath(e(i), "company.name")
|
|
719
719
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
720
720
|
r(le, {
|
|
721
721
|
modelValue: e(o).company.regNo,
|
|
722
722
|
"onUpdate:modelValue": l[1] || (l[1] = (F) => e(o).company.regNo = F),
|
|
723
|
-
label: e(
|
|
723
|
+
label: e(g)("connect.store.setting.company.reg_no"),
|
|
724
724
|
schema: e(Q).typeAtPath(e(i), "company.regNo")
|
|
725
725
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
726
|
-
e(
|
|
726
|
+
e(A.Config).getCountry().taxSystems.length ? (h(), M(le, {
|
|
727
727
|
key: 0,
|
|
728
728
|
modelValue: e(o).company.sstRegNo,
|
|
729
729
|
"onUpdate:modelValue": [
|
|
730
730
|
l[2] || (l[2] = (F) => e(o).company.sstRegNo = F),
|
|
731
731
|
l[3] || (l[3] = (F) => F ? null : e(o).inclusiveTaxes = [])
|
|
732
732
|
],
|
|
733
|
-
label: e(
|
|
733
|
+
label: e(g)("connect.store.setting.company.tax_reg_no"),
|
|
734
734
|
schema: e(Q).typeAtPath(e(i), "company.sstRegNo")
|
|
735
|
-
}, null, 8, ["modelValue", "label", "schema"])) :
|
|
736
|
-
(z = e(o).company) != null && z.sstRegNo && e(o).inclusiveTaxes ? (h(), D("div",
|
|
737
|
-
V("div",
|
|
738
|
-
r(
|
|
735
|
+
}, null, 8, ["modelValue", "label", "schema"])) : E("", !0),
|
|
736
|
+
(z = e(o).company) != null && z.sstRegNo && e(o).inclusiveTaxes ? (h(), D("div", jt, [
|
|
737
|
+
V("div", Lt, K(e(g)("connect.store.setting.company.tax")), 1),
|
|
738
|
+
r(Nt, {
|
|
739
739
|
modelValue: e(o).inclusiveTaxes,
|
|
740
740
|
"onUpdate:modelValue": l[4] || (l[4] = (F) => e(o).inclusiveTaxes = F)
|
|
741
741
|
}, null, 8, ["modelValue"])
|
|
742
|
-
])) :
|
|
742
|
+
])) : E("", !0),
|
|
743
743
|
r(le, {
|
|
744
744
|
modelValue: e(o).company.phoneNo,
|
|
745
745
|
"onUpdate:modelValue": l[5] || (l[5] = (F) => e(o).company.phoneNo = F),
|
|
746
|
-
label: e(
|
|
746
|
+
label: e(g)("connect.store.setting.company.phone"),
|
|
747
747
|
schema: e(Q).typeAtPath(e(i), "company.phoneNo")
|
|
748
748
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
749
|
-
V("div",
|
|
749
|
+
V("div", Kt, K(e(g)("connect.store.setting.company.address.title")), 1),
|
|
750
750
|
r(le, {
|
|
751
751
|
modelValue: e(o).company.address.line1,
|
|
752
752
|
"onUpdate:modelValue": l[6] || (l[6] = (F) => e(o).company.address.line1 = F),
|
|
753
|
-
label: e(
|
|
753
|
+
label: e(g)("connect.store.setting.company.address.line1"),
|
|
754
754
|
schema: e(Q).typeAtPath(e(i), "company.address.line1")
|
|
755
755
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
756
756
|
r(le, {
|
|
757
757
|
modelValue: e(o).company.address.line2,
|
|
758
758
|
"onUpdate:modelValue": l[7] || (l[7] = (F) => e(o).company.address.line2 = F),
|
|
759
|
-
label: e(
|
|
759
|
+
label: e(g)("connect.store.setting.company.address.line2"),
|
|
760
760
|
schema: e(Q).typeAtPath(e(i), "company.address.line2")
|
|
761
761
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
762
|
-
V("div",
|
|
762
|
+
V("div", Ht, [
|
|
763
763
|
r(le, {
|
|
764
764
|
modelValue: e(o).company.address.city,
|
|
765
765
|
"onUpdate:modelValue": l[8] || (l[8] = (F) => e(o).company.address.city = F),
|
|
766
|
-
label: e(
|
|
766
|
+
label: e(g)("connect.store.setting.company.address.city"),
|
|
767
767
|
schema: e(Q).typeAtPath(e(i), "company.address.city")
|
|
768
768
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
769
769
|
r(le, {
|
|
770
770
|
modelValue: e(o).company.address.postcode,
|
|
771
771
|
"onUpdate:modelValue": l[9] || (l[9] = (F) => e(o).company.address.postcode = F),
|
|
772
|
-
label: e(
|
|
772
|
+
label: e(g)("connect.store.setting.company.address.postcode"),
|
|
773
773
|
schema: e(Q).typeAtPath(e(i), "company.address.postcode")
|
|
774
774
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
775
|
-
V("div",
|
|
776
|
-
V("div",
|
|
777
|
-
r(
|
|
775
|
+
V("div", qt, [
|
|
776
|
+
V("div", Wt, K(e(g)("connect.store.setting.company.address.state")), 1),
|
|
777
|
+
r(j, {
|
|
778
778
|
placement: "top-end",
|
|
779
|
-
"model-value": e(
|
|
779
|
+
"model-value": e(c)
|
|
780
780
|
}, {
|
|
781
781
|
"menu-button": N(() => [
|
|
782
782
|
r(le, {
|
|
783
783
|
modelValue: e(o).company.address.state,
|
|
784
784
|
"onUpdate:modelValue": l[10] || (l[10] = (F) => e(o).company.address.state = F),
|
|
785
785
|
schema: e(Q).typeAtPath(e(i), "company.address.state"),
|
|
786
|
-
onFocusChanged: l[11] || (l[11] = (F) =>
|
|
786
|
+
onFocusChanged: l[11] || (l[11] = (F) => c.value = F)
|
|
787
787
|
}, {
|
|
788
788
|
append: N(() => [
|
|
789
|
-
r(
|
|
790
|
-
name: e(
|
|
789
|
+
r(w, {
|
|
790
|
+
name: e(c) ? "keyboard_arrow_up" : "keyboard_arrow_down"
|
|
791
791
|
}, null, 8, ["name"])
|
|
792
792
|
]),
|
|
793
793
|
_: 1
|
|
794
794
|
}, 8, ["modelValue", "schema"])
|
|
795
795
|
]),
|
|
796
796
|
default: N(() => [
|
|
797
|
-
(h(!0), D(Y, null, ue(e(
|
|
797
|
+
(h(!0), D(Y, null, ue(e(Bt)[e(A.Config).getCountry().code].stateItems.filter(
|
|
798
798
|
(F) => {
|
|
799
|
-
var re,
|
|
800
|
-
return F.label.toLowerCase().includes(((
|
|
799
|
+
var re, b;
|
|
800
|
+
return F.label.toLowerCase().includes(((b = (re = e(o)) == null ? void 0 : re.company) == null ? void 0 : b.address.state.toLowerCase()) ?? "");
|
|
801
801
|
}
|
|
802
802
|
) || [], (F) => (h(), M($, {
|
|
803
803
|
key: F.value,
|
|
804
804
|
"model-value": e(o).company.address.state === F.value,
|
|
805
805
|
label: F.label,
|
|
806
806
|
onClick: () => {
|
|
807
|
-
e(o).company.address.state = F.value,
|
|
807
|
+
e(o).company.address.state = F.value, c.value = !1;
|
|
808
808
|
}
|
|
809
809
|
}, null, 8, ["model-value", "label", "onClick"]))), 128))
|
|
810
810
|
]),
|
|
@@ -812,26 +812,26 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
812
812
|
}, 8, ["model-value"])
|
|
813
813
|
]),
|
|
814
814
|
r(ne, {
|
|
815
|
-
label: e(
|
|
815
|
+
label: e(g)("connect.store.setting.company.address.country"),
|
|
816
816
|
modelValue: e(o).company.address.country,
|
|
817
817
|
"onUpdate:modelValue": l[12] || (l[12] = (F) => e(o).company.address.country = F),
|
|
818
818
|
items: [
|
|
819
819
|
{
|
|
820
|
-
label: e(
|
|
821
|
-
value: e(
|
|
820
|
+
label: e(A.Config).getCountry().name,
|
|
821
|
+
value: e(A.Config).getCountry().name
|
|
822
822
|
}
|
|
823
823
|
],
|
|
824
824
|
rules: [e(Q).ruleAtPath(e(i), "company.address.country")]
|
|
825
825
|
}, null, 8, ["label", "modelValue", "items", "rules"])
|
|
826
826
|
]),
|
|
827
|
-
V("div",
|
|
828
|
-
V("div",
|
|
829
|
-
r(
|
|
827
|
+
V("div", Yt, [
|
|
828
|
+
V("div", zt, K(e(g)("connect.store.setting.stripe.title")), 1),
|
|
829
|
+
r(Ot, {
|
|
830
830
|
"model-value": (oe = e(o)) == null ? void 0 : oe.stripe,
|
|
831
831
|
"onUpdate:modelValue": l[13] || (l[13] = (F) => e(o).stripe = F)
|
|
832
832
|
}, null, 8, ["model-value"])
|
|
833
833
|
])
|
|
834
|
-
])) :
|
|
834
|
+
])) : E("", !0)
|
|
835
835
|
];
|
|
836
836
|
}),
|
|
837
837
|
_: 1
|
|
@@ -839,10 +839,10 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
839
839
|
};
|
|
840
840
|
}
|
|
841
841
|
});
|
|
842
|
-
function
|
|
843
|
-
return
|
|
842
|
+
function Xt(x, S = !0) {
|
|
843
|
+
return A.DineroFactory(x).toFormat(S);
|
|
844
844
|
}
|
|
845
|
-
const
|
|
845
|
+
const Zt = /* @__PURE__ */ te({
|
|
846
846
|
__name: "TaxVariantSetting",
|
|
847
847
|
props: {
|
|
848
848
|
modelValue: {
|
|
@@ -853,14 +853,14 @@ const Xt = /* @__PURE__ */ te({
|
|
|
853
853
|
},
|
|
854
854
|
emits: ["update:modelValue"],
|
|
855
855
|
setup(x, { emit: S }) {
|
|
856
|
-
const a = x,
|
|
856
|
+
const a = x, g = S;
|
|
857
857
|
ve(() => {
|
|
858
|
-
if (o.value.length !==
|
|
859
|
-
const t =
|
|
860
|
-
const
|
|
861
|
-
if (!
|
|
862
|
-
const { systemCode:
|
|
863
|
-
return
|
|
858
|
+
if (o.value.length !== v.value.length) {
|
|
859
|
+
const t = v.value.reduce((u, f) => {
|
|
860
|
+
const d = W.systemDefaultCode(f.name);
|
|
861
|
+
if (!d) return u;
|
|
862
|
+
const { systemCode: T, taxCode: l } = d;
|
|
863
|
+
return f.value || u.push({ systemCode: T, taxCode: l }), u;
|
|
864
864
|
}, []);
|
|
865
865
|
i(t);
|
|
866
866
|
}
|
|
@@ -868,53 +868,53 @@ const Xt = /* @__PURE__ */ te({
|
|
|
868
868
|
function s() {
|
|
869
869
|
return W.groupedTaxOptions();
|
|
870
870
|
}
|
|
871
|
-
const
|
|
871
|
+
const v = L(() => s().map((t) => ({
|
|
872
872
|
name: t.code,
|
|
873
873
|
value: (o.value || []).find(
|
|
874
|
-
(
|
|
874
|
+
(u) => t.options.some((f) => f.feedmeTaxCode === u)
|
|
875
875
|
),
|
|
876
|
-
options: t.options.map((
|
|
877
|
-
label: `${
|
|
878
|
-
value:
|
|
876
|
+
options: t.options.map((u) => ({
|
|
877
|
+
label: `${u.name} (${mt(u.rate)}%)`,
|
|
878
|
+
value: u.feedmeTaxCode
|
|
879
879
|
}))
|
|
880
880
|
}))), o = L(() => a.modelValue.map((t) => W.generateCode(t)));
|
|
881
|
-
function
|
|
882
|
-
const
|
|
883
|
-
(l) => l.options.some((
|
|
884
|
-
),
|
|
885
|
-
if (!
|
|
886
|
-
const { systemCode:
|
|
887
|
-
i([{ systemCode:
|
|
881
|
+
function c(t) {
|
|
882
|
+
const u = s().find(
|
|
883
|
+
(l) => l.options.some((w) => w.feedmeTaxCode === t)
|
|
884
|
+
), f = u == null ? void 0 : u.options.find((l) => l.feedmeTaxCode === t);
|
|
885
|
+
if (!f) return;
|
|
886
|
+
const { systemCode: d, taxCode: T } = f;
|
|
887
|
+
i([{ systemCode: d, taxCode: T }]);
|
|
888
888
|
}
|
|
889
889
|
function i(t) {
|
|
890
|
-
const
|
|
891
|
-
t.forEach((
|
|
892
|
-
const
|
|
893
|
-
(
|
|
894
|
-
),
|
|
895
|
-
(
|
|
890
|
+
const u = ae.clone(a.modelValue);
|
|
891
|
+
t.forEach((f) => {
|
|
892
|
+
const d = s().find(
|
|
893
|
+
(w) => w.options.some(($) => $.feedmeTaxCode === W.generateCode(f))
|
|
894
|
+
), T = (d == null ? void 0 : d.options) || [], l = u.findIndex(
|
|
895
|
+
(w) => T.some(($) => W.generateCode($) === W.generateCode(w))
|
|
896
896
|
);
|
|
897
|
-
l >= 0 ?
|
|
898
|
-
}),
|
|
897
|
+
l >= 0 ? u.splice(l, 1, f) : u.push(f);
|
|
898
|
+
}), g("update:modelValue", u);
|
|
899
899
|
}
|
|
900
|
-
return (t,
|
|
901
|
-
const
|
|
902
|
-
return h(!0), D(Y, null, ue(e(
|
|
903
|
-
key:
|
|
900
|
+
return (t, u) => {
|
|
901
|
+
const f = _("FmRadio"), d = _("FmRadioGroup");
|
|
902
|
+
return h(!0), D(Y, null, ue(e(v), (T) => (h(), D("div", {
|
|
903
|
+
key: T.name,
|
|
904
904
|
class: "flex items-start"
|
|
905
905
|
}, [
|
|
906
|
-
r(
|
|
907
|
-
modelValue:
|
|
906
|
+
r(d, {
|
|
907
|
+
modelValue: T.value,
|
|
908
908
|
"onUpdate:modelValue": [
|
|
909
|
-
(l) =>
|
|
910
|
-
|
|
911
|
-
|
|
909
|
+
(l) => T.value = l,
|
|
910
|
+
u[0] || (u[0] = (l) => {
|
|
911
|
+
c(l);
|
|
912
912
|
})
|
|
913
913
|
]
|
|
914
914
|
}, {
|
|
915
915
|
default: N(() => [
|
|
916
|
-
(h(!0), D(Y, null, ue(
|
|
917
|
-
key:
|
|
916
|
+
(h(!0), D(Y, null, ue(T.options, (l, w) => (h(), M(f, {
|
|
917
|
+
key: w,
|
|
918
918
|
value: l.value,
|
|
919
919
|
label: l.label
|
|
920
920
|
}, null, 8, ["value", "label"]))), 128))
|
|
@@ -929,8 +929,8 @@ const Xt = /* @__PURE__ */ te({
|
|
|
929
929
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
930
930
|
},
|
|
931
931
|
name: "",
|
|
932
|
-
price:
|
|
933
|
-
originalPrice:
|
|
932
|
+
price: A.Dinero.zero().toObject(),
|
|
933
|
+
originalPrice: A.Dinero.zero().toObject(),
|
|
934
934
|
vouchers: [],
|
|
935
935
|
credit: {
|
|
936
936
|
normal: 0,
|
|
@@ -947,50 +947,50 @@ const Xt = /* @__PURE__ */ te({
|
|
|
947
947
|
taxTotals: [],
|
|
948
948
|
internal: !1,
|
|
949
949
|
priceWithTaxes: ut()
|
|
950
|
-
},
|
|
950
|
+
}, Qt = {
|
|
951
951
|
key: 0,
|
|
952
952
|
class: "space-y-24 pr-12"
|
|
953
|
-
},
|
|
953
|
+
}, en = { class: "space-y-8" }, tn = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, nn = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, on = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, an = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, ln = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary !mb-[-16px]" }, sn = { class: "space-y-8" }, rn = { class: "flex items-center justify-between" }, dn = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, un = { class: "space-y-8" }, cn = { class: "flex items-center gap-8" }, mn = /* @__PURE__ */ te({
|
|
954
954
|
__name: "EditBundleSheet",
|
|
955
955
|
emits: ["update"],
|
|
956
956
|
setup(x, { expose: S, emit: a }) {
|
|
957
|
-
const
|
|
957
|
+
const g = a, { t: s } = he(), v = Te(), o = I(!1), c = I([]), i = I({
|
|
958
958
|
category: 0,
|
|
959
959
|
index: -1,
|
|
960
960
|
originalCategoryIndex: void 0
|
|
961
|
-
}), t = I(ae.cloneDeep(we)),
|
|
962
|
-
const
|
|
963
|
-
return
|
|
964
|
-
}),
|
|
961
|
+
}), t = I(ae.cloneDeep(we)), u = I(), f = Ae, d = L(() => {
|
|
962
|
+
const m = f.safeParse(t.value);
|
|
963
|
+
return m.success ? [] : m.error.errors;
|
|
964
|
+
}), T = [
|
|
965
965
|
{
|
|
966
966
|
header: "Reward title",
|
|
967
|
-
accessorFn: (
|
|
967
|
+
accessorFn: (m) => m.collectible.name,
|
|
968
968
|
enableSorting: !0
|
|
969
969
|
},
|
|
970
970
|
{
|
|
971
971
|
id: "type",
|
|
972
972
|
header: "Reward type",
|
|
973
|
-
accessorFn: (
|
|
974
|
-
cell(
|
|
975
|
-
return pe[
|
|
973
|
+
accessorFn: (m) => m.collectible.type,
|
|
974
|
+
cell(m) {
|
|
975
|
+
return pe[m.row.original.collectible.type].chip();
|
|
976
976
|
}
|
|
977
977
|
},
|
|
978
978
|
{
|
|
979
979
|
header: "Description",
|
|
980
|
-
accessorFn: (
|
|
981
|
-
cell(
|
|
982
|
-
var
|
|
983
|
-
const n =
|
|
980
|
+
accessorFn: (m) => m.description,
|
|
981
|
+
cell(m) {
|
|
982
|
+
var p;
|
|
983
|
+
const n = m.row.original;
|
|
984
984
|
return n.collectible.type == "VOUCHER" || n.selectedReward == null ? n.description : Je(Xe.FmStepperField, {
|
|
985
985
|
"onUpdate:modelValue": (y) => {
|
|
986
986
|
t.value.titles = t.value.titles.map(
|
|
987
|
-
(
|
|
987
|
+
(U) => U.id == n.collectible._id ? { ...U, dayToExpire: y } : U
|
|
988
988
|
);
|
|
989
989
|
},
|
|
990
|
-
modelValue: ((
|
|
990
|
+
modelValue: ((p = n.selectedReward) == null ? void 0 : p.extra) ?? 0,
|
|
991
991
|
appendText: "day(s)",
|
|
992
|
-
helperState: G(
|
|
993
|
-
helperText: X(
|
|
992
|
+
helperState: G(d.value, "titles"),
|
|
993
|
+
helperText: X(d.value, "titles"),
|
|
994
994
|
max: 9999,
|
|
995
995
|
rules: [(y) => y <= 9999 || "Maximum 9999 days allowed"],
|
|
996
996
|
showSteppers: !1,
|
|
@@ -998,101 +998,108 @@ const Xt = /* @__PURE__ */ te({
|
|
|
998
998
|
});
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
1001
|
-
], l = I([]),
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
)
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1001
|
+
], l = I([]), w = L(() => {
|
|
1002
|
+
var n;
|
|
1003
|
+
const m = (n = t.value) != null && n.isFeedvibe ? "STORE_BUNDLE:FEEDVIBE" : "STORE_BUNDLE:DEFAULT";
|
|
1004
|
+
return v.bundleRewards.filter((p) => {
|
|
1005
|
+
var y;
|
|
1006
|
+
return (y = t.value) != null && y.isFeedvibe && p.type !== "VOUCHER" ? !1 : pt(p.capabilities, m);
|
|
1007
|
+
}).map((p) => {
|
|
1008
|
+
const y = $.value.find((O) => O.id == p._id), U = p.type === "VOUCHER" ? `${p.options.maxUse} use(s), ${ft(
|
|
1009
|
+
p.options.validityOption || {}
|
|
1010
|
+
)}` : "No expiry";
|
|
1011
|
+
return {
|
|
1012
|
+
collectible: p,
|
|
1013
|
+
description: U,
|
|
1014
|
+
selectedReward: y
|
|
1015
|
+
};
|
|
1016
|
+
});
|
|
1017
|
+
}), $ = L(() => {
|
|
1018
|
+
var m, n;
|
|
1012
1019
|
return [
|
|
1013
|
-
...((
|
|
1014
|
-
id:
|
|
1015
|
-
extra:
|
|
1020
|
+
...((m = t.value) == null ? void 0 : m.titles.map((p) => ({
|
|
1021
|
+
id: p.id,
|
|
1022
|
+
extra: p.dayToExpire
|
|
1016
1023
|
}))) ?? [],
|
|
1017
|
-
...((n = t.value) == null ? void 0 : n.vouchers.map((
|
|
1018
|
-
id:
|
|
1024
|
+
...((n = t.value) == null ? void 0 : n.vouchers.map((p) => ({
|
|
1025
|
+
id: p,
|
|
1019
1026
|
extra: void 0
|
|
1020
1027
|
}))) ?? []
|
|
1021
1028
|
];
|
|
1022
|
-
}),
|
|
1029
|
+
}), j = L(
|
|
1023
1030
|
() => t.value.stripePriceId && t.value.subscriptionValidity ? t.value.subscriptionValidity : 0
|
|
1024
1031
|
);
|
|
1025
|
-
function ne(
|
|
1026
|
-
t.value.subscriptionValidity =
|
|
1032
|
+
function ne(m) {
|
|
1033
|
+
t.value.subscriptionValidity = m;
|
|
1027
1034
|
for (const n of t.value.titles)
|
|
1028
|
-
n.dayToExpire =
|
|
1029
|
-
t.value.credit.free && (t.value.credit.free.day =
|
|
1035
|
+
n.dayToExpire = m;
|
|
1036
|
+
t.value.credit.free && (t.value.credit.free.day = m);
|
|
1030
1037
|
}
|
|
1031
1038
|
function Z() {
|
|
1032
|
-
const
|
|
1033
|
-
if (!(!n || !
|
|
1034
|
-
for (let
|
|
1035
|
-
const y =
|
|
1036
|
-
H.value[
|
|
1039
|
+
const m = w.value, n = t.value;
|
|
1040
|
+
if (!(!n || !m))
|
|
1041
|
+
for (let p = 0; p < m.length; p++) {
|
|
1042
|
+
const y = m[p];
|
|
1043
|
+
H.value[p] ? y.collectible.type == "TITLE" ? n.titles.findIndex(
|
|
1037
1044
|
(R) => R.id == y.collectible._id
|
|
1038
1045
|
) < 0 && n.titles.push({
|
|
1039
1046
|
id: y.collectible._id,
|
|
1040
|
-
dayToExpire:
|
|
1047
|
+
dayToExpire: j.value
|
|
1041
1048
|
}) : n.vouchers.findIndex(
|
|
1042
1049
|
(R) => R == y.collectible._id
|
|
1043
|
-
) < 0 && n.vouchers.push(y.collectible._id) : (n.titles = n.titles.filter((
|
|
1044
|
-
(
|
|
1050
|
+
) < 0 && n.vouchers.push(y.collectible._id) : (n.titles = n.titles.filter((O) => O.id != y.collectible._id), n.vouchers = n.vouchers.filter(
|
|
1051
|
+
(O) => O != y.collectible._id
|
|
1045
1052
|
));
|
|
1046
1053
|
}
|
|
1047
1054
|
}
|
|
1048
1055
|
const H = I({});
|
|
1049
1056
|
Pe(H, Z, { deep: !0 });
|
|
1050
1057
|
const z = L(() => {
|
|
1051
|
-
var
|
|
1052
|
-
return (n = (
|
|
1058
|
+
var m, n;
|
|
1059
|
+
return (n = (m = v.storeOption) == null ? void 0 : m.company) == null ? void 0 : n.sstRegNo;
|
|
1053
1060
|
}), oe = L(() => {
|
|
1054
|
-
var
|
|
1055
|
-
return (
|
|
1061
|
+
var m, n, p;
|
|
1062
|
+
return (p = (n = (m = v.storeOption) == null ? void 0 : m.inclusiveTaxes) == null ? void 0 : n[0]) != null && p.inclusive ? "Inclusive" : "Exclusive";
|
|
1056
1063
|
}), F = L(() => {
|
|
1057
|
-
var
|
|
1064
|
+
var m, n, p;
|
|
1058
1065
|
return He(
|
|
1059
1066
|
W.fullTax,
|
|
1060
1067
|
ze(t.value.taxes),
|
|
1061
1068
|
t.value.price,
|
|
1062
1069
|
Number(t.value.credit.normal),
|
|
1063
|
-
((
|
|
1064
|
-
(
|
|
1070
|
+
((m = v.storeOption) == null ? void 0 : m.inclusiveTaxes) ?? [],
|
|
1071
|
+
(p = (n = v.storeOption) == null ? void 0 : n.company) != null && p.sstRegNo ? W.taxSystem.map((y) => y.code) : []
|
|
1065
1072
|
);
|
|
1066
1073
|
}), re = L(() => F.value.reduce(
|
|
1067
|
-
(n,
|
|
1074
|
+
(n, p) => n.add(p.total),
|
|
1068
1075
|
ct()
|
|
1069
|
-
).toFormat()),
|
|
1076
|
+
).toFormat()), b = L(() => {
|
|
1070
1077
|
var y;
|
|
1071
|
-
const
|
|
1078
|
+
const m = qe(
|
|
1072
1079
|
F.value,
|
|
1073
1080
|
t.value.price,
|
|
1074
|
-
((y =
|
|
1081
|
+
((y = v.storeOption) == null ? void 0 : y.inclusiveTaxes) ?? []
|
|
1075
1082
|
);
|
|
1076
|
-
t.value.priceWithTaxes =
|
|
1077
|
-
const n =
|
|
1078
|
-
return Number.isNaN(
|
|
1083
|
+
t.value.priceWithTaxes = m;
|
|
1084
|
+
const n = Xt(m, !1), p = Number(n.replace(/[^\d.-]/g, ""));
|
|
1085
|
+
return Number.isNaN(p) ? 0 : p;
|
|
1079
1086
|
});
|
|
1080
|
-
function
|
|
1081
|
-
t.value.taxTotals = F.value,
|
|
1087
|
+
function k() {
|
|
1088
|
+
t.value.taxTotals = F.value, g("update", Ae.parse(ot(t.value)));
|
|
1082
1089
|
}
|
|
1083
1090
|
function C() {
|
|
1084
1091
|
return ae.cloneDeep(we);
|
|
1085
1092
|
}
|
|
1086
|
-
function
|
|
1087
|
-
o.value =
|
|
1093
|
+
function B(m, n) {
|
|
1094
|
+
o.value = m, m && n && (u.value = void 0, c.value = n.categories, t.value = n.bundle || C(), i.value.category = n.category, i.value.index = n.index, i.value.originalCategoryIndex = n.category, H.value = w.value.reduce((p, y, U) => (p[U] = !!y.selectedReward, p), {}));
|
|
1088
1095
|
}
|
|
1089
1096
|
return S({
|
|
1090
|
-
showSheet:
|
|
1091
|
-
bundleImage:
|
|
1097
|
+
showSheet: B,
|
|
1098
|
+
bundleImage: u,
|
|
1092
1099
|
target: i,
|
|
1093
1100
|
data: t
|
|
1094
|
-
}), (
|
|
1095
|
-
const
|
|
1101
|
+
}), (m, n) => {
|
|
1102
|
+
const p = _("FmSwitch"), y = _("FmHelperText"), U = _("FmTextField"), O = _("FmSelect"), R = _("FmStepperField"), q = _("FmMenuItem"), J = _("FmTable"), me = _("FmButton"), xe = _("FmSideSheet");
|
|
1096
1103
|
return h(), M(xe, {
|
|
1097
1104
|
"max-width": 768,
|
|
1098
1105
|
modelValue: e(o),
|
|
@@ -1100,16 +1107,16 @@ const Xt = /* @__PURE__ */ te({
|
|
|
1100
1107
|
header: e(i).index != -1 ? e(s)("connect.store.bundle.edit.title") : e(s)("connect.store.bundle.edit.create")
|
|
1101
1108
|
}, {
|
|
1102
1109
|
"side-sheet-footer": N(() => [
|
|
1103
|
-
V("div",
|
|
1110
|
+
V("div", cn, [
|
|
1104
1111
|
r(me, {
|
|
1105
1112
|
label: e(i).index != -1 ? "Save" : "Add",
|
|
1106
|
-
onClick:
|
|
1107
|
-
disabled: e(
|
|
1113
|
+
onClick: k,
|
|
1114
|
+
disabled: e(d).length > 0,
|
|
1108
1115
|
loading: e(Se)().isLoading
|
|
1109
1116
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
1110
1117
|
r(me, {
|
|
1111
1118
|
label: "Cancel",
|
|
1112
|
-
onClick: n[20] || (n[20] = (ie) =>
|
|
1119
|
+
onClick: n[20] || (n[20] = (ie) => B(!1)),
|
|
1113
1120
|
variant: "tertiary"
|
|
1114
1121
|
})
|
|
1115
1122
|
])
|
|
@@ -1117,114 +1124,114 @@ const Xt = /* @__PURE__ */ te({
|
|
|
1117
1124
|
default: N(() => {
|
|
1118
1125
|
var ie, $e, Re, Ue, Be, Ne, Ie, De, Me, Oe;
|
|
1119
1126
|
return [
|
|
1120
|
-
r(
|
|
1121
|
-
e(t) ? (h(), D("div",
|
|
1122
|
-
V("div",
|
|
1123
|
-
e(
|
|
1127
|
+
r(ke, { json: e(t) }, null, 8, ["json"]),
|
|
1128
|
+
e(t) ? (h(), D("div", Qt, [
|
|
1129
|
+
V("div", en, [
|
|
1130
|
+
e(A.Config).getCountry().code == "MY" && ((ie = e(v).payoutAccount) == null ? void 0 : ie.status) == "APPROVED" && (($e = e(v).payoutAccount) != null && $e.enable) ? (h(), M(p, {
|
|
1124
1131
|
key: 0,
|
|
1125
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
1126
|
-
e(t).isFeedvibe =
|
|
1132
|
+
"onUpdate:modelValue": n[0] || (n[0] = (P) => {
|
|
1133
|
+
e(t).isFeedvibe = P, e(t).isFeedvibe && (e(t).credit.normal = 0, e(t).coinPrice = 0, e(t).titles = [], H.value = {}, e(t).hideInPos = !0, e(t).internal = !0);
|
|
1127
1134
|
}),
|
|
1128
1135
|
"label-placement": "right",
|
|
1129
1136
|
"model-value": e(t).isFeedvibe || !1,
|
|
1130
1137
|
label: "Feedvibe Campaign",
|
|
1131
1138
|
sublabel: "Bundle will be appear for Feedvibe campaign use"
|
|
1132
|
-
}, null, 8, ["model-value"])) :
|
|
1139
|
+
}, null, 8, ["model-value"])) : E("", !0),
|
|
1133
1140
|
e(t).isFeedvibe ? (h(), M(y, {
|
|
1134
1141
|
key: 1,
|
|
1135
1142
|
text: "There will be a 15% charge for FeedVibe bundles sold in the FeedVibe app. FeedVibe bundles only show up in the FeedVibe app and cannot be sold in the POS and mini program. For more information, please contact support.",
|
|
1136
1143
|
state: "warning"
|
|
1137
|
-
})) :
|
|
1144
|
+
})) : E("", !0)
|
|
1138
1145
|
]),
|
|
1139
|
-
V("div",
|
|
1140
|
-
r(
|
|
1146
|
+
V("div", tn, K(e(s)("connect.store.bundle.edit.basicInformation")), 1),
|
|
1147
|
+
r(U, {
|
|
1141
1148
|
label: e(s)("connect.store.bundle.edit.bundleName"),
|
|
1142
1149
|
modelValue: e(t).name,
|
|
1143
|
-
"onUpdate:modelValue": n[1] || (n[1] = (
|
|
1144
|
-
"helper-state": e(G)(e(
|
|
1145
|
-
"helper-text": e(X)(e(
|
|
1150
|
+
"onUpdate:modelValue": n[1] || (n[1] = (P) => e(t).name = P),
|
|
1151
|
+
"helper-state": e(G)(e(d), "name"),
|
|
1152
|
+
"helper-text": e(X)(e(d), "name")
|
|
1146
1153
|
}, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
|
|
1147
|
-
r(
|
|
1154
|
+
r(O, {
|
|
1148
1155
|
modelValue: e(i).category,
|
|
1149
|
-
"onUpdate:modelValue": n[2] || (n[2] = (
|
|
1156
|
+
"onUpdate:modelValue": n[2] || (n[2] = (P) => e(i).category = P),
|
|
1150
1157
|
label: "Store Category",
|
|
1151
|
-
items: e(
|
|
1158
|
+
items: e(c).map((P, We) => ({ label: P, value: We }))
|
|
1152
1159
|
}, null, 8, ["modelValue", "items"]),
|
|
1153
1160
|
r(it, {
|
|
1154
1161
|
label: e(s)("connect.store.bundle.edit.bundleImage"),
|
|
1155
1162
|
class: "w-1/2 xs:w-2/3",
|
|
1156
1163
|
"aspect-ratio": "16/9",
|
|
1157
1164
|
thumbnail: e(t).image ?? void 0,
|
|
1158
|
-
file: e(
|
|
1159
|
-
"onUpdate:file": n[3] || (n[3] = (
|
|
1160
|
-
|
|
1165
|
+
file: e(u) ?? void 0,
|
|
1166
|
+
"onUpdate:file": n[3] || (n[3] = (P) => {
|
|
1167
|
+
u.value = P;
|
|
1161
1168
|
}),
|
|
1162
|
-
"helper-state": e(G)(e(
|
|
1163
|
-
"helper-text": e(X)(e(
|
|
1169
|
+
"helper-state": e(G)(e(d), "image"),
|
|
1170
|
+
"helper-text": e(X)(e(d), "image")
|
|
1164
1171
|
}, null, 8, ["label", "thumbnail", "file", "helper-state", "helper-text"]),
|
|
1165
1172
|
r(R, {
|
|
1166
|
-
"model-value": e(
|
|
1173
|
+
"model-value": e(A.Dinero).fromFdoDinero(e(t).price).toUnit(),
|
|
1167
1174
|
label: e(s)("connect.store.bundle.edit.bundlePrice"),
|
|
1168
1175
|
min: 0,
|
|
1169
1176
|
"max-fraction-digits": 2,
|
|
1170
|
-
"onUpdate:modelValue": n[4] || (n[4] = (
|
|
1171
|
-
e(t).price.amount =
|
|
1177
|
+
"onUpdate:modelValue": n[4] || (n[4] = (P) => {
|
|
1178
|
+
e(t).price.amount = P * 10 ** e(t).price.precision;
|
|
1172
1179
|
}),
|
|
1173
1180
|
"is-currency": !0,
|
|
1174
1181
|
"show-steppers": !1,
|
|
1175
|
-
"helper-text": e(X)(e(
|
|
1182
|
+
"helper-text": e(X)(e(d), "price") || `${e(A.Dinero).fromNumber({ number: 1 }).toFormat(
|
|
1176
1183
|
!0
|
|
1177
|
-
)} = ${e(
|
|
1178
|
-
"helper-state": e(G)(e(
|
|
1184
|
+
)} = ${e(A.Dinero).fromNumber({ number: 1 }).toUnit()} credit`,
|
|
1185
|
+
"helper-state": e(G)(e(d), "price")
|
|
1179
1186
|
}, {
|
|
1180
1187
|
prepend: N(() => [
|
|
1181
|
-
ce(K(e(
|
|
1188
|
+
ce(K(e(A.Dinero).defaultCurrency()), 1)
|
|
1182
1189
|
]),
|
|
1183
1190
|
_: 1
|
|
1184
1191
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
1185
1192
|
r(R, {
|
|
1186
|
-
"model-value": e(
|
|
1193
|
+
"model-value": e(A.Dinero).fromFdoDinero(e(t).originalPrice).toUnit(),
|
|
1187
1194
|
label: e(s)("connect.store.bundle.edit.bundleValue"),
|
|
1188
1195
|
min: 0,
|
|
1189
1196
|
"max-fraction-digits": 2,
|
|
1190
|
-
"onUpdate:modelValue": n[5] || (n[5] = (
|
|
1191
|
-
e(t).originalPrice || (e(t).originalPrice = e(
|
|
1197
|
+
"onUpdate:modelValue": n[5] || (n[5] = (P) => {
|
|
1198
|
+
e(t).originalPrice || (e(t).originalPrice = e(A.Dinero).zero().toObject()), e(t).originalPrice.amount = P * 10 ** e(t).originalPrice.precision;
|
|
1192
1199
|
}),
|
|
1193
1200
|
"is-currency": !0,
|
|
1194
1201
|
"show-steppers": !1,
|
|
1195
|
-
"helper-text": e(X)(e(
|
|
1196
|
-
"helper-state": e(G)(e(
|
|
1202
|
+
"helper-text": e(X)(e(d), "originalPrice") || e(s)("connect.store.bundle.edit.originalPriceHelper"),
|
|
1203
|
+
"helper-state": e(G)(e(d), "originalPrice")
|
|
1197
1204
|
}, {
|
|
1198
1205
|
prepend: N(() => [
|
|
1199
|
-
ce(K(e(
|
|
1206
|
+
ce(K(e(A.Dinero).defaultCurrency()), 1)
|
|
1200
1207
|
]),
|
|
1201
1208
|
_: 1
|
|
1202
1209
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
1203
|
-
e(t).isFeedvibe ?
|
|
1210
|
+
e(t).isFeedvibe ? E("", !0) : (h(), M(R, {
|
|
1204
1211
|
key: 0,
|
|
1205
1212
|
"model-value": e(t).coinPrice ?? null,
|
|
1206
1213
|
label: e(s)("connect.store.bundle.edit.pointNeeded"),
|
|
1207
1214
|
min: 0,
|
|
1208
|
-
"onUpdate:modelValue": n[6] || (n[6] = (
|
|
1209
|
-
|
|
1215
|
+
"onUpdate:modelValue": n[6] || (n[6] = (P) => {
|
|
1216
|
+
P > 0 && e(t).credit.normal > 0 && (e(t).credit.normal = 0), e(t).coinPrice = P;
|
|
1210
1217
|
}),
|
|
1211
1218
|
"show-steppers": !1,
|
|
1212
|
-
"helper-state": e(G)(e(
|
|
1213
|
-
"helper-text": e(X)(e(
|
|
1219
|
+
"helper-state": e(G)(e(d), "coinPrice"),
|
|
1220
|
+
"helper-text": e(X)(e(d), "coinPrice")
|
|
1214
1221
|
}, {
|
|
1215
1222
|
append: N(() => [...n[22] || (n[22] = [
|
|
1216
1223
|
ce(" point(s) ", -1)
|
|
1217
1224
|
])]),
|
|
1218
1225
|
_: 1
|
|
1219
1226
|
}, 8, ["model-value", "label", "helper-state", "helper-text"])),
|
|
1220
|
-
(Re = e(
|
|
1221
|
-
V("div",
|
|
1222
|
-
r(
|
|
1227
|
+
(Re = e(v).storeOption) != null && Re.stripe && !e(t).isFeedvibe ? (h(), D(Y, { key: 1 }, [
|
|
1228
|
+
V("div", nn, K(e(s)("connect.store.bundle.edit.subscriptionSettings")), 1),
|
|
1229
|
+
r(U, {
|
|
1223
1230
|
label: e(s)("connect.store.bundle.edit.stripePriceId"),
|
|
1224
1231
|
modelValue: e(t).stripePriceId,
|
|
1225
|
-
"onUpdate:modelValue": n[7] || (n[7] = (
|
|
1226
|
-
"helper-state": e(G)(e(
|
|
1227
|
-
"helper-text": e(X)(e(
|
|
1232
|
+
"onUpdate:modelValue": n[7] || (n[7] = (P) => e(t).stripePriceId = P),
|
|
1233
|
+
"helper-state": e(G)(e(d), "stripePriceId"),
|
|
1234
|
+
"helper-text": e(X)(e(d), "stripePriceId")
|
|
1228
1235
|
}, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
|
|
1229
1236
|
e(t).stripePriceId ? (h(), M(R, {
|
|
1230
1237
|
key: 0,
|
|
@@ -1233,19 +1240,19 @@ const Xt = /* @__PURE__ */ te({
|
|
|
1233
1240
|
"onUpdate:modelValue": ne,
|
|
1234
1241
|
label: e(s)("connect.store.bundle.edit.subscriptionValidity"),
|
|
1235
1242
|
"show-steppers": !1,
|
|
1236
|
-
"helper-state": e(G)(e(
|
|
1237
|
-
"helper-text": e(X)(e(
|
|
1238
|
-
}, null, 8, ["model-value", "label", "helper-state", "helper-text"])) :
|
|
1239
|
-
], 64)) :
|
|
1240
|
-
e(t).isFeedvibe ?
|
|
1241
|
-
V("div",
|
|
1243
|
+
"helper-state": e(G)(e(d), "subscriptionValidity"),
|
|
1244
|
+
"helper-text": e(X)(e(d), "subscriptionValidity")
|
|
1245
|
+
}, null, 8, ["model-value", "label", "helper-state", "helper-text"])) : E("", !0)
|
|
1246
|
+
], 64)) : E("", !0),
|
|
1247
|
+
e(t).isFeedvibe ? E("", !0) : (h(), D(Y, { key: 2 }, [
|
|
1248
|
+
V("div", on, K(e(s)("connect.store.bundle.edit.credit")), 1),
|
|
1242
1249
|
r(R, {
|
|
1243
1250
|
modelValue: e(t).credit.normal,
|
|
1244
|
-
"onUpdate:modelValue": n[8] || (n[8] = (
|
|
1251
|
+
"onUpdate:modelValue": n[8] || (n[8] = (P) => e(t).credit.normal = P),
|
|
1245
1252
|
label: e(s)("connect.store.bundle.edit.normalCredit"),
|
|
1246
1253
|
"show-steppers": !1,
|
|
1247
|
-
"helper-state": e(G)(e(
|
|
1248
|
-
"helper-text": e(X)(e(
|
|
1254
|
+
"helper-state": e(G)(e(d), "credit.normal"),
|
|
1255
|
+
"helper-text": e(X)(e(d), "credit.normal")
|
|
1249
1256
|
}, {
|
|
1250
1257
|
append: N(() => [...n[23] || (n[23] = [
|
|
1251
1258
|
ce(" credit ", -1)
|
|
@@ -1255,16 +1262,16 @@ const Xt = /* @__PURE__ */ te({
|
|
|
1255
1262
|
r(R, {
|
|
1256
1263
|
"model-value": ((Ue = e(t).credit.free) == null ? void 0 : Ue.amount) ?? null,
|
|
1257
1264
|
min: 0,
|
|
1258
|
-
"onUpdate:modelValue": n[9] || (n[9] = (
|
|
1265
|
+
"onUpdate:modelValue": n[9] || (n[9] = (P) => {
|
|
1259
1266
|
e(t).credit.free || (e(t).credit.free = {
|
|
1260
1267
|
amount: 0,
|
|
1261
1268
|
day: 1
|
|
1262
|
-
}), e(t).credit.free.amount =
|
|
1269
|
+
}), e(t).credit.free.amount = P;
|
|
1263
1270
|
}),
|
|
1264
1271
|
label: e(s)("connect.store.bundle.edit.freeCredit"),
|
|
1265
1272
|
"show-steppers": !1,
|
|
1266
|
-
"helper-state": e(G)(e(
|
|
1267
|
-
"helper-text": e(X)(e(
|
|
1273
|
+
"helper-state": e(G)(e(d), "credit.free.amount"),
|
|
1274
|
+
"helper-text": e(X)(e(d), "credit.free.amount")
|
|
1268
1275
|
}, {
|
|
1269
1276
|
append: N(() => [...n[24] || (n[24] = [
|
|
1270
1277
|
ce(" credit ", -1)
|
|
@@ -1276,54 +1283,54 @@ const Xt = /* @__PURE__ */ te({
|
|
|
1276
1283
|
disabled: !!e(t).stripePriceId,
|
|
1277
1284
|
"model-value": ((Ne = e(t).credit.free) == null ? void 0 : Ne.day) ?? null,
|
|
1278
1285
|
min: 0,
|
|
1279
|
-
"onUpdate:modelValue": n[10] || (n[10] = (
|
|
1286
|
+
"onUpdate:modelValue": n[10] || (n[10] = (P) => {
|
|
1280
1287
|
e(t).credit.free || (e(t).credit.free = {
|
|
1281
1288
|
amount: 0,
|
|
1282
1289
|
day: 1
|
|
1283
|
-
}), e(t).credit.free.day = e(
|
|
1290
|
+
}), e(t).credit.free.day = e(j) || P;
|
|
1284
1291
|
}),
|
|
1285
1292
|
label: "Free credit valid for",
|
|
1286
1293
|
"show-steppers": !1,
|
|
1287
|
-
"helper-state": e(G)(e(
|
|
1288
|
-
"helper-text": e(X)(e(
|
|
1294
|
+
"helper-state": e(G)(e(d), "credit.free.day"),
|
|
1295
|
+
"helper-text": e(X)(e(d), "credit.free.day")
|
|
1289
1296
|
}, {
|
|
1290
1297
|
append: N(() => [...n[25] || (n[25] = [
|
|
1291
1298
|
ce(" day(s) ", -1)
|
|
1292
1299
|
])]),
|
|
1293
1300
|
_: 1
|
|
1294
|
-
}, 8, ["disabled", "model-value", "helper-state", "helper-text"])) :
|
|
1301
|
+
}, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : E("", !0)
|
|
1295
1302
|
], 64)),
|
|
1296
1303
|
e(z) ? (h(), D(Y, { key: 3 }, [
|
|
1297
1304
|
n[26] || (n[26] = V("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Taxes", -1)),
|
|
1298
|
-
r(
|
|
1305
|
+
r(Zt, {
|
|
1299
1306
|
modelValue: e(t).taxes,
|
|
1300
|
-
"onUpdate:modelValue": n[11] || (n[11] = (
|
|
1307
|
+
"onUpdate:modelValue": n[11] || (n[11] = (P) => e(t).taxes = P)
|
|
1301
1308
|
}, null, 8, ["modelValue"]),
|
|
1302
|
-
r(
|
|
1309
|
+
r(U, {
|
|
1303
1310
|
label: `Tax Charged (${e(oe)})`,
|
|
1304
1311
|
"model-value": e(re),
|
|
1305
1312
|
disabled: ""
|
|
1306
1313
|
}, null, 8, ["label", "model-value"])
|
|
1307
|
-
], 64)) :
|
|
1314
|
+
], 64)) : E("", !0),
|
|
1308
1315
|
r(R, {
|
|
1309
1316
|
label: "Total Price",
|
|
1310
|
-
"model-value": e(
|
|
1317
|
+
"model-value": e(b),
|
|
1311
1318
|
disabled: !0
|
|
1312
1319
|
}, null, 8, ["model-value"]),
|
|
1313
|
-
V("div",
|
|
1314
|
-
V("div",
|
|
1315
|
-
V("div",
|
|
1316
|
-
V("div",
|
|
1320
|
+
V("div", an, K(e(s)("connect.store.bundle.edit.bundleReward.title")), 1),
|
|
1321
|
+
V("div", ln, K(e(s)("connect.store.bundle.edit.bundleReward.description")), 1),
|
|
1322
|
+
V("div", sn, [
|
|
1323
|
+
V("div", rn, [
|
|
1317
1324
|
r(dt, {
|
|
1318
1325
|
label: `Reward type: ${e(l).length == 0 ? "All" : e(l)[0].name}`
|
|
1319
1326
|
}, {
|
|
1320
1327
|
default: N(() => [
|
|
1321
1328
|
r(q, {
|
|
1322
|
-
onClick: n[12] || (n[12] = (
|
|
1329
|
+
onClick: n[12] || (n[12] = (P) => l.value = []),
|
|
1323
1330
|
label: "All"
|
|
1324
1331
|
}),
|
|
1325
1332
|
r(q, {
|
|
1326
|
-
onClick: n[13] || (n[13] = (
|
|
1333
|
+
onClick: n[13] || (n[13] = (P) => l.value = [
|
|
1327
1334
|
{
|
|
1328
1335
|
id: "type",
|
|
1329
1336
|
value: "VOUCHER",
|
|
@@ -1333,7 +1340,7 @@ const Xt = /* @__PURE__ */ te({
|
|
|
1333
1340
|
label: e(pe).VOUCHER.name
|
|
1334
1341
|
}, null, 8, ["label"]),
|
|
1335
1342
|
r(q, {
|
|
1336
|
-
onClick: n[14] || (n[14] = (
|
|
1343
|
+
onClick: n[14] || (n[14] = (P) => l.value = [
|
|
1337
1344
|
{
|
|
1338
1345
|
id: "type",
|
|
1339
1346
|
value: "TITLE",
|
|
@@ -1348,33 +1355,31 @@ const Xt = /* @__PURE__ */ te({
|
|
|
1348
1355
|
]),
|
|
1349
1356
|
r(J, {
|
|
1350
1357
|
modelValue: e(H),
|
|
1351
|
-
"onUpdate:modelValue": n[15] || (n[15] = (
|
|
1358
|
+
"onUpdate:modelValue": n[15] || (n[15] = (P) => se(H) ? H.value = P : null),
|
|
1352
1359
|
selection: "multiple",
|
|
1353
1360
|
"column-filter": e(l),
|
|
1354
|
-
"column-defs":
|
|
1355
|
-
"row-data": e(
|
|
1356
|
-
|
|
1357
|
-
),
|
|
1358
|
-
"hide-footer": e(P).length <= 10
|
|
1361
|
+
"column-defs": T,
|
|
1362
|
+
"row-data": e(w),
|
|
1363
|
+
"hide-footer": e(w).length <= 10
|
|
1359
1364
|
}, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"]),
|
|
1360
1365
|
r(y, {
|
|
1361
|
-
text: e(X)(e(
|
|
1362
|
-
state: e(G)(e(
|
|
1366
|
+
text: e(X)(e(d), "titles"),
|
|
1367
|
+
state: e(G)(e(d), "titles")
|
|
1363
1368
|
}, null, 8, ["text", "state"])
|
|
1364
1369
|
]),
|
|
1365
|
-
V("div",
|
|
1366
|
-
V("div",
|
|
1367
|
-
e(t).isFeedvibe ?
|
|
1368
|
-
r(
|
|
1370
|
+
V("div", dn, K(e(s)("connect.store.bundle.edit.advanceSetting")), 1),
|
|
1371
|
+
V("div", un, [
|
|
1372
|
+
e(t).isFeedvibe ? E("", !0) : (h(), D(Y, { key: 0 }, [
|
|
1373
|
+
r(p, {
|
|
1369
1374
|
"model-value": e(t).internal ?? !1,
|
|
1370
|
-
"onUpdate:modelValue": n[16] || (n[16] = (
|
|
1375
|
+
"onUpdate:modelValue": n[16] || (n[16] = (P) => e(t).internal = P),
|
|
1371
1376
|
"label-placement": "right",
|
|
1372
1377
|
label: e(s)("connect.store.bundle.edit.internalBundle"),
|
|
1373
1378
|
sublabel: e(s)("connect.store.bundle.edit.internalBundleDescription")
|
|
1374
1379
|
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
1375
|
-
r(
|
|
1380
|
+
r(p, {
|
|
1376
1381
|
"model-value": e(t).hideInPos ?? !1,
|
|
1377
|
-
"onUpdate:modelValue": n[17] || (n[17] = (
|
|
1382
|
+
"onUpdate:modelValue": n[17] || (n[17] = (P) => e(t).hideInPos = P),
|
|
1378
1383
|
"label-placement": "right",
|
|
1379
1384
|
label: e(s)("connect.store.bundle.edit.hideInPos"),
|
|
1380
1385
|
sublabel: e(s)("connect.store.bundle.edit.hideInPosDescription")
|
|
@@ -1382,71 +1387,71 @@ const Xt = /* @__PURE__ */ te({
|
|
|
1382
1387
|
], 64)),
|
|
1383
1388
|
r(R, {
|
|
1384
1389
|
"model-value": ((De = (Ie = e(t).config) == null ? void 0 : Ie.options) == null ? void 0 : De.maxPerUser) || null,
|
|
1385
|
-
"onUpdate:modelValue": n[18] || (n[18] = (
|
|
1390
|
+
"onUpdate:modelValue": n[18] || (n[18] = (P) => e(ae).set(e(t), "config.options.maxPerUser", P)),
|
|
1386
1391
|
label: e(s)("connect.store.bundle.edit.maxPerUser"),
|
|
1387
1392
|
"show-steppers": !1,
|
|
1388
1393
|
placeholder: e(s)("connect.store.bundle.edit.unlimited")
|
|
1389
1394
|
}, null, 8, ["model-value", "label", "placeholder"]),
|
|
1390
1395
|
r(R, {
|
|
1391
1396
|
"model-value": ((Oe = (Me = e(t).config) == null ? void 0 : Me.options) == null ? void 0 : Oe.maxReceive) || null,
|
|
1392
|
-
"onUpdate:modelValue": n[19] || (n[19] = (
|
|
1397
|
+
"onUpdate:modelValue": n[19] || (n[19] = (P) => e(ae).set(e(t), "config.options.maxReceive", P)),
|
|
1393
1398
|
label: e(s)("connect.store.bundle.edit.maxReceive"),
|
|
1394
1399
|
"show-steppers": !1,
|
|
1395
1400
|
placeholder: e(s)("connect.store.bundle.edit.unlimited")
|
|
1396
1401
|
}, null, 8, ["model-value", "label", "placeholder"])
|
|
1397
1402
|
])
|
|
1398
|
-
])) :
|
|
1403
|
+
])) : E("", !0)
|
|
1399
1404
|
];
|
|
1400
1405
|
}),
|
|
1401
1406
|
_: 1
|
|
1402
1407
|
}, 8, ["modelValue", "header"]);
|
|
1403
1408
|
};
|
|
1404
1409
|
}
|
|
1405
|
-
}),
|
|
1410
|
+
}), pn = { class: "flex gap-8 items-center flex-wrap" }, fn = { class: "flex items-center gap-8" }, yn = /* @__PURE__ */ te({
|
|
1406
1411
|
__name: "SendBundleSheet",
|
|
1407
1412
|
emits: ["success"],
|
|
1408
1413
|
setup(x, { expose: S, emit: a }) {
|
|
1409
|
-
const { minor:
|
|
1414
|
+
const { minor: g } = Le, s = I(), v = I(""), o = I(""), c = I([]), i = I(!1), t = I();
|
|
1410
1415
|
I(!0);
|
|
1411
|
-
function
|
|
1412
|
-
i.value = !0,
|
|
1416
|
+
function u(w) {
|
|
1417
|
+
i.value = !0, v.value = null, o.value = "", s.value = w.bundle;
|
|
1413
1418
|
}
|
|
1414
|
-
function
|
|
1419
|
+
function f() {
|
|
1415
1420
|
i.value = !1;
|
|
1416
1421
|
}
|
|
1417
|
-
async function
|
|
1418
|
-
const $ = await
|
|
1422
|
+
async function d(w) {
|
|
1423
|
+
const $ = await yt.read({
|
|
1419
1424
|
limit: 25,
|
|
1420
1425
|
skip: 0,
|
|
1421
1426
|
sortBy: "_id",
|
|
1422
|
-
search:
|
|
1427
|
+
search: w,
|
|
1423
1428
|
descending: !1
|
|
1424
1429
|
});
|
|
1425
|
-
|
|
1426
|
-
label: `${
|
|
1427
|
-
value:
|
|
1428
|
-
})), await new Promise((
|
|
1430
|
+
c.value = $.resources.map((j) => ({
|
|
1431
|
+
label: `${j.name} (${j.phoneNumber})`,
|
|
1432
|
+
value: j._id
|
|
1433
|
+
})), await new Promise((j) => setTimeout(j, 100));
|
|
1429
1434
|
}
|
|
1430
|
-
async function
|
|
1431
|
-
if (!s.value || !
|
|
1432
|
-
const
|
|
1433
|
-
(
|
|
1435
|
+
async function T() {
|
|
1436
|
+
if (!s.value || !v.value) return;
|
|
1437
|
+
const w = c.value.find(
|
|
1438
|
+
(j) => j.value === v.value
|
|
1434
1439
|
);
|
|
1435
1440
|
await ye.confirm(
|
|
1436
|
-
`Are you sure you want to send bundle ${s.value.name} to ${
|
|
1441
|
+
`Are you sure you want to send bundle ${s.value.name} to ${w == null ? void 0 : w.label}?`,
|
|
1437
1442
|
"Confirm",
|
|
1438
1443
|
"Confirm",
|
|
1439
1444
|
"Cancel"
|
|
1440
|
-
) && await
|
|
1445
|
+
) && await g(
|
|
1441
1446
|
async () => {
|
|
1442
|
-
const
|
|
1447
|
+
const j = {
|
|
1443
1448
|
bundle: s.value._id,
|
|
1444
|
-
member:
|
|
1449
|
+
member: v.value,
|
|
1445
1450
|
source: nt.enum.ADMIN,
|
|
1446
1451
|
ref: `ADMIN:${(/* @__PURE__ */ new Date()).toISOString()}:${o.value}`,
|
|
1447
1452
|
withCoin: !1
|
|
1448
1453
|
};
|
|
1449
|
-
await be.sendBundle(
|
|
1454
|
+
await be.sendBundle(j), f();
|
|
1450
1455
|
},
|
|
1451
1456
|
{
|
|
1452
1457
|
message: "Sending bundle",
|
|
@@ -1455,20 +1460,20 @@ const Xt = /* @__PURE__ */ te({
|
|
|
1455
1460
|
);
|
|
1456
1461
|
}
|
|
1457
1462
|
const l = L(() => {
|
|
1458
|
-
var $,
|
|
1459
|
-
const
|
|
1460
|
-
return (($ = s.value) == null ? void 0 : $.price.amount) > 0 &&
|
|
1461
|
-
`${
|
|
1462
|
-
), (ne = s.value) != null && ne.coinPrice &&
|
|
1463
|
+
var $, j, ne;
|
|
1464
|
+
const w = [];
|
|
1465
|
+
return (($ = s.value) == null ? void 0 : $.price.amount) > 0 && w.push(
|
|
1466
|
+
`${A.Config.getCountry().currency.symbol}${Ke((j = s.value) == null ? void 0 : j.price)}`
|
|
1467
|
+
), (ne = s.value) != null && ne.coinPrice && w.push(`${s.value.coinPrice} point(s)`), w.join(" or ");
|
|
1463
1468
|
});
|
|
1464
1469
|
return S({
|
|
1465
|
-
showSheet:
|
|
1466
|
-
hideSheet:
|
|
1470
|
+
showSheet: u,
|
|
1471
|
+
hideSheet: f
|
|
1467
1472
|
}), ve(async () => {
|
|
1468
|
-
await
|
|
1469
|
-
}), (
|
|
1470
|
-
const
|
|
1471
|
-
return h(), M(
|
|
1473
|
+
await d("");
|
|
1474
|
+
}), (w, $) => {
|
|
1475
|
+
const j = _("FmCardMedia"), ne = _("FmCardHeader"), Z = _("FmChip"), H = _("FmCardSection"), z = _("FmCard"), oe = _("FmSelect"), F = _("FmTextField"), re = _("FmForm"), b = _("FmButton"), k = _("FmSideSheet");
|
|
1476
|
+
return h(), M(k, {
|
|
1472
1477
|
"max-width": 560,
|
|
1473
1478
|
"dismiss-away": !0,
|
|
1474
1479
|
header: "Send bundle to member",
|
|
@@ -1479,8 +1484,8 @@ const Xt = /* @__PURE__ */ te({
|
|
|
1479
1484
|
]
|
|
1480
1485
|
}, {
|
|
1481
1486
|
"side-sheet-footer": N(() => [
|
|
1482
|
-
V("div",
|
|
1483
|
-
r(
|
|
1487
|
+
V("div", fn, [
|
|
1488
|
+
r(b, {
|
|
1484
1489
|
label: "Send",
|
|
1485
1490
|
loading: e(Se)().isLoading,
|
|
1486
1491
|
onClick: $[2] || ($[2] = async () => {
|
|
@@ -1488,7 +1493,7 @@ const Xt = /* @__PURE__ */ te({
|
|
|
1488
1493
|
return (C = e(t)) == null ? void 0 : C.validateInputs();
|
|
1489
1494
|
})
|
|
1490
1495
|
}, null, 8, ["loading"]),
|
|
1491
|
-
r(
|
|
1496
|
+
r(b, {
|
|
1492
1497
|
label: "Cancel",
|
|
1493
1498
|
type: "button",
|
|
1494
1499
|
variant: "tertiary",
|
|
@@ -1501,7 +1506,7 @@ const Xt = /* @__PURE__ */ te({
|
|
|
1501
1506
|
class: "space-y-16",
|
|
1502
1507
|
ref_key: "form",
|
|
1503
1508
|
ref: t,
|
|
1504
|
-
onValidationSuccess:
|
|
1509
|
+
onValidationSuccess: T,
|
|
1505
1510
|
blameFormChildOnValidationFailed: ""
|
|
1506
1511
|
}, {
|
|
1507
1512
|
default: N(() => [
|
|
@@ -1511,43 +1516,43 @@ const Xt = /* @__PURE__ */ te({
|
|
|
1511
1516
|
variant: "outlined"
|
|
1512
1517
|
}, {
|
|
1513
1518
|
default: N(() => {
|
|
1514
|
-
var C,
|
|
1519
|
+
var C, B;
|
|
1515
1520
|
return [
|
|
1516
|
-
(C = e(s)) != null && C.image ? (h(), M(
|
|
1521
|
+
(C = e(s)) != null && C.image ? (h(), M(j, {
|
|
1517
1522
|
key: 0,
|
|
1518
1523
|
width: "100",
|
|
1519
|
-
src: (
|
|
1520
|
-
}, null, 8, ["src"])) :
|
|
1524
|
+
src: (B = e(s)) == null ? void 0 : B.image
|
|
1525
|
+
}, null, 8, ["src"])) : E("", !0),
|
|
1521
1526
|
r(H, { class: "flex flex-col gap-16 justify-between" }, {
|
|
1522
1527
|
default: N(() => {
|
|
1523
|
-
var
|
|
1528
|
+
var m;
|
|
1524
1529
|
return [
|
|
1525
1530
|
r(ne, {
|
|
1526
1531
|
class: "p-0",
|
|
1527
|
-
title: (
|
|
1532
|
+
title: (m = e(s)) == null ? void 0 : m.name,
|
|
1528
1533
|
subtitle: e(l)
|
|
1529
1534
|
}, null, 8, ["title", "subtitle"]),
|
|
1530
1535
|
r(H, { class: "p-0" }, {
|
|
1531
1536
|
default: N(() => {
|
|
1532
|
-
var n,
|
|
1537
|
+
var n, p, y, U, O, R, q, J, me, xe, ie;
|
|
1533
1538
|
return [
|
|
1534
|
-
V("div",
|
|
1539
|
+
V("div", pn, [
|
|
1535
1540
|
(n = e(s)) != null && n.isFeedvibe ? (h(), M(Z, {
|
|
1536
1541
|
key: 0,
|
|
1537
1542
|
label: "Feedvibe"
|
|
1538
|
-
})) :
|
|
1539
|
-
(y = (
|
|
1543
|
+
})) : E("", !0),
|
|
1544
|
+
(y = (p = e(s)) == null ? void 0 : p.titles) != null && y.length ? (h(), M(Z, {
|
|
1540
1545
|
key: 1,
|
|
1541
1546
|
label: `${e(s).titles.length} title(s)`
|
|
1542
|
-
}, null, 8, ["label"])) :
|
|
1543
|
-
(
|
|
1547
|
+
}, null, 8, ["label"])) : E("", !0),
|
|
1548
|
+
(O = (U = e(s)) == null ? void 0 : U.vouchers) != null && O.length ? (h(), M(Z, {
|
|
1544
1549
|
key: 2,
|
|
1545
1550
|
label: `${e(s).vouchers.length} voucher(s)`
|
|
1546
|
-
}, null, 8, ["label"])) :
|
|
1551
|
+
}, null, 8, ["label"])) : E("", !0),
|
|
1547
1552
|
(q = (R = e(s)) == null ? void 0 : R.credit) != null && q.normal || (xe = (me = (J = e(s)) == null ? void 0 : J.credit) == null ? void 0 : me.free) != null && xe.amount ? (h(), M(Z, {
|
|
1548
1553
|
key: 3,
|
|
1549
1554
|
label: `${(e(s).credit.normal || 0) + (((ie = e(s).credit.free) == null ? void 0 : ie.amount) || 0)} credit(s)`
|
|
1550
|
-
}, null, 8, ["label"])) :
|
|
1555
|
+
}, null, 8, ["label"])) : E("", !0)
|
|
1551
1556
|
])
|
|
1552
1557
|
];
|
|
1553
1558
|
}),
|
|
@@ -1562,12 +1567,12 @@ const Xt = /* @__PURE__ */ te({
|
|
|
1562
1567
|
_: 1
|
|
1563
1568
|
}),
|
|
1564
1569
|
r(oe, {
|
|
1565
|
-
modelValue: e(
|
|
1566
|
-
"onUpdate:modelValue": $[0] || ($[0] = (C) => se(
|
|
1570
|
+
modelValue: e(v),
|
|
1571
|
+
"onUpdate:modelValue": $[0] || ($[0] = (C) => se(v) ? v.value = C : null),
|
|
1567
1572
|
label: "Select member",
|
|
1568
1573
|
searchable: "",
|
|
1569
|
-
items: e(
|
|
1570
|
-
onSearch:
|
|
1574
|
+
items: e(c),
|
|
1575
|
+
onSearch: d,
|
|
1571
1576
|
rules: [(C) => !!C > 0 || "Member is required"],
|
|
1572
1577
|
"helper-text": "Type to search member"
|
|
1573
1578
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
@@ -1588,47 +1593,47 @@ const Xt = /* @__PURE__ */ te({
|
|
|
1588
1593
|
};
|
|
1589
1594
|
}
|
|
1590
1595
|
});
|
|
1591
|
-
var
|
|
1592
|
-
const
|
|
1596
|
+
var bn = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
|
|
1597
|
+
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" }, xn = { class: "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-24" }, Cn = { class: "flex flex-col gap-16 text-center" }, _n = { class: "fm-typo-en-title-sm-800" }, Sn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, eo = /* @__PURE__ */ te({
|
|
1593
1598
|
__name: "Store",
|
|
1594
1599
|
setup(x) {
|
|
1595
1600
|
const S = {
|
|
1596
1601
|
label: "Setup payout account",
|
|
1597
1602
|
value: "payout",
|
|
1598
1603
|
isPrimary: !1
|
|
1599
|
-
}, { t: a } = he(),
|
|
1604
|
+
}, { t: a } = he(), g = {
|
|
1600
1605
|
label: a("connect.store.actions.setting"),
|
|
1601
1606
|
value: "setting",
|
|
1602
1607
|
isPrimary: !1
|
|
1603
1608
|
}, s = {
|
|
1604
1609
|
label: a("connect.store.actions.manageReward"),
|
|
1605
1610
|
value: "create_reward"
|
|
1606
|
-
},
|
|
1611
|
+
}, v = {
|
|
1607
1612
|
label: a("connect.store.actions.addCategory"),
|
|
1608
1613
|
value: "create_category",
|
|
1609
1614
|
isPrimary: !0,
|
|
1610
1615
|
prependIcon: "add"
|
|
1611
|
-
}, o = I(),
|
|
1612
|
-
async function $(
|
|
1613
|
-
var
|
|
1614
|
-
|
|
1616
|
+
}, o = I(), c = bt(), i = Te(), { global: t, minor: u } = Le, f = Ee(), d = L(() => i.sortedStoreCategories), T = L(() => i.sortedStoreCategories.map((b) => b.name)), l = I(), w = I();
|
|
1617
|
+
async function $(b) {
|
|
1618
|
+
var k;
|
|
1619
|
+
b === "setting" ? (k = l.value) == null || k.showSheet(!0, i.storeOption) : b === "create_category" ? H(-1) : b === "create_reward" ? await c.push({ name: at["$connect-STORE_REWARDS"] }) : b == "payout" && window.open(bn.paymentPortalUrl, "_blank");
|
|
1615
1620
|
}
|
|
1616
|
-
function
|
|
1617
|
-
var
|
|
1618
|
-
const C = !!((
|
|
1621
|
+
function j(b, k) {
|
|
1622
|
+
var p;
|
|
1623
|
+
const C = !!((p = k.company) != null && p.sstRegNo), B = k.inclusiveTaxes ?? [], m = W.taxSystem.map((y) => y.code), n = C ? B.flatMap((y) => {
|
|
1619
1624
|
console.log(y, "inclusive tax");
|
|
1620
|
-
const
|
|
1621
|
-
return
|
|
1625
|
+
const U = W.systemDefaultCode(y.systemCode);
|
|
1626
|
+
return U ? [{ systemCode: y.systemCode, taxCode: U.taxCode }] : [];
|
|
1622
1627
|
}) : [];
|
|
1623
1628
|
return console.log([
|
|
1624
1629
|
["hasSstRegNo", C],
|
|
1625
1630
|
["defaultTaxCodes", n],
|
|
1626
|
-
["inclusiveTaxes",
|
|
1627
|
-
["taxSystemCodes",
|
|
1628
|
-
]),
|
|
1631
|
+
["inclusiveTaxes", B],
|
|
1632
|
+
["taxSystemCodes", m]
|
|
1633
|
+
]), b.map((y) => ({
|
|
1629
1634
|
...y,
|
|
1630
|
-
bundles: y.bundles.map((
|
|
1631
|
-
const { pf_vouchers:
|
|
1635
|
+
bundles: y.bundles.map((U) => {
|
|
1636
|
+
const { pf_vouchers: O, ...R } = U;
|
|
1632
1637
|
if (!C)
|
|
1633
1638
|
return {
|
|
1634
1639
|
...R,
|
|
@@ -1641,8 +1646,8 @@ const bn = { class: "px-24 flex flex-col gap-y-16" }, gn = { class: "flex gap-8
|
|
|
1641
1646
|
q,
|
|
1642
1647
|
R.price,
|
|
1643
1648
|
Number(R.credit.normal),
|
|
1644
|
-
|
|
1645
|
-
|
|
1649
|
+
B,
|
|
1650
|
+
m
|
|
1646
1651
|
);
|
|
1647
1652
|
return {
|
|
1648
1653
|
...R,
|
|
@@ -1651,30 +1656,30 @@ const bn = { class: "px-24 flex flex-col gap-y-16" }, gn = { class: "flex gap-8
|
|
|
1651
1656
|
priceWithTaxes: qe(
|
|
1652
1657
|
J,
|
|
1653
1658
|
R.price,
|
|
1654
|
-
|
|
1659
|
+
B
|
|
1655
1660
|
)
|
|
1656
1661
|
};
|
|
1657
1662
|
})
|
|
1658
1663
|
}));
|
|
1659
1664
|
}
|
|
1660
|
-
async function ne(
|
|
1661
|
-
const
|
|
1665
|
+
async function ne(b, k, C) {
|
|
1666
|
+
const B = !C && !!k, m = !!C && !k;
|
|
1662
1667
|
let n;
|
|
1663
|
-
if (
|
|
1664
|
-
const y = W.taxSystem[0] ? W.systemDefaultCode(W.taxSystem[0].code) : void 0,
|
|
1668
|
+
if (B) {
|
|
1669
|
+
const y = W.taxSystem[0] ? W.systemDefaultCode(W.taxSystem[0].code) : void 0, U = y ? `${y.name} (${y.taxCode})` : a("connect.store.taxPropagation.defaultTax");
|
|
1665
1670
|
n = a("connect.store.taxPropagation.addConfirm", {
|
|
1666
|
-
taxCode:
|
|
1671
|
+
taxCode: U
|
|
1667
1672
|
});
|
|
1668
|
-
} else
|
|
1673
|
+
} else m ? n = a("connect.store.taxPropagation.removeConfirm") : n = a("connect.store.taxPropagation.updateConfirm");
|
|
1669
1674
|
await ye.confirm(
|
|
1670
1675
|
n,
|
|
1671
1676
|
a("connect.store.taxPropagation.title"),
|
|
1672
1677
|
a("connect.store.taxPropagation.confirm"),
|
|
1673
1678
|
a("connect.common.cancel")
|
|
1674
|
-
) && await
|
|
1679
|
+
) && await u(
|
|
1675
1680
|
async () => {
|
|
1676
|
-
const y = Fe(i.sortedStoreCategories),
|
|
1677
|
-
await be.updateStoreBundle({ categories:
|
|
1681
|
+
const y = Fe(i.sortedStoreCategories), U = j(y, b);
|
|
1682
|
+
await be.updateStoreBundle({ categories: U }), await i.readMemberStore(), await i.readMembership(), await i.readRewards();
|
|
1678
1683
|
},
|
|
1679
1684
|
{
|
|
1680
1685
|
message: a("connect.store.taxPropagation.updating"),
|
|
@@ -1682,77 +1687,77 @@ const bn = { class: "px-24 flex flex-col gap-y-16" }, gn = { class: "flex gap-8
|
|
|
1682
1687
|
}
|
|
1683
1688
|
);
|
|
1684
1689
|
}
|
|
1685
|
-
async function Z(
|
|
1686
|
-
var
|
|
1687
|
-
const
|
|
1690
|
+
async function Z(b) {
|
|
1691
|
+
var U, O, R, q;
|
|
1692
|
+
const k = ((O = (U = i.storeOption) == null ? void 0 : U.company) == null ? void 0 : O.sstRegNo) ?? "", C = ae.cloneDeep(
|
|
1688
1693
|
((R = i.storeOption) == null ? void 0 : R.inclusiveTaxes) ?? []
|
|
1689
|
-
),
|
|
1690
|
-
await
|
|
1694
|
+
), B = ((q = b.company) == null ? void 0 : q.sstRegNo) ?? "";
|
|
1695
|
+
await u(
|
|
1691
1696
|
async () => {
|
|
1692
1697
|
var J;
|
|
1693
|
-
await be.updateStore(
|
|
1698
|
+
await be.updateStore(b), await i.readMemberStore(), (J = l.value) == null || J.showSheet(!1);
|
|
1694
1699
|
},
|
|
1695
1700
|
{
|
|
1696
1701
|
message: a("connect.store.setting.update.message"),
|
|
1697
1702
|
successMessage: a("connect.store.setting.update.success")
|
|
1698
1703
|
}
|
|
1699
1704
|
);
|
|
1700
|
-
const
|
|
1705
|
+
const m = k !== B, n = !ae.isEqual(
|
|
1701
1706
|
C,
|
|
1702
|
-
|
|
1707
|
+
b.inclusiveTaxes ?? []
|
|
1703
1708
|
);
|
|
1704
|
-
!(
|
|
1709
|
+
!(m || n) || i.sortedStoreCategories.flatMap(
|
|
1705
1710
|
(J) => J.bundles
|
|
1706
|
-
).length === 0 || await ne(
|
|
1711
|
+
).length === 0 || await ne(b, B, k);
|
|
1707
1712
|
}
|
|
1708
|
-
async function H(
|
|
1709
|
-
var
|
|
1713
|
+
async function H(b = -1) {
|
|
1714
|
+
var k, C;
|
|
1710
1715
|
if ((!i.storeOption || !i.storeOption.company) && await ye.confirm(
|
|
1711
1716
|
a("connect.store.category.setup.title"),
|
|
1712
1717
|
a("connect.store.category.setup.button"),
|
|
1713
1718
|
a("connect.store.category.setup.action"),
|
|
1714
1719
|
a("connect.common.cancel")
|
|
1715
1720
|
))
|
|
1716
|
-
return (
|
|
1717
|
-
|
|
1718
|
-
title:
|
|
1721
|
+
return (k = l.value) == null ? void 0 : k.showSheet(!0);
|
|
1722
|
+
f.open({
|
|
1723
|
+
title: b == -1 ? a("connect.store.category.add") : a("connect.store.category.edit"),
|
|
1719
1724
|
contentComponent: kt,
|
|
1720
1725
|
contentComponentProps: {
|
|
1721
|
-
initialValue: ((C =
|
|
1722
|
-
action:
|
|
1726
|
+
initialValue: ((C = d.value[b]) == null ? void 0 : C.name) ?? "",
|
|
1727
|
+
action: b == -1 ? "add" : "edit"
|
|
1723
1728
|
}
|
|
1724
|
-
}).onPrimary(async (
|
|
1725
|
-
|
|
1729
|
+
}).onPrimary(async (B) => {
|
|
1730
|
+
B === null && !await ye.remove(
|
|
1726
1731
|
a("connect.store.category.remove.confirm"),
|
|
1727
1732
|
a("connect.store.category.remove.title")
|
|
1728
|
-
) || await
|
|
1733
|
+
) || await u(
|
|
1729
1734
|
async () => {
|
|
1730
|
-
const
|
|
1735
|
+
const m = b == -1 ? [...d.value, { name: B, bundles: [] }] : [...d.value].map((n, p) => p == b ? { ...n, name: B } : n).filter((n) => n.name !== null);
|
|
1731
1736
|
await be.updateStoreBundle({
|
|
1732
|
-
categories:
|
|
1737
|
+
categories: m
|
|
1733
1738
|
}), await i.readMemberStore();
|
|
1734
1739
|
},
|
|
1735
1740
|
{
|
|
1736
|
-
message:
|
|
1737
|
-
successMessage:
|
|
1741
|
+
message: B === null ? a("connect.store.category.update.deleting") : b == -1 ? a("connect.store.category.update.creating") : a("connect.store.category.update.updating"),
|
|
1742
|
+
successMessage: B === null ? a("connect.store.category.update.success.deleted") : b == -1 ? a("connect.store.category.update.success.created") : a("connect.store.category.update.success.updated")
|
|
1738
1743
|
}
|
|
1739
1744
|
);
|
|
1740
1745
|
});
|
|
1741
1746
|
}
|
|
1742
|
-
async function z(
|
|
1743
|
-
var
|
|
1744
|
-
|
|
1745
|
-
const
|
|
1746
|
-
for (const
|
|
1747
|
-
for (const R of
|
|
1747
|
+
async function z(b, k, C, B) {
|
|
1748
|
+
var p, y, U;
|
|
1749
|
+
k ?? (k = (p = w.value) == null ? void 0 : p.target.category), C ?? (C = (y = w.value) == null ? void 0 : y.target.index), B ?? (B = (U = w.value) == null ? void 0 : U.target.originalCategoryIndex);
|
|
1750
|
+
const m = Fe(d.value);
|
|
1751
|
+
for (const O of m)
|
|
1752
|
+
for (const R of O.bundles)
|
|
1748
1753
|
console.log(R, "bundle in payload"), "pf_vouchers" in R && delete R.pf_vouchers;
|
|
1749
|
-
|
|
1750
|
-
const n =
|
|
1754
|
+
k != B && B != null && (m[B].bundles.splice(C, 1), C = m[k].bundles.length);
|
|
1755
|
+
const n = m[k];
|
|
1751
1756
|
if (!n) {
|
|
1752
1757
|
st.error("Unexpected error", 2e3);
|
|
1753
1758
|
return;
|
|
1754
1759
|
}
|
|
1755
|
-
if (
|
|
1760
|
+
if (b == null) {
|
|
1756
1761
|
if (await ye.remove(
|
|
1757
1762
|
a("connect.store.bundle.delete.confirm"),
|
|
1758
1763
|
a("connect.store.bundle.delete.title")
|
|
@@ -1760,47 +1765,47 @@ const bn = { class: "px-24 flex flex-col gap-y-16" }, gn = { class: "flex gap-8
|
|
|
1760
1765
|
return;
|
|
1761
1766
|
n.bundles.splice(C, 1);
|
|
1762
1767
|
} else
|
|
1763
|
-
C == -1 ? n.bundles.push(
|
|
1764
|
-
await
|
|
1768
|
+
C == -1 ? n.bundles.push(b) : n.bundles[C] = b;
|
|
1769
|
+
await u(
|
|
1765
1770
|
async () => {
|
|
1766
|
-
var
|
|
1767
|
-
if (
|
|
1768
|
-
const q = (
|
|
1769
|
-
q === null &&
|
|
1771
|
+
var O, R;
|
|
1772
|
+
if (b != null) {
|
|
1773
|
+
const q = (O = w.value) == null ? void 0 : O.bundleImage;
|
|
1774
|
+
q === null && b.image ? (await Ve.delete(b.image), b.image = null) : q && (b.image = await Ve.update(
|
|
1770
1775
|
Ve.bundleImagePath(void 0, q),
|
|
1771
1776
|
q
|
|
1772
1777
|
));
|
|
1773
1778
|
}
|
|
1774
1779
|
await be.updateStoreBundle({
|
|
1775
|
-
categories:
|
|
1776
|
-
}), await i.readMemberStore(), await i.readMembership(), await i.readRewards(), (R =
|
|
1780
|
+
categories: m
|
|
1781
|
+
}), await i.readMemberStore(), await i.readMembership(), await i.readRewards(), (R = w.value) == null || R.showSheet(!1);
|
|
1777
1782
|
},
|
|
1778
1783
|
{
|
|
1779
|
-
message: `${
|
|
1780
|
-
successMessage: `Bundle ${
|
|
1784
|
+
message: `${b == null ? "Deleting" : C == -1 ? "Creating" : "Updating"} bundle`,
|
|
1785
|
+
successMessage: `Bundle ${b == null ? "deleted" : C == -1 ? "created" : "updated"} successfully`
|
|
1781
1786
|
}
|
|
1782
1787
|
);
|
|
1783
1788
|
}
|
|
1784
|
-
function oe(
|
|
1785
|
-
var
|
|
1786
|
-
(
|
|
1787
|
-
...
|
|
1788
|
-
bundle:
|
|
1789
|
+
function oe(b) {
|
|
1790
|
+
var k;
|
|
1791
|
+
(k = w.value) == null || k.showSheet(!0, {
|
|
1792
|
+
...b,
|
|
1793
|
+
bundle: b.bundle ? Fe(b.bundle) : void 0
|
|
1789
1794
|
});
|
|
1790
1795
|
}
|
|
1791
1796
|
const F = I([]);
|
|
1792
|
-
function re(
|
|
1793
|
-
var
|
|
1794
|
-
(
|
|
1795
|
-
bundle:
|
|
1797
|
+
function re(b) {
|
|
1798
|
+
var k;
|
|
1799
|
+
(k = o.value) == null || k.showSheet({
|
|
1800
|
+
bundle: b
|
|
1796
1801
|
});
|
|
1797
1802
|
}
|
|
1798
1803
|
return ve(async () => {
|
|
1799
|
-
var
|
|
1804
|
+
var k, C;
|
|
1800
1805
|
await t(async () => {
|
|
1801
|
-
var
|
|
1802
|
-
if (await i.readMemberStore(), await i.readMembership(), await i.readRewards(), await i.readPayoutAccount(), (
|
|
1803
|
-
switch ((
|
|
1806
|
+
var B, m;
|
|
1807
|
+
if (await i.readMemberStore(), await i.readMembership(), await i.readRewards(), await i.readPayoutAccount(), (B = c.currentRoute.value.query) != null && B.action) {
|
|
1808
|
+
switch ((m = c.currentRoute.value.query) == null ? void 0 : m.action) {
|
|
1804
1809
|
case "update_setting":
|
|
1805
1810
|
$("setting");
|
|
1806
1811
|
break;
|
|
@@ -1808,116 +1813,116 @@ const bn = { class: "px-24 flex flex-col gap-y-16" }, gn = { class: "flex gap-8
|
|
|
1808
1813
|
H(-1);
|
|
1809
1814
|
break;
|
|
1810
1815
|
case "create_feedvibe_bundle":
|
|
1811
|
-
|
|
1816
|
+
f.open({
|
|
1812
1817
|
title: "Select category",
|
|
1813
|
-
contentComponent:
|
|
1818
|
+
contentComponent: Ut
|
|
1814
1819
|
}).onPrimary((n) => {
|
|
1815
|
-
|
|
1816
|
-
categories:
|
|
1820
|
+
f.close(), oe({
|
|
1821
|
+
categories: T.value,
|
|
1817
1822
|
category: n,
|
|
1818
1823
|
index: -1,
|
|
1819
1824
|
bundle: {
|
|
1820
1825
|
...ae.cloneDeep(we),
|
|
1821
1826
|
isFeedvibe: !0,
|
|
1822
|
-
price:
|
|
1827
|
+
price: A.Dinero.fromNumber({
|
|
1823
1828
|
number: 10,
|
|
1824
1829
|
precision: 2
|
|
1825
1830
|
}).toObject()
|
|
1826
1831
|
}
|
|
1827
1832
|
});
|
|
1828
|
-
}).onTertiary(() =>
|
|
1833
|
+
}).onTertiary(() => f.close());
|
|
1829
1834
|
break;
|
|
1830
1835
|
}
|
|
1831
|
-
|
|
1836
|
+
c.replace({ query: {} });
|
|
1832
1837
|
}
|
|
1833
1838
|
});
|
|
1834
|
-
const
|
|
1839
|
+
const b = ((k = i.payoutAccount) == null ? void 0 : k.status) === "APPROVED" && ((C = i.payoutAccount) == null ? void 0 : C.enable) === !0;
|
|
1835
1840
|
F.value = [
|
|
1836
|
-
...
|
|
1837
|
-
|
|
1841
|
+
...b ? [] : [S],
|
|
1842
|
+
g,
|
|
1838
1843
|
s,
|
|
1839
|
-
|
|
1844
|
+
v
|
|
1840
1845
|
];
|
|
1841
|
-
}), (
|
|
1842
|
-
const C = _("FmPageHead"),
|
|
1846
|
+
}), (b, k) => {
|
|
1847
|
+
const C = _("FmPageHead"), B = _("FmButton"), m = _("FmCard");
|
|
1843
1848
|
return h(), D(Y, null, [
|
|
1844
1849
|
r(C, {
|
|
1845
1850
|
title: e(a)("connect.store.title"),
|
|
1846
1851
|
actions: e(F),
|
|
1847
1852
|
"onClick:action": $
|
|
1848
1853
|
}, null, 8, ["title", "actions"]),
|
|
1849
|
-
V("div",
|
|
1850
|
-
e(
|
|
1851
|
-
(h(!0), D(Y, null, ue(e(
|
|
1854
|
+
V("div", gn, [
|
|
1855
|
+
e(d) && e(d).length > 0 ? (h(), D(Y, { key: 0 }, [
|
|
1856
|
+
(h(!0), D(Y, null, ue(e(d), (n, p) => (h(), D("div", {
|
|
1852
1857
|
key: n.name,
|
|
1853
1858
|
class: "space-y-8 py-12"
|
|
1854
1859
|
}, [
|
|
1855
|
-
V("div",
|
|
1856
|
-
V("div",
|
|
1857
|
-
r(
|
|
1858
|
-
r(
|
|
1860
|
+
V("div", vn, [
|
|
1861
|
+
V("div", hn, K(n.name), 1),
|
|
1862
|
+
r(ke, { json: n }, null, 8, ["json"]),
|
|
1863
|
+
r(B, {
|
|
1859
1864
|
icon: "edit",
|
|
1860
1865
|
size: "md",
|
|
1861
1866
|
variant: "tertiary",
|
|
1862
|
-
onClick: (y) => H(
|
|
1867
|
+
onClick: (y) => H(p)
|
|
1863
1868
|
}, null, 8, ["onClick"])
|
|
1864
1869
|
]),
|
|
1865
|
-
V("div",
|
|
1866
|
-
(h(!0), D(Y, null, ue(n.bundles, (y,
|
|
1870
|
+
V("div", xn, [
|
|
1871
|
+
(h(!0), D(Y, null, ue(n.bundles, (y, U) => (h(), M(Ft, {
|
|
1867
1872
|
bundle: y,
|
|
1868
1873
|
key: y._id,
|
|
1869
|
-
onEdit: (
|
|
1874
|
+
onEdit: (O) => oe({
|
|
1870
1875
|
bundle: y,
|
|
1871
|
-
category:
|
|
1872
|
-
index:
|
|
1873
|
-
categories: e(
|
|
1876
|
+
category: p,
|
|
1877
|
+
index: U,
|
|
1878
|
+
categories: e(T)
|
|
1874
1879
|
}),
|
|
1875
|
-
onDelete: (
|
|
1880
|
+
onDelete: (O) => z(null, p, U),
|
|
1876
1881
|
onSend: re
|
|
1877
1882
|
}, null, 8, ["bundle", "onEdit", "onDelete"]))), 128)),
|
|
1878
|
-
r(
|
|
1883
|
+
r(Vt, {
|
|
1879
1884
|
onCreate: (y) => oe({
|
|
1880
|
-
category:
|
|
1885
|
+
category: p,
|
|
1881
1886
|
index: -1,
|
|
1882
|
-
categories: e(
|
|
1887
|
+
categories: e(T)
|
|
1883
1888
|
})
|
|
1884
1889
|
}, null, 8, ["onCreate"])
|
|
1885
1890
|
])
|
|
1886
1891
|
]))), 128)),
|
|
1887
|
-
r(
|
|
1892
|
+
r(mn, {
|
|
1888
1893
|
ref_key: "bundleSheetRef",
|
|
1889
|
-
ref:
|
|
1894
|
+
ref: w,
|
|
1890
1895
|
onUpdate: z
|
|
1891
1896
|
}, null, 512)
|
|
1892
|
-
], 64)) : (h(), M(
|
|
1897
|
+
], 64)) : (h(), M(m, {
|
|
1893
1898
|
key: 1,
|
|
1894
1899
|
variant: "outlined",
|
|
1895
1900
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
1896
1901
|
}, {
|
|
1897
1902
|
default: N(() => [
|
|
1898
|
-
|
|
1903
|
+
k[1] || (k[1] = V("img", {
|
|
1899
1904
|
src: Ge,
|
|
1900
1905
|
class: "aspect-square w-[150px]"
|
|
1901
1906
|
}, null, -1)),
|
|
1902
|
-
V("div",
|
|
1903
|
-
V("div",
|
|
1904
|
-
V("div",
|
|
1907
|
+
V("div", Cn, [
|
|
1908
|
+
V("div", _n, K(e(a)("connect.store.bundle.title")), 1),
|
|
1909
|
+
V("div", Sn, K(e(a)("connect.store.bundle.description")), 1)
|
|
1905
1910
|
]),
|
|
1906
|
-
r(
|
|
1911
|
+
r(B, {
|
|
1907
1912
|
variant: "primary",
|
|
1908
1913
|
label: e(a)("connect.store.actions.addCategory"),
|
|
1909
1914
|
icon: "add",
|
|
1910
|
-
onClick:
|
|
1915
|
+
onClick: k[0] || (k[0] = (n) => H(-1))
|
|
1911
1916
|
}, null, 8, ["label"])
|
|
1912
1917
|
]),
|
|
1913
1918
|
_: 1
|
|
1914
1919
|
})),
|
|
1915
|
-
r(
|
|
1920
|
+
r(Gt, {
|
|
1916
1921
|
ref_key: "settingSheetRef",
|
|
1917
1922
|
ref: l,
|
|
1918
1923
|
onUpdate: Z
|
|
1919
1924
|
}, null, 512),
|
|
1920
|
-
r(
|
|
1925
|
+
r(yn, {
|
|
1921
1926
|
ref_key: "sendBundleSheetRef",
|
|
1922
1927
|
ref: o
|
|
1923
1928
|
}, null, 512)
|
|
@@ -1927,5 +1932,5 @@ const bn = { class: "px-24 flex flex-col gap-y-16" }, gn = { class: "flex gap-8
|
|
|
1927
1932
|
}
|
|
1928
1933
|
});
|
|
1929
1934
|
export {
|
|
1930
|
-
|
|
1935
|
+
eo as default
|
|
1931
1936
|
};
|