@feedmepos/mf-connect 0.1.0-beta.62 → 0.1.0-beta.64
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-CZofkL_c.js → Analytic-B325EvdK.js} +11 -11
- package/dist/{App-duE_AJqe.js → App-Cm-p4GBZ.js} +6 -6
- package/dist/{AuditLogs-DutcPIE2.js → AuditLogs-Da6jqw_l.js} +8 -8
- package/dist/{Bin-BGFg2nCk.js → Bin-Cgxr39me.js} +8 -8
- package/dist/{Broadcast-CnOpaER8.js → Broadcast-CR3YdMim.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B-zuTksy.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DJDw0QLZ.js} +6 -6
- package/dist/{Card-D2fnPu8D.js → Card-CIlXJesR.js} +15 -15
- package/dist/{Collections-C7BF8KXA.js → Collections-Dkp13T6I.js} +5 -5
- package/dist/{Credit-CZioaJrN.js → Credit-BL7s3TmG.js} +9 -9
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-xqz145Dc.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BgKNPE7p.js} +28 -28
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-O4v86-mN.js → EffectSheet.vue_vue_type_style_index_0_lang-BTXLeEQV.js} +45 -45
- package/dist/{Experience-B2dNP4Ht.js → Experience-Cr7c9Dmr.js} +9 -9
- package/dist/{Game-BI4Bqn1m.js → Game-qBiDfoX8.js} +9 -9
- package/dist/{Index-tz-XmFTF.js → Index-D1DjHCn6.js} +10 -10
- package/dist/{Marketing-Ci_VUzUI.js → Marketing-RKv-hDji.js} +6 -6
- package/dist/{Member-BLa4bDUF.js → Member-BpE1hEHn.js} +5 -5
- package/dist/{MemberList-L-_vOrn_.js → MemberList-D7LB9fXz.js} +24 -24
- package/dist/{MemberTransactions-D4nf1xFm.js → MemberTransactions-BWHZqhcv.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BCsaSW4P.js → MessageInput.vue_vue_type_script_setup_true_lang-DPnmbxWD.js} +2 -2
- package/dist/{Mission-rAPcd01t.js → Mission-CPNWKX0I.js} +9 -9
- package/dist/{Overview-DPrlOcgo.js → Overview-DJels2bf.js} +17 -17
- package/dist/{Point-Dqf5dHyp.js → Point-PXjurF_w.js} +9 -9
- package/dist/{Promotion-Cd1ZkdOC.js → Promotion-CFFuDmX9.js} +10 -10
- package/dist/{Queue-BK-0T_mw.js → Queue-C-0R9noT.js} +9 -9
- package/dist/{Record-B_UICVJp.js → Record-Cg3Uk_e0.js} +7 -7
- package/dist/{Reward-WjzuJDG3.js → Reward-q3OH71kA.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BSkREth1.js → RewardGroup.vue_vue_type_script_setup_true_lang-CTDa510y.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-fdD6QmMo.js → RuleGroup.vue_vue_type_script_setup_true_lang-D6y3fXbd.js} +12 -12
- package/dist/{Segment-LCQp7yFU.js → Segment-BUxi24U7.js} +14 -14
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CsYTUykJ.js → SelectItems.vue_vue_type_script_setup_true_lang-xA3_GoYK.js} +2 -2
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Br4iyQnk.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CKPEsDLl.js} +3 -3
- package/dist/{Setting-DEBKrIrZ.js → Setting-Y3cUXNMQ.js} +10 -10
- package/dist/{Store-D-VnFXXb.js → Store-DhwEmp-R.js} +578 -494
- package/dist/{StoreRewards-BQePjt8a.js → StoreRewards-BWOMVEzb.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DIiMqyQ4.js → StoreTransactions.vue_vue_type_script_setup_true_lang-B7BAEEiB.js} +17 -17
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-atONAPM9.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C3K5UV1O.js} +1 -1
- package/dist/{Tier-rvjwX1oN.js → Tier-5sRNLSO1.js} +19 -19
- package/dist/{Title-2Te1Z8L_.js → Title-BwGfSgM4.js} +19 -19
- package/dist/{Transaction-7xL3nMig.js → Transaction-BbIdqQsD.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-C7j9opqh.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-qNeUH0Gf.js} +6 -6
- package/dist/{Voucher-DLwMEm2g.js → Voucher-BvOxoMrH.js} +12 -12
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BjkTOUYG.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BtazBTn_.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DBUEmzcs.js → ZodTextField.vue_vue_type_script_setup_true_lang-BWcX9cJf.js} +1 -1
- package/dist/{app-DkKtpaKX.js → app-33F7lJW2.js} +1 -1
- package/dist/{app-BShWGgpm.js → app-CoVaAkSk.js} +31 -31
- package/dist/app.js +1 -1
- package/dist/{business-C2C62fmX.js → business-BtgsuI9Z.js} +1 -1
- package/dist/{campaign-C3S0GWWR.js → campaign-D6PH5eQ_.js} +9 -9
- package/dist/{campaign-Cd2Xvdnr.js → campaign-GRjeK1WI.js} +2 -2
- package/dist/{campaign.enum-Cbm_ptfY.js → campaign.enum-KcUV41Ki.js} +1 -1
- package/dist/{campaign.fn-C-GOEh0w.js → campaign.fn-DlaQfCnQ.js} +131 -131
- package/dist/{collectible.enum-CHS5qsdh.js → collectible.enum-D8QbCobD.js} +1 -1
- package/dist/{collection.fn-REHsES3X.js → collection.fn-By3YQRv8.js} +2 -2
- package/dist/{dto-CGSpsQ6n.js → dto-CuPBd2H3.js} +4 -4
- package/dist/{effect-FpVy58EM.js → effect-BokWNg14.js} +35 -18
- package/dist/{email-addresses-CAjqVugi.js → email-addresses-DE4qV3Eh.js} +1 -1
- package/dist/{export-BcKoJs_C.js → export-B8kx1Nmt.js} +3 -3
- package/dist/{helper-pgFU5X3a.js → helper-COmipb68.js} +1 -1
- package/dist/{index-CArWRFoQ.js → index-8CMfJmg3.js} +4 -4
- package/dist/{index-CAPuLnGU.js → index-BNKBRRdT.js} +1 -1
- package/dist/{index-C0-0sWRy.js → index-Bk9xhO-D.js} +1 -1
- package/dist/{index-C_BvwoUm.js → index-BtjSlXEc.js} +1 -1
- package/dist/{index-B8NVI4dz.js → index-BtzXDz7E.js} +1 -1
- package/dist/{index-DGMvMDKq.js → index-CQct2DL8.js} +1 -1
- package/dist/{index-ydNGavnu.js → index-DBqFcTrv.js} +6 -6
- package/dist/{index-BP-isrwr.js → index-DHw_2WuP.js} +3 -3
- package/dist/{index-BwurOQvo.js → index-DKqP75Bm.js} +1 -1
- package/dist/{index-C_MHfWjy.js → index-DiTg_x8h.js} +1 -1
- package/dist/index-SzOkDo2y.js +29556 -0
- package/dist/{index-DBtdOASF.js → index-esK00bm6.js} +2 -2
- package/dist/{index.esm2017-pmeVCWAr.js → index.esm2017-IwuN8acP.js} +1 -1
- package/dist/{loading-DGuuMKTZ.js → loading-BWW2Z1X0.js} +1 -1
- package/dist/{membership-BawPINR9.js → membership-CJK6mxff.js} +3 -3
- package/dist/{money-CxS3dRJv.js → money-DDs_MtN7.js} +1 -1
- package/dist/{number-BTmiI23H.js → number-pF7bUUUj.js} +1 -1
- package/dist/{objectid-lKrpTxxC.js → objectid-Bjt4ojTL.js} +3 -3
- package/dist/{plugins-DxZVLGOA.js → plugins-BsO39OJE.js} +4 -4
- package/dist/{reward-DV6wq-w3.js → reward-2pJnAigN.js} +1 -1
- package/dist/{rule-DTmrn71Z.js → rule-DxWfHg0z.js} +3 -3
- package/dist/{rule-builder-BDDy0h4p.js → rule-builder-DlCdj9oR.js} +1 -1
- package/dist/{template-CyP4_Pkv.js → template-DDGHUxfa.js} +4 -4
- package/dist/{trigger-CNXsYYai.js → trigger-DQxt8ZNb.js} +4 -4
- package/dist/{user-qYAZabq2.js → user-C0hkkvCd.js} +1 -1
- package/dist/{vue-i18n-PyVAnDDy.js → vue-i18n-BrZbqfu6.js} +366 -366
- package/dist/{xlsx-Be-UKhyI.js → xlsx-CzvLdaX-.js} +1 -1
- package/package.json +2 -2
- package/dist/index-B7xzzZ_T.js +0 -29000
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { defineComponent as ee, computed as j, resolveComponent as h, openBlock as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { useDialog as
|
|
4
|
-
import { c as
|
|
5
|
-
import { u as Ee } from "./loading-
|
|
6
|
-
import { u as
|
|
7
|
-
import { a as Je, c 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 R, isRef as oe, reactive as Ke, onMounted as fe, watch as we, toRaw as He, createTextVNode as de, h as qe } from "vue";
|
|
2
|
+
import { _ as Ye } from "./tier-BJDhpH6X.js";
|
|
3
|
+
import { useDialog as Me, useDialogChild as Oe, components as We } from "@feedmepos/ui-library";
|
|
4
|
+
import { c as N, e as he, S as ze } from "./index-SzOkDo2y.js";
|
|
5
|
+
import { u as Ee } from "./loading-BWW2Z1X0.js";
|
|
6
|
+
import { u as ke, C as me } from "./membership-CJK6mxff.js";
|
|
7
|
+
import { a as Je, c as De } from "./object-qECH92oz.js";
|
|
8
8
|
import { _ as ue } from "./lodash-B5I3zXaY.js";
|
|
9
|
-
import { d as se, a as Ge, p as
|
|
10
|
-
import { u as be } from "./vue-i18n-
|
|
9
|
+
import { d as se, a as Ge, p as _e, n as Xe, f as Fe } from "./plugins-BsO39OJE.js";
|
|
10
|
+
import { u as be } from "./vue-i18n-BrZbqfu6.js";
|
|
11
11
|
import { Z, g as J, a as G } from "./zod-Bg2FbC-D.js";
|
|
12
|
-
import { z as Q, R as Ze } from "./app-
|
|
13
|
-
import { k as Qe, l as et, m as tt, n as
|
|
14
|
-
import { u as
|
|
15
|
-
import { _ as te } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
import { J as
|
|
17
|
-
import { _ as ot } from "./index-
|
|
18
|
-
import { _ as
|
|
19
|
-
import { _ as
|
|
20
|
-
import { z as st, a as rt } from "./money-
|
|
21
|
-
import { F as it } from "./number-
|
|
22
|
-
import { t as dt } from "./helper-
|
|
23
|
-
import "./index-
|
|
24
|
-
import "./index-
|
|
25
|
-
import "./index-
|
|
26
|
-
import "./index-
|
|
27
|
-
import { m as ut } from "./index-
|
|
28
|
-
import { m as
|
|
12
|
+
import { z as Q, R as Ze } from "./app-CoVaAkSk.js";
|
|
13
|
+
import { k as Qe, l as et, m as tt, n as Ae, o as nt } from "./index-8CMfJmg3.js";
|
|
14
|
+
import { u as Se } from "./app-wDQR6dpb.js";
|
|
15
|
+
import { _ as te } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BWcX9cJf.js";
|
|
16
|
+
import { J as Pe } from "./JsonViewer-v8_C7l5N.js";
|
|
17
|
+
import { _ as ot } from "./index-esK00bm6.js";
|
|
18
|
+
import { _ as at } from "./ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js";
|
|
19
|
+
import { _ as lt } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
20
|
+
import { z as st, a as rt } from "./money-DDs_MtN7.js";
|
|
21
|
+
import { F as it } from "./number-pF7bUUUj.js";
|
|
22
|
+
import { t as dt } from "./helper-COmipb68.js";
|
|
23
|
+
import "./index-CQct2DL8.js";
|
|
24
|
+
import "./index-DBqFcTrv.js";
|
|
25
|
+
import "./index-Bk9xhO-D.js";
|
|
26
|
+
import "./index-DHw_2WuP.js";
|
|
27
|
+
import { m as ut } from "./index-BtzXDz7E.js";
|
|
28
|
+
import { m as Ce } from "./index-DiTg_x8h.js";
|
|
29
29
|
import { useRouter as ct } from "vue-router";
|
|
30
|
-
function je(
|
|
31
|
-
return se.DineroFactory(
|
|
30
|
+
function je(v) {
|
|
31
|
+
return se.DineroFactory(v).toUnit();
|
|
32
32
|
}
|
|
33
|
-
function mt(
|
|
33
|
+
function mt(v, x, l, f, r = [], b = []) {
|
|
34
34
|
const o = ot.compact(
|
|
35
|
-
x.map((t) =>
|
|
35
|
+
x.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
37
|
(t, c) => {
|
|
38
38
|
var y;
|
|
@@ -63,7 +63,7 @@ function mt(g, x, a, f, r = [], b = []) {
|
|
|
63
63
|
level: 0,
|
|
64
64
|
type: {
|
|
65
65
|
type: "BY_AMOUNT",
|
|
66
|
-
amount: se.DineroFactory(
|
|
66
|
+
amount: se.DineroFactory(l).subtract(se.Dinero.fromNumber({ number: f }).toObject()).toObject()
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
},
|
|
@@ -84,63 +84,63 @@ function mt(g, x, a, f, r = [], b = []) {
|
|
|
84
84
|
}).convertPrecision(2).toObject()
|
|
85
85
|
}));
|
|
86
86
|
}
|
|
87
|
-
function pt(
|
|
88
|
-
return
|
|
87
|
+
function pt(v, x, l) {
|
|
88
|
+
return v ? v.reduce((f, r) => {
|
|
89
89
|
var b;
|
|
90
|
-
return (b =
|
|
90
|
+
return (b = l.find((o) => o.systemCode === r.systemCode)) != null && b.inclusive || (f = se.DineroFactory(f.toObject()).add(r.total)), f;
|
|
91
91
|
}, se.DineroFactory(x)).toObject() : se.DineroFactory(x).toObject();
|
|
92
92
|
}
|
|
93
93
|
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 = {
|
|
94
94
|
key: 2,
|
|
95
95
|
class: "absolute top-2 left-2"
|
|
96
|
-
},
|
|
96
|
+
}, 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({
|
|
97
97
|
__name: "StoreBundleCard",
|
|
98
98
|
props: {
|
|
99
99
|
bundle: { type: Object, required: !0 }
|
|
100
100
|
},
|
|
101
101
|
emits: ["edit", "delete", "send"],
|
|
102
|
-
setup(
|
|
103
|
-
const
|
|
102
|
+
setup(v, { emit: x }) {
|
|
103
|
+
const l = v, f = x, r = j(() => {
|
|
104
104
|
const o = [];
|
|
105
|
-
return
|
|
106
|
-
`${
|
|
107
|
-
),
|
|
105
|
+
return l.bundle.price.amount > 0 && o.push(
|
|
106
|
+
`${N.Config.getCountry().currency.symbol}${je(l.bundle.price)}`
|
|
107
|
+
), l.bundle.coinPrice && o.push(`${l.bundle.coinPrice} point(s)`), o.join(" or ");
|
|
108
108
|
}), b = j(() => {
|
|
109
109
|
var m, u;
|
|
110
110
|
const o = [];
|
|
111
|
-
if (
|
|
112
|
-
const t =
|
|
111
|
+
if (l.bundle.titles.length > 0 && o.push(`${l.bundle.titles.length} title(s)`), l.bundle.vouchers.length > 0 && o.push(`${l.bundle.vouchers.length} voucher(s)`), l.bundle.credit.normal || (m = l.bundle.credit.free) != null && m.amount) {
|
|
112
|
+
const t = l.bundle.credit.normal + (((u = l.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 u = h("FmIcon"), t = h("FmChip"), c = h("FmButton"), y = h("FmMenuItem"), d = h("FmMenu"),
|
|
119
|
-
return
|
|
118
|
+
const u = h("FmIcon"), t = h("FmChip"), c = h("FmButton"), y = h("FmMenuItem"), d = h("FmMenu"), V = h("FmCard");
|
|
119
|
+
return g(), I(V, {
|
|
120
120
|
variant: "outlined",
|
|
121
121
|
class: "flex flex-col gap-y-8 p-16 min-h-[240px] h-full text-center items-center"
|
|
122
122
|
}, {
|
|
123
123
|
default: T(() => [
|
|
124
124
|
_("div", yt, [
|
|
125
|
-
|
|
125
|
+
v.bundle.image ? (g(), B("img", {
|
|
126
126
|
key: 1,
|
|
127
|
-
src:
|
|
127
|
+
src: v.bundle.image,
|
|
128
128
|
class: "w-full h-full object-contain aspect-video"
|
|
129
|
-
}, null, 8, ft)) : (
|
|
129
|
+
}, null, 8, ft)) : (g(), I(u, {
|
|
130
130
|
key: 0,
|
|
131
131
|
name: "image",
|
|
132
132
|
outline: !0,
|
|
133
133
|
size: "md",
|
|
134
134
|
class: "text-fm-color-neutral-gray-200"
|
|
135
135
|
})),
|
|
136
|
-
|
|
136
|
+
v.bundle.isFeedvibe ? (g(), B("div", bt, [
|
|
137
137
|
i(t, {
|
|
138
138
|
label: "Feedvibe",
|
|
139
139
|
class: "text-fm-color-primary bg-fm-color-system-warning-100",
|
|
140
140
|
compact: ""
|
|
141
141
|
})
|
|
142
|
-
])) :
|
|
143
|
-
_("div",
|
|
142
|
+
])) : M("", !0),
|
|
143
|
+
_("div", gt, [
|
|
144
144
|
i(d, { placement: "bottom-end" }, {
|
|
145
145
|
"menu-button": T(() => [
|
|
146
146
|
i(c, {
|
|
@@ -150,18 +150,18 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
150
150
|
]),
|
|
151
151
|
default: T(() => [
|
|
152
152
|
i(y, {
|
|
153
|
-
onClick: m[0] || (m[0] = (
|
|
153
|
+
onClick: m[0] || (m[0] = (a) => f("edit", v.bundle)),
|
|
154
154
|
icon: "edit",
|
|
155
155
|
label: "Edit"
|
|
156
156
|
}),
|
|
157
|
-
|
|
157
|
+
v.bundle.stripePriceId ? M("", !0) : (g(), I(y, {
|
|
158
158
|
key: 0,
|
|
159
|
-
onClick: m[1] || (m[1] = (
|
|
159
|
+
onClick: m[1] || (m[1] = (a) => f("send", v.bundle)),
|
|
160
160
|
icon: "send",
|
|
161
161
|
label: "Send"
|
|
162
162
|
})),
|
|
163
163
|
i(y, {
|
|
164
|
-
onClick: m[2] || (m[2] = (
|
|
164
|
+
onClick: m[2] || (m[2] = (a) => f("delete", v.bundle)),
|
|
165
165
|
icon: "delete"
|
|
166
166
|
}, {
|
|
167
167
|
label: T(() => m[3] || (m[3] = [
|
|
@@ -174,12 +174,12 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
174
174
|
})
|
|
175
175
|
])
|
|
176
176
|
]),
|
|
177
|
-
_("div",
|
|
177
|
+
_("div", vt, L(v.bundle.name), 1),
|
|
178
178
|
_("div", ht, L(e(r) || "Free"), 1),
|
|
179
179
|
_("div", xt, [
|
|
180
|
-
(
|
|
181
|
-
key:
|
|
182
|
-
label:
|
|
180
|
+
(g(!0), B(X, null, re(e(b), (a, S) => (g(), I(t, {
|
|
181
|
+
key: S,
|
|
182
|
+
label: a
|
|
183
183
|
}, null, 8, ["label"]))), 128))
|
|
184
184
|
])
|
|
185
185
|
]),
|
|
@@ -190,18 +190,18 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
190
190
|
}), Ct = /* @__PURE__ */ ee({
|
|
191
191
|
__name: "AddBundleCard",
|
|
192
192
|
emits: ["create"],
|
|
193
|
-
setup(
|
|
194
|
-
const { t:
|
|
193
|
+
setup(v, { emit: x }) {
|
|
194
|
+
const { t: l } = be(), f = x;
|
|
195
195
|
return (r, b) => {
|
|
196
196
|
const o = h("FmButton"), m = h("FmCard");
|
|
197
|
-
return
|
|
197
|
+
return g(), I(m, {
|
|
198
198
|
variant: "outlined",
|
|
199
199
|
class: "flex flex-col gap-y-8 p-16 h-full min-h-[240px] items-center justify-center"
|
|
200
200
|
}, {
|
|
201
201
|
default: T(() => [
|
|
202
202
|
i(o, {
|
|
203
203
|
onClick: b[0] || (b[0] = (u) => f("create")),
|
|
204
|
-
label: e(
|
|
204
|
+
label: e(l)("connect.store.actions.addBundle"),
|
|
205
205
|
icon: "add",
|
|
206
206
|
variant: "secondary"
|
|
207
207
|
}, null, 8, ["label"])
|
|
@@ -210,7 +210,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
210
210
|
});
|
|
211
211
|
};
|
|
212
212
|
}
|
|
213
|
-
}),
|
|
213
|
+
}), 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({
|
|
214
214
|
__name: "CategoryDialog",
|
|
215
215
|
props: {
|
|
216
216
|
action: {
|
|
@@ -222,8 +222,8 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
222
222
|
default: () => ""
|
|
223
223
|
}
|
|
224
224
|
},
|
|
225
|
-
setup(
|
|
226
|
-
const { t: x } = be(),
|
|
225
|
+
setup(v) {
|
|
226
|
+
const { t: x } = be(), l = v, f = Me(), { emitData: r, emitAction: b } = Oe(), o = R(l.initialValue), m = Q.string().min(1);
|
|
227
227
|
function u() {
|
|
228
228
|
r(o.value), b("primary"), f.close();
|
|
229
229
|
}
|
|
@@ -231,31 +231,31 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
231
231
|
r(null), b("primary"), f.close();
|
|
232
232
|
}
|
|
233
233
|
return (c, y) => {
|
|
234
|
-
const d = h("FmTextField"),
|
|
235
|
-
return
|
|
234
|
+
const d = h("FmTextField"), V = h("FmButton");
|
|
235
|
+
return g(), B("div", St, [
|
|
236
236
|
i(d, {
|
|
237
237
|
modelValue: e(o),
|
|
238
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
|
238
|
+
"onUpdate:modelValue": y[0] || (y[0] = (a) => oe(o) ? o.value = a : null),
|
|
239
239
|
label: e(x)("connect.store.category.label"),
|
|
240
240
|
rules: [e(Z).toRule(e(m))]
|
|
241
241
|
}, null, 8, ["modelValue", "label", "rules"]),
|
|
242
|
-
_("div",
|
|
242
|
+
_("div", Ft, [
|
|
243
243
|
_("div", null, [
|
|
244
|
-
|
|
244
|
+
v.action == "edit" ? (g(), I(V, {
|
|
245
245
|
key: 0,
|
|
246
246
|
onClick: t,
|
|
247
247
|
label: e(x)("connect.common.delete"),
|
|
248
248
|
variant: "destructive"
|
|
249
|
-
}, null, 8, ["label"])) :
|
|
249
|
+
}, null, 8, ["label"])) : M("", !0)
|
|
250
250
|
]),
|
|
251
|
-
_("div",
|
|
252
|
-
i(
|
|
251
|
+
_("div", Vt, [
|
|
252
|
+
i(V, {
|
|
253
253
|
label: e(x)("connect.common.cancel"),
|
|
254
254
|
variant: "tertiary",
|
|
255
|
-
onClick: y[1] || (y[1] = (
|
|
255
|
+
onClick: y[1] || (y[1] = (a) => e(f).close())
|
|
256
256
|
}, null, 8, ["label"]),
|
|
257
|
-
i(
|
|
258
|
-
label:
|
|
257
|
+
i(V, {
|
|
258
|
+
label: v.action == "edit" ? e(x)("connect.common.edit") : e(x)("connect.common.add"),
|
|
259
259
|
disabled: !e(o),
|
|
260
260
|
onClick: u
|
|
261
261
|
}, null, 8, ["label", "disabled"])
|
|
@@ -264,10 +264,10 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
264
264
|
]);
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
}),
|
|
267
|
+
}), kt = { class: "space-y-16" }, Pt = { class: "flex items-center justify-end gap-8 pb-16" }, $t = /* @__PURE__ */ ee({
|
|
268
268
|
__name: "SelectCategoryDialog",
|
|
269
|
-
setup(
|
|
270
|
-
const { emitData: x, emitAction:
|
|
269
|
+
setup(v) {
|
|
270
|
+
const { emitData: x, emitAction: l } = Oe(), f = ke(), r = R(), b = j(
|
|
271
271
|
() => f.sortedStoreCategories.map((o, m) => ({
|
|
272
272
|
label: o.name,
|
|
273
273
|
value: m
|
|
@@ -275,7 +275,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
275
275
|
);
|
|
276
276
|
return (o, m) => {
|
|
277
277
|
const u = h("FmSelect"), t = h("FmButton");
|
|
278
|
-
return
|
|
278
|
+
return g(), B("div", kt, [
|
|
279
279
|
m[4] || (m[4] = _("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Select a category to create FeedMe CNY 2025 bundle ", -1)),
|
|
280
280
|
i(u, {
|
|
281
281
|
placeholder: "Select a category",
|
|
@@ -287,15 +287,15 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
287
287
|
],
|
|
288
288
|
label: "Category"
|
|
289
289
|
}, null, 8, ["items", "modelValue"]),
|
|
290
|
-
_("div",
|
|
290
|
+
_("div", Pt, [
|
|
291
291
|
i(t, {
|
|
292
292
|
variant: "tertiary",
|
|
293
293
|
label: "Cancel",
|
|
294
|
-
onClick: m[2] || (m[2] = (c) => e(
|
|
294
|
+
onClick: m[2] || (m[2] = (c) => e(l)("tertiary"))
|
|
295
295
|
}),
|
|
296
296
|
i(t, {
|
|
297
297
|
label: "Select",
|
|
298
|
-
onClick: m[3] || (m[3] = (c) => e(
|
|
298
|
+
onClick: m[3] || (m[3] = (c) => e(l)("primary")),
|
|
299
299
|
disabled: e(r) == null
|
|
300
300
|
}, null, 8, ["disabled"])
|
|
301
301
|
])
|
|
@@ -303,11 +303,11 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
305
|
});
|
|
306
|
-
function
|
|
307
|
-
return
|
|
306
|
+
function xe(v) {
|
|
307
|
+
return v.states.map((x) => ({ label: x, value: x }));
|
|
308
308
|
}
|
|
309
309
|
const Tt = {
|
|
310
|
-
[
|
|
310
|
+
[he.F_COUNTRY.enum.MY]: {
|
|
311
311
|
states: [
|
|
312
312
|
"Johor",
|
|
313
313
|
"Kedah",
|
|
@@ -327,16 +327,16 @@ const Tt = {
|
|
|
327
327
|
"Terengganu"
|
|
328
328
|
],
|
|
329
329
|
get stateItems() {
|
|
330
|
-
return
|
|
330
|
+
return xe(this);
|
|
331
331
|
}
|
|
332
332
|
},
|
|
333
|
-
[
|
|
333
|
+
[he.F_COUNTRY.enum.SG]: {
|
|
334
334
|
states: [],
|
|
335
335
|
get stateItems() {
|
|
336
|
-
return
|
|
336
|
+
return xe(this);
|
|
337
337
|
}
|
|
338
338
|
},
|
|
339
|
-
[
|
|
339
|
+
[he.F_COUNTRY.enum.ID]: {
|
|
340
340
|
states: [
|
|
341
341
|
"Aceh",
|
|
342
342
|
"Bali",
|
|
@@ -373,10 +373,94 @@ const Tt = {
|
|
|
373
373
|
"West Sumatra"
|
|
374
374
|
],
|
|
375
375
|
get stateItems() {
|
|
376
|
-
return
|
|
376
|
+
return xe(this);
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
[he.F_COUNTRY.enum.TH]: {
|
|
380
|
+
states: [
|
|
381
|
+
"Bangkok",
|
|
382
|
+
"Amnat Charoen",
|
|
383
|
+
"Ang Thong",
|
|
384
|
+
"Bueng Kan",
|
|
385
|
+
"Buri Ram",
|
|
386
|
+
"Chachoengsao",
|
|
387
|
+
"Chai Nat",
|
|
388
|
+
"Chaiyaphum",
|
|
389
|
+
"Chanthaburi",
|
|
390
|
+
"Chiang Mai",
|
|
391
|
+
"Chiang Rai",
|
|
392
|
+
"Chonburi",
|
|
393
|
+
"Chumphon",
|
|
394
|
+
"Kalasin",
|
|
395
|
+
"Kamphaeng Phet",
|
|
396
|
+
"Kanchanaburi",
|
|
397
|
+
"Khon Kaen",
|
|
398
|
+
"Krabi",
|
|
399
|
+
"Lampang",
|
|
400
|
+
"Lamphun",
|
|
401
|
+
"Loei",
|
|
402
|
+
"Lopburi",
|
|
403
|
+
"Mae Hong Son",
|
|
404
|
+
"Maha Sarakham",
|
|
405
|
+
"Mukdahan",
|
|
406
|
+
"Nakhon Nayok",
|
|
407
|
+
"Nakhon Pathom",
|
|
408
|
+
"Nakhon Phanom",
|
|
409
|
+
"Nakhon Ratchasima",
|
|
410
|
+
"Nakhon Sawan",
|
|
411
|
+
"Nakhon Si Thammarat",
|
|
412
|
+
"Nan",
|
|
413
|
+
"Narathiwat",
|
|
414
|
+
"Nong Bua Lamphu",
|
|
415
|
+
"Nong Khai",
|
|
416
|
+
"Nonthaburi",
|
|
417
|
+
"Pathum Thani",
|
|
418
|
+
"Pattani",
|
|
419
|
+
"Phang Nga",
|
|
420
|
+
"Phatthalung",
|
|
421
|
+
"Phayao",
|
|
422
|
+
"Phetchabun",
|
|
423
|
+
"Phetchaburi",
|
|
424
|
+
"Phichit",
|
|
425
|
+
"Phitsanulok",
|
|
426
|
+
"Phra Nakhon Si Ayutthaya",
|
|
427
|
+
"Phrae",
|
|
428
|
+
"Phuket",
|
|
429
|
+
"Prachinburi",
|
|
430
|
+
"Prachuap Khiri Khan",
|
|
431
|
+
"Ranong",
|
|
432
|
+
"Ratchaburi",
|
|
433
|
+
"Rayong",
|
|
434
|
+
"Roi Et",
|
|
435
|
+
"Sa Kaeo",
|
|
436
|
+
"Sakon Nakhon",
|
|
437
|
+
"Samut Prakan",
|
|
438
|
+
"Samut Sakhon",
|
|
439
|
+
"Samut Songkhram",
|
|
440
|
+
"Saraburi",
|
|
441
|
+
"Satun",
|
|
442
|
+
"Sing Buri",
|
|
443
|
+
"Sisaket",
|
|
444
|
+
"Songkhla",
|
|
445
|
+
"Sukhothai",
|
|
446
|
+
"Suphan Buri",
|
|
447
|
+
"Surat Thani",
|
|
448
|
+
"Surin",
|
|
449
|
+
"Tak",
|
|
450
|
+
"Trang",
|
|
451
|
+
"Trat",
|
|
452
|
+
"Ubon Ratchathani",
|
|
453
|
+
"Udon Thani",
|
|
454
|
+
"Uthai Thani",
|
|
455
|
+
"Uttaradit",
|
|
456
|
+
"Yala",
|
|
457
|
+
"Yasothon"
|
|
458
|
+
],
|
|
459
|
+
get stateItems() {
|
|
460
|
+
return xe(this);
|
|
377
461
|
}
|
|
378
462
|
}
|
|
379
|
-
}, pe = () =>
|
|
463
|
+
}, pe = () => N.Config.getCountry(), ye = {
|
|
380
464
|
get fullCurrency() {
|
|
381
465
|
return pe().currency;
|
|
382
466
|
},
|
|
@@ -384,30 +468,30 @@ const Tt = {
|
|
|
384
468
|
return pe().currency.code;
|
|
385
469
|
},
|
|
386
470
|
get fullTax() {
|
|
387
|
-
return
|
|
471
|
+
return N.Country.getCountryFlattenTaxes(pe().code);
|
|
388
472
|
},
|
|
389
473
|
get taxSystem() {
|
|
390
474
|
return pe().taxSystems;
|
|
391
475
|
},
|
|
392
|
-
taxInclusion(
|
|
476
|
+
taxInclusion(v) {
|
|
393
477
|
return ye.taxSystem.map((x) => ({
|
|
394
478
|
systemCode: x.code,
|
|
395
|
-
inclusive:
|
|
479
|
+
inclusive: v !== void 0 ? v : !1
|
|
396
480
|
}));
|
|
397
481
|
},
|
|
398
482
|
groupedTaxOptions() {
|
|
399
|
-
const
|
|
483
|
+
const v = N.Country.getCountryFlattenTaxes(pe().code);
|
|
400
484
|
return ye.taxSystem.map((x) => ({
|
|
401
485
|
code: x.code,
|
|
402
|
-
options:
|
|
486
|
+
options: v.map((l) => ({ ...l, feedmeTaxCode: ye.generateCode(l) })).filter((l) => l.systemCode === x.code)
|
|
403
487
|
}));
|
|
404
488
|
},
|
|
405
|
-
systemDefaultCode(
|
|
406
|
-
const x = ye.groupedTaxOptions().find((
|
|
407
|
-
return x == null ? void 0 : x.options.find((
|
|
489
|
+
systemDefaultCode(v) {
|
|
490
|
+
const x = ye.groupedTaxOptions().find((l) => l.code === v);
|
|
491
|
+
return x == null ? void 0 : x.options.find((l) => l.default);
|
|
408
492
|
},
|
|
409
|
-
generateCode(
|
|
410
|
-
return `${
|
|
493
|
+
generateCode(v) {
|
|
494
|
+
return `${v.systemCode}/${v.taxCode}`;
|
|
411
495
|
}
|
|
412
496
|
}, ne = ye, Ut = /* @__PURE__ */ ee({
|
|
413
497
|
__name: "TaxInclusiveSetting",
|
|
@@ -419,18 +503,18 @@ const Tt = {
|
|
|
419
503
|
}
|
|
420
504
|
},
|
|
421
505
|
emits: ["update:model-value"],
|
|
422
|
-
setup(
|
|
423
|
-
const
|
|
506
|
+
setup(v, { emit: x }) {
|
|
507
|
+
const l = v, f = ne.taxSystem, r = x, b = R(l.modelValue);
|
|
424
508
|
function o(c, y) {
|
|
425
|
-
const d = ue.clone(
|
|
426
|
-
|
|
509
|
+
const d = ue.clone(l.modelValue), V = d.findIndex((a) => a.systemCode === c);
|
|
510
|
+
V >= 0 ? d[V].inclusive = y : d.push({
|
|
427
511
|
systemCode: c,
|
|
428
512
|
inclusive: y
|
|
429
513
|
}), b.value = d, r("update:model-value", d);
|
|
430
514
|
}
|
|
431
515
|
function m() {
|
|
432
516
|
return f.map((c) => {
|
|
433
|
-
const y =
|
|
517
|
+
const y = l.modelValue ? l.modelValue.find((d) => d.systemCode === c.code) : !1;
|
|
434
518
|
return {
|
|
435
519
|
label: c.name,
|
|
436
520
|
config: {
|
|
@@ -442,31 +526,31 @@ const Tt = {
|
|
|
442
526
|
};
|
|
443
527
|
});
|
|
444
528
|
}
|
|
445
|
-
const u =
|
|
529
|
+
const u = Ke(m());
|
|
446
530
|
function t(c, y) {
|
|
447
531
|
return `${c} ${y ? "Inclusive" : "Exclusive"}`;
|
|
448
532
|
}
|
|
449
533
|
return fe(() => {
|
|
450
|
-
|
|
534
|
+
l.modelValue.length || o(f[0].code, !1);
|
|
451
535
|
}), we(
|
|
452
|
-
() =>
|
|
536
|
+
() => l.modelValue,
|
|
453
537
|
(c, y) => {
|
|
454
538
|
c != y && !c.length && o(f[0].code, !1);
|
|
455
539
|
}
|
|
456
540
|
), (c, y) => {
|
|
457
541
|
const d = h("FmSwitch");
|
|
458
|
-
return
|
|
459
|
-
var
|
|
460
|
-
return
|
|
542
|
+
return g(!0), B(X, null, re(e(u), (V, a) => {
|
|
543
|
+
var S;
|
|
544
|
+
return g(), B("div", { key: a }, [
|
|
461
545
|
i(d, {
|
|
462
|
-
"model-value": ((
|
|
546
|
+
"model-value": ((S = e(b)[a]) == null ? void 0 : S.inclusive) || !1,
|
|
463
547
|
"label-placement": "left",
|
|
464
|
-
"onUpdate:modelValue": (
|
|
548
|
+
"onUpdate:modelValue": (k) => V.input(k)
|
|
465
549
|
}, {
|
|
466
550
|
label: T(() => {
|
|
467
|
-
var
|
|
551
|
+
var k;
|
|
468
552
|
return [
|
|
469
|
-
_("div", null, L(t(
|
|
553
|
+
_("div", null, L(t(V.label, ((k = e(b)[a]) == null ? void 0 : k.inclusive) || !1)), 1)
|
|
470
554
|
];
|
|
471
555
|
}),
|
|
472
556
|
_: 2
|
|
@@ -477,43 +561,43 @@ const Tt = {
|
|
|
477
561
|
}
|
|
478
562
|
});
|
|
479
563
|
var Rt = { mode: "development", appMode: "mf" };
|
|
480
|
-
const It = { class: "space-y-8" },
|
|
564
|
+
const It = { class: "space-y-8" }, Bt = {
|
|
481
565
|
key: 0,
|
|
482
566
|
class: "space-y-16"
|
|
483
|
-
},
|
|
567
|
+
}, Nt = /* @__PURE__ */ ee({
|
|
484
568
|
__name: "StripeSetting",
|
|
485
569
|
props: {
|
|
486
570
|
modelValue: {}
|
|
487
571
|
},
|
|
488
572
|
emits: ["update:modelValue"],
|
|
489
|
-
setup(
|
|
490
|
-
const
|
|
573
|
+
setup(v, { emit: x }) {
|
|
574
|
+
const l = v, f = x, r = R(!1);
|
|
491
575
|
we(r, (o, m) => {
|
|
492
|
-
m != o && (!
|
|
576
|
+
m != o && (!l.modelValue && o ? f("update:modelValue", {
|
|
493
577
|
apiKey: "",
|
|
494
578
|
webhookSecret: ""
|
|
495
579
|
}) : o || f("update:modelValue", void 0));
|
|
496
580
|
});
|
|
497
581
|
const b = j(() => {
|
|
498
|
-
const o = Rt.mode === "development", m =
|
|
499
|
-
return `https://marketing${o ? "-dev" : ""}${u}.feedmeapi.com/stripe/${
|
|
582
|
+
const o = Rt.mode === "development", m = N.Config.getCountry().code.toLowerCase(), u = m != "my" ? `.${m}` : "";
|
|
583
|
+
return `https://marketing${o ? "-dev" : ""}${u}.feedmeapi.com/stripe/${ze.getBusinessId()}/webhook`;
|
|
500
584
|
});
|
|
501
585
|
return fe(() => {
|
|
502
|
-
r.value = !!
|
|
586
|
+
r.value = !!l.modelValue;
|
|
503
587
|
}), (o, m) => {
|
|
504
588
|
const u = h("FmSwitch"), t = h("FmTextField"), c = h("FmButton");
|
|
505
|
-
return
|
|
589
|
+
return g(), B("div", It, [
|
|
506
590
|
i(u, {
|
|
507
591
|
modelValue: e(r),
|
|
508
592
|
"onUpdate:modelValue": m[0] || (m[0] = (y) => oe(r) ? r.value = y : null),
|
|
509
593
|
value: "true",
|
|
510
594
|
label: "Enable Stripe"
|
|
511
595
|
}, null, 8, ["modelValue"]),
|
|
512
|
-
|
|
596
|
+
l.modelValue ? (g(), B("div", Bt, [
|
|
513
597
|
i(t, {
|
|
514
598
|
label: "API Key",
|
|
515
|
-
modelValue:
|
|
516
|
-
"onUpdate:modelValue": m[1] || (m[1] = (y) =>
|
|
599
|
+
modelValue: l.modelValue.apiKey,
|
|
600
|
+
"onUpdate:modelValue": m[1] || (m[1] = (y) => l.modelValue.apiKey = y),
|
|
517
601
|
"helper-text": "Go to Stripe Dashboard get your API Key and paste here."
|
|
518
602
|
}, null, 8, ["modelValue"]),
|
|
519
603
|
i(t, {
|
|
@@ -532,27 +616,27 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
532
616
|
_: 1
|
|
533
617
|
}, 8, ["model-value"]),
|
|
534
618
|
i(t, {
|
|
535
|
-
modelValue:
|
|
536
|
-
"onUpdate:modelValue": m[3] || (m[3] = (y) =>
|
|
619
|
+
modelValue: l.modelValue.webhookSecret,
|
|
620
|
+
"onUpdate:modelValue": m[3] || (m[3] = (y) => l.modelValue.webhookSecret = y),
|
|
537
621
|
label: "Webhook Secret",
|
|
538
622
|
"helper-text": `Copy the webhook signing secret from your Stripe account and paste
|
|
539
623
|
here.`
|
|
540
624
|
}, null, 8, ["modelValue"])
|
|
541
|
-
])) :
|
|
625
|
+
])) : M("", !0)
|
|
542
626
|
]);
|
|
543
627
|
};
|
|
544
628
|
}
|
|
545
|
-
}),
|
|
629
|
+
}), Dt = {
|
|
546
630
|
key: 0,
|
|
547
631
|
class: "space-y-16 pr-12"
|
|
548
|
-
},
|
|
632
|
+
}, At = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Mt = {
|
|
549
633
|
key: 1,
|
|
550
634
|
class: "space-y-16"
|
|
551
|
-
},
|
|
635
|
+
}, 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({
|
|
552
636
|
__name: "StoreSettingSheet",
|
|
553
637
|
emits: ["update"],
|
|
554
|
-
setup(
|
|
555
|
-
const { t: f } = be(), r =
|
|
638
|
+
setup(v, { expose: x, emit: l }) {
|
|
639
|
+
const { t: f } = be(), r = l, b = R(!1), o = R(), m = R(!1), u = Qe.extend({
|
|
556
640
|
company: et.extend({
|
|
557
641
|
name: Q.string().min(1, "Company name is required"),
|
|
558
642
|
regNo: Q.string().min(1, "Registration number is required"),
|
|
@@ -569,8 +653,8 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
569
653
|
})
|
|
570
654
|
}), t = j(() => u.safeParse(o.value).success);
|
|
571
655
|
function c() {
|
|
572
|
-
const
|
|
573
|
-
|
|
656
|
+
const V = u.safeParse(o.value);
|
|
657
|
+
V.success && r("update", V.data);
|
|
574
658
|
}
|
|
575
659
|
function y() {
|
|
576
660
|
return {
|
|
@@ -582,7 +666,7 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
582
666
|
city: "",
|
|
583
667
|
postcode: "",
|
|
584
668
|
state: "",
|
|
585
|
-
country:
|
|
669
|
+
country: N.Config.getCountry().name
|
|
586
670
|
},
|
|
587
671
|
phoneNo: "",
|
|
588
672
|
regNo: "",
|
|
@@ -591,117 +675,117 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
591
675
|
inclusiveTaxes: []
|
|
592
676
|
};
|
|
593
677
|
}
|
|
594
|
-
function d(
|
|
595
|
-
b.value =
|
|
678
|
+
function d(V, a) {
|
|
679
|
+
b.value = V, V && (o.value = a != null && a.company ? a : y());
|
|
596
680
|
}
|
|
597
681
|
return x({
|
|
598
682
|
showSheet: d,
|
|
599
683
|
data: o
|
|
600
|
-
}), (
|
|
601
|
-
const
|
|
602
|
-
return
|
|
684
|
+
}), (V, a) => {
|
|
685
|
+
const S = h("FmIcon"), k = h("FmMenuItem"), D = h("FmMenu"), Y = h("FmSelect"), z = h("FmButton"), K = h("FmSideSheet");
|
|
686
|
+
return g(), I(K, {
|
|
603
687
|
"max-width": 560,
|
|
604
688
|
modelValue: e(b),
|
|
605
|
-
"onUpdate:modelValue":
|
|
689
|
+
"onUpdate:modelValue": a[15] || (a[15] = (W) => oe(b) ? b.value = W : null),
|
|
606
690
|
header: e(f)("connect.store.setting.title")
|
|
607
691
|
}, {
|
|
608
692
|
"side-sheet-footer": T(() => [
|
|
609
|
-
_("div",
|
|
610
|
-
i(
|
|
693
|
+
_("div", Yt, [
|
|
694
|
+
i(z, {
|
|
611
695
|
label: e(f)("connect.common.save"),
|
|
612
696
|
onClick: c,
|
|
613
|
-
disabled: !e(t) || e(
|
|
614
|
-
loading: e(
|
|
697
|
+
disabled: !e(t) || e(Se)().isLoading,
|
|
698
|
+
loading: e(Se)().isLoading
|
|
615
699
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
616
|
-
i(
|
|
700
|
+
i(z, {
|
|
617
701
|
label: e(f)("connect.common.cancel"),
|
|
618
|
-
onClick:
|
|
702
|
+
onClick: a[14] || (a[14] = (W) => d(!1)),
|
|
619
703
|
variant: "tertiary"
|
|
620
704
|
}, null, 8, ["label"])
|
|
621
705
|
])
|
|
622
706
|
]),
|
|
623
707
|
default: T(() => {
|
|
624
|
-
var
|
|
708
|
+
var W, ae;
|
|
625
709
|
return [
|
|
626
|
-
i(
|
|
627
|
-
e(o) && e(o).company ? (
|
|
628
|
-
_("div",
|
|
710
|
+
i(Pe, { json: e(o) }, null, 8, ["json"]),
|
|
711
|
+
e(o) && e(o).company ? (g(), B("div", Dt, [
|
|
712
|
+
_("div", At, L(e(f)("connect.store.setting.company.legal_info")), 1),
|
|
629
713
|
i(te, {
|
|
630
714
|
modelValue: e(o).company.name,
|
|
631
|
-
"onUpdate:modelValue":
|
|
715
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => e(o).company.name = s),
|
|
632
716
|
label: e(f)("connect.store.setting.company.name"),
|
|
633
717
|
schema: e(Z).typeAtPath(e(u), "company.name")
|
|
634
718
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
635
719
|
i(te, {
|
|
636
720
|
modelValue: e(o).company.regNo,
|
|
637
|
-
"onUpdate:modelValue":
|
|
721
|
+
"onUpdate:modelValue": a[1] || (a[1] = (s) => e(o).company.regNo = s),
|
|
638
722
|
label: e(f)("connect.store.setting.company.reg_no"),
|
|
639
723
|
schema: e(Z).typeAtPath(e(u), "company.regNo")
|
|
640
724
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
641
|
-
e(
|
|
725
|
+
e(N.Config).getCountry().taxSystems.length ? (g(), I(te, {
|
|
642
726
|
key: 0,
|
|
643
727
|
modelValue: e(o).company.sstRegNo,
|
|
644
728
|
"onUpdate:modelValue": [
|
|
645
|
-
|
|
646
|
-
|
|
729
|
+
a[2] || (a[2] = (s) => e(o).company.sstRegNo = s),
|
|
730
|
+
a[3] || (a[3] = (s) => s ? null : e(o).inclusiveTaxes = [])
|
|
647
731
|
],
|
|
648
732
|
label: e(f)("connect.store.setting.company.tax_reg_no"),
|
|
649
733
|
schema: e(Z).typeAtPath(e(u), "company.sstRegNo")
|
|
650
|
-
}, null, 8, ["modelValue", "label", "schema"])) :
|
|
651
|
-
(
|
|
652
|
-
_("div",
|
|
734
|
+
}, null, 8, ["modelValue", "label", "schema"])) : M("", !0),
|
|
735
|
+
(W = e(o).company) != null && W.sstRegNo && e(o).inclusiveTaxes ? (g(), B("div", Mt, [
|
|
736
|
+
_("div", Ot, L(e(f)("connect.store.setting.company.tax")), 1),
|
|
653
737
|
i(Ut, {
|
|
654
738
|
modelValue: e(o).inclusiveTaxes,
|
|
655
|
-
"onUpdate:modelValue":
|
|
739
|
+
"onUpdate:modelValue": a[4] || (a[4] = (s) => e(o).inclusiveTaxes = s)
|
|
656
740
|
}, null, 8, ["modelValue"])
|
|
657
|
-
])) :
|
|
741
|
+
])) : M("", !0),
|
|
658
742
|
i(te, {
|
|
659
743
|
modelValue: e(o).company.phoneNo,
|
|
660
|
-
"onUpdate:modelValue":
|
|
744
|
+
"onUpdate:modelValue": a[5] || (a[5] = (s) => e(o).company.phoneNo = s),
|
|
661
745
|
label: e(f)("connect.store.setting.company.phone"),
|
|
662
746
|
schema: e(Z).typeAtPath(e(u), "company.phoneNo")
|
|
663
747
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
664
748
|
_("div", Et, L(e(f)("connect.store.setting.company.address.title")), 1),
|
|
665
749
|
i(te, {
|
|
666
750
|
modelValue: e(o).company.address.line1,
|
|
667
|
-
"onUpdate:modelValue":
|
|
751
|
+
"onUpdate:modelValue": a[6] || (a[6] = (s) => e(o).company.address.line1 = s),
|
|
668
752
|
label: e(f)("connect.store.setting.company.address.line1"),
|
|
669
753
|
schema: e(Z).typeAtPath(e(u), "company.address.line1")
|
|
670
754
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
671
755
|
i(te, {
|
|
672
756
|
modelValue: e(o).company.address.line2,
|
|
673
|
-
"onUpdate:modelValue":
|
|
757
|
+
"onUpdate:modelValue": a[7] || (a[7] = (s) => e(o).company.address.line2 = s),
|
|
674
758
|
label: e(f)("connect.store.setting.company.address.line2"),
|
|
675
759
|
schema: e(Z).typeAtPath(e(u), "company.address.line2")
|
|
676
760
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
677
761
|
_("div", jt, [
|
|
678
762
|
i(te, {
|
|
679
763
|
modelValue: e(o).company.address.city,
|
|
680
|
-
"onUpdate:modelValue":
|
|
764
|
+
"onUpdate:modelValue": a[8] || (a[8] = (s) => e(o).company.address.city = s),
|
|
681
765
|
label: e(f)("connect.store.setting.company.address.city"),
|
|
682
766
|
schema: e(Z).typeAtPath(e(u), "company.address.city")
|
|
683
767
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
684
768
|
i(te, {
|
|
685
769
|
modelValue: e(o).company.address.postcode,
|
|
686
|
-
"onUpdate:modelValue":
|
|
770
|
+
"onUpdate:modelValue": a[9] || (a[9] = (s) => e(o).company.address.postcode = s),
|
|
687
771
|
label: e(f)("connect.store.setting.company.address.postcode"),
|
|
688
772
|
schema: e(Z).typeAtPath(e(u), "company.address.postcode")
|
|
689
773
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
690
774
|
_("div", Lt, [
|
|
691
|
-
_("div",
|
|
692
|
-
i(
|
|
775
|
+
_("div", Kt, L(e(f)("connect.store.setting.company.address.state")), 1),
|
|
776
|
+
i(D, {
|
|
693
777
|
placement: "top-end",
|
|
694
778
|
"model-value": e(m)
|
|
695
779
|
}, {
|
|
696
780
|
"menu-button": T(() => [
|
|
697
781
|
i(te, {
|
|
698
782
|
modelValue: e(o).company.address.state,
|
|
699
|
-
"onUpdate:modelValue":
|
|
783
|
+
"onUpdate:modelValue": a[10] || (a[10] = (s) => e(o).company.address.state = s),
|
|
700
784
|
schema: e(Z).typeAtPath(e(u), "company.address.state"),
|
|
701
|
-
onFocusChanged:
|
|
785
|
+
onFocusChanged: a[11] || (a[11] = (s) => m.value = s)
|
|
702
786
|
}, {
|
|
703
787
|
append: T(() => [
|
|
704
|
-
i(
|
|
788
|
+
i(S, {
|
|
705
789
|
name: e(m) ? "keyboard_arrow_up" : "keyboard_arrow_down"
|
|
706
790
|
}, null, 8, ["name"])
|
|
707
791
|
]),
|
|
@@ -709,12 +793,12 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
709
793
|
}, 8, ["modelValue", "schema"])
|
|
710
794
|
]),
|
|
711
795
|
default: T(() => [
|
|
712
|
-
(
|
|
796
|
+
(g(!0), B(X, null, re(e(Tt)[e(N.Config).getCountry().code].stateItems.filter(
|
|
713
797
|
(s) => {
|
|
714
798
|
var w, U;
|
|
715
799
|
return s.label.toLowerCase().includes(((U = (w = e(o)) == null ? void 0 : w.company) == null ? void 0 : U.address.state.toLowerCase()) ?? "");
|
|
716
800
|
}
|
|
717
|
-
) || [], (s) => (
|
|
801
|
+
) || [], (s) => (g(), I(k, {
|
|
718
802
|
key: s.value,
|
|
719
803
|
"model-value": e(o).company.address.state === s.value,
|
|
720
804
|
label: s.label,
|
|
@@ -726,27 +810,27 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
726
810
|
_: 1
|
|
727
811
|
}, 8, ["model-value"])
|
|
728
812
|
]),
|
|
729
|
-
i(
|
|
813
|
+
i(Y, {
|
|
730
814
|
label: e(f)("connect.store.setting.company.address.country"),
|
|
731
815
|
modelValue: e(o).company.address.country,
|
|
732
|
-
"onUpdate:modelValue":
|
|
816
|
+
"onUpdate:modelValue": a[12] || (a[12] = (s) => e(o).company.address.country = s),
|
|
733
817
|
items: [
|
|
734
818
|
{
|
|
735
|
-
label: e(
|
|
736
|
-
value: e(
|
|
819
|
+
label: e(N.Config).getCountry().name,
|
|
820
|
+
value: e(N.Config).getCountry().name
|
|
737
821
|
}
|
|
738
822
|
],
|
|
739
823
|
rules: [e(Z).ruleAtPath(e(u), "company.address.country")]
|
|
740
824
|
}, null, 8, ["label", "modelValue", "items", "rules"])
|
|
741
825
|
]),
|
|
742
|
-
_("div",
|
|
743
|
-
_("div",
|
|
744
|
-
i(
|
|
745
|
-
"model-value": (
|
|
746
|
-
"onUpdate:modelValue":
|
|
826
|
+
_("div", Ht, [
|
|
827
|
+
_("div", qt, L(e(f)("connect.store.setting.stripe.title")), 1),
|
|
828
|
+
i(Nt, {
|
|
829
|
+
"model-value": (ae = e(o)) == null ? void 0 : ae.stripe,
|
|
830
|
+
"onUpdate:modelValue": a[13] || (a[13] = (s) => e(o).stripe = s)
|
|
747
831
|
}, null, 8, ["model-value"])
|
|
748
832
|
])
|
|
749
|
-
])) :
|
|
833
|
+
])) : M("", !0)
|
|
750
834
|
];
|
|
751
835
|
}),
|
|
752
836
|
_: 1
|
|
@@ -754,8 +838,8 @@ const It = { class: "space-y-8" }, Dt = {
|
|
|
754
838
|
};
|
|
755
839
|
}
|
|
756
840
|
});
|
|
757
|
-
function
|
|
758
|
-
return
|
|
841
|
+
function zt(v, x = !0) {
|
|
842
|
+
return N.DineroFactory(v).toFormat(x);
|
|
759
843
|
}
|
|
760
844
|
const Jt = /* @__PURE__ */ ee({
|
|
761
845
|
__name: "TaxVariantSetting",
|
|
@@ -767,15 +851,15 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
767
851
|
}
|
|
768
852
|
},
|
|
769
853
|
emits: ["update:modelValue"],
|
|
770
|
-
setup(
|
|
771
|
-
const
|
|
854
|
+
setup(v, { emit: x }) {
|
|
855
|
+
const l = v, f = x;
|
|
772
856
|
fe(() => {
|
|
773
857
|
if (o.value.length !== b.value.length) {
|
|
774
858
|
const t = b.value.reduce((c, y) => {
|
|
775
859
|
const d = ne.systemDefaultCode(y.name);
|
|
776
860
|
if (!d) return c;
|
|
777
|
-
const { systemCode:
|
|
778
|
-
return y.value || c.push({ systemCode:
|
|
861
|
+
const { systemCode: V, taxCode: a } = d;
|
|
862
|
+
return y.value || c.push({ systemCode: V, taxCode: a }), c;
|
|
779
863
|
}, []);
|
|
780
864
|
u(t);
|
|
781
865
|
}
|
|
@@ -792,46 +876,46 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
792
876
|
label: `${c.name} (${it(c.rate)}%)`,
|
|
793
877
|
value: c.feedmeTaxCode
|
|
794
878
|
}))
|
|
795
|
-
}))), o = j(() =>
|
|
879
|
+
}))), o = j(() => l.modelValue.map((t) => ne.generateCode(t)));
|
|
796
880
|
function m(t) {
|
|
797
881
|
const c = r().find(
|
|
798
|
-
(
|
|
799
|
-
), y = c == null ? void 0 : c.options.find((
|
|
882
|
+
(a) => a.options.some((S) => S.feedmeTaxCode === t)
|
|
883
|
+
), y = c == null ? void 0 : c.options.find((a) => a.feedmeTaxCode === t);
|
|
800
884
|
if (!y) return;
|
|
801
|
-
const { systemCode: d, taxCode:
|
|
802
|
-
u([{ systemCode: d, taxCode:
|
|
885
|
+
const { systemCode: d, taxCode: V } = y;
|
|
886
|
+
u([{ systemCode: d, taxCode: V }]);
|
|
803
887
|
}
|
|
804
888
|
function u(t) {
|
|
805
|
-
const c = ue.clone(
|
|
889
|
+
const c = ue.clone(l.modelValue);
|
|
806
890
|
t.forEach((y) => {
|
|
807
891
|
const d = r().find(
|
|
808
|
-
(
|
|
809
|
-
),
|
|
810
|
-
(
|
|
892
|
+
(S) => S.options.some((k) => k.feedmeTaxCode === ne.generateCode(y))
|
|
893
|
+
), V = (d == null ? void 0 : d.options) || [], a = c.findIndex(
|
|
894
|
+
(S) => V.some((k) => ne.generateCode(k) === ne.generateCode(S))
|
|
811
895
|
);
|
|
812
|
-
|
|
896
|
+
a >= 0 ? c.splice(a, 1, y) : c.push(y);
|
|
813
897
|
}), f("update:modelValue", c);
|
|
814
898
|
}
|
|
815
899
|
return (t, c) => {
|
|
816
900
|
const y = h("FmRadio"), d = h("FmRadioGroup");
|
|
817
|
-
return
|
|
818
|
-
key:
|
|
901
|
+
return g(!0), B(X, null, re(e(b), (V) => (g(), B("div", {
|
|
902
|
+
key: V.name,
|
|
819
903
|
class: "flex items-start"
|
|
820
904
|
}, [
|
|
821
905
|
i(d, {
|
|
822
|
-
modelValue:
|
|
906
|
+
modelValue: V.value,
|
|
823
907
|
"onUpdate:modelValue": [
|
|
824
|
-
(
|
|
825
|
-
c[0] || (c[0] = (
|
|
826
|
-
m(
|
|
908
|
+
(a) => V.value = a,
|
|
909
|
+
c[0] || (c[0] = (a) => {
|
|
910
|
+
m(a);
|
|
827
911
|
})
|
|
828
912
|
]
|
|
829
913
|
}, {
|
|
830
914
|
default: T(() => [
|
|
831
|
-
(
|
|
832
|
-
key:
|
|
833
|
-
value:
|
|
834
|
-
label:
|
|
915
|
+
(g(!0), B(X, null, re(V.options, (a, S) => (g(), I(y, {
|
|
916
|
+
key: S,
|
|
917
|
+
value: a.value,
|
|
918
|
+
label: a.label
|
|
835
919
|
}, null, 8, ["value", "label"]))), 128))
|
|
836
920
|
]),
|
|
837
921
|
_: 2
|
|
@@ -839,13 +923,13 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
839
923
|
]))), 128);
|
|
840
924
|
};
|
|
841
925
|
}
|
|
842
|
-
}),
|
|
926
|
+
}), Ve = {
|
|
843
927
|
get _id() {
|
|
844
928
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
845
929
|
},
|
|
846
930
|
name: "",
|
|
847
|
-
price:
|
|
848
|
-
originalPrice:
|
|
931
|
+
price: N.Dinero.zero().toObject(),
|
|
932
|
+
originalPrice: N.Dinero.zero().toObject(),
|
|
849
933
|
vouchers: [],
|
|
850
934
|
credit: {
|
|
851
935
|
normal: 0,
|
|
@@ -865,18 +949,18 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
865
949
|
}, Gt = {
|
|
866
950
|
key: 0,
|
|
867
951
|
class: "space-y-24 pr-12"
|
|
868
|
-
}, 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" },
|
|
952
|
+
}, 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({
|
|
869
953
|
__name: "EditBundleSheet",
|
|
870
954
|
emits: ["update"],
|
|
871
|
-
setup(
|
|
872
|
-
const f =
|
|
955
|
+
setup(v, { expose: x, emit: l }) {
|
|
956
|
+
const f = l, { t: r } = be(), b = ke(), o = R(!1), m = R([]), u = R({
|
|
873
957
|
category: 0,
|
|
874
958
|
index: -1,
|
|
875
959
|
originalCategoryIndex: void 0
|
|
876
|
-
}), t = R(ue.cloneDeep(
|
|
960
|
+
}), t = R(ue.cloneDeep(Ve)), c = R(), y = Ae, d = j(() => {
|
|
877
961
|
const p = y.safeParse(t.value);
|
|
878
962
|
return p.success ? [] : p.error.errors;
|
|
879
|
-
}),
|
|
963
|
+
}), V = [
|
|
880
964
|
{
|
|
881
965
|
header: "Reward title",
|
|
882
966
|
accessorFn: (p) => p.collectible.name,
|
|
@@ -896,10 +980,10 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
896
980
|
cell(p) {
|
|
897
981
|
var C;
|
|
898
982
|
const n = p.row.original;
|
|
899
|
-
return n.collectible.type == "VOUCHER" || n.selectedReward == null ? n.description :
|
|
900
|
-
"onUpdate:modelValue": (
|
|
983
|
+
return n.collectible.type == "VOUCHER" || n.selectedReward == null ? n.description : qe(We.FmStepperField, {
|
|
984
|
+
"onUpdate:modelValue": (P) => {
|
|
901
985
|
t.value.titles = t.value.titles.map(
|
|
902
|
-
(E) => E.id == n.collectible._id ? { ...E, dayToExpire:
|
|
986
|
+
(E) => E.id == n.collectible._id ? { ...E, dayToExpire: P } : E
|
|
903
987
|
);
|
|
904
988
|
},
|
|
905
989
|
modelValue: ((C = n.selectedReward) == null ? void 0 : C.extra) ?? 0,
|
|
@@ -907,14 +991,14 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
907
991
|
helperState: J(d.value, "titles"),
|
|
908
992
|
helperText: G(d.value, "titles"),
|
|
909
993
|
max: 9999,
|
|
910
|
-
rules: [(
|
|
994
|
+
rules: [(P) => P <= 9999 || "Maximum 9999 days allowed"],
|
|
911
995
|
showSteppers: !1,
|
|
912
996
|
disabled: !!t.value.stripePriceId
|
|
913
997
|
});
|
|
914
998
|
}
|
|
915
999
|
}
|
|
916
|
-
],
|
|
917
|
-
const n =
|
|
1000
|
+
], a = R([]), S = j(() => b.bundleRewards.map((p) => {
|
|
1001
|
+
const n = k.value.find((P) => P.id == p._id), C = p.type === "VOUCHER" ? `${p.options.maxUse} use(s), ${dt(
|
|
918
1002
|
p.options.validityOption || {}
|
|
919
1003
|
)}` : "No expiry";
|
|
920
1004
|
return {
|
|
@@ -922,7 +1006,7 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
922
1006
|
description: C,
|
|
923
1007
|
selectedReward: n
|
|
924
1008
|
};
|
|
925
|
-
})),
|
|
1009
|
+
})), k = j(() => {
|
|
926
1010
|
var p, n;
|
|
927
1011
|
return [
|
|
928
1012
|
...((p = t.value) == null ? void 0 : p.titles.map((C) => ({
|
|
@@ -934,176 +1018,176 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
934
1018
|
extra: void 0
|
|
935
1019
|
}))) ?? []
|
|
936
1020
|
];
|
|
937
|
-
}),
|
|
1021
|
+
}), D = j(
|
|
938
1022
|
() => t.value.stripePriceId && t.value.subscriptionValidity ? t.value.subscriptionValidity : 0
|
|
939
1023
|
);
|
|
940
|
-
function
|
|
1024
|
+
function Y(p) {
|
|
941
1025
|
t.value.subscriptionValidity = p;
|
|
942
1026
|
for (const n of t.value.titles)
|
|
943
1027
|
n.dayToExpire = p;
|
|
944
1028
|
t.value.credit.free && (t.value.credit.free.day = p);
|
|
945
1029
|
}
|
|
946
|
-
function
|
|
947
|
-
const p =
|
|
1030
|
+
function z() {
|
|
1031
|
+
const p = S.value, n = t.value;
|
|
948
1032
|
if (!(!n || !p))
|
|
949
1033
|
for (let C = 0; C < p.length; C++) {
|
|
950
|
-
const
|
|
951
|
-
|
|
952
|
-
(
|
|
1034
|
+
const P = p[C];
|
|
1035
|
+
K.value[C] ? P.collectible.type == "TITLE" ? n.titles.findIndex(
|
|
1036
|
+
(H) => H.id == P.collectible._id
|
|
953
1037
|
) < 0 && n.titles.push({
|
|
954
|
-
id:
|
|
955
|
-
dayToExpire:
|
|
1038
|
+
id: P.collectible._id,
|
|
1039
|
+
dayToExpire: D.value
|
|
956
1040
|
}) : n.vouchers.findIndex(
|
|
957
|
-
(
|
|
958
|
-
) < 0 && n.vouchers.push(
|
|
959
|
-
(
|
|
1041
|
+
(H) => H == P.collectible._id
|
|
1042
|
+
) < 0 && n.vouchers.push(P.collectible._id) : (n.titles = n.titles.filter((q) => q.id != P.collectible._id), n.vouchers = n.vouchers.filter(
|
|
1043
|
+
(q) => q != P.collectible._id
|
|
960
1044
|
));
|
|
961
1045
|
}
|
|
962
1046
|
}
|
|
963
|
-
const
|
|
964
|
-
we(
|
|
965
|
-
const
|
|
1047
|
+
const K = R({});
|
|
1048
|
+
we(K, z, { deep: !0 });
|
|
1049
|
+
const W = j(() => {
|
|
966
1050
|
var p, n;
|
|
967
1051
|
return (n = (p = b.storeOption) == null ? void 0 : p.company) == null ? void 0 : n.sstRegNo;
|
|
968
|
-
}),
|
|
1052
|
+
}), ae = j(() => {
|
|
969
1053
|
var p, n, C;
|
|
970
1054
|
return (C = (n = (p = b.storeOption) == null ? void 0 : p.inclusiveTaxes) == null ? void 0 : n[0]) != null && C.inclusive ? "Inclusive" : "Exclusive";
|
|
971
1055
|
}), s = j(() => {
|
|
972
1056
|
var p, n, C;
|
|
973
1057
|
return mt(
|
|
974
1058
|
ne.fullTax,
|
|
975
|
-
|
|
1059
|
+
He(t.value.taxes),
|
|
976
1060
|
t.value.price,
|
|
977
1061
|
Number(t.value.credit.normal),
|
|
978
1062
|
((p = b.storeOption) == null ? void 0 : p.inclusiveTaxes) ?? [],
|
|
979
|
-
(C = (n = b.storeOption) == null ? void 0 : n.company) != null && C.sstRegNo ? ne.taxSystem.map((
|
|
1063
|
+
(C = (n = b.storeOption) == null ? void 0 : n.company) != null && C.sstRegNo ? ne.taxSystem.map((P) => P.code) : []
|
|
980
1064
|
);
|
|
981
1065
|
}), w = j(() => s.value.reduce(
|
|
982
1066
|
(n, C) => n.add(C.total),
|
|
983
1067
|
rt()
|
|
984
1068
|
).toFormat()), U = j(() => {
|
|
985
|
-
var
|
|
1069
|
+
var P;
|
|
986
1070
|
const p = pt(
|
|
987
1071
|
s.value,
|
|
988
1072
|
t.value.price,
|
|
989
|
-
((
|
|
1073
|
+
((P = b.storeOption) == null ? void 0 : P.inclusiveTaxes) ?? []
|
|
990
1074
|
);
|
|
991
1075
|
t.value.priceWithTaxes = p;
|
|
992
|
-
const n =
|
|
1076
|
+
const n = zt(p, !1), C = Number(n.replace(/[^\d.-]/g, ""));
|
|
993
1077
|
return Number.isNaN(C) ? 0 : C;
|
|
994
1078
|
});
|
|
995
|
-
function
|
|
996
|
-
t.value.taxTotals = s.value, f("update",
|
|
1079
|
+
function O() {
|
|
1080
|
+
t.value.taxTotals = s.value, f("update", Ae.parse(Je(t.value)));
|
|
997
1081
|
}
|
|
998
|
-
function
|
|
999
|
-
return ue.cloneDeep(
|
|
1082
|
+
function $() {
|
|
1083
|
+
return ue.cloneDeep(Ve);
|
|
1000
1084
|
}
|
|
1001
|
-
function
|
|
1002
|
-
o.value = p, p && n && (c.value = void 0, m.value = n.categories, t.value = n.bundle ||
|
|
1085
|
+
function A(p, n) {
|
|
1086
|
+
o.value = p, p && n && (c.value = void 0, m.value = n.categories, t.value = n.bundle || $(), u.value.category = n.category, u.value.index = n.index, u.value.originalCategoryIndex = n.category, K.value = S.value.reduce((C, P, E) => (C[E] = !!P.selectedReward, C), {}));
|
|
1003
1087
|
}
|
|
1004
1088
|
return x({
|
|
1005
|
-
showSheet:
|
|
1089
|
+
showSheet: A,
|
|
1006
1090
|
bundleImage: c,
|
|
1007
1091
|
target: u,
|
|
1008
1092
|
data: t
|
|
1009
1093
|
}), (p, n) => {
|
|
1010
|
-
const C = h("FmSwitch"),
|
|
1011
|
-
return
|
|
1094
|
+
const C = h("FmSwitch"), P = h("FmHelperText"), E = h("FmTextField"), q = h("FmSelect"), H = h("FmStepperField"), ie = h("FmMenuItem"), ge = h("FmTable"), ce = h("FmButton"), ve = h("FmSideSheet");
|
|
1095
|
+
return g(), I(ve, {
|
|
1012
1096
|
"max-width": 768,
|
|
1013
1097
|
modelValue: e(o),
|
|
1014
|
-
"onUpdate:modelValue": n[20] || (n[20] = (
|
|
1098
|
+
"onUpdate:modelValue": n[20] || (n[20] = (le) => oe(o) ? o.value = le : null),
|
|
1015
1099
|
header: e(u).index != -1 ? e(r)("connect.store.bundle.edit.title") : e(r)("connect.store.bundle.edit.create")
|
|
1016
1100
|
}, {
|
|
1017
1101
|
"side-sheet-footer": T(() => [
|
|
1018
1102
|
_("div", rn, [
|
|
1019
1103
|
i(ce, {
|
|
1020
1104
|
label: e(u).index != -1 ? "Save" : "Add",
|
|
1021
|
-
onClick:
|
|
1105
|
+
onClick: O,
|
|
1022
1106
|
disabled: e(d).length > 0,
|
|
1023
|
-
loading: e(
|
|
1107
|
+
loading: e(Se)().isLoading
|
|
1024
1108
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
1025
1109
|
i(ce, {
|
|
1026
1110
|
label: "Cancel",
|
|
1027
|
-
onClick: n[19] || (n[19] = (
|
|
1111
|
+
onClick: n[19] || (n[19] = (le) => A(!1)),
|
|
1028
1112
|
variant: "tertiary"
|
|
1029
1113
|
})
|
|
1030
1114
|
])
|
|
1031
1115
|
]),
|
|
1032
1116
|
default: T(() => {
|
|
1033
|
-
var
|
|
1117
|
+
var le, $e, Te, Ue, Re, Ie, Be, Ne;
|
|
1034
1118
|
return [
|
|
1035
|
-
i(
|
|
1036
|
-
e(t) ? (
|
|
1119
|
+
i(Pe, { json: e(t) }, null, 8, ["json"]),
|
|
1120
|
+
e(t) ? (g(), B("div", Gt, [
|
|
1037
1121
|
_("div", Xt, [
|
|
1038
|
-
e(
|
|
1122
|
+
e(N.Config).getCountry().code == "MY" && ((le = e(b).payoutAccount) == null ? void 0 : le.status) == "APPROVED" && (($e = e(b).payoutAccount) != null && $e.enable) ? (g(), I(C, {
|
|
1039
1123
|
key: 0,
|
|
1040
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
1041
|
-
e(t).isFeedvibe =
|
|
1124
|
+
"onUpdate:modelValue": n[0] || (n[0] = (F) => {
|
|
1125
|
+
e(t).isFeedvibe = F, e(t).isFeedvibe && (e(t).credit.normal = 0, e(t).coinPrice = 0, e(t).titles = [], K.value = {});
|
|
1042
1126
|
}),
|
|
1043
1127
|
"label-placement": "right",
|
|
1044
1128
|
"model-value": e(t).isFeedvibe || !1,
|
|
1045
1129
|
label: "Feedvibe Campaign",
|
|
1046
1130
|
sublabel: "Bundle will be appear for Feedvibe campaign use"
|
|
1047
|
-
}, null, 8, ["model-value"])) :
|
|
1048
|
-
e(t).isFeedvibe ? (
|
|
1131
|
+
}, null, 8, ["model-value"])) : M("", !0),
|
|
1132
|
+
e(t).isFeedvibe ? (g(), I(P, {
|
|
1049
1133
|
key: 1,
|
|
1050
1134
|
text: "There will be a 15% charge for FeedVibe bundles sold in the FeedVibe app",
|
|
1051
1135
|
state: "warning"
|
|
1052
|
-
})) :
|
|
1136
|
+
})) : M("", !0)
|
|
1053
1137
|
]),
|
|
1054
1138
|
_("div", Zt, L(e(r)("connect.store.bundle.edit.basicInformation")), 1),
|
|
1055
1139
|
i(E, {
|
|
1056
1140
|
label: e(r)("connect.store.bundle.edit.bundleName"),
|
|
1057
1141
|
modelValue: e(t).name,
|
|
1058
|
-
"onUpdate:modelValue": n[1] || (n[1] = (
|
|
1142
|
+
"onUpdate:modelValue": n[1] || (n[1] = (F) => e(t).name = F),
|
|
1059
1143
|
"helper-state": e(J)(e(d), "name"),
|
|
1060
1144
|
"helper-text": e(G)(e(d), "name")
|
|
1061
1145
|
}, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
|
|
1062
|
-
i(
|
|
1146
|
+
i(q, {
|
|
1063
1147
|
modelValue: e(u).category,
|
|
1064
|
-
"onUpdate:modelValue": n[2] || (n[2] = (
|
|
1148
|
+
"onUpdate:modelValue": n[2] || (n[2] = (F) => e(u).category = F),
|
|
1065
1149
|
label: "Store Category",
|
|
1066
|
-
items: e(m).map((
|
|
1150
|
+
items: e(m).map((F, Le) => ({ label: F, value: Le }))
|
|
1067
1151
|
}, null, 8, ["modelValue", "items"]),
|
|
1068
|
-
i(
|
|
1152
|
+
i(at, {
|
|
1069
1153
|
label: e(r)("connect.store.bundle.edit.bundleImage"),
|
|
1070
1154
|
class: "w-1/2 xs:w-2/3",
|
|
1071
1155
|
"aspect-ratio": "16/9",
|
|
1072
1156
|
thumbnail: e(t).image ?? void 0,
|
|
1073
1157
|
file: e(c) ?? void 0,
|
|
1074
|
-
"onUpdate:file": n[3] || (n[3] = (
|
|
1075
|
-
c.value =
|
|
1158
|
+
"onUpdate:file": n[3] || (n[3] = (F) => {
|
|
1159
|
+
c.value = F;
|
|
1076
1160
|
}),
|
|
1077
1161
|
"helper-state": e(J)(e(d), "image"),
|
|
1078
1162
|
"helper-text": e(G)(e(d), "image")
|
|
1079
1163
|
}, null, 8, ["label", "thumbnail", "file", "helper-state", "helper-text"]),
|
|
1080
|
-
i(
|
|
1081
|
-
"model-value": e(
|
|
1164
|
+
i(H, {
|
|
1165
|
+
"model-value": e(N.Dinero).fromFdoDinero(e(t).price).toUnit(),
|
|
1082
1166
|
label: e(r)("connect.store.bundle.edit.bundlePrice"),
|
|
1083
1167
|
min: 0,
|
|
1084
1168
|
"max-fraction-digits": 2,
|
|
1085
|
-
"onUpdate:modelValue": n[4] || (n[4] = (
|
|
1086
|
-
e(t).price.amount =
|
|
1169
|
+
"onUpdate:modelValue": n[4] || (n[4] = (F) => {
|
|
1170
|
+
e(t).price.amount = F * 10 ** e(t).price.precision;
|
|
1087
1171
|
}),
|
|
1088
1172
|
"is-currency": !0,
|
|
1089
1173
|
"show-steppers": !1,
|
|
1090
|
-
"helper-text": e(G)(e(d), "price") || `${e(
|
|
1174
|
+
"helper-text": e(G)(e(d), "price") || `${e(N.Dinero).fromNumber({ number: 1 }).toFormat(
|
|
1091
1175
|
!0
|
|
1092
|
-
)} = ${e(
|
|
1176
|
+
)} = ${e(N.Dinero).fromNumber({ number: 1 }).toUnit()} credit`,
|
|
1093
1177
|
"helper-state": e(J)(e(d), "price")
|
|
1094
1178
|
}, {
|
|
1095
1179
|
prepend: T(() => [
|
|
1096
|
-
de(L(e(
|
|
1180
|
+
de(L(e(N.Dinero).defaultCurrency()), 1)
|
|
1097
1181
|
]),
|
|
1098
1182
|
_: 1
|
|
1099
1183
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
1100
|
-
i(
|
|
1101
|
-
"model-value": e(
|
|
1184
|
+
i(H, {
|
|
1185
|
+
"model-value": e(N.Dinero).fromFdoDinero(e(t).originalPrice).toUnit(),
|
|
1102
1186
|
label: e(r)("connect.store.bundle.edit.bundleValue"),
|
|
1103
1187
|
min: 0,
|
|
1104
1188
|
"max-fraction-digits": 2,
|
|
1105
|
-
"onUpdate:modelValue": n[5] || (n[5] = (
|
|
1106
|
-
e(t).originalPrice || (e(t).originalPrice = e(
|
|
1189
|
+
"onUpdate:modelValue": n[5] || (n[5] = (F) => {
|
|
1190
|
+
e(t).originalPrice || (e(t).originalPrice = e(N.Dinero).zero().toObject()), e(t).originalPrice.amount = F * 10 ** e(t).originalPrice.precision;
|
|
1107
1191
|
}),
|
|
1108
1192
|
"is-currency": !0,
|
|
1109
1193
|
"show-steppers": !1,
|
|
@@ -1111,17 +1195,17 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1111
1195
|
"helper-state": e(J)(e(d), "originalPrice")
|
|
1112
1196
|
}, {
|
|
1113
1197
|
prepend: T(() => [
|
|
1114
|
-
de(L(e(
|
|
1198
|
+
de(L(e(N.Dinero).defaultCurrency()), 1)
|
|
1115
1199
|
]),
|
|
1116
1200
|
_: 1
|
|
1117
1201
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
1118
|
-
e(t).isFeedvibe ?
|
|
1202
|
+
e(t).isFeedvibe ? M("", !0) : (g(), I(H, {
|
|
1119
1203
|
key: 0,
|
|
1120
1204
|
"model-value": e(t).coinPrice ?? null,
|
|
1121
1205
|
label: e(r)("connect.store.bundle.edit.pointNeeded"),
|
|
1122
1206
|
min: 0,
|
|
1123
|
-
"onUpdate:modelValue": n[6] || (n[6] = (
|
|
1124
|
-
|
|
1207
|
+
"onUpdate:modelValue": n[6] || (n[6] = (F) => {
|
|
1208
|
+
F > 0 && e(t).credit.normal > 0 && (e(t).credit.normal = 0), e(t).coinPrice = F;
|
|
1125
1209
|
}),
|
|
1126
1210
|
"show-steppers": !1,
|
|
1127
1211
|
"helper-state": e(J)(e(d), "coinPrice"),
|
|
@@ -1132,31 +1216,31 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1132
1216
|
])),
|
|
1133
1217
|
_: 1
|
|
1134
1218
|
}, 8, ["model-value", "label", "helper-state", "helper-text"])),
|
|
1135
|
-
(Te = e(b).storeOption) != null && Te.stripe && !e(t).isFeedvibe ? (
|
|
1219
|
+
(Te = e(b).storeOption) != null && Te.stripe && !e(t).isFeedvibe ? (g(), B(X, { key: 1 }, [
|
|
1136
1220
|
_("div", Qt, L(e(r)("connect.store.bundle.edit.subscriptionSettings")), 1),
|
|
1137
1221
|
i(E, {
|
|
1138
1222
|
label: e(r)("connect.store.bundle.edit.stripePriceId"),
|
|
1139
1223
|
modelValue: e(t).stripePriceId,
|
|
1140
|
-
"onUpdate:modelValue": n[7] || (n[7] = (
|
|
1224
|
+
"onUpdate:modelValue": n[7] || (n[7] = (F) => e(t).stripePriceId = F),
|
|
1141
1225
|
"helper-state": e(J)(e(d), "stripePriceId"),
|
|
1142
1226
|
"helper-text": e(G)(e(d), "stripePriceId")
|
|
1143
1227
|
}, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
|
|
1144
|
-
e(t).stripePriceId ? (
|
|
1228
|
+
e(t).stripePriceId ? (g(), I(H, {
|
|
1145
1229
|
key: 0,
|
|
1146
1230
|
"model-value": e(t).subscriptionValidity ?? null,
|
|
1147
1231
|
min: 1,
|
|
1148
|
-
"onUpdate:modelValue":
|
|
1232
|
+
"onUpdate:modelValue": Y,
|
|
1149
1233
|
label: e(r)("connect.store.bundle.edit.subscriptionValidity"),
|
|
1150
1234
|
"show-steppers": !1,
|
|
1151
1235
|
"helper-state": e(J)(e(d), "subscriptionValidity"),
|
|
1152
1236
|
"helper-text": e(G)(e(d), "subscriptionValidity")
|
|
1153
|
-
}, null, 8, ["model-value", "label", "helper-state", "helper-text"])) :
|
|
1154
|
-
], 64)) :
|
|
1155
|
-
e(t).isFeedvibe ?
|
|
1237
|
+
}, null, 8, ["model-value", "label", "helper-state", "helper-text"])) : M("", !0)
|
|
1238
|
+
], 64)) : M("", !0),
|
|
1239
|
+
e(t).isFeedvibe ? M("", !0) : (g(), B(X, { key: 2 }, [
|
|
1156
1240
|
_("div", en, L(e(r)("connect.store.bundle.edit.credit")), 1),
|
|
1157
|
-
i(
|
|
1241
|
+
i(H, {
|
|
1158
1242
|
modelValue: e(t).credit.normal,
|
|
1159
|
-
"onUpdate:modelValue": n[8] || (n[8] = (
|
|
1243
|
+
"onUpdate:modelValue": n[8] || (n[8] = (F) => e(t).credit.normal = F),
|
|
1160
1244
|
label: e(r)("connect.store.bundle.edit.normalCredit"),
|
|
1161
1245
|
"show-steppers": !1,
|
|
1162
1246
|
"helper-state": e(J)(e(d), "credit.normal"),
|
|
@@ -1167,14 +1251,14 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1167
1251
|
])),
|
|
1168
1252
|
_: 1
|
|
1169
1253
|
}, 8, ["modelValue", "label", "helper-state", "helper-text"]),
|
|
1170
|
-
i(
|
|
1254
|
+
i(H, {
|
|
1171
1255
|
"model-value": ((Ue = e(t).credit.free) == null ? void 0 : Ue.amount) ?? null,
|
|
1172
1256
|
min: 0,
|
|
1173
|
-
"onUpdate:modelValue": n[9] || (n[9] = (
|
|
1257
|
+
"onUpdate:modelValue": n[9] || (n[9] = (F) => {
|
|
1174
1258
|
e(t).credit.free || (e(t).credit.free = {
|
|
1175
1259
|
amount: 0,
|
|
1176
1260
|
day: 1
|
|
1177
|
-
}), e(t).credit.free.amount =
|
|
1261
|
+
}), e(t).credit.free.amount = F;
|
|
1178
1262
|
}),
|
|
1179
1263
|
label: e(r)("connect.store.bundle.edit.freeCredit"),
|
|
1180
1264
|
"show-steppers": !1,
|
|
@@ -1186,16 +1270,16 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1186
1270
|
])),
|
|
1187
1271
|
_: 1
|
|
1188
1272
|
}, 8, ["model-value", "label", "helper-state", "helper-text"]),
|
|
1189
|
-
(Re = e(t).credit.free) != null && Re.amount ? (
|
|
1273
|
+
(Re = e(t).credit.free) != null && Re.amount ? (g(), I(H, {
|
|
1190
1274
|
key: 0,
|
|
1191
1275
|
disabled: !!e(t).stripePriceId,
|
|
1192
1276
|
"model-value": ((Ie = e(t).credit.free) == null ? void 0 : Ie.day) ?? null,
|
|
1193
1277
|
min: 0,
|
|
1194
|
-
"onUpdate:modelValue": n[10] || (n[10] = (
|
|
1278
|
+
"onUpdate:modelValue": n[10] || (n[10] = (F) => {
|
|
1195
1279
|
e(t).credit.free || (e(t).credit.free = {
|
|
1196
1280
|
amount: 0,
|
|
1197
1281
|
day: 1
|
|
1198
|
-
}), e(t).credit.free.day = e(
|
|
1282
|
+
}), e(t).credit.free.day = e(D) || F;
|
|
1199
1283
|
}),
|
|
1200
1284
|
label: "Free credit valid for",
|
|
1201
1285
|
"show-steppers": !1,
|
|
@@ -1206,21 +1290,21 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1206
1290
|
de(" day(s) ")
|
|
1207
1291
|
])),
|
|
1208
1292
|
_: 1
|
|
1209
|
-
}, 8, ["disabled", "model-value", "helper-state", "helper-text"])) :
|
|
1293
|
+
}, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : M("", !0)
|
|
1210
1294
|
], 64)),
|
|
1211
|
-
e(
|
|
1295
|
+
e(W) ? (g(), B(X, { key: 3 }, [
|
|
1212
1296
|
n[25] || (n[25] = _("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Taxes", -1)),
|
|
1213
1297
|
i(Jt, {
|
|
1214
1298
|
modelValue: e(t).taxes,
|
|
1215
|
-
"onUpdate:modelValue": n[11] || (n[11] = (
|
|
1299
|
+
"onUpdate:modelValue": n[11] || (n[11] = (F) => e(t).taxes = F)
|
|
1216
1300
|
}, null, 8, ["modelValue"]),
|
|
1217
1301
|
i(E, {
|
|
1218
|
-
label: `Tax Charged (${e(
|
|
1302
|
+
label: `Tax Charged (${e(ae)})`,
|
|
1219
1303
|
"model-value": e(w),
|
|
1220
1304
|
disabled: ""
|
|
1221
1305
|
}, null, 8, ["label", "model-value"])
|
|
1222
|
-
], 64)) :
|
|
1223
|
-
i(
|
|
1306
|
+
], 64)) : M("", !0),
|
|
1307
|
+
i(H, {
|
|
1224
1308
|
label: "Total Price",
|
|
1225
1309
|
"model-value": e(U),
|
|
1226
1310
|
disabled: !0
|
|
@@ -1228,17 +1312,17 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1228
1312
|
_("div", tn, L(e(r)("connect.store.bundle.edit.bundleReward.title")), 1),
|
|
1229
1313
|
_("div", nn, L(e(r)("connect.store.bundle.edit.bundleReward.description")), 1),
|
|
1230
1314
|
_("div", on, [
|
|
1231
|
-
_("div",
|
|
1232
|
-
i(
|
|
1233
|
-
label: `Reward type: ${e(
|
|
1315
|
+
_("div", an, [
|
|
1316
|
+
i(lt, {
|
|
1317
|
+
label: `Reward type: ${e(a).length == 0 ? "All" : e(a)[0].name}`
|
|
1234
1318
|
}, {
|
|
1235
1319
|
default: T(() => [
|
|
1236
1320
|
i(ie, {
|
|
1237
|
-
onClick: n[12] || (n[12] = (
|
|
1321
|
+
onClick: n[12] || (n[12] = (F) => a.value = []),
|
|
1238
1322
|
label: "All"
|
|
1239
1323
|
}),
|
|
1240
1324
|
i(ie, {
|
|
1241
|
-
onClick: n[13] || (n[13] = (
|
|
1325
|
+
onClick: n[13] || (n[13] = (F) => a.value = [
|
|
1242
1326
|
{
|
|
1243
1327
|
id: "type",
|
|
1244
1328
|
value: "VOUCHER",
|
|
@@ -1248,7 +1332,7 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1248
1332
|
label: e(me).VOUCHER.name
|
|
1249
1333
|
}, null, 8, ["label"]),
|
|
1250
1334
|
i(ie, {
|
|
1251
|
-
onClick: n[14] || (n[14] = (
|
|
1335
|
+
onClick: n[14] || (n[14] = (F) => a.value = [
|
|
1252
1336
|
{
|
|
1253
1337
|
id: "type",
|
|
1254
1338
|
value: "TITLE",
|
|
@@ -1261,47 +1345,47 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1261
1345
|
_: 1
|
|
1262
1346
|
}, 8, ["label"])
|
|
1263
1347
|
]),
|
|
1264
|
-
i(
|
|
1265
|
-
modelValue: e(
|
|
1266
|
-
"onUpdate:modelValue": n[15] || (n[15] = (
|
|
1348
|
+
i(ge, {
|
|
1349
|
+
modelValue: e(K),
|
|
1350
|
+
"onUpdate:modelValue": n[15] || (n[15] = (F) => oe(K) ? K.value = F : null),
|
|
1267
1351
|
selection: "multiple",
|
|
1268
|
-
"column-filter": e(
|
|
1269
|
-
"column-defs":
|
|
1270
|
-
"row-data": e(
|
|
1271
|
-
(
|
|
1352
|
+
"column-filter": e(a),
|
|
1353
|
+
"column-defs": V,
|
|
1354
|
+
"row-data": e(S).filter(
|
|
1355
|
+
(F) => !e(t).isFeedvibe || F.collectible.type == "VOUCHER"
|
|
1272
1356
|
),
|
|
1273
|
-
"hide-footer": e(
|
|
1357
|
+
"hide-footer": e(S).length <= 10
|
|
1274
1358
|
}, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"]),
|
|
1275
|
-
i(
|
|
1359
|
+
i(P, {
|
|
1276
1360
|
text: e(G)(e(d), "titles"),
|
|
1277
1361
|
state: e(J)(e(d), "titles")
|
|
1278
1362
|
}, null, 8, ["text", "state"])
|
|
1279
1363
|
]),
|
|
1280
|
-
_("div",
|
|
1364
|
+
_("div", ln, L(e(r)("connect.store.bundle.edit.advanceSetting")), 1),
|
|
1281
1365
|
_("div", sn, [
|
|
1282
1366
|
i(C, {
|
|
1283
1367
|
"model-value": e(t).internal ?? !1,
|
|
1284
|
-
"onUpdate:modelValue": n[16] || (n[16] = (
|
|
1368
|
+
"onUpdate:modelValue": n[16] || (n[16] = (F) => e(t).internal = F),
|
|
1285
1369
|
"label-placement": "right",
|
|
1286
1370
|
label: e(r)("connect.store.bundle.edit.internalBundle"),
|
|
1287
1371
|
sublabel: e(r)("connect.store.bundle.edit.internalBundleDescription")
|
|
1288
1372
|
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
1289
1373
|
i(C, {
|
|
1290
1374
|
"model-value": e(t).hideInPos ?? !1,
|
|
1291
|
-
"onUpdate:modelValue": n[17] || (n[17] = (
|
|
1375
|
+
"onUpdate:modelValue": n[17] || (n[17] = (F) => e(t).hideInPos = F),
|
|
1292
1376
|
"label-placement": "right",
|
|
1293
1377
|
label: e(r)("connect.store.bundle.edit.hideInPos"),
|
|
1294
1378
|
sublabel: e(r)("connect.store.bundle.edit.hideInPosDescription")
|
|
1295
1379
|
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
1296
|
-
i(
|
|
1297
|
-
"model-value": ((
|
|
1298
|
-
"onUpdate:modelValue": n[18] || (n[18] = (
|
|
1380
|
+
i(H, {
|
|
1381
|
+
"model-value": ((Ne = (Be = e(t).config) == null ? void 0 : Be.options) == null ? void 0 : Ne.maxPerUser) || null,
|
|
1382
|
+
"onUpdate:modelValue": n[18] || (n[18] = (F) => e(ue).set(e(t), "config.options.maxPerUser", F)),
|
|
1299
1383
|
label: e(r)("connect.store.bundle.edit.maxPerUser"),
|
|
1300
1384
|
"show-steppers": !1,
|
|
1301
1385
|
placeholder: "Unlimited"
|
|
1302
1386
|
}, null, 8, ["model-value", "label"])
|
|
1303
1387
|
])
|
|
1304
|
-
])) :
|
|
1388
|
+
])) : M("", !0)
|
|
1305
1389
|
];
|
|
1306
1390
|
}),
|
|
1307
1391
|
_: 1
|
|
@@ -1311,48 +1395,48 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1311
1395
|
}), un = { class: "flex gap-8 items-center flex-wrap" }, cn = { class: "flex items-center gap-8" }, mn = /* @__PURE__ */ ee({
|
|
1312
1396
|
__name: "SendBundleSheet",
|
|
1313
1397
|
emits: ["success"],
|
|
1314
|
-
setup(
|
|
1398
|
+
setup(v, { expose: x, emit: l }) {
|
|
1315
1399
|
const { minor: f } = Ee, r = R(), b = R(""), o = R(""), m = R([]), u = R(!1), t = R();
|
|
1316
1400
|
R(!0);
|
|
1317
|
-
function c(
|
|
1318
|
-
u.value = !0, b.value = null, o.value = "", r.value =
|
|
1401
|
+
function c(S) {
|
|
1402
|
+
u.value = !0, b.value = null, o.value = "", r.value = S.bundle;
|
|
1319
1403
|
}
|
|
1320
1404
|
function y() {
|
|
1321
1405
|
u.value = !1;
|
|
1322
1406
|
}
|
|
1323
|
-
async function d(
|
|
1324
|
-
const
|
|
1407
|
+
async function d(S) {
|
|
1408
|
+
const k = await ut.read({
|
|
1325
1409
|
limit: 25,
|
|
1326
1410
|
skip: 0,
|
|
1327
1411
|
sortBy: "_id",
|
|
1328
|
-
search:
|
|
1412
|
+
search: S,
|
|
1329
1413
|
descending: !1
|
|
1330
1414
|
});
|
|
1331
|
-
m.value =
|
|
1332
|
-
label: `${
|
|
1333
|
-
value:
|
|
1334
|
-
})), await new Promise((
|
|
1415
|
+
m.value = k.resources.map((D) => ({
|
|
1416
|
+
label: `${D.name} (${D.phoneNumber})`,
|
|
1417
|
+
value: D._id
|
|
1418
|
+
})), await new Promise((D) => setTimeout(D, 100));
|
|
1335
1419
|
}
|
|
1336
|
-
async function
|
|
1420
|
+
async function V() {
|
|
1337
1421
|
if (!r.value || !b.value) return;
|
|
1338
|
-
const
|
|
1339
|
-
(
|
|
1422
|
+
const S = m.value.find(
|
|
1423
|
+
(D) => D.value === b.value
|
|
1340
1424
|
);
|
|
1341
|
-
await
|
|
1342
|
-
`Are you sure you want to send bundle ${r.value.name} to ${
|
|
1425
|
+
await _e.confirm(
|
|
1426
|
+
`Are you sure you want to send bundle ${r.value.name} to ${S == null ? void 0 : S.label}?`,
|
|
1343
1427
|
"Confirm",
|
|
1344
1428
|
"Confirm",
|
|
1345
1429
|
"Cancel"
|
|
1346
1430
|
) && await f(
|
|
1347
1431
|
async () => {
|
|
1348
|
-
const
|
|
1432
|
+
const D = {
|
|
1349
1433
|
bundle: r.value._id,
|
|
1350
1434
|
member: b.value,
|
|
1351
1435
|
source: nt.enum.ADMIN,
|
|
1352
1436
|
ref: `ADMIN:${(/* @__PURE__ */ new Date()).toISOString()}:${o.value}`,
|
|
1353
1437
|
withCoin: !1
|
|
1354
1438
|
};
|
|
1355
|
-
await
|
|
1439
|
+
await Ce.sendBundle(D), y();
|
|
1356
1440
|
},
|
|
1357
1441
|
{
|
|
1358
1442
|
message: "Sending bundle",
|
|
@@ -1360,45 +1444,45 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1360
1444
|
}
|
|
1361
1445
|
);
|
|
1362
1446
|
}
|
|
1363
|
-
const
|
|
1364
|
-
var
|
|
1365
|
-
const
|
|
1366
|
-
return ((
|
|
1367
|
-
`${
|
|
1368
|
-
), (
|
|
1447
|
+
const a = j(() => {
|
|
1448
|
+
var k, D, Y;
|
|
1449
|
+
const S = [];
|
|
1450
|
+
return ((k = r.value) == null ? void 0 : k.price.amount) > 0 && S.push(
|
|
1451
|
+
`${N.Config.getCountry().currency.symbol}${je((D = r.value) == null ? void 0 : D.price)}`
|
|
1452
|
+
), (Y = r.value) != null && Y.coinPrice && S.push(`${r.value.coinPrice} point(s)`), S.join(" or ");
|
|
1369
1453
|
});
|
|
1370
1454
|
return x({
|
|
1371
1455
|
showSheet: c,
|
|
1372
1456
|
hideSheet: y
|
|
1373
1457
|
}), fe(async () => {
|
|
1374
1458
|
await d("");
|
|
1375
|
-
}), (
|
|
1376
|
-
const
|
|
1377
|
-
return
|
|
1459
|
+
}), (S, k) => {
|
|
1460
|
+
const D = h("FmCardMedia"), Y = h("FmCardHeader"), z = h("FmChip"), K = h("FmCardSection"), W = h("FmCard"), ae = h("FmSelect"), s = h("FmTextField"), w = h("FmForm"), U = h("FmButton"), O = h("FmSideSheet");
|
|
1461
|
+
return g(), I(O, {
|
|
1378
1462
|
"max-width": 560,
|
|
1379
1463
|
"dismiss-away": !0,
|
|
1380
1464
|
header: "Send bundle to member",
|
|
1381
1465
|
modelValue: e(u),
|
|
1382
1466
|
"onUpdate:modelValue": [
|
|
1383
|
-
|
|
1384
|
-
|
|
1467
|
+
k[4] || (k[4] = ($) => oe(u) ? u.value = $ : null),
|
|
1468
|
+
k[5] || (k[5] = ($) => u.value = $)
|
|
1385
1469
|
]
|
|
1386
1470
|
}, {
|
|
1387
1471
|
"side-sheet-footer": T(() => [
|
|
1388
1472
|
_("div", cn, [
|
|
1389
1473
|
i(U, {
|
|
1390
1474
|
label: "Send",
|
|
1391
|
-
loading: e(
|
|
1392
|
-
onClick:
|
|
1393
|
-
var
|
|
1394
|
-
return (
|
|
1475
|
+
loading: e(Se)().isLoading,
|
|
1476
|
+
onClick: k[2] || (k[2] = async () => {
|
|
1477
|
+
var $;
|
|
1478
|
+
return ($ = e(t)) == null ? void 0 : $.validateInputs();
|
|
1395
1479
|
})
|
|
1396
1480
|
}, null, 8, ["loading"]),
|
|
1397
1481
|
i(U, {
|
|
1398
1482
|
label: "Cancel",
|
|
1399
1483
|
type: "button",
|
|
1400
1484
|
variant: "tertiary",
|
|
1401
|
-
onClick:
|
|
1485
|
+
onClick: k[3] || (k[3] = ($) => u.value = !1)
|
|
1402
1486
|
})
|
|
1403
1487
|
])
|
|
1404
1488
|
]),
|
|
@@ -1407,53 +1491,53 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1407
1491
|
class: "space-y-16",
|
|
1408
1492
|
ref_key: "form",
|
|
1409
1493
|
ref: t,
|
|
1410
|
-
onValidationSuccess:
|
|
1494
|
+
onValidationSuccess: V,
|
|
1411
1495
|
blameFormChildOnValidationFailed: ""
|
|
1412
1496
|
}, {
|
|
1413
1497
|
default: T(() => [
|
|
1414
|
-
i(
|
|
1498
|
+
i(W, {
|
|
1415
1499
|
class: "max-w-[700px]",
|
|
1416
1500
|
horizontal: "",
|
|
1417
1501
|
variant: "outlined"
|
|
1418
1502
|
}, {
|
|
1419
1503
|
default: T(() => {
|
|
1420
|
-
var
|
|
1504
|
+
var $, A;
|
|
1421
1505
|
return [
|
|
1422
|
-
(
|
|
1506
|
+
($ = e(r)) != null && $.image ? (g(), I(D, {
|
|
1423
1507
|
key: 0,
|
|
1424
1508
|
width: "100",
|
|
1425
|
-
src: (
|
|
1426
|
-
}, null, 8, ["src"])) :
|
|
1427
|
-
i(
|
|
1509
|
+
src: (A = e(r)) == null ? void 0 : A.image
|
|
1510
|
+
}, null, 8, ["src"])) : M("", !0),
|
|
1511
|
+
i(K, { class: "flex flex-col gap-16 justify-between" }, {
|
|
1428
1512
|
default: T(() => {
|
|
1429
1513
|
var p;
|
|
1430
1514
|
return [
|
|
1431
|
-
i(
|
|
1515
|
+
i(Y, {
|
|
1432
1516
|
class: "p-0",
|
|
1433
1517
|
title: (p = e(r)) == null ? void 0 : p.name,
|
|
1434
|
-
subtitle: e(
|
|
1518
|
+
subtitle: e(a)
|
|
1435
1519
|
}, null, 8, ["title", "subtitle"]),
|
|
1436
|
-
i(
|
|
1520
|
+
i(K, { class: "p-0" }, {
|
|
1437
1521
|
default: T(() => {
|
|
1438
|
-
var n, C,
|
|
1522
|
+
var n, C, P, E, q, H, ie, ge, ce, ve, le;
|
|
1439
1523
|
return [
|
|
1440
1524
|
_("div", un, [
|
|
1441
|
-
(n = e(r)) != null && n.isFeedvibe ? (
|
|
1525
|
+
(n = e(r)) != null && n.isFeedvibe ? (g(), I(z, {
|
|
1442
1526
|
key: 0,
|
|
1443
1527
|
label: "Feedvibe"
|
|
1444
|
-
})) :
|
|
1445
|
-
(
|
|
1528
|
+
})) : M("", !0),
|
|
1529
|
+
(P = (C = e(r)) == null ? void 0 : C.titles) != null && P.length ? (g(), I(z, {
|
|
1446
1530
|
key: 1,
|
|
1447
1531
|
label: `${e(r).titles.length} title(s)`
|
|
1448
|
-
}, null, 8, ["label"])) :
|
|
1449
|
-
(
|
|
1532
|
+
}, null, 8, ["label"])) : M("", !0),
|
|
1533
|
+
(q = (E = e(r)) == null ? void 0 : E.vouchers) != null && q.length ? (g(), I(z, {
|
|
1450
1534
|
key: 2,
|
|
1451
1535
|
label: `${e(r).vouchers.length} voucher(s)`
|
|
1452
|
-
}, null, 8, ["label"])) :
|
|
1453
|
-
(ie = (
|
|
1536
|
+
}, null, 8, ["label"])) : M("", !0),
|
|
1537
|
+
(ie = (H = e(r)) == null ? void 0 : H.credit) != null && ie.normal || (ve = (ce = (ge = e(r)) == null ? void 0 : ge.credit) == null ? void 0 : ce.free) != null && ve.amount ? (g(), I(z, {
|
|
1454
1538
|
key: 3,
|
|
1455
|
-
label: `${(e(r).credit.normal || 0) + (((
|
|
1456
|
-
}, null, 8, ["label"])) :
|
|
1539
|
+
label: `${(e(r).credit.normal || 0) + (((le = e(r).credit.free) == null ? void 0 : le.amount) || 0)} credit(s)`
|
|
1540
|
+
}, null, 8, ["label"])) : M("", !0)
|
|
1457
1541
|
])
|
|
1458
1542
|
];
|
|
1459
1543
|
}),
|
|
@@ -1467,22 +1551,22 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1467
1551
|
}),
|
|
1468
1552
|
_: 1
|
|
1469
1553
|
}),
|
|
1470
|
-
i(
|
|
1554
|
+
i(ae, {
|
|
1471
1555
|
modelValue: e(b),
|
|
1472
|
-
"onUpdate:modelValue":
|
|
1556
|
+
"onUpdate:modelValue": k[0] || (k[0] = ($) => oe(b) ? b.value = $ : null),
|
|
1473
1557
|
label: "Select member",
|
|
1474
1558
|
searchable: "",
|
|
1475
1559
|
items: e(m),
|
|
1476
1560
|
onSearch: d,
|
|
1477
|
-
rules: [(
|
|
1561
|
+
rules: [($) => !!$ > 0 || "Member is required"],
|
|
1478
1562
|
"helper-text": "Type to search member"
|
|
1479
1563
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
1480
1564
|
i(s, {
|
|
1481
1565
|
modelValue: e(o),
|
|
1482
|
-
"onUpdate:modelValue":
|
|
1566
|
+
"onUpdate:modelValue": k[1] || (k[1] = ($) => oe(o) ? o.value = $ : null),
|
|
1483
1567
|
label: "Reference (optional)",
|
|
1484
1568
|
rules: [
|
|
1485
|
-
(
|
|
1569
|
+
($) => $.length < 50 || "Reference must be less than 50 characters"
|
|
1486
1570
|
]
|
|
1487
1571
|
}, null, 8, ["modelValue", "rules"])
|
|
1488
1572
|
]),
|
|
@@ -1495,111 +1579,111 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1495
1579
|
}
|
|
1496
1580
|
});
|
|
1497
1581
|
var pn = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
|
|
1498
|
-
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" },
|
|
1582
|
+
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" }, Gn = /* @__PURE__ */ ee({
|
|
1499
1583
|
__name: "Store",
|
|
1500
|
-
setup(
|
|
1584
|
+
setup(v) {
|
|
1501
1585
|
const x = {
|
|
1502
1586
|
label: "Setup payout account",
|
|
1503
1587
|
value: "payout",
|
|
1504
1588
|
isPrimary: !1
|
|
1505
|
-
}, { t:
|
|
1506
|
-
label:
|
|
1589
|
+
}, { t: l } = be(), f = {
|
|
1590
|
+
label: l("connect.store.actions.setting"),
|
|
1507
1591
|
value: "setting",
|
|
1508
1592
|
isPrimary: !1
|
|
1509
1593
|
}, r = {
|
|
1510
|
-
label:
|
|
1594
|
+
label: l("connect.store.actions.manageReward"),
|
|
1511
1595
|
value: "create_reward"
|
|
1512
1596
|
}, b = {
|
|
1513
|
-
label:
|
|
1597
|
+
label: l("connect.store.actions.addCategory"),
|
|
1514
1598
|
value: "create_category",
|
|
1515
1599
|
isPrimary: !0,
|
|
1516
1600
|
prependIcon: "add"
|
|
1517
|
-
}, o = R(), m = ct(), u =
|
|
1518
|
-
async function
|
|
1601
|
+
}, o = R(), m = ct(), u = ke(), { global: t, minor: c } = Ee, y = Me(), d = j(() => u.sortedStoreCategories), V = j(() => u.sortedStoreCategories.map((s) => s.name)), a = R(), S = R();
|
|
1602
|
+
async function k(s) {
|
|
1519
1603
|
var w;
|
|
1520
|
-
s === "setting" ? (w =
|
|
1604
|
+
s === "setting" ? (w = a.value) == null || w.showSheet(!0, u.storeOption) : s === "create_category" ? Y(-1) : s === "create_reward" ? await m.push({ name: Ze["$connect-STORE_REWARDS"] }) : s == "payout" && window.open(pn.paymentPortalUrl, "_blank");
|
|
1521
1605
|
}
|
|
1522
|
-
async function
|
|
1606
|
+
async function D(s) {
|
|
1523
1607
|
await c(
|
|
1524
1608
|
async () => {
|
|
1525
1609
|
var w;
|
|
1526
|
-
await
|
|
1610
|
+
await Ce.updateStore(s), await u.readMemberStore(), (w = a.value) == null || w.showSheet(!1);
|
|
1527
1611
|
},
|
|
1528
1612
|
{
|
|
1529
|
-
message:
|
|
1530
|
-
successMessage:
|
|
1613
|
+
message: l("connect.store.setting.update.message"),
|
|
1614
|
+
successMessage: l("connect.store.setting.update.success")
|
|
1531
1615
|
}
|
|
1532
1616
|
);
|
|
1533
1617
|
}
|
|
1534
|
-
async function
|
|
1618
|
+
async function Y(s = -1) {
|
|
1535
1619
|
var w, U;
|
|
1536
|
-
if ((!u.storeOption || !u.storeOption.company) && await
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1620
|
+
if ((!u.storeOption || !u.storeOption.company) && await _e.confirm(
|
|
1621
|
+
l("connect.store.category.setup.title"),
|
|
1622
|
+
l("connect.store.category.setup.button"),
|
|
1623
|
+
l("connect.store.category.setup.action"),
|
|
1624
|
+
l("connect.common.cancel")
|
|
1541
1625
|
))
|
|
1542
|
-
return (w =
|
|
1626
|
+
return (w = a.value) == null ? void 0 : w.showSheet(!0);
|
|
1543
1627
|
y.open({
|
|
1544
|
-
title: s == -1 ?
|
|
1628
|
+
title: s == -1 ? l("connect.store.category.add") : l("connect.store.category.edit"),
|
|
1545
1629
|
contentComponent: wt,
|
|
1546
1630
|
contentComponentProps: {
|
|
1547
1631
|
initialValue: ((U = d.value[s]) == null ? void 0 : U.name) ?? "",
|
|
1548
1632
|
action: s == -1 ? "add" : "edit"
|
|
1549
1633
|
}
|
|
1550
|
-
}).onPrimary(async (
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1634
|
+
}).onPrimary(async (O) => {
|
|
1635
|
+
O === null && !await _e.remove(
|
|
1636
|
+
l("connect.store.category.remove.confirm"),
|
|
1637
|
+
l("connect.store.category.remove.title")
|
|
1554
1638
|
) || await c(
|
|
1555
1639
|
async () => {
|
|
1556
|
-
const
|
|
1557
|
-
await
|
|
1558
|
-
categories:
|
|
1640
|
+
const $ = s == -1 ? [...d.value, { name: O, bundles: [] }] : [...d.value].map((A, p) => p == s ? { ...A, name: O } : A).filter((A) => A.name !== null);
|
|
1641
|
+
await Ce.updateStoreBundle({
|
|
1642
|
+
categories: $
|
|
1559
1643
|
}), await u.readMemberStore();
|
|
1560
1644
|
},
|
|
1561
1645
|
{
|
|
1562
|
-
message:
|
|
1563
|
-
successMessage:
|
|
1646
|
+
message: O === null ? l("connect.store.category.update.deleting") : s == -1 ? l("connect.store.category.update.creating") : l("connect.store.category.update.updating"),
|
|
1647
|
+
successMessage: O === null ? l("connect.store.category.update.success.deleted") : s == -1 ? l("connect.store.category.update.success.created") : l("connect.store.category.update.success.updated")
|
|
1564
1648
|
}
|
|
1565
1649
|
);
|
|
1566
1650
|
});
|
|
1567
1651
|
}
|
|
1568
|
-
async function
|
|
1652
|
+
async function z(s, w, U, O) {
|
|
1569
1653
|
var p, n, C;
|
|
1570
|
-
w ?? (w = (p =
|
|
1571
|
-
const
|
|
1572
|
-
for (const
|
|
1573
|
-
for (const E of
|
|
1654
|
+
w ?? (w = (p = S.value) == null ? void 0 : p.target.category), U ?? (U = (n = S.value) == null ? void 0 : n.target.index), O ?? (O = (C = S.value) == null ? void 0 : C.target.originalCategoryIndex);
|
|
1655
|
+
const $ = De(d.value);
|
|
1656
|
+
for (const P of $)
|
|
1657
|
+
for (const E of P.bundles)
|
|
1574
1658
|
console.log(E, "bundle in payload"), "pf_vouchers" in E && delete E.pf_vouchers;
|
|
1575
|
-
w !=
|
|
1576
|
-
const
|
|
1577
|
-
if (!
|
|
1659
|
+
w != O && ($[O].bundles.splice(U, 1), U = $[w].bundles.length), console.log(w, U, O, "ci, bi, originalCategoryIndex");
|
|
1660
|
+
const A = $[w];
|
|
1661
|
+
if (!A) {
|
|
1578
1662
|
Xe.error("Unexpected error", 2e3);
|
|
1579
1663
|
return;
|
|
1580
1664
|
}
|
|
1581
1665
|
if (s == null) {
|
|
1582
|
-
if (await
|
|
1666
|
+
if (await _e.remove(
|
|
1583
1667
|
"Are you sure you want to delete this bundle?",
|
|
1584
1668
|
"Delete bundle"
|
|
1585
1669
|
) == !1)
|
|
1586
1670
|
return;
|
|
1587
|
-
|
|
1671
|
+
A.bundles.splice(U, 1);
|
|
1588
1672
|
} else
|
|
1589
|
-
U == -1 ?
|
|
1673
|
+
U == -1 ? A.bundles.push(s) : A.bundles[U] = s;
|
|
1590
1674
|
await c(
|
|
1591
1675
|
async () => {
|
|
1592
|
-
var
|
|
1676
|
+
var P, E;
|
|
1593
1677
|
if (s != null) {
|
|
1594
|
-
const
|
|
1595
|
-
|
|
1596
|
-
Fe.bundleImagePath(void 0,
|
|
1597
|
-
|
|
1678
|
+
const q = (P = S.value) == null ? void 0 : P.bundleImage;
|
|
1679
|
+
q === null && s.image ? (await Fe.delete(s.image), s.image = null) : q && (s.image = await Fe.update(
|
|
1680
|
+
Fe.bundleImagePath(void 0, q),
|
|
1681
|
+
q
|
|
1598
1682
|
));
|
|
1599
1683
|
}
|
|
1600
|
-
await
|
|
1601
|
-
categories:
|
|
1602
|
-
}), await u.readMemberStore(), await u.readMembership(), await u.readRewards(), (E =
|
|
1684
|
+
await Ce.updateStoreBundle({
|
|
1685
|
+
categories: $
|
|
1686
|
+
}), await u.readMemberStore(), await u.readMembership(), await u.readRewards(), (E = S.value) == null || E.showSheet(!1);
|
|
1603
1687
|
},
|
|
1604
1688
|
{
|
|
1605
1689
|
message: `${s == null ? "Deleting" : U == -1 ? "Creating" : "Updating"} bundle`,
|
|
@@ -1607,15 +1691,15 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1607
1691
|
}
|
|
1608
1692
|
);
|
|
1609
1693
|
}
|
|
1610
|
-
function
|
|
1694
|
+
function K(s) {
|
|
1611
1695
|
var w;
|
|
1612
|
-
(w =
|
|
1696
|
+
(w = S.value) == null || w.showSheet(!0, {
|
|
1613
1697
|
...s,
|
|
1614
|
-
bundle: s.bundle ?
|
|
1698
|
+
bundle: s.bundle ? De(s.bundle) : void 0
|
|
1615
1699
|
});
|
|
1616
1700
|
}
|
|
1617
|
-
const
|
|
1618
|
-
function
|
|
1701
|
+
const W = R([]);
|
|
1702
|
+
function ae(s) {
|
|
1619
1703
|
var w;
|
|
1620
1704
|
(w = o.value) == null || w.showSheet({
|
|
1621
1705
|
bundle: s
|
|
@@ -1624,28 +1708,28 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1624
1708
|
return fe(async () => {
|
|
1625
1709
|
var s, w;
|
|
1626
1710
|
await t(async () => {
|
|
1627
|
-
var U,
|
|
1711
|
+
var U, O;
|
|
1628
1712
|
if (await u.readMemberStore(), await u.readMembership(), await u.readRewards(), await u.readPayoutAccount(), (U = m.currentRoute.value.query) != null && U.action) {
|
|
1629
|
-
switch ((
|
|
1713
|
+
switch ((O = m.currentRoute.value.query) == null ? void 0 : O.action) {
|
|
1630
1714
|
case "update_setting":
|
|
1631
|
-
|
|
1715
|
+
k("setting");
|
|
1632
1716
|
break;
|
|
1633
1717
|
case "create_category":
|
|
1634
|
-
|
|
1718
|
+
Y(-1);
|
|
1635
1719
|
break;
|
|
1636
1720
|
case "create_feedvibe_bundle":
|
|
1637
1721
|
y.open({
|
|
1638
1722
|
title: "Select category",
|
|
1639
|
-
contentComponent:
|
|
1640
|
-
}).onPrimary((
|
|
1641
|
-
y.close(),
|
|
1642
|
-
categories:
|
|
1643
|
-
category:
|
|
1723
|
+
contentComponent: $t
|
|
1724
|
+
}).onPrimary(($) => {
|
|
1725
|
+
y.close(), K({
|
|
1726
|
+
categories: V.value,
|
|
1727
|
+
category: $,
|
|
1644
1728
|
index: -1,
|
|
1645
1729
|
bundle: {
|
|
1646
|
-
...ue.cloneDeep(
|
|
1730
|
+
...ue.cloneDeep(Ve),
|
|
1647
1731
|
isFeedvibe: !0,
|
|
1648
|
-
price:
|
|
1732
|
+
price: N.Dinero.fromNumber({
|
|
1649
1733
|
number: 10,
|
|
1650
1734
|
precision: 2
|
|
1651
1735
|
}).toObject()
|
|
@@ -1656,90 +1740,90 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1656
1740
|
}
|
|
1657
1741
|
m.replace({ query: {} });
|
|
1658
1742
|
}
|
|
1659
|
-
}),
|
|
1743
|
+
}), W.value = [f, r, b], (((s = u.payoutAccount) == null ? void 0 : s.status) != "APPROVED" || ((w = u.payoutAccount) == null ? void 0 : w.enable) != !0) && (W.value = [
|
|
1660
1744
|
x,
|
|
1661
1745
|
f,
|
|
1662
1746
|
r,
|
|
1663
1747
|
b
|
|
1664
1748
|
]);
|
|
1665
1749
|
}), (s, w) => {
|
|
1666
|
-
const U = h("FmPageHead"),
|
|
1667
|
-
return
|
|
1750
|
+
const U = h("FmPageHead"), O = h("FmButton"), $ = h("FmCard");
|
|
1751
|
+
return g(), B(X, null, [
|
|
1668
1752
|
i(U, {
|
|
1669
|
-
title: e(
|
|
1670
|
-
actions: e(
|
|
1671
|
-
"onClick:action":
|
|
1753
|
+
title: e(l)("connect.store.title"),
|
|
1754
|
+
actions: e(W),
|
|
1755
|
+
"onClick:action": k
|
|
1672
1756
|
}, null, 8, ["title", "actions"]),
|
|
1673
1757
|
_("div", yn, [
|
|
1674
|
-
e(d) && e(d).length > 0 ? (
|
|
1675
|
-
(
|
|
1676
|
-
key:
|
|
1758
|
+
e(d) && e(d).length > 0 ? (g(), B(X, { key: 0 }, [
|
|
1759
|
+
(g(!0), B(X, null, re(e(d), (A, p) => (g(), B("div", {
|
|
1760
|
+
key: A.name,
|
|
1677
1761
|
class: "space-y-8 py-12"
|
|
1678
1762
|
}, [
|
|
1679
1763
|
_("div", fn, [
|
|
1680
|
-
_("div", bn, L(
|
|
1681
|
-
i(
|
|
1682
|
-
i(
|
|
1764
|
+
_("div", bn, L(A.name), 1),
|
|
1765
|
+
i(Pe, { json: A }, null, 8, ["json"]),
|
|
1766
|
+
i(O, {
|
|
1683
1767
|
icon: "edit",
|
|
1684
1768
|
size: "md",
|
|
1685
1769
|
variant: "tertiary",
|
|
1686
|
-
onClick: (n) =>
|
|
1770
|
+
onClick: (n) => Y(p)
|
|
1687
1771
|
}, null, 8, ["onClick"])
|
|
1688
1772
|
]),
|
|
1689
|
-
_("div",
|
|
1690
|
-
(
|
|
1773
|
+
_("div", gn, [
|
|
1774
|
+
(g(!0), B(X, null, re(A.bundles, (n, C) => (g(), I(_t, {
|
|
1691
1775
|
bundle: n,
|
|
1692
1776
|
key: n._id,
|
|
1693
|
-
onEdit: (
|
|
1777
|
+
onEdit: (P) => K({
|
|
1694
1778
|
bundle: n,
|
|
1695
1779
|
category: p,
|
|
1696
1780
|
index: C,
|
|
1697
|
-
categories: e(
|
|
1781
|
+
categories: e(V)
|
|
1698
1782
|
}),
|
|
1699
|
-
onDelete: (
|
|
1700
|
-
onSend:
|
|
1783
|
+
onDelete: (P) => z(null, p, C),
|
|
1784
|
+
onSend: ae
|
|
1701
1785
|
}, null, 8, ["bundle", "onEdit", "onDelete"]))), 128)),
|
|
1702
1786
|
i(Ct, {
|
|
1703
|
-
onCreate: (n) =>
|
|
1787
|
+
onCreate: (n) => K({
|
|
1704
1788
|
category: p,
|
|
1705
1789
|
index: -1,
|
|
1706
|
-
categories: e(
|
|
1790
|
+
categories: e(V)
|
|
1707
1791
|
})
|
|
1708
1792
|
}, null, 8, ["onCreate"])
|
|
1709
1793
|
])
|
|
1710
1794
|
]))), 128)),
|
|
1711
1795
|
i(dn, {
|
|
1712
1796
|
ref_key: "bundleSheetRef",
|
|
1713
|
-
ref:
|
|
1714
|
-
onUpdate:
|
|
1797
|
+
ref: S,
|
|
1798
|
+
onUpdate: z
|
|
1715
1799
|
}, null, 512)
|
|
1716
|
-
], 64)) : (
|
|
1800
|
+
], 64)) : (g(), I($, {
|
|
1717
1801
|
key: 1,
|
|
1718
1802
|
variant: "outlined",
|
|
1719
1803
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
1720
1804
|
}, {
|
|
1721
1805
|
default: T(() => [
|
|
1722
1806
|
w[1] || (w[1] = _("img", {
|
|
1723
|
-
src:
|
|
1807
|
+
src: Ye,
|
|
1724
1808
|
class: "aspect-square w-[150px]"
|
|
1725
1809
|
}, null, -1)),
|
|
1726
|
-
_("div",
|
|
1727
|
-
_("div", hn, L(e(
|
|
1728
|
-
_("div", xn, L(e(
|
|
1810
|
+
_("div", vn, [
|
|
1811
|
+
_("div", hn, L(e(l)("connect.store.bundle.title")), 1),
|
|
1812
|
+
_("div", xn, L(e(l)("connect.store.bundle.description")), 1)
|
|
1729
1813
|
]),
|
|
1730
|
-
i(
|
|
1814
|
+
i(O, {
|
|
1731
1815
|
variant: "primary",
|
|
1732
|
-
label: e(
|
|
1816
|
+
label: e(l)("connect.store.actions.addCategory"),
|
|
1733
1817
|
icon: "add",
|
|
1734
|
-
onClick: w[0] || (w[0] = (
|
|
1818
|
+
onClick: w[0] || (w[0] = (A) => Y(-1))
|
|
1735
1819
|
}, null, 8, ["label"])
|
|
1736
1820
|
]),
|
|
1737
1821
|
_: 1
|
|
1738
1822
|
})),
|
|
1739
|
-
i(
|
|
1823
|
+
i(Wt, {
|
|
1740
1824
|
ref_key: "settingSheetRef",
|
|
1741
|
-
ref:
|
|
1742
|
-
onUpdate:
|
|
1825
|
+
ref: a,
|
|
1826
|
+
onUpdate: D
|
|
1743
1827
|
}, null, 512),
|
|
1744
1828
|
i(mn, {
|
|
1745
1829
|
ref_key: "sendBundleSheetRef",
|