@feedmepos/mf-connect 0.1.19-prod → 0.1.20-prod
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Analytic-D2C1umnp.js → Analytic-DaYL4IwZ.js} +10 -10
- package/dist/{App-fVmEwY5I.js → App-CnRrmva6.js} +6 -6
- package/dist/{Bin-6YCEpR9h.js → Bin-Bf8yL56G.js} +7 -7
- package/dist/{Broadcast-RlU_LuTW.js → Broadcast-CyqZZRc1.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DkWsHp_t.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BBAGO9mc.js} +6 -6
- package/dist/{Card-BKYRMdpM.js → Card-BHOw7yjA.js} +14 -14
- package/dist/{Collections-DMFwhRvv.js → Collections-DQYk52tc.js} +5 -5
- package/dist/{Credit-CaWgTZaC.js → Credit-BVD4wCLN.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DRN88PHx.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-EdpoxZlh.js} +27 -27
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BDTBmu_e.js → EffectSheet.vue_vue_type_style_index_0_lang-1tSUOxmX.js} +6 -6
- package/dist/{Experience-26IxQ5dN.js → Experience-BKTJKeqW.js} +8 -8
- package/dist/{Game-DUZJczoK.js → Game-DDnwUySW.js} +8 -8
- package/dist/{Index-sR1jaAFG.js → Index-Cf6d9PW1.js} +9 -9
- package/dist/{Marketing-DwJsS6NE.js → Marketing-Dm2ECeZM.js} +5 -5
- package/dist/{Member-DnNQ7wE5.js → Member-Bjx7KU3k.js} +4 -4
- package/dist/{MemberList-Dlt3KgbM.js → MemberList-BEiuLggu.js} +23 -23
- package/dist/{MemberTransactions-Dp3wUYaR.js → MemberTransactions-C3YdUquh.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-32ztuxvE.js → MessageInput.vue_vue_type_script_setup_true_lang-ChUeeW90.js} +2 -2
- package/dist/{Mission-CIERTSAz.js → Mission-CZ-jJd14.js} +8 -8
- package/dist/{Overview-Br-EIdxM.js → Overview-CgbAmJNJ.js} +16 -16
- package/dist/{Point-BV2zKyel.js → Point-Bt3nTcqr.js} +8 -8
- package/dist/{Promotion-CeS8Bo2B.js → Promotion-DnMvO6sH.js} +9 -9
- package/dist/{Record-0rP8M9P0.js → Record-DGSd8OoA.js} +6 -6
- package/dist/{Reward-D1S2FQOx.js → Reward-DjSvoVKB.js} +14 -14
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Sb_zCGD5.js → RewardGroup.vue_vue_type_script_setup_true_lang-CD5NQYu7.js} +10 -10
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-2-9Zrb55.js → RuleGroup.vue_vue_type_script_setup_true_lang-DL9sCsHT.js} +12 -12
- package/dist/{Segment-B8KsOfJx.js → Segment-CwyALcvm.js} +13 -13
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-unLXbsT8.js → SelectItems.vue_vue_type_script_setup_true_lang-BpM7WgFp.js} +2 -2
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CknSF3Jk.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-Bwa2RvTx.js} +3 -3
- package/dist/{Setting-CgEgZMwS.js → Setting-CCxSOD98.js} +8 -8
- package/dist/{Store-c5JWogcz.js → Store-BTejxCBe.js} +218 -214
- package/dist/{StoreRewards-CAdO3F6P.js → StoreRewards-DrUIjbjC.js} +12 -12
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DNoCCm39.js → StoreTransactions.vue_vue_type_script_setup_true_lang-B-z5tu9A.js} +17 -17
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CA4gudpw.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CpIVuHaf.js} +1 -1
- package/dist/{Tier-D0JGIIAr.js → Tier-njMn6MiO.js} +18 -18
- package/dist/{Title-o2okd22C.js → Title-Db8js_gS.js} +18 -18
- package/dist/{Transaction-BWlyB-Mu.js → Transaction-D9TjDeKD.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BV8ix6Eg.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Bod8YjzJ.js} +6 -6
- package/dist/{Voucher-BXJ0OJgO.js → Voucher--yr4TQ-G.js} +11 -11
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-y_JUwaN4.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CeL94a07.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DHXrFBUp.js → ZodTextField.vue_vue_type_script_setup_true_lang-BCc_w9J8.js} +1 -1
- package/dist/{app-Cu5KPFA0.js → app-BqAFUCz8.js} +39 -39
- package/dist/{app-CpwW0auX.js → app-Ugrk96Pp.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-BMTnq9uH.js → business-CTwB-cPM.js} +1 -1
- package/dist/{campaign-9xbSpgHB.js → campaign-CKZMkxH5.js} +2 -2
- package/dist/{campaign-DJm-yHXq.js → campaign-DwL2D9J5.js} +9 -9
- package/dist/{campaign.enum-Br4hUdtQ.js → campaign.enum-uKI06HHx.js} +1 -1
- package/dist/{campaign.fn-D4T2Z8sp.js → campaign.fn-Dp8mlrpN.js} +33 -33
- package/dist/{collectible.enum-euaCTwR2.js → collectible.enum-Bw421zWp.js} +1 -1
- package/dist/{collection.fn-CSGiaFAo.js → collection.fn-D2zmqc53.js} +2 -2
- package/dist/{dto-CPoJbktj.js → dto-FP61IJwc.js} +4 -4
- package/dist/{effect-rUOEmbpp.js → effect-BE4EnD4B.js} +1 -1
- package/dist/{email-addresses-CGBlf7Ko.js → email-addresses-D8_sMdak.js} +1 -1
- package/dist/{export-ubQ50K03.js → export-kgzxrVkq.js} +3 -3
- package/dist/{helper-DzsZLs8g.js → helper-BI6pWRqN.js} +1 -1
- package/dist/{index-mr-MMQY8.js → index-BUXc2Nw5.js} +1 -1
- package/dist/{index-ChAStMkJ.js → index-BpBt6Y8F.js} +1 -1
- package/dist/{index-Dx2zhs6l.js → index-COe4sMRZ.js} +1 -1
- package/dist/{index-Cl_8xcPR.js → index-CaJmkfzc.js} +3 -3
- package/dist/{index-Bvh8pAS-.js → index-Cga6gx-T.js} +1 -1
- package/dist/{index-c0lACtJe.js → index-DLIjZTu7.js} +2 -2
- package/dist/{index-DGE9NUaO.js → index-DTbigOhK.js} +1 -1
- package/dist/{index-CnxIbHi3.js → index-DcBjYW9W.js} +1 -1
- package/dist/{index-DGtIJvIR.js → index-DoHEyLZn.js} +3 -3
- package/dist/{index-D1q6GUXX.js → index-aOnN-LXC.js} +1 -1
- package/dist/{index-CIeRjT-c.js → index-fCUvdTQu.js} +6 -6
- package/dist/{index-Dqctbbmb.js → index-sLN88aCQ.js} +4 -4
- package/dist/{index.esm2017-PEPYfxlm.js → index.esm2017-CWKGaTMR.js} +1 -1
- package/dist/{loading-DWc4Gfjd.js → loading-GiUoU2Fa.js} +4 -4
- package/dist/{membership-BD2t2DiT.js → membership-Bt_7SvV0.js} +3 -3
- package/dist/{money-DbKROF9F.js → money-BZq33xlW.js} +1 -1
- package/dist/{number-CWLiR7U2.js → number-DFHYy76W.js} +1 -1
- package/dist/{objectid-V-1hdoZR.js → objectid-C6apWPpH.js} +8 -8
- package/dist/{reward-rMTyTLxF.js → reward-Dy_FLF01.js} +1 -1
- package/dist/{rule-builder-CXFj7lxe.js → rule-builder-BpZ5uHIv.js} +1 -1
- package/dist/{rule-CwF3QkAK.js → rule-zl6tGcQA.js} +3 -3
- package/dist/{template-BRI4DTfQ.js → template-BKEUsA_B.js} +4 -4
- package/dist/{trigger-kc6jNKrV.js → trigger-ChT3kWh_.js} +4 -4
- package/dist/{usePagination-LpEuXb0S.js → usePagination-DWyHwAZT.js} +1 -1
- package/dist/{user-C6OMHBXC.js → user-CX5C_btL.js} +1 -1
- package/dist/{vue-i18n-BZkJ9V5-.js → vue-i18n--AFmNvm8.js} +112 -112
- package/package.json +1 -1
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { defineComponent as ee, computed as j, resolveComponent as h, openBlock as g, createBlock as I, withCtx as T, createElementVNode as x, createElementBlock as
|
|
1
|
+
import { defineComponent as ee, computed as j, resolveComponent as h, openBlock as g, createBlock as I, withCtx as T, createElementVNode as x, createElementBlock as B, createVNode as i, createCommentVNode as M, toDisplayString as L, unref as e, Fragment as X, renderList as re, ref as R, isRef as oe, reactive as Ke, onMounted as fe, watch as we, toRaw as He, createTextVNode as de, h as qe } from "vue";
|
|
2
2
|
import { _ as Ye } from "./tier-BJDhpH6X.js";
|
|
3
3
|
import { useDialog as Me, useDialogChild as Oe, components as We } from "@feedmepos/ui-library";
|
|
4
|
-
import { c as
|
|
5
|
-
import { d as se, a as Je, p as xe, u as Ee, n as Ge, f as Fe } from "./loading-
|
|
6
|
-
import { u as ke, C as me } from "./membership-
|
|
4
|
+
import { c as N, e as he, S as ze } from "./index-CaJmkfzc.js";
|
|
5
|
+
import { d as se, a as Je, p as xe, u as Ee, n as Ge, f as Fe } from "./loading-GiUoU2Fa.js";
|
|
6
|
+
import { u as ke, C as me } from "./membership-Bt_7SvV0.js";
|
|
7
7
|
import { a as Xe, c as De } from "./object-qECH92oz.js";
|
|
8
8
|
import { _ as ue } from "./lodash-B5I3zXaY.js";
|
|
9
|
-
import { u as be } from "./vue-i18n
|
|
9
|
+
import { u as be } from "./vue-i18n--AFmNvm8.js";
|
|
10
10
|
import { Z, g as J, a as G } from "./zod-Bg2FbC-D.js";
|
|
11
|
-
import { z as Q, R as Ze } from "./app-
|
|
12
|
-
import { k as Qe, l as et, m as tt, n as Ae, o as nt } from "./index-
|
|
11
|
+
import { z as Q, R as Ze } from "./app-BqAFUCz8.js";
|
|
12
|
+
import { k as Qe, l as et, m as tt, n as Ae, o as nt } from "./index-sLN88aCQ.js";
|
|
13
13
|
import { u as Se } from "./app-wDQR6dpb.js";
|
|
14
|
-
import { _ as te } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
14
|
+
import { _ as te } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BCc_w9J8.js";
|
|
15
15
|
import { J as Pe } from "./JsonViewer-v8_C7l5N.js";
|
|
16
|
-
import { _ as ot } from "./index-
|
|
16
|
+
import { _ as ot } from "./index-DLIjZTu7.js";
|
|
17
17
|
import { _ as at } from "./ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js";
|
|
18
18
|
import { _ as lt } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
19
|
-
import { z as st, a as rt } from "./money-
|
|
20
|
-
import { F as it } from "./number-
|
|
21
|
-
import { t as dt } from "./helper-
|
|
22
|
-
import "./index-
|
|
23
|
-
import "./index-
|
|
24
|
-
import "./index-
|
|
25
|
-
import "./index-
|
|
26
|
-
import { m as ut } from "./index-
|
|
27
|
-
import { m as Ce } from "./index-
|
|
19
|
+
import { z as st, a as rt } from "./money-BZq33xlW.js";
|
|
20
|
+
import { F as it } from "./number-DFHYy76W.js";
|
|
21
|
+
import { t as dt } from "./helper-BI6pWRqN.js";
|
|
22
|
+
import "./index-DTbigOhK.js";
|
|
23
|
+
import "./index-fCUvdTQu.js";
|
|
24
|
+
import "./index-COe4sMRZ.js";
|
|
25
|
+
import "./index-DoHEyLZn.js";
|
|
26
|
+
import { m as ut } from "./index-BpBt6Y8F.js";
|
|
27
|
+
import { m as Ce } from "./index-aOnN-LXC.js";
|
|
28
28
|
import { useRouter as ct } from "vue-router";
|
|
29
29
|
function je(v) {
|
|
30
30
|
return se.DineroFactory(v).toUnit();
|
|
31
31
|
}
|
|
32
|
-
function mt(v, _, l, f,
|
|
32
|
+
function mt(v, _, l, f, r = [], b = []) {
|
|
33
33
|
const o = ot.compact(
|
|
34
34
|
_.map((t) => v.find((c) => c.systemCode === t.systemCode && c.taxCode === t.taxCode)).filter((t) => !!t && b.includes(t.systemCode))
|
|
35
35
|
), m = o.reduce(
|
|
@@ -37,7 +37,7 @@ function mt(v, _, l, f, i = [], b = []) {
|
|
|
37
37
|
var y;
|
|
38
38
|
return Object.assign(t, {
|
|
39
39
|
[c.taxCode]: {
|
|
40
|
-
inclusive: ((y =
|
|
40
|
+
inclusive: ((y = r.find((d) => d.systemCode === c.systemCode)) == null ? void 0 : y.inclusive) || !1,
|
|
41
41
|
adjustment: {
|
|
42
42
|
level: 1,
|
|
43
43
|
type: {
|
|
@@ -84,9 +84,9 @@ function mt(v, _, l, f, i = [], b = []) {
|
|
|
84
84
|
}));
|
|
85
85
|
}
|
|
86
86
|
function pt(v, _, l) {
|
|
87
|
-
return v ? v.reduce((f,
|
|
87
|
+
return v ? v.reduce((f, r) => {
|
|
88
88
|
var b;
|
|
89
|
-
return (b = l.find((o) => o.systemCode ===
|
|
89
|
+
return (b = l.find((o) => o.systemCode === r.systemCode)) != null && b.inclusive || (f = se.DineroFactory(f.toObject()).add(r.total)), f;
|
|
90
90
|
}, se.DineroFactory(_)).toObject() : se.DineroFactory(_).toObject();
|
|
91
91
|
}
|
|
92
92
|
const yt = { class: "relative h-[120px] aspect-video flex items-center justify-center border rounded-md border-fm-color-neutral-gray-300" }, ft = ["src"], bt = {
|
|
@@ -99,10 +99,10 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
99
99
|
},
|
|
100
100
|
emits: ["edit", "delete", "send"],
|
|
101
101
|
setup(v, { emit: _ }) {
|
|
102
|
-
const l = v, f = _,
|
|
102
|
+
const l = v, f = _, r = j(() => {
|
|
103
103
|
const o = [];
|
|
104
104
|
return l.bundle.price.amount > 0 && o.push(
|
|
105
|
-
`${
|
|
105
|
+
`${N.Config.getCountry().currency.symbol}${je(l.bundle.price)}`
|
|
106
106
|
), l.bundle.coinPrice && o.push(`${l.bundle.coinPrice} point(s)`), o.join(" or ");
|
|
107
107
|
}), b = j(() => {
|
|
108
108
|
var m, u;
|
|
@@ -121,7 +121,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
121
121
|
}, {
|
|
122
122
|
default: T(() => [
|
|
123
123
|
x("div", yt, [
|
|
124
|
-
v.bundle.image ? (g(),
|
|
124
|
+
v.bundle.image ? (g(), B("img", {
|
|
125
125
|
key: 1,
|
|
126
126
|
src: v.bundle.image,
|
|
127
127
|
class: "w-full h-full object-contain aspect-video"
|
|
@@ -132,23 +132,23 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
132
132
|
size: "md",
|
|
133
133
|
class: "text-fm-color-neutral-gray-200"
|
|
134
134
|
})),
|
|
135
|
-
v.bundle.isFeedvibe ? (g(),
|
|
136
|
-
|
|
135
|
+
v.bundle.isFeedvibe ? (g(), B("div", bt, [
|
|
136
|
+
i(t, {
|
|
137
137
|
label: "Feedvibe",
|
|
138
138
|
class: "text-fm-color-primary bg-fm-color-system-warning-100",
|
|
139
139
|
compact: ""
|
|
140
140
|
})
|
|
141
141
|
])) : M("", !0),
|
|
142
142
|
x("div", gt, [
|
|
143
|
-
|
|
143
|
+
i(d, { placement: "bottom-end" }, {
|
|
144
144
|
"menu-button": T(() => [
|
|
145
|
-
|
|
145
|
+
i(c, {
|
|
146
146
|
icon: "more_vert",
|
|
147
147
|
variant: "tertiary"
|
|
148
148
|
})
|
|
149
149
|
]),
|
|
150
150
|
default: T(() => [
|
|
151
|
-
|
|
151
|
+
i(y, {
|
|
152
152
|
onClick: m[0] || (m[0] = (a) => f("edit", v.bundle)),
|
|
153
153
|
icon: "edit",
|
|
154
154
|
label: "Edit"
|
|
@@ -159,7 +159,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
159
159
|
icon: "send",
|
|
160
160
|
label: "Send"
|
|
161
161
|
})),
|
|
162
|
-
|
|
162
|
+
i(y, {
|
|
163
163
|
onClick: m[2] || (m[2] = (a) => f("delete", v.bundle)),
|
|
164
164
|
icon: "delete"
|
|
165
165
|
}, {
|
|
@@ -174,9 +174,9 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
174
174
|
])
|
|
175
175
|
]),
|
|
176
176
|
x("div", ht, L(v.bundle.name), 1),
|
|
177
|
-
x("div", _t, L(e(
|
|
177
|
+
x("div", _t, L(e(r) || "Free"), 1),
|
|
178
178
|
x("div", xt, [
|
|
179
|
-
(g(!0),
|
|
179
|
+
(g(!0), B(X, null, re(e(b), (a, S) => (g(), I(t, {
|
|
180
180
|
key: S,
|
|
181
181
|
label: a
|
|
182
182
|
}, null, 8, ["label"]))), 128))
|
|
@@ -191,14 +191,14 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
191
191
|
emits: ["create"],
|
|
192
192
|
setup(v, { emit: _ }) {
|
|
193
193
|
const { t: l } = be(), f = _;
|
|
194
|
-
return (
|
|
194
|
+
return (r, b) => {
|
|
195
195
|
const o = h("FmButton"), m = h("FmCard");
|
|
196
196
|
return g(), I(m, {
|
|
197
197
|
variant: "outlined",
|
|
198
198
|
class: "flex flex-col gap-y-8 p-16 h-full min-h-[240px] items-center justify-center"
|
|
199
199
|
}, {
|
|
200
200
|
default: T(() => [
|
|
201
|
-
|
|
201
|
+
i(o, {
|
|
202
202
|
onClick: b[0] || (b[0] = (u) => f("create")),
|
|
203
203
|
label: e(l)("connect.store.actions.addBundle"),
|
|
204
204
|
icon: "add",
|
|
@@ -222,17 +222,17 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
222
222
|
}
|
|
223
223
|
},
|
|
224
224
|
setup(v) {
|
|
225
|
-
const { t: _ } = be(), l = v, f = Me(), { emitData:
|
|
225
|
+
const { t: _ } = be(), l = v, f = Me(), { emitData: r, emitAction: b } = Oe(), o = R(l.initialValue), m = Q.string().min(1);
|
|
226
226
|
function u() {
|
|
227
|
-
|
|
227
|
+
r(o.value), b("primary"), f.close();
|
|
228
228
|
}
|
|
229
229
|
function t() {
|
|
230
|
-
|
|
230
|
+
r(null), b("primary"), f.close();
|
|
231
231
|
}
|
|
232
232
|
return (c, y) => {
|
|
233
233
|
const d = h("FmTextField"), V = h("FmButton");
|
|
234
|
-
return g(),
|
|
235
|
-
|
|
234
|
+
return g(), B("div", Ft, [
|
|
235
|
+
i(d, {
|
|
236
236
|
modelValue: e(o),
|
|
237
237
|
"onUpdate:modelValue": y[0] || (y[0] = (a) => oe(o) ? o.value = a : null),
|
|
238
238
|
label: e(_)("connect.store.category.label"),
|
|
@@ -248,12 +248,12 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
248
248
|
}, null, 8, ["label"])) : M("", !0)
|
|
249
249
|
]),
|
|
250
250
|
x("div", wt, [
|
|
251
|
-
|
|
251
|
+
i(V, {
|
|
252
252
|
label: e(_)("connect.common.cancel"),
|
|
253
253
|
variant: "tertiary",
|
|
254
254
|
onClick: y[1] || (y[1] = (a) => e(f).close())
|
|
255
255
|
}, null, 8, ["label"]),
|
|
256
|
-
|
|
256
|
+
i(V, {
|
|
257
257
|
label: v.action == "edit" ? e(_)("connect.common.edit") : e(_)("connect.common.add"),
|
|
258
258
|
disabled: !e(o),
|
|
259
259
|
onClick: u
|
|
@@ -266,7 +266,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
266
266
|
}), Pt = { class: "space-y-16" }, $t = /* @__PURE__ */ x("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Select a category to create FeedMe CNY 2025 bundle ", -1), Tt = { class: "flex items-center justify-end gap-8 pb-16" }, Ut = /* @__PURE__ */ ee({
|
|
267
267
|
__name: "SelectCategoryDialog",
|
|
268
268
|
setup(v) {
|
|
269
|
-
const { emitData: _, emitAction: l } = Oe(), f = ke(),
|
|
269
|
+
const { emitData: _, emitAction: l } = Oe(), f = ke(), r = R(), b = j(
|
|
270
270
|
() => f.sortedStoreCategories.map((o, m) => ({
|
|
271
271
|
label: o.name,
|
|
272
272
|
value: m
|
|
@@ -274,28 +274,28 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
274
274
|
);
|
|
275
275
|
return (o, m) => {
|
|
276
276
|
const u = h("FmSelect"), t = h("FmButton");
|
|
277
|
-
return g(),
|
|
277
|
+
return g(), B("div", Pt, [
|
|
278
278
|
$t,
|
|
279
|
-
|
|
279
|
+
i(u, {
|
|
280
280
|
placeholder: "Select a category",
|
|
281
281
|
items: e(b),
|
|
282
|
-
modelValue: e(
|
|
282
|
+
modelValue: e(r),
|
|
283
283
|
"onUpdate:modelValue": [
|
|
284
|
-
m[0] || (m[0] = (c) => oe(
|
|
284
|
+
m[0] || (m[0] = (c) => oe(r) ? r.value = c : null),
|
|
285
285
|
m[1] || (m[1] = (c) => e(_)(c))
|
|
286
286
|
],
|
|
287
287
|
label: "Category"
|
|
288
288
|
}, null, 8, ["items", "modelValue"]),
|
|
289
289
|
x("div", Tt, [
|
|
290
|
-
|
|
290
|
+
i(t, {
|
|
291
291
|
variant: "tertiary",
|
|
292
292
|
label: "Cancel",
|
|
293
293
|
onClick: m[2] || (m[2] = (c) => e(l)("tertiary"))
|
|
294
294
|
}),
|
|
295
|
-
|
|
295
|
+
i(t, {
|
|
296
296
|
label: "Select",
|
|
297
297
|
onClick: m[3] || (m[3] = (c) => e(l)("primary")),
|
|
298
|
-
disabled: e(
|
|
298
|
+
disabled: e(r) == null
|
|
299
299
|
}, null, 8, ["disabled"])
|
|
300
300
|
])
|
|
301
301
|
]);
|
|
@@ -459,7 +459,7 @@ const Rt = {
|
|
|
459
459
|
return _e(this);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
}, pe = () =>
|
|
462
|
+
}, pe = () => N.Config.getCountry(), ye = {
|
|
463
463
|
get fullCurrency() {
|
|
464
464
|
return pe().currency;
|
|
465
465
|
},
|
|
@@ -467,7 +467,7 @@ const Rt = {
|
|
|
467
467
|
return pe().currency.code;
|
|
468
468
|
},
|
|
469
469
|
get fullTax() {
|
|
470
|
-
return
|
|
470
|
+
return N.Country.getCountryFlattenTaxes(pe().code);
|
|
471
471
|
},
|
|
472
472
|
get taxSystem() {
|
|
473
473
|
return pe().taxSystems;
|
|
@@ -479,7 +479,7 @@ const Rt = {
|
|
|
479
479
|
}));
|
|
480
480
|
},
|
|
481
481
|
groupedTaxOptions() {
|
|
482
|
-
const v =
|
|
482
|
+
const v = N.Country.getCountryFlattenTaxes(pe().code);
|
|
483
483
|
return ye.taxSystem.map((_) => ({
|
|
484
484
|
code: _.code,
|
|
485
485
|
options: v.map((l) => ({ ...l, feedmeTaxCode: ye.generateCode(l) })).filter((l) => l.systemCode === _.code)
|
|
@@ -503,13 +503,13 @@ const Rt = {
|
|
|
503
503
|
},
|
|
504
504
|
emits: ["update:model-value"],
|
|
505
505
|
setup(v, { emit: _ }) {
|
|
506
|
-
const l = v, f = ne.taxSystem,
|
|
506
|
+
const l = v, f = ne.taxSystem, r = _, b = R(l.modelValue);
|
|
507
507
|
function o(c, y) {
|
|
508
508
|
const d = ue.clone(l.modelValue), V = d.findIndex((a) => a.systemCode === c);
|
|
509
509
|
V >= 0 ? d[V].inclusive = y : d.push({
|
|
510
510
|
systemCode: c,
|
|
511
511
|
inclusive: y
|
|
512
|
-
}), b.value = d,
|
|
512
|
+
}), b.value = d, r("update:model-value", d);
|
|
513
513
|
}
|
|
514
514
|
function m() {
|
|
515
515
|
return f.map((c) => {
|
|
@@ -538,10 +538,10 @@ const Rt = {
|
|
|
538
538
|
}
|
|
539
539
|
), (c, y) => {
|
|
540
540
|
const d = h("FmSwitch");
|
|
541
|
-
return g(!0),
|
|
541
|
+
return g(!0), B(X, null, re(e(u), (V, a) => {
|
|
542
542
|
var S;
|
|
543
|
-
return g(),
|
|
544
|
-
|
|
543
|
+
return g(), B("div", { key: a }, [
|
|
544
|
+
i(d, {
|
|
545
545
|
"model-value": ((S = e(b)[a]) == null ? void 0 : S.inclusive) || !1,
|
|
546
546
|
"label-placement": "left",
|
|
547
547
|
"onUpdate:modelValue": (w) => V.input(w)
|
|
@@ -559,8 +559,8 @@ const Rt = {
|
|
|
559
559
|
};
|
|
560
560
|
}
|
|
561
561
|
});
|
|
562
|
-
var
|
|
563
|
-
const
|
|
562
|
+
var Bt = { mode: "production", appMode: "mf" };
|
|
563
|
+
const Nt = { class: "space-y-8" }, Dt = {
|
|
564
564
|
key: 0,
|
|
565
565
|
class: "space-y-16"
|
|
566
566
|
}, At = /* @__PURE__ */ ee({
|
|
@@ -570,43 +570,43 @@ const Bt = { class: "space-y-8" }, Dt = {
|
|
|
570
570
|
},
|
|
571
571
|
emits: ["update:modelValue"],
|
|
572
572
|
setup(v, { emit: _ }) {
|
|
573
|
-
const l = v, f = _,
|
|
574
|
-
we(
|
|
573
|
+
const l = v, f = _, r = R(!1);
|
|
574
|
+
we(r, (o, m) => {
|
|
575
575
|
m != o && (!l.modelValue && o ? f("update:modelValue", {
|
|
576
576
|
apiKey: "",
|
|
577
577
|
webhookSecret: ""
|
|
578
578
|
}) : o || f("update:modelValue", void 0));
|
|
579
579
|
});
|
|
580
580
|
const b = j(() => {
|
|
581
|
-
const o =
|
|
581
|
+
const o = Bt.mode === "development", m = N.Config.getCountry().code.toLowerCase(), u = m != "my" ? `.${m}` : "";
|
|
582
582
|
return `https://marketing${o ? "-dev" : ""}${u}.feedmeapi.com/stripe/${ze.getBusinessId()}/webhook`;
|
|
583
583
|
});
|
|
584
584
|
return fe(() => {
|
|
585
|
-
|
|
585
|
+
r.value = !!l.modelValue;
|
|
586
586
|
}), (o, m) => {
|
|
587
587
|
const u = h("FmSwitch"), t = h("FmTextField"), c = h("FmButton");
|
|
588
|
-
return g(),
|
|
589
|
-
|
|
590
|
-
modelValue: e(
|
|
591
|
-
"onUpdate:modelValue": m[0] || (m[0] = (y) => oe(
|
|
588
|
+
return g(), B("div", Nt, [
|
|
589
|
+
i(u, {
|
|
590
|
+
modelValue: e(r),
|
|
591
|
+
"onUpdate:modelValue": m[0] || (m[0] = (y) => oe(r) ? r.value = y : null),
|
|
592
592
|
value: "true",
|
|
593
593
|
label: "Enable Stripe"
|
|
594
594
|
}, null, 8, ["modelValue"]),
|
|
595
|
-
l.modelValue ? (g(),
|
|
596
|
-
|
|
595
|
+
l.modelValue ? (g(), B("div", Dt, [
|
|
596
|
+
i(t, {
|
|
597
597
|
label: "API Key",
|
|
598
598
|
modelValue: l.modelValue.apiKey,
|
|
599
599
|
"onUpdate:modelValue": m[1] || (m[1] = (y) => l.modelValue.apiKey = y),
|
|
600
600
|
"helper-text": "Go to Stripe Dashboard get your API Key and paste here."
|
|
601
601
|
}, null, 8, ["modelValue"]),
|
|
602
|
-
|
|
602
|
+
i(t, {
|
|
603
603
|
label: "Webhook URL",
|
|
604
604
|
"model-value": e(b),
|
|
605
605
|
readonly: "",
|
|
606
606
|
"helper-text": "Copy this URL to your Stripe dashboard"
|
|
607
607
|
}, {
|
|
608
608
|
append: T(() => [
|
|
609
|
-
|
|
609
|
+
i(c, {
|
|
610
610
|
icon: "content_copy",
|
|
611
611
|
variant: "tertiary",
|
|
612
612
|
onClick: m[2] || (m[2] = (y) => e(Je)(e(b)))
|
|
@@ -614,7 +614,7 @@ const Bt = { class: "space-y-8" }, Dt = {
|
|
|
614
614
|
]),
|
|
615
615
|
_: 1
|
|
616
616
|
}, 8, ["model-value"]),
|
|
617
|
-
|
|
617
|
+
i(t, {
|
|
618
618
|
modelValue: l.modelValue.webhookSecret,
|
|
619
619
|
"onUpdate:modelValue": m[3] || (m[3] = (y) => l.modelValue.webhookSecret = y),
|
|
620
620
|
label: "Webhook Secret",
|
|
@@ -635,7 +635,7 @@ const Bt = { class: "space-y-8" }, Dt = {
|
|
|
635
635
|
__name: "StoreSettingSheet",
|
|
636
636
|
emits: ["update"],
|
|
637
637
|
setup(v, { expose: _, emit: l }) {
|
|
638
|
-
const { t: f } = be(),
|
|
638
|
+
const { t: f } = be(), r = l, b = R(!1), o = R(), m = R(!1), u = Qe.extend({
|
|
639
639
|
company: et.extend({
|
|
640
640
|
name: Q.string().min(1, "Company name is required"),
|
|
641
641
|
regNo: Q.string().min(1, "Registration number is required"),
|
|
@@ -653,7 +653,7 @@ const Bt = { class: "space-y-8" }, Dt = {
|
|
|
653
653
|
}), t = j(() => u.safeParse(o.value).success);
|
|
654
654
|
function c() {
|
|
655
655
|
const V = u.safeParse(o.value);
|
|
656
|
-
V.success &&
|
|
656
|
+
V.success && r("update", V.data);
|
|
657
657
|
}
|
|
658
658
|
function y() {
|
|
659
659
|
return {
|
|
@@ -665,7 +665,7 @@ const Bt = { class: "space-y-8" }, Dt = {
|
|
|
665
665
|
city: "",
|
|
666
666
|
postcode: "",
|
|
667
667
|
state: "",
|
|
668
|
-
country:
|
|
668
|
+
country: N.Config.getCountry().name
|
|
669
669
|
},
|
|
670
670
|
phoneNo: "",
|
|
671
671
|
regNo: "",
|
|
@@ -690,13 +690,13 @@ const Bt = { class: "space-y-8" }, Dt = {
|
|
|
690
690
|
}, {
|
|
691
691
|
"side-sheet-footer": T(() => [
|
|
692
692
|
x("div", zt, [
|
|
693
|
-
|
|
693
|
+
i(z, {
|
|
694
694
|
label: e(f)("connect.common.save"),
|
|
695
695
|
onClick: c,
|
|
696
696
|
disabled: !e(t) || e(Se)().isLoading,
|
|
697
697
|
loading: e(Se)().isLoading
|
|
698
698
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
699
|
-
|
|
699
|
+
i(z, {
|
|
700
700
|
label: e(f)("connect.common.cancel"),
|
|
701
701
|
onClick: a[14] || (a[14] = (W) => d(!1)),
|
|
702
702
|
variant: "tertiary"
|
|
@@ -706,22 +706,22 @@ const Bt = { class: "space-y-8" }, Dt = {
|
|
|
706
706
|
default: T(() => {
|
|
707
707
|
var W, ae;
|
|
708
708
|
return [
|
|
709
|
-
|
|
710
|
-
e(o) && e(o).company ? (g(),
|
|
709
|
+
i(Pe, { json: e(o) }, null, 8, ["json"]),
|
|
710
|
+
e(o) && e(o).company ? (g(), B("div", Mt, [
|
|
711
711
|
x("div", Ot, L(e(f)("connect.store.setting.company.legal_info")), 1),
|
|
712
|
-
|
|
712
|
+
i(te, {
|
|
713
713
|
modelValue: e(o).company.name,
|
|
714
714
|
"onUpdate:modelValue": a[0] || (a[0] = (s) => e(o).company.name = s),
|
|
715
715
|
label: e(f)("connect.store.setting.company.name"),
|
|
716
716
|
schema: e(Z).typeAtPath(e(u), "company.name")
|
|
717
717
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
718
|
-
|
|
718
|
+
i(te, {
|
|
719
719
|
modelValue: e(o).company.regNo,
|
|
720
720
|
"onUpdate:modelValue": a[1] || (a[1] = (s) => e(o).company.regNo = s),
|
|
721
721
|
label: e(f)("connect.store.setting.company.reg_no"),
|
|
722
722
|
schema: e(Z).typeAtPath(e(u), "company.regNo")
|
|
723
723
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
724
|
-
e(
|
|
724
|
+
e(N.Config).getCountry().taxSystems.length ? (g(), I(te, {
|
|
725
725
|
key: 0,
|
|
726
726
|
modelValue: e(o).company.sstRegNo,
|
|
727
727
|
"onUpdate:modelValue": [
|
|
@@ -731,40 +731,40 @@ const Bt = { class: "space-y-8" }, Dt = {
|
|
|
731
731
|
label: e(f)("connect.store.setting.company.tax_reg_no"),
|
|
732
732
|
schema: e(Z).typeAtPath(e(u), "company.sstRegNo")
|
|
733
733
|
}, null, 8, ["modelValue", "label", "schema"])) : M("", !0),
|
|
734
|
-
(W = e(o).company) != null && W.sstRegNo && e(o).inclusiveTaxes ? (g(),
|
|
734
|
+
(W = e(o).company) != null && W.sstRegNo && e(o).inclusiveTaxes ? (g(), B("div", Et, [
|
|
735
735
|
x("div", jt, L(e(f)("connect.store.setting.company.tax")), 1),
|
|
736
|
-
|
|
736
|
+
i(It, {
|
|
737
737
|
modelValue: e(o).inclusiveTaxes,
|
|
738
738
|
"onUpdate:modelValue": a[4] || (a[4] = (s) => e(o).inclusiveTaxes = s)
|
|
739
739
|
}, null, 8, ["modelValue"])
|
|
740
740
|
])) : M("", !0),
|
|
741
|
-
|
|
741
|
+
i(te, {
|
|
742
742
|
modelValue: e(o).company.phoneNo,
|
|
743
743
|
"onUpdate:modelValue": a[5] || (a[5] = (s) => e(o).company.phoneNo = s),
|
|
744
744
|
label: e(f)("connect.store.setting.company.phone"),
|
|
745
745
|
schema: e(Z).typeAtPath(e(u), "company.phoneNo")
|
|
746
746
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
747
747
|
x("div", Lt, L(e(f)("connect.store.setting.company.address.title")), 1),
|
|
748
|
-
|
|
748
|
+
i(te, {
|
|
749
749
|
modelValue: e(o).company.address.line1,
|
|
750
750
|
"onUpdate:modelValue": a[6] || (a[6] = (s) => e(o).company.address.line1 = s),
|
|
751
751
|
label: e(f)("connect.store.setting.company.address.line1"),
|
|
752
752
|
schema: e(Z).typeAtPath(e(u), "company.address.line1")
|
|
753
753
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
754
|
-
|
|
754
|
+
i(te, {
|
|
755
755
|
modelValue: e(o).company.address.line2,
|
|
756
756
|
"onUpdate:modelValue": a[7] || (a[7] = (s) => e(o).company.address.line2 = s),
|
|
757
757
|
label: e(f)("connect.store.setting.company.address.line2"),
|
|
758
758
|
schema: e(Z).typeAtPath(e(u), "company.address.line2")
|
|
759
759
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
760
760
|
x("div", Kt, [
|
|
761
|
-
|
|
761
|
+
i(te, {
|
|
762
762
|
modelValue: e(o).company.address.city,
|
|
763
763
|
"onUpdate:modelValue": a[8] || (a[8] = (s) => e(o).company.address.city = s),
|
|
764
764
|
label: e(f)("connect.store.setting.company.address.city"),
|
|
765
765
|
schema: e(Z).typeAtPath(e(u), "company.address.city")
|
|
766
766
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
767
|
-
|
|
767
|
+
i(te, {
|
|
768
768
|
modelValue: e(o).company.address.postcode,
|
|
769
769
|
"onUpdate:modelValue": a[9] || (a[9] = (s) => e(o).company.address.postcode = s),
|
|
770
770
|
label: e(f)("connect.store.setting.company.address.postcode"),
|
|
@@ -772,19 +772,19 @@ const Bt = { class: "space-y-8" }, Dt = {
|
|
|
772
772
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
773
773
|
x("div", Ht, [
|
|
774
774
|
x("div", qt, L(e(f)("connect.store.setting.company.address.state")), 1),
|
|
775
|
-
|
|
775
|
+
i(D, {
|
|
776
776
|
placement: "top-end",
|
|
777
777
|
"model-value": e(m)
|
|
778
778
|
}, {
|
|
779
779
|
"menu-button": T(() => [
|
|
780
|
-
|
|
780
|
+
i(te, {
|
|
781
781
|
modelValue: e(o).company.address.state,
|
|
782
782
|
"onUpdate:modelValue": a[10] || (a[10] = (s) => e(o).company.address.state = s),
|
|
783
783
|
schema: e(Z).typeAtPath(e(u), "company.address.state"),
|
|
784
784
|
onFocusChanged: a[11] || (a[11] = (s) => m.value = s)
|
|
785
785
|
}, {
|
|
786
786
|
append: T(() => [
|
|
787
|
-
|
|
787
|
+
i(S, {
|
|
788
788
|
name: e(m) ? "keyboard_arrow_up" : "keyboard_arrow_down"
|
|
789
789
|
}, null, 8, ["name"])
|
|
790
790
|
]),
|
|
@@ -792,7 +792,7 @@ const Bt = { class: "space-y-8" }, Dt = {
|
|
|
792
792
|
}, 8, ["modelValue", "schema"])
|
|
793
793
|
]),
|
|
794
794
|
default: T(() => [
|
|
795
|
-
(g(!0),
|
|
795
|
+
(g(!0), B(X, null, re(e(Rt)[e(N.Config).getCountry().code].stateItems.filter(
|
|
796
796
|
(s) => {
|
|
797
797
|
var k, U;
|
|
798
798
|
return s.label.toLowerCase().includes(((U = (k = e(o)) == null ? void 0 : k.company) == null ? void 0 : U.address.state.toLowerCase()) ?? "");
|
|
@@ -809,14 +809,14 @@ const Bt = { class: "space-y-8" }, Dt = {
|
|
|
809
809
|
_: 1
|
|
810
810
|
}, 8, ["model-value"])
|
|
811
811
|
]),
|
|
812
|
-
|
|
812
|
+
i(Y, {
|
|
813
813
|
label: e(f)("connect.store.setting.company.address.country"),
|
|
814
814
|
modelValue: e(o).company.address.country,
|
|
815
815
|
"onUpdate:modelValue": a[12] || (a[12] = (s) => e(o).company.address.country = s),
|
|
816
816
|
items: [
|
|
817
817
|
{
|
|
818
|
-
label: e(
|
|
819
|
-
value: e(
|
|
818
|
+
label: e(N.Config).getCountry().name,
|
|
819
|
+
value: e(N.Config).getCountry().name
|
|
820
820
|
}
|
|
821
821
|
],
|
|
822
822
|
rules: [e(Z).ruleAtPath(e(u), "company.address.country")]
|
|
@@ -824,7 +824,7 @@ const Bt = { class: "space-y-8" }, Dt = {
|
|
|
824
824
|
]),
|
|
825
825
|
x("div", Yt, [
|
|
826
826
|
x("div", Wt, L(e(f)("connect.store.setting.stripe.title")), 1),
|
|
827
|
-
|
|
827
|
+
i(At, {
|
|
828
828
|
"model-value": (ae = e(o)) == null ? void 0 : ae.stripe,
|
|
829
829
|
"onUpdate:modelValue": a[13] || (a[13] = (s) => e(o).stripe = s)
|
|
830
830
|
}, null, 8, ["model-value"])
|
|
@@ -838,7 +838,7 @@ const Bt = { class: "space-y-8" }, Dt = {
|
|
|
838
838
|
}
|
|
839
839
|
});
|
|
840
840
|
function Gt(v, _ = !0) {
|
|
841
|
-
return
|
|
841
|
+
return N.DineroFactory(v).toFormat(_);
|
|
842
842
|
}
|
|
843
843
|
const Xt = /* @__PURE__ */ ee({
|
|
844
844
|
__name: "TaxVariantSetting",
|
|
@@ -863,10 +863,10 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
863
863
|
u(t);
|
|
864
864
|
}
|
|
865
865
|
});
|
|
866
|
-
function
|
|
866
|
+
function r() {
|
|
867
867
|
return ne.groupedTaxOptions();
|
|
868
868
|
}
|
|
869
|
-
const b = j(() =>
|
|
869
|
+
const b = j(() => r().map((t) => ({
|
|
870
870
|
name: t.code,
|
|
871
871
|
value: (o.value || []).find(
|
|
872
872
|
(c) => t.options.some((y) => y.feedmeTaxCode === c)
|
|
@@ -877,7 +877,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
877
877
|
}))
|
|
878
878
|
}))), o = j(() => l.modelValue.map((t) => ne.generateCode(t)));
|
|
879
879
|
function m(t) {
|
|
880
|
-
const c =
|
|
880
|
+
const c = r().find(
|
|
881
881
|
(a) => a.options.some((S) => S.feedmeTaxCode === t)
|
|
882
882
|
), y = c == null ? void 0 : c.options.find((a) => a.feedmeTaxCode === t);
|
|
883
883
|
if (!y) return;
|
|
@@ -887,7 +887,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
887
887
|
function u(t) {
|
|
888
888
|
const c = ue.clone(l.modelValue);
|
|
889
889
|
t.forEach((y) => {
|
|
890
|
-
const d =
|
|
890
|
+
const d = r().find(
|
|
891
891
|
(S) => S.options.some((w) => w.feedmeTaxCode === ne.generateCode(y))
|
|
892
892
|
), V = (d == null ? void 0 : d.options) || [], a = c.findIndex(
|
|
893
893
|
(S) => V.some((w) => ne.generateCode(w) === ne.generateCode(S))
|
|
@@ -897,11 +897,11 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
897
897
|
}
|
|
898
898
|
return (t, c) => {
|
|
899
899
|
const y = h("FmRadio"), d = h("FmRadioGroup");
|
|
900
|
-
return g(!0),
|
|
900
|
+
return g(!0), B(X, null, re(e(b), (V) => (g(), B("div", {
|
|
901
901
|
key: V.name,
|
|
902
902
|
class: "flex items-start"
|
|
903
903
|
}, [
|
|
904
|
-
|
|
904
|
+
i(d, {
|
|
905
905
|
modelValue: V.value,
|
|
906
906
|
"onUpdate:modelValue": [
|
|
907
907
|
(a) => V.value = a,
|
|
@@ -911,7 +911,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
911
911
|
]
|
|
912
912
|
}, {
|
|
913
913
|
default: T(() => [
|
|
914
|
-
(g(!0),
|
|
914
|
+
(g(!0), B(X, null, re(V.options, (a, S) => (g(), I(y, {
|
|
915
915
|
key: S,
|
|
916
916
|
value: a.value,
|
|
917
917
|
label: a.label
|
|
@@ -927,8 +927,8 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
927
927
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
928
928
|
},
|
|
929
929
|
name: "",
|
|
930
|
-
price:
|
|
931
|
-
originalPrice:
|
|
930
|
+
price: N.Dinero.zero().toObject(),
|
|
931
|
+
originalPrice: N.Dinero.zero().toObject(),
|
|
932
932
|
vouchers: [],
|
|
933
933
|
credit: {
|
|
934
934
|
normal: 0,
|
|
@@ -948,11 +948,11 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
948
948
|
}, Zt = {
|
|
949
949
|
key: 0,
|
|
950
950
|
class: "space-y-24 pr-12"
|
|
951
|
-
}, Qt = { class: "space-y-8" }, en = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, tn = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, nn =
|
|
951
|
+
}, Qt = { class: "space-y-8" }, en = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, tn = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, nn = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, on = /* @__PURE__ */ x("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Taxes", -1), 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__ */ ee({
|
|
952
952
|
__name: "EditBundleSheet",
|
|
953
953
|
emits: ["update"],
|
|
954
954
|
setup(v, { expose: _, emit: l }) {
|
|
955
|
-
const f = l, { t:
|
|
955
|
+
const f = l, { t: r } = be(), b = ke(), o = R(!1), m = R([]), u = R({
|
|
956
956
|
category: 0,
|
|
957
957
|
index: -1,
|
|
958
958
|
originalCategoryIndex: void 0
|
|
@@ -997,7 +997,9 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
999
|
], a = R([]), S = j(() => b.bundleRewards.map((p) => {
|
|
1000
|
-
const n = w.value.find((P) => P.id == p._id), C = p.type === "VOUCHER" ? `${p.options.maxUse} use(s), ${dt(
|
|
1000
|
+
const n = w.value.find((P) => P.id == p._id), C = p.type === "VOUCHER" ? `${p.options.maxUse} use(s), ${dt(
|
|
1001
|
+
p.options.validityOption || {}
|
|
1002
|
+
)}` : "No expiry";
|
|
1001
1003
|
return {
|
|
1002
1004
|
collectible: p,
|
|
1003
1005
|
description: C,
|
|
@@ -1093,17 +1095,17 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1093
1095
|
"max-width": 768,
|
|
1094
1096
|
modelValue: e(o),
|
|
1095
1097
|
"onUpdate:modelValue": n[20] || (n[20] = (le) => oe(o) ? o.value = le : null),
|
|
1096
|
-
header: e(u).index != -1 ? e(
|
|
1098
|
+
header: e(u).index != -1 ? e(r)("connect.store.bundle.edit.title") : e(r)("connect.store.bundle.edit.create")
|
|
1097
1099
|
}, {
|
|
1098
1100
|
"side-sheet-footer": T(() => [
|
|
1099
1101
|
x("div", cn, [
|
|
1100
|
-
|
|
1102
|
+
i(ce, {
|
|
1101
1103
|
label: e(u).index != -1 ? "Save" : "Add",
|
|
1102
1104
|
onClick: O,
|
|
1103
1105
|
disabled: e(d).length > 0,
|
|
1104
1106
|
loading: e(Se)().isLoading
|
|
1105
1107
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
1106
|
-
|
|
1108
|
+
i(ce, {
|
|
1107
1109
|
label: "Cancel",
|
|
1108
1110
|
onClick: n[19] || (n[19] = (le) => A(!1)),
|
|
1109
1111
|
variant: "tertiary"
|
|
@@ -1111,12 +1113,12 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1111
1113
|
])
|
|
1112
1114
|
]),
|
|
1113
1115
|
default: T(() => {
|
|
1114
|
-
var le, $e, Te, Ue, Re, Ie,
|
|
1116
|
+
var le, $e, Te, Ue, Re, Ie, Be, Ne;
|
|
1115
1117
|
return [
|
|
1116
|
-
|
|
1117
|
-
e(t) ? (g(),
|
|
1118
|
+
i(Pe, { json: e(t) }, null, 8, ["json"]),
|
|
1119
|
+
e(t) ? (g(), B("div", Zt, [
|
|
1118
1120
|
x("div", Qt, [
|
|
1119
|
-
e(
|
|
1121
|
+
e(N.Config).getCountry().code == "MY" && ((le = e(b).payoutAccount) == null ? void 0 : le.status) == "APPROVED" && (($e = e(b).payoutAccount) != null && $e.enable) ? (g(), I(C, {
|
|
1120
1122
|
key: 0,
|
|
1121
1123
|
"onUpdate:modelValue": n[0] || (n[0] = (F) => {
|
|
1122
1124
|
e(t).isFeedvibe = F, e(t).isFeedvibe && (e(t).credit.normal = 0, e(t).coinPrice = 0, e(t).titles = [], K.value = {});
|
|
@@ -1132,22 +1134,22 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1132
1134
|
state: "warning"
|
|
1133
1135
|
})) : M("", !0)
|
|
1134
1136
|
]),
|
|
1135
|
-
x("div", en, L(e(
|
|
1136
|
-
|
|
1137
|
-
label: e(
|
|
1137
|
+
x("div", en, L(e(r)("connect.store.bundle.edit.basicInformation")), 1),
|
|
1138
|
+
i(E, {
|
|
1139
|
+
label: e(r)("connect.store.bundle.edit.bundleName"),
|
|
1138
1140
|
modelValue: e(t).name,
|
|
1139
1141
|
"onUpdate:modelValue": n[1] || (n[1] = (F) => e(t).name = F),
|
|
1140
1142
|
"helper-state": e(J)(e(d), "name"),
|
|
1141
1143
|
"helper-text": e(G)(e(d), "name")
|
|
1142
1144
|
}, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
|
|
1143
|
-
|
|
1145
|
+
i(q, {
|
|
1144
1146
|
modelValue: e(u).category,
|
|
1145
1147
|
"onUpdate:modelValue": n[2] || (n[2] = (F) => e(u).category = F),
|
|
1146
1148
|
label: "Store Category",
|
|
1147
1149
|
items: e(m).map((F, Le) => ({ label: F, value: Le }))
|
|
1148
1150
|
}, null, 8, ["modelValue", "items"]),
|
|
1149
|
-
|
|
1150
|
-
label: e(
|
|
1151
|
+
i(at, {
|
|
1152
|
+
label: e(r)("connect.store.bundle.edit.bundleImage"),
|
|
1151
1153
|
class: "w-1/2 xs:w-2/3",
|
|
1152
1154
|
"aspect-ratio": "16/9",
|
|
1153
1155
|
thumbnail: e(t).image ?? void 0,
|
|
@@ -1158,9 +1160,9 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1158
1160
|
"helper-state": e(J)(e(d), "image"),
|
|
1159
1161
|
"helper-text": e(G)(e(d), "image")
|
|
1160
1162
|
}, null, 8, ["label", "thumbnail", "file", "helper-state", "helper-text"]),
|
|
1161
|
-
|
|
1162
|
-
"model-value": e(
|
|
1163
|
-
label: e(
|
|
1163
|
+
i(H, {
|
|
1164
|
+
"model-value": e(N.Dinero).fromFdoDinero(e(t).price).toUnit(),
|
|
1165
|
+
label: e(r)("connect.store.bundle.edit.bundlePrice"),
|
|
1164
1166
|
min: 0,
|
|
1165
1167
|
"max-fraction-digits": 2,
|
|
1166
1168
|
"onUpdate:modelValue": n[4] || (n[4] = (F) => {
|
|
@@ -1168,36 +1170,38 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1168
1170
|
}),
|
|
1169
1171
|
"is-currency": !0,
|
|
1170
1172
|
"show-steppers": !1,
|
|
1171
|
-
"helper-text": e(G)(e(d), "price") || `${e(
|
|
1173
|
+
"helper-text": e(G)(e(d), "price") || `${e(N.Dinero).fromNumber({ number: 1 }).toFormat(
|
|
1174
|
+
!0
|
|
1175
|
+
)} = ${e(N.Dinero).fromNumber({ number: 1 }).toUnit()} credit`,
|
|
1172
1176
|
"helper-state": e(J)(e(d), "price")
|
|
1173
1177
|
}, {
|
|
1174
1178
|
prepend: T(() => [
|
|
1175
|
-
de(L(e(
|
|
1179
|
+
de(L(e(N.Dinero).defaultCurrency()), 1)
|
|
1176
1180
|
]),
|
|
1177
1181
|
_: 1
|
|
1178
1182
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
1179
|
-
|
|
1180
|
-
"model-value": e(
|
|
1181
|
-
label: e(
|
|
1183
|
+
i(H, {
|
|
1184
|
+
"model-value": e(N.Dinero).fromFdoDinero(e(t).originalPrice).toUnit(),
|
|
1185
|
+
label: e(r)("connect.store.bundle.edit.bundleValue"),
|
|
1182
1186
|
min: 0,
|
|
1183
1187
|
"max-fraction-digits": 2,
|
|
1184
1188
|
"onUpdate:modelValue": n[5] || (n[5] = (F) => {
|
|
1185
|
-
e(t).originalPrice || (e(t).originalPrice = e(
|
|
1189
|
+
e(t).originalPrice || (e(t).originalPrice = e(N.Dinero).zero().toObject()), e(t).originalPrice.amount = F * 10 ** e(t).originalPrice.precision;
|
|
1186
1190
|
}),
|
|
1187
1191
|
"is-currency": !0,
|
|
1188
1192
|
"show-steppers": !1,
|
|
1189
|
-
"helper-text": e(G)(e(d), "originalPrice") || e(
|
|
1193
|
+
"helper-text": e(G)(e(d), "originalPrice") || e(r)("connect.store.bundle.edit.originalPriceHelper"),
|
|
1190
1194
|
"helper-state": e(J)(e(d), "originalPrice")
|
|
1191
1195
|
}, {
|
|
1192
1196
|
prepend: T(() => [
|
|
1193
|
-
de(L(e(
|
|
1197
|
+
de(L(e(N.Dinero).defaultCurrency()), 1)
|
|
1194
1198
|
]),
|
|
1195
1199
|
_: 1
|
|
1196
1200
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
1197
1201
|
e(t).isFeedvibe ? M("", !0) : (g(), I(H, {
|
|
1198
1202
|
key: 0,
|
|
1199
1203
|
"model-value": e(t).coinPrice ?? null,
|
|
1200
|
-
label: e(
|
|
1204
|
+
label: e(r)("connect.store.bundle.edit.pointNeeded"),
|
|
1201
1205
|
min: 0,
|
|
1202
1206
|
"onUpdate:modelValue": n[6] || (n[6] = (F) => {
|
|
1203
1207
|
F > 0 && e(t).credit.normal > 0 && (e(t).credit.normal = 0), e(t).coinPrice = F;
|
|
@@ -1211,10 +1215,10 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1211
1215
|
]),
|
|
1212
1216
|
_: 1
|
|
1213
1217
|
}, 8, ["model-value", "label", "helper-state", "helper-text"])),
|
|
1214
|
-
(Te = e(b).storeOption) != null && Te.stripe && !e(t).isFeedvibe ? (g(),
|
|
1215
|
-
x("div", tn, L(e(
|
|
1216
|
-
|
|
1217
|
-
label: e(
|
|
1218
|
+
(Te = e(b).storeOption) != null && Te.stripe && !e(t).isFeedvibe ? (g(), B(X, { key: 1 }, [
|
|
1219
|
+
x("div", tn, L(e(r)("connect.store.bundle.edit.subscriptionSettings")), 1),
|
|
1220
|
+
i(E, {
|
|
1221
|
+
label: e(r)("connect.store.bundle.edit.stripePriceId"),
|
|
1218
1222
|
modelValue: e(t).stripePriceId,
|
|
1219
1223
|
"onUpdate:modelValue": n[7] || (n[7] = (F) => e(t).stripePriceId = F),
|
|
1220
1224
|
"helper-state": e(J)(e(d), "stripePriceId"),
|
|
@@ -1225,18 +1229,18 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1225
1229
|
"model-value": e(t).subscriptionValidity ?? null,
|
|
1226
1230
|
min: 1,
|
|
1227
1231
|
"onUpdate:modelValue": Y,
|
|
1228
|
-
label: e(
|
|
1232
|
+
label: e(r)("connect.store.bundle.edit.subscriptionValidity"),
|
|
1229
1233
|
"show-steppers": !1,
|
|
1230
1234
|
"helper-state": e(J)(e(d), "subscriptionValidity"),
|
|
1231
1235
|
"helper-text": e(G)(e(d), "subscriptionValidity")
|
|
1232
1236
|
}, null, 8, ["model-value", "label", "helper-state", "helper-text"])) : M("", !0)
|
|
1233
1237
|
], 64)) : M("", !0),
|
|
1234
|
-
e(t).isFeedvibe ? M("", !0) : (g(),
|
|
1235
|
-
nn,
|
|
1236
|
-
|
|
1238
|
+
e(t).isFeedvibe ? M("", !0) : (g(), B(X, { key: 2 }, [
|
|
1239
|
+
x("div", nn, L(e(r)("connect.store.bundle.edit.credit")), 1),
|
|
1240
|
+
i(H, {
|
|
1237
1241
|
modelValue: e(t).credit.normal,
|
|
1238
1242
|
"onUpdate:modelValue": n[8] || (n[8] = (F) => e(t).credit.normal = F),
|
|
1239
|
-
label: "
|
|
1243
|
+
label: e(r)("connect.store.bundle.edit.normalCredit"),
|
|
1240
1244
|
"show-steppers": !1,
|
|
1241
1245
|
"helper-state": e(J)(e(d), "credit.normal"),
|
|
1242
1246
|
"helper-text": e(G)(e(d), "credit.normal")
|
|
@@ -1245,8 +1249,8 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1245
1249
|
de(" credit ")
|
|
1246
1250
|
]),
|
|
1247
1251
|
_: 1
|
|
1248
|
-
}, 8, ["modelValue", "helper-state", "helper-text"]),
|
|
1249
|
-
|
|
1252
|
+
}, 8, ["modelValue", "label", "helper-state", "helper-text"]),
|
|
1253
|
+
i(H, {
|
|
1250
1254
|
"model-value": ((Ue = e(t).credit.free) == null ? void 0 : Ue.amount) ?? null,
|
|
1251
1255
|
min: 0,
|
|
1252
1256
|
"onUpdate:modelValue": n[9] || (n[9] = (F) => {
|
|
@@ -1255,7 +1259,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1255
1259
|
day: 1
|
|
1256
1260
|
}), e(t).credit.free.amount = F;
|
|
1257
1261
|
}),
|
|
1258
|
-
label: "
|
|
1262
|
+
label: e(r)("connect.store.bundle.edit.freeCredit"),
|
|
1259
1263
|
"show-steppers": !1,
|
|
1260
1264
|
"helper-state": e(J)(e(d), "credit.free.amount"),
|
|
1261
1265
|
"helper-text": e(G)(e(d), "credit.free.amount")
|
|
@@ -1264,7 +1268,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1264
1268
|
de(" credit ")
|
|
1265
1269
|
]),
|
|
1266
1270
|
_: 1
|
|
1267
|
-
}, 8, ["model-value", "helper-state", "helper-text"]),
|
|
1271
|
+
}, 8, ["model-value", "label", "helper-state", "helper-text"]),
|
|
1268
1272
|
(Re = e(t).credit.free) != null && Re.amount ? (g(), I(H, {
|
|
1269
1273
|
key: 0,
|
|
1270
1274
|
disabled: !!e(t).stripePriceId,
|
|
@@ -1287,36 +1291,36 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1287
1291
|
_: 1
|
|
1288
1292
|
}, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : M("", !0)
|
|
1289
1293
|
], 64)),
|
|
1290
|
-
e(W) ? (g(),
|
|
1294
|
+
e(W) ? (g(), B(X, { key: 3 }, [
|
|
1291
1295
|
on,
|
|
1292
|
-
|
|
1296
|
+
i(Xt, {
|
|
1293
1297
|
modelValue: e(t).taxes,
|
|
1294
1298
|
"onUpdate:modelValue": n[11] || (n[11] = (F) => e(t).taxes = F)
|
|
1295
1299
|
}, null, 8, ["modelValue"]),
|
|
1296
|
-
|
|
1300
|
+
i(E, {
|
|
1297
1301
|
label: `Tax Charged (${e(ae)})`,
|
|
1298
1302
|
"model-value": e(k),
|
|
1299
1303
|
disabled: ""
|
|
1300
1304
|
}, null, 8, ["label", "model-value"])
|
|
1301
1305
|
], 64)) : M("", !0),
|
|
1302
|
-
|
|
1306
|
+
i(H, {
|
|
1303
1307
|
label: "Total Price",
|
|
1304
1308
|
"model-value": e(U),
|
|
1305
1309
|
disabled: !0
|
|
1306
1310
|
}, null, 8, ["model-value"]),
|
|
1307
|
-
x("div", an, L(e(
|
|
1308
|
-
x("div", ln, L(e(
|
|
1311
|
+
x("div", an, L(e(r)("connect.store.bundle.edit.bundleReward.title")), 1),
|
|
1312
|
+
x("div", ln, L(e(r)("connect.store.bundle.edit.bundleReward.description")), 1),
|
|
1309
1313
|
x("div", sn, [
|
|
1310
1314
|
x("div", rn, [
|
|
1311
|
-
|
|
1315
|
+
i(lt, {
|
|
1312
1316
|
label: `Reward type: ${e(a).length == 0 ? "All" : e(a)[0].name}`
|
|
1313
1317
|
}, {
|
|
1314
1318
|
default: T(() => [
|
|
1315
|
-
|
|
1319
|
+
i(ie, {
|
|
1316
1320
|
onClick: n[12] || (n[12] = (F) => a.value = []),
|
|
1317
1321
|
label: "All"
|
|
1318
1322
|
}),
|
|
1319
|
-
|
|
1323
|
+
i(ie, {
|
|
1320
1324
|
onClick: n[13] || (n[13] = (F) => a.value = [
|
|
1321
1325
|
{
|
|
1322
1326
|
id: "type",
|
|
@@ -1326,7 +1330,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1326
1330
|
]),
|
|
1327
1331
|
label: e(me).VOUCHER.name
|
|
1328
1332
|
}, null, 8, ["label"]),
|
|
1329
|
-
|
|
1333
|
+
i(ie, {
|
|
1330
1334
|
onClick: n[14] || (n[14] = (F) => a.value = [
|
|
1331
1335
|
{
|
|
1332
1336
|
id: "type",
|
|
@@ -1340,7 +1344,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1340
1344
|
_: 1
|
|
1341
1345
|
}, 8, ["label"])
|
|
1342
1346
|
]),
|
|
1343
|
-
|
|
1347
|
+
i(ge, {
|
|
1344
1348
|
modelValue: e(K),
|
|
1345
1349
|
"onUpdate:modelValue": n[15] || (n[15] = (F) => oe(K) ? K.value = F : null),
|
|
1346
1350
|
selection: "multiple",
|
|
@@ -1351,31 +1355,31 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1351
1355
|
),
|
|
1352
1356
|
"hide-footer": e(S).length <= 10
|
|
1353
1357
|
}, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"]),
|
|
1354
|
-
|
|
1358
|
+
i(P, {
|
|
1355
1359
|
text: e(G)(e(d), "titles"),
|
|
1356
1360
|
state: e(J)(e(d), "titles")
|
|
1357
1361
|
}, null, 8, ["text", "state"])
|
|
1358
1362
|
]),
|
|
1359
|
-
x("div", dn, L(e(
|
|
1363
|
+
x("div", dn, L(e(r)("connect.store.bundle.edit.advanceSetting")), 1),
|
|
1360
1364
|
x("div", un, [
|
|
1361
|
-
|
|
1365
|
+
i(C, {
|
|
1362
1366
|
"model-value": e(t).internal ?? !1,
|
|
1363
1367
|
"onUpdate:modelValue": n[16] || (n[16] = (F) => e(t).internal = F),
|
|
1364
1368
|
"label-placement": "right",
|
|
1365
|
-
label: e(
|
|
1366
|
-
sublabel: e(
|
|
1369
|
+
label: e(r)("connect.store.bundle.edit.internalBundle"),
|
|
1370
|
+
sublabel: e(r)("connect.store.bundle.edit.internalBundleDescription")
|
|
1367
1371
|
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
1368
|
-
|
|
1372
|
+
i(C, {
|
|
1369
1373
|
"model-value": e(t).hideInPos ?? !1,
|
|
1370
1374
|
"onUpdate:modelValue": n[17] || (n[17] = (F) => e(t).hideInPos = F),
|
|
1371
1375
|
"label-placement": "right",
|
|
1372
|
-
label: e(
|
|
1373
|
-
sublabel: e(
|
|
1376
|
+
label: e(r)("connect.store.bundle.edit.hideInPos"),
|
|
1377
|
+
sublabel: e(r)("connect.store.bundle.edit.hideInPosDescription")
|
|
1374
1378
|
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
1375
|
-
|
|
1376
|
-
"model-value": ((
|
|
1379
|
+
i(H, {
|
|
1380
|
+
"model-value": ((Ne = (Be = e(t).config) == null ? void 0 : Be.options) == null ? void 0 : Ne.maxPerUser) || null,
|
|
1377
1381
|
"onUpdate:modelValue": n[18] || (n[18] = (F) => e(ue).set(e(t), "config.options.maxPerUser", F)),
|
|
1378
|
-
label: e(
|
|
1382
|
+
label: e(r)("connect.store.bundle.edit.maxPerUser"),
|
|
1379
1383
|
"show-steppers": !1,
|
|
1380
1384
|
placeholder: "Unlimited"
|
|
1381
1385
|
}, null, 8, ["model-value", "label"])
|
|
@@ -1391,10 +1395,10 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1391
1395
|
__name: "SendBundleSheet",
|
|
1392
1396
|
emits: ["success"],
|
|
1393
1397
|
setup(v, { expose: _, emit: l }) {
|
|
1394
|
-
const { minor: f } = Ee,
|
|
1398
|
+
const { minor: f } = Ee, r = R(), b = R(""), o = R(""), m = R([]), u = R(!1), t = R();
|
|
1395
1399
|
R(!0);
|
|
1396
1400
|
function c(S) {
|
|
1397
|
-
u.value = !0, b.value = null, o.value = "",
|
|
1401
|
+
u.value = !0, b.value = null, o.value = "", r.value = S.bundle;
|
|
1398
1402
|
}
|
|
1399
1403
|
function y() {
|
|
1400
1404
|
u.value = !1;
|
|
@@ -1413,19 +1417,19 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1413
1417
|
})), await new Promise((D) => setTimeout(D, 100));
|
|
1414
1418
|
}
|
|
1415
1419
|
async function V() {
|
|
1416
|
-
if (!
|
|
1420
|
+
if (!r.value || !b.value) return;
|
|
1417
1421
|
const S = m.value.find(
|
|
1418
1422
|
(D) => D.value === b.value
|
|
1419
1423
|
);
|
|
1420
1424
|
await xe.confirm(
|
|
1421
|
-
`Are you sure you want to send bundle ${
|
|
1425
|
+
`Are you sure you want to send bundle ${r.value.name} to ${S == null ? void 0 : S.label}?`,
|
|
1422
1426
|
"Confirm",
|
|
1423
1427
|
"Confirm",
|
|
1424
1428
|
"Cancel"
|
|
1425
1429
|
) && await f(
|
|
1426
1430
|
async () => {
|
|
1427
1431
|
const D = {
|
|
1428
|
-
bundle:
|
|
1432
|
+
bundle: r.value._id,
|
|
1429
1433
|
member: b.value,
|
|
1430
1434
|
source: nt.enum.ADMIN,
|
|
1431
1435
|
ref: `ADMIN:${(/* @__PURE__ */ new Date()).toISOString()}:${o.value}`,
|
|
@@ -1442,9 +1446,9 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1442
1446
|
const a = j(() => {
|
|
1443
1447
|
var w, D, Y;
|
|
1444
1448
|
const S = [];
|
|
1445
|
-
return ((w =
|
|
1446
|
-
`${
|
|
1447
|
-
), (Y =
|
|
1449
|
+
return ((w = r.value) == null ? void 0 : w.price.amount) > 0 && S.push(
|
|
1450
|
+
`${N.Config.getCountry().currency.symbol}${je((D = r.value) == null ? void 0 : D.price)}`
|
|
1451
|
+
), (Y = r.value) != null && Y.coinPrice && S.push(`${r.value.coinPrice} point(s)`), S.join(" or ");
|
|
1448
1452
|
});
|
|
1449
1453
|
return _({
|
|
1450
1454
|
showSheet: c,
|
|
@@ -1465,7 +1469,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1465
1469
|
}, {
|
|
1466
1470
|
"side-sheet-footer": T(() => [
|
|
1467
1471
|
x("div", yn, [
|
|
1468
|
-
|
|
1472
|
+
i(U, {
|
|
1469
1473
|
label: "Send",
|
|
1470
1474
|
loading: e(Se)().isLoading,
|
|
1471
1475
|
onClick: w[2] || (w[2] = async () => {
|
|
@@ -1473,7 +1477,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1473
1477
|
return ($ = e(t)) == null ? void 0 : $.validateInputs();
|
|
1474
1478
|
})
|
|
1475
1479
|
}, null, 8, ["loading"]),
|
|
1476
|
-
|
|
1480
|
+
i(U, {
|
|
1477
1481
|
label: "Cancel",
|
|
1478
1482
|
type: "button",
|
|
1479
1483
|
variant: "tertiary",
|
|
@@ -1482,7 +1486,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1482
1486
|
])
|
|
1483
1487
|
]),
|
|
1484
1488
|
default: T(() => [
|
|
1485
|
-
|
|
1489
|
+
i(k, {
|
|
1486
1490
|
class: "space-y-16",
|
|
1487
1491
|
ref_key: "form",
|
|
1488
1492
|
ref: t,
|
|
@@ -1490,7 +1494,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1490
1494
|
blameFormChildOnValidationFailed: ""
|
|
1491
1495
|
}, {
|
|
1492
1496
|
default: T(() => [
|
|
1493
|
-
|
|
1497
|
+
i(W, {
|
|
1494
1498
|
class: "max-w-[700px]",
|
|
1495
1499
|
horizontal: "",
|
|
1496
1500
|
variant: "outlined"
|
|
@@ -1498,40 +1502,40 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1498
1502
|
default: T(() => {
|
|
1499
1503
|
var $, A;
|
|
1500
1504
|
return [
|
|
1501
|
-
($ = e(
|
|
1505
|
+
($ = e(r)) != null && $.image ? (g(), I(D, {
|
|
1502
1506
|
key: 0,
|
|
1503
1507
|
width: "100",
|
|
1504
|
-
src: (A = e(
|
|
1508
|
+
src: (A = e(r)) == null ? void 0 : A.image
|
|
1505
1509
|
}, null, 8, ["src"])) : M("", !0),
|
|
1506
|
-
|
|
1510
|
+
i(K, { class: "flex flex-col gap-16 justify-between" }, {
|
|
1507
1511
|
default: T(() => {
|
|
1508
1512
|
var p;
|
|
1509
1513
|
return [
|
|
1510
|
-
|
|
1514
|
+
i(Y, {
|
|
1511
1515
|
class: "p-0",
|
|
1512
|
-
title: (p = e(
|
|
1516
|
+
title: (p = e(r)) == null ? void 0 : p.name,
|
|
1513
1517
|
subtitle: e(a)
|
|
1514
1518
|
}, null, 8, ["title", "subtitle"]),
|
|
1515
|
-
|
|
1519
|
+
i(K, { class: "p-0" }, {
|
|
1516
1520
|
default: T(() => {
|
|
1517
1521
|
var n, C, P, E, q, H, ie, ge, ce, ve, le;
|
|
1518
1522
|
return [
|
|
1519
1523
|
x("div", pn, [
|
|
1520
|
-
(n = e(
|
|
1524
|
+
(n = e(r)) != null && n.isFeedvibe ? (g(), I(z, {
|
|
1521
1525
|
key: 0,
|
|
1522
1526
|
label: "Feedvibe"
|
|
1523
1527
|
})) : M("", !0),
|
|
1524
|
-
(P = (C = e(
|
|
1528
|
+
(P = (C = e(r)) == null ? void 0 : C.titles) != null && P.length ? (g(), I(z, {
|
|
1525
1529
|
key: 1,
|
|
1526
|
-
label: `${e(
|
|
1530
|
+
label: `${e(r).titles.length} title(s)`
|
|
1527
1531
|
}, null, 8, ["label"])) : M("", !0),
|
|
1528
|
-
(q = (E = e(
|
|
1532
|
+
(q = (E = e(r)) == null ? void 0 : E.vouchers) != null && q.length ? (g(), I(z, {
|
|
1529
1533
|
key: 2,
|
|
1530
|
-
label: `${e(
|
|
1534
|
+
label: `${e(r).vouchers.length} voucher(s)`
|
|
1531
1535
|
}, null, 8, ["label"])) : M("", !0),
|
|
1532
|
-
(ie = (H = e(
|
|
1536
|
+
(ie = (H = e(r)) == null ? void 0 : H.credit) != null && ie.normal || (ve = (ce = (ge = e(r)) == null ? void 0 : ge.credit) == null ? void 0 : ce.free) != null && ve.amount ? (g(), I(z, {
|
|
1533
1537
|
key: 3,
|
|
1534
|
-
label: `${(e(
|
|
1538
|
+
label: `${(e(r).credit.normal || 0) + (((le = e(r).credit.free) == null ? void 0 : le.amount) || 0)} credit(s)`
|
|
1535
1539
|
}, null, 8, ["label"])) : M("", !0)
|
|
1536
1540
|
])
|
|
1537
1541
|
];
|
|
@@ -1546,7 +1550,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1546
1550
|
}),
|
|
1547
1551
|
_: 1
|
|
1548
1552
|
}),
|
|
1549
|
-
|
|
1553
|
+
i(ae, {
|
|
1550
1554
|
modelValue: e(b),
|
|
1551
1555
|
"onUpdate:modelValue": w[0] || (w[0] = ($) => oe(b) ? b.value = $ : null),
|
|
1552
1556
|
label: "Select member",
|
|
@@ -1556,7 +1560,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1556
1560
|
rules: [($) => !!$ > 0 || "Member is required"],
|
|
1557
1561
|
"helper-text": "Type to search member"
|
|
1558
1562
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
1559
|
-
|
|
1563
|
+
i(s, {
|
|
1560
1564
|
modelValue: e(o),
|
|
1561
1565
|
"onUpdate:modelValue": w[1] || (w[1] = ($) => oe(o) ? o.value = $ : null),
|
|
1562
1566
|
label: "Reference (optional)",
|
|
@@ -1588,7 +1592,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1588
1592
|
label: l("connect.store.actions.setting"),
|
|
1589
1593
|
value: "setting",
|
|
1590
1594
|
isPrimary: !1
|
|
1591
|
-
},
|
|
1595
|
+
}, r = {
|
|
1592
1596
|
label: l("connect.store.actions.manageReward"),
|
|
1593
1597
|
value: "create_reward"
|
|
1594
1598
|
}, b = {
|
|
@@ -1727,7 +1731,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1727
1731
|
bundle: {
|
|
1728
1732
|
...ue.cloneDeep(Ve),
|
|
1729
1733
|
isFeedvibe: !0,
|
|
1730
|
-
price:
|
|
1734
|
+
price: N.Dinero.fromNumber({
|
|
1731
1735
|
number: 10,
|
|
1732
1736
|
precision: 2
|
|
1733
1737
|
}).toObject()
|
|
@@ -1738,30 +1742,30 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1738
1742
|
}
|
|
1739
1743
|
m.replace({ query: {} });
|
|
1740
1744
|
}
|
|
1741
|
-
}), W.value = [f,
|
|
1745
|
+
}), W.value = [f, r, b], (((s = u.payoutAccount) == null ? void 0 : s.status) != "APPROVED" || ((k = u.payoutAccount) == null ? void 0 : k.enable) != !0) && (W.value = [
|
|
1742
1746
|
_,
|
|
1743
1747
|
f,
|
|
1744
|
-
|
|
1748
|
+
r,
|
|
1745
1749
|
b
|
|
1746
1750
|
]);
|
|
1747
1751
|
}), (s, k) => {
|
|
1748
1752
|
const U = h("FmPageHead"), O = h("FmButton"), $ = h("FmCard");
|
|
1749
|
-
return g(),
|
|
1750
|
-
|
|
1753
|
+
return g(), B(X, null, [
|
|
1754
|
+
i(U, {
|
|
1751
1755
|
title: e(l)("connect.store.title"),
|
|
1752
1756
|
actions: e(W),
|
|
1753
1757
|
"onClick:action": w
|
|
1754
1758
|
}, null, 8, ["title", "actions"]),
|
|
1755
1759
|
x("div", gn, [
|
|
1756
|
-
e(d) && e(d).length > 0 ? (g(),
|
|
1757
|
-
(g(!0),
|
|
1760
|
+
e(d) && e(d).length > 0 ? (g(), B(X, { key: 0 }, [
|
|
1761
|
+
(g(!0), B(X, null, re(e(d), (A, p) => (g(), B("div", {
|
|
1758
1762
|
key: A.name,
|
|
1759
1763
|
class: "space-y-8 py-12"
|
|
1760
1764
|
}, [
|
|
1761
1765
|
x("div", vn, [
|
|
1762
1766
|
x("div", hn, L(A.name), 1),
|
|
1763
|
-
|
|
1764
|
-
|
|
1767
|
+
i(Pe, { json: A }, null, 8, ["json"]),
|
|
1768
|
+
i(O, {
|
|
1765
1769
|
icon: "edit",
|
|
1766
1770
|
size: "md",
|
|
1767
1771
|
variant: "tertiary",
|
|
@@ -1769,7 +1773,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1769
1773
|
}, null, 8, ["onClick"])
|
|
1770
1774
|
]),
|
|
1771
1775
|
x("div", _n, [
|
|
1772
|
-
(g(!0),
|
|
1776
|
+
(g(!0), B(X, null, re(A.bundles, (n, C) => (g(), I(Ct, {
|
|
1773
1777
|
bundle: n,
|
|
1774
1778
|
key: n._id,
|
|
1775
1779
|
onEdit: (P) => K({
|
|
@@ -1781,7 +1785,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1781
1785
|
onDelete: (P) => z(null, p, C),
|
|
1782
1786
|
onSend: ae
|
|
1783
1787
|
}, null, 8, ["bundle", "onEdit", "onDelete"]))), 128)),
|
|
1784
|
-
|
|
1788
|
+
i(St, {
|
|
1785
1789
|
onCreate: (n) => K({
|
|
1786
1790
|
category: p,
|
|
1787
1791
|
index: -1,
|
|
@@ -1790,7 +1794,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1790
1794
|
}, null, 8, ["onCreate"])
|
|
1791
1795
|
])
|
|
1792
1796
|
]))), 128)),
|
|
1793
|
-
|
|
1797
|
+
i(mn, {
|
|
1794
1798
|
ref_key: "bundleSheetRef",
|
|
1795
1799
|
ref: S,
|
|
1796
1800
|
onUpdate: z
|
|
@@ -1806,7 +1810,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1806
1810
|
x("div", Sn, L(e(l)("connect.store.bundle.title")), 1),
|
|
1807
1811
|
x("div", Fn, L(e(l)("connect.store.bundle.description")), 1)
|
|
1808
1812
|
]),
|
|
1809
|
-
|
|
1813
|
+
i(O, {
|
|
1810
1814
|
variant: "primary",
|
|
1811
1815
|
label: e(l)("connect.store.actions.addCategory"),
|
|
1812
1816
|
icon: "add",
|
|
@@ -1815,12 +1819,12 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1815
1819
|
]),
|
|
1816
1820
|
_: 1
|
|
1817
1821
|
})),
|
|
1818
|
-
|
|
1822
|
+
i(Jt, {
|
|
1819
1823
|
ref_key: "settingSheetRef",
|
|
1820
1824
|
ref: a,
|
|
1821
1825
|
onUpdate: D
|
|
1822
1826
|
}, null, 512),
|
|
1823
|
-
|
|
1827
|
+
i(fn, {
|
|
1824
1828
|
ref_key: "sendBundleSheetRef",
|
|
1825
1829
|
ref: o
|
|
1826
1830
|
}, null, 512)
|