@feedmepos/mf-connect 0.1.47-prod → 0.1.48-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-AnuRQDA4.js → Analytic-DrjBaKmx.js} +113 -113
- package/dist/{App-DP_jCyej.js → App-eIaytGsZ.js} +632 -622
- package/dist/{Bin-tL4lF6PB.js → Bin-CVp0eFwl.js} +9 -9
- package/dist/{Broadcast-T2a5tN8R.js → Broadcast-DBgBT6yz.js} +40 -40
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BgPJCH02.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CugJWeBo.js} +18 -18
- package/dist/{Card-Bi-ODgCc.js → Card-DkP6oJVn.js} +239 -239
- package/dist/{Collections-JHWotZ1I.js → Collections-DYb_aeTW.js} +31 -31
- package/dist/{Credit-DQQCXqS0.js → Credit-WVv_PL5D.js} +74 -74
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-hxuYl-OQ.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Dt9c2kvf.js} +756 -753
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-ECkaQxuI.js → EffectSheet.vue_vue_type_style_index_0_lang-DT3y4k1C.js} +96 -96
- package/dist/{Experience-DzTV21vX.js → Experience-BdH44wBG.js} +41 -41
- package/dist/{Game-DUCx2Dl9.js → Game-C7jxRESY.js} +31 -31
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +144 -0
- package/dist/{Index-zynxjOOr.js → Index-DYr1p4sh.js} +54 -54
- package/dist/{Marketing-BBHDVRkR.js → Marketing-Djl27fez.js} +24 -24
- package/dist/{Member-B09bj6C3.js → Member-CWXedfTG.js} +63 -63
- package/dist/MemberList-C2TvGi22.js +1606 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/{MemberTransactions-DERMSs7o.js → MemberTransactions-BSUocGg9.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CAADF6vv.js → MessageInput.vue_vue_type_script_setup_true_lang-D8xPA6jM.js} +2286 -2220
- package/dist/{Mission-DAv0e_ZH.js → Mission-BVx9Cqi5.js} +20 -20
- package/dist/{Overview-D0rBTEtP.js → Overview-DyXF9zfB.js} +337 -337
- package/dist/{Point-BeBYi1BT.js → Point-ovkgTwZO.js} +41 -41
- package/dist/{Promotion-BSPU5hP9.js → Promotion-B0Q6GItP.js} +42 -42
- package/dist/{Queue-C5IFJ3iE.js → Queue-BAWG1Hh-.js} +12 -12
- package/dist/{Record-CoFSrv7j.js → Record-CTp80g4A.js} +10 -10
- package/dist/{Reward-COIOBOl-.js → Reward-_Jow1lJ7.js} +173 -173
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-B9Tl7hqv.js → RewardGroup.vue_vue_type_script_setup_true_lang-BV8xCejA.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BzsYC3k2.js → RuleGroup.vue_vue_type_script_setup_true_lang-DkDAuGY0.js} +381 -381
- package/dist/{Segment-DF5SrucQ.js → Segment-CsdJ1SjK.js} +327 -327
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BSSfQu3F.js → SelectItems.vue_vue_type_script_setup_true_lang-DH3oIm2t.js} +14 -14
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DoL_gTKy.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DvVrjpxR.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cijyol1Q.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-D5gV89Xk.js} +3 -3
- package/dist/Setting-BZRA50LO.js +1936 -0
- package/dist/{Store-E2_0EIy8.js → Store-CFnCN_7-.js} +238 -238
- package/dist/StoreRewards-B_McpBz-.js +423 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DuatzcJ8.js → StoreTransactions.vue_vue_type_script_setup_true_lang-vL0vr-Xn.js} +185 -185
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D_r8I0h7.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C1ZlLdme.js} +1 -1
- package/dist/{Tier-CEEHsXkC.js → Tier-CCYFu6kJ.js} +106 -106
- package/dist/{Title-BMAWlGeW.js → Title-7Mg-Ml4z.js} +95 -95
- package/dist/{Transaction-CLsceq-O.js → Transaction-BqZrbpZi.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CFLekn9O.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-C6ZwPUD4.js} +6 -6
- package/dist/{Voucher-Cd293WYY.js → Voucher-Yty_7SuS.js} +36 -36
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Bt12t3gB.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B8HHh8HU.js → ZodTextField.vue_vue_type_script_setup_true_lang-C3NHrEIl.js} +1 -1
- package/dist/{app-aVXsWATU.js → app-2EJP4psh.js} +31 -31
- package/dist/app-Dzon--6x.js +57962 -0
- package/dist/app.js +1 -1
- package/dist/{business-DVlHPzaL.js → business-BehG4fR2.js} +1 -1
- package/dist/{campaign-l-u9A514.js → campaign-BpaiTG4f.js} +10 -10
- package/dist/{campaign-D9KeUWA7.js → campaign-CAcP56Sz.js} +2 -2
- package/dist/{campaign.enum-Cud82tES.js → campaign.enum-BWjI8Hop.js} +1 -1
- package/dist/{campaign.fn-C-UojhHv.js → campaign.fn-PVdB1-V1.js} +166 -166
- package/dist/{collectible.enum-PrlUDScv.js → collectible.enum-BYmuqayi.js} +1 -1
- package/dist/{collection.fn-yR-xnV4g.js → collection.fn-CbH8hbWW.js} +2 -2
- package/dist/{dto-Cua1OHMY.js → dto-Dd3Oc4QO.js} +4 -4
- package/dist/{effect-B5-eXNEr.js → effect-DvEQNEl0.js} +1 -1
- package/dist/{email-addresses-BeYh5fr5.js → email-addresses-C-9JrAi8.js} +1 -1
- package/dist/{export-BUF4_DUz.js → export-RWE9Cn-d.js} +4 -4
- package/dist/{helper-CGwOThAl.js → helper-Bl6LdWED.js} +1 -1
- package/dist/{index-Cl2iYM2F.js → index-1bU9cLqV.js} +1 -1
- package/dist/{index-1BGPM6Uy.js → index-BCQMVr1J.js} +1 -1
- package/dist/{index-BmL_b0IR.js → index-Bgnrbk5x.js} +1 -1
- package/dist/{index-knuJv0ti.js → index-Bjf5Z2QE.js} +4 -4
- package/dist/{index-ng2IXlL1.js → index-CFW9ogow.js} +1 -1
- package/dist/{index-DNTd-FNx.js → index-CfgczUMX.js} +2 -2
- package/dist/{index-C-d_4n-1.js → index-CzCqc7ph.js} +1 -1
- package/dist/{index-aMDi62-C.js → index-DX1X6Owa.js} +1 -1
- package/dist/{index-DlFVLRKG.js → index-DZN5WWgq.js} +3 -3
- package/dist/{index-D5KIp8ZB.js → index-DhUvELhc.js} +3 -3
- package/dist/{index-Cx8-ipee.js → index-DpoNuVc-.js} +6 -6
- package/dist/{index-BLdVWQId.js → index-G_XSbrXB.js} +3 -3
- package/dist/{index-hX2mE0gQ.js → index-VVy4GPzJ.js} +1 -1
- package/dist/{index-CB8iWT_p.js → index-wOExBjGo.js} +1 -1
- package/dist/{index.esm2017-D8stWFci.js → index.esm2017-DfgZFSqe.js} +1 -1
- package/dist/{loading-c4b7n9Xp.js → loading-qlqqYGF3.js} +1 -1
- package/dist/{membership-oBIs4sbL.js → membership-Bh_1iu5v.js} +3 -3
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-AP24H0gk.js → money-DvTB_Fek.js} +1 -1
- package/dist/{number-CwsAYC_2.js → number-DJQ3gi1P.js} +1 -1
- package/dist/objectid-BKU0cEuv.js +145 -0
- package/dist/{plugins-Dn7JDHi7.js → plugins-DJpBrPbQ.js} +2 -2
- package/dist/{reward-4wdoZeXw.js → reward-DZ4KlN9B.js} +1 -1
- package/dist/{rule-_OJza6tn.js → rule-DV0yCGlq.js} +4 -4
- package/dist/{rule-builder-DmlhHAED.js → rule-builder-D6ihVPNO.js} +1 -1
- package/dist/{template-BSQLFHf4.js → template-ElP-JIFL.js} +63 -63
- package/dist/timezone-FaHjut_D.js +1150 -0
- package/dist/{trigger-DC9tDnI2.js → trigger-D8wnJVTA.js} +4 -4
- package/dist/usePagination-Ds-cuHop.js +223 -0
- package/dist/{user-CCVOptFD.js → user-NWV9KppR.js} +1 -1
- package/dist/{vue-i18n--_Wu1nMj.js → vue-i18n-CkbS-IDD.js} +112 -112
- package/dist/{xlsx-BVMaOi8M.js → xlsx-CdQE5RZi.js} +226 -226
- package/package.json +5 -4
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
- package/dist/MemberList-DLSLGQ02.js +0 -1606
- package/dist/MemberOverview-C2n9oJZh.js +0 -58
- package/dist/Setting-Dt0sG_hk.js +0 -1936
- package/dist/StoreRewards-DuSsWnTE.js +0 -423
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Qc5cCqh5.js +0 -419
- package/dist/app-jRT7vsk_.js +0 -33357
- package/dist/objectid-CVDLTdni.js +0 -145
- package/dist/usePagination-JoYaROkV.js +0 -223
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { defineComponent as ee, computed as j, resolveComponent as h, openBlock as g, createBlock as I, withCtx as T, createElementVNode as
|
|
1
|
+
import { defineComponent as ee, computed as j, resolveComponent as h, openBlock as g, createBlock as I, withCtx as T, createElementVNode as _, createElementBlock as B, createVNode as i, createCommentVNode as M, toDisplayString as L, unref as e, Fragment as X, renderList as re, ref as U, isRef as oe, reactive as Ke, onMounted as fe, watch as we, toRaw as He, createTextVNode as de, h as qe } from "vue";
|
|
2
2
|
import { _ as Ye } from "./tier-BJDhpH6X.js";
|
|
3
3
|
import { useDialog as Me, useDialogChild as Oe, components as We } from "@feedmepos/ui-library";
|
|
4
|
-
import { c as D, e as he, S as ze } from "./index-
|
|
5
|
-
import { u as Ee } from "./loading-
|
|
6
|
-
import { u as ke, C as me } from "./membership-
|
|
4
|
+
import { c as D, e as he, S as ze } from "./index-G_XSbrXB.js";
|
|
5
|
+
import { u as Ee } from "./loading-qlqqYGF3.js";
|
|
6
|
+
import { u as ke, C as me } from "./membership-Bh_1iu5v.js";
|
|
7
7
|
import { a as Je, c as De } from "./object-qECH92oz.js";
|
|
8
8
|
import { _ as ue } from "./lodash-B5I3zXaY.js";
|
|
9
|
-
import { c as se } from "./index-
|
|
10
|
-
import { u as be } from "./vue-i18n
|
|
9
|
+
import { c as se } from "./index-DhUvELhc.js";
|
|
10
|
+
import { u as be } from "./vue-i18n-CkbS-IDD.js";
|
|
11
11
|
import { Z, g as J, a as G } from "./zod-Bg2FbC-D.js";
|
|
12
|
-
import { z as Q, R as Ge } from "./app-
|
|
13
|
-
import { m as Xe, n as Ze, o as Qe, p as Ae, q as et } from "./index-
|
|
12
|
+
import { z as Q, R as Ge } from "./app-2EJP4psh.js";
|
|
13
|
+
import { m as Xe, n as Ze, o as Qe, p as Ae, q as et } from "./index-Bjf5Z2QE.js";
|
|
14
14
|
import { u as Se } from "./app-wDQR6dpb.js";
|
|
15
|
-
import { _ as te } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
import { a as tt, p as
|
|
15
|
+
import { _ as te } from "./ZodTextField.vue_vue_type_script_setup_true_lang-C3NHrEIl.js";
|
|
16
|
+
import { a as tt, p as _e, n as nt, f as Fe } from "./plugins-DJpBrPbQ.js";
|
|
17
17
|
import { J as Pe } from "./JsonViewer-v8_C7l5N.js";
|
|
18
|
-
import { _ as ot } from "./index-
|
|
19
|
-
import { _ as at } from "./ImageInput.vue_vue_type_script_setup_true_lang-
|
|
18
|
+
import { _ as ot } from "./index-CfgczUMX.js";
|
|
19
|
+
import { _ as at } from "./ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js";
|
|
20
20
|
import { _ as lt } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
21
|
-
import { z as st, a as rt } from "./money-
|
|
22
|
-
import { F as it } from "./number-
|
|
23
|
-
import { t as dt } from "./helper-
|
|
24
|
-
import "./index-
|
|
25
|
-
import "./index-
|
|
26
|
-
import "./index-
|
|
27
|
-
import "./index-
|
|
28
|
-
import { m as ut } from "./index-
|
|
29
|
-
import { m as Ce } from "./index-
|
|
21
|
+
import { z as st, a as rt } from "./money-DvTB_Fek.js";
|
|
22
|
+
import { F as it } from "./number-DJQ3gi1P.js";
|
|
23
|
+
import { t as dt } from "./helper-Bl6LdWED.js";
|
|
24
|
+
import "./index-1bU9cLqV.js";
|
|
25
|
+
import "./index-DpoNuVc-.js";
|
|
26
|
+
import "./index-CFW9ogow.js";
|
|
27
|
+
import "./index-DZN5WWgq.js";
|
|
28
|
+
import { m as ut } from "./index-CzCqc7ph.js";
|
|
29
|
+
import { m as Ce } from "./index-DX1X6Owa.js";
|
|
30
30
|
import { useRouter as ct } from "vue-router";
|
|
31
31
|
function je(v) {
|
|
32
32
|
return se.DineroFactory(v).toUnit();
|
|
33
33
|
}
|
|
34
|
-
function mt(v,
|
|
34
|
+
function mt(v, x, a, f, r = [], b = []) {
|
|
35
35
|
const o = ot.compact(
|
|
36
|
-
|
|
36
|
+
x.map((t) => v.find((c) => c.systemCode === t.systemCode && c.taxCode === t.taxCode)).filter((t) => !!t && b.includes(t.systemCode))
|
|
37
37
|
), m = o.reduce(
|
|
38
38
|
(t, c) => {
|
|
39
39
|
var y;
|
|
@@ -85,23 +85,23 @@ function mt(v, _, a, f, r = [], b = []) {
|
|
|
85
85
|
}).convertPrecision(2).toObject()
|
|
86
86
|
}));
|
|
87
87
|
}
|
|
88
|
-
function pt(v,
|
|
88
|
+
function pt(v, x, a) {
|
|
89
89
|
return v ? v.reduce((f, r) => {
|
|
90
90
|
var b;
|
|
91
91
|
return (b = a.find((o) => o.systemCode === r.systemCode)) != null && b.inclusive || (f = se.DineroFactory(f.toObject()).add(r.total)), f;
|
|
92
|
-
}, se.DineroFactory(
|
|
92
|
+
}, se.DineroFactory(x)).toObject() : se.DineroFactory(x).toObject();
|
|
93
93
|
}
|
|
94
94
|
const yt = { class: "relative h-[120px] aspect-video flex items-center justify-center border rounded-md border-fm-color-neutral-gray-300" }, ft = ["src"], bt = {
|
|
95
95
|
key: 2,
|
|
96
96
|
class: "absolute top-2 left-2"
|
|
97
|
-
}, gt = { class: "absolute top-0 right-0" }, vt =
|
|
97
|
+
}, gt = { class: "absolute top-0 right-0" }, vt = { class: "fm-typo-en-body-lg-600" }, ht = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xt = { class: "flex gap-8 items-center flex-wrap" }, _t = /* @__PURE__ */ ee({
|
|
98
98
|
__name: "StoreBundleCard",
|
|
99
99
|
props: {
|
|
100
100
|
bundle: { type: Object, required: !0 }
|
|
101
101
|
},
|
|
102
102
|
emits: ["edit", "delete", "send"],
|
|
103
|
-
setup(v, { emit:
|
|
104
|
-
const a = v, f =
|
|
103
|
+
setup(v, { emit: x }) {
|
|
104
|
+
const a = v, f = x, r = j(() => {
|
|
105
105
|
const o = [];
|
|
106
106
|
return a.bundle.price.amount > 0 && o.push(
|
|
107
107
|
`${D.Config.getCountry().currency.symbol}${je(a.bundle.price)}`
|
|
@@ -122,7 +122,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
122
122
|
class: "flex flex-col gap-y-8 p-16 min-h-[240px] h-full text-center items-center"
|
|
123
123
|
}, {
|
|
124
124
|
default: T(() => [
|
|
125
|
-
|
|
125
|
+
_("div", yt, [
|
|
126
126
|
v.bundle.image ? (g(), B("img", {
|
|
127
127
|
key: 1,
|
|
128
128
|
src: v.bundle.image,
|
|
@@ -141,7 +141,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
141
141
|
compact: ""
|
|
142
142
|
})
|
|
143
143
|
])) : M("", !0),
|
|
144
|
-
|
|
144
|
+
_("div", gt, [
|
|
145
145
|
i(d, { placement: "bottom-end" }, {
|
|
146
146
|
"menu-button": T(() => [
|
|
147
147
|
i(c, {
|
|
@@ -165,9 +165,9 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
165
165
|
onClick: m[2] || (m[2] = (l) => f("delete", v.bundle)),
|
|
166
166
|
icon: "delete"
|
|
167
167
|
}, {
|
|
168
|
-
label: T(() => [
|
|
169
|
-
|
|
170
|
-
]),
|
|
168
|
+
label: T(() => [...m[3] || (m[3] = [
|
|
169
|
+
_("div", { class: "text-fm-color-typo-error fm-typo-en-body-md-400" }, " Delete ", -1)
|
|
170
|
+
])]),
|
|
171
171
|
_: 1
|
|
172
172
|
})
|
|
173
173
|
]),
|
|
@@ -175,9 +175,9 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
175
175
|
})
|
|
176
176
|
])
|
|
177
177
|
]),
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
178
|
+
_("div", vt, L(v.bundle.name), 1),
|
|
179
|
+
_("div", ht, L(e(r) || "Free"), 1),
|
|
180
|
+
_("div", xt, [
|
|
181
181
|
(g(!0), B(X, null, re(e(b), (l, S) => (g(), I(t, {
|
|
182
182
|
key: S,
|
|
183
183
|
label: l
|
|
@@ -188,11 +188,11 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
188
188
|
});
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
-
}),
|
|
191
|
+
}), Ct = /* @__PURE__ */ ee({
|
|
192
192
|
__name: "AddBundleCard",
|
|
193
193
|
emits: ["create"],
|
|
194
|
-
setup(v, { emit:
|
|
195
|
-
const { t: a } = be(), f =
|
|
194
|
+
setup(v, { emit: x }) {
|
|
195
|
+
const { t: a } = be(), f = x;
|
|
196
196
|
return (r, b) => {
|
|
197
197
|
const o = h("FmButton"), m = h("FmCard");
|
|
198
198
|
return g(), I(m, {
|
|
@@ -211,7 +211,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
211
211
|
});
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
|
-
}),
|
|
214
|
+
}), St = { class: "space-y-16" }, Ft = { class: "flex w-full justify-between pb-16" }, Vt = { class: "flex items-center justify-end gap-8" }, wt = /* @__PURE__ */ ee({
|
|
215
215
|
__name: "CategoryDialog",
|
|
216
216
|
props: {
|
|
217
217
|
action: {
|
|
@@ -224,7 +224,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
226
|
setup(v) {
|
|
227
|
-
const { t:
|
|
227
|
+
const { t: x } = be(), a = v, f = Me(), { emitData: r, emitAction: b } = Oe(), o = U(a.initialValue), m = Q.string().min(1);
|
|
228
228
|
function u() {
|
|
229
229
|
r(o.value), b("primary"), f.close();
|
|
230
230
|
}
|
|
@@ -233,30 +233,30 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
233
233
|
}
|
|
234
234
|
return (c, y) => {
|
|
235
235
|
const d = h("FmTextField"), V = h("FmButton");
|
|
236
|
-
return g(), B("div",
|
|
236
|
+
return g(), B("div", St, [
|
|
237
237
|
i(d, {
|
|
238
238
|
modelValue: e(o),
|
|
239
239
|
"onUpdate:modelValue": y[0] || (y[0] = (l) => oe(o) ? o.value = l : null),
|
|
240
|
-
label: e(
|
|
240
|
+
label: e(x)("connect.store.category.label"),
|
|
241
241
|
rules: [e(Z).toRule(e(m))]
|
|
242
242
|
}, null, 8, ["modelValue", "label", "rules"]),
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
_("div", Ft, [
|
|
244
|
+
_("div", null, [
|
|
245
245
|
v.action == "edit" ? (g(), I(V, {
|
|
246
246
|
key: 0,
|
|
247
247
|
onClick: t,
|
|
248
|
-
label: e(
|
|
248
|
+
label: e(x)("connect.common.delete"),
|
|
249
249
|
variant: "destructive"
|
|
250
250
|
}, null, 8, ["label"])) : M("", !0)
|
|
251
251
|
]),
|
|
252
|
-
|
|
252
|
+
_("div", Vt, [
|
|
253
253
|
i(V, {
|
|
254
|
-
label: e(
|
|
254
|
+
label: e(x)("connect.common.cancel"),
|
|
255
255
|
variant: "tertiary",
|
|
256
256
|
onClick: y[1] || (y[1] = (l) => e(f).close())
|
|
257
257
|
}, null, 8, ["label"]),
|
|
258
258
|
i(V, {
|
|
259
|
-
label: v.action == "edit" ? e(
|
|
259
|
+
label: v.action == "edit" ? e(x)("connect.common.edit") : e(x)("connect.common.add"),
|
|
260
260
|
disabled: !e(o),
|
|
261
261
|
onClick: u
|
|
262
262
|
}, null, 8, ["label", "disabled"])
|
|
@@ -265,10 +265,10 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
265
265
|
]);
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
|
-
}),
|
|
268
|
+
}), kt = { class: "space-y-16" }, Pt = { class: "flex items-center justify-end gap-8 pb-16" }, $t = /* @__PURE__ */ ee({
|
|
269
269
|
__name: "SelectCategoryDialog",
|
|
270
270
|
setup(v) {
|
|
271
|
-
const { emitData:
|
|
271
|
+
const { emitData: x, emitAction: a } = Oe(), f = ke(), r = U(), b = j(
|
|
272
272
|
() => f.sortedStoreCategories.map((o, m) => ({
|
|
273
273
|
label: o.name,
|
|
274
274
|
value: m
|
|
@@ -276,19 +276,19 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
276
276
|
);
|
|
277
277
|
return (o, m) => {
|
|
278
278
|
const u = h("FmSelect"), t = h("FmButton");
|
|
279
|
-
return g(), B("div",
|
|
280
|
-
|
|
279
|
+
return g(), B("div", kt, [
|
|
280
|
+
m[4] || (m[4] = _("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Select a category to create FeedMe CNY 2025 bundle ", -1)),
|
|
281
281
|
i(u, {
|
|
282
282
|
placeholder: "Select a category",
|
|
283
283
|
items: e(b),
|
|
284
284
|
modelValue: e(r),
|
|
285
285
|
"onUpdate:modelValue": [
|
|
286
286
|
m[0] || (m[0] = (c) => oe(r) ? r.value = c : null),
|
|
287
|
-
m[1] || (m[1] = (c) => e(
|
|
287
|
+
m[1] || (m[1] = (c) => e(x)(c))
|
|
288
288
|
],
|
|
289
289
|
label: "Category"
|
|
290
290
|
}, null, 8, ["items", "modelValue"]),
|
|
291
|
-
|
|
291
|
+
_("div", Pt, [
|
|
292
292
|
i(t, {
|
|
293
293
|
variant: "tertiary",
|
|
294
294
|
label: "Cancel",
|
|
@@ -304,10 +304,10 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
306
|
});
|
|
307
|
-
function
|
|
308
|
-
return v.states.map((
|
|
307
|
+
function xe(v) {
|
|
308
|
+
return v.states.map((x) => ({ label: x, value: x }));
|
|
309
309
|
}
|
|
310
|
-
const
|
|
310
|
+
const Tt = {
|
|
311
311
|
[he.F_COUNTRY.enum.MY]: {
|
|
312
312
|
states: [
|
|
313
313
|
"Johor",
|
|
@@ -328,13 +328,13 @@ const Rt = {
|
|
|
328
328
|
"Terengganu"
|
|
329
329
|
],
|
|
330
330
|
get stateItems() {
|
|
331
|
-
return
|
|
331
|
+
return xe(this);
|
|
332
332
|
}
|
|
333
333
|
},
|
|
334
334
|
[he.F_COUNTRY.enum.SG]: {
|
|
335
335
|
states: [],
|
|
336
336
|
get stateItems() {
|
|
337
|
-
return
|
|
337
|
+
return xe(this);
|
|
338
338
|
}
|
|
339
339
|
},
|
|
340
340
|
[he.F_COUNTRY.enum.ID]: {
|
|
@@ -374,7 +374,7 @@ const Rt = {
|
|
|
374
374
|
"West Sumatra"
|
|
375
375
|
],
|
|
376
376
|
get stateItems() {
|
|
377
|
-
return
|
|
377
|
+
return xe(this);
|
|
378
378
|
}
|
|
379
379
|
},
|
|
380
380
|
[he.F_COUNTRY.enum.TH]: {
|
|
@@ -458,7 +458,7 @@ const Rt = {
|
|
|
458
458
|
"Yasothon"
|
|
459
459
|
],
|
|
460
460
|
get stateItems() {
|
|
461
|
-
return
|
|
461
|
+
return xe(this);
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
464
|
}, pe = () => D.Config.getCountry(), ye = {
|
|
@@ -475,26 +475,26 @@ const Rt = {
|
|
|
475
475
|
return pe().taxSystems;
|
|
476
476
|
},
|
|
477
477
|
taxInclusion(v) {
|
|
478
|
-
return ye.taxSystem.map((
|
|
479
|
-
systemCode:
|
|
478
|
+
return ye.taxSystem.map((x) => ({
|
|
479
|
+
systemCode: x.code,
|
|
480
480
|
inclusive: v !== void 0 ? v : !1
|
|
481
481
|
}));
|
|
482
482
|
},
|
|
483
483
|
groupedTaxOptions() {
|
|
484
484
|
const v = D.Country.getCountryFlattenTaxes(pe().code);
|
|
485
|
-
return ye.taxSystem.map((
|
|
486
|
-
code:
|
|
487
|
-
options: v.map((a) => ({ ...a, feedmeTaxCode: ye.generateCode(a) })).filter((a) => a.systemCode ===
|
|
485
|
+
return ye.taxSystem.map((x) => ({
|
|
486
|
+
code: x.code,
|
|
487
|
+
options: v.map((a) => ({ ...a, feedmeTaxCode: ye.generateCode(a) })).filter((a) => a.systemCode === x.code)
|
|
488
488
|
}));
|
|
489
489
|
},
|
|
490
490
|
systemDefaultCode(v) {
|
|
491
|
-
const
|
|
492
|
-
return
|
|
491
|
+
const x = ye.groupedTaxOptions().find((a) => a.code === v);
|
|
492
|
+
return x == null ? void 0 : x.options.find((a) => a.default);
|
|
493
493
|
},
|
|
494
494
|
generateCode(v) {
|
|
495
495
|
return `${v.systemCode}/${v.taxCode}`;
|
|
496
496
|
}
|
|
497
|
-
}, ne = ye,
|
|
497
|
+
}, ne = ye, Ut = /* @__PURE__ */ ee({
|
|
498
498
|
__name: "TaxInclusiveSetting",
|
|
499
499
|
props: {
|
|
500
500
|
modelValue: {
|
|
@@ -504,8 +504,8 @@ const Rt = {
|
|
|
504
504
|
}
|
|
505
505
|
},
|
|
506
506
|
emits: ["update:model-value"],
|
|
507
|
-
setup(v, { emit:
|
|
508
|
-
const a = v, f = ne.taxSystem, r =
|
|
507
|
+
setup(v, { emit: x }) {
|
|
508
|
+
const a = v, f = ne.taxSystem, r = x, b = U(a.modelValue);
|
|
509
509
|
function o(c, y) {
|
|
510
510
|
const d = ue.clone(a.modelValue), V = d.findIndex((l) => l.systemCode === c);
|
|
511
511
|
V >= 0 ? d[V].inclusive = y : d.push({
|
|
@@ -551,7 +551,7 @@ const Rt = {
|
|
|
551
551
|
label: T(() => {
|
|
552
552
|
var w;
|
|
553
553
|
return [
|
|
554
|
-
|
|
554
|
+
_("div", null, L(t(V.label, ((w = e(b)[l]) == null ? void 0 : w.inclusive) || !1)), 1)
|
|
555
555
|
];
|
|
556
556
|
}),
|
|
557
557
|
_: 2
|
|
@@ -561,18 +561,18 @@ const Rt = {
|
|
|
561
561
|
};
|
|
562
562
|
}
|
|
563
563
|
});
|
|
564
|
-
var
|
|
565
|
-
const
|
|
564
|
+
var Rt = { mode: "production", appMode: "mf" };
|
|
565
|
+
const It = { class: "space-y-8" }, Bt = {
|
|
566
566
|
key: 0,
|
|
567
567
|
class: "space-y-16"
|
|
568
|
-
},
|
|
568
|
+
}, Nt = /* @__PURE__ */ ee({
|
|
569
569
|
__name: "StripeSetting",
|
|
570
570
|
props: {
|
|
571
571
|
modelValue: {}
|
|
572
572
|
},
|
|
573
573
|
emits: ["update:modelValue"],
|
|
574
|
-
setup(v, { emit:
|
|
575
|
-
const a = v, f =
|
|
574
|
+
setup(v, { emit: x }) {
|
|
575
|
+
const a = v, f = x, r = U(!1);
|
|
576
576
|
we(r, (o, m) => {
|
|
577
577
|
m != o && (!a.modelValue && o ? f("update:modelValue", {
|
|
578
578
|
apiKey: "",
|
|
@@ -580,21 +580,21 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
580
580
|
}) : o || f("update:modelValue", void 0));
|
|
581
581
|
});
|
|
582
582
|
const b = j(() => {
|
|
583
|
-
const o =
|
|
583
|
+
const o = Rt.mode === "development", m = D.Config.getCountry().code.toLowerCase(), u = m != "my" ? `.${m}` : "";
|
|
584
584
|
return `https://marketing${o ? "-dev" : ""}${u}.feedmeapi.com/stripe/${ze.getBusinessId()}/webhook`;
|
|
585
585
|
});
|
|
586
586
|
return fe(() => {
|
|
587
587
|
r.value = !!a.modelValue;
|
|
588
588
|
}), (o, m) => {
|
|
589
589
|
const u = h("FmSwitch"), t = h("FmTextField"), c = h("FmButton");
|
|
590
|
-
return g(), B("div",
|
|
590
|
+
return g(), B("div", It, [
|
|
591
591
|
i(u, {
|
|
592
592
|
modelValue: e(r),
|
|
593
593
|
"onUpdate:modelValue": m[0] || (m[0] = (y) => oe(r) ? r.value = y : null),
|
|
594
594
|
value: "true",
|
|
595
595
|
label: "Enable Stripe"
|
|
596
596
|
}, null, 8, ["modelValue"]),
|
|
597
|
-
a.modelValue ? (g(), B("div",
|
|
597
|
+
a.modelValue ? (g(), B("div", Bt, [
|
|
598
598
|
i(t, {
|
|
599
599
|
label: "API Key",
|
|
600
600
|
modelValue: a.modelValue.apiKey,
|
|
@@ -627,16 +627,16 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
627
627
|
]);
|
|
628
628
|
};
|
|
629
629
|
}
|
|
630
|
-
}),
|
|
630
|
+
}), Dt = {
|
|
631
631
|
key: 0,
|
|
632
632
|
class: "space-y-16 pr-12"
|
|
633
|
-
},
|
|
633
|
+
}, At = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Mt = {
|
|
634
634
|
key: 1,
|
|
635
635
|
class: "space-y-16"
|
|
636
|
-
},
|
|
636
|
+
}, Ot = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Et = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, jt = { class: "grid grid-cols-2 gap-x-16 gap-y-16" }, Lt = { class: "space-y-4" }, Kt = { class: "fm-typo-en-body-lg-400" }, Ht = { class: "space-y-16" }, qt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Yt = { class: "flex items-center gap-8" }, Wt = /* @__PURE__ */ ee({
|
|
637
637
|
__name: "StoreSettingSheet",
|
|
638
638
|
emits: ["update"],
|
|
639
|
-
setup(v, { expose:
|
|
639
|
+
setup(v, { expose: x, emit: a }) {
|
|
640
640
|
const { t: f } = be(), r = a, b = U(!1), o = U(), m = U(!1), u = Xe.extend({
|
|
641
641
|
company: Ze.extend({
|
|
642
642
|
name: Q.string().min(1, "Company name is required"),
|
|
@@ -679,7 +679,7 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
679
679
|
function d(V, l) {
|
|
680
680
|
b.value = V, V && (o.value = l != null && l.company ? l : y());
|
|
681
681
|
}
|
|
682
|
-
return
|
|
682
|
+
return x({
|
|
683
683
|
showSheet: d,
|
|
684
684
|
data: o
|
|
685
685
|
}), (V, l) => {
|
|
@@ -691,7 +691,7 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
691
691
|
header: e(f)("connect.store.setting.title")
|
|
692
692
|
}, {
|
|
693
693
|
"side-sheet-footer": T(() => [
|
|
694
|
-
|
|
694
|
+
_("div", Yt, [
|
|
695
695
|
i(W, {
|
|
696
696
|
label: e(f)("connect.common.save"),
|
|
697
697
|
onClick: c,
|
|
@@ -709,8 +709,8 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
709
709
|
var z, ae;
|
|
710
710
|
return [
|
|
711
711
|
i(Pe, { json: e(o) }, null, 8, ["json"]),
|
|
712
|
-
e(o) && e(o).company ? (g(), B("div",
|
|
713
|
-
|
|
712
|
+
e(o) && e(o).company ? (g(), B("div", Dt, [
|
|
713
|
+
_("div", At, L(e(f)("connect.store.setting.company.legal_info")), 1),
|
|
714
714
|
i(te, {
|
|
715
715
|
modelValue: e(o).company.name,
|
|
716
716
|
"onUpdate:modelValue": l[0] || (l[0] = (s) => e(o).company.name = s),
|
|
@@ -733,9 +733,9 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
733
733
|
label: e(f)("connect.store.setting.company.tax_reg_no"),
|
|
734
734
|
schema: e(Z).typeAtPath(e(u), "company.sstRegNo")
|
|
735
735
|
}, null, 8, ["modelValue", "label", "schema"])) : M("", !0),
|
|
736
|
-
(z = e(o).company) != null && z.sstRegNo && e(o).inclusiveTaxes ? (g(), B("div",
|
|
737
|
-
|
|
738
|
-
i(
|
|
736
|
+
(z = e(o).company) != null && z.sstRegNo && e(o).inclusiveTaxes ? (g(), B("div", Mt, [
|
|
737
|
+
_("div", Ot, L(e(f)("connect.store.setting.company.tax")), 1),
|
|
738
|
+
i(Ut, {
|
|
739
739
|
modelValue: e(o).inclusiveTaxes,
|
|
740
740
|
"onUpdate:modelValue": l[4] || (l[4] = (s) => e(o).inclusiveTaxes = s)
|
|
741
741
|
}, null, 8, ["modelValue"])
|
|
@@ -746,7 +746,7 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
746
746
|
label: e(f)("connect.store.setting.company.phone"),
|
|
747
747
|
schema: e(Z).typeAtPath(e(u), "company.phoneNo")
|
|
748
748
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
749
|
-
|
|
749
|
+
_("div", Et, L(e(f)("connect.store.setting.company.address.title")), 1),
|
|
750
750
|
i(te, {
|
|
751
751
|
modelValue: e(o).company.address.line1,
|
|
752
752
|
"onUpdate:modelValue": l[6] || (l[6] = (s) => e(o).company.address.line1 = s),
|
|
@@ -759,7 +759,7 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
759
759
|
label: e(f)("connect.store.setting.company.address.line2"),
|
|
760
760
|
schema: e(Z).typeAtPath(e(u), "company.address.line2")
|
|
761
761
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
762
|
-
|
|
762
|
+
_("div", jt, [
|
|
763
763
|
i(te, {
|
|
764
764
|
modelValue: e(o).company.address.city,
|
|
765
765
|
"onUpdate:modelValue": l[8] || (l[8] = (s) => e(o).company.address.city = s),
|
|
@@ -772,8 +772,8 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
772
772
|
label: e(f)("connect.store.setting.company.address.postcode"),
|
|
773
773
|
schema: e(Z).typeAtPath(e(u), "company.address.postcode")
|
|
774
774
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
775
|
-
|
|
776
|
-
|
|
775
|
+
_("div", Lt, [
|
|
776
|
+
_("div", Kt, L(e(f)("connect.store.setting.company.address.state")), 1),
|
|
777
777
|
i(A, {
|
|
778
778
|
placement: "top-end",
|
|
779
779
|
"model-value": e(m)
|
|
@@ -794,10 +794,10 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
794
794
|
}, 8, ["modelValue", "schema"])
|
|
795
795
|
]),
|
|
796
796
|
default: T(() => [
|
|
797
|
-
(g(!0), B(X, null, re(e(
|
|
797
|
+
(g(!0), B(X, null, re(e(Tt)[e(D.Config).getCountry().code].stateItems.filter(
|
|
798
798
|
(s) => {
|
|
799
|
-
var
|
|
800
|
-
return s.label.toLowerCase().includes(((R = (
|
|
799
|
+
var k, R;
|
|
800
|
+
return s.label.toLowerCase().includes(((R = (k = e(o)) == null ? void 0 : k.company) == null ? void 0 : R.address.state.toLowerCase()) ?? "");
|
|
801
801
|
}
|
|
802
802
|
) || [], (s) => (g(), I(w, {
|
|
803
803
|
key: s.value,
|
|
@@ -824,9 +824,9 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
824
824
|
rules: [e(Z).ruleAtPath(e(u), "company.address.country")]
|
|
825
825
|
}, null, 8, ["label", "modelValue", "items", "rules"])
|
|
826
826
|
]),
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
i(
|
|
827
|
+
_("div", Ht, [
|
|
828
|
+
_("div", qt, L(e(f)("connect.store.setting.stripe.title")), 1),
|
|
829
|
+
i(Nt, {
|
|
830
830
|
"model-value": (ae = e(o)) == null ? void 0 : ae.stripe,
|
|
831
831
|
"onUpdate:modelValue": l[13] || (l[13] = (s) => e(o).stripe = s)
|
|
832
832
|
}, null, 8, ["model-value"])
|
|
@@ -839,10 +839,10 @@ const Nt = { class: "space-y-8" }, Dt = {
|
|
|
839
839
|
};
|
|
840
840
|
}
|
|
841
841
|
});
|
|
842
|
-
function
|
|
843
|
-
return D.DineroFactory(v).toFormat(
|
|
842
|
+
function zt(v, x = !0) {
|
|
843
|
+
return D.DineroFactory(v).toFormat(x);
|
|
844
844
|
}
|
|
845
|
-
const
|
|
845
|
+
const Jt = /* @__PURE__ */ ee({
|
|
846
846
|
__name: "TaxVariantSetting",
|
|
847
847
|
props: {
|
|
848
848
|
modelValue: {
|
|
@@ -852,8 +852,8 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
852
852
|
}
|
|
853
853
|
},
|
|
854
854
|
emits: ["update:modelValue"],
|
|
855
|
-
setup(v, { emit:
|
|
856
|
-
const a = v, f =
|
|
855
|
+
setup(v, { emit: x }) {
|
|
856
|
+
const a = v, f = x;
|
|
857
857
|
fe(() => {
|
|
858
858
|
if (o.value.length !== b.value.length) {
|
|
859
859
|
const t = b.value.reduce((c, y) => {
|
|
@@ -947,13 +947,13 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
947
947
|
taxTotals: [],
|
|
948
948
|
internal: !1,
|
|
949
949
|
priceWithTaxes: st()
|
|
950
|
-
},
|
|
950
|
+
}, Gt = {
|
|
951
951
|
key: 0,
|
|
952
952
|
class: "space-y-24 pr-12"
|
|
953
|
-
},
|
|
953
|
+
}, Xt = { class: "space-y-8" }, Zt = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, Qt = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, en = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, tn = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, nn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary !mb-[-16px]" }, on = { class: "space-y-8" }, an = { class: "flex items-center justify-between" }, ln = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, sn = { class: "space-y-8" }, rn = { class: "flex items-center gap-8" }, dn = /* @__PURE__ */ ee({
|
|
954
954
|
__name: "EditBundleSheet",
|
|
955
955
|
emits: ["update"],
|
|
956
|
-
setup(v, { expose:
|
|
956
|
+
setup(v, { expose: x, emit: a }) {
|
|
957
957
|
const f = a, { t: r } = be(), b = ke(), o = U(!1), m = U([]), u = U({
|
|
958
958
|
category: 0,
|
|
959
959
|
index: -1,
|
|
@@ -982,9 +982,9 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
982
982
|
var C;
|
|
983
983
|
const n = p.row.original;
|
|
984
984
|
return n.collectible.type == "VOUCHER" || n.selectedReward == null ? n.description : qe(We.FmStepperField, {
|
|
985
|
-
"onUpdate:modelValue": (
|
|
985
|
+
"onUpdate:modelValue": ($) => {
|
|
986
986
|
t.value.titles = t.value.titles.map(
|
|
987
|
-
(E) => E.id == n.collectible._id ? { ...E, dayToExpire:
|
|
987
|
+
(E) => E.id == n.collectible._id ? { ...E, dayToExpire: $ } : E
|
|
988
988
|
);
|
|
989
989
|
},
|
|
990
990
|
modelValue: ((C = n.selectedReward) == null ? void 0 : C.extra) ?? 0,
|
|
@@ -992,14 +992,14 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
992
992
|
helperState: J(d.value, "titles"),
|
|
993
993
|
helperText: G(d.value, "titles"),
|
|
994
994
|
max: 9999,
|
|
995
|
-
rules: [(
|
|
995
|
+
rules: [($) => $ <= 9999 || "Maximum 9999 days allowed"],
|
|
996
996
|
showSteppers: !1,
|
|
997
997
|
disabled: !!t.value.stripePriceId
|
|
998
998
|
});
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
1001
1001
|
], l = U([]), S = j(() => b.bundleRewards.map((p) => {
|
|
1002
|
-
const n = w.value.find((
|
|
1002
|
+
const n = w.value.find(($) => $.id == p._id), C = p.type === "VOUCHER" ? `${p.options.maxUse} use(s), ${dt(
|
|
1003
1003
|
p.options.validityOption || {}
|
|
1004
1004
|
)}` : "No expiry";
|
|
1005
1005
|
return {
|
|
@@ -1032,16 +1032,16 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1032
1032
|
const p = S.value, n = t.value;
|
|
1033
1033
|
if (!(!n || !p))
|
|
1034
1034
|
for (let C = 0; C < p.length; C++) {
|
|
1035
|
-
const
|
|
1036
|
-
K.value[C] ?
|
|
1037
|
-
(H) => H.id ==
|
|
1035
|
+
const $ = p[C];
|
|
1036
|
+
K.value[C] ? $.collectible.type == "TITLE" ? n.titles.findIndex(
|
|
1037
|
+
(H) => H.id == $.collectible._id
|
|
1038
1038
|
) < 0 && n.titles.push({
|
|
1039
|
-
id:
|
|
1039
|
+
id: $.collectible._id,
|
|
1040
1040
|
dayToExpire: A.value
|
|
1041
1041
|
}) : n.vouchers.findIndex(
|
|
1042
|
-
(H) => H ==
|
|
1043
|
-
) < 0 && n.vouchers.push(
|
|
1044
|
-
(q) => q !=
|
|
1042
|
+
(H) => H == $.collectible._id
|
|
1043
|
+
) < 0 && n.vouchers.push($.collectible._id) : (n.titles = n.titles.filter((q) => q.id != $.collectible._id), n.vouchers = n.vouchers.filter(
|
|
1044
|
+
(q) => q != $.collectible._id
|
|
1045
1045
|
));
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
@@ -1061,38 +1061,38 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1061
1061
|
t.value.price,
|
|
1062
1062
|
Number(t.value.credit.normal),
|
|
1063
1063
|
((p = b.storeOption) == null ? void 0 : p.inclusiveTaxes) ?? [],
|
|
1064
|
-
(C = (n = b.storeOption) == null ? void 0 : n.company) != null && C.sstRegNo ? ne.taxSystem.map((
|
|
1064
|
+
(C = (n = b.storeOption) == null ? void 0 : n.company) != null && C.sstRegNo ? ne.taxSystem.map(($) => $.code) : []
|
|
1065
1065
|
);
|
|
1066
|
-
}),
|
|
1066
|
+
}), k = j(() => s.value.reduce(
|
|
1067
1067
|
(n, C) => n.add(C.total),
|
|
1068
1068
|
rt()
|
|
1069
1069
|
).toFormat()), R = j(() => {
|
|
1070
|
-
var
|
|
1070
|
+
var $;
|
|
1071
1071
|
const p = pt(
|
|
1072
1072
|
s.value,
|
|
1073
1073
|
t.value.price,
|
|
1074
|
-
((
|
|
1074
|
+
(($ = b.storeOption) == null ? void 0 : $.inclusiveTaxes) ?? []
|
|
1075
1075
|
);
|
|
1076
1076
|
t.value.priceWithTaxes = p;
|
|
1077
|
-
const n =
|
|
1077
|
+
const n = zt(p, !1), C = Number(n.replace(/[^\d.-]/g, ""));
|
|
1078
1078
|
return Number.isNaN(C) ? 0 : C;
|
|
1079
1079
|
});
|
|
1080
1080
|
function O() {
|
|
1081
1081
|
t.value.taxTotals = s.value, f("update", Ae.parse(Je(t.value)));
|
|
1082
1082
|
}
|
|
1083
|
-
function
|
|
1083
|
+
function P() {
|
|
1084
1084
|
return ue.cloneDeep(Ve);
|
|
1085
1085
|
}
|
|
1086
1086
|
function N(p, n) {
|
|
1087
|
-
o.value = p, p && n && (c.value = void 0, m.value = n.categories, t.value = n.bundle ||
|
|
1087
|
+
o.value = p, p && n && (c.value = void 0, m.value = n.categories, t.value = n.bundle || P(), u.value.category = n.category, u.value.index = n.index, u.value.originalCategoryIndex = n.category, K.value = S.value.reduce((C, $, E) => (C[E] = !!$.selectedReward, C), {}));
|
|
1088
1088
|
}
|
|
1089
|
-
return
|
|
1089
|
+
return x({
|
|
1090
1090
|
showSheet: N,
|
|
1091
1091
|
bundleImage: c,
|
|
1092
1092
|
target: u,
|
|
1093
1093
|
data: t
|
|
1094
1094
|
}), (p, n) => {
|
|
1095
|
-
const C = h("FmSwitch"),
|
|
1095
|
+
const C = h("FmSwitch"), $ = h("FmHelperText"), E = h("FmTextField"), q = h("FmSelect"), H = h("FmStepperField"), ie = h("FmMenuItem"), ge = h("FmTable"), ce = h("FmButton"), ve = h("FmSideSheet");
|
|
1096
1096
|
return g(), I(ve, {
|
|
1097
1097
|
"max-width": 768,
|
|
1098
1098
|
modelValue: e(o),
|
|
@@ -1100,7 +1100,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1100
1100
|
header: e(u).index != -1 ? e(r)("connect.store.bundle.edit.title") : e(r)("connect.store.bundle.edit.create")
|
|
1101
1101
|
}, {
|
|
1102
1102
|
"side-sheet-footer": T(() => [
|
|
1103
|
-
|
|
1103
|
+
_("div", rn, [
|
|
1104
1104
|
i(ce, {
|
|
1105
1105
|
label: e(u).index != -1 ? "Save" : "Add",
|
|
1106
1106
|
onClick: O,
|
|
@@ -1118,8 +1118,8 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1118
1118
|
var le, $e, Te, Ue, Re, Ie, Be, Ne;
|
|
1119
1119
|
return [
|
|
1120
1120
|
i(Pe, { json: e(t) }, null, 8, ["json"]),
|
|
1121
|
-
e(t) ? (g(), B("div",
|
|
1122
|
-
|
|
1121
|
+
e(t) ? (g(), B("div", Gt, [
|
|
1122
|
+
_("div", Xt, [
|
|
1123
1123
|
e(D.Config).getCountry().code == "MY" && ((le = e(b).payoutAccount) == null ? void 0 : le.status) == "APPROVED" && (($e = e(b).payoutAccount) != null && $e.enable) ? (g(), I(C, {
|
|
1124
1124
|
key: 0,
|
|
1125
1125
|
"onUpdate:modelValue": n[0] || (n[0] = (F) => {
|
|
@@ -1130,13 +1130,13 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1130
1130
|
label: "Feedvibe Campaign",
|
|
1131
1131
|
sublabel: "Bundle will be appear for Feedvibe campaign use"
|
|
1132
1132
|
}, null, 8, ["model-value"])) : M("", !0),
|
|
1133
|
-
e(t).isFeedvibe ? (g(), I(
|
|
1133
|
+
e(t).isFeedvibe ? (g(), I($, {
|
|
1134
1134
|
key: 1,
|
|
1135
1135
|
text: "There will be a 15% charge for FeedVibe bundles sold in the FeedVibe app",
|
|
1136
1136
|
state: "warning"
|
|
1137
1137
|
})) : M("", !0)
|
|
1138
1138
|
]),
|
|
1139
|
-
|
|
1139
|
+
_("div", Zt, L(e(r)("connect.store.bundle.edit.basicInformation")), 1),
|
|
1140
1140
|
i(E, {
|
|
1141
1141
|
label: e(r)("connect.store.bundle.edit.bundleName"),
|
|
1142
1142
|
modelValue: e(t).name,
|
|
@@ -1212,13 +1212,13 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1212
1212
|
"helper-state": e(J)(e(d), "coinPrice"),
|
|
1213
1213
|
"helper-text": e(G)(e(d), "coinPrice")
|
|
1214
1214
|
}, {
|
|
1215
|
-
append: T(() => [
|
|
1216
|
-
de(" point(s) ")
|
|
1217
|
-
]),
|
|
1215
|
+
append: T(() => [...n[21] || (n[21] = [
|
|
1216
|
+
de(" point(s) ", -1)
|
|
1217
|
+
])]),
|
|
1218
1218
|
_: 1
|
|
1219
1219
|
}, 8, ["model-value", "label", "helper-state", "helper-text"])),
|
|
1220
1220
|
(Te = e(b).storeOption) != null && Te.stripe && !e(t).isFeedvibe ? (g(), B(X, { key: 1 }, [
|
|
1221
|
-
|
|
1221
|
+
_("div", Qt, L(e(r)("connect.store.bundle.edit.subscriptionSettings")), 1),
|
|
1222
1222
|
i(E, {
|
|
1223
1223
|
label: e(r)("connect.store.bundle.edit.stripePriceId"),
|
|
1224
1224
|
modelValue: e(t).stripePriceId,
|
|
@@ -1238,7 +1238,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1238
1238
|
}, null, 8, ["model-value", "label", "helper-state", "helper-text"])) : M("", !0)
|
|
1239
1239
|
], 64)) : M("", !0),
|
|
1240
1240
|
e(t).isFeedvibe ? M("", !0) : (g(), B(X, { key: 2 }, [
|
|
1241
|
-
|
|
1241
|
+
_("div", en, L(e(r)("connect.store.bundle.edit.credit")), 1),
|
|
1242
1242
|
i(H, {
|
|
1243
1243
|
modelValue: e(t).credit.normal,
|
|
1244
1244
|
"onUpdate:modelValue": n[8] || (n[8] = (F) => e(t).credit.normal = F),
|
|
@@ -1247,9 +1247,9 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1247
1247
|
"helper-state": e(J)(e(d), "credit.normal"),
|
|
1248
1248
|
"helper-text": e(G)(e(d), "credit.normal")
|
|
1249
1249
|
}, {
|
|
1250
|
-
append: T(() => [
|
|
1251
|
-
de(" credit ")
|
|
1252
|
-
]),
|
|
1250
|
+
append: T(() => [...n[22] || (n[22] = [
|
|
1251
|
+
de(" credit ", -1)
|
|
1252
|
+
])]),
|
|
1253
1253
|
_: 1
|
|
1254
1254
|
}, 8, ["modelValue", "label", "helper-state", "helper-text"]),
|
|
1255
1255
|
i(H, {
|
|
@@ -1266,9 +1266,9 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1266
1266
|
"helper-state": e(J)(e(d), "credit.free.amount"),
|
|
1267
1267
|
"helper-text": e(G)(e(d), "credit.free.amount")
|
|
1268
1268
|
}, {
|
|
1269
|
-
append: T(() => [
|
|
1270
|
-
de(" credit ")
|
|
1271
|
-
]),
|
|
1269
|
+
append: T(() => [...n[23] || (n[23] = [
|
|
1270
|
+
de(" credit ", -1)
|
|
1271
|
+
])]),
|
|
1272
1272
|
_: 1
|
|
1273
1273
|
}, 8, ["model-value", "label", "helper-state", "helper-text"]),
|
|
1274
1274
|
(Re = e(t).credit.free) != null && Re.amount ? (g(), I(H, {
|
|
@@ -1287,21 +1287,21 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1287
1287
|
"helper-state": e(J)(e(d), "credit.free.day"),
|
|
1288
1288
|
"helper-text": e(G)(e(d), "credit.free.day")
|
|
1289
1289
|
}, {
|
|
1290
|
-
append: T(() => [
|
|
1291
|
-
de(" day(s) ")
|
|
1292
|
-
]),
|
|
1290
|
+
append: T(() => [...n[24] || (n[24] = [
|
|
1291
|
+
de(" day(s) ", -1)
|
|
1292
|
+
])]),
|
|
1293
1293
|
_: 1
|
|
1294
1294
|
}, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : M("", !0)
|
|
1295
1295
|
], 64)),
|
|
1296
1296
|
e(z) ? (g(), B(X, { key: 3 }, [
|
|
1297
|
-
|
|
1298
|
-
i(
|
|
1297
|
+
n[25] || (n[25] = _("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Taxes", -1)),
|
|
1298
|
+
i(Jt, {
|
|
1299
1299
|
modelValue: e(t).taxes,
|
|
1300
1300
|
"onUpdate:modelValue": n[11] || (n[11] = (F) => e(t).taxes = F)
|
|
1301
1301
|
}, null, 8, ["modelValue"]),
|
|
1302
1302
|
i(E, {
|
|
1303
1303
|
label: `Tax Charged (${e(ae)})`,
|
|
1304
|
-
"model-value": e(
|
|
1304
|
+
"model-value": e(k),
|
|
1305
1305
|
disabled: ""
|
|
1306
1306
|
}, null, 8, ["label", "model-value"])
|
|
1307
1307
|
], 64)) : M("", !0),
|
|
@@ -1310,10 +1310,10 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1310
1310
|
"model-value": e(R),
|
|
1311
1311
|
disabled: !0
|
|
1312
1312
|
}, null, 8, ["model-value"]),
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1313
|
+
_("div", tn, L(e(r)("connect.store.bundle.edit.bundleReward.title")), 1),
|
|
1314
|
+
_("div", nn, L(e(r)("connect.store.bundle.edit.bundleReward.description")), 1),
|
|
1315
|
+
_("div", on, [
|
|
1316
|
+
_("div", an, [
|
|
1317
1317
|
i(lt, {
|
|
1318
1318
|
label: `Reward type: ${e(l).length == 0 ? "All" : e(l)[0].name}`
|
|
1319
1319
|
}, {
|
|
@@ -1357,13 +1357,13 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1357
1357
|
),
|
|
1358
1358
|
"hide-footer": e(S).length <= 10
|
|
1359
1359
|
}, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"]),
|
|
1360
|
-
i(
|
|
1360
|
+
i($, {
|
|
1361
1361
|
text: e(G)(e(d), "titles"),
|
|
1362
1362
|
state: e(J)(e(d), "titles")
|
|
1363
1363
|
}, null, 8, ["text", "state"])
|
|
1364
1364
|
]),
|
|
1365
|
-
|
|
1366
|
-
|
|
1365
|
+
_("div", ln, L(e(r)("connect.store.bundle.edit.advanceSetting")), 1),
|
|
1366
|
+
_("div", sn, [
|
|
1367
1367
|
i(C, {
|
|
1368
1368
|
"model-value": e(t).internal ?? !1,
|
|
1369
1369
|
"onUpdate:modelValue": n[16] || (n[16] = (F) => e(t).internal = F),
|
|
@@ -1393,10 +1393,10 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1393
1393
|
}, 8, ["modelValue", "header"]);
|
|
1394
1394
|
};
|
|
1395
1395
|
}
|
|
1396
|
-
}),
|
|
1396
|
+
}), un = { class: "flex gap-8 items-center flex-wrap" }, cn = { class: "flex items-center gap-8" }, mn = /* @__PURE__ */ ee({
|
|
1397
1397
|
__name: "SendBundleSheet",
|
|
1398
1398
|
emits: ["success"],
|
|
1399
|
-
setup(v, { expose:
|
|
1399
|
+
setup(v, { expose: x, emit: a }) {
|
|
1400
1400
|
const { minor: f } = Ee, r = U(), b = U(""), o = U(""), m = U([]), u = U(!1), t = U();
|
|
1401
1401
|
U(!0);
|
|
1402
1402
|
function c(S) {
|
|
@@ -1423,7 +1423,7 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1423
1423
|
const S = m.value.find(
|
|
1424
1424
|
(A) => A.value === b.value
|
|
1425
1425
|
);
|
|
1426
|
-
await
|
|
1426
|
+
await _e.confirm(
|
|
1427
1427
|
`Are you sure you want to send bundle ${r.value.name} to ${S == null ? void 0 : S.label}?`,
|
|
1428
1428
|
"Confirm",
|
|
1429
1429
|
"Confirm",
|
|
@@ -1452,43 +1452,43 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1452
1452
|
`${D.Config.getCountry().currency.symbol}${je((A = r.value) == null ? void 0 : A.price)}`
|
|
1453
1453
|
), (Y = r.value) != null && Y.coinPrice && S.push(`${r.value.coinPrice} point(s)`), S.join(" or ");
|
|
1454
1454
|
});
|
|
1455
|
-
return
|
|
1455
|
+
return x({
|
|
1456
1456
|
showSheet: c,
|
|
1457
1457
|
hideSheet: y
|
|
1458
1458
|
}), fe(async () => {
|
|
1459
1459
|
await d("");
|
|
1460
1460
|
}), (S, w) => {
|
|
1461
|
-
const A = h("FmCardMedia"), Y = h("FmCardHeader"), W = h("FmChip"), K = h("FmCardSection"), z = h("FmCard"), ae = h("FmSelect"), s = h("FmTextField"),
|
|
1461
|
+
const A = h("FmCardMedia"), Y = h("FmCardHeader"), W = h("FmChip"), K = h("FmCardSection"), z = h("FmCard"), ae = h("FmSelect"), s = h("FmTextField"), k = h("FmForm"), R = h("FmButton"), O = h("FmSideSheet");
|
|
1462
1462
|
return g(), I(O, {
|
|
1463
1463
|
"max-width": 560,
|
|
1464
1464
|
"dismiss-away": !0,
|
|
1465
1465
|
header: "Send bundle to member",
|
|
1466
1466
|
modelValue: e(u),
|
|
1467
1467
|
"onUpdate:modelValue": [
|
|
1468
|
-
w[4] || (w[4] = (
|
|
1469
|
-
w[5] || (w[5] = (
|
|
1468
|
+
w[4] || (w[4] = (P) => oe(u) ? u.value = P : null),
|
|
1469
|
+
w[5] || (w[5] = (P) => u.value = P)
|
|
1470
1470
|
]
|
|
1471
1471
|
}, {
|
|
1472
1472
|
"side-sheet-footer": T(() => [
|
|
1473
|
-
|
|
1473
|
+
_("div", cn, [
|
|
1474
1474
|
i(R, {
|
|
1475
1475
|
label: "Send",
|
|
1476
1476
|
loading: e(Se)().isLoading,
|
|
1477
1477
|
onClick: w[2] || (w[2] = async () => {
|
|
1478
|
-
var
|
|
1479
|
-
return (
|
|
1478
|
+
var P;
|
|
1479
|
+
return (P = e(t)) == null ? void 0 : P.validateInputs();
|
|
1480
1480
|
})
|
|
1481
1481
|
}, null, 8, ["loading"]),
|
|
1482
1482
|
i(R, {
|
|
1483
1483
|
label: "Cancel",
|
|
1484
1484
|
type: "button",
|
|
1485
1485
|
variant: "tertiary",
|
|
1486
|
-
onClick: w[3] || (w[3] = (
|
|
1486
|
+
onClick: w[3] || (w[3] = (P) => u.value = !1)
|
|
1487
1487
|
})
|
|
1488
1488
|
])
|
|
1489
1489
|
]),
|
|
1490
1490
|
default: T(() => [
|
|
1491
|
-
i(
|
|
1491
|
+
i(k, {
|
|
1492
1492
|
class: "space-y-16",
|
|
1493
1493
|
ref_key: "form",
|
|
1494
1494
|
ref: t,
|
|
@@ -1502,9 +1502,9 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1502
1502
|
variant: "outlined"
|
|
1503
1503
|
}, {
|
|
1504
1504
|
default: T(() => {
|
|
1505
|
-
var
|
|
1505
|
+
var P, N;
|
|
1506
1506
|
return [
|
|
1507
|
-
(
|
|
1507
|
+
(P = e(r)) != null && P.image ? (g(), I(A, {
|
|
1508
1508
|
key: 0,
|
|
1509
1509
|
width: "100",
|
|
1510
1510
|
src: (N = e(r)) == null ? void 0 : N.image
|
|
@@ -1520,14 +1520,14 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1520
1520
|
}, null, 8, ["title", "subtitle"]),
|
|
1521
1521
|
i(K, { class: "p-0" }, {
|
|
1522
1522
|
default: T(() => {
|
|
1523
|
-
var n, C,
|
|
1523
|
+
var n, C, $, E, q, H, ie, ge, ce, ve, le;
|
|
1524
1524
|
return [
|
|
1525
|
-
|
|
1525
|
+
_("div", un, [
|
|
1526
1526
|
(n = e(r)) != null && n.isFeedvibe ? (g(), I(W, {
|
|
1527
1527
|
key: 0,
|
|
1528
1528
|
label: "Feedvibe"
|
|
1529
1529
|
})) : M("", !0),
|
|
1530
|
-
(
|
|
1530
|
+
($ = (C = e(r)) == null ? void 0 : C.titles) != null && $.length ? (g(), I(W, {
|
|
1531
1531
|
key: 1,
|
|
1532
1532
|
label: `${e(r).titles.length} title(s)`
|
|
1533
1533
|
}, null, 8, ["label"])) : M("", !0),
|
|
@@ -1554,20 +1554,20 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1554
1554
|
}),
|
|
1555
1555
|
i(ae, {
|
|
1556
1556
|
modelValue: e(b),
|
|
1557
|
-
"onUpdate:modelValue": w[0] || (w[0] = (
|
|
1557
|
+
"onUpdate:modelValue": w[0] || (w[0] = (P) => oe(b) ? b.value = P : null),
|
|
1558
1558
|
label: "Select member",
|
|
1559
1559
|
searchable: "",
|
|
1560
1560
|
items: e(m),
|
|
1561
1561
|
onSearch: d,
|
|
1562
|
-
rules: [(
|
|
1562
|
+
rules: [(P) => !!P > 0 || "Member is required"],
|
|
1563
1563
|
"helper-text": "Type to search member"
|
|
1564
1564
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
1565
1565
|
i(s, {
|
|
1566
1566
|
modelValue: e(o),
|
|
1567
|
-
"onUpdate:modelValue": w[1] || (w[1] = (
|
|
1567
|
+
"onUpdate:modelValue": w[1] || (w[1] = (P) => oe(o) ? o.value = P : null),
|
|
1568
1568
|
label: "Reference (optional)",
|
|
1569
1569
|
rules: [
|
|
1570
|
-
(
|
|
1570
|
+
(P) => P.length < 50 || "Reference must be less than 50 characters"
|
|
1571
1571
|
]
|
|
1572
1572
|
}, null, 8, ["modelValue", "rules"])
|
|
1573
1573
|
]),
|
|
@@ -1579,14 +1579,11 @@ const Xt = /* @__PURE__ */ ee({
|
|
|
1579
1579
|
};
|
|
1580
1580
|
}
|
|
1581
1581
|
});
|
|
1582
|
-
var
|
|
1583
|
-
const
|
|
1584
|
-
src: Ye,
|
|
1585
|
-
class: "aspect-square w-[150px]"
|
|
1586
|
-
}, null, -1), Cn = { class: "flex flex-col gap-16 text-center" }, Sn = { class: "fm-typo-en-title-sm-800" }, Fn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, to = /* @__PURE__ */ ee({
|
|
1582
|
+
var pn = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", licensePortalUrl: "https://license.feedme.cc/", marketingV1Portal: "https://marketing-v1.feedme.cc" };
|
|
1583
|
+
const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8 items-center" }, bn = { class: "fm-typo-en-body-lg-600" }, gn = { class: "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-24" }, vn = { class: "flex flex-col gap-16 text-center" }, hn = { class: "fm-typo-en-title-sm-800" }, xn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xn = /* @__PURE__ */ ee({
|
|
1587
1584
|
__name: "Store",
|
|
1588
1585
|
setup(v) {
|
|
1589
|
-
const
|
|
1586
|
+
const x = {
|
|
1590
1587
|
label: "Setup payout account",
|
|
1591
1588
|
value: "payout",
|
|
1592
1589
|
isPrimary: !1
|
|
@@ -1604,14 +1601,14 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1604
1601
|
prependIcon: "add"
|
|
1605
1602
|
}, o = U(), m = ct(), u = ke(), { global: t, minor: c } = Ee, y = Me(), d = j(() => u.sortedStoreCategories), V = j(() => u.sortedStoreCategories.map((s) => s.name)), l = U(), S = U();
|
|
1606
1603
|
async function w(s) {
|
|
1607
|
-
var
|
|
1608
|
-
s === "setting" ? (
|
|
1604
|
+
var k;
|
|
1605
|
+
s === "setting" ? (k = l.value) == null || k.showSheet(!0, u.storeOption) : s === "create_category" ? Y(-1) : s === "create_reward" ? await m.push({ name: Ge["$connect-STORE_REWARDS"] }) : s == "payout" && window.open(pn.paymentPortalUrl, "_blank");
|
|
1609
1606
|
}
|
|
1610
1607
|
async function A(s) {
|
|
1611
1608
|
await c(
|
|
1612
1609
|
async () => {
|
|
1613
|
-
var
|
|
1614
|
-
await Ce.updateStore(s), await u.readMemberStore(), (
|
|
1610
|
+
var k;
|
|
1611
|
+
await Ce.updateStore(s), await u.readMemberStore(), (k = l.value) == null || k.showSheet(!1);
|
|
1615
1612
|
},
|
|
1616
1613
|
{
|
|
1617
1614
|
message: a("connect.store.setting.update.message"),
|
|
@@ -1620,30 +1617,30 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1620
1617
|
);
|
|
1621
1618
|
}
|
|
1622
1619
|
async function Y(s = -1) {
|
|
1623
|
-
var
|
|
1624
|
-
if ((!u.storeOption || !u.storeOption.company) && await
|
|
1620
|
+
var k, R;
|
|
1621
|
+
if ((!u.storeOption || !u.storeOption.company) && await _e.confirm(
|
|
1625
1622
|
a("connect.store.category.setup.title"),
|
|
1626
1623
|
a("connect.store.category.setup.button"),
|
|
1627
1624
|
a("connect.store.category.setup.action"),
|
|
1628
1625
|
a("connect.common.cancel")
|
|
1629
1626
|
))
|
|
1630
|
-
return (
|
|
1627
|
+
return (k = l.value) == null ? void 0 : k.showSheet(!0);
|
|
1631
1628
|
y.open({
|
|
1632
1629
|
title: s == -1 ? a("connect.store.category.add") : a("connect.store.category.edit"),
|
|
1633
|
-
contentComponent:
|
|
1630
|
+
contentComponent: wt,
|
|
1634
1631
|
contentComponentProps: {
|
|
1635
1632
|
initialValue: ((R = d.value[s]) == null ? void 0 : R.name) ?? "",
|
|
1636
1633
|
action: s == -1 ? "add" : "edit"
|
|
1637
1634
|
}
|
|
1638
1635
|
}).onPrimary(async (O) => {
|
|
1639
|
-
O === null && !await
|
|
1636
|
+
O === null && !await _e.remove(
|
|
1640
1637
|
a("connect.store.category.remove.confirm"),
|
|
1641
1638
|
a("connect.store.category.remove.title")
|
|
1642
1639
|
) || await c(
|
|
1643
1640
|
async () => {
|
|
1644
|
-
const
|
|
1641
|
+
const P = s == -1 ? [...d.value, { name: O, bundles: [] }] : [...d.value].map((N, p) => p == s ? { ...N, name: O } : N).filter((N) => N.name !== null);
|
|
1645
1642
|
await Ce.updateStoreBundle({
|
|
1646
|
-
categories:
|
|
1643
|
+
categories: P
|
|
1647
1644
|
}), await u.readMemberStore();
|
|
1648
1645
|
},
|
|
1649
1646
|
{
|
|
@@ -1653,21 +1650,21 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1653
1650
|
);
|
|
1654
1651
|
});
|
|
1655
1652
|
}
|
|
1656
|
-
async function W(s,
|
|
1653
|
+
async function W(s, k, R, O) {
|
|
1657
1654
|
var p, n, C;
|
|
1658
|
-
|
|
1659
|
-
const
|
|
1660
|
-
for (const
|
|
1661
|
-
for (const E of
|
|
1655
|
+
k ?? (k = (p = S.value) == null ? void 0 : p.target.category), R ?? (R = (n = S.value) == null ? void 0 : n.target.index), O ?? (O = (C = S.value) == null ? void 0 : C.target.originalCategoryIndex);
|
|
1656
|
+
const P = De(d.value);
|
|
1657
|
+
for (const $ of P)
|
|
1658
|
+
for (const E of $.bundles)
|
|
1662
1659
|
console.log(E, "bundle in payload"), "pf_vouchers" in E && delete E.pf_vouchers;
|
|
1663
|
-
|
|
1664
|
-
const N = k
|
|
1660
|
+
k != O && O != null && (P[O].bundles.splice(R, 1), R = P[k].bundles.length);
|
|
1661
|
+
const N = P[k];
|
|
1665
1662
|
if (!N) {
|
|
1666
1663
|
nt.error("Unexpected error", 2e3);
|
|
1667
1664
|
return;
|
|
1668
1665
|
}
|
|
1669
1666
|
if (s == null) {
|
|
1670
|
-
if (await
|
|
1667
|
+
if (await _e.remove(
|
|
1671
1668
|
a("connect.store.bundle.delete.confirm"),
|
|
1672
1669
|
a("connect.store.bundle.delete.title")
|
|
1673
1670
|
) == !1)
|
|
@@ -1677,16 +1674,16 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1677
1674
|
R == -1 ? N.bundles.push(s) : N.bundles[R] = s;
|
|
1678
1675
|
await c(
|
|
1679
1676
|
async () => {
|
|
1680
|
-
var
|
|
1677
|
+
var $, E;
|
|
1681
1678
|
if (s != null) {
|
|
1682
|
-
const q = (
|
|
1679
|
+
const q = ($ = S.value) == null ? void 0 : $.bundleImage;
|
|
1683
1680
|
q === null && s.image ? (await Fe.delete(s.image), s.image = null) : q && (s.image = await Fe.update(
|
|
1684
1681
|
Fe.bundleImagePath(void 0, q),
|
|
1685
1682
|
q
|
|
1686
1683
|
));
|
|
1687
1684
|
}
|
|
1688
1685
|
await Ce.updateStoreBundle({
|
|
1689
|
-
categories:
|
|
1686
|
+
categories: P
|
|
1690
1687
|
}), await u.readMemberStore(), await u.readMembership(), await u.readRewards(), (E = S.value) == null || E.showSheet(!1);
|
|
1691
1688
|
},
|
|
1692
1689
|
{
|
|
@@ -1696,25 +1693,25 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1696
1693
|
);
|
|
1697
1694
|
}
|
|
1698
1695
|
function K(s) {
|
|
1699
|
-
var
|
|
1700
|
-
(
|
|
1696
|
+
var k;
|
|
1697
|
+
(k = S.value) == null || k.showSheet(!0, {
|
|
1701
1698
|
...s,
|
|
1702
1699
|
bundle: s.bundle ? De(s.bundle) : void 0
|
|
1703
1700
|
});
|
|
1704
1701
|
}
|
|
1705
1702
|
const z = U([]);
|
|
1706
1703
|
function ae(s) {
|
|
1707
|
-
var
|
|
1708
|
-
(
|
|
1704
|
+
var k;
|
|
1705
|
+
(k = o.value) == null || k.showSheet({
|
|
1709
1706
|
bundle: s
|
|
1710
1707
|
});
|
|
1711
1708
|
}
|
|
1712
1709
|
return fe(async () => {
|
|
1713
|
-
var
|
|
1710
|
+
var k, R;
|
|
1714
1711
|
await t(async () => {
|
|
1715
|
-
var O,
|
|
1712
|
+
var O, P;
|
|
1716
1713
|
if (await u.readMemberStore(), await u.readMembership(), await u.readRewards(), await u.readPayoutAccount(), (O = m.currentRoute.value.query) != null && O.action) {
|
|
1717
|
-
switch ((
|
|
1714
|
+
switch ((P = m.currentRoute.value.query) == null ? void 0 : P.action) {
|
|
1718
1715
|
case "update_setting":
|
|
1719
1716
|
w("setting");
|
|
1720
1717
|
break;
|
|
@@ -1724,7 +1721,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1724
1721
|
case "create_feedvibe_bundle":
|
|
1725
1722
|
y.open({
|
|
1726
1723
|
title: "Select category",
|
|
1727
|
-
contentComponent:
|
|
1724
|
+
contentComponent: $t
|
|
1728
1725
|
}).onPrimary((N) => {
|
|
1729
1726
|
y.close(), K({
|
|
1730
1727
|
categories: V.value,
|
|
@@ -1745,29 +1742,29 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1745
1742
|
m.replace({ query: {} });
|
|
1746
1743
|
}
|
|
1747
1744
|
});
|
|
1748
|
-
const s = ((
|
|
1745
|
+
const s = ((k = u.payoutAccount) == null ? void 0 : k.status) === "APPROVED" && ((R = u.payoutAccount) == null ? void 0 : R.enable) === !0;
|
|
1749
1746
|
z.value = [
|
|
1750
|
-
...s ? [] : [
|
|
1747
|
+
...s ? [] : [x],
|
|
1751
1748
|
f,
|
|
1752
1749
|
r,
|
|
1753
1750
|
b
|
|
1754
1751
|
];
|
|
1755
|
-
}), (s,
|
|
1756
|
-
const R = h("FmPageHead"), O = h("FmButton"),
|
|
1752
|
+
}), (s, k) => {
|
|
1753
|
+
const R = h("FmPageHead"), O = h("FmButton"), P = h("FmCard");
|
|
1757
1754
|
return g(), B(X, null, [
|
|
1758
1755
|
i(R, {
|
|
1759
1756
|
title: e(a)("connect.store.title"),
|
|
1760
1757
|
actions: e(z),
|
|
1761
1758
|
"onClick:action": w
|
|
1762
1759
|
}, null, 8, ["title", "actions"]),
|
|
1763
|
-
|
|
1760
|
+
_("div", yn, [
|
|
1764
1761
|
e(d) && e(d).length > 0 ? (g(), B(X, { key: 0 }, [
|
|
1765
1762
|
(g(!0), B(X, null, re(e(d), (N, p) => (g(), B("div", {
|
|
1766
1763
|
key: N.name,
|
|
1767
1764
|
class: "space-y-8 py-12"
|
|
1768
1765
|
}, [
|
|
1769
|
-
|
|
1770
|
-
|
|
1766
|
+
_("div", fn, [
|
|
1767
|
+
_("div", bn, L(N.name), 1),
|
|
1771
1768
|
i(Pe, { json: N }, null, 8, ["json"]),
|
|
1772
1769
|
i(O, {
|
|
1773
1770
|
icon: "edit",
|
|
@@ -1776,20 +1773,20 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1776
1773
|
onClick: (n) => Y(p)
|
|
1777
1774
|
}, null, 8, ["onClick"])
|
|
1778
1775
|
]),
|
|
1779
|
-
|
|
1780
|
-
(g(!0), B(X, null, re(N.bundles, (n, C) => (g(), I(
|
|
1776
|
+
_("div", gn, [
|
|
1777
|
+
(g(!0), B(X, null, re(N.bundles, (n, C) => (g(), I(_t, {
|
|
1781
1778
|
bundle: n,
|
|
1782
1779
|
key: n._id,
|
|
1783
|
-
onEdit: (
|
|
1780
|
+
onEdit: ($) => K({
|
|
1784
1781
|
bundle: n,
|
|
1785
1782
|
category: p,
|
|
1786
1783
|
index: C,
|
|
1787
1784
|
categories: e(V)
|
|
1788
1785
|
}),
|
|
1789
|
-
onDelete: (
|
|
1786
|
+
onDelete: ($) => W(null, p, C),
|
|
1790
1787
|
onSend: ae
|
|
1791
1788
|
}, null, 8, ["bundle", "onEdit", "onDelete"]))), 128)),
|
|
1792
|
-
i(
|
|
1789
|
+
i(Ct, {
|
|
1793
1790
|
onCreate: (n) => K({
|
|
1794
1791
|
category: p,
|
|
1795
1792
|
index: -1,
|
|
@@ -1798,37 +1795,40 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1798
1795
|
}, null, 8, ["onCreate"])
|
|
1799
1796
|
])
|
|
1800
1797
|
]))), 128)),
|
|
1801
|
-
i(
|
|
1798
|
+
i(dn, {
|
|
1802
1799
|
ref_key: "bundleSheetRef",
|
|
1803
1800
|
ref: S,
|
|
1804
1801
|
onUpdate: W
|
|
1805
1802
|
}, null, 512)
|
|
1806
|
-
], 64)) : (g(), I(
|
|
1803
|
+
], 64)) : (g(), I(P, {
|
|
1807
1804
|
key: 1,
|
|
1808
1805
|
variant: "outlined",
|
|
1809
1806
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
1810
1807
|
}, {
|
|
1811
1808
|
default: T(() => [
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1809
|
+
k[1] || (k[1] = _("img", {
|
|
1810
|
+
src: Ye,
|
|
1811
|
+
class: "aspect-square w-[150px]"
|
|
1812
|
+
}, null, -1)),
|
|
1813
|
+
_("div", vn, [
|
|
1814
|
+
_("div", hn, L(e(a)("connect.store.bundle.title")), 1),
|
|
1815
|
+
_("div", xn, L(e(a)("connect.store.bundle.description")), 1)
|
|
1816
1816
|
]),
|
|
1817
1817
|
i(O, {
|
|
1818
1818
|
variant: "primary",
|
|
1819
1819
|
label: e(a)("connect.store.actions.addCategory"),
|
|
1820
1820
|
icon: "add",
|
|
1821
|
-
onClick:
|
|
1821
|
+
onClick: k[0] || (k[0] = (N) => Y(-1))
|
|
1822
1822
|
}, null, 8, ["label"])
|
|
1823
1823
|
]),
|
|
1824
1824
|
_: 1
|
|
1825
1825
|
})),
|
|
1826
|
-
i(
|
|
1826
|
+
i(Wt, {
|
|
1827
1827
|
ref_key: "settingSheetRef",
|
|
1828
1828
|
ref: l,
|
|
1829
1829
|
onUpdate: A
|
|
1830
1830
|
}, null, 512),
|
|
1831
|
-
i(
|
|
1831
|
+
i(mn, {
|
|
1832
1832
|
ref_key: "sendBundleSheetRef",
|
|
1833
1833
|
ref: o
|
|
1834
1834
|
}, null, 512)
|
|
@@ -1838,5 +1838,5 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1838
1838
|
}
|
|
1839
1839
|
});
|
|
1840
1840
|
export {
|
|
1841
|
-
|
|
1841
|
+
Xn as default
|
|
1842
1842
|
};
|