@feedmepos/mf-connect 0.1.0-beta.52 → 0.1.0-beta.54
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-eM5wSIq3.js → Analytic-DNI1i_SI.js} +11 -11
- package/dist/{App-CE5JR4sB.js → App-DObCjrhE.js} +6 -6
- package/dist/{AuditLogs-CKM2f5jL.js → AuditLogs-DImm4Ydu.js} +8 -8
- package/dist/{Bin-BO6zBFo4.js → Bin-CcNRMd0x.js} +8 -8
- package/dist/{Broadcast-DhDeFzOs.js → Broadcast-BotivEx9.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C3FCSY93.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Ba3NttQm.js} +6 -6
- package/dist/{Card-BbSPG5km.js → Card-1LyRUNDz.js} +15 -15
- package/dist/{Collections-CkOpj0Wg.js → Collections-CCwwox7X.js} +5 -5
- package/dist/{Credit-BjvcZacV.js → Credit-C4FehhPS.js} +9 -9
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DCWIsL3V.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BlTxHhHW.js} +28 -28
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-ClN1qkTN.js → EffectSheet.vue_vue_type_style_index_0_lang-CEfunKXB.js} +6 -6
- package/dist/{Experience-DyO-gHO_.js → Experience-gBfv7ru-.js} +9 -9
- package/dist/{Game-Co3BfPu3.js → Game-R9RusPq4.js} +9 -9
- package/dist/{Index-BcGZNNFo.js → Index-DIwqSHLL.js} +10 -10
- package/dist/{Marketing-CiF00HvP.js → Marketing-CZYD2ddp.js} +6 -6
- package/dist/{Member-C22-lFU7.js → Member-CLlV_z9S.js} +4 -4
- package/dist/{MemberList-Dzjk-5n6.js → MemberList-DqeHySdg.js} +24 -24
- package/dist/{MemberTransactions-C7E1iu0Z.js → MemberTransactions-CXy0zxGc.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BDAd1FfZ.js → MessageInput.vue_vue_type_script_setup_true_lang-CbTndvQx.js} +2 -2
- package/dist/{Mission-n7-tIP7z.js → Mission-Dt2R9JVy.js} +9 -9
- package/dist/{Overview-Dmigl2pN.js → Overview-BrSbdy2_.js} +17 -17
- package/dist/{Point-BlQE0m9D.js → Point-BB4OoQ9O.js} +9 -9
- package/dist/{Promotion-GlxsMsIg.js → Promotion-Cd-4VoeS.js} +10 -10
- package/dist/{Record-BefJZgvj.js → Record-jvc_mbY3.js} +7 -7
- package/dist/{Reward-CUbIIHTl.js → Reward-BlbNKLJO.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DUX9BwsW.js → RewardGroup.vue_vue_type_script_setup_true_lang-DPA6NyE3.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-cq8G7-fM.js → RuleGroup.vue_vue_type_script_setup_true_lang-DeDE4FBr.js} +12 -12
- package/dist/{Segment-DEVXaRFL.js → Segment-IxmlRjfR.js} +14 -14
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BcOGDkFU.js → SelectItems.vue_vue_type_script_setup_true_lang-DGXsFLVO.js} +2 -2
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-kSqxHrnm.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CIuHzjZF.js} +3 -3
- package/dist/{Setting-DnC7yLcM.js → Setting-D2KZjG9v.js} +10 -10
- package/dist/{Store-9dAjo5rv.js → Store-BAtjSdn-.js} +188 -184
- package/dist/{StoreRewards-D8Dribci.js → StoreRewards-zWZU6tL0.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DSG7O-M-.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DPGqXgEM.js} +17 -17
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-oFL99RHL.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CpM53JM7.js} +1 -1
- package/dist/{Tier-B5fiDSOZ.js → Tier-CfrVPz6a.js} +19 -19
- package/dist/{Title-D2quIAl7.js → Title-CUrZfzDs.js} +19 -19
- package/dist/{Transaction-CZ-4AXGM.js → Transaction-DBjMeSL6.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-B_F9ILs2.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BnGFcBsw.js} +6 -6
- package/dist/{Voucher-RC_MV77E.js → Voucher-k0x5ghAp.js} +12 -12
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BF4TNhAg.js → VoucherEditor.vue_vue_type_script_setup_true_lang-B3Zbbg8H.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BcFSHgu5.js → ZodTextField.vue_vue_type_script_setup_true_lang-BCtEZ3YW.js} +1 -1
- package/dist/{app-BcRFSKHF.js → app-BX_kcnjN.js} +1 -1
- package/dist/{app-BFKvz0iO.js → app-C27ny1rN.js} +1879 -875
- package/dist/app.js +1 -1
- package/dist/{business-Dtdq_qB6.js → business-CaL8dhbB.js} +1 -1
- package/dist/{campaign-C_8pfSD0.js → campaign-BEPgE5CH.js} +9 -9
- package/dist/{campaign-D8MI9bba.js → campaign-D1IDv9pf.js} +2 -2
- package/dist/{campaign.enum-D6wXzU8c.js → campaign.enum-DPtLnWTT.js} +1 -1
- package/dist/{campaign.fn-DYvAYB_g.js → campaign.fn-gbTZCSx4.js} +2 -2
- package/dist/{collectible.enum-B2PVytKL.js → collectible.enum-BGp0i5br.js} +1 -1
- package/dist/{collection.fn-CrhuLaRp.js → collection.fn-BRYSNJcJ.js} +2 -2
- package/dist/{dto-DvFABDFC.js → dto-CKsjCDtT.js} +4 -4
- package/dist/{effect-j4eNI_tD.js → effect-COM0bU6H.js} +1 -1
- package/dist/{email-addresses-DzwFp0Ra.js → email-addresses-8dkAXaaH.js} +1 -1
- package/dist/{export-CDD92kQj.js → export-BOyaDPx1.js} +3 -3
- package/dist/{helper-Bp5DYdlO.js → helper-BPWsTSo7.js} +1 -1
- package/dist/{index-BYU6IQab.js → index-3cal5Crf.js} +2 -2
- package/dist/{index-Bt3fVUvz.js → index-BcGf92gd.js} +1 -1
- package/dist/{index-DT7P_8Ww.js → index-C9HOsq0v.js} +1 -1
- package/dist/{index-C2HpLzKJ.js → index-CPPpEEkl.js} +6 -6
- package/dist/{index-VxnFdTrM.js → index-CPhjQE7M.js} +1 -1
- package/dist/{index-DnCvt-eJ.js → index-DOCmOcoV.js} +1004 -971
- package/dist/{index-BBOgEhrv.js → index-DnwoMUg-.js} +1 -1
- package/dist/{index-BjDJpKrE.js → index-EZiP7ATV.js} +1 -1
- package/dist/{index-DeEccaMS.js → index-KMvP72cy.js} +3 -3
- package/dist/{index-DSW4UYS0.js → index-M-cFQZfx.js} +1 -1
- package/dist/{index-CASv_1yb.js → index-syqkAq4m.js} +1 -1
- package/dist/{index-C0jNXCQ0.js → index-ziYFMe26.js} +3 -3
- package/dist/{index.esm2017-mCYxaZqX.js → index.esm2017-Bkj89W-b.js} +1 -1
- package/dist/{loading-CUNU_mRI.js → loading--fQbVp4h.js} +1 -1
- package/dist/{membership-BfIaEfcW.js → membership-Bz5Os9GI.js} +3 -3
- package/dist/{money-CevZkmiG.js → money-m-8Q9Cic.js} +1 -1
- package/dist/{number-Bq4q-cox.js → number-BL2f3-uB.js} +1 -1
- package/dist/{objectid-DeYE-OB0.js → objectid-Uw4EvP0I.js} +8 -8
- package/dist/{plugins-CBO_LQth.js → plugins-BHMrdAR2.js} +4 -4
- package/dist/{reward-D4wyxVei.js → reward-fbGsZP19.js} +1 -1
- package/dist/{rule-CYheCB_L.js → rule-C4G5Qgb9.js} +3 -3
- package/dist/{rule-builder-BDhv8LAT.js → rule-builder-t9GpaWj-.js} +1 -1
- package/dist/{template-DuHzaZDs.js → template-DQJGwq08.js} +4 -4
- package/dist/{trigger-DFeQGpvS.js → trigger-Iva-VDNY.js} +4 -4
- package/dist/{user-pWH00Chg.js → user-Ck3D1xfX.js} +1 -1
- package/dist/{vue-i18n-BjmsrwrN.js → vue-i18n-D3N-L0QD.js} +243 -243
- package/dist/{xlsx-BL2_ALki.js → xlsx-CcF8Y9u8.js} +1 -1
- package/package.json +1 -1
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { defineComponent as ee, computed as E, resolveComponent as h, openBlock as v, createBlock as I, withCtx as T, createElementVNode as _, createElementBlock as D, createVNode as r, createCommentVNode as A, toDisplayString as j, unref as e, Fragment as
|
|
1
|
+
import { defineComponent as ee, computed as E, resolveComponent as h, openBlock as v, createBlock as I, withCtx as T, createElementVNode as _, createElementBlock as D, createVNode as r, createCommentVNode as A, toDisplayString as j, unref as e, Fragment as X, renderList as re, ref as R, isRef as oe, reactive as He, onMounted as fe, watch as we, toRaw as qe, createTextVNode as de, h as Ke } from "vue";
|
|
2
2
|
import { _ as We } from "./tier-BJDhpH6X.js";
|
|
3
3
|
import { useDialog as Ae, useDialogChild as Me, components as ze } from "@feedmepos/ui-library";
|
|
4
|
-
import { c as B, e as Ce, S as Ye } from "./index-
|
|
5
|
-
import { u as Ee } from "./loading
|
|
6
|
-
import { u as $e, C as me } from "./membership-
|
|
4
|
+
import { c as B, e as Ce, S as Ye } from "./index-ziYFMe26.js";
|
|
5
|
+
import { u as Ee } from "./loading--fQbVp4h.js";
|
|
6
|
+
import { u as $e, C as me } from "./membership-Bz5Os9GI.js";
|
|
7
7
|
import { a as Je, c as Ne } from "./object-qECH92oz.js";
|
|
8
8
|
import { _ as ue } from "./lodash-B5I3zXaY.js";
|
|
9
|
-
import { d as se, a as Ge, p as he, n as Xe, f as Fe } from "./plugins-
|
|
10
|
-
import { u as be } from "./vue-i18n-
|
|
11
|
-
import { Z, g as
|
|
12
|
-
import { z as Q, R as Ze } from "./app-
|
|
13
|
-
import { k as Qe, l as et, m as tt, n as Oe, o as nt } from "./index-
|
|
9
|
+
import { d as se, a as Ge, p as he, n as Xe, f as Fe } from "./plugins-BHMrdAR2.js";
|
|
10
|
+
import { u as be } from "./vue-i18n-D3N-L0QD.js";
|
|
11
|
+
import { Z, g as J, a as G } from "./zod-Bg2FbC-D.js";
|
|
12
|
+
import { z as Q, R as Ze } from "./app-C27ny1rN.js";
|
|
13
|
+
import { k as Qe, l as et, m as tt, n as Oe, o as nt } from "./index-DOCmOcoV.js";
|
|
14
14
|
import { u as _e } from "./app-wDQR6dpb.js";
|
|
15
|
-
import { _ as te } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
15
|
+
import { _ as te } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BCtEZ3YW.js";
|
|
16
16
|
import { J as ke } from "./JsonViewer-v8_C7l5N.js";
|
|
17
|
-
import { _ as ot } from "./index-
|
|
17
|
+
import { _ as ot } from "./index-3cal5Crf.js";
|
|
18
18
|
import { _ as lt } from "./ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js";
|
|
19
19
|
import { _ as at } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
20
|
-
import { z as st, a as rt } from "./money-
|
|
21
|
-
import { F as it } from "./number-
|
|
22
|
-
import { t as dt } from "./helper-
|
|
23
|
-
import "./index-
|
|
24
|
-
import "./index-
|
|
25
|
-
import "./index-
|
|
26
|
-
import "./index-
|
|
27
|
-
import { m as ut } from "./index-
|
|
28
|
-
import { m as xe } from "./index-
|
|
20
|
+
import { z as st, a as rt } from "./money-m-8Q9Cic.js";
|
|
21
|
+
import { F as it } from "./number-BL2f3-uB.js";
|
|
22
|
+
import { t as dt } from "./helper-BPWsTSo7.js";
|
|
23
|
+
import "./index-M-cFQZfx.js";
|
|
24
|
+
import "./index-CPPpEEkl.js";
|
|
25
|
+
import "./index-CPhjQE7M.js";
|
|
26
|
+
import "./index-KMvP72cy.js";
|
|
27
|
+
import { m as ut } from "./index-BcGf92gd.js";
|
|
28
|
+
import { m as xe } from "./index-C9HOsq0v.js";
|
|
29
29
|
import { useRouter as ct } from "vue-router";
|
|
30
30
|
function je(g) {
|
|
31
31
|
return se.DineroFactory(g).toUnit();
|
|
32
32
|
}
|
|
33
33
|
function mt(g, x, a, f, i = [], b = []) {
|
|
34
34
|
const o = ot.compact(
|
|
35
|
-
x.map((t) => g.find((
|
|
35
|
+
x.map((t) => g.find((c) => c.systemCode === t.systemCode && c.taxCode === t.taxCode)).filter((t) => !!t && b.includes(t.systemCode))
|
|
36
36
|
), m = o.reduce(
|
|
37
|
-
(t,
|
|
37
|
+
(t, c) => {
|
|
38
38
|
var y;
|
|
39
39
|
return Object.assign(t, {
|
|
40
|
-
[
|
|
41
|
-
inclusive: ((y = i.find((
|
|
40
|
+
[c.taxCode]: {
|
|
41
|
+
inclusive: ((y = i.find((d) => d.systemCode === c.systemCode)) == null ? void 0 : y.inclusive) || !1,
|
|
42
42
|
adjustment: {
|
|
43
43
|
level: 1,
|
|
44
44
|
type: {
|
|
45
45
|
type: "BY_MULTIPLIER",
|
|
46
46
|
amount: {
|
|
47
|
-
amount:
|
|
48
|
-
precision:
|
|
47
|
+
amount: c.rate.amount,
|
|
48
|
+
precision: c.rate.precision,
|
|
49
49
|
currency: "MYR"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -54,7 +54,7 @@ function mt(g, x, a, f, i = [], b = []) {
|
|
|
54
54
|
});
|
|
55
55
|
},
|
|
56
56
|
{}
|
|
57
|
-
),
|
|
57
|
+
), u = se.Calculator.calculate({
|
|
58
58
|
items: {
|
|
59
59
|
0: {
|
|
60
60
|
quantity: 1,
|
|
@@ -80,7 +80,7 @@ function mt(g, x, a, f, i = [], b = []) {
|
|
|
80
80
|
taxCode: t.taxCode,
|
|
81
81
|
rate: t.rate,
|
|
82
82
|
total: se.DineroFactory({
|
|
83
|
-
...
|
|
83
|
+
...u.items[0].taxes[t.taxCode]
|
|
84
84
|
}).convertPrecision(2).toObject()
|
|
85
85
|
}));
|
|
86
86
|
}
|
|
@@ -106,16 +106,16 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
106
106
|
`${B.Config.getCountry().currency.symbol}${je(a.bundle.price)}`
|
|
107
107
|
), a.bundle.coinPrice && o.push(`${a.bundle.coinPrice} point(s)`), o.join(" or ");
|
|
108
108
|
}), b = E(() => {
|
|
109
|
-
var m,
|
|
109
|
+
var m, u;
|
|
110
110
|
const o = [];
|
|
111
111
|
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 || (m = a.bundle.credit.free) != null && m.amount) {
|
|
112
|
-
const t = a.bundle.credit.normal + (((
|
|
112
|
+
const t = a.bundle.credit.normal + (((u = a.bundle.credit.free) == null ? void 0 : u.amount) ?? 0);
|
|
113
113
|
o.push(`${t} credit(s)`);
|
|
114
114
|
}
|
|
115
115
|
return o;
|
|
116
116
|
});
|
|
117
117
|
return (o, m) => {
|
|
118
|
-
const
|
|
118
|
+
const u = h("FmIcon"), t = h("FmChip"), c = h("FmButton"), y = h("FmMenuItem"), d = h("FmMenu"), S = h("FmCard");
|
|
119
119
|
return v(), I(S, {
|
|
120
120
|
variant: "outlined",
|
|
121
121
|
class: "flex flex-col gap-y-8 p-16 min-h-[240px] h-full text-center items-center"
|
|
@@ -126,7 +126,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
126
126
|
key: 1,
|
|
127
127
|
src: g.bundle.image,
|
|
128
128
|
class: "w-full h-full object-contain aspect-video"
|
|
129
|
-
}, null, 8, ft)) : (v(), I(
|
|
129
|
+
}, null, 8, ft)) : (v(), I(u, {
|
|
130
130
|
key: 0,
|
|
131
131
|
name: "image",
|
|
132
132
|
outline: !0,
|
|
@@ -141,9 +141,9 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
141
141
|
})
|
|
142
142
|
])) : A("", !0),
|
|
143
143
|
_("div", vt, [
|
|
144
|
-
r(
|
|
144
|
+
r(d, { placement: "bottom-end" }, {
|
|
145
145
|
"menu-button": T(() => [
|
|
146
|
-
r(
|
|
146
|
+
r(c, {
|
|
147
147
|
icon: "more_vert",
|
|
148
148
|
variant: "tertiary"
|
|
149
149
|
})
|
|
@@ -177,7 +177,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
177
177
|
_("div", gt, j(g.bundle.name), 1),
|
|
178
178
|
_("div", ht, j(e(i) || "Free"), 1),
|
|
179
179
|
_("div", xt, [
|
|
180
|
-
(v(!0), D(
|
|
180
|
+
(v(!0), D(X, null, re(e(b), (l, F) => (v(), I(t, {
|
|
181
181
|
key: F,
|
|
182
182
|
label: l
|
|
183
183
|
}, null, 8, ["label"]))), 128))
|
|
@@ -200,7 +200,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
200
200
|
}, {
|
|
201
201
|
default: T(() => [
|
|
202
202
|
r(o, {
|
|
203
|
-
onClick: b[0] || (b[0] = (
|
|
203
|
+
onClick: b[0] || (b[0] = (u) => f("create")),
|
|
204
204
|
label: e(a)("connect.store.actions.addBundle"),
|
|
205
205
|
icon: "add",
|
|
206
206
|
variant: "secondary"
|
|
@@ -224,16 +224,16 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
224
224
|
},
|
|
225
225
|
setup(g) {
|
|
226
226
|
const { t: x } = be(), a = g, f = Ae(), { emitData: i, emitAction: b } = Me(), o = R(a.initialValue), m = Q.string().min(1);
|
|
227
|
-
function
|
|
227
|
+
function u() {
|
|
228
228
|
i(o.value), b("primary"), f.close();
|
|
229
229
|
}
|
|
230
230
|
function t() {
|
|
231
231
|
i(null), b("primary"), f.close();
|
|
232
232
|
}
|
|
233
|
-
return (
|
|
234
|
-
const
|
|
233
|
+
return (c, y) => {
|
|
234
|
+
const d = h("FmTextField"), S = h("FmButton");
|
|
235
235
|
return v(), D("div", Ft, [
|
|
236
|
-
r(
|
|
236
|
+
r(d, {
|
|
237
237
|
modelValue: e(o),
|
|
238
238
|
"onUpdate:modelValue": y[0] || (y[0] = (l) => oe(o) ? o.value = l : null),
|
|
239
239
|
label: e(x)("connect.store.category.label"),
|
|
@@ -257,7 +257,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
257
257
|
r(S, {
|
|
258
258
|
label: g.action == "edit" ? e(x)("connect.common.edit") : e(x)("connect.common.add"),
|
|
259
259
|
disabled: !e(o),
|
|
260
|
-
onClick:
|
|
260
|
+
onClick: u
|
|
261
261
|
}, null, 8, ["label", "disabled"])
|
|
262
262
|
])
|
|
263
263
|
])
|
|
@@ -274,16 +274,16 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
274
274
|
}))
|
|
275
275
|
);
|
|
276
276
|
return (o, m) => {
|
|
277
|
-
const
|
|
277
|
+
const u = h("FmSelect"), t = h("FmButton");
|
|
278
278
|
return v(), D("div", $t, [
|
|
279
279
|
m[4] || (m[4] = _("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Select a category to create FeedMe CNY 2025 bundle ", -1)),
|
|
280
|
-
r(
|
|
280
|
+
r(u, {
|
|
281
281
|
placeholder: "Select a category",
|
|
282
282
|
items: e(b),
|
|
283
283
|
modelValue: e(i),
|
|
284
284
|
"onUpdate:modelValue": [
|
|
285
|
-
m[0] || (m[0] = (
|
|
286
|
-
m[1] || (m[1] = (
|
|
285
|
+
m[0] || (m[0] = (c) => oe(i) ? i.value = c : null),
|
|
286
|
+
m[1] || (m[1] = (c) => e(x)(c))
|
|
287
287
|
],
|
|
288
288
|
label: "Category"
|
|
289
289
|
}, null, 8, ["items", "modelValue"]),
|
|
@@ -291,11 +291,11 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
291
291
|
r(t, {
|
|
292
292
|
variant: "tertiary",
|
|
293
293
|
label: "Cancel",
|
|
294
|
-
onClick: m[2] || (m[2] = (
|
|
294
|
+
onClick: m[2] || (m[2] = (c) => e(a)("tertiary"))
|
|
295
295
|
}),
|
|
296
296
|
r(t, {
|
|
297
297
|
label: "Select",
|
|
298
|
-
onClick: m[3] || (m[3] = (
|
|
298
|
+
onClick: m[3] || (m[3] = (c) => e(a)("primary")),
|
|
299
299
|
disabled: e(i) == null
|
|
300
300
|
}, null, 8, ["disabled"])
|
|
301
301
|
])
|
|
@@ -421,44 +421,44 @@ const Tt = {
|
|
|
421
421
|
emits: ["update:model-value"],
|
|
422
422
|
setup(g, { emit: x }) {
|
|
423
423
|
const a = g, f = ne.taxSystem, i = x, b = R(a.modelValue);
|
|
424
|
-
function o(
|
|
425
|
-
const
|
|
426
|
-
S >= 0 ?
|
|
427
|
-
systemCode:
|
|
424
|
+
function o(c, y) {
|
|
425
|
+
const d = ue.clone(a.modelValue), S = d.findIndex((l) => l.systemCode === c);
|
|
426
|
+
S >= 0 ? d[S].inclusive = y : d.push({
|
|
427
|
+
systemCode: c,
|
|
428
428
|
inclusive: y
|
|
429
|
-
}), b.value =
|
|
429
|
+
}), b.value = d, i("update:model-value", d);
|
|
430
430
|
}
|
|
431
431
|
function m() {
|
|
432
|
-
return f.map((
|
|
433
|
-
const y = a.modelValue ? a.modelValue.find((
|
|
432
|
+
return f.map((c) => {
|
|
433
|
+
const y = a.modelValue ? a.modelValue.find((d) => d.systemCode === c.code) : !1;
|
|
434
434
|
return {
|
|
435
|
-
label:
|
|
435
|
+
label: c.name,
|
|
436
436
|
config: {
|
|
437
437
|
value: y ? y.inclusive : !1
|
|
438
438
|
},
|
|
439
|
-
input: (
|
|
440
|
-
o(
|
|
439
|
+
input: (d) => {
|
|
440
|
+
o(c.code, d);
|
|
441
441
|
}
|
|
442
442
|
};
|
|
443
443
|
});
|
|
444
444
|
}
|
|
445
|
-
const
|
|
446
|
-
function t(
|
|
447
|
-
return `${
|
|
445
|
+
const u = He(m());
|
|
446
|
+
function t(c, y) {
|
|
447
|
+
return `${c} ${y ? "Inclusive" : "Exclusive"}`;
|
|
448
448
|
}
|
|
449
449
|
return fe(() => {
|
|
450
450
|
a.modelValue.length || o(f[0].code, !1);
|
|
451
451
|
}), we(
|
|
452
452
|
() => a.modelValue,
|
|
453
|
-
(
|
|
454
|
-
|
|
453
|
+
(c, y) => {
|
|
454
|
+
c != y && !c.length && o(f[0].code, !1);
|
|
455
455
|
}
|
|
456
|
-
), (
|
|
457
|
-
const
|
|
458
|
-
return v(!0), D(
|
|
456
|
+
), (c, y) => {
|
|
457
|
+
const d = h("FmSwitch");
|
|
458
|
+
return v(!0), D(X, null, re(e(u), (S, l) => {
|
|
459
459
|
var F;
|
|
460
460
|
return v(), D("div", { key: l }, [
|
|
461
|
-
r(
|
|
461
|
+
r(d, {
|
|
462
462
|
"model-value": ((F = e(b)[l]) == null ? void 0 : F.inclusive) || !1,
|
|
463
463
|
"label-placement": "left",
|
|
464
464
|
"onUpdate:modelValue": ($) => S.input($)
|
|
@@ -495,15 +495,15 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
495
495
|
}) : o || f("update:modelValue", void 0));
|
|
496
496
|
});
|
|
497
497
|
const b = E(() => {
|
|
498
|
-
const o = Rt.mode === "development", m = B.Config.getCountry().code.toLowerCase(),
|
|
499
|
-
return `https://marketing${o ? "-dev" : ""}${
|
|
498
|
+
const o = Rt.mode === "development", m = B.Config.getCountry().code.toLowerCase(), u = m != "my" ? `.${m}` : "";
|
|
499
|
+
return `https://marketing${o ? "-dev" : ""}${u}.feedmeapi.com/stripe/${Ye.getBusinessId()}/webhook`;
|
|
500
500
|
});
|
|
501
501
|
return fe(() => {
|
|
502
502
|
i.value = !!a.modelValue;
|
|
503
503
|
}), (o, m) => {
|
|
504
|
-
const
|
|
504
|
+
const u = h("FmSwitch"), t = h("FmTextField"), c = h("FmButton");
|
|
505
505
|
return v(), D("div", It, [
|
|
506
|
-
r(
|
|
506
|
+
r(u, {
|
|
507
507
|
modelValue: e(i),
|
|
508
508
|
"onUpdate:modelValue": m[0] || (m[0] = (y) => oe(i) ? i.value = y : null),
|
|
509
509
|
value: "true",
|
|
@@ -523,7 +523,7 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
523
523
|
"helper-text": "Copy this URL to your Stripe dashboard"
|
|
524
524
|
}, {
|
|
525
525
|
append: T(() => [
|
|
526
|
-
r(
|
|
526
|
+
r(c, {
|
|
527
527
|
icon: "content_copy",
|
|
528
528
|
variant: "tertiary",
|
|
529
529
|
onClick: m[2] || (m[2] = (y) => e(Ge)(e(b)))
|
|
@@ -552,7 +552,7 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
552
552
|
__name: "StoreSettingSheet",
|
|
553
553
|
emits: ["update"],
|
|
554
554
|
setup(g, { expose: x, emit: a }) {
|
|
555
|
-
const { t: f } = be(), i = a, b = R(!1), o = R(), m = R(!1),
|
|
555
|
+
const { t: f } = be(), i = a, b = R(!1), o = R(), m = R(!1), u = Qe.extend({
|
|
556
556
|
company: et.extend({
|
|
557
557
|
name: Q.string().min(1, "Company name is required"),
|
|
558
558
|
regNo: Q.string().min(1, "Registration number is required"),
|
|
@@ -567,9 +567,9 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
567
567
|
phoneNo: Q.string().min(1, "Phone number is required"),
|
|
568
568
|
sstRegNo: Q.string().optional()
|
|
569
569
|
})
|
|
570
|
-
}), t = E(() =>
|
|
571
|
-
function
|
|
572
|
-
const S =
|
|
570
|
+
}), t = E(() => u.safeParse(o.value).success);
|
|
571
|
+
function c() {
|
|
572
|
+
const S = u.safeParse(o.value);
|
|
573
573
|
S.success && i("update", S.data);
|
|
574
574
|
}
|
|
575
575
|
function y() {
|
|
@@ -591,11 +591,11 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
591
591
|
inclusiveTaxes: []
|
|
592
592
|
};
|
|
593
593
|
}
|
|
594
|
-
function
|
|
594
|
+
function d(S, l) {
|
|
595
595
|
b.value = S, S && (o.value = l != null && l.company ? l : y());
|
|
596
596
|
}
|
|
597
597
|
return x({
|
|
598
|
-
showSheet:
|
|
598
|
+
showSheet: d,
|
|
599
599
|
data: o
|
|
600
600
|
}), (S, l) => {
|
|
601
601
|
const F = h("FmIcon"), $ = h("FmMenuItem"), N = h("FmMenu"), W = h("FmSelect"), Y = h("FmButton"), L = h("FmSideSheet");
|
|
@@ -609,13 +609,13 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
609
609
|
_("div", Wt, [
|
|
610
610
|
r(Y, {
|
|
611
611
|
label: e(f)("connect.common.save"),
|
|
612
|
-
onClick:
|
|
612
|
+
onClick: c,
|
|
613
613
|
disabled: !e(t) || e(_e)().isLoading,
|
|
614
614
|
loading: e(_e)().isLoading
|
|
615
615
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
616
616
|
r(Y, {
|
|
617
617
|
label: e(f)("connect.common.cancel"),
|
|
618
|
-
onClick: l[14] || (l[14] = (z) =>
|
|
618
|
+
onClick: l[14] || (l[14] = (z) => d(!1)),
|
|
619
619
|
variant: "tertiary"
|
|
620
620
|
}, null, 8, ["label"])
|
|
621
621
|
])
|
|
@@ -630,13 +630,13 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
630
630
|
modelValue: e(o).company.name,
|
|
631
631
|
"onUpdate:modelValue": l[0] || (l[0] = (s) => e(o).company.name = s),
|
|
632
632
|
label: e(f)("connect.store.setting.company.name"),
|
|
633
|
-
schema: e(Z).typeAtPath(e(
|
|
633
|
+
schema: e(Z).typeAtPath(e(u), "company.name")
|
|
634
634
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
635
635
|
r(te, {
|
|
636
636
|
modelValue: e(o).company.regNo,
|
|
637
637
|
"onUpdate:modelValue": l[1] || (l[1] = (s) => e(o).company.regNo = s),
|
|
638
638
|
label: e(f)("connect.store.setting.company.reg_no"),
|
|
639
|
-
schema: e(Z).typeAtPath(e(
|
|
639
|
+
schema: e(Z).typeAtPath(e(u), "company.regNo")
|
|
640
640
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
641
641
|
e(B.Config).getCountry().taxSystems.length ? (v(), I(te, {
|
|
642
642
|
key: 0,
|
|
@@ -646,7 +646,7 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
646
646
|
l[3] || (l[3] = (s) => s ? null : e(o).inclusiveTaxes = [])
|
|
647
647
|
],
|
|
648
648
|
label: e(f)("connect.store.setting.company.tax_reg_no"),
|
|
649
|
-
schema: e(Z).typeAtPath(e(
|
|
649
|
+
schema: e(Z).typeAtPath(e(u), "company.sstRegNo")
|
|
650
650
|
}, null, 8, ["modelValue", "label", "schema"])) : A("", !0),
|
|
651
651
|
(z = e(o).company) != null && z.sstRegNo && e(o).inclusiveTaxes ? (v(), D("div", At, [
|
|
652
652
|
_("div", Mt, j(e(f)("connect.store.setting.company.tax")), 1),
|
|
@@ -659,33 +659,33 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
659
659
|
modelValue: e(o).company.phoneNo,
|
|
660
660
|
"onUpdate:modelValue": l[5] || (l[5] = (s) => e(o).company.phoneNo = s),
|
|
661
661
|
label: e(f)("connect.store.setting.company.phone"),
|
|
662
|
-
schema: e(Z).typeAtPath(e(
|
|
662
|
+
schema: e(Z).typeAtPath(e(u), "company.phoneNo")
|
|
663
663
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
664
664
|
_("div", Et, j(e(f)("connect.store.setting.company.address.title")), 1),
|
|
665
665
|
r(te, {
|
|
666
666
|
modelValue: e(o).company.address.line1,
|
|
667
667
|
"onUpdate:modelValue": l[6] || (l[6] = (s) => e(o).company.address.line1 = s),
|
|
668
668
|
label: e(f)("connect.store.setting.company.address.line1"),
|
|
669
|
-
schema: e(Z).typeAtPath(e(
|
|
669
|
+
schema: e(Z).typeAtPath(e(u), "company.address.line1")
|
|
670
670
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
671
671
|
r(te, {
|
|
672
672
|
modelValue: e(o).company.address.line2,
|
|
673
673
|
"onUpdate:modelValue": l[7] || (l[7] = (s) => e(o).company.address.line2 = s),
|
|
674
674
|
label: e(f)("connect.store.setting.company.address.line2"),
|
|
675
|
-
schema: e(Z).typeAtPath(e(
|
|
675
|
+
schema: e(Z).typeAtPath(e(u), "company.address.line2")
|
|
676
676
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
677
677
|
_("div", jt, [
|
|
678
678
|
r(te, {
|
|
679
679
|
modelValue: e(o).company.address.city,
|
|
680
680
|
"onUpdate:modelValue": l[8] || (l[8] = (s) => e(o).company.address.city = s),
|
|
681
681
|
label: e(f)("connect.store.setting.company.address.city"),
|
|
682
|
-
schema: e(Z).typeAtPath(e(
|
|
682
|
+
schema: e(Z).typeAtPath(e(u), "company.address.city")
|
|
683
683
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
684
684
|
r(te, {
|
|
685
685
|
modelValue: e(o).company.address.postcode,
|
|
686
686
|
"onUpdate:modelValue": l[9] || (l[9] = (s) => e(o).company.address.postcode = s),
|
|
687
687
|
label: e(f)("connect.store.setting.company.address.postcode"),
|
|
688
|
-
schema: e(Z).typeAtPath(e(
|
|
688
|
+
schema: e(Z).typeAtPath(e(u), "company.address.postcode")
|
|
689
689
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
690
690
|
_("div", Lt, [
|
|
691
691
|
_("div", Ht, j(e(f)("connect.store.setting.company.address.state")), 1),
|
|
@@ -697,7 +697,7 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
697
697
|
r(te, {
|
|
698
698
|
modelValue: e(o).company.address.state,
|
|
699
699
|
"onUpdate:modelValue": l[10] || (l[10] = (s) => e(o).company.address.state = s),
|
|
700
|
-
schema: e(Z).typeAtPath(e(
|
|
700
|
+
schema: e(Z).typeAtPath(e(u), "company.address.state"),
|
|
701
701
|
onFocusChanged: l[11] || (l[11] = (s) => m.value = s)
|
|
702
702
|
}, {
|
|
703
703
|
append: T(() => [
|
|
@@ -709,7 +709,7 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
709
709
|
}, 8, ["modelValue", "schema"])
|
|
710
710
|
]),
|
|
711
711
|
default: T(() => [
|
|
712
|
-
(v(!0), D(
|
|
712
|
+
(v(!0), D(X, null, re(e(Tt)[e(B.Config).getCountry().code].stateItems.filter(
|
|
713
713
|
(s) => {
|
|
714
714
|
var w, U;
|
|
715
715
|
return s.label.toLowerCase().includes(((U = (w = e(o)) == null ? void 0 : w.company) == null ? void 0 : U.address.state.toLowerCase()) ?? "");
|
|
@@ -736,7 +736,7 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
736
736
|
value: e(B.Config).getCountry().name
|
|
737
737
|
}
|
|
738
738
|
],
|
|
739
|
-
rules: [e(Z).ruleAtPath(e(
|
|
739
|
+
rules: [e(Z).ruleAtPath(e(u), "company.address.country")]
|
|
740
740
|
}, null, 8, ["label", "modelValue", "items", "rules"])
|
|
741
741
|
]),
|
|
742
742
|
_("div", qt, [
|
|
@@ -771,13 +771,13 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
771
771
|
const a = g, f = x;
|
|
772
772
|
fe(() => {
|
|
773
773
|
if (o.value.length !== b.value.length) {
|
|
774
|
-
const t = b.value.reduce((
|
|
775
|
-
const
|
|
776
|
-
if (!
|
|
777
|
-
const { systemCode: S, taxCode: l } =
|
|
778
|
-
return y.value ||
|
|
774
|
+
const t = b.value.reduce((c, y) => {
|
|
775
|
+
const d = ne.systemDefaultCode(y.name);
|
|
776
|
+
if (!d) return c;
|
|
777
|
+
const { systemCode: S, taxCode: l } = d;
|
|
778
|
+
return y.value || c.push({ systemCode: S, taxCode: l }), c;
|
|
779
779
|
}, []);
|
|
780
|
-
|
|
780
|
+
u(t);
|
|
781
781
|
}
|
|
782
782
|
});
|
|
783
783
|
function i() {
|
|
@@ -786,49 +786,49 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
786
786
|
const b = E(() => i().map((t) => ({
|
|
787
787
|
name: t.code,
|
|
788
788
|
value: (o.value || []).find(
|
|
789
|
-
(
|
|
789
|
+
(c) => t.options.some((y) => y.feedmeTaxCode === c)
|
|
790
790
|
),
|
|
791
|
-
options: t.options.map((
|
|
792
|
-
label: `${
|
|
793
|
-
value:
|
|
791
|
+
options: t.options.map((c) => ({
|
|
792
|
+
label: `${c.name} (${it(c.rate)}%)`,
|
|
793
|
+
value: c.feedmeTaxCode
|
|
794
794
|
}))
|
|
795
795
|
}))), o = E(() => a.modelValue.map((t) => ne.generateCode(t)));
|
|
796
796
|
function m(t) {
|
|
797
|
-
const
|
|
797
|
+
const c = i().find(
|
|
798
798
|
(l) => l.options.some((F) => F.feedmeTaxCode === t)
|
|
799
|
-
), y =
|
|
799
|
+
), y = c == null ? void 0 : c.options.find((l) => l.feedmeTaxCode === t);
|
|
800
800
|
if (!y) return;
|
|
801
|
-
const { systemCode:
|
|
802
|
-
|
|
801
|
+
const { systemCode: d, taxCode: S } = y;
|
|
802
|
+
u([{ systemCode: d, taxCode: S }]);
|
|
803
803
|
}
|
|
804
|
-
function
|
|
805
|
-
const
|
|
804
|
+
function u(t) {
|
|
805
|
+
const c = ue.clone(a.modelValue);
|
|
806
806
|
t.forEach((y) => {
|
|
807
|
-
const
|
|
807
|
+
const d = i().find(
|
|
808
808
|
(F) => F.options.some(($) => $.feedmeTaxCode === ne.generateCode(y))
|
|
809
|
-
), S = (
|
|
809
|
+
), S = (d == null ? void 0 : d.options) || [], l = c.findIndex(
|
|
810
810
|
(F) => S.some(($) => ne.generateCode($) === ne.generateCode(F))
|
|
811
811
|
);
|
|
812
|
-
l >= 0 ?
|
|
813
|
-
}), f("update:modelValue",
|
|
812
|
+
l >= 0 ? c.splice(l, 1, y) : c.push(y);
|
|
813
|
+
}), f("update:modelValue", c);
|
|
814
814
|
}
|
|
815
|
-
return (t,
|
|
816
|
-
const y = h("FmRadio"),
|
|
817
|
-
return v(!0), D(
|
|
815
|
+
return (t, c) => {
|
|
816
|
+
const y = h("FmRadio"), d = h("FmRadioGroup");
|
|
817
|
+
return v(!0), D(X, null, re(e(b), (S) => (v(), D("div", {
|
|
818
818
|
key: S.name,
|
|
819
819
|
class: "flex items-start"
|
|
820
820
|
}, [
|
|
821
|
-
r(
|
|
821
|
+
r(d, {
|
|
822
822
|
modelValue: S.value,
|
|
823
823
|
"onUpdate:modelValue": [
|
|
824
824
|
(l) => S.value = l,
|
|
825
|
-
|
|
825
|
+
c[0] || (c[0] = (l) => {
|
|
826
826
|
m(l);
|
|
827
827
|
})
|
|
828
828
|
]
|
|
829
829
|
}, {
|
|
830
830
|
default: T(() => [
|
|
831
|
-
(v(!0), D(
|
|
831
|
+
(v(!0), D(X, null, re(S.options, (l, F) => (v(), I(y, {
|
|
832
832
|
key: F,
|
|
833
833
|
value: l.value,
|
|
834
834
|
label: l.label
|
|
@@ -869,11 +869,11 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
869
869
|
__name: "EditBundleSheet",
|
|
870
870
|
emits: ["update"],
|
|
871
871
|
setup(g, { expose: x, emit: a }) {
|
|
872
|
-
const f = a, { t: i } = be(), b = $e(), o = R(!1), m = R([]),
|
|
872
|
+
const f = a, { t: i } = be(), b = $e(), o = R(!1), m = R([]), u = R({
|
|
873
873
|
category: 0,
|
|
874
874
|
index: -1,
|
|
875
875
|
originalCategoryIndex: void 0
|
|
876
|
-
}), t = R(ue.cloneDeep(Se)),
|
|
876
|
+
}), t = R(ue.cloneDeep(Se)), c = R(), y = Oe, d = E(() => {
|
|
877
877
|
const p = y.safeParse(t.value);
|
|
878
878
|
return p.success ? [] : p.error.errors;
|
|
879
879
|
}), S = [
|
|
@@ -904,6 +904,10 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
904
904
|
},
|
|
905
905
|
modelValue: ((C = n.selectedReward) == null ? void 0 : C.extra) ?? 0,
|
|
906
906
|
appendText: "day(s)",
|
|
907
|
+
helperState: J(d.value, "titles"),
|
|
908
|
+
helperText: G(d.value, "titles"),
|
|
909
|
+
max: 9999,
|
|
910
|
+
rules: [(P) => P <= 9999 || "Maximum 9999 days allowed"],
|
|
907
911
|
showSteppers: !1,
|
|
908
912
|
disabled: !!t.value.stripePriceId
|
|
909
913
|
});
|
|
@@ -993,27 +997,27 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
993
997
|
return ue.cloneDeep(Se);
|
|
994
998
|
}
|
|
995
999
|
function O(p, n) {
|
|
996
|
-
o.value = p, p && n && (
|
|
1000
|
+
o.value = p, p && n && (c.value = void 0, m.value = n.categories, t.value = n.bundle || k(), u.value.category = n.category, u.value.index = n.index, u.value.originalCategoryIndex = n.category, L.value = F.value.reduce((C, P, H) => (C[H] = !!P.selectedReward, C), {}));
|
|
997
1001
|
}
|
|
998
1002
|
return x({
|
|
999
1003
|
showSheet: O,
|
|
1000
|
-
bundleImage:
|
|
1001
|
-
target:
|
|
1004
|
+
bundleImage: c,
|
|
1005
|
+
target: u,
|
|
1002
1006
|
data: t
|
|
1003
1007
|
}), (p, n) => {
|
|
1004
1008
|
const C = h("FmSwitch"), P = h("FmHelperText"), H = h("FmTextField"), K = h("FmSelect"), q = h("FmStepperField"), ie = h("FmMenuItem"), ve = h("FmTable"), ce = h("FmButton"), ge = h("FmSideSheet");
|
|
1005
1009
|
return v(), I(ge, {
|
|
1006
|
-
"max-width":
|
|
1010
|
+
"max-width": 768,
|
|
1007
1011
|
modelValue: e(o),
|
|
1008
1012
|
"onUpdate:modelValue": n[20] || (n[20] = (ae) => oe(o) ? o.value = ae : null),
|
|
1009
|
-
header: e(
|
|
1013
|
+
header: e(u).index != -1 ? e(i)("connect.store.bundle.edit.title") : e(i)("connect.store.bundle.edit.create")
|
|
1010
1014
|
}, {
|
|
1011
1015
|
"side-sheet-footer": T(() => [
|
|
1012
1016
|
_("div", sn, [
|
|
1013
1017
|
r(ce, {
|
|
1014
|
-
label: e(
|
|
1018
|
+
label: e(u).index != -1 ? "Save" : "Add",
|
|
1015
1019
|
onClick: M,
|
|
1016
|
-
disabled: e(
|
|
1020
|
+
disabled: e(d).length > 0,
|
|
1017
1021
|
loading: e(_e)().isLoading
|
|
1018
1022
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
1019
1023
|
r(ce, {
|
|
@@ -1050,12 +1054,12 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1050
1054
|
label: e(i)("connect.store.bundle.edit.bundleName"),
|
|
1051
1055
|
modelValue: e(t).name,
|
|
1052
1056
|
"onUpdate:modelValue": n[1] || (n[1] = (V) => e(t).name = V),
|
|
1053
|
-
"helper-state": e(
|
|
1054
|
-
"helper-text": e(
|
|
1057
|
+
"helper-state": e(J)(e(d), "name"),
|
|
1058
|
+
"helper-text": e(G)(e(d), "name")
|
|
1055
1059
|
}, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
|
|
1056
1060
|
r(K, {
|
|
1057
|
-
modelValue: e(
|
|
1058
|
-
"onUpdate:modelValue": n[2] || (n[2] = (V) => e(
|
|
1061
|
+
modelValue: e(u).category,
|
|
1062
|
+
"onUpdate:modelValue": n[2] || (n[2] = (V) => e(u).category = V),
|
|
1059
1063
|
label: "Store Category",
|
|
1060
1064
|
items: e(m).map((V, Le) => ({ label: V, value: Le }))
|
|
1061
1065
|
}, null, 8, ["modelValue", "items"]),
|
|
@@ -1064,12 +1068,12 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1064
1068
|
class: "w-1/2 xs:w-2/3",
|
|
1065
1069
|
"aspect-ratio": "16/9",
|
|
1066
1070
|
thumbnail: e(t).image ?? void 0,
|
|
1067
|
-
file: e(
|
|
1071
|
+
file: e(c) ?? void 0,
|
|
1068
1072
|
"onUpdate:file": n[3] || (n[3] = (V) => {
|
|
1069
|
-
|
|
1073
|
+
c.value = V;
|
|
1070
1074
|
}),
|
|
1071
|
-
"helper-state": e(
|
|
1072
|
-
"helper-text": e(
|
|
1075
|
+
"helper-state": e(J)(e(d), "image"),
|
|
1076
|
+
"helper-text": e(G)(e(d), "image")
|
|
1073
1077
|
}, null, 8, ["label", "thumbnail", "file", "helper-state", "helper-text"]),
|
|
1074
1078
|
r(q, {
|
|
1075
1079
|
"model-value": e(B.Dinero).fromFdoDinero(e(t).price).toUnit(),
|
|
@@ -1081,8 +1085,8 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1081
1085
|
}),
|
|
1082
1086
|
"is-currency": !0,
|
|
1083
1087
|
"show-steppers": !1,
|
|
1084
|
-
"helper-text": e(
|
|
1085
|
-
"helper-state": e(
|
|
1088
|
+
"helper-text": e(G)(e(d), "price") || `${e(B.Dinero).fromNumber({ number: 1 }).toFormat(!0)} = ${e(B.Dinero).fromNumber({ number: 1 }).toUnit()} credit`,
|
|
1089
|
+
"helper-state": e(J)(e(d), "price")
|
|
1086
1090
|
}, {
|
|
1087
1091
|
prepend: T(() => [
|
|
1088
1092
|
de(j(e(B.Dinero).defaultCurrency()), 1)
|
|
@@ -1099,8 +1103,8 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1099
1103
|
}),
|
|
1100
1104
|
"is-currency": !0,
|
|
1101
1105
|
"show-steppers": !1,
|
|
1102
|
-
"helper-text": e(
|
|
1103
|
-
"helper-state": e(
|
|
1106
|
+
"helper-text": e(G)(e(d), "originalPrice") || e(i)("connect.store.bundle.edit.originalPriceHelper"),
|
|
1107
|
+
"helper-state": e(J)(e(d), "originalPrice")
|
|
1104
1108
|
}, {
|
|
1105
1109
|
prepend: T(() => [
|
|
1106
1110
|
de(j(e(B.Dinero).defaultCurrency()), 1)
|
|
@@ -1116,22 +1120,22 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1116
1120
|
V > 0 && e(t).credit.normal > 0 && (e(t).credit.normal = 0), e(t).coinPrice = V;
|
|
1117
1121
|
}),
|
|
1118
1122
|
"show-steppers": !1,
|
|
1119
|
-
"helper-state": e(
|
|
1120
|
-
"helper-text": e(
|
|
1123
|
+
"helper-state": e(J)(e(d), "coinPrice"),
|
|
1124
|
+
"helper-text": e(G)(e(d), "coinPrice")
|
|
1121
1125
|
}, {
|
|
1122
1126
|
append: T(() => n[21] || (n[21] = [
|
|
1123
1127
|
de(" point(s) ")
|
|
1124
1128
|
])),
|
|
1125
1129
|
_: 1
|
|
1126
1130
|
}, 8, ["model-value", "label", "helper-state", "helper-text"])),
|
|
1127
|
-
(Te = e(b).storeOption) != null && Te.stripe && !e(t).isFeedvibe ? (v(), D(
|
|
1131
|
+
(Te = e(b).storeOption) != null && Te.stripe && !e(t).isFeedvibe ? (v(), D(X, { key: 1 }, [
|
|
1128
1132
|
_("div", Qt, j(e(i)("connect.store.bundle.edit.subscriptionSettings")), 1),
|
|
1129
1133
|
r(H, {
|
|
1130
1134
|
label: e(i)("connect.store.bundle.edit.stripePriceId"),
|
|
1131
1135
|
modelValue: e(t).stripePriceId,
|
|
1132
1136
|
"onUpdate:modelValue": n[7] || (n[7] = (V) => e(t).stripePriceId = V),
|
|
1133
|
-
"helper-state": e(
|
|
1134
|
-
"helper-text": e(
|
|
1137
|
+
"helper-state": e(J)(e(d), "stripePriceId"),
|
|
1138
|
+
"helper-text": e(G)(e(d), "stripePriceId")
|
|
1135
1139
|
}, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
|
|
1136
1140
|
e(t).stripePriceId ? (v(), I(q, {
|
|
1137
1141
|
key: 0,
|
|
@@ -1140,19 +1144,19 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1140
1144
|
"onUpdate:modelValue": W,
|
|
1141
1145
|
label: e(i)("connect.store.bundle.edit.subscriptionValidity"),
|
|
1142
1146
|
"show-steppers": !1,
|
|
1143
|
-
"helper-state": e(
|
|
1144
|
-
"helper-text": e(
|
|
1147
|
+
"helper-state": e(J)(e(d), "subscriptionValidity"),
|
|
1148
|
+
"helper-text": e(G)(e(d), "subscriptionValidity")
|
|
1145
1149
|
}, null, 8, ["model-value", "label", "helper-state", "helper-text"])) : A("", !0)
|
|
1146
1150
|
], 64)) : A("", !0),
|
|
1147
|
-
e(t).isFeedvibe ? A("", !0) : (v(), D(
|
|
1151
|
+
e(t).isFeedvibe ? A("", !0) : (v(), D(X, { key: 2 }, [
|
|
1148
1152
|
n[25] || (n[25] = _("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Credit", -1)),
|
|
1149
1153
|
r(q, {
|
|
1150
1154
|
modelValue: e(t).credit.normal,
|
|
1151
1155
|
"onUpdate:modelValue": n[8] || (n[8] = (V) => e(t).credit.normal = V),
|
|
1152
1156
|
label: "Normal credit",
|
|
1153
1157
|
"show-steppers": !1,
|
|
1154
|
-
"helper-state": e(
|
|
1155
|
-
"helper-text": e(
|
|
1158
|
+
"helper-state": e(J)(e(d), "credit.normal"),
|
|
1159
|
+
"helper-text": e(G)(e(d), "credit.normal")
|
|
1156
1160
|
}, {
|
|
1157
1161
|
append: T(() => n[22] || (n[22] = [
|
|
1158
1162
|
de(" credit ")
|
|
@@ -1170,8 +1174,8 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1170
1174
|
}),
|
|
1171
1175
|
label: "Free credit",
|
|
1172
1176
|
"show-steppers": !1,
|
|
1173
|
-
"helper-state": e(
|
|
1174
|
-
"helper-text": e(
|
|
1177
|
+
"helper-state": e(J)(e(d), "credit.free.amount"),
|
|
1178
|
+
"helper-text": e(G)(e(d), "credit.free.amount")
|
|
1175
1179
|
}, {
|
|
1176
1180
|
append: T(() => n[23] || (n[23] = [
|
|
1177
1181
|
de(" credit ")
|
|
@@ -1191,8 +1195,8 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1191
1195
|
}),
|
|
1192
1196
|
label: "Free credit valid for",
|
|
1193
1197
|
"show-steppers": !1,
|
|
1194
|
-
"helper-state": e(
|
|
1195
|
-
"helper-text": e(
|
|
1198
|
+
"helper-state": e(J)(e(d), "credit.free.day"),
|
|
1199
|
+
"helper-text": e(G)(e(d), "credit.free.day")
|
|
1196
1200
|
}, {
|
|
1197
1201
|
append: T(() => n[24] || (n[24] = [
|
|
1198
1202
|
de(" day(s) ")
|
|
@@ -1200,7 +1204,7 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1200
1204
|
_: 1
|
|
1201
1205
|
}, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : A("", !0)
|
|
1202
1206
|
], 64)),
|
|
1203
|
-
e(z) ? (v(), D(
|
|
1207
|
+
e(z) ? (v(), D(X, { key: 3 }, [
|
|
1204
1208
|
n[26] || (n[26] = _("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Taxes", -1)),
|
|
1205
1209
|
r(Jt, {
|
|
1206
1210
|
modelValue: e(t).taxes,
|
|
@@ -1265,8 +1269,8 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1265
1269
|
"hide-footer": e(F).length <= 10
|
|
1266
1270
|
}, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"]),
|
|
1267
1271
|
r(P, {
|
|
1268
|
-
text: e(
|
|
1269
|
-
state: e(
|
|
1272
|
+
text: e(G)(e(d), "titles"),
|
|
1273
|
+
state: e(J)(e(d), "titles")
|
|
1270
1274
|
}, null, 8, ["text", "state"])
|
|
1271
1275
|
]),
|
|
1272
1276
|
_("div", ln, j(e(i)("connect.store.bundle.edit.advanceSetting")), 1),
|
|
@@ -1304,15 +1308,15 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1304
1308
|
__name: "SendBundleSheet",
|
|
1305
1309
|
emits: ["success"],
|
|
1306
1310
|
setup(g, { expose: x, emit: a }) {
|
|
1307
|
-
const { minor: f } = Ee, i = R(), b = R(""), o = R(""), m = R([]),
|
|
1311
|
+
const { minor: f } = Ee, i = R(), b = R(""), o = R(""), m = R([]), u = R(!1), t = R();
|
|
1308
1312
|
R(!0);
|
|
1309
|
-
function
|
|
1310
|
-
|
|
1313
|
+
function c(F) {
|
|
1314
|
+
u.value = !0, b.value = null, o.value = "", i.value = F.bundle;
|
|
1311
1315
|
}
|
|
1312
1316
|
function y() {
|
|
1313
|
-
|
|
1317
|
+
u.value = !1;
|
|
1314
1318
|
}
|
|
1315
|
-
async function
|
|
1319
|
+
async function d(F) {
|
|
1316
1320
|
const $ = await ut.read({
|
|
1317
1321
|
limit: 25,
|
|
1318
1322
|
skip: 0,
|
|
@@ -1360,20 +1364,20 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1360
1364
|
), (W = i.value) != null && W.coinPrice && F.push(`${i.value.coinPrice} point(s)`), F.join(" or ");
|
|
1361
1365
|
});
|
|
1362
1366
|
return x({
|
|
1363
|
-
showSheet:
|
|
1367
|
+
showSheet: c,
|
|
1364
1368
|
hideSheet: y
|
|
1365
1369
|
}), fe(async () => {
|
|
1366
|
-
await
|
|
1370
|
+
await d("");
|
|
1367
1371
|
}), (F, $) => {
|
|
1368
1372
|
const N = h("FmCardMedia"), W = h("FmCardHeader"), Y = h("FmChip"), L = h("FmCardSection"), z = h("FmCard"), le = h("FmSelect"), s = h("FmTextField"), w = h("FmForm"), U = h("FmButton"), M = h("FmSideSheet");
|
|
1369
1373
|
return v(), I(M, {
|
|
1370
1374
|
"max-width": 560,
|
|
1371
1375
|
"dismiss-away": !0,
|
|
1372
1376
|
header: "Send bundle to member",
|
|
1373
|
-
modelValue: e(
|
|
1377
|
+
modelValue: e(u),
|
|
1374
1378
|
"onUpdate:modelValue": [
|
|
1375
|
-
$[4] || ($[4] = (k) => oe(
|
|
1376
|
-
$[5] || ($[5] = (k) =>
|
|
1379
|
+
$[4] || ($[4] = (k) => oe(u) ? u.value = k : null),
|
|
1380
|
+
$[5] || ($[5] = (k) => u.value = k)
|
|
1377
1381
|
]
|
|
1378
1382
|
}, {
|
|
1379
1383
|
"side-sheet-footer": T(() => [
|
|
@@ -1390,7 +1394,7 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1390
1394
|
label: "Cancel",
|
|
1391
1395
|
type: "button",
|
|
1392
1396
|
variant: "tertiary",
|
|
1393
|
-
onClick: $[3] || ($[3] = (k) =>
|
|
1397
|
+
onClick: $[3] || ($[3] = (k) => u.value = !1)
|
|
1394
1398
|
})
|
|
1395
1399
|
])
|
|
1396
1400
|
]),
|
|
@@ -1465,7 +1469,7 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1465
1469
|
label: "Select member",
|
|
1466
1470
|
searchable: "",
|
|
1467
1471
|
items: e(m),
|
|
1468
|
-
onSearch:
|
|
1472
|
+
onSearch: d,
|
|
1469
1473
|
rules: [(k) => !!k > 0 || "Member is required"],
|
|
1470
1474
|
"helper-text": "Type to search member"
|
|
1471
1475
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
@@ -1506,16 +1510,16 @@ const pn = { class: "px-24 flex flex-col gap-y-16" }, yn = { class: "flex gap-8
|
|
|
1506
1510
|
value: "create_category",
|
|
1507
1511
|
isPrimary: !0,
|
|
1508
1512
|
prependIcon: "add"
|
|
1509
|
-
}, o = R(), m = ct(),
|
|
1513
|
+
}, o = R(), m = ct(), u = $e(), { global: t, minor: c } = Ee, y = Ae(), d = E(() => u.sortedStoreCategories), S = E(() => u.sortedStoreCategories.map((s) => s.name)), l = R(), F = R();
|
|
1510
1514
|
async function $(s) {
|
|
1511
1515
|
var w;
|
|
1512
|
-
s === "setting" ? (w = l.value) == null || w.showSheet(!0,
|
|
1516
|
+
s === "setting" ? (w = l.value) == null || w.showSheet(!0, u.storeOption) : s === "create_category" ? W(-1) : s === "create_reward" ? await m.push({ name: Ze["$connect-STORE_REWARDS"] }) : s == "payout" && window.open(mn.paymentPortalUrl, "_blank");
|
|
1513
1517
|
}
|
|
1514
1518
|
async function N(s) {
|
|
1515
|
-
await
|
|
1519
|
+
await c(
|
|
1516
1520
|
async () => {
|
|
1517
1521
|
var w;
|
|
1518
|
-
await xe.updateStore(s), await
|
|
1522
|
+
await xe.updateStore(s), await u.readMemberStore(), (w = l.value) == null || w.showSheet(!1);
|
|
1519
1523
|
},
|
|
1520
1524
|
{
|
|
1521
1525
|
message: a("connect.store.setting.update.message"),
|
|
@@ -1525,7 +1529,7 @@ const pn = { class: "px-24 flex flex-col gap-y-16" }, yn = { class: "flex gap-8
|
|
|
1525
1529
|
}
|
|
1526
1530
|
async function W(s = -1) {
|
|
1527
1531
|
var w, U;
|
|
1528
|
-
if ((!
|
|
1532
|
+
if ((!u.storeOption || !u.storeOption.company) && await he.confirm(
|
|
1529
1533
|
a("connect.store.category.setup.title"),
|
|
1530
1534
|
a("connect.store.category.setup.button"),
|
|
1531
1535
|
a("connect.store.category.setup.action"),
|
|
@@ -1536,19 +1540,19 @@ const pn = { class: "px-24 flex flex-col gap-y-16" }, yn = { class: "flex gap-8
|
|
|
1536
1540
|
title: s == -1 ? a("connect.store.category.add") : a("connect.store.category.edit"),
|
|
1537
1541
|
contentComponent: wt,
|
|
1538
1542
|
contentComponentProps: {
|
|
1539
|
-
initialValue: ((U =
|
|
1543
|
+
initialValue: ((U = d.value[s]) == null ? void 0 : U.name) ?? "",
|
|
1540
1544
|
action: s == -1 ? "add" : "edit"
|
|
1541
1545
|
}
|
|
1542
1546
|
}).onPrimary(async (M) => {
|
|
1543
1547
|
M === null && !await he.remove(
|
|
1544
1548
|
a("connect.store.category.remove.confirm"),
|
|
1545
1549
|
a("connect.store.category.remove.title")
|
|
1546
|
-
) || await
|
|
1550
|
+
) || await c(
|
|
1547
1551
|
async () => {
|
|
1548
|
-
const k = s == -1 ? [...
|
|
1552
|
+
const k = s == -1 ? [...d.value, { name: M, bundles: [] }] : [...d.value].map((O, p) => p == s ? { ...O, name: M } : O).filter((O) => O.name !== null);
|
|
1549
1553
|
await xe.updateStoreBundle({
|
|
1550
1554
|
categories: k
|
|
1551
|
-
}), await
|
|
1555
|
+
}), await u.readMemberStore();
|
|
1552
1556
|
},
|
|
1553
1557
|
{
|
|
1554
1558
|
message: M === null ? a("connect.store.category.update.deleting") : s == -1 ? a("connect.store.category.update.creating") : a("connect.store.category.update.updating"),
|
|
@@ -1560,7 +1564,7 @@ const pn = { class: "px-24 flex flex-col gap-y-16" }, yn = { class: "flex gap-8
|
|
|
1560
1564
|
async function Y(s, w, U, M) {
|
|
1561
1565
|
var p, n, C;
|
|
1562
1566
|
w ?? (w = (p = F.value) == null ? void 0 : p.target.category), U ?? (U = (n = F.value) == null ? void 0 : n.target.index), M ?? (M = (C = F.value) == null ? void 0 : C.target.originalCategoryIndex);
|
|
1563
|
-
const k = Ne(
|
|
1567
|
+
const k = Ne(d.value);
|
|
1564
1568
|
w != M && (k[M].bundles.splice(U, 1), U = k[w].bundles.length), console.log(w, U, M, "ci, bi, originalCategoryIndex");
|
|
1565
1569
|
const O = k[w];
|
|
1566
1570
|
if (!O) {
|
|
@@ -1576,7 +1580,7 @@ const pn = { class: "px-24 flex flex-col gap-y-16" }, yn = { class: "flex gap-8
|
|
|
1576
1580
|
O.bundles.splice(U, 1);
|
|
1577
1581
|
} else
|
|
1578
1582
|
U == -1 ? O.bundles.push(s) : O.bundles[U] = s;
|
|
1579
|
-
await
|
|
1583
|
+
await c(
|
|
1580
1584
|
async () => {
|
|
1581
1585
|
var P, H;
|
|
1582
1586
|
if (s != null) {
|
|
@@ -1588,7 +1592,7 @@ const pn = { class: "px-24 flex flex-col gap-y-16" }, yn = { class: "flex gap-8
|
|
|
1588
1592
|
}
|
|
1589
1593
|
await xe.updateStoreBundle({
|
|
1590
1594
|
categories: k
|
|
1591
|
-
}), await
|
|
1595
|
+
}), await u.readMemberStore(), await u.readMembership(), await u.readRewards(), (H = F.value) == null || H.showSheet(!1);
|
|
1592
1596
|
},
|
|
1593
1597
|
{
|
|
1594
1598
|
message: `${s == null ? "Deleting" : U == -1 ? "Creating" : "Updating"} bundle`,
|
|
@@ -1614,7 +1618,7 @@ const pn = { class: "px-24 flex flex-col gap-y-16" }, yn = { class: "flex gap-8
|
|
|
1614
1618
|
var s, w;
|
|
1615
1619
|
await t(async () => {
|
|
1616
1620
|
var U, M;
|
|
1617
|
-
if (await
|
|
1621
|
+
if (await u.readMemberStore(), await u.readMembership(), await u.readRewards(), await u.readPayoutAccount(), (U = m.currentRoute.value.query) != null && U.action) {
|
|
1618
1622
|
switch ((M = m.currentRoute.value.query) == null ? void 0 : M.action) {
|
|
1619
1623
|
case "update_setting":
|
|
1620
1624
|
$("setting");
|
|
@@ -1645,7 +1649,7 @@ const pn = { class: "px-24 flex flex-col gap-y-16" }, yn = { class: "flex gap-8
|
|
|
1645
1649
|
}
|
|
1646
1650
|
m.replace({ query: {} });
|
|
1647
1651
|
}
|
|
1648
|
-
}), z.value = [f, i, b], (((s =
|
|
1652
|
+
}), z.value = [f, i, b], (((s = u.payoutAccount) == null ? void 0 : s.status) != "APPROVED" || ((w = u.payoutAccount) == null ? void 0 : w.enable) != !0) && (z.value = [
|
|
1649
1653
|
x,
|
|
1650
1654
|
f,
|
|
1651
1655
|
i,
|
|
@@ -1653,15 +1657,15 @@ const pn = { class: "px-24 flex flex-col gap-y-16" }, yn = { class: "flex gap-8
|
|
|
1653
1657
|
]);
|
|
1654
1658
|
}), (s, w) => {
|
|
1655
1659
|
const U = h("FmPageHead"), M = h("FmButton"), k = h("FmCard");
|
|
1656
|
-
return v(), D(
|
|
1660
|
+
return v(), D(X, null, [
|
|
1657
1661
|
r(U, {
|
|
1658
1662
|
title: e(a)("connect.store.title"),
|
|
1659
1663
|
actions: e(z),
|
|
1660
1664
|
"onClick:action": $
|
|
1661
1665
|
}, null, 8, ["title", "actions"]),
|
|
1662
1666
|
_("div", pn, [
|
|
1663
|
-
e(
|
|
1664
|
-
(v(!0), D(
|
|
1667
|
+
e(d) && e(d).length > 0 ? (v(), D(X, { key: 0 }, [
|
|
1668
|
+
(v(!0), D(X, null, re(e(d), (O, p) => (v(), D("div", {
|
|
1665
1669
|
key: O.name,
|
|
1666
1670
|
class: "space-y-8 py-12"
|
|
1667
1671
|
}, [
|
|
@@ -1676,7 +1680,7 @@ const pn = { class: "px-24 flex flex-col gap-y-16" }, yn = { class: "flex gap-8
|
|
|
1676
1680
|
}, null, 8, ["onClick"])
|
|
1677
1681
|
]),
|
|
1678
1682
|
_("div", bn, [
|
|
1679
|
-
(v(!0), D(
|
|
1683
|
+
(v(!0), D(X, null, re(O.bundles, (n, C) => (v(), I(_t, {
|
|
1680
1684
|
bundle: n,
|
|
1681
1685
|
key: n._id,
|
|
1682
1686
|
onEdit: (P) => L({
|