@feedmepos/mf-connect 0.1.11-prod → 0.1.13-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-Bbt1kP2U.js → Analytic-CBEDTJ94.js} +9 -9
- package/dist/{App-CVA65EVC.js → App-BcrQs0nE.js} +6 -6
- package/dist/{Broadcast-BJXK8OE5.js → Broadcast-ClM81ght.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DDEx0cK9.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CTwScH9I.js} +7 -7
- package/dist/{Card-DFiUkfYj.js → Card-B7_nUT03.js} +15 -15
- package/dist/{Collections-qVnvveUf.js → Collections-N7LIfZ2D.js} +5 -5
- package/dist/{Credit-BWHTbAG-.js → Credit-DC6pzGIR.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-4_cHlWUJ.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DCwaUg09.js} +28 -28
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DLgZd4HU.js → EffectSheet.vue_vue_type_style_index_0_lang-D2qCLBp3.js} +6 -6
- package/dist/{Experience-BmGSus53.js → Experience-ClJWQLEB.js} +8 -8
- package/dist/{Game-49w7XN5k.js → Game-BznCxZXt.js} +8 -8
- package/dist/{Index-D-7hsAaE.js → Index-D27v-Lqw.js} +9 -9
- package/dist/{Marketing-DtbJxS_j.js → Marketing-FvYJ_Lt-.js} +5 -5
- package/dist/{Member-jZks4pw_.js → Member-CQYj0FQK.js} +4 -4
- package/dist/{MemberList-BqO54kPC.js → MemberList-UIZANV1T.js} +14 -14
- package/dist/{MemberTransactions-CLK7VmPw.js → MemberTransactions-JKLzrvh6.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-ef2Qrdvd.js → MessageInput.vue_vue_type_script_setup_true_lang-_72tx6g3.js} +2 -2
- package/dist/{Mission-LGC1CGrB.js → Mission-LwSpobZu.js} +8 -8
- package/dist/{Overview-Dm_ycoqZ.js → Overview-PXshmkPD.js} +17 -17
- package/dist/{Point-BBNJ9cc5.js → Point-uaIRQMRW.js} +8 -8
- package/dist/{Promotion-DFh9IEmP.js → Promotion-qjos6ksl.js} +9 -9
- package/dist/{Record-oBmJTn3G.js → Record-qqPaVdrx.js} +6 -6
- package/dist/{Reward-DR_HzrrM.js → Reward-BC6GJ4kD.js} +14 -14
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Du_0o2b9.js → RewardGroup.vue_vue_type_script_setup_true_lang-CF7hNZIU.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CxXugphA.js → RuleGroup.vue_vue_type_script_setup_true_lang-DQ8rQIwv.js} +13 -13
- package/dist/{Segment-DjyHLWZC.js → Segment-B5E2FdYc.js} +13 -13
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-stTwgie4.js → SelectItems.vue_vue_type_script_setup_true_lang-Dqz3uAze.js} +2 -2
- package/dist/{Setting-a7Tw-3ht.js → Setting-CA9PQVKp.js} +8 -8
- package/dist/{Store-HWGWswEm.js → Store-irRFotGI.js} +188 -184
- package/dist/{StoreRewards-s4cX1bFH.js → StoreRewards-CcJ8MMvp.js} +12 -12
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Dq4qIXZu.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CcNjdcMX.js} +18 -18
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BQpbScyf.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-2i2fDWDC.js} +1 -1
- package/dist/{Tier-C7kiLjzE.js → Tier-CdxK-QtB.js} +19 -19
- package/dist/{Title-BPv1ZiHg.js → Title-Ci_NXdrD.js} +19 -19
- package/dist/{Transaction-HdR7RiGY.js → Transaction-ChKg7UTd.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-D3VgIQb-.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B3INK4Ue.js} +6 -6
- package/dist/{Voucher-Y5Lh5xms.js → Voucher-CDlHku1x.js} +11 -11
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CFKID7mS.js → VoucherEditor.vue_vue_type_script_setup_true_lang-D9wqrTVc.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-6asSbt53.js → ZodTextField.vue_vue_type_script_setup_true_lang-Di6QPzfu.js} +1 -1
- package/dist/{app-MbHo43vs.js → app-B9MkUjRo.js} +1799 -795
- package/dist/{app-Bh2mviM1.js → app-BmT3kZJr.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-DMzeDNMd.js → business-1nKmKs9l.js} +1 -1
- package/dist/{campaign-2swZVVbi.js → campaign-xn4PhDSV.js} +2 -2
- package/dist/{campaign.enum-CHI6p9lH.js → campaign.enum-KwZQ6yBR.js} +1 -1
- package/dist/{campaign.fn-DNwV5ZWO.js → campaign.fn-CVj38fae.js} +33 -33
- package/dist/{collectible.enum-Y3ALLTcR.js → collectible.enum-DojcTb50.js} +1 -1
- package/dist/{collection.fn-CfvnmVQa.js → collection.fn-Bv2EZuA3.js} +2 -2
- package/dist/{dto-DseG41FR.js → dto-DP9kIlr_.js} +10 -10
- package/dist/{effect-BH4hGy1N.js → effect-47JS4i8Q.js} +1 -1
- package/dist/{email-addresses-doOfKmSj.js → email-addresses-C6Jvh8MK.js} +1 -1
- package/dist/{export-DGrsZa4F.js → export-BdPv7Hej.js} +3 -3
- package/dist/{helper-3ohDu5Tn.js → helper-Di0AEV1F.js} +1 -1
- package/dist/{index-CVlbqA1t.js → index-BPkcvPHp.js} +1 -1
- package/dist/{index-CKji0U5N.js → index-BUjGxHkM.js} +3 -3
- package/dist/{index-B8HMoADH.js → index-BZg5tj39.js} +3 -3
- package/dist/{index-D5CHO7oc.js → index-Be9fjCVp.js} +1 -1
- package/dist/{index-C-ozJGq6.js → index-CDmiwLKd.js} +1 -1
- package/dist/{index-CDT7BpQ3.js → index-CPjDZrsE.js} +1 -1
- package/dist/{index-BUzeShnL.js → index-CVsuhUpe.js} +7 -7
- package/dist/{index-CKfeyWFN.js → index-D5LMqy6S.js} +1 -1
- package/dist/{index-rYTZxC9p.js → index-DHb0pIVR.js} +2 -2
- package/dist/{index-BWwF7uuk.js → index-Dd0IgwOF.js} +9 -7
- package/dist/{index-BXw9yi-G.js → index-YAoPUv6z.js} +1 -1
- package/dist/{index-wBdTUnZ6.js → index-gYvuI9Nk.js} +3 -3
- package/dist/{index.esm2017-D-hthfW3.js → index.esm2017-C-O-0X0H.js} +1 -1
- package/dist/{loading-DQnXnCXT.js → loading-E0zwe5lq.js} +4 -4
- package/dist/{membership-C3envHTy.js → membership-OECc9rWj.js} +3 -3
- package/dist/{money-Dm7B8wUJ.js → money-CVSdH00t.js} +1 -1
- package/dist/{number-Swjcamr8.js → number-Iu6cix1k.js} +1 -1
- package/dist/{objectid-xH_8eWzr.js → objectid-B16Lk1pC.js} +5 -5
- package/dist/{reward-DOggYNm3.js → reward-BH_1xbHQ.js} +1 -1
- package/dist/{rule-BQy3e3DE.js → rule-CbkzOdR3.js} +3 -3
- package/dist/{rule-builder-CPWmw5lP.js → rule-builder-WIEeIoXD.js} +1 -1
- package/dist/{template-Dprn2jD_.js → template-Dlo0YPQp.js} +4 -4
- package/dist/{trigger-BUY-zCBi.js → trigger-BMknrXKj.js} +4 -4
- package/dist/{usePagination-CEQLUMQ7.js → usePagination-B9K_XXDC.js} +1 -1
- package/dist/{user-DIK4sBIA.js → user-CuX5BIg5.js} +1 -1
- package/dist/{vue-i18n-B7ledd-g.js → vue-i18n-CrVlAF7z.js} +165 -165
- package/package.json +1 -1
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { defineComponent as ee, computed as E, resolveComponent as h, openBlock as g, createBlock as I, withCtx as T, createElementVNode as x, createElementBlock as D, createVNode as r, createCommentVNode as A, toDisplayString as j, unref as e, Fragment as
|
|
1
|
+
import { defineComponent as ee, computed as E, resolveComponent as h, openBlock as g, createBlock as I, withCtx as T, createElementVNode as x, createElementBlock as D, createVNode as r, createCommentVNode as A, toDisplayString as j, unref as e, Fragment as X, renderList as re, ref as R, isRef as oe, reactive as qe, onMounted as fe, watch as we, toRaw as He, createTextVNode as de, h as Ke } from "vue";
|
|
2
2
|
import { _ as We } from "./tier-BJDhpH6X.js";
|
|
3
3
|
import { useDialog as Ae, useDialogChild as Me, components as ze } from "@feedmepos/ui-library";
|
|
4
|
-
import { c as B, e as Ce, S as Ye } from "./index-
|
|
5
|
-
import { d as se, a as Je, p as he, u as Ee, n as Ge, f as Fe } from "./loading-
|
|
6
|
-
import { u as $e, C as me } from "./membership-
|
|
4
|
+
import { c as B, e as Ce, S as Ye } from "./index-BZg5tj39.js";
|
|
5
|
+
import { d as se, a as Je, p as he, u as Ee, n as Ge, f as Fe } from "./loading-E0zwe5lq.js";
|
|
6
|
+
import { u as $e, C as me } from "./membership-OECc9rWj.js";
|
|
7
7
|
import { a as Xe, c as Ne } from "./object-qECH92oz.js";
|
|
8
8
|
import { _ as ue } from "./lodash-B5I3zXaY.js";
|
|
9
|
-
import { u as be } from "./vue-i18n-
|
|
10
|
-
import { Z, g as
|
|
11
|
-
import { z as Q, R as Ze } from "./app-
|
|
12
|
-
import { m as Qe, n as et, o as tt, p as Oe, q as nt } from "./index-
|
|
9
|
+
import { u as be } from "./vue-i18n-CrVlAF7z.js";
|
|
10
|
+
import { Z, g as J, a as G } from "./zod-Bg2FbC-D.js";
|
|
11
|
+
import { z as Q, R as Ze } from "./app-B9MkUjRo.js";
|
|
12
|
+
import { m as Qe, n as et, o as tt, p as Oe, q as nt } from "./index-Dd0IgwOF.js";
|
|
13
13
|
import { u as xe } 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-Di6QPzfu.js";
|
|
15
15
|
import { J as ke } from "./JsonViewer-v8_C7l5N.js";
|
|
16
|
-
import { _ as ot } from "./index-
|
|
16
|
+
import { _ as ot } from "./index-DHb0pIVR.js";
|
|
17
17
|
import { _ as lt } from "./ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js";
|
|
18
18
|
import { _ as at } 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 "./index-
|
|
27
|
-
import { m as ut } from "./index-
|
|
28
|
-
import { m as _e } from "./index-
|
|
19
|
+
import { z as st, a as rt } from "./money-CVSdH00t.js";
|
|
20
|
+
import { F as it } from "./number-Iu6cix1k.js";
|
|
21
|
+
import { t as dt } from "./helper-Di0AEV1F.js";
|
|
22
|
+
import "./index-CDmiwLKd.js";
|
|
23
|
+
import "./index-BUjGxHkM.js";
|
|
24
|
+
import "./index-CVsuhUpe.js";
|
|
25
|
+
import "./index-BPkcvPHp.js";
|
|
26
|
+
import "./index-gYvuI9Nk.js";
|
|
27
|
+
import { m as ut } from "./index-Be9fjCVp.js";
|
|
28
|
+
import { m as _e } from "./index-D5LMqy6S.js";
|
|
29
29
|
import { useRouter as ct } from "vue-router";
|
|
30
30
|
function je(v) {
|
|
31
31
|
return se.DineroFactory(v).toUnit();
|
|
32
32
|
}
|
|
33
33
|
function mt(v, _, a, f, i = [], b = []) {
|
|
34
34
|
const o = ot.compact(
|
|
35
|
-
_.map((t) => v.find((
|
|
35
|
+
_.map((t) => v.find((c) => c.systemCode === t.systemCode && c.taxCode === t.taxCode)).filter((t) => !!t && b.includes(t.systemCode))
|
|
36
36
|
), m = o.reduce(
|
|
37
|
-
(t,
|
|
37
|
+
(t, c) => {
|
|
38
38
|
var y;
|
|
39
39
|
return Object.assign(t, {
|
|
40
|
-
[
|
|
41
|
-
inclusive: ((y = i.find((
|
|
40
|
+
[c.taxCode]: {
|
|
41
|
+
inclusive: ((y = i.find((d) => d.systemCode === c.systemCode)) == null ? void 0 : y.inclusive) || !1,
|
|
42
42
|
adjustment: {
|
|
43
43
|
level: 1,
|
|
44
44
|
type: {
|
|
45
45
|
type: "BY_MULTIPLIER",
|
|
46
46
|
amount: {
|
|
47
|
-
amount:
|
|
48
|
-
precision:
|
|
47
|
+
amount: c.rate.amount,
|
|
48
|
+
precision: c.rate.precision,
|
|
49
49
|
currency: "MYR"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -54,7 +54,7 @@ function mt(v, _, a, f, i = [], b = []) {
|
|
|
54
54
|
});
|
|
55
55
|
},
|
|
56
56
|
{}
|
|
57
|
-
),
|
|
57
|
+
), u = se.Calculator.calculate({
|
|
58
58
|
items: {
|
|
59
59
|
0: {
|
|
60
60
|
quantity: 1,
|
|
@@ -80,7 +80,7 @@ function mt(v, _, a, f, i = [], b = []) {
|
|
|
80
80
|
taxCode: t.taxCode,
|
|
81
81
|
rate: t.rate,
|
|
82
82
|
total: se.DineroFactory({
|
|
83
|
-
...
|
|
83
|
+
...u.items[0].taxes[t.taxCode]
|
|
84
84
|
}).convertPrecision(2).toObject()
|
|
85
85
|
}));
|
|
86
86
|
}
|
|
@@ -106,16 +106,16 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
106
106
|
`${B.Config.getCountry().currency.symbol}${je(a.bundle.price)}`
|
|
107
107
|
), a.bundle.coinPrice && o.push(`${a.bundle.coinPrice} point(s)`), o.join(" or ");
|
|
108
108
|
}), b = E(() => {
|
|
109
|
-
var m,
|
|
109
|
+
var m, u;
|
|
110
110
|
const o = [];
|
|
111
111
|
if (a.bundle.titles.length > 0 && o.push(`${a.bundle.titles.length} title(s)`), a.bundle.vouchers.length > 0 && o.push(`${a.bundle.vouchers.length} voucher(s)`), a.bundle.credit.normal || (m = a.bundle.credit.free) != null && m.amount) {
|
|
112
|
-
const t = a.bundle.credit.normal + (((
|
|
112
|
+
const t = a.bundle.credit.normal + (((u = a.bundle.credit.free) == null ? void 0 : u.amount) ?? 0);
|
|
113
113
|
o.push(`${t} credit(s)`);
|
|
114
114
|
}
|
|
115
115
|
return o;
|
|
116
116
|
});
|
|
117
117
|
return (o, m) => {
|
|
118
|
-
const
|
|
118
|
+
const u = h("FmIcon"), t = h("FmChip"), c = h("FmButton"), y = h("FmMenuItem"), d = h("FmMenu"), S = h("FmCard");
|
|
119
119
|
return g(), I(S, {
|
|
120
120
|
variant: "outlined",
|
|
121
121
|
class: "flex flex-col gap-y-8 p-16 min-h-[240px] h-full text-center items-center"
|
|
@@ -126,7 +126,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
126
126
|
key: 1,
|
|
127
127
|
src: v.bundle.image,
|
|
128
128
|
class: "w-full h-full object-contain aspect-video"
|
|
129
|
-
}, null, 8, ft)) : (g(), I(
|
|
129
|
+
}, null, 8, ft)) : (g(), I(u, {
|
|
130
130
|
key: 0,
|
|
131
131
|
name: "image",
|
|
132
132
|
outline: !0,
|
|
@@ -141,9 +141,9 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
141
141
|
})
|
|
142
142
|
])) : A("", !0),
|
|
143
143
|
x("div", gt, [
|
|
144
|
-
r(
|
|
144
|
+
r(d, { placement: "bottom-end" }, {
|
|
145
145
|
"menu-button": T(() => [
|
|
146
|
-
r(
|
|
146
|
+
r(c, {
|
|
147
147
|
icon: "more_vert",
|
|
148
148
|
variant: "tertiary"
|
|
149
149
|
})
|
|
@@ -177,7 +177,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
177
177
|
x("div", ht, j(v.bundle.name), 1),
|
|
178
178
|
x("div", _t, j(e(i) || "Free"), 1),
|
|
179
179
|
x("div", xt, [
|
|
180
|
-
(g(!0), D(
|
|
180
|
+
(g(!0), D(X, null, re(e(b), (l, F) => (g(), I(t, {
|
|
181
181
|
key: F,
|
|
182
182
|
label: l
|
|
183
183
|
}, null, 8, ["label"]))), 128))
|
|
@@ -200,7 +200,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
200
200
|
}, {
|
|
201
201
|
default: T(() => [
|
|
202
202
|
r(o, {
|
|
203
|
-
onClick: b[0] || (b[0] = (
|
|
203
|
+
onClick: b[0] || (b[0] = (u) => f("create")),
|
|
204
204
|
label: e(a)("connect.store.actions.addBundle"),
|
|
205
205
|
icon: "add",
|
|
206
206
|
variant: "secondary"
|
|
@@ -224,16 +224,16 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
224
224
|
},
|
|
225
225
|
setup(v) {
|
|
226
226
|
const { t: _ } = be(), a = v, f = Ae(), { emitData: i, emitAction: b } = Me(), o = R(a.initialValue), m = Q.string().min(1);
|
|
227
|
-
function
|
|
227
|
+
function u() {
|
|
228
228
|
i(o.value), b("primary"), f.close();
|
|
229
229
|
}
|
|
230
230
|
function t() {
|
|
231
231
|
i(null), b("primary"), f.close();
|
|
232
232
|
}
|
|
233
|
-
return (
|
|
234
|
-
const
|
|
233
|
+
return (c, y) => {
|
|
234
|
+
const d = h("FmTextField"), S = h("FmButton");
|
|
235
235
|
return g(), D("div", Vt, [
|
|
236
|
-
r(
|
|
236
|
+
r(d, {
|
|
237
237
|
modelValue: e(o),
|
|
238
238
|
"onUpdate:modelValue": y[0] || (y[0] = (l) => oe(o) ? o.value = l : null),
|
|
239
239
|
label: e(_)("connect.store.category.label"),
|
|
@@ -257,7 +257,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
257
257
|
r(S, {
|
|
258
258
|
label: v.action == "edit" ? e(_)("connect.common.edit") : e(_)("connect.common.add"),
|
|
259
259
|
disabled: !e(o),
|
|
260
|
-
onClick:
|
|
260
|
+
onClick: u
|
|
261
261
|
}, null, 8, ["label", "disabled"])
|
|
262
262
|
])
|
|
263
263
|
])
|
|
@@ -274,16 +274,16 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
274
274
|
}))
|
|
275
275
|
);
|
|
276
276
|
return (o, m) => {
|
|
277
|
-
const
|
|
277
|
+
const u = h("FmSelect"), t = h("FmButton");
|
|
278
278
|
return g(), D("div", kt, [
|
|
279
279
|
Pt,
|
|
280
|
-
r(
|
|
280
|
+
r(u, {
|
|
281
281
|
placeholder: "Select a category",
|
|
282
282
|
items: e(b),
|
|
283
283
|
modelValue: e(i),
|
|
284
284
|
"onUpdate:modelValue": [
|
|
285
|
-
m[0] || (m[0] = (
|
|
286
|
-
m[1] || (m[1] = (
|
|
285
|
+
m[0] || (m[0] = (c) => oe(i) ? i.value = c : null),
|
|
286
|
+
m[1] || (m[1] = (c) => e(_)(c))
|
|
287
287
|
],
|
|
288
288
|
label: "Category"
|
|
289
289
|
}, null, 8, ["items", "modelValue"]),
|
|
@@ -291,11 +291,11 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
291
291
|
r(t, {
|
|
292
292
|
variant: "tertiary",
|
|
293
293
|
label: "Cancel",
|
|
294
|
-
onClick: m[2] || (m[2] = (
|
|
294
|
+
onClick: m[2] || (m[2] = (c) => e(a)("tertiary"))
|
|
295
295
|
}),
|
|
296
296
|
r(t, {
|
|
297
297
|
label: "Select",
|
|
298
|
-
onClick: m[3] || (m[3] = (
|
|
298
|
+
onClick: m[3] || (m[3] = (c) => e(a)("primary")),
|
|
299
299
|
disabled: e(i) == null
|
|
300
300
|
}, null, 8, ["disabled"])
|
|
301
301
|
])
|
|
@@ -421,44 +421,44 @@ const Rt = {
|
|
|
421
421
|
emits: ["update:model-value"],
|
|
422
422
|
setup(v, { emit: _ }) {
|
|
423
423
|
const a = v, f = ne.taxSystem, i = _, b = R(a.modelValue);
|
|
424
|
-
function o(
|
|
425
|
-
const
|
|
426
|
-
S >= 0 ?
|
|
427
|
-
systemCode:
|
|
424
|
+
function o(c, y) {
|
|
425
|
+
const d = ue.clone(a.modelValue), S = d.findIndex((l) => l.systemCode === c);
|
|
426
|
+
S >= 0 ? d[S].inclusive = y : d.push({
|
|
427
|
+
systemCode: c,
|
|
428
428
|
inclusive: y
|
|
429
|
-
}), b.value =
|
|
429
|
+
}), b.value = d, i("update:model-value", d);
|
|
430
430
|
}
|
|
431
431
|
function m() {
|
|
432
|
-
return f.map((
|
|
433
|
-
const y = a.modelValue ? a.modelValue.find((
|
|
432
|
+
return f.map((c) => {
|
|
433
|
+
const y = a.modelValue ? a.modelValue.find((d) => d.systemCode === c.code) : !1;
|
|
434
434
|
return {
|
|
435
|
-
label:
|
|
435
|
+
label: c.name,
|
|
436
436
|
config: {
|
|
437
437
|
value: y ? y.inclusive : !1
|
|
438
438
|
},
|
|
439
|
-
input: (
|
|
440
|
-
o(
|
|
439
|
+
input: (d) => {
|
|
440
|
+
o(c.code, d);
|
|
441
441
|
}
|
|
442
442
|
};
|
|
443
443
|
});
|
|
444
444
|
}
|
|
445
|
-
const
|
|
446
|
-
function t(
|
|
447
|
-
return `${
|
|
445
|
+
const u = qe(m());
|
|
446
|
+
function t(c, y) {
|
|
447
|
+
return `${c} ${y ? "Inclusive" : "Exclusive"}`;
|
|
448
448
|
}
|
|
449
449
|
return fe(() => {
|
|
450
450
|
a.modelValue.length || o(f[0].code, !1);
|
|
451
451
|
}), we(
|
|
452
452
|
() => a.modelValue,
|
|
453
|
-
(
|
|
454
|
-
|
|
453
|
+
(c, y) => {
|
|
454
|
+
c != y && !c.length && o(f[0].code, !1);
|
|
455
455
|
}
|
|
456
|
-
), (
|
|
457
|
-
const
|
|
458
|
-
return g(!0), D(
|
|
456
|
+
), (c, y) => {
|
|
457
|
+
const d = h("FmSwitch");
|
|
458
|
+
return g(!0), D(X, null, re(e(u), (S, l) => {
|
|
459
459
|
var F;
|
|
460
460
|
return g(), D("div", { key: l }, [
|
|
461
|
-
r(
|
|
461
|
+
r(d, {
|
|
462
462
|
"model-value": ((F = e(b)[l]) == null ? void 0 : F.inclusive) || !1,
|
|
463
463
|
"label-placement": "left",
|
|
464
464
|
"onUpdate:modelValue": (w) => S.input(w)
|
|
@@ -495,15 +495,15 @@ const Bt = { class: "space-y-8" }, Nt = {
|
|
|
495
495
|
}) : o || f("update:modelValue", void 0));
|
|
496
496
|
});
|
|
497
497
|
const b = E(() => {
|
|
498
|
-
const o = Dt.mode === "development", m = B.Config.getCountry().code.toLowerCase(),
|
|
499
|
-
return `https://marketing${o ? "-dev" : ""}${
|
|
498
|
+
const o = Dt.mode === "development", m = B.Config.getCountry().code.toLowerCase(), u = m != "my" ? `.${m}` : "";
|
|
499
|
+
return `https://marketing${o ? "-dev" : ""}${u}.feedmeapi.com/stripe/${Ye.getBusinessId()}/webhook`;
|
|
500
500
|
});
|
|
501
501
|
return fe(() => {
|
|
502
502
|
i.value = !!a.modelValue;
|
|
503
503
|
}), (o, m) => {
|
|
504
|
-
const
|
|
504
|
+
const u = h("FmSwitch"), t = h("FmTextField"), c = h("FmButton");
|
|
505
505
|
return g(), D("div", Bt, [
|
|
506
|
-
r(
|
|
506
|
+
r(u, {
|
|
507
507
|
modelValue: e(i),
|
|
508
508
|
"onUpdate:modelValue": m[0] || (m[0] = (y) => oe(i) ? i.value = y : null),
|
|
509
509
|
value: "true",
|
|
@@ -523,7 +523,7 @@ const Bt = { class: "space-y-8" }, Nt = {
|
|
|
523
523
|
"helper-text": "Copy this URL to your Stripe dashboard"
|
|
524
524
|
}, {
|
|
525
525
|
append: T(() => [
|
|
526
|
-
r(
|
|
526
|
+
r(c, {
|
|
527
527
|
icon: "content_copy",
|
|
528
528
|
variant: "tertiary",
|
|
529
529
|
onClick: m[2] || (m[2] = (y) => e(Je)(e(b)))
|
|
@@ -552,7 +552,7 @@ const Bt = { class: "space-y-8" }, Nt = {
|
|
|
552
552
|
__name: "StoreSettingSheet",
|
|
553
553
|
emits: ["update"],
|
|
554
554
|
setup(v, { expose: _, emit: a }) {
|
|
555
|
-
const { t: f } = be(), i = a, b = R(!1), o = R(), m = R(!1),
|
|
555
|
+
const { t: f } = be(), i = a, b = R(!1), o = R(), m = R(!1), u = Qe.extend({
|
|
556
556
|
company: et.extend({
|
|
557
557
|
name: Q.string().min(1, "Company name is required"),
|
|
558
558
|
regNo: Q.string().min(1, "Registration number is required"),
|
|
@@ -567,9 +567,9 @@ const Bt = { class: "space-y-8" }, Nt = {
|
|
|
567
567
|
phoneNo: Q.string().min(1, "Phone number is required"),
|
|
568
568
|
sstRegNo: Q.string().optional()
|
|
569
569
|
})
|
|
570
|
-
}), t = E(() =>
|
|
571
|
-
function
|
|
572
|
-
const S =
|
|
570
|
+
}), t = E(() => u.safeParse(o.value).success);
|
|
571
|
+
function c() {
|
|
572
|
+
const S = u.safeParse(o.value);
|
|
573
573
|
S.success && i("update", S.data);
|
|
574
574
|
}
|
|
575
575
|
function y() {
|
|
@@ -591,11 +591,11 @@ const Bt = { class: "space-y-8" }, Nt = {
|
|
|
591
591
|
inclusiveTaxes: []
|
|
592
592
|
};
|
|
593
593
|
}
|
|
594
|
-
function
|
|
594
|
+
function d(S, l) {
|
|
595
595
|
b.value = S, S && (o.value = l != null && l.company ? l : y());
|
|
596
596
|
}
|
|
597
597
|
return _({
|
|
598
|
-
showSheet:
|
|
598
|
+
showSheet: d,
|
|
599
599
|
data: o
|
|
600
600
|
}), (S, l) => {
|
|
601
601
|
const F = h("FmIcon"), w = h("FmMenuItem"), N = h("FmMenu"), W = h("FmSelect"), Y = h("FmButton"), L = h("FmSideSheet");
|
|
@@ -609,13 +609,13 @@ const Bt = { class: "space-y-8" }, Nt = {
|
|
|
609
609
|
x("div", Yt, [
|
|
610
610
|
r(Y, {
|
|
611
611
|
label: e(f)("connect.common.save"),
|
|
612
|
-
onClick:
|
|
612
|
+
onClick: c,
|
|
613
613
|
disabled: !e(t) || e(xe)().isLoading,
|
|
614
614
|
loading: e(xe)().isLoading
|
|
615
615
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
616
616
|
r(Y, {
|
|
617
617
|
label: e(f)("connect.common.cancel"),
|
|
618
|
-
onClick: l[14] || (l[14] = (z) =>
|
|
618
|
+
onClick: l[14] || (l[14] = (z) => d(!1)),
|
|
619
619
|
variant: "tertiary"
|
|
620
620
|
}, null, 8, ["label"])
|
|
621
621
|
])
|
|
@@ -630,13 +630,13 @@ const Bt = { class: "space-y-8" }, Nt = {
|
|
|
630
630
|
modelValue: e(o).company.name,
|
|
631
631
|
"onUpdate:modelValue": l[0] || (l[0] = (s) => e(o).company.name = s),
|
|
632
632
|
label: e(f)("connect.store.setting.company.name"),
|
|
633
|
-
schema: e(Z).typeAtPath(e(
|
|
633
|
+
schema: e(Z).typeAtPath(e(u), "company.name")
|
|
634
634
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
635
635
|
r(te, {
|
|
636
636
|
modelValue: e(o).company.regNo,
|
|
637
637
|
"onUpdate:modelValue": l[1] || (l[1] = (s) => e(o).company.regNo = s),
|
|
638
638
|
label: e(f)("connect.store.setting.company.reg_no"),
|
|
639
|
-
schema: e(Z).typeAtPath(e(
|
|
639
|
+
schema: e(Z).typeAtPath(e(u), "company.regNo")
|
|
640
640
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
641
641
|
e(B.Config).getCountry().taxSystems.length ? (g(), I(te, {
|
|
642
642
|
key: 0,
|
|
@@ -646,7 +646,7 @@ const Bt = { class: "space-y-8" }, Nt = {
|
|
|
646
646
|
l[3] || (l[3] = (s) => s ? null : e(o).inclusiveTaxes = [])
|
|
647
647
|
],
|
|
648
648
|
label: e(f)("connect.store.setting.company.tax_reg_no"),
|
|
649
|
-
schema: e(Z).typeAtPath(e(
|
|
649
|
+
schema: e(Z).typeAtPath(e(u), "company.sstRegNo")
|
|
650
650
|
}, null, 8, ["modelValue", "label", "schema"])) : A("", !0),
|
|
651
651
|
(z = e(o).company) != null && z.sstRegNo && e(o).inclusiveTaxes ? (g(), D("div", Et, [
|
|
652
652
|
x("div", jt, j(e(f)("connect.store.setting.company.tax")), 1),
|
|
@@ -659,33 +659,33 @@ const Bt = { class: "space-y-8" }, Nt = {
|
|
|
659
659
|
modelValue: e(o).company.phoneNo,
|
|
660
660
|
"onUpdate:modelValue": l[5] || (l[5] = (s) => e(o).company.phoneNo = s),
|
|
661
661
|
label: e(f)("connect.store.setting.company.phone"),
|
|
662
|
-
schema: e(Z).typeAtPath(e(
|
|
662
|
+
schema: e(Z).typeAtPath(e(u), "company.phoneNo")
|
|
663
663
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
664
664
|
x("div", Lt, j(e(f)("connect.store.setting.company.address.title")), 1),
|
|
665
665
|
r(te, {
|
|
666
666
|
modelValue: e(o).company.address.line1,
|
|
667
667
|
"onUpdate:modelValue": l[6] || (l[6] = (s) => e(o).company.address.line1 = s),
|
|
668
668
|
label: e(f)("connect.store.setting.company.address.line1"),
|
|
669
|
-
schema: e(Z).typeAtPath(e(
|
|
669
|
+
schema: e(Z).typeAtPath(e(u), "company.address.line1")
|
|
670
670
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
671
671
|
r(te, {
|
|
672
672
|
modelValue: e(o).company.address.line2,
|
|
673
673
|
"onUpdate:modelValue": l[7] || (l[7] = (s) => e(o).company.address.line2 = s),
|
|
674
674
|
label: e(f)("connect.store.setting.company.address.line2"),
|
|
675
|
-
schema: e(Z).typeAtPath(e(
|
|
675
|
+
schema: e(Z).typeAtPath(e(u), "company.address.line2")
|
|
676
676
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
677
677
|
x("div", qt, [
|
|
678
678
|
r(te, {
|
|
679
679
|
modelValue: e(o).company.address.city,
|
|
680
680
|
"onUpdate:modelValue": l[8] || (l[8] = (s) => e(o).company.address.city = s),
|
|
681
681
|
label: e(f)("connect.store.setting.company.address.city"),
|
|
682
|
-
schema: e(Z).typeAtPath(e(
|
|
682
|
+
schema: e(Z).typeAtPath(e(u), "company.address.city")
|
|
683
683
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
684
684
|
r(te, {
|
|
685
685
|
modelValue: e(o).company.address.postcode,
|
|
686
686
|
"onUpdate:modelValue": l[9] || (l[9] = (s) => e(o).company.address.postcode = s),
|
|
687
687
|
label: e(f)("connect.store.setting.company.address.postcode"),
|
|
688
|
-
schema: e(Z).typeAtPath(e(
|
|
688
|
+
schema: e(Z).typeAtPath(e(u), "company.address.postcode")
|
|
689
689
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
690
690
|
x("div", Ht, [
|
|
691
691
|
x("div", Kt, j(e(f)("connect.store.setting.company.address.state")), 1),
|
|
@@ -697,7 +697,7 @@ const Bt = { class: "space-y-8" }, Nt = {
|
|
|
697
697
|
r(te, {
|
|
698
698
|
modelValue: e(o).company.address.state,
|
|
699
699
|
"onUpdate:modelValue": l[10] || (l[10] = (s) => e(o).company.address.state = s),
|
|
700
|
-
schema: e(Z).typeAtPath(e(
|
|
700
|
+
schema: e(Z).typeAtPath(e(u), "company.address.state"),
|
|
701
701
|
onFocusChanged: l[11] || (l[11] = (s) => m.value = s)
|
|
702
702
|
}, {
|
|
703
703
|
append: T(() => [
|
|
@@ -709,7 +709,7 @@ const Bt = { class: "space-y-8" }, Nt = {
|
|
|
709
709
|
}, 8, ["modelValue", "schema"])
|
|
710
710
|
]),
|
|
711
711
|
default: T(() => [
|
|
712
|
-
(g(!0), D(
|
|
712
|
+
(g(!0), D(X, null, re(e(Rt)[e(B.Config).getCountry().code].stateItems.filter(
|
|
713
713
|
(s) => {
|
|
714
714
|
var $, U;
|
|
715
715
|
return s.label.toLowerCase().includes(((U = ($ = e(o)) == null ? void 0 : $.company) == null ? void 0 : U.address.state.toLowerCase()) ?? "");
|
|
@@ -736,7 +736,7 @@ const Bt = { class: "space-y-8" }, Nt = {
|
|
|
736
736
|
value: e(B.Config).getCountry().name
|
|
737
737
|
}
|
|
738
738
|
],
|
|
739
|
-
rules: [e(Z).ruleAtPath(e(
|
|
739
|
+
rules: [e(Z).ruleAtPath(e(u), "company.address.country")]
|
|
740
740
|
}, null, 8, ["label", "modelValue", "items", "rules"])
|
|
741
741
|
]),
|
|
742
742
|
x("div", Wt, [
|
|
@@ -771,13 +771,13 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
771
771
|
const a = v, f = _;
|
|
772
772
|
fe(() => {
|
|
773
773
|
if (o.value.length !== b.value.length) {
|
|
774
|
-
const t = b.value.reduce((
|
|
775
|
-
const
|
|
776
|
-
if (!
|
|
777
|
-
const { systemCode: S, taxCode: l } =
|
|
778
|
-
return y.value ||
|
|
774
|
+
const t = b.value.reduce((c, y) => {
|
|
775
|
+
const d = ne.systemDefaultCode(y.name);
|
|
776
|
+
if (!d) return c;
|
|
777
|
+
const { systemCode: S, taxCode: l } = d;
|
|
778
|
+
return y.value || c.push({ systemCode: S, taxCode: l }), c;
|
|
779
779
|
}, []);
|
|
780
|
-
|
|
780
|
+
u(t);
|
|
781
781
|
}
|
|
782
782
|
});
|
|
783
783
|
function i() {
|
|
@@ -786,49 +786,49 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
786
786
|
const b = E(() => i().map((t) => ({
|
|
787
787
|
name: t.code,
|
|
788
788
|
value: (o.value || []).find(
|
|
789
|
-
(
|
|
789
|
+
(c) => t.options.some((y) => y.feedmeTaxCode === c)
|
|
790
790
|
),
|
|
791
|
-
options: t.options.map((
|
|
792
|
-
label: `${
|
|
793
|
-
value:
|
|
791
|
+
options: t.options.map((c) => ({
|
|
792
|
+
label: `${c.name} (${it(c.rate)}%)`,
|
|
793
|
+
value: c.feedmeTaxCode
|
|
794
794
|
}))
|
|
795
795
|
}))), o = E(() => a.modelValue.map((t) => ne.generateCode(t)));
|
|
796
796
|
function m(t) {
|
|
797
|
-
const
|
|
797
|
+
const c = i().find(
|
|
798
798
|
(l) => l.options.some((F) => F.feedmeTaxCode === t)
|
|
799
|
-
), y =
|
|
799
|
+
), y = c == null ? void 0 : c.options.find((l) => l.feedmeTaxCode === t);
|
|
800
800
|
if (!y) return;
|
|
801
|
-
const { systemCode:
|
|
802
|
-
|
|
801
|
+
const { systemCode: d, taxCode: S } = y;
|
|
802
|
+
u([{ systemCode: d, taxCode: S }]);
|
|
803
803
|
}
|
|
804
|
-
function
|
|
805
|
-
const
|
|
804
|
+
function u(t) {
|
|
805
|
+
const c = ue.clone(a.modelValue);
|
|
806
806
|
t.forEach((y) => {
|
|
807
|
-
const
|
|
807
|
+
const d = i().find(
|
|
808
808
|
(F) => F.options.some((w) => w.feedmeTaxCode === ne.generateCode(y))
|
|
809
|
-
), S = (
|
|
809
|
+
), S = (d == null ? void 0 : d.options) || [], l = c.findIndex(
|
|
810
810
|
(F) => S.some((w) => ne.generateCode(w) === ne.generateCode(F))
|
|
811
811
|
);
|
|
812
|
-
l >= 0 ?
|
|
813
|
-
}), f("update:modelValue",
|
|
812
|
+
l >= 0 ? c.splice(l, 1, y) : c.push(y);
|
|
813
|
+
}), f("update:modelValue", c);
|
|
814
814
|
}
|
|
815
|
-
return (t,
|
|
816
|
-
const y = h("FmRadio"),
|
|
817
|
-
return g(!0), D(
|
|
815
|
+
return (t, c) => {
|
|
816
|
+
const y = h("FmRadio"), d = h("FmRadioGroup");
|
|
817
|
+
return g(!0), D(X, null, re(e(b), (S) => (g(), D("div", {
|
|
818
818
|
key: S.name,
|
|
819
819
|
class: "flex items-start"
|
|
820
820
|
}, [
|
|
821
|
-
r(
|
|
821
|
+
r(d, {
|
|
822
822
|
modelValue: S.value,
|
|
823
823
|
"onUpdate:modelValue": [
|
|
824
824
|
(l) => S.value = l,
|
|
825
|
-
|
|
825
|
+
c[0] || (c[0] = (l) => {
|
|
826
826
|
m(l);
|
|
827
827
|
})
|
|
828
828
|
]
|
|
829
829
|
}, {
|
|
830
830
|
default: T(() => [
|
|
831
|
-
(g(!0), D(
|
|
831
|
+
(g(!0), D(X, null, re(S.options, (l, F) => (g(), I(y, {
|
|
832
832
|
key: F,
|
|
833
833
|
value: l.value,
|
|
834
834
|
label: l.label
|
|
@@ -869,11 +869,11 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
869
869
|
__name: "EditBundleSheet",
|
|
870
870
|
emits: ["update"],
|
|
871
871
|
setup(v, { expose: _, emit: a }) {
|
|
872
|
-
const f = a, { t: i } = be(), b = $e(), o = R(!1), m = R([]),
|
|
872
|
+
const f = a, { t: i } = be(), b = $e(), o = R(!1), m = R([]), u = R({
|
|
873
873
|
category: 0,
|
|
874
874
|
index: -1,
|
|
875
875
|
originalCategoryIndex: void 0
|
|
876
|
-
}), t = R(ue.cloneDeep(Se)),
|
|
876
|
+
}), t = R(ue.cloneDeep(Se)), c = R(), y = Oe, d = E(() => {
|
|
877
877
|
const p = y.safeParse(t.value);
|
|
878
878
|
return p.success ? [] : p.error.errors;
|
|
879
879
|
}), S = [
|
|
@@ -904,6 +904,10 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
904
904
|
},
|
|
905
905
|
modelValue: ((C = n.selectedReward) == null ? void 0 : C.extra) ?? 0,
|
|
906
906
|
appendText: "day(s)",
|
|
907
|
+
helperState: J(d.value, "titles"),
|
|
908
|
+
helperText: G(d.value, "titles"),
|
|
909
|
+
max: 9999,
|
|
910
|
+
rules: [(P) => P <= 9999 || "Maximum 9999 days allowed"],
|
|
907
911
|
showSteppers: !1,
|
|
908
912
|
disabled: !!t.value.stripePriceId
|
|
909
913
|
});
|
|
@@ -993,27 +997,27 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
993
997
|
return ue.cloneDeep(Se);
|
|
994
998
|
}
|
|
995
999
|
function O(p, n) {
|
|
996
|
-
o.value = p, p && n && (
|
|
1000
|
+
o.value = p, p && n && (c.value = void 0, m.value = n.categories, t.value = n.bundle || k(), u.value.category = n.category, u.value.index = n.index, u.value.originalCategoryIndex = n.category, L.value = F.value.reduce((C, P, q) => (C[q] = !!P.selectedReward, C), {}));
|
|
997
1001
|
}
|
|
998
1002
|
return _({
|
|
999
1003
|
showSheet: O,
|
|
1000
|
-
bundleImage:
|
|
1001
|
-
target:
|
|
1004
|
+
bundleImage: c,
|
|
1005
|
+
target: u,
|
|
1002
1006
|
data: t
|
|
1003
1007
|
}), (p, n) => {
|
|
1004
1008
|
const C = h("FmSwitch"), P = h("FmHelperText"), q = h("FmTextField"), K = h("FmSelect"), H = h("FmStepperField"), ie = h("FmMenuItem"), ge = h("FmTable"), ce = h("FmButton"), ve = h("FmSideSheet");
|
|
1005
1009
|
return g(), I(ve, {
|
|
1006
|
-
"max-width":
|
|
1010
|
+
"max-width": 768,
|
|
1007
1011
|
modelValue: e(o),
|
|
1008
1012
|
"onUpdate:modelValue": n[20] || (n[20] = (ae) => oe(o) ? o.value = ae : null),
|
|
1009
|
-
header: e(
|
|
1013
|
+
header: e(u).index != -1 ? e(i)("connect.store.bundle.edit.title") : e(i)("connect.store.bundle.edit.create")
|
|
1010
1014
|
}, {
|
|
1011
1015
|
"side-sheet-footer": T(() => [
|
|
1012
1016
|
x("div", cn, [
|
|
1013
1017
|
r(ce, {
|
|
1014
|
-
label: e(
|
|
1018
|
+
label: e(u).index != -1 ? "Save" : "Add",
|
|
1015
1019
|
onClick: M,
|
|
1016
|
-
disabled: e(
|
|
1020
|
+
disabled: e(d).length > 0,
|
|
1017
1021
|
loading: e(xe)().isLoading
|
|
1018
1022
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
1019
1023
|
r(ce, {
|
|
@@ -1050,12 +1054,12 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1050
1054
|
label: e(i)("connect.store.bundle.edit.bundleName"),
|
|
1051
1055
|
modelValue: e(t).name,
|
|
1052
1056
|
"onUpdate:modelValue": n[1] || (n[1] = (V) => e(t).name = V),
|
|
1053
|
-
"helper-state": e(
|
|
1054
|
-
"helper-text": e(
|
|
1057
|
+
"helper-state": e(J)(e(d), "name"),
|
|
1058
|
+
"helper-text": e(G)(e(d), "name")
|
|
1055
1059
|
}, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
|
|
1056
1060
|
r(K, {
|
|
1057
|
-
modelValue: e(
|
|
1058
|
-
"onUpdate:modelValue": n[2] || (n[2] = (V) => e(
|
|
1061
|
+
modelValue: e(u).category,
|
|
1062
|
+
"onUpdate:modelValue": n[2] || (n[2] = (V) => e(u).category = V),
|
|
1059
1063
|
label: "Store Category",
|
|
1060
1064
|
items: e(m).map((V, Le) => ({ label: V, value: Le }))
|
|
1061
1065
|
}, null, 8, ["modelValue", "items"]),
|
|
@@ -1064,12 +1068,12 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1064
1068
|
class: "w-1/2 xs:w-2/3",
|
|
1065
1069
|
"aspect-ratio": "16/9",
|
|
1066
1070
|
thumbnail: e(t).image ?? void 0,
|
|
1067
|
-
file: e(
|
|
1071
|
+
file: e(c) ?? void 0,
|
|
1068
1072
|
"onUpdate:file": n[3] || (n[3] = (V) => {
|
|
1069
|
-
|
|
1073
|
+
c.value = V;
|
|
1070
1074
|
}),
|
|
1071
|
-
"helper-state": e(
|
|
1072
|
-
"helper-text": e(
|
|
1075
|
+
"helper-state": e(J)(e(d), "image"),
|
|
1076
|
+
"helper-text": e(G)(e(d), "image")
|
|
1073
1077
|
}, null, 8, ["label", "thumbnail", "file", "helper-state", "helper-text"]),
|
|
1074
1078
|
r(H, {
|
|
1075
1079
|
"model-value": e(B.Dinero).fromFdoDinero(e(t).price).toUnit(),
|
|
@@ -1081,8 +1085,8 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1081
1085
|
}),
|
|
1082
1086
|
"is-currency": !0,
|
|
1083
1087
|
"show-steppers": !1,
|
|
1084
|
-
"helper-text": e(
|
|
1085
|
-
"helper-state": e(
|
|
1088
|
+
"helper-text": e(G)(e(d), "price") || `${e(B.Dinero).fromNumber({ number: 1 }).toFormat(!0)} = ${e(B.Dinero).fromNumber({ number: 1 }).toUnit()} credit`,
|
|
1089
|
+
"helper-state": e(J)(e(d), "price")
|
|
1086
1090
|
}, {
|
|
1087
1091
|
prepend: T(() => [
|
|
1088
1092
|
de(j(e(B.Dinero).defaultCurrency()), 1)
|
|
@@ -1099,8 +1103,8 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1099
1103
|
}),
|
|
1100
1104
|
"is-currency": !0,
|
|
1101
1105
|
"show-steppers": !1,
|
|
1102
|
-
"helper-text": e(
|
|
1103
|
-
"helper-state": e(
|
|
1106
|
+
"helper-text": e(G)(e(d), "originalPrice") || e(i)("connect.store.bundle.edit.originalPriceHelper"),
|
|
1107
|
+
"helper-state": e(J)(e(d), "originalPrice")
|
|
1104
1108
|
}, {
|
|
1105
1109
|
prepend: T(() => [
|
|
1106
1110
|
de(j(e(B.Dinero).defaultCurrency()), 1)
|
|
@@ -1116,22 +1120,22 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1116
1120
|
V > 0 && e(t).credit.normal > 0 && (e(t).credit.normal = 0), e(t).coinPrice = V;
|
|
1117
1121
|
}),
|
|
1118
1122
|
"show-steppers": !1,
|
|
1119
|
-
"helper-state": e(
|
|
1120
|
-
"helper-text": e(
|
|
1123
|
+
"helper-state": e(J)(e(d), "coinPrice"),
|
|
1124
|
+
"helper-text": e(G)(e(d), "coinPrice")
|
|
1121
1125
|
}, {
|
|
1122
1126
|
append: T(() => [
|
|
1123
1127
|
de(" point(s) ")
|
|
1124
1128
|
]),
|
|
1125
1129
|
_: 1
|
|
1126
1130
|
}, 8, ["model-value", "label", "helper-state", "helper-text"])),
|
|
1127
|
-
(Te = e(b).storeOption) != null && Te.stripe && !e(t).isFeedvibe ? (g(), D(
|
|
1131
|
+
(Te = e(b).storeOption) != null && Te.stripe && !e(t).isFeedvibe ? (g(), D(X, { key: 1 }, [
|
|
1128
1132
|
x("div", tn, j(e(i)("connect.store.bundle.edit.subscriptionSettings")), 1),
|
|
1129
1133
|
r(q, {
|
|
1130
1134
|
label: e(i)("connect.store.bundle.edit.stripePriceId"),
|
|
1131
1135
|
modelValue: e(t).stripePriceId,
|
|
1132
1136
|
"onUpdate:modelValue": n[7] || (n[7] = (V) => e(t).stripePriceId = V),
|
|
1133
|
-
"helper-state": e(
|
|
1134
|
-
"helper-text": e(
|
|
1137
|
+
"helper-state": e(J)(e(d), "stripePriceId"),
|
|
1138
|
+
"helper-text": e(G)(e(d), "stripePriceId")
|
|
1135
1139
|
}, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
|
|
1136
1140
|
e(t).stripePriceId ? (g(), I(H, {
|
|
1137
1141
|
key: 0,
|
|
@@ -1140,19 +1144,19 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1140
1144
|
"onUpdate:modelValue": W,
|
|
1141
1145
|
label: e(i)("connect.store.bundle.edit.subscriptionValidity"),
|
|
1142
1146
|
"show-steppers": !1,
|
|
1143
|
-
"helper-state": e(
|
|
1144
|
-
"helper-text": e(
|
|
1147
|
+
"helper-state": e(J)(e(d), "subscriptionValidity"),
|
|
1148
|
+
"helper-text": e(G)(e(d), "subscriptionValidity")
|
|
1145
1149
|
}, null, 8, ["model-value", "label", "helper-state", "helper-text"])) : A("", !0)
|
|
1146
1150
|
], 64)) : A("", !0),
|
|
1147
|
-
e(t).isFeedvibe ? A("", !0) : (g(), D(
|
|
1151
|
+
e(t).isFeedvibe ? A("", !0) : (g(), D(X, { key: 2 }, [
|
|
1148
1152
|
nn,
|
|
1149
1153
|
r(H, {
|
|
1150
1154
|
modelValue: e(t).credit.normal,
|
|
1151
1155
|
"onUpdate:modelValue": n[8] || (n[8] = (V) => e(t).credit.normal = V),
|
|
1152
1156
|
label: "Normal credit",
|
|
1153
1157
|
"show-steppers": !1,
|
|
1154
|
-
"helper-state": e(
|
|
1155
|
-
"helper-text": e(
|
|
1158
|
+
"helper-state": e(J)(e(d), "credit.normal"),
|
|
1159
|
+
"helper-text": e(G)(e(d), "credit.normal")
|
|
1156
1160
|
}, {
|
|
1157
1161
|
append: T(() => [
|
|
1158
1162
|
de(" credit ")
|
|
@@ -1170,8 +1174,8 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1170
1174
|
}),
|
|
1171
1175
|
label: "Free credit",
|
|
1172
1176
|
"show-steppers": !1,
|
|
1173
|
-
"helper-state": e(
|
|
1174
|
-
"helper-text": e(
|
|
1177
|
+
"helper-state": e(J)(e(d), "credit.free.amount"),
|
|
1178
|
+
"helper-text": e(G)(e(d), "credit.free.amount")
|
|
1175
1179
|
}, {
|
|
1176
1180
|
append: T(() => [
|
|
1177
1181
|
de(" credit ")
|
|
@@ -1191,8 +1195,8 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1191
1195
|
}),
|
|
1192
1196
|
label: "Free credit valid for",
|
|
1193
1197
|
"show-steppers": !1,
|
|
1194
|
-
"helper-state": e(
|
|
1195
|
-
"helper-text": e(
|
|
1198
|
+
"helper-state": e(J)(e(d), "credit.free.day"),
|
|
1199
|
+
"helper-text": e(G)(e(d), "credit.free.day")
|
|
1196
1200
|
}, {
|
|
1197
1201
|
append: T(() => [
|
|
1198
1202
|
de(" day(s) ")
|
|
@@ -1200,7 +1204,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1200
1204
|
_: 1
|
|
1201
1205
|
}, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : A("", !0)
|
|
1202
1206
|
], 64)),
|
|
1203
|
-
e(z) ? (g(), D(
|
|
1207
|
+
e(z) ? (g(), D(X, { key: 3 }, [
|
|
1204
1208
|
on,
|
|
1205
1209
|
r(Xt, {
|
|
1206
1210
|
modelValue: e(t).taxes,
|
|
@@ -1265,8 +1269,8 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1265
1269
|
"hide-footer": e(F).length <= 10
|
|
1266
1270
|
}, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"]),
|
|
1267
1271
|
r(P, {
|
|
1268
|
-
text: e(
|
|
1269
|
-
state: e(
|
|
1272
|
+
text: e(G)(e(d), "titles"),
|
|
1273
|
+
state: e(J)(e(d), "titles")
|
|
1270
1274
|
}, null, 8, ["text", "state"])
|
|
1271
1275
|
]),
|
|
1272
1276
|
x("div", dn, j(e(i)("connect.store.bundle.edit.advanceSetting")), 1),
|
|
@@ -1304,15 +1308,15 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1304
1308
|
__name: "SendBundleSheet",
|
|
1305
1309
|
emits: ["success"],
|
|
1306
1310
|
setup(v, { expose: _, emit: a }) {
|
|
1307
|
-
const { minor: f } = Ee, i = R(), b = R(""), o = R(""), m = R([]),
|
|
1311
|
+
const { minor: f } = Ee, i = R(), b = R(""), o = R(""), m = R([]), u = R(!1), t = R();
|
|
1308
1312
|
R(!0);
|
|
1309
|
-
function
|
|
1310
|
-
|
|
1313
|
+
function c(F) {
|
|
1314
|
+
u.value = !0, b.value = null, o.value = "", i.value = F.bundle;
|
|
1311
1315
|
}
|
|
1312
1316
|
function y() {
|
|
1313
|
-
|
|
1317
|
+
u.value = !1;
|
|
1314
1318
|
}
|
|
1315
|
-
async function
|
|
1319
|
+
async function d(F) {
|
|
1316
1320
|
const w = await ut.read({
|
|
1317
1321
|
limit: 25,
|
|
1318
1322
|
skip: 0,
|
|
@@ -1360,20 +1364,20 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1360
1364
|
), (W = i.value) != null && W.coinPrice && F.push(`${i.value.coinPrice} point(s)`), F.join(" or ");
|
|
1361
1365
|
});
|
|
1362
1366
|
return _({
|
|
1363
|
-
showSheet:
|
|
1367
|
+
showSheet: c,
|
|
1364
1368
|
hideSheet: y
|
|
1365
1369
|
}), fe(async () => {
|
|
1366
|
-
await
|
|
1370
|
+
await d("");
|
|
1367
1371
|
}), (F, w) => {
|
|
1368
1372
|
const N = h("FmCardMedia"), W = h("FmCardHeader"), Y = h("FmChip"), L = h("FmCardSection"), z = h("FmCard"), le = h("FmSelect"), s = h("FmTextField"), $ = h("FmForm"), U = h("FmButton"), M = h("FmSideSheet");
|
|
1369
1373
|
return g(), I(M, {
|
|
1370
1374
|
"max-width": 560,
|
|
1371
1375
|
"dismiss-away": !0,
|
|
1372
1376
|
header: "Send bundle to member",
|
|
1373
|
-
modelValue: e(
|
|
1377
|
+
modelValue: e(u),
|
|
1374
1378
|
"onUpdate:modelValue": [
|
|
1375
|
-
w[4] || (w[4] = (k) => oe(
|
|
1376
|
-
w[5] || (w[5] = (k) =>
|
|
1379
|
+
w[4] || (w[4] = (k) => oe(u) ? u.value = k : null),
|
|
1380
|
+
w[5] || (w[5] = (k) => u.value = k)
|
|
1377
1381
|
]
|
|
1378
1382
|
}, {
|
|
1379
1383
|
"side-sheet-footer": T(() => [
|
|
@@ -1390,7 +1394,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1390
1394
|
label: "Cancel",
|
|
1391
1395
|
type: "button",
|
|
1392
1396
|
variant: "tertiary",
|
|
1393
|
-
onClick: w[3] || (w[3] = (k) =>
|
|
1397
|
+
onClick: w[3] || (w[3] = (k) => u.value = !1)
|
|
1394
1398
|
})
|
|
1395
1399
|
])
|
|
1396
1400
|
]),
|
|
@@ -1465,7 +1469,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1465
1469
|
label: "Select member",
|
|
1466
1470
|
searchable: "",
|
|
1467
1471
|
items: e(m),
|
|
1468
|
-
onSearch:
|
|
1472
|
+
onSearch: d,
|
|
1469
1473
|
rules: [(k) => !!k > 0 || "Member is required"],
|
|
1470
1474
|
"helper-text": "Type to search member"
|
|
1471
1475
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
@@ -1509,16 +1513,16 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1509
1513
|
value: "create_category",
|
|
1510
1514
|
isPrimary: !0,
|
|
1511
1515
|
prependIcon: "add"
|
|
1512
|
-
}, o = R(), m = ct(),
|
|
1516
|
+
}, o = R(), m = ct(), u = $e(), { global: t, minor: c } = Ee, y = Ae(), d = E(() => u.sortedStoreCategories), S = E(() => u.sortedStoreCategories.map((s) => s.name)), l = R(), F = R();
|
|
1513
1517
|
async function w(s) {
|
|
1514
1518
|
var $;
|
|
1515
|
-
s === "setting" ? ($ = l.value) == null || $.showSheet(!0,
|
|
1519
|
+
s === "setting" ? ($ = l.value) == null || $.showSheet(!0, u.storeOption) : s === "create_category" ? W(-1) : s === "create_reward" ? await m.push({ name: Ze["$connect-STORE_REWARDS"] }) : s == "payout" && window.open(bn.paymentPortalUrl, "_blank");
|
|
1516
1520
|
}
|
|
1517
1521
|
async function N(s) {
|
|
1518
|
-
await
|
|
1522
|
+
await c(
|
|
1519
1523
|
async () => {
|
|
1520
1524
|
var $;
|
|
1521
|
-
await _e.updateStore(s), await
|
|
1525
|
+
await _e.updateStore(s), await u.readMemberStore(), ($ = l.value) == null || $.showSheet(!1);
|
|
1522
1526
|
},
|
|
1523
1527
|
{
|
|
1524
1528
|
message: a("connect.store.setting.update.message"),
|
|
@@ -1528,7 +1532,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1528
1532
|
}
|
|
1529
1533
|
async function W(s = -1) {
|
|
1530
1534
|
var $, U;
|
|
1531
|
-
if ((!
|
|
1535
|
+
if ((!u.storeOption || !u.storeOption.company) && await he.confirm(
|
|
1532
1536
|
a("connect.store.category.setup.title"),
|
|
1533
1537
|
a("connect.store.category.setup.button"),
|
|
1534
1538
|
a("connect.store.category.setup.action"),
|
|
@@ -1539,19 +1543,19 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1539
1543
|
title: s == -1 ? a("connect.store.category.add") : a("connect.store.category.edit"),
|
|
1540
1544
|
contentComponent: $t,
|
|
1541
1545
|
contentComponentProps: {
|
|
1542
|
-
initialValue: ((U =
|
|
1546
|
+
initialValue: ((U = d.value[s]) == null ? void 0 : U.name) ?? "",
|
|
1543
1547
|
action: s == -1 ? "add" : "edit"
|
|
1544
1548
|
}
|
|
1545
1549
|
}).onPrimary(async (M) => {
|
|
1546
1550
|
M === null && !await he.remove(
|
|
1547
1551
|
a("connect.store.category.remove.confirm"),
|
|
1548
1552
|
a("connect.store.category.remove.title")
|
|
1549
|
-
) || await
|
|
1553
|
+
) || await c(
|
|
1550
1554
|
async () => {
|
|
1551
|
-
const k = s == -1 ? [...
|
|
1555
|
+
const k = s == -1 ? [...d.value, { name: M, bundles: [] }] : [...d.value].map((O, p) => p == s ? { ...O, name: M } : O).filter((O) => O.name !== null);
|
|
1552
1556
|
await _e.updateStoreBundle({
|
|
1553
1557
|
categories: k
|
|
1554
|
-
}), await
|
|
1558
|
+
}), await u.readMemberStore();
|
|
1555
1559
|
},
|
|
1556
1560
|
{
|
|
1557
1561
|
message: M === null ? a("connect.store.category.update.deleting") : s == -1 ? a("connect.store.category.update.creating") : a("connect.store.category.update.updating"),
|
|
@@ -1563,7 +1567,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1563
1567
|
async function Y(s, $, U, M) {
|
|
1564
1568
|
var p, n, C;
|
|
1565
1569
|
$ ?? ($ = (p = F.value) == null ? void 0 : p.target.category), U ?? (U = (n = F.value) == null ? void 0 : n.target.index), M ?? (M = (C = F.value) == null ? void 0 : C.target.originalCategoryIndex);
|
|
1566
|
-
const k = Ne(
|
|
1570
|
+
const k = Ne(d.value);
|
|
1567
1571
|
$ != M && (k[M].bundles.splice(U, 1), U = k[$].bundles.length), console.log($, U, M, "ci, bi, originalCategoryIndex");
|
|
1568
1572
|
const O = k[$];
|
|
1569
1573
|
if (!O) {
|
|
@@ -1579,7 +1583,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1579
1583
|
O.bundles.splice(U, 1);
|
|
1580
1584
|
} else
|
|
1581
1585
|
U == -1 ? O.bundles.push(s) : O.bundles[U] = s;
|
|
1582
|
-
await
|
|
1586
|
+
await c(
|
|
1583
1587
|
async () => {
|
|
1584
1588
|
var P, q;
|
|
1585
1589
|
if (s != null) {
|
|
@@ -1591,7 +1595,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1591
1595
|
}
|
|
1592
1596
|
await _e.updateStoreBundle({
|
|
1593
1597
|
categories: k
|
|
1594
|
-
}), await
|
|
1598
|
+
}), await u.readMemberStore(), await u.readMembership(), await u.readRewards(), (q = F.value) == null || q.showSheet(!1);
|
|
1595
1599
|
},
|
|
1596
1600
|
{
|
|
1597
1601
|
message: `${s == null ? "Deleting" : U == -1 ? "Creating" : "Updating"} bundle`,
|
|
@@ -1617,7 +1621,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1617
1621
|
var s, $;
|
|
1618
1622
|
await t(async () => {
|
|
1619
1623
|
var U, M;
|
|
1620
|
-
if (await
|
|
1624
|
+
if (await u.readMemberStore(), await u.readMembership(), await u.readRewards(), await u.readPayoutAccount(), (U = m.currentRoute.value.query) != null && U.action) {
|
|
1621
1625
|
switch ((M = m.currentRoute.value.query) == null ? void 0 : M.action) {
|
|
1622
1626
|
case "update_setting":
|
|
1623
1627
|
w("setting");
|
|
@@ -1648,7 +1652,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1648
1652
|
}
|
|
1649
1653
|
m.replace({ query: {} });
|
|
1650
1654
|
}
|
|
1651
|
-
}), z.value = [f, i, b], (((s =
|
|
1655
|
+
}), z.value = [f, i, b], (((s = u.payoutAccount) == null ? void 0 : s.status) != "APPROVED" || (($ = u.payoutAccount) == null ? void 0 : $.enable) != !0) && (z.value = [
|
|
1652
1656
|
_,
|
|
1653
1657
|
f,
|
|
1654
1658
|
i,
|
|
@@ -1656,15 +1660,15 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1656
1660
|
]);
|
|
1657
1661
|
}), (s, $) => {
|
|
1658
1662
|
const U = h("FmPageHead"), M = h("FmButton"), k = h("FmCard");
|
|
1659
|
-
return g(), D(
|
|
1663
|
+
return g(), D(X, null, [
|
|
1660
1664
|
r(U, {
|
|
1661
1665
|
title: e(a)("connect.store.title"),
|
|
1662
1666
|
actions: e(z),
|
|
1663
1667
|
"onClick:action": w
|
|
1664
1668
|
}, null, 8, ["title", "actions"]),
|
|
1665
1669
|
x("div", gn, [
|
|
1666
|
-
e(
|
|
1667
|
-
(g(!0), D(
|
|
1670
|
+
e(d) && e(d).length > 0 ? (g(), D(X, { key: 0 }, [
|
|
1671
|
+
(g(!0), D(X, null, re(e(d), (O, p) => (g(), D("div", {
|
|
1668
1672
|
key: O.name,
|
|
1669
1673
|
class: "space-y-8 py-12"
|
|
1670
1674
|
}, [
|
|
@@ -1679,7 +1683,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1679
1683
|
}, null, 8, ["onClick"])
|
|
1680
1684
|
]),
|
|
1681
1685
|
x("div", _n, [
|
|
1682
|
-
(g(!0), D(
|
|
1686
|
+
(g(!0), D(X, null, re(O.bundles, (n, C) => (g(), I(Ct, {
|
|
1683
1687
|
bundle: n,
|
|
1684
1688
|
key: n._id,
|
|
1685
1689
|
onEdit: (P) => L({
|