@feedmepos/mf-connect 0.0.16-beta.10 → 0.0.16-beta.12
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-BVk0jPDU.js → Analytic-DIc9BYb0.js} +32 -20
- package/dist/{App-BbAalq1k.js → App-BzzL9_Jw.js} +33 -27
- package/dist/Broadcast-dVPgK5QV.js +223 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DiU3MnH0.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-TnEPvafD.js} +18 -11
- package/dist/{Card-B5in1RMa.js → Card-Bj2Yd2pr.js} +178 -158
- package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
- package/dist/Collections-Fkb_zzqZ.js +453 -0
- package/dist/{Credit-Bc9EzdsC.js → Credit-DHn9OkE8.js} +78 -69
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C1ZXQski.js +2788 -0
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-D6mWny8y.js +344 -0
- package/dist/{Experience-CgKak5ik.js → Experience-DX3aJihS.js} +64 -55
- package/dist/{Game-QhfKqrN_.js → Game-CcVQvETd.js} +54 -45
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
- package/dist/JsonViewer-v8_C7l5N.js +87 -0
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +18737 -0
- package/dist/MainLayout-B1aJoR95.js +41 -0
- package/dist/{Marketing-CSx4N7UJ.js → Marketing-B9kykWEh.js} +79 -72
- package/dist/{Member-CY6WMD8D.js → Member-RoJSCSC5.js} +25 -22
- package/dist/{MemberList-8iRwm7Sz.js → MemberList-BUDxqMEK.js} +321 -307
- package/dist/{MemberTransactions-CknqkWO3.js → MemberTransactions-Bh_tT1Rp.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Cj3-JHOX.js +432 -0
- package/dist/{Mission-BTy1p7lU.js → Mission-DDvgCLy0.js} +50 -40
- package/dist/{Point-A6B_ggSy.js → Point-BbPkt4kF.js} +67 -58
- package/dist/Promotion-DEo-lxpX.js +221 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BGjeTeqS.js +1751 -0
- package/dist/{Segment-CFVXtyEj.js → Segment-DAcpZWIN.js} +145 -130
- package/dist/{Setting-Jmtw-_DV.js → Setting-CgXohUPt.js} +167 -154
- package/dist/{Store-DQypT-7e.js → Store-BVyHbQ8o.js} +504 -489
- package/dist/{StoreRewards-M-utm0iI.js → StoreRewards-sccMDbkj.js} +124 -108
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-B60mQ5kq.js → StoreTransactions.vue_vue_type_script_setup_true_lang--sdQ_l8g.js} +131 -123
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CXlkvt2u.js +139 -0
- package/dist/{Tier-D1jymeLK.js → Tier--P27XXbB.js} +144 -125
- package/dist/{Title-DN9DIP2k.js → Title-B27S3SxD.js} +107 -90
- package/dist/{Transaction-BAJvAoU6.js → Transaction-CYTtwwHY.js} +2 -2
- package/dist/Voucher-BZ8PKgO5.js +488 -0
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js +55 -0
- package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-CnKzqAcN.js +53428 -0
- package/dist/app-FfENBuoE.js +5381 -0
- package/dist/app-wDQR6dpb.js +39 -0
- package/dist/app.js +2 -1
- package/dist/business-CXyP9G7A.js +78 -0
- package/dist/campaign-0aM2KYOy.js +96 -0
- package/dist/campaign-CpzFl8Vr.js +4 -0
- package/dist/collection.fn-FicQhH1t.js +26 -0
- package/dist/dto-BiYLkVdL.js +1169 -0
- package/dist/effect-Cg-eNEjg.js +61 -0
- package/dist/{export-DjeNY5Pc.js → export-D7BuObOL.js} +19 -16
- package/dist/helper-DvD-D7c7.js +71 -0
- package/dist/index-B1Q0GAWp.js +95 -0
- package/dist/index-B4UZgSB-.js +28058 -0
- package/dist/index-B6c-fUij.js +203 -0
- package/dist/index-BP_5cfKa.js +38 -0
- package/dist/index-BRXg5Si1.js +2071 -0
- package/dist/index-BuDwICBJ.js +761 -0
- package/dist/index-CDMC-8iO.js +94 -0
- package/dist/index-CcZt3OrE.js +73 -0
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/index-DA-fzkRR.js +1737 -0
- package/dist/index-Dbd4WA4r.js +61 -0
- package/dist/index-Dkeb_9ER.js +8832 -0
- package/dist/index-DmdKoKk_.js +298 -0
- package/dist/index-G-88ujCM.js +3 -0
- package/dist/loading-uCNeZibp.js +32697 -0
- package/dist/lodash-B5I3zXaY.js +3678 -0
- package/dist/membership-DFRO9TyM.js +221 -0
- package/dist/moment-BWErdI6_.js +2578 -0
- package/dist/money-OtkT4Pzp.js +15 -0
- package/dist/number-Cg3NCouc.js +12 -0
- package/dist/object-qECH92oz.js +26 -0
- package/dist/objectId-dwaoBfJX.js +7 -0
- package/dist/rule-Ch2HRiGw.js +1973 -0
- package/dist/rule-builder-B_M9yvEe.js +89 -0
- package/dist/template-1o0LbOoJ.js +190 -0
- package/dist/usePagination-BeF5K3M7.js +223 -0
- package/dist/vue-i18n-AtGIa4qH.js +2365 -0
- package/dist/xlsx-pChq0adn.js +15491 -0
- package/dist/zod-W_PvIofQ.js +90 -0
- package/package.json +3 -3
- package/dist/Collections-CFCZ9YIG.js +0 -4
- package/dist/MainLayout-JbHzENFy.js +0 -4
- package/dist/app-BpzzygYP.js +0 -87765
- package/dist/money-DKGIIplY.js +0 -15
- package/dist/number-tPodRxTN.js +0 -12
|
@@ -1,17 +1,32 @@
|
|
|
1
|
-
import { defineComponent as G, computed as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { useDialog as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { defineComponent as G, computed as D, resolveComponent as _, openBlock as x, createBlock as E, withCtx as T, createElementVNode as g, createElementBlock as P, createVNode as d, createCommentVNode as j, toDisplayString as L, unref as e, Fragment as q, renderList as oe, ref as N, isRef as se, reactive as Be, onMounted as me, watch as he, toRaw as Ne, createTextVNode as le, h as Ae } from "vue";
|
|
2
|
+
import { _ as Oe } from "./tier-BJDhpH6X.js";
|
|
3
|
+
import { useDialog as Ue, useDialogChild as Re, components as Ee } from "@feedmepos/ui-library";
|
|
4
|
+
import { c as $, e as pe, S as Me } from "./index-B4UZgSB-.js";
|
|
5
|
+
import { d as te, a as je, u as Le, p as ye, n as qe, f as fe } from "./loading-uCNeZibp.js";
|
|
6
|
+
import { u as Ce, C as de } from "./membership-DFRO9TyM.js";
|
|
7
|
+
import { a as He, c as $e } from "./object-qECH92oz.js";
|
|
8
|
+
import { _ as ae } from "./lodash-B5I3zXaY.js";
|
|
9
|
+
import { u as Ve } from "./vue-i18n-AtGIa4qH.js";
|
|
10
|
+
import { Z as Y, g as W, a as z } from "./zod-W_PvIofQ.js";
|
|
11
|
+
import { z as J, R as Ke } from "./app-FfENBuoE.js";
|
|
12
|
+
import { F as We, a as ze, b as Ye, c as ke } from "./index-DmdKoKk_.js";
|
|
13
|
+
import { u as ge } from "./app-wDQR6dpb.js";
|
|
14
|
+
import { _ as Z } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js";
|
|
15
|
+
import { J as _e } from "./JsonViewer-v8_C7l5N.js";
|
|
16
|
+
import { _ as Je } from "./index-Dkeb_9ER.js";
|
|
17
|
+
import { _ as Ge } from "./ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js";
|
|
18
|
+
import { _ as Xe } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
19
|
+
import { z as Ze, a as Qe } from "./money-OtkT4Pzp.js";
|
|
20
|
+
import { F as et } from "./number-Cg3NCouc.js";
|
|
21
|
+
import { t as tt } from "./helper-DvD-D7c7.js";
|
|
22
|
+
import "./index-G-88ujCM.js";
|
|
23
|
+
import { useRouter as ot } from "vue-router";
|
|
24
|
+
import { m as be } from "./index-B1Q0GAWp.js";
|
|
25
|
+
function nt(b) {
|
|
26
|
+
return te.DineroFactory(b).toUnit();
|
|
12
27
|
}
|
|
13
|
-
function
|
|
14
|
-
const y =
|
|
28
|
+
function lt(b, h, l, F, u = [], s = []) {
|
|
29
|
+
const y = Je.compact(
|
|
15
30
|
h.map((c) => b.find((i) => i.systemCode === c.systemCode && i.taxCode === c.taxCode)).filter((c) => !!c && s.includes(c.systemCode))
|
|
16
31
|
), a = y.reduce(
|
|
17
32
|
(c, i) => {
|
|
@@ -34,7 +49,7 @@ function rt(b, h, l, S, u = [], s = []) {
|
|
|
34
49
|
});
|
|
35
50
|
},
|
|
36
51
|
{}
|
|
37
|
-
), t =
|
|
52
|
+
), t = te.Calculator.calculate({
|
|
38
53
|
items: {
|
|
39
54
|
0: {
|
|
40
55
|
quantity: 1,
|
|
@@ -43,7 +58,7 @@ function rt(b, h, l, S, u = [], s = []) {
|
|
|
43
58
|
level: 0,
|
|
44
59
|
type: {
|
|
45
60
|
type: "BY_AMOUNT",
|
|
46
|
-
amount:
|
|
61
|
+
amount: te.DineroFactory(l).subtract(te.Dinero.fromNumber({ number: F }).toObject()).toObject()
|
|
47
62
|
}
|
|
48
63
|
}
|
|
49
64
|
},
|
|
@@ -59,33 +74,33 @@ function rt(b, h, l, S, u = [], s = []) {
|
|
|
59
74
|
name: c.name,
|
|
60
75
|
taxCode: c.taxCode,
|
|
61
76
|
rate: c.rate,
|
|
62
|
-
total:
|
|
77
|
+
total: te.DineroFactory({
|
|
63
78
|
...t.items[0].taxes[c.taxCode]
|
|
64
79
|
}).convertPrecision(2).toObject()
|
|
65
80
|
}));
|
|
66
81
|
}
|
|
67
|
-
function
|
|
68
|
-
return b ? b.reduce((
|
|
82
|
+
function at(b, h, l) {
|
|
83
|
+
return b ? b.reduce((F, u) => {
|
|
69
84
|
var s;
|
|
70
|
-
return (s = l.find((y) => y.systemCode === u.systemCode)) != null && s.inclusive || (
|
|
71
|
-
},
|
|
85
|
+
return (s = l.find((y) => y.systemCode === u.systemCode)) != null && s.inclusive || (F = te.DineroFactory(F.toObject()).add(u.total)), F;
|
|
86
|
+
}, te.DineroFactory(h)).toObject() : te.DineroFactory(h).toObject();
|
|
72
87
|
}
|
|
73
|
-
const
|
|
88
|
+
const st = { class: "relative h-[120px] aspect-video flex items-center justify-center border rounded-md border-fm-color-neutral-gray-300" }, rt = ["src"], it = {
|
|
74
89
|
key: 2,
|
|
75
90
|
class: "absolute top-2 left-2"
|
|
76
|
-
},
|
|
91
|
+
}, dt = { class: "absolute top-0 right-0" }, ut = { class: "fm-typo-en-body-lg-600" }, ct = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, mt = { class: "flex gap-8 items-center flex-wrap" }, pt = /* @__PURE__ */ G({
|
|
77
92
|
__name: "StoreBundleCard",
|
|
78
93
|
props: {
|
|
79
94
|
bundle: { type: Object, required: !0 }
|
|
80
95
|
},
|
|
81
96
|
emits: ["edit", "delete"],
|
|
82
97
|
setup(b, { emit: h }) {
|
|
83
|
-
const l = b,
|
|
98
|
+
const l = b, F = h, u = D(() => {
|
|
84
99
|
const y = [];
|
|
85
100
|
return l.bundle.price.amount > 0 && y.push(
|
|
86
|
-
`${
|
|
101
|
+
`${$.Config.getCountry().currency.symbol}${nt(l.bundle.price)}`
|
|
87
102
|
), l.bundle.coinPrice && y.push(`${l.bundle.coinPrice} point(s)`), y.join(" or ");
|
|
88
|
-
}), s =
|
|
103
|
+
}), s = D(() => {
|
|
89
104
|
var a, t;
|
|
90
105
|
const y = [];
|
|
91
106
|
if (l.bundle.titles.length > 0 && y.push(`${l.bundle.titles.length} title(s)`), l.bundle.vouchers.length > 0 && y.push(`${l.bundle.vouchers.length} voucher(s)`), l.bundle.credit.normal || (a = l.bundle.credit.free) != null && a.amount) {
|
|
@@ -95,46 +110,46 @@ const dt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
95
110
|
return y;
|
|
96
111
|
});
|
|
97
112
|
return (y, a) => {
|
|
98
|
-
const t = _("FmIcon"), c = _("FmChip"), i = _("FmButton"), r = _("FmMenuItem"), f = _("FmMenu"),
|
|
99
|
-
return x(),
|
|
113
|
+
const t = _("FmIcon"), c = _("FmChip"), i = _("FmButton"), r = _("FmMenuItem"), f = _("FmMenu"), n = _("FmCard");
|
|
114
|
+
return x(), E(n, {
|
|
100
115
|
variant: "outlined",
|
|
101
116
|
class: "flex flex-col gap-y-8 p-16 min-h-[240px] h-full text-center items-center"
|
|
102
117
|
}, {
|
|
103
|
-
default:
|
|
104
|
-
g("div",
|
|
118
|
+
default: T(() => [
|
|
119
|
+
g("div", st, [
|
|
105
120
|
b.bundle.image ? (x(), P("img", {
|
|
106
121
|
key: 1,
|
|
107
122
|
src: b.bundle.image,
|
|
108
123
|
class: "w-full h-full object-contain aspect-video"
|
|
109
|
-
}, null, 8,
|
|
124
|
+
}, null, 8, rt)) : (x(), E(t, {
|
|
110
125
|
key: 0,
|
|
111
126
|
name: "image",
|
|
112
127
|
outline: !0,
|
|
113
128
|
size: "md",
|
|
114
129
|
class: "text-fm-color-neutral-gray-200"
|
|
115
130
|
})),
|
|
116
|
-
b.bundle.isFeedvibe ? (x(), P("div",
|
|
131
|
+
b.bundle.isFeedvibe ? (x(), P("div", it, [
|
|
117
132
|
d(c, {
|
|
118
133
|
label: "Feedvibe",
|
|
119
134
|
class: "text-fm-color-primary bg-fm-color-system-warning-100",
|
|
120
135
|
compact: ""
|
|
121
136
|
})
|
|
122
|
-
])) :
|
|
123
|
-
g("div",
|
|
137
|
+
])) : j("", !0),
|
|
138
|
+
g("div", dt, [
|
|
124
139
|
d(f, { placement: "bottom-end" }, {
|
|
125
|
-
"menu-button":
|
|
140
|
+
"menu-button": T(() => [
|
|
126
141
|
d(i, {
|
|
127
142
|
icon: "more_vert",
|
|
128
143
|
variant: "tertiary"
|
|
129
144
|
})
|
|
130
145
|
]),
|
|
131
|
-
default:
|
|
146
|
+
default: T(() => [
|
|
132
147
|
d(r, {
|
|
133
|
-
onClick: a[0] || (a[0] = (C) =>
|
|
148
|
+
onClick: a[0] || (a[0] = (C) => F("edit", b.bundle)),
|
|
134
149
|
label: "Edit"
|
|
135
150
|
}),
|
|
136
151
|
d(r, {
|
|
137
|
-
onClick: a[1] || (a[1] = (C) =>
|
|
152
|
+
onClick: a[1] || (a[1] = (C) => F("delete", b.bundle)),
|
|
138
153
|
label: "Delete"
|
|
139
154
|
})
|
|
140
155
|
]),
|
|
@@ -142,11 +157,11 @@ const dt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
142
157
|
})
|
|
143
158
|
])
|
|
144
159
|
]),
|
|
145
|
-
g("div",
|
|
146
|
-
g("div",
|
|
147
|
-
g("div",
|
|
148
|
-
(x(!0), P(
|
|
149
|
-
key:
|
|
160
|
+
g("div", ut, L(b.bundle.name), 1),
|
|
161
|
+
g("div", ct, L(e(u) || "Free"), 1),
|
|
162
|
+
g("div", mt, [
|
|
163
|
+
(x(!0), P(q, null, oe(e(s), (C, R) => (x(), E(c, {
|
|
164
|
+
key: R,
|
|
150
165
|
label: C
|
|
151
166
|
}, null, 8, ["label"]))), 128))
|
|
152
167
|
])
|
|
@@ -155,20 +170,20 @@ const dt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
155
170
|
});
|
|
156
171
|
};
|
|
157
172
|
}
|
|
158
|
-
}),
|
|
173
|
+
}), yt = /* @__PURE__ */ G({
|
|
159
174
|
__name: "AddBundleCard",
|
|
160
175
|
emits: ["create"],
|
|
161
176
|
setup(b, { emit: h }) {
|
|
162
|
-
const { t: l } = Ve(),
|
|
177
|
+
const { t: l } = Ve(), F = h;
|
|
163
178
|
return (u, s) => {
|
|
164
179
|
const y = _("FmButton"), a = _("FmCard");
|
|
165
|
-
return x(),
|
|
180
|
+
return x(), E(a, {
|
|
166
181
|
variant: "outlined",
|
|
167
182
|
class: "flex flex-col gap-y-8 p-16 h-full min-h-[240px] items-center justify-center"
|
|
168
183
|
}, {
|
|
169
|
-
default:
|
|
184
|
+
default: T(() => [
|
|
170
185
|
d(y, {
|
|
171
|
-
onClick: s[0] || (s[0] = (t) =>
|
|
186
|
+
onClick: s[0] || (s[0] = (t) => F("create")),
|
|
172
187
|
label: e(l)("connect.store.actions.addBundle"),
|
|
173
188
|
icon: "add",
|
|
174
189
|
variant: "secondary"
|
|
@@ -178,7 +193,7 @@ const dt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
178
193
|
});
|
|
179
194
|
};
|
|
180
195
|
}
|
|
181
|
-
}),
|
|
196
|
+
}), ft = { class: "space-y-16" }, bt = { class: "flex w-full justify-between pb-16" }, vt = { class: "flex items-center justify-end gap-8" }, gt = /* @__PURE__ */ G({
|
|
182
197
|
__name: "CategoryDialog",
|
|
183
198
|
props: {
|
|
184
199
|
action: {
|
|
@@ -191,36 +206,36 @@ const dt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
191
206
|
}
|
|
192
207
|
},
|
|
193
208
|
setup(b) {
|
|
194
|
-
const h = b, l =
|
|
209
|
+
const h = b, l = Ue(), { emitData: F, emitAction: u } = Re(), s = N(h.initialValue), y = J.string().min(1);
|
|
195
210
|
function a() {
|
|
196
|
-
|
|
211
|
+
F(s.value), u("primary"), l.close();
|
|
197
212
|
}
|
|
198
213
|
function t() {
|
|
199
|
-
|
|
214
|
+
F(null), u("primary"), l.close();
|
|
200
215
|
}
|
|
201
216
|
return (c, i) => {
|
|
202
217
|
const r = _("FmTextField"), f = _("FmButton");
|
|
203
|
-
return x(), P("div",
|
|
218
|
+
return x(), P("div", ft, [
|
|
204
219
|
d(r, {
|
|
205
220
|
modelValue: e(s),
|
|
206
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
221
|
+
"onUpdate:modelValue": i[0] || (i[0] = (n) => se(s) ? s.value = n : null),
|
|
207
222
|
label: "Category name",
|
|
208
|
-
rules: [e(
|
|
223
|
+
rules: [e(Y).toRule(e(y))]
|
|
209
224
|
}, null, 8, ["modelValue", "rules"]),
|
|
210
|
-
g("div",
|
|
225
|
+
g("div", bt, [
|
|
211
226
|
g("div", null, [
|
|
212
|
-
b.action == "edit" ? (x(),
|
|
227
|
+
b.action == "edit" ? (x(), E(f, {
|
|
213
228
|
key: 0,
|
|
214
229
|
onClick: t,
|
|
215
230
|
label: "Delete",
|
|
216
231
|
variant: "destructive"
|
|
217
|
-
})) :
|
|
232
|
+
})) : j("", !0)
|
|
218
233
|
]),
|
|
219
|
-
g("div",
|
|
234
|
+
g("div", vt, [
|
|
220
235
|
d(f, {
|
|
221
236
|
label: "Cancel",
|
|
222
237
|
variant: "tertiary",
|
|
223
|
-
onClick: i[1] || (i[1] = (
|
|
238
|
+
onClick: i[1] || (i[1] = (n) => e(l).close())
|
|
224
239
|
}),
|
|
225
240
|
d(f, {
|
|
226
241
|
label: b.action == "edit" ? "Edit" : "Add",
|
|
@@ -232,30 +247,30 @@ const dt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
232
247
|
]);
|
|
233
248
|
};
|
|
234
249
|
}
|
|
235
|
-
}),
|
|
250
|
+
}), xt = { class: "space-y-16" }, ht = { class: "flex items-center justify-end gap-8 pb-16" }, Ct = /* @__PURE__ */ G({
|
|
236
251
|
__name: "SelectCategoryDialog",
|
|
237
252
|
setup(b) {
|
|
238
|
-
const { emitData: h, emitAction: l } =
|
|
239
|
-
() =>
|
|
253
|
+
const { emitData: h, emitAction: l } = Re(), F = Ce(), u = N(), s = D(
|
|
254
|
+
() => F.sortedStoreCategories.map((y, a) => ({
|
|
240
255
|
label: y.name,
|
|
241
256
|
value: a
|
|
242
257
|
}))
|
|
243
258
|
);
|
|
244
259
|
return (y, a) => {
|
|
245
260
|
const t = _("FmSelect"), c = _("FmButton");
|
|
246
|
-
return x(), P("div",
|
|
261
|
+
return x(), P("div", xt, [
|
|
247
262
|
a[4] || (a[4] = g("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Select a category to create FeedMe CNY 2025 bundle ", -1)),
|
|
248
263
|
d(t, {
|
|
249
264
|
placeholder: "Select a category",
|
|
250
265
|
items: e(s),
|
|
251
266
|
modelValue: e(u),
|
|
252
267
|
"onUpdate:modelValue": [
|
|
253
|
-
a[0] || (a[0] = (i) =>
|
|
268
|
+
a[0] || (a[0] = (i) => se(u) ? u.value = i : null),
|
|
254
269
|
a[1] || (a[1] = (i) => e(h)(i))
|
|
255
270
|
],
|
|
256
271
|
label: "Category"
|
|
257
272
|
}, null, 8, ["items", "modelValue"]),
|
|
258
|
-
g("div",
|
|
273
|
+
g("div", ht, [
|
|
259
274
|
d(c, {
|
|
260
275
|
variant: "tertiary",
|
|
261
276
|
label: "Cancel",
|
|
@@ -271,11 +286,11 @@ const dt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
271
286
|
};
|
|
272
287
|
}
|
|
273
288
|
});
|
|
274
|
-
function
|
|
289
|
+
function ve(b) {
|
|
275
290
|
return b.states.map((h) => ({ label: h, value: h }));
|
|
276
291
|
}
|
|
277
|
-
const
|
|
278
|
-
[
|
|
292
|
+
const Vt = {
|
|
293
|
+
[pe.F_COUNTRY.enum.MY]: {
|
|
279
294
|
states: [
|
|
280
295
|
"Johor",
|
|
281
296
|
"Kedah",
|
|
@@ -295,16 +310,16 @@ const Ft = {
|
|
|
295
310
|
"Terengganu"
|
|
296
311
|
],
|
|
297
312
|
get stateItems() {
|
|
298
|
-
return
|
|
313
|
+
return ve(this);
|
|
299
314
|
}
|
|
300
315
|
},
|
|
301
|
-
[
|
|
316
|
+
[pe.F_COUNTRY.enum.SG]: {
|
|
302
317
|
states: [],
|
|
303
318
|
get stateItems() {
|
|
304
|
-
return
|
|
319
|
+
return ve(this);
|
|
305
320
|
}
|
|
306
321
|
},
|
|
307
|
-
[
|
|
322
|
+
[pe.F_COUNTRY.enum.ID]: {
|
|
308
323
|
states: [
|
|
309
324
|
"Aceh",
|
|
310
325
|
"Bali",
|
|
@@ -341,43 +356,43 @@ const Ft = {
|
|
|
341
356
|
"West Sumatra"
|
|
342
357
|
],
|
|
343
358
|
get stateItems() {
|
|
344
|
-
return
|
|
359
|
+
return ve(this);
|
|
345
360
|
}
|
|
346
361
|
}
|
|
347
|
-
},
|
|
362
|
+
}, ue = () => $.Config.getCountry(), ce = {
|
|
348
363
|
get fullCurrency() {
|
|
349
|
-
return
|
|
364
|
+
return ue().currency;
|
|
350
365
|
},
|
|
351
366
|
get currency() {
|
|
352
|
-
return
|
|
367
|
+
return ue().currency.code;
|
|
353
368
|
},
|
|
354
369
|
get fullTax() {
|
|
355
|
-
return
|
|
370
|
+
return $.Country.getCountryFlattenTaxes(ue().code);
|
|
356
371
|
},
|
|
357
372
|
get taxSystem() {
|
|
358
|
-
return
|
|
373
|
+
return ue().taxSystems;
|
|
359
374
|
},
|
|
360
375
|
taxInclusion(b) {
|
|
361
|
-
return
|
|
376
|
+
return ce.taxSystem.map((h) => ({
|
|
362
377
|
systemCode: h.code,
|
|
363
378
|
inclusive: b !== void 0 ? b : !1
|
|
364
379
|
}));
|
|
365
380
|
},
|
|
366
381
|
groupedTaxOptions() {
|
|
367
|
-
const b =
|
|
368
|
-
return
|
|
382
|
+
const b = $.Country.getCountryFlattenTaxes(ue().code);
|
|
383
|
+
return ce.taxSystem.map((h) => ({
|
|
369
384
|
code: h.code,
|
|
370
|
-
options: b.map((l) => ({ ...l, feedmeTaxCode:
|
|
385
|
+
options: b.map((l) => ({ ...l, feedmeTaxCode: ce.generateCode(l) })).filter((l) => l.systemCode === h.code)
|
|
371
386
|
}));
|
|
372
387
|
},
|
|
373
388
|
systemDefaultCode(b) {
|
|
374
|
-
const h =
|
|
389
|
+
const h = ce.groupedTaxOptions().find((l) => l.code === b);
|
|
375
390
|
return h == null ? void 0 : h.options.find((l) => l.default);
|
|
376
391
|
},
|
|
377
392
|
generateCode(b) {
|
|
378
393
|
return `${b.systemCode}/${b.taxCode}`;
|
|
379
394
|
}
|
|
380
|
-
}, Q =
|
|
395
|
+
}, Q = ce, _t = /* @__PURE__ */ G({
|
|
381
396
|
__name: "TaxInclusiveSetting",
|
|
382
397
|
props: {
|
|
383
398
|
modelValue: {
|
|
@@ -388,16 +403,16 @@ const Ft = {
|
|
|
388
403
|
},
|
|
389
404
|
emits: ["update:model-value"],
|
|
390
405
|
setup(b, { emit: h }) {
|
|
391
|
-
const l = b,
|
|
406
|
+
const l = b, F = Q.taxSystem, u = h, s = N(l.modelValue);
|
|
392
407
|
function y(i, r) {
|
|
393
|
-
const f =
|
|
394
|
-
|
|
408
|
+
const f = ae.clone(l.modelValue), n = f.findIndex((C) => C.systemCode === i);
|
|
409
|
+
n >= 0 ? f[n].inclusive = r : f.push({
|
|
395
410
|
systemCode: i,
|
|
396
411
|
inclusive: r
|
|
397
412
|
}), s.value = f, u("update:model-value", f);
|
|
398
413
|
}
|
|
399
414
|
function a() {
|
|
400
|
-
return
|
|
415
|
+
return F.map((i) => {
|
|
401
416
|
const r = l.modelValue ? l.modelValue.find((f) => f.systemCode === i.code) : !1;
|
|
402
417
|
return {
|
|
403
418
|
label: i.name,
|
|
@@ -410,31 +425,31 @@ const Ft = {
|
|
|
410
425
|
};
|
|
411
426
|
});
|
|
412
427
|
}
|
|
413
|
-
const t =
|
|
428
|
+
const t = Be(a());
|
|
414
429
|
function c(i, r) {
|
|
415
430
|
return `${i} ${r ? "Inclusive" : "Exclusive"}`;
|
|
416
431
|
}
|
|
417
|
-
return
|
|
418
|
-
l.modelValue.length || y(
|
|
419
|
-
}),
|
|
432
|
+
return me(() => {
|
|
433
|
+
l.modelValue.length || y(F[0].code, !1);
|
|
434
|
+
}), he(
|
|
420
435
|
() => l.modelValue,
|
|
421
436
|
(i, r) => {
|
|
422
|
-
i != r && !i.length && y(
|
|
437
|
+
i != r && !i.length && y(F[0].code, !1);
|
|
423
438
|
}
|
|
424
439
|
), (i, r) => {
|
|
425
440
|
const f = _("FmSwitch");
|
|
426
|
-
return x(!0), P(
|
|
427
|
-
var
|
|
441
|
+
return x(!0), P(q, null, oe(e(t), (n, C) => {
|
|
442
|
+
var R;
|
|
428
443
|
return x(), P("div", { key: C }, [
|
|
429
444
|
d(f, {
|
|
430
|
-
"model-value": ((
|
|
445
|
+
"model-value": ((R = e(s)[C]) == null ? void 0 : R.inclusive) || !1,
|
|
431
446
|
"label-placement": "left",
|
|
432
|
-
"onUpdate:modelValue": (
|
|
447
|
+
"onUpdate:modelValue": (I) => n.input(I)
|
|
433
448
|
}, {
|
|
434
|
-
label:
|
|
435
|
-
var
|
|
449
|
+
label: T(() => {
|
|
450
|
+
var I;
|
|
436
451
|
return [
|
|
437
|
-
g("div", null,
|
|
452
|
+
g("div", null, L(c(n.label, ((I = e(s)[C]) == null ? void 0 : I.inclusive) || !1)), 1)
|
|
438
453
|
];
|
|
439
454
|
}),
|
|
440
455
|
_: 2
|
|
@@ -444,40 +459,40 @@ const Ft = {
|
|
|
444
459
|
};
|
|
445
460
|
}
|
|
446
461
|
});
|
|
447
|
-
var
|
|
448
|
-
const
|
|
462
|
+
var Ft = { mode: "development", appMode: "mf" };
|
|
463
|
+
const St = { class: "space-y-8" }, wt = {
|
|
449
464
|
key: 0,
|
|
450
465
|
class: "space-y-16"
|
|
451
|
-
},
|
|
466
|
+
}, Pt = /* @__PURE__ */ G({
|
|
452
467
|
__name: "StripeSetting",
|
|
453
468
|
props: {
|
|
454
469
|
modelValue: {}
|
|
455
470
|
},
|
|
456
471
|
emits: ["update:modelValue"],
|
|
457
472
|
setup(b, { emit: h }) {
|
|
458
|
-
const l = b,
|
|
459
|
-
|
|
460
|
-
a != y && (!l.modelValue && y ?
|
|
473
|
+
const l = b, F = h, u = N(!1);
|
|
474
|
+
he(u, (y, a) => {
|
|
475
|
+
a != y && (!l.modelValue && y ? F("update:modelValue", {
|
|
461
476
|
apiKey: "",
|
|
462
477
|
webhookSecret: ""
|
|
463
|
-
}) : y ||
|
|
478
|
+
}) : y || F("update:modelValue", void 0));
|
|
464
479
|
});
|
|
465
|
-
const s =
|
|
466
|
-
const y =
|
|
467
|
-
return `https://marketing${y ? "-dev" : ""}${t}.feedmeapi.com/stripe/${
|
|
480
|
+
const s = D(() => {
|
|
481
|
+
const y = Ft.mode === "development", a = $.Config.getCountry().code.toLowerCase(), t = a != "my" ? `.${a}` : "";
|
|
482
|
+
return `https://marketing${y ? "-dev" : ""}${t}.feedmeapi.com/stripe/${Me.getBusinessId()}/webhook`;
|
|
468
483
|
});
|
|
469
|
-
return
|
|
484
|
+
return me(() => {
|
|
470
485
|
u.value = !!l.modelValue;
|
|
471
486
|
}), (y, a) => {
|
|
472
487
|
const t = _("FmSwitch"), c = _("FmTextField"), i = _("FmButton");
|
|
473
|
-
return x(), P("div",
|
|
488
|
+
return x(), P("div", St, [
|
|
474
489
|
d(t, {
|
|
475
490
|
modelValue: e(u),
|
|
476
|
-
"onUpdate:modelValue": a[0] || (a[0] = (r) =>
|
|
491
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => se(u) ? u.value = r : null),
|
|
477
492
|
value: "true",
|
|
478
493
|
label: "Enable Stripe"
|
|
479
494
|
}, null, 8, ["modelValue"]),
|
|
480
|
-
l.modelValue ? (x(), P("div",
|
|
495
|
+
l.modelValue ? (x(), P("div", wt, [
|
|
481
496
|
d(c, {
|
|
482
497
|
label: "API Key",
|
|
483
498
|
modelValue: l.modelValue.apiKey,
|
|
@@ -490,11 +505,11 @@ const $t = { class: "space-y-8" }, Tt = {
|
|
|
490
505
|
readonly: "",
|
|
491
506
|
"helper-text": "Copy this URL to your Stripe dashboard"
|
|
492
507
|
}, {
|
|
493
|
-
append:
|
|
508
|
+
append: T(() => [
|
|
494
509
|
d(i, {
|
|
495
510
|
icon: "content_copy",
|
|
496
511
|
variant: "tertiary",
|
|
497
|
-
onClick: a[2] || (a[2] = (r) => e(
|
|
512
|
+
onClick: a[2] || (a[2] = (r) => e(je)(e(s)))
|
|
498
513
|
})
|
|
499
514
|
]),
|
|
500
515
|
_: 1
|
|
@@ -506,39 +521,39 @@ const $t = { class: "space-y-8" }, Tt = {
|
|
|
506
521
|
"helper-text": `Copy the webhook signing secret from your Stripe account and paste
|
|
507
522
|
here.`
|
|
508
523
|
}, null, 8, ["modelValue"])
|
|
509
|
-
])) :
|
|
524
|
+
])) : j("", !0)
|
|
510
525
|
]);
|
|
511
526
|
};
|
|
512
527
|
}
|
|
513
|
-
}),
|
|
528
|
+
}), Tt = {
|
|
514
529
|
key: 0,
|
|
515
530
|
class: "space-y-16 pr-12"
|
|
516
|
-
},
|
|
531
|
+
}, $t = {
|
|
517
532
|
key: 0,
|
|
518
533
|
class: "space-y-16"
|
|
519
|
-
},
|
|
534
|
+
}, kt = { class: "grid grid-cols-2 gap-x-16 gap-y-16" }, Ut = { class: "space-y-4" }, Rt = { class: "space-y-16" }, It = { class: "flex items-center gap-8" }, Dt = /* @__PURE__ */ G({
|
|
520
535
|
__name: "StoreSettingSheet",
|
|
521
536
|
emits: ["update"],
|
|
522
537
|
setup(b, { expose: h, emit: l }) {
|
|
523
|
-
const
|
|
538
|
+
const F = l, u = N(!1), s = N(), y = N(!1), a = We.extend({
|
|
524
539
|
company: ze.extend({
|
|
525
|
-
name:
|
|
526
|
-
regNo:
|
|
527
|
-
address:
|
|
528
|
-
line1:
|
|
529
|
-
line2:
|
|
530
|
-
state:
|
|
531
|
-
city:
|
|
532
|
-
postcode:
|
|
533
|
-
country:
|
|
540
|
+
name: J.string().min(1, "Company name is required"),
|
|
541
|
+
regNo: J.string().min(1, "Registration number is required"),
|
|
542
|
+
address: Ye.extend({
|
|
543
|
+
line1: J.string().min(1, "Line 1 is required"),
|
|
544
|
+
line2: J.string().optional(),
|
|
545
|
+
state: J.string().min(1, "State is required"),
|
|
546
|
+
city: J.string().min(1, "City is required"),
|
|
547
|
+
postcode: J.string().min(1, "Postcode is required"),
|
|
548
|
+
country: J.string().min(1, "Country is required")
|
|
534
549
|
}),
|
|
535
|
-
phoneNo:
|
|
536
|
-
sstRegNo:
|
|
550
|
+
phoneNo: J.string().min(1, "Phone number is required"),
|
|
551
|
+
sstRegNo: J.string().optional()
|
|
537
552
|
})
|
|
538
|
-
}), t =
|
|
553
|
+
}), t = D(() => a.safeParse(s.value).success);
|
|
539
554
|
function c() {
|
|
540
555
|
const f = a.safeParse(s.value);
|
|
541
|
-
f.success &&
|
|
556
|
+
f.success && F("update", f.data);
|
|
542
557
|
}
|
|
543
558
|
function i() {
|
|
544
559
|
return {
|
|
@@ -550,7 +565,7 @@ const $t = { class: "space-y-8" }, Tt = {
|
|
|
550
565
|
city: "",
|
|
551
566
|
postcode: "",
|
|
552
567
|
state: "",
|
|
553
|
-
country:
|
|
568
|
+
country: $.Config.getCountry().name
|
|
554
569
|
},
|
|
555
570
|
phoneNo: "",
|
|
556
571
|
regNo: "",
|
|
@@ -559,115 +574,115 @@ const $t = { class: "space-y-8" }, Tt = {
|
|
|
559
574
|
inclusiveTaxes: []
|
|
560
575
|
};
|
|
561
576
|
}
|
|
562
|
-
function r(f,
|
|
563
|
-
u.value = f, f && (s.value =
|
|
577
|
+
function r(f, n) {
|
|
578
|
+
u.value = f, f && (s.value = n != null && n.company ? n : i());
|
|
564
579
|
}
|
|
565
580
|
return h({
|
|
566
581
|
showSheet: r,
|
|
567
582
|
data: s
|
|
568
|
-
}), (f,
|
|
569
|
-
const C = _("FmIcon"),
|
|
570
|
-
return x(),
|
|
583
|
+
}), (f, n) => {
|
|
584
|
+
const C = _("FmIcon"), R = _("FmMenuItem"), I = _("FmMenu"), ne = _("FmSelect"), ee = _("FmButton"), M = _("FmSideSheet");
|
|
585
|
+
return x(), E(M, {
|
|
571
586
|
"max-width": 560,
|
|
572
587
|
modelValue: e(u),
|
|
573
|
-
"onUpdate:modelValue":
|
|
588
|
+
"onUpdate:modelValue": n[15] || (n[15] = (v) => se(u) ? u.value = v : null),
|
|
574
589
|
header: "Store setting"
|
|
575
590
|
}, {
|
|
576
|
-
"side-sheet-footer":
|
|
577
|
-
g("div",
|
|
591
|
+
"side-sheet-footer": T(() => [
|
|
592
|
+
g("div", It, [
|
|
578
593
|
d(ee, {
|
|
579
594
|
label: "Submit",
|
|
580
595
|
onClick: c,
|
|
581
|
-
disabled: !e(t) || e(
|
|
582
|
-
loading: e(
|
|
596
|
+
disabled: !e(t) || e(ge)().isLoading,
|
|
597
|
+
loading: e(ge)().isLoading
|
|
583
598
|
}, null, 8, ["disabled", "loading"]),
|
|
584
599
|
d(ee, {
|
|
585
600
|
label: "Cancel",
|
|
586
|
-
onClick:
|
|
601
|
+
onClick: n[14] || (n[14] = (v) => r(!1)),
|
|
587
602
|
variant: "tertiary"
|
|
588
603
|
})
|
|
589
604
|
])
|
|
590
605
|
]),
|
|
591
|
-
default:
|
|
606
|
+
default: T(() => {
|
|
592
607
|
var v, w;
|
|
593
608
|
return [
|
|
594
|
-
d(
|
|
595
|
-
e(s) && e(s).company ? (x(), P("div",
|
|
596
|
-
|
|
609
|
+
d(_e, { json: e(s) }, null, 8, ["json"]),
|
|
610
|
+
e(s) && e(s).company ? (x(), P("div", Tt, [
|
|
611
|
+
n[19] || (n[19] = g("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, " Company legal information ", -1)),
|
|
597
612
|
d(Z, {
|
|
598
613
|
modelValue: e(s).company.name,
|
|
599
|
-
"onUpdate:modelValue":
|
|
614
|
+
"onUpdate:modelValue": n[0] || (n[0] = (m) => e(s).company.name = m),
|
|
600
615
|
label: "Company name",
|
|
601
|
-
schema: e(
|
|
616
|
+
schema: e(Y).typeAtPath(e(a), "company.name")
|
|
602
617
|
}, null, 8, ["modelValue", "schema"]),
|
|
603
618
|
d(Z, {
|
|
604
619
|
modelValue: e(s).company.regNo,
|
|
605
|
-
"onUpdate:modelValue":
|
|
620
|
+
"onUpdate:modelValue": n[1] || (n[1] = (m) => e(s).company.regNo = m),
|
|
606
621
|
label: "Registration number",
|
|
607
|
-
schema: e(
|
|
622
|
+
schema: e(Y).typeAtPath(e(a), "company.regNo")
|
|
608
623
|
}, null, 8, ["modelValue", "schema"]),
|
|
609
624
|
d(Z, {
|
|
610
625
|
modelValue: e(s).company.sstRegNo,
|
|
611
626
|
"onUpdate:modelValue": [
|
|
612
|
-
|
|
613
|
-
|
|
627
|
+
n[2] || (n[2] = (m) => e(s).company.sstRegNo = m),
|
|
628
|
+
n[3] || (n[3] = (m) => m ? null : e(s).inclusiveTaxes = [])
|
|
614
629
|
],
|
|
615
630
|
label: "Tax Registration number",
|
|
616
|
-
schema: e(
|
|
631
|
+
schema: e(Y).typeAtPath(e(a), "company.sstRegNo")
|
|
617
632
|
}, null, 8, ["modelValue", "schema"]),
|
|
618
|
-
(v = e(s).company) != null && v.sstRegNo && e(s).inclusiveTaxes ? (x(), P("div",
|
|
619
|
-
|
|
620
|
-
d(
|
|
633
|
+
(v = e(s).company) != null && v.sstRegNo && e(s).inclusiveTaxes ? (x(), P("div", $t, [
|
|
634
|
+
n[16] || (n[16] = g("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, "Tax", -1)),
|
|
635
|
+
d(_t, {
|
|
621
636
|
modelValue: e(s).inclusiveTaxes,
|
|
622
|
-
"onUpdate:modelValue":
|
|
637
|
+
"onUpdate:modelValue": n[4] || (n[4] = (m) => e(s).inclusiveTaxes = m)
|
|
623
638
|
}, null, 8, ["modelValue"])
|
|
624
|
-
])) :
|
|
639
|
+
])) : j("", !0),
|
|
625
640
|
d(Z, {
|
|
626
641
|
modelValue: e(s).company.phoneNo,
|
|
627
|
-
"onUpdate:modelValue":
|
|
642
|
+
"onUpdate:modelValue": n[5] || (n[5] = (m) => e(s).company.phoneNo = m),
|
|
628
643
|
label: "Phone number",
|
|
629
|
-
schema: e(
|
|
644
|
+
schema: e(Y).typeAtPath(e(a), "company.phoneNo")
|
|
630
645
|
}, null, 8, ["modelValue", "schema"]),
|
|
631
|
-
|
|
646
|
+
n[20] || (n[20] = g("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, "Address", -1)),
|
|
632
647
|
d(Z, {
|
|
633
648
|
modelValue: e(s).company.address.line1,
|
|
634
|
-
"onUpdate:modelValue":
|
|
649
|
+
"onUpdate:modelValue": n[6] || (n[6] = (m) => e(s).company.address.line1 = m),
|
|
635
650
|
label: "Line 1",
|
|
636
|
-
schema: e(
|
|
651
|
+
schema: e(Y).typeAtPath(e(a), "company.address.line1")
|
|
637
652
|
}, null, 8, ["modelValue", "schema"]),
|
|
638
653
|
d(Z, {
|
|
639
654
|
modelValue: e(s).company.address.line2,
|
|
640
|
-
"onUpdate:modelValue":
|
|
655
|
+
"onUpdate:modelValue": n[7] || (n[7] = (m) => e(s).company.address.line2 = m),
|
|
641
656
|
label: "Line 2",
|
|
642
|
-
schema: e(
|
|
657
|
+
schema: e(Y).typeAtPath(e(a), "company.address.line2")
|
|
643
658
|
}, null, 8, ["modelValue", "schema"]),
|
|
644
|
-
g("div",
|
|
659
|
+
g("div", kt, [
|
|
645
660
|
d(Z, {
|
|
646
661
|
modelValue: e(s).company.address.city,
|
|
647
|
-
"onUpdate:modelValue":
|
|
662
|
+
"onUpdate:modelValue": n[8] || (n[8] = (m) => e(s).company.address.city = m),
|
|
648
663
|
label: "City",
|
|
649
|
-
schema: e(
|
|
664
|
+
schema: e(Y).typeAtPath(e(a), "company.address.city")
|
|
650
665
|
}, null, 8, ["modelValue", "schema"]),
|
|
651
666
|
d(Z, {
|
|
652
667
|
modelValue: e(s).company.address.postcode,
|
|
653
|
-
"onUpdate:modelValue":
|
|
668
|
+
"onUpdate:modelValue": n[9] || (n[9] = (m) => e(s).company.address.postcode = m),
|
|
654
669
|
label: "Postcode",
|
|
655
|
-
schema: e(
|
|
670
|
+
schema: e(Y).typeAtPath(e(a), "company.address.postcode")
|
|
656
671
|
}, null, 8, ["modelValue", "schema"]),
|
|
657
|
-
g("div",
|
|
658
|
-
|
|
659
|
-
d(
|
|
672
|
+
g("div", Ut, [
|
|
673
|
+
n[17] || (n[17] = g("div", { class: "fm-typo-en-body-lg-400" }, "State", -1)),
|
|
674
|
+
d(I, {
|
|
660
675
|
placement: "top-end",
|
|
661
676
|
"model-value": e(y)
|
|
662
677
|
}, {
|
|
663
|
-
"menu-button":
|
|
678
|
+
"menu-button": T(() => [
|
|
664
679
|
d(Z, {
|
|
665
680
|
modelValue: e(s).company.address.state,
|
|
666
|
-
"onUpdate:modelValue":
|
|
667
|
-
schema: e(
|
|
668
|
-
onFocusChanged:
|
|
681
|
+
"onUpdate:modelValue": n[10] || (n[10] = (m) => e(s).company.address.state = m),
|
|
682
|
+
schema: e(Y).typeAtPath(e(a), "company.address.state"),
|
|
683
|
+
onFocusChanged: n[11] || (n[11] = (m) => y.value = m)
|
|
669
684
|
}, {
|
|
670
|
-
append:
|
|
685
|
+
append: T(() => [
|
|
671
686
|
d(C, {
|
|
672
687
|
name: e(y) ? "keyboard_arrow_up" : "keyboard_arrow_down"
|
|
673
688
|
}, null, 8, ["name"])
|
|
@@ -675,13 +690,13 @@ const $t = { class: "space-y-8" }, Tt = {
|
|
|
675
690
|
_: 1
|
|
676
691
|
}, 8, ["modelValue", "schema"])
|
|
677
692
|
]),
|
|
678
|
-
default:
|
|
679
|
-
(x(!0), P(
|
|
693
|
+
default: T(() => [
|
|
694
|
+
(x(!0), P(q, null, oe(e(Vt)[e($.Config).getCountry().code].stateItems.filter(
|
|
680
695
|
(m) => {
|
|
681
|
-
var
|
|
682
|
-
return m.label.toLowerCase().includes(((
|
|
696
|
+
var U, A;
|
|
697
|
+
return m.label.toLowerCase().includes(((A = (U = e(s)) == null ? void 0 : U.company) == null ? void 0 : A.address.state.toLowerCase()) ?? "");
|
|
683
698
|
}
|
|
684
|
-
) || [], (m) => (x(),
|
|
699
|
+
) || [], (m) => (x(), E(R, {
|
|
685
700
|
key: m.value,
|
|
686
701
|
"model-value": e(s).company.address.state === m.value,
|
|
687
702
|
label: m.label,
|
|
@@ -693,27 +708,27 @@ const $t = { class: "space-y-8" }, Tt = {
|
|
|
693
708
|
_: 1
|
|
694
709
|
}, 8, ["model-value"])
|
|
695
710
|
]),
|
|
696
|
-
d(
|
|
711
|
+
d(ne, {
|
|
697
712
|
label: "Country",
|
|
698
713
|
modelValue: e(s).company.address.country,
|
|
699
|
-
"onUpdate:modelValue":
|
|
714
|
+
"onUpdate:modelValue": n[12] || (n[12] = (m) => e(s).company.address.country = m),
|
|
700
715
|
items: [
|
|
701
716
|
{
|
|
702
|
-
label: e(
|
|
703
|
-
value: e(
|
|
717
|
+
label: e($.Config).getCountry().name,
|
|
718
|
+
value: e($.Config).getCountry().name
|
|
704
719
|
}
|
|
705
720
|
],
|
|
706
|
-
rules: [e(
|
|
721
|
+
rules: [e(Y).ruleAtPath(e(a), "company.address.country")]
|
|
707
722
|
}, null, 8, ["modelValue", "items", "rules"])
|
|
708
723
|
]),
|
|
709
|
-
g("div",
|
|
710
|
-
|
|
711
|
-
d(
|
|
724
|
+
g("div", Rt, [
|
|
725
|
+
n[18] || (n[18] = g("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, " Stripe Integration ", -1)),
|
|
726
|
+
d(Pt, {
|
|
712
727
|
"model-value": (w = e(s)) == null ? void 0 : w.stripe,
|
|
713
|
-
"onUpdate:modelValue":
|
|
728
|
+
"onUpdate:modelValue": n[13] || (n[13] = (m) => e(s).stripe = m)
|
|
714
729
|
}, null, 8, ["model-value"])
|
|
715
730
|
])
|
|
716
|
-
])) :
|
|
731
|
+
])) : j("", !0)
|
|
717
732
|
];
|
|
718
733
|
}),
|
|
719
734
|
_: 1
|
|
@@ -721,10 +736,10 @@ const $t = { class: "space-y-8" }, Tt = {
|
|
|
721
736
|
};
|
|
722
737
|
}
|
|
723
738
|
});
|
|
724
|
-
function
|
|
725
|
-
return
|
|
739
|
+
function Bt(b, h = !0) {
|
|
740
|
+
return $.DineroFactory(b).toFormat(h);
|
|
726
741
|
}
|
|
727
|
-
const
|
|
742
|
+
const Nt = /* @__PURE__ */ G({
|
|
728
743
|
__name: "TaxVariantSetting",
|
|
729
744
|
props: {
|
|
730
745
|
modelValue: {
|
|
@@ -735,14 +750,14 @@ const Et = /* @__PURE__ */ G({
|
|
|
735
750
|
},
|
|
736
751
|
emits: ["update:modelValue"],
|
|
737
752
|
setup(b, { emit: h }) {
|
|
738
|
-
const l = b,
|
|
739
|
-
|
|
753
|
+
const l = b, F = h;
|
|
754
|
+
me(() => {
|
|
740
755
|
if (y.value.length !== s.value.length) {
|
|
741
756
|
const c = s.value.reduce((i, r) => {
|
|
742
757
|
const f = Q.systemDefaultCode(r.name);
|
|
743
758
|
if (!f) return i;
|
|
744
|
-
const { systemCode:
|
|
745
|
-
return r.value || i.push({ systemCode:
|
|
759
|
+
const { systemCode: n, taxCode: C } = f;
|
|
760
|
+
return r.value || i.push({ systemCode: n, taxCode: C }), i;
|
|
746
761
|
}, []);
|
|
747
762
|
t(c);
|
|
748
763
|
}
|
|
@@ -750,53 +765,53 @@ const Et = /* @__PURE__ */ G({
|
|
|
750
765
|
function u() {
|
|
751
766
|
return Q.groupedTaxOptions();
|
|
752
767
|
}
|
|
753
|
-
const s =
|
|
768
|
+
const s = D(() => u().map((c) => ({
|
|
754
769
|
name: c.code,
|
|
755
770
|
value: (y.value || []).find(
|
|
756
771
|
(i) => c.options.some((r) => r.feedmeTaxCode === i)
|
|
757
772
|
),
|
|
758
773
|
options: c.options.map((i) => ({
|
|
759
|
-
label: `${i.name} (${
|
|
774
|
+
label: `${i.name} (${et(i.rate)}%)`,
|
|
760
775
|
value: i.feedmeTaxCode
|
|
761
776
|
}))
|
|
762
|
-
}))), y =
|
|
777
|
+
}))), y = D(() => l.modelValue.map((c) => Q.generateCode(c)));
|
|
763
778
|
function a(c) {
|
|
764
779
|
const i = u().find(
|
|
765
|
-
(C) => C.options.some((
|
|
780
|
+
(C) => C.options.some((R) => R.feedmeTaxCode === c)
|
|
766
781
|
), r = i == null ? void 0 : i.options.find((C) => C.feedmeTaxCode === c);
|
|
767
782
|
if (!r) return;
|
|
768
|
-
const { systemCode: f, taxCode:
|
|
769
|
-
t([{ systemCode: f, taxCode:
|
|
783
|
+
const { systemCode: f, taxCode: n } = r;
|
|
784
|
+
t([{ systemCode: f, taxCode: n }]);
|
|
770
785
|
}
|
|
771
786
|
function t(c) {
|
|
772
|
-
const i =
|
|
787
|
+
const i = ae.clone(l.modelValue);
|
|
773
788
|
c.forEach((r) => {
|
|
774
789
|
const f = u().find(
|
|
775
|
-
(
|
|
776
|
-
),
|
|
777
|
-
(
|
|
790
|
+
(R) => R.options.some((I) => I.feedmeTaxCode === Q.generateCode(r))
|
|
791
|
+
), n = (f == null ? void 0 : f.options) || [], C = i.findIndex(
|
|
792
|
+
(R) => n.some((I) => Q.generateCode(I) === Q.generateCode(R))
|
|
778
793
|
);
|
|
779
794
|
C >= 0 ? i.splice(C, 1, r) : i.push(r);
|
|
780
|
-
}),
|
|
795
|
+
}), F("update:modelValue", i);
|
|
781
796
|
}
|
|
782
797
|
return (c, i) => {
|
|
783
798
|
const r = _("FmRadio"), f = _("FmRadioGroup");
|
|
784
|
-
return x(!0), P(
|
|
785
|
-
key:
|
|
799
|
+
return x(!0), P(q, null, oe(e(s), (n) => (x(), P("div", {
|
|
800
|
+
key: n.name,
|
|
786
801
|
class: "flex items-start"
|
|
787
802
|
}, [
|
|
788
803
|
d(f, {
|
|
789
|
-
modelValue:
|
|
804
|
+
modelValue: n.value,
|
|
790
805
|
"onUpdate:modelValue": [
|
|
791
|
-
(C) =>
|
|
806
|
+
(C) => n.value = C,
|
|
792
807
|
i[0] || (i[0] = (C) => {
|
|
793
808
|
a(C);
|
|
794
809
|
})
|
|
795
810
|
]
|
|
796
811
|
}, {
|
|
797
|
-
default:
|
|
798
|
-
(x(!0), P(
|
|
799
|
-
key:
|
|
812
|
+
default: T(() => [
|
|
813
|
+
(x(!0), P(q, null, oe(n.options, (C, R) => (x(), E(r, {
|
|
814
|
+
key: R,
|
|
800
815
|
value: C.value,
|
|
801
816
|
label: C.label
|
|
802
817
|
}, null, 8, ["value", "label"]))), 128))
|
|
@@ -806,13 +821,13 @@ const Et = /* @__PURE__ */ G({
|
|
|
806
821
|
]))), 128);
|
|
807
822
|
};
|
|
808
823
|
}
|
|
809
|
-
}),
|
|
824
|
+
}), xe = {
|
|
810
825
|
get _id() {
|
|
811
826
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
812
827
|
},
|
|
813
828
|
name: "",
|
|
814
|
-
price:
|
|
815
|
-
originalPrice:
|
|
829
|
+
price: $.Dinero.zero().toObject(),
|
|
830
|
+
originalPrice: $.Dinero.zero().toObject(),
|
|
816
831
|
vouchers: [],
|
|
817
832
|
credit: {
|
|
818
833
|
normal: 0,
|
|
@@ -828,18 +843,18 @@ const Et = /* @__PURE__ */ G({
|
|
|
828
843
|
taxes: [],
|
|
829
844
|
taxTotals: [],
|
|
830
845
|
internal: !1,
|
|
831
|
-
priceWithTaxes:
|
|
832
|
-
},
|
|
846
|
+
priceWithTaxes: Ze()
|
|
847
|
+
}, At = {
|
|
833
848
|
key: 0,
|
|
834
849
|
class: "space-y-24 pr-12"
|
|
835
|
-
},
|
|
850
|
+
}, Ot = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, Et = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, Mt = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, jt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary !mb-[-16px]" }, Lt = { class: "space-y-8" }, qt = { class: "flex items-center justify-between" }, Ht = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, Kt = { class: "space-y-8" }, Wt = { class: "flex items-center gap-8" }, zt = /* @__PURE__ */ G({
|
|
836
851
|
__name: "EditBundleSheet",
|
|
837
852
|
emits: ["update"],
|
|
838
853
|
setup(b, { expose: h, emit: l }) {
|
|
839
|
-
const
|
|
854
|
+
const F = l, { t: u } = Ve(), s = Ce(), y = N(!1), a = N({
|
|
840
855
|
category: 0,
|
|
841
856
|
index: -1
|
|
842
|
-
}), t = N(
|
|
857
|
+
}), t = N(ae.cloneDeep(xe)), c = N(), i = ke, r = D(() => {
|
|
843
858
|
const p = i.safeParse(t.value);
|
|
844
859
|
return p.success ? [] : p.error.errors;
|
|
845
860
|
}), f = [
|
|
@@ -853,164 +868,164 @@ const Et = /* @__PURE__ */ G({
|
|
|
853
868
|
header: "Reward type",
|
|
854
869
|
accessorFn: (p) => p.collectible.type,
|
|
855
870
|
cell(p) {
|
|
856
|
-
return
|
|
871
|
+
return de[p.row.original.collectible.type].chip();
|
|
857
872
|
}
|
|
858
873
|
},
|
|
859
874
|
{
|
|
860
875
|
header: "Description",
|
|
861
876
|
accessorFn: (p) => p.description,
|
|
862
877
|
cell(p) {
|
|
863
|
-
var
|
|
864
|
-
const
|
|
865
|
-
return
|
|
866
|
-
"onUpdate:modelValue": (
|
|
878
|
+
var S;
|
|
879
|
+
const o = p.row.original;
|
|
880
|
+
return o.collectible.type == "VOUCHER" || o.selectedReward == null ? o.description : Ae(Ee.FmStepperField, {
|
|
881
|
+
"onUpdate:modelValue": (k) => {
|
|
867
882
|
t.value.titles = t.value.titles.map(
|
|
868
|
-
(B) => B.id ==
|
|
883
|
+
(B) => B.id == o.collectible._id ? { ...B, dayToExpire: k } : B
|
|
869
884
|
);
|
|
870
885
|
},
|
|
871
|
-
modelValue: ((
|
|
886
|
+
modelValue: ((S = o.selectedReward) == null ? void 0 : S.extra) ?? 0,
|
|
872
887
|
appendText: "day(s)",
|
|
873
888
|
showSteppers: !1,
|
|
874
889
|
disabled: !!t.value.stripePriceId
|
|
875
890
|
});
|
|
876
891
|
}
|
|
877
892
|
}
|
|
878
|
-
],
|
|
879
|
-
const
|
|
893
|
+
], n = N([]), C = D(() => s.bundleRewards.map((p) => {
|
|
894
|
+
const o = R.value.find((k) => k.id == p._id), S = p.type === "VOUCHER" ? `${p.options.maxUse} use(s), ${tt(p.options.validityOption || {})}` : "No expiry";
|
|
880
895
|
return {
|
|
881
896
|
collectible: p,
|
|
882
|
-
description:
|
|
883
|
-
selectedReward:
|
|
897
|
+
description: S,
|
|
898
|
+
selectedReward: o
|
|
884
899
|
};
|
|
885
|
-
})),
|
|
886
|
-
var p,
|
|
900
|
+
})), R = D(() => {
|
|
901
|
+
var p, o;
|
|
887
902
|
return [
|
|
888
|
-
...((p = t.value) == null ? void 0 : p.titles.map((
|
|
889
|
-
id:
|
|
890
|
-
extra:
|
|
903
|
+
...((p = t.value) == null ? void 0 : p.titles.map((S) => ({
|
|
904
|
+
id: S.id,
|
|
905
|
+
extra: S.dayToExpire
|
|
891
906
|
}))) ?? [],
|
|
892
|
-
...((
|
|
893
|
-
id:
|
|
907
|
+
...((o = t.value) == null ? void 0 : o.vouchers.map((S) => ({
|
|
908
|
+
id: S,
|
|
894
909
|
extra: void 0
|
|
895
910
|
}))) ?? []
|
|
896
911
|
];
|
|
897
|
-
}),
|
|
912
|
+
}), I = D(
|
|
898
913
|
() => t.value.stripePriceId && t.value.subscriptionValidity ? t.value.subscriptionValidity : 0
|
|
899
914
|
);
|
|
900
|
-
function
|
|
915
|
+
function ne(p) {
|
|
901
916
|
t.value.subscriptionValidity = p;
|
|
902
|
-
for (const
|
|
903
|
-
|
|
917
|
+
for (const o of t.value.titles)
|
|
918
|
+
o.dayToExpire = p;
|
|
904
919
|
t.value.credit.free && (t.value.credit.free.day = p);
|
|
905
920
|
}
|
|
906
921
|
function ee() {
|
|
907
|
-
const p = C.value,
|
|
908
|
-
if (!(!
|
|
909
|
-
for (let
|
|
910
|
-
const
|
|
911
|
-
|
|
912
|
-
(
|
|
913
|
-
) < 0 &&
|
|
914
|
-
id:
|
|
915
|
-
dayToExpire:
|
|
916
|
-
}) :
|
|
917
|
-
(
|
|
918
|
-
) < 0 &&
|
|
919
|
-
(X) => X !=
|
|
922
|
+
const p = C.value, o = t.value;
|
|
923
|
+
if (!(!o || !p))
|
|
924
|
+
for (let S = 0; S < p.length; S++) {
|
|
925
|
+
const k = p[S];
|
|
926
|
+
M.value[S] ? k.collectible.type == "TITLE" ? o.titles.findIndex(
|
|
927
|
+
(re) => re.id == k.collectible._id
|
|
928
|
+
) < 0 && o.titles.push({
|
|
929
|
+
id: k.collectible._id,
|
|
930
|
+
dayToExpire: I.value
|
|
931
|
+
}) : o.vouchers.findIndex(
|
|
932
|
+
(re) => re == k.collectible._id
|
|
933
|
+
) < 0 && o.vouchers.push(k.collectible._id) : (o.titles = o.titles.filter((X) => X.id != k.collectible._id), o.vouchers = o.vouchers.filter(
|
|
934
|
+
(X) => X != k.collectible._id
|
|
920
935
|
));
|
|
921
936
|
}
|
|
922
937
|
}
|
|
923
|
-
const
|
|
924
|
-
|
|
925
|
-
const v =
|
|
938
|
+
const M = N({});
|
|
939
|
+
he(M, ee, { deep: !0 });
|
|
940
|
+
const v = D(() => {
|
|
926
941
|
var p;
|
|
927
942
|
return (p = s.storeOption.company) == null ? void 0 : p.sstRegNo;
|
|
928
|
-
}), w =
|
|
929
|
-
var p,
|
|
930
|
-
return (
|
|
931
|
-
}), m =
|
|
932
|
-
var p,
|
|
933
|
-
return
|
|
943
|
+
}), w = D(() => {
|
|
944
|
+
var p, o, S;
|
|
945
|
+
return (S = (o = (p = s.storeOption) == null ? void 0 : p.inclusiveTaxes) == null ? void 0 : o[0]) != null && S.inclusive ? "Inclusive" : "Exclusive";
|
|
946
|
+
}), m = D(() => {
|
|
947
|
+
var p, o;
|
|
948
|
+
return lt(
|
|
934
949
|
Q.fullTax,
|
|
935
|
-
|
|
950
|
+
Ne(t.value.taxes),
|
|
936
951
|
t.value.price,
|
|
937
952
|
Number(t.value.credit.normal),
|
|
938
953
|
((p = s.storeOption) == null ? void 0 : p.inclusiveTaxes) ?? [],
|
|
939
|
-
(
|
|
954
|
+
(o = s.storeOption.company) != null && o.sstRegNo ? Q.taxSystem.map((S) => S.code) : []
|
|
940
955
|
);
|
|
941
|
-
}),
|
|
942
|
-
(
|
|
943
|
-
|
|
944
|
-
).toFormat()),
|
|
945
|
-
var
|
|
946
|
-
const p =
|
|
956
|
+
}), U = D(() => m.value.reduce(
|
|
957
|
+
(o, S) => o.add(S.total),
|
|
958
|
+
Qe()
|
|
959
|
+
).toFormat()), A = D(() => {
|
|
960
|
+
var k;
|
|
961
|
+
const p = at(
|
|
947
962
|
m.value,
|
|
948
963
|
t.value.price,
|
|
949
|
-
((
|
|
964
|
+
((k = s.storeOption) == null ? void 0 : k.inclusiveTaxes) ?? []
|
|
950
965
|
);
|
|
951
966
|
t.value.priceWithTaxes = p;
|
|
952
|
-
const
|
|
953
|
-
return Number.isNaN(
|
|
967
|
+
const o = Bt(p, !1), S = Number(o.replace(/[^\d.-]/g, ""));
|
|
968
|
+
return Number.isNaN(S) ? 0 : S;
|
|
954
969
|
});
|
|
955
|
-
function
|
|
956
|
-
t.value.taxTotals = m.value,
|
|
970
|
+
function O() {
|
|
971
|
+
t.value.taxTotals = m.value, F("update", ke.parse(He(t.value)));
|
|
957
972
|
}
|
|
958
|
-
function
|
|
959
|
-
return
|
|
973
|
+
function H() {
|
|
974
|
+
return ae.cloneDeep(xe);
|
|
960
975
|
}
|
|
961
|
-
function
|
|
962
|
-
y.value = p, p &&
|
|
976
|
+
function K(p, o) {
|
|
977
|
+
y.value = p, p && o && (console.log(o.bundle, "set.bundle"), c.value = void 0, t.value = o.bundle || H(), a.value.category = o.category, a.value.index = o.index, M.value = C.value.reduce((S, k, B) => (S[B] = !!k.selectedReward, S), {}));
|
|
963
978
|
}
|
|
964
979
|
return h({
|
|
965
|
-
showSheet:
|
|
980
|
+
showSheet: K,
|
|
966
981
|
bundleImage: c,
|
|
967
982
|
target: a,
|
|
968
983
|
data: t
|
|
969
|
-
}), (p,
|
|
970
|
-
const
|
|
971
|
-
return x(),
|
|
984
|
+
}), (p, o) => {
|
|
985
|
+
const S = _("FmSwitch"), k = _("FmTextField"), B = _("FmStepperField"), X = _("FmMenuItem"), re = _("FmTable"), Ie = _("FmHelperText"), Fe = _("FmButton"), De = _("FmSideSheet");
|
|
986
|
+
return x(), E(De, {
|
|
972
987
|
"max-width": 560,
|
|
973
988
|
modelValue: e(y),
|
|
974
|
-
"onUpdate:modelValue":
|
|
989
|
+
"onUpdate:modelValue": o[19] || (o[19] = (ie) => se(y) ? y.value = ie : null),
|
|
975
990
|
header: e(a).index != -1 ? e(u)("connect.store.bundle.edit.title") : e(u)("connect.store.bundle.edit.create")
|
|
976
991
|
}, {
|
|
977
|
-
"side-sheet-footer":
|
|
978
|
-
g("div",
|
|
992
|
+
"side-sheet-footer": T(() => [
|
|
993
|
+
g("div", Wt, [
|
|
979
994
|
d(Fe, {
|
|
980
995
|
label: e(a).index != -1 ? "Save" : "Add",
|
|
981
|
-
onClick:
|
|
996
|
+
onClick: O,
|
|
982
997
|
disabled: e(r).length > 0,
|
|
983
|
-
loading: e(
|
|
998
|
+
loading: e(ge)().isLoading
|
|
984
999
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
985
1000
|
d(Fe, {
|
|
986
1001
|
label: "Cancel",
|
|
987
|
-
onClick:
|
|
1002
|
+
onClick: o[18] || (o[18] = (ie) => K(!1)),
|
|
988
1003
|
variant: "tertiary"
|
|
989
1004
|
})
|
|
990
1005
|
])
|
|
991
1006
|
]),
|
|
992
|
-
default:
|
|
993
|
-
var
|
|
1007
|
+
default: T(() => {
|
|
1008
|
+
var ie, Se, we, Pe, Te;
|
|
994
1009
|
return [
|
|
995
|
-
d(
|
|
996
|
-
e(t) ? (x(), P("div",
|
|
997
|
-
e(
|
|
1010
|
+
d(_e, { json: e(t) }, null, 8, ["json"]),
|
|
1011
|
+
e(t) ? (x(), P("div", At, [
|
|
1012
|
+
e($.Config).getCountry().code == "MY" ? (x(), E(S, {
|
|
998
1013
|
key: 0,
|
|
999
|
-
"onUpdate:modelValue":
|
|
1000
|
-
e(t).isFeedvibe = V, e(t).isFeedvibe && (e(t).credit.normal = 0, e(t).coinPrice = 0, e(t).titles = [],
|
|
1014
|
+
"onUpdate:modelValue": o[0] || (o[0] = (V) => {
|
|
1015
|
+
e(t).isFeedvibe = V, e(t).isFeedvibe && (e(t).credit.normal = 0, e(t).coinPrice = 0, e(t).titles = [], M.value = {});
|
|
1001
1016
|
}),
|
|
1002
1017
|
"label-placement": "right",
|
|
1003
1018
|
"model-value": e(t).isFeedvibe || !1,
|
|
1004
1019
|
label: "Feedvibe Campaign",
|
|
1005
1020
|
sublabel: "Bundle will be appear for Feedvibe campaign use"
|
|
1006
|
-
}, null, 8, ["model-value"])) :
|
|
1007
|
-
g("div",
|
|
1008
|
-
d(
|
|
1021
|
+
}, null, 8, ["model-value"])) : j("", !0),
|
|
1022
|
+
g("div", Ot, L(e(u)("connect.store.bundle.edit.basicInformation")), 1),
|
|
1023
|
+
d(k, {
|
|
1009
1024
|
label: e(u)("connect.store.bundle.edit.bundleName"),
|
|
1010
1025
|
modelValue: e(t).name,
|
|
1011
|
-
"onUpdate:modelValue":
|
|
1012
|
-
"helper-state": e(
|
|
1013
|
-
"helper-text": e(
|
|
1026
|
+
"onUpdate:modelValue": o[1] || (o[1] = (V) => e(t).name = V),
|
|
1027
|
+
"helper-state": e(W)(e(r), "name"),
|
|
1028
|
+
"helper-text": e(z)(e(r), "name")
|
|
1014
1029
|
}, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
|
|
1015
1030
|
d(Ge, {
|
|
1016
1031
|
label: e(u)("connect.store.bundle.edit.bundleImage"),
|
|
@@ -1018,104 +1033,104 @@ const Et = /* @__PURE__ */ G({
|
|
|
1018
1033
|
"aspect-ratio": "16/9",
|
|
1019
1034
|
thumbnail: e(t).image ?? void 0,
|
|
1020
1035
|
file: e(c) ?? void 0,
|
|
1021
|
-
"onUpdate:file":
|
|
1036
|
+
"onUpdate:file": o[2] || (o[2] = (V) => {
|
|
1022
1037
|
c.value = V;
|
|
1023
1038
|
}),
|
|
1024
|
-
"helper-state": e(
|
|
1025
|
-
"helper-text": e(
|
|
1039
|
+
"helper-state": e(W)(e(r), "image"),
|
|
1040
|
+
"helper-text": e(z)(e(r), "image")
|
|
1026
1041
|
}, null, 8, ["label", "thumbnail", "file", "helper-state", "helper-text"]),
|
|
1027
1042
|
d(B, {
|
|
1028
|
-
"model-value": e(
|
|
1043
|
+
"model-value": e($.Dinero).fromFdoDinero(e(t).price).toUnit(),
|
|
1029
1044
|
label: e(u)("connect.store.bundle.edit.bundlePrice"),
|
|
1030
1045
|
min: 0,
|
|
1031
1046
|
"max-fraction-digits": 2,
|
|
1032
|
-
"onUpdate:modelValue":
|
|
1047
|
+
"onUpdate:modelValue": o[3] || (o[3] = (V) => {
|
|
1033
1048
|
e(t).price.amount = V * 10 ** e(t).price.precision;
|
|
1034
1049
|
}),
|
|
1035
1050
|
"is-currency": !0,
|
|
1036
1051
|
"show-steppers": !1,
|
|
1037
|
-
"helper-text": e(
|
|
1038
|
-
"helper-state": e(
|
|
1052
|
+
"helper-text": e(z)(e(r), "price") || `${e($.Dinero).fromNumber({ number: 1 }).toFormat(!0)} = ${e($.Dinero).fromNumber({ number: 1 }).toUnit()} credit`,
|
|
1053
|
+
"helper-state": e(W)(e(r), "price")
|
|
1039
1054
|
}, {
|
|
1040
|
-
prepend:
|
|
1041
|
-
|
|
1055
|
+
prepend: T(() => [
|
|
1056
|
+
le(L(e($.Dinero).defaultCurrency()), 1)
|
|
1042
1057
|
]),
|
|
1043
1058
|
_: 1
|
|
1044
1059
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
1045
1060
|
d(B, {
|
|
1046
|
-
"model-value": e(
|
|
1061
|
+
"model-value": e($.Dinero).fromFdoDinero(e(t).originalPrice).toUnit(),
|
|
1047
1062
|
label: e(u)("connect.store.bundle.edit.bundleValue"),
|
|
1048
1063
|
min: 0,
|
|
1049
1064
|
"max-fraction-digits": 2,
|
|
1050
|
-
"onUpdate:modelValue":
|
|
1051
|
-
e(t).originalPrice || (e(t).originalPrice = e(
|
|
1065
|
+
"onUpdate:modelValue": o[4] || (o[4] = (V) => {
|
|
1066
|
+
e(t).originalPrice || (e(t).originalPrice = e($.Dinero).zero().toObject()), e(t).originalPrice.amount = V * 10 ** e(t).originalPrice.precision;
|
|
1052
1067
|
}),
|
|
1053
1068
|
"is-currency": !0,
|
|
1054
1069
|
"show-steppers": !1,
|
|
1055
|
-
"helper-text": e(
|
|
1056
|
-
"helper-state": e(
|
|
1070
|
+
"helper-text": e(z)(e(r), "originalPrice") || e(u)("connect.store.bundle.edit.originalPriceHelper"),
|
|
1071
|
+
"helper-state": e(W)(e(r), "originalPrice")
|
|
1057
1072
|
}, {
|
|
1058
|
-
prepend:
|
|
1059
|
-
|
|
1073
|
+
prepend: T(() => [
|
|
1074
|
+
le(L(e($.Dinero).defaultCurrency()), 1)
|
|
1060
1075
|
]),
|
|
1061
1076
|
_: 1
|
|
1062
1077
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
1063
|
-
e(t).isFeedvibe ?
|
|
1078
|
+
e(t).isFeedvibe ? j("", !0) : (x(), E(B, {
|
|
1064
1079
|
key: 1,
|
|
1065
1080
|
"model-value": e(t).coinPrice ?? null,
|
|
1066
1081
|
label: e(u)("connect.store.bundle.edit.pointNeeded"),
|
|
1067
1082
|
min: 0,
|
|
1068
|
-
"onUpdate:modelValue":
|
|
1083
|
+
"onUpdate:modelValue": o[5] || (o[5] = (V) => {
|
|
1069
1084
|
V > 0 && e(t).credit.normal > 0 && (e(t).credit.normal = 0), e(t).coinPrice = V;
|
|
1070
1085
|
}),
|
|
1071
1086
|
"show-steppers": !1,
|
|
1072
|
-
"helper-state": e(
|
|
1073
|
-
"helper-text": e(
|
|
1087
|
+
"helper-state": e(W)(e(r), "coinPrice"),
|
|
1088
|
+
"helper-text": e(z)(e(r), "coinPrice")
|
|
1074
1089
|
}, {
|
|
1075
|
-
append:
|
|
1076
|
-
|
|
1090
|
+
append: T(() => o[20] || (o[20] = [
|
|
1091
|
+
le(" point(s) ")
|
|
1077
1092
|
])),
|
|
1078
1093
|
_: 1
|
|
1079
1094
|
}, 8, ["model-value", "label", "helper-state", "helper-text"])),
|
|
1080
|
-
e(s).storeOption.stripe && !e(t).isFeedvibe ? (x(), P(
|
|
1081
|
-
g("div",
|
|
1082
|
-
d(
|
|
1095
|
+
e(s).storeOption.stripe && !e(t).isFeedvibe ? (x(), P(q, { key: 2 }, [
|
|
1096
|
+
g("div", Et, L(e(u)("connect.store.bundle.edit.subscriptionSettings")), 1),
|
|
1097
|
+
d(k, {
|
|
1083
1098
|
label: e(u)("connect.store.bundle.edit.stripePriceId"),
|
|
1084
1099
|
modelValue: e(t).stripePriceId,
|
|
1085
|
-
"onUpdate:modelValue":
|
|
1086
|
-
"helper-state": e(
|
|
1087
|
-
"helper-text": e(
|
|
1100
|
+
"onUpdate:modelValue": o[6] || (o[6] = (V) => e(t).stripePriceId = V),
|
|
1101
|
+
"helper-state": e(W)(e(r), "stripePriceId"),
|
|
1102
|
+
"helper-text": e(z)(e(r), "stripePriceId")
|
|
1088
1103
|
}, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
|
|
1089
|
-
e(t).stripePriceId ? (x(),
|
|
1104
|
+
e(t).stripePriceId ? (x(), E(B, {
|
|
1090
1105
|
key: 0,
|
|
1091
1106
|
"model-value": e(t).subscriptionValidity ?? null,
|
|
1092
1107
|
min: 1,
|
|
1093
|
-
"onUpdate:modelValue":
|
|
1108
|
+
"onUpdate:modelValue": ne,
|
|
1094
1109
|
label: e(u)("connect.store.bundle.edit.subscriptionValidity"),
|
|
1095
1110
|
"show-steppers": !1,
|
|
1096
|
-
"helper-state": e(
|
|
1097
|
-
"helper-text": e(
|
|
1098
|
-
}, null, 8, ["model-value", "label", "helper-state", "helper-text"])) :
|
|
1099
|
-
], 64)) :
|
|
1100
|
-
e(t).isFeedvibe ?
|
|
1101
|
-
|
|
1111
|
+
"helper-state": e(W)(e(r), "subscriptionValidity"),
|
|
1112
|
+
"helper-text": e(z)(e(r), "subscriptionValidity")
|
|
1113
|
+
}, null, 8, ["model-value", "label", "helper-state", "helper-text"])) : j("", !0)
|
|
1114
|
+
], 64)) : j("", !0),
|
|
1115
|
+
e(t).isFeedvibe ? j("", !0) : (x(), P(q, { key: 3 }, [
|
|
1116
|
+
o[24] || (o[24] = g("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Credit", -1)),
|
|
1102
1117
|
d(B, {
|
|
1103
1118
|
modelValue: e(t).credit.normal,
|
|
1104
|
-
"onUpdate:modelValue":
|
|
1119
|
+
"onUpdate:modelValue": o[7] || (o[7] = (V) => e(t).credit.normal = V),
|
|
1105
1120
|
label: "Normal credit",
|
|
1106
1121
|
"show-steppers": !1,
|
|
1107
|
-
"helper-state": e(
|
|
1108
|
-
"helper-text": e(
|
|
1122
|
+
"helper-state": e(W)(e(r), "credit.normal"),
|
|
1123
|
+
"helper-text": e(z)(e(r), "credit.normal")
|
|
1109
1124
|
}, {
|
|
1110
|
-
append:
|
|
1111
|
-
|
|
1125
|
+
append: T(() => o[21] || (o[21] = [
|
|
1126
|
+
le(" credit ")
|
|
1112
1127
|
])),
|
|
1113
1128
|
_: 1
|
|
1114
1129
|
}, 8, ["modelValue", "helper-state", "helper-text"]),
|
|
1115
1130
|
d(B, {
|
|
1116
|
-
"model-value": ((
|
|
1131
|
+
"model-value": ((ie = e(t).credit.free) == null ? void 0 : ie.amount) ?? null,
|
|
1117
1132
|
min: 0,
|
|
1118
|
-
"onUpdate:modelValue":
|
|
1133
|
+
"onUpdate:modelValue": o[8] || (o[8] = (V) => {
|
|
1119
1134
|
e(t).credit.free || (e(t).credit.free = {
|
|
1120
1135
|
amount: 0,
|
|
1121
1136
|
day: 1
|
|
@@ -1123,130 +1138,130 @@ const Et = /* @__PURE__ */ G({
|
|
|
1123
1138
|
}),
|
|
1124
1139
|
label: "Free credit",
|
|
1125
1140
|
"show-steppers": !1,
|
|
1126
|
-
"helper-state": e(
|
|
1127
|
-
"helper-text": e(
|
|
1141
|
+
"helper-state": e(W)(e(r), "credit.free.amount"),
|
|
1142
|
+
"helper-text": e(z)(e(r), "credit.free.amount")
|
|
1128
1143
|
}, {
|
|
1129
|
-
append:
|
|
1130
|
-
|
|
1144
|
+
append: T(() => o[22] || (o[22] = [
|
|
1145
|
+
le(" credit ")
|
|
1131
1146
|
])),
|
|
1132
1147
|
_: 1
|
|
1133
1148
|
}, 8, ["model-value", "helper-state", "helper-text"]),
|
|
1134
|
-
(
|
|
1149
|
+
(Se = e(t).credit.free) != null && Se.amount ? (x(), E(B, {
|
|
1135
1150
|
key: 0,
|
|
1136
1151
|
disabled: !!e(t).stripePriceId,
|
|
1137
|
-
"model-value": ((
|
|
1152
|
+
"model-value": ((we = e(t).credit.free) == null ? void 0 : we.day) ?? null,
|
|
1138
1153
|
min: 0,
|
|
1139
|
-
"onUpdate:modelValue":
|
|
1154
|
+
"onUpdate:modelValue": o[9] || (o[9] = (V) => {
|
|
1140
1155
|
e(t).credit.free || (e(t).credit.free = {
|
|
1141
1156
|
amount: 0,
|
|
1142
1157
|
day: 1
|
|
1143
|
-
}), e(t).credit.free.day = e(
|
|
1158
|
+
}), e(t).credit.free.day = e(I) || V;
|
|
1144
1159
|
}),
|
|
1145
1160
|
label: "Free credit valid for",
|
|
1146
1161
|
"show-steppers": !1,
|
|
1147
|
-
"helper-state": e(
|
|
1148
|
-
"helper-text": e(
|
|
1162
|
+
"helper-state": e(W)(e(r), "credit.free.day"),
|
|
1163
|
+
"helper-text": e(z)(e(r), "credit.free.day")
|
|
1149
1164
|
}, {
|
|
1150
|
-
append:
|
|
1151
|
-
|
|
1165
|
+
append: T(() => o[23] || (o[23] = [
|
|
1166
|
+
le(" day(s) ")
|
|
1152
1167
|
])),
|
|
1153
1168
|
_: 1
|
|
1154
|
-
}, 8, ["disabled", "model-value", "helper-state", "helper-text"])) :
|
|
1169
|
+
}, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : j("", !0)
|
|
1155
1170
|
], 64)),
|
|
1156
|
-
e(v) ? (x(), P(
|
|
1157
|
-
|
|
1158
|
-
d(
|
|
1171
|
+
e(v) ? (x(), P(q, { key: 4 }, [
|
|
1172
|
+
o[25] || (o[25] = g("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Taxes", -1)),
|
|
1173
|
+
d(Nt, {
|
|
1159
1174
|
modelValue: e(t).taxes,
|
|
1160
|
-
"onUpdate:modelValue":
|
|
1175
|
+
"onUpdate:modelValue": o[10] || (o[10] = (V) => e(t).taxes = V)
|
|
1161
1176
|
}, null, 8, ["modelValue"]),
|
|
1162
|
-
d(
|
|
1177
|
+
d(k, {
|
|
1163
1178
|
label: `Tax Charged (${e(w)})`,
|
|
1164
|
-
"model-value": e(
|
|
1179
|
+
"model-value": e(U),
|
|
1165
1180
|
disabled: ""
|
|
1166
1181
|
}, null, 8, ["label", "model-value"])
|
|
1167
|
-
], 64)) :
|
|
1182
|
+
], 64)) : j("", !0),
|
|
1168
1183
|
d(B, {
|
|
1169
1184
|
label: "Total Price",
|
|
1170
|
-
"model-value": e(
|
|
1185
|
+
"model-value": e(A),
|
|
1171
1186
|
disabled: !0
|
|
1172
1187
|
}, null, 8, ["model-value"]),
|
|
1173
|
-
g("div",
|
|
1174
|
-
g("div",
|
|
1175
|
-
g("div",
|
|
1176
|
-
g("div",
|
|
1188
|
+
g("div", Mt, L(e(u)("connect.store.bundle.edit.bundleReward.title")), 1),
|
|
1189
|
+
g("div", jt, L(e(u)("connect.store.bundle.edit.bundleReward.description")), 1),
|
|
1190
|
+
g("div", Lt, [
|
|
1191
|
+
g("div", qt, [
|
|
1177
1192
|
d(Xe, {
|
|
1178
|
-
label: `Reward type: ${e(
|
|
1193
|
+
label: `Reward type: ${e(n).length == 0 ? "All" : e(n)[0].name}`
|
|
1179
1194
|
}, {
|
|
1180
|
-
default:
|
|
1195
|
+
default: T(() => [
|
|
1181
1196
|
d(X, {
|
|
1182
|
-
onClick:
|
|
1197
|
+
onClick: o[11] || (o[11] = (V) => n.value = []),
|
|
1183
1198
|
label: "All"
|
|
1184
1199
|
}),
|
|
1185
1200
|
d(X, {
|
|
1186
|
-
onClick:
|
|
1201
|
+
onClick: o[12] || (o[12] = (V) => n.value = [
|
|
1187
1202
|
{
|
|
1188
1203
|
id: "type",
|
|
1189
1204
|
value: "VOUCHER",
|
|
1190
|
-
name: e(
|
|
1205
|
+
name: e(de).VOUCHER.name
|
|
1191
1206
|
}
|
|
1192
1207
|
]),
|
|
1193
|
-
label: e(
|
|
1208
|
+
label: e(de).VOUCHER.name
|
|
1194
1209
|
}, null, 8, ["label"]),
|
|
1195
1210
|
d(X, {
|
|
1196
|
-
onClick:
|
|
1211
|
+
onClick: o[13] || (o[13] = (V) => n.value = [
|
|
1197
1212
|
{
|
|
1198
1213
|
id: "type",
|
|
1199
1214
|
value: "TITLE",
|
|
1200
|
-
name: e(
|
|
1215
|
+
name: e(de).TITLE.name
|
|
1201
1216
|
}
|
|
1202
1217
|
]),
|
|
1203
|
-
label: e(
|
|
1218
|
+
label: e(de).TITLE.name
|
|
1204
1219
|
}, null, 8, ["label"])
|
|
1205
1220
|
]),
|
|
1206
1221
|
_: 1
|
|
1207
1222
|
}, 8, ["label"])
|
|
1208
1223
|
]),
|
|
1209
|
-
d(
|
|
1210
|
-
modelValue: e(
|
|
1211
|
-
"onUpdate:modelValue":
|
|
1224
|
+
d(re, {
|
|
1225
|
+
modelValue: e(M),
|
|
1226
|
+
"onUpdate:modelValue": o[14] || (o[14] = (V) => se(M) ? M.value = V : null),
|
|
1212
1227
|
selection: "multiple",
|
|
1213
|
-
"column-filter": e(
|
|
1228
|
+
"column-filter": e(n),
|
|
1214
1229
|
"column-defs": f,
|
|
1215
1230
|
"row-data": e(C).filter(
|
|
1216
1231
|
(V) => !e(t).isFeedvibe || V.collectible.type == "VOUCHER"
|
|
1217
1232
|
),
|
|
1218
1233
|
"hide-footer": e(C).length <= 10
|
|
1219
1234
|
}, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"]),
|
|
1220
|
-
d(
|
|
1221
|
-
text: e(
|
|
1222
|
-
state: e(
|
|
1235
|
+
d(Ie, {
|
|
1236
|
+
text: e(z)(e(r), "titles"),
|
|
1237
|
+
state: e(W)(e(r), "titles")
|
|
1223
1238
|
}, null, 8, ["text", "state"])
|
|
1224
1239
|
]),
|
|
1225
|
-
g("div",
|
|
1226
|
-
g("div",
|
|
1227
|
-
d(
|
|
1240
|
+
g("div", Ht, L(e(u)("connect.store.bundle.edit.advanceSetting")), 1),
|
|
1241
|
+
g("div", Kt, [
|
|
1242
|
+
d(S, {
|
|
1228
1243
|
"model-value": e(t).internal ?? !1,
|
|
1229
|
-
"onUpdate:modelValue":
|
|
1244
|
+
"onUpdate:modelValue": o[15] || (o[15] = (V) => e(t).internal = V),
|
|
1230
1245
|
"label-placement": "right",
|
|
1231
1246
|
label: e(u)("connect.store.bundle.edit.internalBundle"),
|
|
1232
1247
|
sublabel: e(u)("connect.store.bundle.edit.internalBundleDescription")
|
|
1233
1248
|
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
1234
|
-
d(
|
|
1249
|
+
d(S, {
|
|
1235
1250
|
"model-value": e(t).hideInPos ?? !1,
|
|
1236
|
-
"onUpdate:modelValue":
|
|
1251
|
+
"onUpdate:modelValue": o[16] || (o[16] = (V) => e(t).hideInPos = V),
|
|
1237
1252
|
"label-placement": "right",
|
|
1238
1253
|
label: e(u)("connect.store.bundle.edit.hideInPos"),
|
|
1239
1254
|
sublabel: e(u)("connect.store.bundle.edit.hideInPosDescription")
|
|
1240
1255
|
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
1241
1256
|
d(B, {
|
|
1242
|
-
"model-value": ((Te = (
|
|
1243
|
-
"onUpdate:modelValue":
|
|
1257
|
+
"model-value": ((Te = (Pe = e(t).config) == null ? void 0 : Pe.options) == null ? void 0 : Te.maxPerUser) || null,
|
|
1258
|
+
"onUpdate:modelValue": o[17] || (o[17] = (V) => e(ae).set(e(t), "config.options.maxPerUser", V)),
|
|
1244
1259
|
label: e(u)("connect.store.bundle.edit.maxPerUser"),
|
|
1245
1260
|
"show-steppers": !1,
|
|
1246
1261
|
placeholder: "Unlimited"
|
|
1247
1262
|
}, null, 8, ["model-value", "label"])
|
|
1248
1263
|
])
|
|
1249
|
-
])) :
|
|
1264
|
+
])) : j("", !0)
|
|
1250
1265
|
];
|
|
1251
1266
|
}),
|
|
1252
1267
|
_: 1
|
|
@@ -1254,15 +1269,15 @@ const Et = /* @__PURE__ */ G({
|
|
|
1254
1269
|
};
|
|
1255
1270
|
}
|
|
1256
1271
|
});
|
|
1257
|
-
var
|
|
1258
|
-
const
|
|
1272
|
+
var Yt = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
|
|
1273
|
+
const Jt = { class: "px-24 flex flex-col gap-y-16" }, Gt = { class: "flex gap-8 items-center" }, Xt = { class: "fm-typo-en-body-lg-600" }, Zt = { class: "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-24" }, Qt = { class: "flex flex-col gap-16 text-center" }, eo = { class: "fm-typo-en-title-sm-800" }, to = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Po = /* @__PURE__ */ G({
|
|
1259
1274
|
__name: "Store",
|
|
1260
1275
|
setup(b) {
|
|
1261
1276
|
const h = {
|
|
1262
1277
|
label: "Setup payout account",
|
|
1263
1278
|
value: "payout",
|
|
1264
1279
|
isPrimary: !1
|
|
1265
|
-
}, { t: l } = Ve(),
|
|
1280
|
+
}, { t: l } = Ve(), F = {
|
|
1266
1281
|
label: l("connect.store.actions.setting"),
|
|
1267
1282
|
value: "setting",
|
|
1268
1283
|
isPrimary: !1
|
|
@@ -1274,16 +1289,16 @@ const Zt = { class: "px-24 flex flex-col gap-y-16" }, Qt = { class: "flex gap-8
|
|
|
1274
1289
|
value: "create_category",
|
|
1275
1290
|
isPrimary: !0,
|
|
1276
1291
|
prependIcon: "add"
|
|
1277
|
-
}, y =
|
|
1292
|
+
}, y = ot(), a = Ce(), { global: t, minor: c } = Le, i = Ue(), r = D(() => a.sortedStoreCategories), f = N(), n = N();
|
|
1278
1293
|
async function C(v) {
|
|
1279
1294
|
var w;
|
|
1280
|
-
v === "setting" ? (w = f.value) == null || w.showSheet(!0, a.storeOption) : v === "create_category" ?
|
|
1295
|
+
v === "setting" ? (w = f.value) == null || w.showSheet(!0, a.storeOption) : v === "create_category" ? I(-1) : v === "create_reward" ? await y.push({ name: Ke["$connect-STORE_REWARDS"] }) : v == "payout" && window.open(Yt.paymentPortalUrl, "_blank");
|
|
1281
1296
|
}
|
|
1282
|
-
async function
|
|
1297
|
+
async function R(v) {
|
|
1283
1298
|
await c(
|
|
1284
1299
|
async () => {
|
|
1285
1300
|
var w;
|
|
1286
|
-
await
|
|
1301
|
+
await be.updateStore(v), await a.readMemberStore(), (w = f.value) == null || w.showSheet(!1);
|
|
1287
1302
|
},
|
|
1288
1303
|
{
|
|
1289
1304
|
message: l("connect.store.setting.update.message"),
|
|
@@ -1291,9 +1306,9 @@ const Zt = { class: "px-24 flex flex-col gap-y-16" }, Qt = { class: "flex gap-8
|
|
|
1291
1306
|
}
|
|
1292
1307
|
);
|
|
1293
1308
|
}
|
|
1294
|
-
async function
|
|
1309
|
+
async function I(v = -1) {
|
|
1295
1310
|
var w, m;
|
|
1296
|
-
if ((!a.storeOption || !a.storeOption.company) && await
|
|
1311
|
+
if ((!a.storeOption || !a.storeOption.company) && await ye.confirm(
|
|
1297
1312
|
l("connect.store.category.setup.title"),
|
|
1298
1313
|
l("connect.store.category.setup.button"),
|
|
1299
1314
|
l("connect.store.category.setup.action")
|
|
@@ -1301,59 +1316,59 @@ const Zt = { class: "px-24 flex flex-col gap-y-16" }, Qt = { class: "flex gap-8
|
|
|
1301
1316
|
return (w = f.value) == null ? void 0 : w.showSheet(!0);
|
|
1302
1317
|
i.open({
|
|
1303
1318
|
title: v == -1 ? l("connect.store.category.add") : l("connect.store.category.edit"),
|
|
1304
|
-
contentComponent:
|
|
1319
|
+
contentComponent: gt,
|
|
1305
1320
|
contentComponentProps: {
|
|
1306
1321
|
initialValue: ((m = r.value[v]) == null ? void 0 : m.name) ?? "",
|
|
1307
1322
|
action: v == -1 ? "add" : "edit"
|
|
1308
1323
|
}
|
|
1309
|
-
}).onPrimary(async (
|
|
1310
|
-
|
|
1324
|
+
}).onPrimary(async (U) => {
|
|
1325
|
+
U === null && !await ye.remove(
|
|
1311
1326
|
l("connect.store.category.remove.confirm"),
|
|
1312
1327
|
l("connect.store.category.remove.title")
|
|
1313
1328
|
) || await c(
|
|
1314
1329
|
async () => {
|
|
1315
|
-
const
|
|
1316
|
-
await
|
|
1317
|
-
categories:
|
|
1330
|
+
const A = v == -1 ? [...r.value, { name: U, bundles: [] }] : [...r.value].map((O, H) => H == v ? { ...O, name: U } : O).filter((O) => O.name !== null);
|
|
1331
|
+
await be.updateStoreBundle({
|
|
1332
|
+
categories: A
|
|
1318
1333
|
}), await a.readMemberStore();
|
|
1319
1334
|
},
|
|
1320
1335
|
{
|
|
1321
|
-
message:
|
|
1322
|
-
successMessage:
|
|
1336
|
+
message: U === null ? l("connect.store.category.update.deleting") : v == -1 ? l("connect.store.category.update.creating") : l("connect.store.category.update.updating"),
|
|
1337
|
+
successMessage: U === null ? l("connect.store.category.update.success.deleted") : v == -1 ? l("connect.store.category.update.success.created") : l("connect.store.category.update.success.updated")
|
|
1323
1338
|
}
|
|
1324
1339
|
);
|
|
1325
1340
|
});
|
|
1326
1341
|
}
|
|
1327
|
-
async function
|
|
1328
|
-
var
|
|
1329
|
-
w ?? (w = (
|
|
1330
|
-
const
|
|
1331
|
-
if (!
|
|
1332
|
-
|
|
1342
|
+
async function ne(v, w, m) {
|
|
1343
|
+
var O, H;
|
|
1344
|
+
w ?? (w = (O = n.value) == null ? void 0 : O.target.category), m ?? (m = (H = n.value) == null ? void 0 : H.target.index);
|
|
1345
|
+
const U = $e(r.value), A = U[w];
|
|
1346
|
+
if (!A) {
|
|
1347
|
+
qe.error("Unexpected error", 2e3);
|
|
1333
1348
|
return;
|
|
1334
1349
|
}
|
|
1335
1350
|
if (v == null) {
|
|
1336
|
-
if (await
|
|
1351
|
+
if (await ye.remove(
|
|
1337
1352
|
"Are you sure you want to delete this bundle?",
|
|
1338
1353
|
"Delete bundle"
|
|
1339
1354
|
) == !1)
|
|
1340
1355
|
return;
|
|
1341
|
-
|
|
1356
|
+
A.bundles.splice(m, 1);
|
|
1342
1357
|
} else
|
|
1343
|
-
m == -1 ?
|
|
1358
|
+
m == -1 ? A.bundles.push(v) : A.bundles[m] = v;
|
|
1344
1359
|
await c(
|
|
1345
1360
|
async () => {
|
|
1346
|
-
var
|
|
1361
|
+
var K, p;
|
|
1347
1362
|
if (v != null) {
|
|
1348
|
-
const
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1363
|
+
const o = (K = n.value) == null ? void 0 : K.bundleImage;
|
|
1364
|
+
o === null && v.image ? (await fe.delete(v.image), v.image = null) : o && (v.image = await fe.update(
|
|
1365
|
+
fe.bundleImagePath(void 0, o),
|
|
1366
|
+
o
|
|
1352
1367
|
));
|
|
1353
1368
|
}
|
|
1354
|
-
await
|
|
1355
|
-
categories:
|
|
1356
|
-
}), await a.readMemberStore(), await a.readMembership(), await a.readRewards(), (p =
|
|
1369
|
+
await be.updateStoreBundle({
|
|
1370
|
+
categories: U
|
|
1371
|
+
}), await a.readMemberStore(), await a.readMembership(), await a.readRewards(), (p = n.value) == null || p.showSheet(!1);
|
|
1357
1372
|
},
|
|
1358
1373
|
{
|
|
1359
1374
|
message: `${v == null ? "Deleting" : m == -1 ? "Creating" : "Updating"} bundle`,
|
|
@@ -1363,36 +1378,36 @@ const Zt = { class: "px-24 flex flex-col gap-y-16" }, Qt = { class: "flex gap-8
|
|
|
1363
1378
|
}
|
|
1364
1379
|
function ee(v) {
|
|
1365
1380
|
var w;
|
|
1366
|
-
(w =
|
|
1381
|
+
(w = n.value) == null || w.showSheet(!0, {
|
|
1367
1382
|
...v,
|
|
1368
|
-
bundle: v.bundle ?
|
|
1383
|
+
bundle: v.bundle ? $e(v.bundle) : void 0
|
|
1369
1384
|
});
|
|
1370
1385
|
}
|
|
1371
|
-
const
|
|
1372
|
-
return
|
|
1386
|
+
const M = N([]);
|
|
1387
|
+
return me(async () => {
|
|
1373
1388
|
var v, w;
|
|
1374
1389
|
await t(async () => {
|
|
1375
|
-
var m,
|
|
1390
|
+
var m, U;
|
|
1376
1391
|
if (await a.readMemberStore(), await a.readMembership(), await a.readRewards(), await a.readPayoutAccount(), (m = y.currentRoute.value.query) != null && m.action) {
|
|
1377
|
-
switch ((
|
|
1392
|
+
switch ((U = y.currentRoute.value.query) == null ? void 0 : U.action) {
|
|
1378
1393
|
case "update_setting":
|
|
1379
1394
|
C("setting");
|
|
1380
1395
|
break;
|
|
1381
1396
|
case "create_category":
|
|
1382
|
-
|
|
1397
|
+
I(-1);
|
|
1383
1398
|
break;
|
|
1384
1399
|
case "create_feedvibe_bundle":
|
|
1385
1400
|
i.open({
|
|
1386
1401
|
title: "Select category",
|
|
1387
|
-
contentComponent:
|
|
1388
|
-
}).onPrimary((
|
|
1402
|
+
contentComponent: Ct
|
|
1403
|
+
}).onPrimary((A) => {
|
|
1389
1404
|
i.close(), ee({
|
|
1390
|
-
category:
|
|
1405
|
+
category: A,
|
|
1391
1406
|
index: -1,
|
|
1392
1407
|
bundle: {
|
|
1393
|
-
...
|
|
1408
|
+
...ae.cloneDeep(xe),
|
|
1394
1409
|
isFeedvibe: !0,
|
|
1395
|
-
price:
|
|
1410
|
+
price: $.Dinero.fromNumber({
|
|
1396
1411
|
number: 10,
|
|
1397
1412
|
precision: 2
|
|
1398
1413
|
}).toObject()
|
|
@@ -1403,80 +1418,80 @@ const Zt = { class: "px-24 flex flex-col gap-y-16" }, Qt = { class: "flex gap-8
|
|
|
1403
1418
|
}
|
|
1404
1419
|
y.replace({ query: {} });
|
|
1405
1420
|
}
|
|
1406
|
-
}),
|
|
1421
|
+
}), M.value = [F, u, s], (((v = a.payoutAccount) == null ? void 0 : v.status) != "APPROVED" || ((w = a.payoutAccount) == null ? void 0 : w.enable) != !0) && (M.value = [
|
|
1407
1422
|
h,
|
|
1408
|
-
|
|
1423
|
+
F,
|
|
1409
1424
|
u,
|
|
1410
1425
|
s
|
|
1411
1426
|
]);
|
|
1412
1427
|
}), (v, w) => {
|
|
1413
|
-
const m = _("FmPageHead"),
|
|
1414
|
-
return x(), P(
|
|
1428
|
+
const m = _("FmPageHead"), U = _("FmButton"), A = _("FmCard");
|
|
1429
|
+
return x(), P(q, null, [
|
|
1415
1430
|
d(m, {
|
|
1416
1431
|
title: e(l)("connect.store.title"),
|
|
1417
|
-
actions: e(
|
|
1432
|
+
actions: e(M),
|
|
1418
1433
|
"onClick:action": C
|
|
1419
1434
|
}, null, 8, ["title", "actions"]),
|
|
1420
|
-
g("div",
|
|
1421
|
-
e(r) && e(r).length > 0 ? (x(), P(
|
|
1422
|
-
(x(!0), P(
|
|
1423
|
-
key:
|
|
1435
|
+
g("div", Jt, [
|
|
1436
|
+
e(r) && e(r).length > 0 ? (x(), P(q, { key: 0 }, [
|
|
1437
|
+
(x(!0), P(q, null, oe(e(r), (O, H) => (x(), P("div", {
|
|
1438
|
+
key: O.name,
|
|
1424
1439
|
class: "space-y-8 py-12"
|
|
1425
1440
|
}, [
|
|
1426
|
-
g("div",
|
|
1427
|
-
g("div",
|
|
1428
|
-
d(
|
|
1429
|
-
d(
|
|
1441
|
+
g("div", Gt, [
|
|
1442
|
+
g("div", Xt, L(O.name), 1),
|
|
1443
|
+
d(_e, { json: O }, null, 8, ["json"]),
|
|
1444
|
+
d(U, {
|
|
1430
1445
|
icon: "edit",
|
|
1431
1446
|
size: "md",
|
|
1432
1447
|
variant: "tertiary",
|
|
1433
|
-
onClick: (
|
|
1448
|
+
onClick: (K) => I(H)
|
|
1434
1449
|
}, null, 8, ["onClick"])
|
|
1435
1450
|
]),
|
|
1436
|
-
g("div",
|
|
1437
|
-
(x(!0), P(
|
|
1438
|
-
bundle:
|
|
1439
|
-
key:
|
|
1440
|
-
onEdit: (
|
|
1441
|
-
onDelete: (
|
|
1451
|
+
g("div", Zt, [
|
|
1452
|
+
(x(!0), P(q, null, oe(O.bundles, (K, p) => (x(), E(pt, {
|
|
1453
|
+
bundle: K,
|
|
1454
|
+
key: K._id,
|
|
1455
|
+
onEdit: (o) => ee({ bundle: K, category: H, index: p }),
|
|
1456
|
+
onDelete: (o) => ne(null, H, p)
|
|
1442
1457
|
}, null, 8, ["bundle", "onEdit", "onDelete"]))), 128)),
|
|
1443
|
-
d(
|
|
1444
|
-
onCreate: (
|
|
1458
|
+
d(yt, {
|
|
1459
|
+
onCreate: (K) => ee({ category: H, index: -1 })
|
|
1445
1460
|
}, null, 8, ["onCreate"])
|
|
1446
1461
|
])
|
|
1447
1462
|
]))), 128)),
|
|
1448
|
-
d(
|
|
1463
|
+
d(zt, {
|
|
1449
1464
|
ref_key: "bundleSheetRef",
|
|
1450
|
-
ref:
|
|
1451
|
-
onUpdate:
|
|
1465
|
+
ref: n,
|
|
1466
|
+
onUpdate: ne
|
|
1452
1467
|
}, null, 512)
|
|
1453
|
-
], 64)) : (x(),
|
|
1468
|
+
], 64)) : (x(), E(A, {
|
|
1454
1469
|
key: 1,
|
|
1455
1470
|
variant: "outlined",
|
|
1456
1471
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
1457
1472
|
}, {
|
|
1458
|
-
default:
|
|
1473
|
+
default: T(() => [
|
|
1459
1474
|
w[1] || (w[1] = g("img", {
|
|
1460
|
-
src:
|
|
1475
|
+
src: Oe,
|
|
1461
1476
|
class: "aspect-square w-[150px]"
|
|
1462
1477
|
}, null, -1)),
|
|
1463
|
-
g("div",
|
|
1464
|
-
g("div",
|
|
1465
|
-
g("div",
|
|
1478
|
+
g("div", Qt, [
|
|
1479
|
+
g("div", eo, L(e(l)("connect.store.bundle.title")), 1),
|
|
1480
|
+
g("div", to, L(e(l)("connect.store.bundle.description")), 1)
|
|
1466
1481
|
]),
|
|
1467
|
-
d(
|
|
1482
|
+
d(U, {
|
|
1468
1483
|
variant: "primary",
|
|
1469
1484
|
label: e(l)("connect.store.actions.addCategory"),
|
|
1470
1485
|
icon: "add",
|
|
1471
|
-
onClick: w[0] || (w[0] = (
|
|
1486
|
+
onClick: w[0] || (w[0] = (O) => I(-1))
|
|
1472
1487
|
}, null, 8, ["label"])
|
|
1473
1488
|
]),
|
|
1474
1489
|
_: 1
|
|
1475
1490
|
})),
|
|
1476
|
-
d(
|
|
1491
|
+
d(Dt, {
|
|
1477
1492
|
ref_key: "settingSheetRef",
|
|
1478
1493
|
ref: f,
|
|
1479
|
-
onUpdate:
|
|
1494
|
+
onUpdate: R
|
|
1480
1495
|
}, null, 512)
|
|
1481
1496
|
])
|
|
1482
1497
|
], 64);
|
|
@@ -1484,5 +1499,5 @@ const Zt = { class: "px-24 flex flex-col gap-y-16" }, Qt = { class: "flex gap-8
|
|
|
1484
1499
|
}
|
|
1485
1500
|
});
|
|
1486
1501
|
export {
|
|
1487
|
-
|
|
1502
|
+
Po as default
|
|
1488
1503
|
};
|