@feedmepos/mf-connect 0.1.38-beta.2 → 0.1.38-beta.21
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-BjSfI2Ff.js → Analytic-CEd_WApy.js} +14 -14
- package/dist/{App-D11A2JY1.js → App-ulCtuU5o.js} +671 -661
- package/dist/{AuditLogs-DWCFYoRg.js → AuditLogs-BM1Np61K.js} +11 -11
- package/dist/{Bin-9wV4Ah3M.js → Bin-icbjnKXw.js} +9 -9
- package/dist/{Broadcast-I3BtSk8V.js → Broadcast-COQ3E8vI.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-XJqTXbKr.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BbXEYOFK.js} +6 -6
- package/dist/{Card-CqALG5RM.js → Card-Cwh3GXi0.js} +142 -136
- package/dist/{Collections-rg3SzoUb.js → Collections-EuOjzpkL.js} +81 -75
- package/dist/{Credit-BNn1sYZv.js → Credit-BY2Fpdhh.js} +9 -9
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-PJ8q72XH.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BbsLgUMQ.js} +678 -675
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Sww7KNle.js → EffectSheet.vue_vue_type_style_index_0_lang-BLw3-hI1.js} +6 -6
- package/dist/{Experience-D_Qm8SUj.js → Experience-rAH7zk71.js} +9 -9
- package/dist/{Game-CKXgXm6Q.js → Game-DlI0yNF0.js} +10 -10
- package/dist/{Index-D4DGfUHd.js → Index-DemXFS3d.js} +10 -10
- package/dist/{Marketing-Dn9A1vgH.js → Marketing-shNBO9Rc.js} +7 -7
- package/dist/{Member-B55vWHDd.js → Member-C19ZgpaL.js} +10 -10
- package/dist/{MemberList-BWTG9Ohy.js → MemberList-B2tNB4yg.js} +27 -27
- package/dist/{MemberTransactions-CP5EI-W0.js → MemberTransactions-BN3qaTVY.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-D--_An-f.js → MessageInput.vue_vue_type_script_setup_true_lang-BY3j1h72.js} +5621 -5418
- package/dist/{Mission-CFvhROuB.js → Mission-j1KI0-hJ.js} +10 -10
- package/dist/{Overview-4273yNwL.js → Overview-BN2Vdu8Q.js} +18 -18
- package/dist/{Point-B_-_C919.js → Point-8zy7QcTk.js} +9 -9
- package/dist/{Promotion-D2S3COxk.js → Promotion-mcUcylXB.js} +10 -10
- package/dist/{Queue-BmS1Oi-C.js → Queue-BsNv4P8u.js} +11 -11
- package/dist/{Record-DRBl0M8g.js → Record-VA6Bdlnz.js} +9 -9
- package/dist/{Reward-8056NmfK.js → Reward-CVyO3Ga1.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CJ_WC2gV.js → RewardGroup.vue_vue_type_script_setup_true_lang-BR9_a9bJ.js} +11 -11
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dhs2whAH.js +1763 -0
- package/dist/{Segment-Bzq-pyhc.js → Segment-BMgcdIIS.js} +209 -209
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-4nNkkklE.js → SelectItems.vue_vue_type_script_setup_true_lang-CKRpWcn_.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dnf2oxOG.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DZCNcdVW.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BLYP-5U9.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BESF672g.js} +3 -3
- package/dist/{Setting-BrJfYoru.js → Setting-BMKKkZTD.js} +457 -442
- package/dist/{Store-Bpl_4yZW.js → Store-DdxMDtfL.js} +466 -459
- package/dist/{StoreRewards-Cu7n7Pjz.js → StoreRewards-CRyeHEMF.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-T3Wo2maC.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DS6-9WP9.js} +207 -221
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-QucRaI08.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BTKpclKX.js} +1 -1
- package/dist/{Tier-_LnXg3n6.js → Tier-D5Xmp5vV.js} +229 -226
- package/dist/{Title-B7AGStvx.js → Title-CsK2crqD.js} +141 -138
- package/dist/{Transaction-Chxv6V7u.js → Transaction-Dvfc9x4f.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CzXNmobp.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CqCxWltm.js} +6 -6
- package/dist/{Voucher-C5z2kOq9.js → Voucher-CPN7TMho.js} +13 -13
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DdGMrk2C.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DMye9MS3.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BlXzEWA6.js → ZodTextField.vue_vue_type_script_setup_true_lang-CnaQAEKo.js} +1 -1
- package/dist/{app-BVojNX0w.js → app-DRBevJsF.js} +1 -1
- package/dist/{app-7cvPyHJ7.js → app-DteFjR9L.js} +459 -449
- package/dist/app.js +1 -1
- package/dist/{business-CmxV69wT.js → business-BqV9jK-p.js} +1 -1
- package/dist/{campaign-CT_cNJEL.js → campaign-BHDq-yx-.js} +10 -10
- package/dist/{campaign-Dq5C_no-.js → campaign-CsWoG6e_.js} +2 -2
- package/dist/{campaign.enum-dp7yHKzF.js → campaign.enum-Dfa96W5V.js} +1 -1
- package/dist/{campaign.fn-BYZgKDN7.js → campaign.fn-pLrwyHA_.js} +37 -37
- package/dist/{collectible.enum-DxbB4DxT.js → collectible.enum-BYTYWPsR.js} +1 -1
- package/dist/{collection.fn-CNZRdUgy.js → collection.fn-CYLIQJig.js} +2 -2
- package/dist/{dto-CT9zZbv9.js → dto-DBfDbpyb.js} +4 -4
- package/dist/{effect-FIlOEC4H.js → effect-D9pD5RCk.js} +1 -1
- package/dist/{email-addresses-Ba7xImfX.js → email-addresses-BApvdLkQ.js} +1 -1
- package/dist/{export-uzjZFNF9.js → export--EfmCiw0.js} +4 -4
- package/dist/{helper-D4sAZde0.js → helper-BHiK3pLT.js} +1 -1
- package/dist/{index-B9pl4zRZ.js → index-2dknXEFJ.js} +19 -9
- package/dist/{index-CNJLP3D5.js → index-B9_Tn8si.js} +1 -1
- package/dist/{index-BjU8LVUC.js → index-BSQXDDQY.js} +6347 -6305
- package/dist/{index-CwsMG2cV.js → index-Bqc7PV3K.js} +1 -1
- package/dist/{index-CONvJfKv.js → index-C1Vrltkc.js} +1 -1
- package/dist/{index-D5rvMvzx.js → index-CD2bkLo_.js} +1 -1
- package/dist/{index-DNxa8Rqx.js → index-CDLBLuYq.js} +69 -68
- package/dist/{index-BXz54M1s.js → index-COiVJ9pA.js} +1 -1
- package/dist/{index-CH3z92VV.js → index-CVxruvVB.js} +1 -1
- package/dist/{index-CS3Jmojj.js → index-Cc80pBYX.js} +573 -573
- package/dist/{index-l2F5MnLF.js → index-DXM3o6kl.js} +11 -4
- package/dist/{index-BI3m1Ehv.js → index-DYgdunxw.js} +3 -3
- package/dist/{index-CvBcve-r.js → index-Pd9RCQxn.js} +1 -1
- package/dist/{index-CUfS9Kp1.js → index-qd_dvZcw.js} +2 -2
- package/dist/{index.esm2017-ATcsD5N4.js → index.esm2017-DAWS_ALH.js} +34 -34
- package/dist/{loading-BWGQSrCB.js → loading-BVUeda4s.js} +1 -1
- package/dist/{membership-Cc4OZ8-U.js → membership-BL_43RJR.js} +3 -3
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-D7p8nfun.js → money-Cd8hLiNc.js} +1 -1
- package/dist/{number-CMJjC4qz.js → number-DVb8PSrj.js} +1 -1
- package/dist/objectid-D33s3gxp.js +145 -0
- package/dist/{plugins-eQis66QR.js → plugins-BKtBkC9Q.js} +2 -2
- package/dist/{reward-DrnzbG20.js → reward-f41dJcaL.js} +1 -1
- package/dist/{rule-CtRxkYXB.js → rule-Cbux1-fC.js} +4 -4
- package/dist/rule-builder-BrZeF45Z.js +91 -0
- package/dist/style.css +4 -1
- package/dist/{template-C3UfY0v5.js → template-tqhgmIdT.js} +4 -4
- package/dist/timezone-DaTVH4y0.js +1150 -0
- package/dist/{trigger-C9U7Zgad.js → trigger-C34RfwrT.js} +4 -4
- package/dist/{user-D7n9yYmO.js → user-DgKhDLYr.js} +1 -1
- package/dist/{vue-i18n-Bz45zC04.js → vue-i18n-xo56wiwi.js} +410 -410
- package/dist/{xlsx-D4S4qbcZ.js → xlsx-D8ZZRjtf.js} +1 -1
- package/package.json +3 -2
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DqNQl_nz.js +0 -1728
- package/dist/objectid-D5T27iny.js +0 -145
- package/dist/rule-builder-Di9RIYHF.js +0 -89
|
@@ -1,45 +1,45 @@
|
|
|
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
|
|
2
|
-
import { _ as
|
|
3
|
-
import { useDialog as
|
|
4
|
-
import { c as D, e as he, S as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as ke, C as me } from "./membership-
|
|
7
|
-
import { a as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { c as se } from "./index-
|
|
10
|
-
import { u as be } from "./vue-i18n-
|
|
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 ie, ref as U, isRef as oe, reactive as qe, onMounted as fe, watch as we, toRaw as Ye, createTextVNode as ue, h as We } from "vue";
|
|
2
|
+
import { _ as ze } from "./tier-BJDhpH6X.js";
|
|
3
|
+
import { useDialog as Ee, useDialogChild as je, components as Je } from "@feedmepos/ui-library";
|
|
4
|
+
import { c as D, e as he, S as Ge } from "./index-BSQXDDQY.js";
|
|
5
|
+
import { u as Le } from "./loading-BVUeda4s.js";
|
|
6
|
+
import { u as ke, C as me } from "./membership-BL_43RJR.js";
|
|
7
|
+
import { a as Xe, c as Me } from "./object-qECH92oz.js";
|
|
8
|
+
import { _ as re } from "./lodash-B5I3zXaY.js";
|
|
9
|
+
import { c as se } from "./index-Cc80pBYX.js";
|
|
10
|
+
import { u as be } from "./vue-i18n-xo56wiwi.js";
|
|
11
11
|
import { Z, g as J, a as G } from "./zod-Bg2FbC-D.js";
|
|
12
|
-
import { z as Q, R as
|
|
13
|
-
import { m as
|
|
12
|
+
import { z as Q, R as Ze } from "./app-DteFjR9L.js";
|
|
13
|
+
import { m as Qe, n as et, o as tt, p as Oe, q as nt } from "./index-CDLBLuYq.js";
|
|
14
14
|
import { u as Se } from "./app-wDQR6dpb.js";
|
|
15
|
-
import { _ as te } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
import { a as
|
|
15
|
+
import { _ as te } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CnaQAEKo.js";
|
|
16
|
+
import { a as ot, p as _e, n as at, f as Fe } from "./plugins-BKtBkC9Q.js";
|
|
17
17
|
import { J as Pe } from "./JsonViewer-v8_C7l5N.js";
|
|
18
|
-
import { _ as
|
|
19
|
-
import { _ as
|
|
20
|
-
import { _ as
|
|
21
|
-
import { z as
|
|
22
|
-
import { F as
|
|
23
|
-
import { t as
|
|
24
|
-
import "./index-
|
|
25
|
-
import "./index-
|
|
26
|
-
import "./index-
|
|
27
|
-
import "./index-
|
|
28
|
-
import { m as
|
|
29
|
-
import { m as Ce } from "./index-
|
|
30
|
-
import { useRouter as
|
|
31
|
-
function
|
|
18
|
+
import { _ as lt } from "./index-qd_dvZcw.js";
|
|
19
|
+
import { _ as st } from "./ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js";
|
|
20
|
+
import { _ as rt } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
21
|
+
import { z as it, a as dt } from "./money-Cd8hLiNc.js";
|
|
22
|
+
import { F as ut } from "./number-DVb8PSrj.js";
|
|
23
|
+
import { t as ct } from "./helper-BHiK3pLT.js";
|
|
24
|
+
import "./index-B9_Tn8si.js";
|
|
25
|
+
import "./index-2dknXEFJ.js";
|
|
26
|
+
import "./index-C1Vrltkc.js";
|
|
27
|
+
import "./index-DYgdunxw.js";
|
|
28
|
+
import { m as mt } from "./index-Pd9RCQxn.js";
|
|
29
|
+
import { m as Ce } from "./index-DXM3o6kl.js";
|
|
30
|
+
import { useRouter as pt } from "vue-router";
|
|
31
|
+
function Ke(v) {
|
|
32
32
|
return se.DineroFactory(v).toUnit();
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
const o =
|
|
34
|
+
function yt(v, x, a, f, s = [], b = []) {
|
|
35
|
+
const o = lt.compact(
|
|
36
36
|
x.map((t) => v.find((c) => c.systemCode === t.systemCode && c.taxCode === t.taxCode)).filter((t) => !!t && b.includes(t.systemCode))
|
|
37
37
|
), m = o.reduce(
|
|
38
38
|
(t, c) => {
|
|
39
39
|
var y;
|
|
40
40
|
return Object.assign(t, {
|
|
41
41
|
[c.taxCode]: {
|
|
42
|
-
inclusive: ((y =
|
|
42
|
+
inclusive: ((y = s.find((d) => d.systemCode === c.systemCode)) == null ? void 0 : y.inclusive) || !1,
|
|
43
43
|
adjustment: {
|
|
44
44
|
level: 1,
|
|
45
45
|
type: {
|
|
@@ -64,7 +64,7 @@ function mt(v, x, l, f, r = [], b = []) {
|
|
|
64
64
|
level: 0,
|
|
65
65
|
type: {
|
|
66
66
|
type: "BY_AMOUNT",
|
|
67
|
-
amount: se.DineroFactory(
|
|
67
|
+
amount: se.DineroFactory(a).subtract(se.Dinero.fromNumber({ number: f }).toObject()).toObject()
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
},
|
|
@@ -85,32 +85,32 @@ function mt(v, x, l, f, r = [], b = []) {
|
|
|
85
85
|
}).convertPrecision(2).toObject()
|
|
86
86
|
}));
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
return v ? v.reduce((f,
|
|
88
|
+
function ft(v, x, a) {
|
|
89
|
+
return v ? v.reduce((f, s) => {
|
|
90
90
|
var b;
|
|
91
|
-
return (b =
|
|
91
|
+
return (b = a.find((o) => o.systemCode === s.systemCode)) != null && b.inclusive || (f = se.DineroFactory(f.toObject()).add(s.total)), f;
|
|
92
92
|
}, se.DineroFactory(x)).toObject() : se.DineroFactory(x).toObject();
|
|
93
93
|
}
|
|
94
|
-
const
|
|
94
|
+
const bt = { class: "relative h-[120px] aspect-video flex items-center justify-center border rounded-md border-fm-color-neutral-gray-300" }, gt = ["src"], vt = {
|
|
95
95
|
key: 2,
|
|
96
96
|
class: "absolute top-2 left-2"
|
|
97
|
-
},
|
|
97
|
+
}, ht = { class: "absolute top-0 right-0" }, xt = { class: "fm-typo-en-body-lg-600" }, _t = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ct = { class: "flex gap-8 items-center flex-wrap" }, St = /* @__PURE__ */ ee({
|
|
98
98
|
__name: "StoreBundleCard",
|
|
99
99
|
props: {
|
|
100
100
|
bundle: { type: Object, required: !0 }
|
|
101
101
|
},
|
|
102
102
|
emits: ["edit", "delete", "send"],
|
|
103
103
|
setup(v, { emit: x }) {
|
|
104
|
-
const
|
|
104
|
+
const a = v, f = x, s = j(() => {
|
|
105
105
|
const o = [];
|
|
106
|
-
return
|
|
107
|
-
`${D.Config.getCountry().currency.symbol}${
|
|
108
|
-
),
|
|
106
|
+
return a.bundle.price.amount > 0 && o.push(
|
|
107
|
+
`${D.Config.getCountry().currency.symbol}${Ke(a.bundle.price)}`
|
|
108
|
+
), a.bundle.coinPrice && o.push(`${a.bundle.coinPrice} point(s)`), o.join(" or ");
|
|
109
109
|
}), b = j(() => {
|
|
110
110
|
var m, u;
|
|
111
111
|
const o = [];
|
|
112
|
-
if (
|
|
113
|
-
const t =
|
|
112
|
+
if (a.bundle.titles.length > 0 && o.push(`${a.bundle.titles.length} title(s)`), a.bundle.vouchers.length > 0 && o.push(`${a.bundle.vouchers.length} voucher(s)`), a.bundle.credit.normal || (m = a.bundle.credit.free) != null && m.amount) {
|
|
113
|
+
const t = a.bundle.credit.normal + (((u = a.bundle.credit.free) == null ? void 0 : u.amount) ?? 0);
|
|
114
114
|
o.push(`${t} credit(s)`);
|
|
115
115
|
}
|
|
116
116
|
return o;
|
|
@@ -122,26 +122,26 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
122
122
|
class: "flex flex-col gap-y-8 p-16 min-h-[240px] h-full text-center items-center"
|
|
123
123
|
}, {
|
|
124
124
|
default: T(() => [
|
|
125
|
-
_("div",
|
|
125
|
+
_("div", bt, [
|
|
126
126
|
v.bundle.image ? (g(), B("img", {
|
|
127
127
|
key: 1,
|
|
128
128
|
src: v.bundle.image,
|
|
129
129
|
class: "w-full h-full object-contain aspect-video"
|
|
130
|
-
}, null, 8,
|
|
130
|
+
}, null, 8, gt)) : (g(), I(u, {
|
|
131
131
|
key: 0,
|
|
132
132
|
name: "image",
|
|
133
133
|
outline: !0,
|
|
134
134
|
size: "md",
|
|
135
135
|
class: "text-fm-color-neutral-gray-200"
|
|
136
136
|
})),
|
|
137
|
-
v.bundle.isFeedvibe ? (g(), B("div",
|
|
137
|
+
v.bundle.isFeedvibe ? (g(), B("div", vt, [
|
|
138
138
|
i(t, {
|
|
139
139
|
label: "Feedvibe",
|
|
140
140
|
class: "text-fm-color-primary bg-fm-color-system-warning-100",
|
|
141
141
|
compact: ""
|
|
142
142
|
})
|
|
143
143
|
])) : M("", !0),
|
|
144
|
-
_("div",
|
|
144
|
+
_("div", ht, [
|
|
145
145
|
i(d, { placement: "bottom-end" }, {
|
|
146
146
|
"menu-button": T(() => [
|
|
147
147
|
i(c, {
|
|
@@ -151,18 +151,18 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
151
151
|
]),
|
|
152
152
|
default: T(() => [
|
|
153
153
|
i(y, {
|
|
154
|
-
onClick: m[0] || (m[0] = (
|
|
154
|
+
onClick: m[0] || (m[0] = (l) => f("edit", v.bundle)),
|
|
155
155
|
icon: "edit",
|
|
156
156
|
label: "Edit"
|
|
157
157
|
}),
|
|
158
158
|
v.bundle.stripePriceId ? M("", !0) : (g(), I(y, {
|
|
159
159
|
key: 0,
|
|
160
|
-
onClick: m[1] || (m[1] = (
|
|
160
|
+
onClick: m[1] || (m[1] = (l) => f("send", v.bundle)),
|
|
161
161
|
icon: "send",
|
|
162
162
|
label: "Send"
|
|
163
163
|
})),
|
|
164
164
|
i(y, {
|
|
165
|
-
onClick: m[2] || (m[2] = (
|
|
165
|
+
onClick: m[2] || (m[2] = (l) => f("delete", v.bundle)),
|
|
166
166
|
icon: "delete"
|
|
167
167
|
}, {
|
|
168
168
|
label: T(() => m[3] || (m[3] = [
|
|
@@ -175,12 +175,12 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
175
175
|
})
|
|
176
176
|
])
|
|
177
177
|
]),
|
|
178
|
-
_("div",
|
|
179
|
-
_("div",
|
|
180
|
-
_("div",
|
|
181
|
-
(g(!0), B(X, null,
|
|
182
|
-
key:
|
|
183
|
-
label:
|
|
178
|
+
_("div", xt, L(v.bundle.name), 1),
|
|
179
|
+
_("div", _t, L(e(s) || "Free"), 1),
|
|
180
|
+
_("div", Ct, [
|
|
181
|
+
(g(!0), B(X, null, ie(e(b), (l, F) => (g(), I(t, {
|
|
182
|
+
key: F,
|
|
183
|
+
label: l
|
|
184
184
|
}, null, 8, ["label"]))), 128))
|
|
185
185
|
])
|
|
186
186
|
]),
|
|
@@ -188,12 +188,12 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
188
188
|
});
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
-
}),
|
|
191
|
+
}), Ft = /* @__PURE__ */ ee({
|
|
192
192
|
__name: "AddBundleCard",
|
|
193
193
|
emits: ["create"],
|
|
194
194
|
setup(v, { emit: x }) {
|
|
195
|
-
const { t:
|
|
196
|
-
return (
|
|
195
|
+
const { t: a } = be(), f = x;
|
|
196
|
+
return (s, b) => {
|
|
197
197
|
const o = h("FmButton"), m = h("FmCard");
|
|
198
198
|
return g(), I(m, {
|
|
199
199
|
variant: "outlined",
|
|
@@ -202,7 +202,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
202
202
|
default: T(() => [
|
|
203
203
|
i(o, {
|
|
204
204
|
onClick: b[0] || (b[0] = (u) => f("create")),
|
|
205
|
-
label: e(
|
|
205
|
+
label: e(a)("connect.store.actions.addBundle"),
|
|
206
206
|
icon: "add",
|
|
207
207
|
variant: "secondary"
|
|
208
208
|
}, null, 8, ["label"])
|
|
@@ -211,7 +211,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
211
211
|
});
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
|
-
}),
|
|
214
|
+
}), Vt = { class: "space-y-16" }, wt = { class: "flex w-full justify-between pb-16" }, kt = { class: "flex items-center justify-end gap-8" }, Pt = /* @__PURE__ */ ee({
|
|
215
215
|
__name: "CategoryDialog",
|
|
216
216
|
props: {
|
|
217
217
|
action: {
|
|
@@ -224,23 +224,23 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
226
|
setup(v) {
|
|
227
|
-
const { t: x } = be(),
|
|
227
|
+
const { t: x } = be(), a = v, f = Ee(), { emitData: s, emitAction: b } = je(), o = U(a.initialValue), m = Q.string().min(1);
|
|
228
228
|
function u() {
|
|
229
|
-
|
|
229
|
+
s(o.value), b("primary"), f.close();
|
|
230
230
|
}
|
|
231
231
|
function t() {
|
|
232
|
-
|
|
232
|
+
s(null), b("primary"), f.close();
|
|
233
233
|
}
|
|
234
234
|
return (c, y) => {
|
|
235
235
|
const d = h("FmTextField"), V = h("FmButton");
|
|
236
|
-
return g(), B("div",
|
|
236
|
+
return g(), B("div", Vt, [
|
|
237
237
|
i(d, {
|
|
238
238
|
modelValue: e(o),
|
|
239
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
|
239
|
+
"onUpdate:modelValue": y[0] || (y[0] = (l) => oe(o) ? o.value = l : null),
|
|
240
240
|
label: e(x)("connect.store.category.label"),
|
|
241
241
|
rules: [e(Z).toRule(e(m))]
|
|
242
242
|
}, null, 8, ["modelValue", "label", "rules"]),
|
|
243
|
-
_("div",
|
|
243
|
+
_("div", wt, [
|
|
244
244
|
_("div", null, [
|
|
245
245
|
v.action == "edit" ? (g(), I(V, {
|
|
246
246
|
key: 0,
|
|
@@ -249,11 +249,11 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
249
249
|
variant: "destructive"
|
|
250
250
|
}, null, 8, ["label"])) : M("", !0)
|
|
251
251
|
]),
|
|
252
|
-
_("div",
|
|
252
|
+
_("div", kt, [
|
|
253
253
|
i(V, {
|
|
254
254
|
label: e(x)("connect.common.cancel"),
|
|
255
255
|
variant: "tertiary",
|
|
256
|
-
onClick: y[1] || (y[1] = (
|
|
256
|
+
onClick: y[1] || (y[1] = (l) => e(f).close())
|
|
257
257
|
}, null, 8, ["label"]),
|
|
258
258
|
i(V, {
|
|
259
259
|
label: v.action == "edit" ? e(x)("connect.common.edit") : e(x)("connect.common.add"),
|
|
@@ -265,10 +265,10 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
265
265
|
]);
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
|
-
}),
|
|
268
|
+
}), $t = { class: "space-y-16" }, Tt = { class: "flex items-center justify-end gap-8 pb-16" }, Ut = /* @__PURE__ */ ee({
|
|
269
269
|
__name: "SelectCategoryDialog",
|
|
270
270
|
setup(v) {
|
|
271
|
-
const { emitData: x, emitAction:
|
|
271
|
+
const { emitData: x, emitAction: a } = je(), f = ke(), s = U(), b = j(
|
|
272
272
|
() => f.sortedStoreCategories.map((o, m) => ({
|
|
273
273
|
label: o.name,
|
|
274
274
|
value: m
|
|
@@ -276,28 +276,28 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
276
276
|
);
|
|
277
277
|
return (o, m) => {
|
|
278
278
|
const u = h("FmSelect"), t = h("FmButton");
|
|
279
|
-
return g(), B("div",
|
|
279
|
+
return g(), B("div", $t, [
|
|
280
280
|
m[4] || (m[4] = _("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Select a category to create FeedMe CNY 2025 bundle ", -1)),
|
|
281
281
|
i(u, {
|
|
282
282
|
placeholder: "Select a category",
|
|
283
283
|
items: e(b),
|
|
284
|
-
modelValue: e(
|
|
284
|
+
modelValue: e(s),
|
|
285
285
|
"onUpdate:modelValue": [
|
|
286
|
-
m[0] || (m[0] = (c) => oe(
|
|
286
|
+
m[0] || (m[0] = (c) => oe(s) ? s.value = c : null),
|
|
287
287
|
m[1] || (m[1] = (c) => e(x)(c))
|
|
288
288
|
],
|
|
289
289
|
label: "Category"
|
|
290
290
|
}, null, 8, ["items", "modelValue"]),
|
|
291
|
-
_("div",
|
|
291
|
+
_("div", Tt, [
|
|
292
292
|
i(t, {
|
|
293
293
|
variant: "tertiary",
|
|
294
294
|
label: "Cancel",
|
|
295
|
-
onClick: m[2] || (m[2] = (c) => e(
|
|
295
|
+
onClick: m[2] || (m[2] = (c) => e(a)("tertiary"))
|
|
296
296
|
}),
|
|
297
297
|
i(t, {
|
|
298
298
|
label: "Select",
|
|
299
|
-
onClick: m[3] || (m[3] = (c) => e(
|
|
300
|
-
disabled: e(
|
|
299
|
+
onClick: m[3] || (m[3] = (c) => e(a)("primary")),
|
|
300
|
+
disabled: e(s) == null
|
|
301
301
|
}, null, 8, ["disabled"])
|
|
302
302
|
])
|
|
303
303
|
]);
|
|
@@ -307,7 +307,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
307
307
|
function xe(v) {
|
|
308
308
|
return v.states.map((x) => ({ label: x, value: x }));
|
|
309
309
|
}
|
|
310
|
-
const
|
|
310
|
+
const Rt = {
|
|
311
311
|
[he.F_COUNTRY.enum.MY]: {
|
|
312
312
|
states: [
|
|
313
313
|
"Johor",
|
|
@@ -484,17 +484,17 @@ const Tt = {
|
|
|
484
484
|
const v = D.Country.getCountryFlattenTaxes(pe().code);
|
|
485
485
|
return ye.taxSystem.map((x) => ({
|
|
486
486
|
code: x.code,
|
|
487
|
-
options: v.map((
|
|
487
|
+
options: v.map((a) => ({ ...a, feedmeTaxCode: ye.generateCode(a) })).filter((a) => a.systemCode === x.code)
|
|
488
488
|
}));
|
|
489
489
|
},
|
|
490
490
|
systemDefaultCode(v) {
|
|
491
|
-
const x = ye.groupedTaxOptions().find((
|
|
492
|
-
return x == null ? void 0 : x.options.find((
|
|
491
|
+
const x = ye.groupedTaxOptions().find((a) => a.code === v);
|
|
492
|
+
return x == null ? void 0 : x.options.find((a) => a.default);
|
|
493
493
|
},
|
|
494
494
|
generateCode(v) {
|
|
495
495
|
return `${v.systemCode}/${v.taxCode}`;
|
|
496
496
|
}
|
|
497
|
-
}, ne = ye,
|
|
497
|
+
}, ne = ye, It = /* @__PURE__ */ ee({
|
|
498
498
|
__name: "TaxInclusiveSetting",
|
|
499
499
|
props: {
|
|
500
500
|
modelValue: {
|
|
@@ -505,17 +505,17 @@ const Tt = {
|
|
|
505
505
|
},
|
|
506
506
|
emits: ["update:model-value"],
|
|
507
507
|
setup(v, { emit: x }) {
|
|
508
|
-
const
|
|
508
|
+
const a = v, f = ne.taxSystem, s = x, b = U(a.modelValue);
|
|
509
509
|
function o(c, y) {
|
|
510
|
-
const d =
|
|
510
|
+
const d = re.clone(a.modelValue), V = d.findIndex((l) => l.systemCode === c);
|
|
511
511
|
V >= 0 ? d[V].inclusive = y : d.push({
|
|
512
512
|
systemCode: c,
|
|
513
513
|
inclusive: y
|
|
514
|
-
}), b.value = d,
|
|
514
|
+
}), b.value = d, s("update:model-value", d);
|
|
515
515
|
}
|
|
516
516
|
function m() {
|
|
517
517
|
return f.map((c) => {
|
|
518
|
-
const y =
|
|
518
|
+
const y = a.modelValue ? a.modelValue.find((d) => d.systemCode === c.code) : !1;
|
|
519
519
|
return {
|
|
520
520
|
label: c.name,
|
|
521
521
|
config: {
|
|
@@ -527,31 +527,31 @@ const Tt = {
|
|
|
527
527
|
};
|
|
528
528
|
});
|
|
529
529
|
}
|
|
530
|
-
const u =
|
|
530
|
+
const u = qe(m());
|
|
531
531
|
function t(c, y) {
|
|
532
532
|
return `${c} ${y ? "Inclusive" : "Exclusive"}`;
|
|
533
533
|
}
|
|
534
534
|
return fe(() => {
|
|
535
|
-
|
|
535
|
+
a.modelValue.length || o(f[0].code, !1);
|
|
536
536
|
}), we(
|
|
537
|
-
() =>
|
|
537
|
+
() => a.modelValue,
|
|
538
538
|
(c, y) => {
|
|
539
539
|
c != y && !c.length && o(f[0].code, !1);
|
|
540
540
|
}
|
|
541
541
|
), (c, y) => {
|
|
542
542
|
const d = h("FmSwitch");
|
|
543
|
-
return g(!0), B(X, null,
|
|
544
|
-
var
|
|
545
|
-
return g(), B("div", { key:
|
|
543
|
+
return g(!0), B(X, null, ie(e(u), (V, l) => {
|
|
544
|
+
var F;
|
|
545
|
+
return g(), B("div", { key: l }, [
|
|
546
546
|
i(d, {
|
|
547
|
-
"model-value": ((
|
|
547
|
+
"model-value": ((F = e(b)[l]) == null ? void 0 : F.inclusive) || !1,
|
|
548
548
|
"label-placement": "left",
|
|
549
|
-
"onUpdate:modelValue": (
|
|
549
|
+
"onUpdate:modelValue": (w) => V.input(w)
|
|
550
550
|
}, {
|
|
551
551
|
label: T(() => {
|
|
552
|
-
var
|
|
552
|
+
var w;
|
|
553
553
|
return [
|
|
554
|
-
_("div", null, L(t(V.label, ((
|
|
554
|
+
_("div", null, L(t(V.label, ((w = e(b)[l]) == null ? void 0 : w.inclusive) || !1)), 1)
|
|
555
555
|
];
|
|
556
556
|
}),
|
|
557
557
|
_: 2
|
|
@@ -561,44 +561,44 @@ const Tt = {
|
|
|
561
561
|
};
|
|
562
562
|
}
|
|
563
563
|
});
|
|
564
|
-
var
|
|
565
|
-
const
|
|
564
|
+
var Bt = { mode: "development", appMode: "mf" };
|
|
565
|
+
const Nt = { class: "space-y-8" }, Dt = {
|
|
566
566
|
key: 0,
|
|
567
567
|
class: "space-y-16"
|
|
568
|
-
},
|
|
568
|
+
}, At = /* @__PURE__ */ ee({
|
|
569
569
|
__name: "StripeSetting",
|
|
570
570
|
props: {
|
|
571
571
|
modelValue: {}
|
|
572
572
|
},
|
|
573
573
|
emits: ["update:modelValue"],
|
|
574
574
|
setup(v, { emit: x }) {
|
|
575
|
-
const
|
|
576
|
-
we(
|
|
577
|
-
m != o && (!
|
|
575
|
+
const a = v, f = x, s = U(!1);
|
|
576
|
+
we(s, (o, m) => {
|
|
577
|
+
m != o && (!a.modelValue && o ? f("update:modelValue", {
|
|
578
578
|
apiKey: "",
|
|
579
579
|
webhookSecret: ""
|
|
580
580
|
}) : o || f("update:modelValue", void 0));
|
|
581
581
|
});
|
|
582
582
|
const b = j(() => {
|
|
583
|
-
const o =
|
|
584
|
-
return `https://marketing${o ? "-dev" : ""}${u}.feedmeapi.com/stripe/${
|
|
583
|
+
const o = Bt.mode === "development", m = D.Config.getCountry().code.toLowerCase(), u = m != "my" ? `.${m}` : "";
|
|
584
|
+
return `https://marketing${o ? "-dev" : ""}${u}.feedmeapi.com/stripe/${Ge.getBusinessId()}/webhook`;
|
|
585
585
|
});
|
|
586
586
|
return fe(() => {
|
|
587
|
-
|
|
587
|
+
s.value = !!a.modelValue;
|
|
588
588
|
}), (o, m) => {
|
|
589
589
|
const u = h("FmSwitch"), t = h("FmTextField"), c = h("FmButton");
|
|
590
|
-
return g(), B("div",
|
|
590
|
+
return g(), B("div", Nt, [
|
|
591
591
|
i(u, {
|
|
592
|
-
modelValue: e(
|
|
593
|
-
"onUpdate:modelValue": m[0] || (m[0] = (y) => oe(
|
|
592
|
+
modelValue: e(s),
|
|
593
|
+
"onUpdate:modelValue": m[0] || (m[0] = (y) => oe(s) ? s.value = y : null),
|
|
594
594
|
value: "true",
|
|
595
595
|
label: "Enable Stripe"
|
|
596
596
|
}, null, 8, ["modelValue"]),
|
|
597
|
-
|
|
597
|
+
a.modelValue ? (g(), B("div", Dt, [
|
|
598
598
|
i(t, {
|
|
599
599
|
label: "API Key",
|
|
600
|
-
modelValue:
|
|
601
|
-
"onUpdate:modelValue": m[1] || (m[1] = (y) =>
|
|
600
|
+
modelValue: a.modelValue.apiKey,
|
|
601
|
+
"onUpdate:modelValue": m[1] || (m[1] = (y) => a.modelValue.apiKey = y),
|
|
602
602
|
"helper-text": "Go to Stripe Dashboard get your API Key and paste here."
|
|
603
603
|
}, null, 8, ["modelValue"]),
|
|
604
604
|
i(t, {
|
|
@@ -611,14 +611,14 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
611
611
|
i(c, {
|
|
612
612
|
icon: "content_copy",
|
|
613
613
|
variant: "tertiary",
|
|
614
|
-
onClick: m[2] || (m[2] = (y) => e(
|
|
614
|
+
onClick: m[2] || (m[2] = (y) => e(ot)(e(b)))
|
|
615
615
|
})
|
|
616
616
|
]),
|
|
617
617
|
_: 1
|
|
618
618
|
}, 8, ["model-value"]),
|
|
619
619
|
i(t, {
|
|
620
|
-
modelValue:
|
|
621
|
-
"onUpdate:modelValue": m[3] || (m[3] = (y) =>
|
|
620
|
+
modelValue: a.modelValue.webhookSecret,
|
|
621
|
+
"onUpdate:modelValue": m[3] || (m[3] = (y) => a.modelValue.webhookSecret = y),
|
|
622
622
|
label: "Webhook Secret",
|
|
623
623
|
"helper-text": `Copy the webhook signing secret from your Stripe account and paste
|
|
624
624
|
here.`
|
|
@@ -627,21 +627,21 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
627
627
|
]);
|
|
628
628
|
};
|
|
629
629
|
}
|
|
630
|
-
}),
|
|
630
|
+
}), Mt = {
|
|
631
631
|
key: 0,
|
|
632
632
|
class: "space-y-16 pr-12"
|
|
633
|
-
},
|
|
633
|
+
}, Ot = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Et = {
|
|
634
634
|
key: 1,
|
|
635
635
|
class: "space-y-16"
|
|
636
|
-
},
|
|
636
|
+
}, jt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Lt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Kt = { class: "grid grid-cols-2 gap-x-16 gap-y-16" }, Ht = { class: "space-y-4" }, qt = { class: "fm-typo-en-body-lg-400" }, Yt = { class: "space-y-16" }, Wt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, zt = { class: "flex items-center gap-8" }, Jt = /* @__PURE__ */ ee({
|
|
637
637
|
__name: "StoreSettingSheet",
|
|
638
638
|
emits: ["update"],
|
|
639
|
-
setup(v, { expose: x, emit:
|
|
640
|
-
const { t: f } = be(),
|
|
641
|
-
company:
|
|
639
|
+
setup(v, { expose: x, emit: a }) {
|
|
640
|
+
const { t: f } = be(), s = a, b = U(!1), o = U(), m = U(!1), u = Qe.extend({
|
|
641
|
+
company: et.extend({
|
|
642
642
|
name: Q.string().min(1, "Company name is required"),
|
|
643
643
|
regNo: Q.string().min(1, "Registration number is required"),
|
|
644
|
-
address:
|
|
644
|
+
address: tt.extend({
|
|
645
645
|
line1: Q.string().min(1, "Line 1 is required"),
|
|
646
646
|
line2: Q.string().optional(),
|
|
647
647
|
state: Q.string().min(1, "State is required"),
|
|
@@ -655,7 +655,7 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
655
655
|
}), t = j(() => u.safeParse(o.value).success);
|
|
656
656
|
function c() {
|
|
657
657
|
const V = u.safeParse(o.value);
|
|
658
|
-
V.success &&
|
|
658
|
+
V.success && s("update", V.data);
|
|
659
659
|
}
|
|
660
660
|
function y() {
|
|
661
661
|
return {
|
|
@@ -676,22 +676,22 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
676
676
|
inclusiveTaxes: []
|
|
677
677
|
};
|
|
678
678
|
}
|
|
679
|
-
function d(V,
|
|
680
|
-
b.value = V, V && (o.value =
|
|
679
|
+
function d(V, l) {
|
|
680
|
+
b.value = V, V && (o.value = l != null && l.company ? l : y());
|
|
681
681
|
}
|
|
682
682
|
return x({
|
|
683
683
|
showSheet: d,
|
|
684
684
|
data: o
|
|
685
|
-
}), (V,
|
|
686
|
-
const
|
|
687
|
-
return g(), I(
|
|
685
|
+
}), (V, l) => {
|
|
686
|
+
const F = h("FmIcon"), w = h("FmMenuItem"), A = h("FmMenu"), Y = h("FmSelect"), W = h("FmButton"), H = h("FmSideSheet");
|
|
687
|
+
return g(), I(H, {
|
|
688
688
|
"max-width": 560,
|
|
689
689
|
modelValue: e(b),
|
|
690
|
-
"onUpdate:modelValue":
|
|
690
|
+
"onUpdate:modelValue": l[15] || (l[15] = (z) => oe(b) ? b.value = z : null),
|
|
691
691
|
header: e(f)("connect.store.setting.title")
|
|
692
692
|
}, {
|
|
693
693
|
"side-sheet-footer": T(() => [
|
|
694
|
-
_("div",
|
|
694
|
+
_("div", zt, [
|
|
695
695
|
i(W, {
|
|
696
696
|
label: e(f)("connect.common.save"),
|
|
697
697
|
onClick: c,
|
|
@@ -700,7 +700,7 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
700
700
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
701
701
|
i(W, {
|
|
702
702
|
label: e(f)("connect.common.cancel"),
|
|
703
|
-
onClick:
|
|
703
|
+
onClick: l[14] || (l[14] = (z) => d(!1)),
|
|
704
704
|
variant: "tertiary"
|
|
705
705
|
}, null, 8, ["label"])
|
|
706
706
|
])
|
|
@@ -709,17 +709,17 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
709
709
|
var z, ae;
|
|
710
710
|
return [
|
|
711
711
|
i(Pe, { json: e(o) }, null, 8, ["json"]),
|
|
712
|
-
e(o) && e(o).company ? (g(), B("div",
|
|
713
|
-
_("div",
|
|
712
|
+
e(o) && e(o).company ? (g(), B("div", Mt, [
|
|
713
|
+
_("div", Ot, L(e(f)("connect.store.setting.company.legal_info")), 1),
|
|
714
714
|
i(te, {
|
|
715
715
|
modelValue: e(o).company.name,
|
|
716
|
-
"onUpdate:modelValue":
|
|
716
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => e(o).company.name = r),
|
|
717
717
|
label: e(f)("connect.store.setting.company.name"),
|
|
718
718
|
schema: e(Z).typeAtPath(e(u), "company.name")
|
|
719
719
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
720
720
|
i(te, {
|
|
721
721
|
modelValue: e(o).company.regNo,
|
|
722
|
-
"onUpdate:modelValue":
|
|
722
|
+
"onUpdate:modelValue": l[1] || (l[1] = (r) => e(o).company.regNo = r),
|
|
723
723
|
label: e(f)("connect.store.setting.company.reg_no"),
|
|
724
724
|
schema: e(Z).typeAtPath(e(u), "company.regNo")
|
|
725
725
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
@@ -727,53 +727,53 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
727
727
|
key: 0,
|
|
728
728
|
modelValue: e(o).company.sstRegNo,
|
|
729
729
|
"onUpdate:modelValue": [
|
|
730
|
-
|
|
731
|
-
|
|
730
|
+
l[2] || (l[2] = (r) => e(o).company.sstRegNo = r),
|
|
731
|
+
l[3] || (l[3] = (r) => r ? null : e(o).inclusiveTaxes = [])
|
|
732
732
|
],
|
|
733
733
|
label: e(f)("connect.store.setting.company.tax_reg_no"),
|
|
734
734
|
schema: e(Z).typeAtPath(e(u), "company.sstRegNo")
|
|
735
735
|
}, null, 8, ["modelValue", "label", "schema"])) : M("", !0),
|
|
736
|
-
(z = e(o).company) != null && z.sstRegNo && e(o).inclusiveTaxes ? (g(), B("div",
|
|
737
|
-
_("div",
|
|
738
|
-
i(
|
|
736
|
+
(z = e(o).company) != null && z.sstRegNo && e(o).inclusiveTaxes ? (g(), B("div", Et, [
|
|
737
|
+
_("div", jt, L(e(f)("connect.store.setting.company.tax")), 1),
|
|
738
|
+
i(It, {
|
|
739
739
|
modelValue: e(o).inclusiveTaxes,
|
|
740
|
-
"onUpdate:modelValue":
|
|
740
|
+
"onUpdate:modelValue": l[4] || (l[4] = (r) => e(o).inclusiveTaxes = r)
|
|
741
741
|
}, null, 8, ["modelValue"])
|
|
742
742
|
])) : M("", !0),
|
|
743
743
|
i(te, {
|
|
744
744
|
modelValue: e(o).company.phoneNo,
|
|
745
|
-
"onUpdate:modelValue":
|
|
745
|
+
"onUpdate:modelValue": l[5] || (l[5] = (r) => e(o).company.phoneNo = r),
|
|
746
746
|
label: e(f)("connect.store.setting.company.phone"),
|
|
747
747
|
schema: e(Z).typeAtPath(e(u), "company.phoneNo")
|
|
748
748
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
749
|
-
_("div",
|
|
749
|
+
_("div", Lt, L(e(f)("connect.store.setting.company.address.title")), 1),
|
|
750
750
|
i(te, {
|
|
751
751
|
modelValue: e(o).company.address.line1,
|
|
752
|
-
"onUpdate:modelValue":
|
|
752
|
+
"onUpdate:modelValue": l[6] || (l[6] = (r) => e(o).company.address.line1 = r),
|
|
753
753
|
label: e(f)("connect.store.setting.company.address.line1"),
|
|
754
754
|
schema: e(Z).typeAtPath(e(u), "company.address.line1")
|
|
755
755
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
756
756
|
i(te, {
|
|
757
757
|
modelValue: e(o).company.address.line2,
|
|
758
|
-
"onUpdate:modelValue":
|
|
758
|
+
"onUpdate:modelValue": l[7] || (l[7] = (r) => e(o).company.address.line2 = r),
|
|
759
759
|
label: e(f)("connect.store.setting.company.address.line2"),
|
|
760
760
|
schema: e(Z).typeAtPath(e(u), "company.address.line2")
|
|
761
761
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
762
|
-
_("div",
|
|
762
|
+
_("div", Kt, [
|
|
763
763
|
i(te, {
|
|
764
764
|
modelValue: e(o).company.address.city,
|
|
765
|
-
"onUpdate:modelValue":
|
|
765
|
+
"onUpdate:modelValue": l[8] || (l[8] = (r) => e(o).company.address.city = r),
|
|
766
766
|
label: e(f)("connect.store.setting.company.address.city"),
|
|
767
767
|
schema: e(Z).typeAtPath(e(u), "company.address.city")
|
|
768
768
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
769
769
|
i(te, {
|
|
770
770
|
modelValue: e(o).company.address.postcode,
|
|
771
|
-
"onUpdate:modelValue":
|
|
771
|
+
"onUpdate:modelValue": l[9] || (l[9] = (r) => e(o).company.address.postcode = r),
|
|
772
772
|
label: e(f)("connect.store.setting.company.address.postcode"),
|
|
773
773
|
schema: e(Z).typeAtPath(e(u), "company.address.postcode")
|
|
774
774
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
775
|
-
_("div",
|
|
776
|
-
_("div",
|
|
775
|
+
_("div", Ht, [
|
|
776
|
+
_("div", qt, L(e(f)("connect.store.setting.company.address.state")), 1),
|
|
777
777
|
i(A, {
|
|
778
778
|
placement: "top-end",
|
|
779
779
|
"model-value": e(m)
|
|
@@ -781,12 +781,12 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
781
781
|
"menu-button": T(() => [
|
|
782
782
|
i(te, {
|
|
783
783
|
modelValue: e(o).company.address.state,
|
|
784
|
-
"onUpdate:modelValue":
|
|
784
|
+
"onUpdate:modelValue": l[10] || (l[10] = (r) => e(o).company.address.state = r),
|
|
785
785
|
schema: e(Z).typeAtPath(e(u), "company.address.state"),
|
|
786
|
-
onFocusChanged:
|
|
786
|
+
onFocusChanged: l[11] || (l[11] = (r) => m.value = r)
|
|
787
787
|
}, {
|
|
788
788
|
append: T(() => [
|
|
789
|
-
i(
|
|
789
|
+
i(F, {
|
|
790
790
|
name: e(m) ? "keyboard_arrow_up" : "keyboard_arrow_down"
|
|
791
791
|
}, null, 8, ["name"])
|
|
792
792
|
]),
|
|
@@ -794,17 +794,17 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
794
794
|
}, 8, ["modelValue", "schema"])
|
|
795
795
|
]),
|
|
796
796
|
default: T(() => [
|
|
797
|
-
(g(!0), B(X, null,
|
|
798
|
-
(
|
|
799
|
-
var
|
|
800
|
-
return
|
|
797
|
+
(g(!0), B(X, null, ie(e(Rt)[e(D.Config).getCountry().code].stateItems.filter(
|
|
798
|
+
(r) => {
|
|
799
|
+
var k, R;
|
|
800
|
+
return r.label.toLowerCase().includes(((R = (k = e(o)) == null ? void 0 : k.company) == null ? void 0 : R.address.state.toLowerCase()) ?? "");
|
|
801
801
|
}
|
|
802
|
-
) || [], (
|
|
803
|
-
key:
|
|
804
|
-
"model-value": e(o).company.address.state ===
|
|
805
|
-
label:
|
|
802
|
+
) || [], (r) => (g(), I(w, {
|
|
803
|
+
key: r.value,
|
|
804
|
+
"model-value": e(o).company.address.state === r.value,
|
|
805
|
+
label: r.label,
|
|
806
806
|
onClick: () => {
|
|
807
|
-
e(o).company.address.state =
|
|
807
|
+
e(o).company.address.state = r.value, m.value = !1;
|
|
808
808
|
}
|
|
809
809
|
}, null, 8, ["model-value", "label", "onClick"]))), 128))
|
|
810
810
|
]),
|
|
@@ -814,7 +814,7 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
814
814
|
i(Y, {
|
|
815
815
|
label: e(f)("connect.store.setting.company.address.country"),
|
|
816
816
|
modelValue: e(o).company.address.country,
|
|
817
|
-
"onUpdate:modelValue":
|
|
817
|
+
"onUpdate:modelValue": l[12] || (l[12] = (r) => e(o).company.address.country = r),
|
|
818
818
|
items: [
|
|
819
819
|
{
|
|
820
820
|
label: e(D.Config).getCountry().name,
|
|
@@ -824,11 +824,11 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
824
824
|
rules: [e(Z).ruleAtPath(e(u), "company.address.country")]
|
|
825
825
|
}, null, 8, ["label", "modelValue", "items", "rules"])
|
|
826
826
|
]),
|
|
827
|
-
_("div",
|
|
828
|
-
_("div",
|
|
829
|
-
i(
|
|
827
|
+
_("div", Yt, [
|
|
828
|
+
_("div", Wt, L(e(f)("connect.store.setting.stripe.title")), 1),
|
|
829
|
+
i(At, {
|
|
830
830
|
"model-value": (ae = e(o)) == null ? void 0 : ae.stripe,
|
|
831
|
-
"onUpdate:modelValue":
|
|
831
|
+
"onUpdate:modelValue": l[13] || (l[13] = (r) => e(o).stripe = r)
|
|
832
832
|
}, null, 8, ["model-value"])
|
|
833
833
|
])
|
|
834
834
|
])) : M("", !0)
|
|
@@ -839,10 +839,10 @@ const It = { class: "space-y-8" }, Bt = {
|
|
|
839
839
|
};
|
|
840
840
|
}
|
|
841
841
|
});
|
|
842
|
-
function
|
|
842
|
+
function Gt(v, x = !0) {
|
|
843
843
|
return D.DineroFactory(v).toFormat(x);
|
|
844
844
|
}
|
|
845
|
-
const
|
|
845
|
+
const Xt = /* @__PURE__ */ ee({
|
|
846
846
|
__name: "TaxVariantSetting",
|
|
847
847
|
props: {
|
|
848
848
|
modelValue: {
|
|
@@ -853,70 +853,70 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
853
853
|
},
|
|
854
854
|
emits: ["update:modelValue"],
|
|
855
855
|
setup(v, { emit: x }) {
|
|
856
|
-
const
|
|
856
|
+
const a = v, f = x;
|
|
857
857
|
fe(() => {
|
|
858
858
|
if (o.value.length !== b.value.length) {
|
|
859
859
|
const t = b.value.reduce((c, y) => {
|
|
860
860
|
const d = ne.systemDefaultCode(y.name);
|
|
861
861
|
if (!d) return c;
|
|
862
|
-
const { systemCode: V, taxCode:
|
|
863
|
-
return y.value || c.push({ systemCode: V, taxCode:
|
|
862
|
+
const { systemCode: V, taxCode: l } = d;
|
|
863
|
+
return y.value || c.push({ systemCode: V, taxCode: l }), c;
|
|
864
864
|
}, []);
|
|
865
865
|
u(t);
|
|
866
866
|
}
|
|
867
867
|
});
|
|
868
|
-
function
|
|
868
|
+
function s() {
|
|
869
869
|
return ne.groupedTaxOptions();
|
|
870
870
|
}
|
|
871
|
-
const b = j(() =>
|
|
871
|
+
const b = j(() => s().map((t) => ({
|
|
872
872
|
name: t.code,
|
|
873
873
|
value: (o.value || []).find(
|
|
874
874
|
(c) => t.options.some((y) => y.feedmeTaxCode === c)
|
|
875
875
|
),
|
|
876
876
|
options: t.options.map((c) => ({
|
|
877
|
-
label: `${c.name} (${
|
|
877
|
+
label: `${c.name} (${ut(c.rate)}%)`,
|
|
878
878
|
value: c.feedmeTaxCode
|
|
879
879
|
}))
|
|
880
|
-
}))), o = j(() =>
|
|
880
|
+
}))), o = j(() => a.modelValue.map((t) => ne.generateCode(t)));
|
|
881
881
|
function m(t) {
|
|
882
|
-
const c =
|
|
883
|
-
(
|
|
884
|
-
), y = c == null ? void 0 : c.options.find((
|
|
882
|
+
const c = s().find(
|
|
883
|
+
(l) => l.options.some((F) => F.feedmeTaxCode === t)
|
|
884
|
+
), y = c == null ? void 0 : c.options.find((l) => l.feedmeTaxCode === t);
|
|
885
885
|
if (!y) return;
|
|
886
886
|
const { systemCode: d, taxCode: V } = y;
|
|
887
887
|
u([{ systemCode: d, taxCode: V }]);
|
|
888
888
|
}
|
|
889
889
|
function u(t) {
|
|
890
|
-
const c =
|
|
890
|
+
const c = re.clone(a.modelValue);
|
|
891
891
|
t.forEach((y) => {
|
|
892
|
-
const d =
|
|
893
|
-
(
|
|
894
|
-
), V = (d == null ? void 0 : d.options) || [],
|
|
895
|
-
(
|
|
892
|
+
const d = s().find(
|
|
893
|
+
(F) => F.options.some((w) => w.feedmeTaxCode === ne.generateCode(y))
|
|
894
|
+
), V = (d == null ? void 0 : d.options) || [], l = c.findIndex(
|
|
895
|
+
(F) => V.some((w) => ne.generateCode(w) === ne.generateCode(F))
|
|
896
896
|
);
|
|
897
|
-
|
|
897
|
+
l >= 0 ? c.splice(l, 1, y) : c.push(y);
|
|
898
898
|
}), f("update:modelValue", c);
|
|
899
899
|
}
|
|
900
900
|
return (t, c) => {
|
|
901
901
|
const y = h("FmRadio"), d = h("FmRadioGroup");
|
|
902
|
-
return g(!0), B(X, null,
|
|
902
|
+
return g(!0), B(X, null, ie(e(b), (V) => (g(), B("div", {
|
|
903
903
|
key: V.name,
|
|
904
904
|
class: "flex items-start"
|
|
905
905
|
}, [
|
|
906
906
|
i(d, {
|
|
907
907
|
modelValue: V.value,
|
|
908
908
|
"onUpdate:modelValue": [
|
|
909
|
-
(
|
|
910
|
-
c[0] || (c[0] = (
|
|
911
|
-
m(
|
|
909
|
+
(l) => V.value = l,
|
|
910
|
+
c[0] || (c[0] = (l) => {
|
|
911
|
+
m(l);
|
|
912
912
|
})
|
|
913
913
|
]
|
|
914
914
|
}, {
|
|
915
915
|
default: T(() => [
|
|
916
|
-
(g(!0), B(X, null,
|
|
917
|
-
key:
|
|
918
|
-
value:
|
|
919
|
-
label:
|
|
916
|
+
(g(!0), B(X, null, ie(V.options, (l, F) => (g(), I(y, {
|
|
917
|
+
key: F,
|
|
918
|
+
value: l.value,
|
|
919
|
+
label: l.label
|
|
920
920
|
}, null, 8, ["value", "label"]))), 128))
|
|
921
921
|
]),
|
|
922
922
|
_: 2
|
|
@@ -946,19 +946,19 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
946
946
|
taxes: [],
|
|
947
947
|
taxTotals: [],
|
|
948
948
|
internal: !1,
|
|
949
|
-
priceWithTaxes:
|
|
950
|
-
},
|
|
949
|
+
priceWithTaxes: it()
|
|
950
|
+
}, Zt = {
|
|
951
951
|
key: 0,
|
|
952
952
|
class: "space-y-24 pr-12"
|
|
953
|
-
},
|
|
953
|
+
}, Qt = { class: "space-y-8" }, en = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, tn = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, nn = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, on = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, an = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary !mb-[-16px]" }, ln = { class: "space-y-8" }, sn = { class: "flex items-center justify-between" }, rn = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, dn = { class: "space-y-8" }, un = { class: "flex items-center gap-8" }, cn = /* @__PURE__ */ ee({
|
|
954
954
|
__name: "EditBundleSheet",
|
|
955
955
|
emits: ["update"],
|
|
956
|
-
setup(v, { expose: x, emit:
|
|
957
|
-
const f =
|
|
956
|
+
setup(v, { expose: x, emit: a }) {
|
|
957
|
+
const f = a, { t: s } = be(), b = ke(), o = U(!1), m = U([]), u = U({
|
|
958
958
|
category: 0,
|
|
959
959
|
index: -1,
|
|
960
960
|
originalCategoryIndex: void 0
|
|
961
|
-
}), t =
|
|
961
|
+
}), t = U(re.cloneDeep(Ve)), c = U(), y = Oe, d = j(() => {
|
|
962
962
|
const p = y.safeParse(t.value);
|
|
963
963
|
return p.success ? [] : p.error.errors;
|
|
964
964
|
}), V = [
|
|
@@ -981,7 +981,7 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
981
981
|
cell(p) {
|
|
982
982
|
var C;
|
|
983
983
|
const n = p.row.original;
|
|
984
|
-
return n.collectible.type == "VOUCHER" || n.selectedReward == null ? n.description :
|
|
984
|
+
return n.collectible.type == "VOUCHER" || n.selectedReward == null ? n.description : We(Je.FmStepperField, {
|
|
985
985
|
"onUpdate:modelValue": ($) => {
|
|
986
986
|
t.value.titles = t.value.titles.map(
|
|
987
987
|
(E) => E.id == n.collectible._id ? { ...E, dayToExpire: $ } : E
|
|
@@ -998,8 +998,8 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
998
998
|
});
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
1001
|
-
],
|
|
1002
|
-
const n =
|
|
1001
|
+
], l = U([]), F = j(() => b.bundleRewards.map((p) => {
|
|
1002
|
+
const n = w.value.find(($) => $.id == p._id), C = p.type === "VOUCHER" ? `${p.options.maxUse} use(s), ${ct(
|
|
1003
1003
|
p.options.validityOption || {}
|
|
1004
1004
|
)}` : "No expiry";
|
|
1005
1005
|
return {
|
|
@@ -1007,7 +1007,7 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1007
1007
|
description: C,
|
|
1008
1008
|
selectedReward: n
|
|
1009
1009
|
};
|
|
1010
|
-
})),
|
|
1010
|
+
})), w = j(() => {
|
|
1011
1011
|
var p, n;
|
|
1012
1012
|
return [
|
|
1013
1013
|
...((p = t.value) == null ? void 0 : p.titles.map((C) => ({
|
|
@@ -1029,62 +1029,62 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1029
1029
|
t.value.credit.free && (t.value.credit.free.day = p);
|
|
1030
1030
|
}
|
|
1031
1031
|
function W() {
|
|
1032
|
-
const p =
|
|
1032
|
+
const p = F.value, n = t.value;
|
|
1033
1033
|
if (!(!n || !p))
|
|
1034
1034
|
for (let C = 0; C < p.length; C++) {
|
|
1035
1035
|
const $ = p[C];
|
|
1036
|
-
|
|
1037
|
-
(
|
|
1036
|
+
H.value[C] ? $.collectible.type == "TITLE" ? n.titles.findIndex(
|
|
1037
|
+
(K) => K.id == $.collectible._id
|
|
1038
1038
|
) < 0 && n.titles.push({
|
|
1039
1039
|
id: $.collectible._id,
|
|
1040
1040
|
dayToExpire: A.value
|
|
1041
1041
|
}) : n.vouchers.findIndex(
|
|
1042
|
-
(
|
|
1042
|
+
(K) => K == $.collectible._id
|
|
1043
1043
|
) < 0 && n.vouchers.push($.collectible._id) : (n.titles = n.titles.filter((q) => q.id != $.collectible._id), n.vouchers = n.vouchers.filter(
|
|
1044
1044
|
(q) => q != $.collectible._id
|
|
1045
1045
|
));
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
|
-
const
|
|
1049
|
-
we(
|
|
1048
|
+
const H = U({});
|
|
1049
|
+
we(H, W, { deep: !0 });
|
|
1050
1050
|
const z = j(() => {
|
|
1051
1051
|
var p, n;
|
|
1052
1052
|
return (n = (p = b.storeOption) == null ? void 0 : p.company) == null ? void 0 : n.sstRegNo;
|
|
1053
1053
|
}), ae = j(() => {
|
|
1054
1054
|
var p, n, C;
|
|
1055
1055
|
return (C = (n = (p = b.storeOption) == null ? void 0 : p.inclusiveTaxes) == null ? void 0 : n[0]) != null && C.inclusive ? "Inclusive" : "Exclusive";
|
|
1056
|
-
}),
|
|
1056
|
+
}), r = j(() => {
|
|
1057
1057
|
var p, n, C;
|
|
1058
|
-
return
|
|
1058
|
+
return yt(
|
|
1059
1059
|
ne.fullTax,
|
|
1060
|
-
|
|
1060
|
+
Ye(t.value.taxes),
|
|
1061
1061
|
t.value.price,
|
|
1062
1062
|
Number(t.value.credit.normal),
|
|
1063
1063
|
((p = b.storeOption) == null ? void 0 : p.inclusiveTaxes) ?? [],
|
|
1064
1064
|
(C = (n = b.storeOption) == null ? void 0 : n.company) != null && C.sstRegNo ? ne.taxSystem.map(($) => $.code) : []
|
|
1065
1065
|
);
|
|
1066
|
-
}),
|
|
1066
|
+
}), k = j(() => r.value.reduce(
|
|
1067
1067
|
(n, C) => n.add(C.total),
|
|
1068
|
-
|
|
1069
|
-
).toFormat()),
|
|
1068
|
+
dt()
|
|
1069
|
+
).toFormat()), R = j(() => {
|
|
1070
1070
|
var $;
|
|
1071
|
-
const p =
|
|
1072
|
-
|
|
1071
|
+
const p = ft(
|
|
1072
|
+
r.value,
|
|
1073
1073
|
t.value.price,
|
|
1074
1074
|
(($ = b.storeOption) == null ? void 0 : $.inclusiveTaxes) ?? []
|
|
1075
1075
|
);
|
|
1076
1076
|
t.value.priceWithTaxes = p;
|
|
1077
|
-
const n =
|
|
1077
|
+
const n = Gt(p, !1), C = Number(n.replace(/[^\d.-]/g, ""));
|
|
1078
1078
|
return Number.isNaN(C) ? 0 : C;
|
|
1079
1079
|
});
|
|
1080
1080
|
function O() {
|
|
1081
|
-
t.value.taxTotals =
|
|
1081
|
+
t.value.taxTotals = r.value, f("update", Oe.parse(Xe(t.value)));
|
|
1082
1082
|
}
|
|
1083
1083
|
function P() {
|
|
1084
|
-
return
|
|
1084
|
+
return re.cloneDeep(Ve);
|
|
1085
1085
|
}
|
|
1086
1086
|
function N(p, n) {
|
|
1087
|
-
o.value = p, p && n && (c.value = void 0, m.value = n.categories, t.value = n.bundle || P(), u.value.category = n.category, u.value.index = n.index, u.value.originalCategoryIndex = n.category,
|
|
1087
|
+
o.value = p, p && n && (c.value = void 0, m.value = n.categories, t.value = n.bundle || P(), u.value.category = n.category, u.value.index = n.index, u.value.originalCategoryIndex = n.category, H.value = F.value.reduce((C, $, E) => (C[E] = !!$.selectedReward, C), {}));
|
|
1088
1088
|
}
|
|
1089
1089
|
return x({
|
|
1090
1090
|
showSheet: N,
|
|
@@ -1092,15 +1092,15 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1092
1092
|
target: u,
|
|
1093
1093
|
data: t
|
|
1094
1094
|
}), (p, n) => {
|
|
1095
|
-
const C = h("FmSwitch"), $ = h("FmHelperText"), E = h("FmTextField"), q = h("FmSelect"),
|
|
1095
|
+
const C = h("FmSwitch"), $ = h("FmHelperText"), E = h("FmTextField"), q = h("FmSelect"), K = h("FmStepperField"), de = h("FmMenuItem"), ge = h("FmTable"), ce = h("FmButton"), ve = h("FmSideSheet");
|
|
1096
1096
|
return g(), I(ve, {
|
|
1097
1097
|
"max-width": 768,
|
|
1098
1098
|
modelValue: e(o),
|
|
1099
|
-
"onUpdate:modelValue": n[
|
|
1100
|
-
header: e(u).index != -1 ? e(
|
|
1099
|
+
"onUpdate:modelValue": n[21] || (n[21] = (le) => oe(o) ? o.value = le : null),
|
|
1100
|
+
header: e(u).index != -1 ? e(s)("connect.store.bundle.edit.title") : e(s)("connect.store.bundle.edit.create")
|
|
1101
1101
|
}, {
|
|
1102
1102
|
"side-sheet-footer": T(() => [
|
|
1103
|
-
_("div",
|
|
1103
|
+
_("div", un, [
|
|
1104
1104
|
i(ce, {
|
|
1105
1105
|
label: e(u).index != -1 ? "Save" : "Add",
|
|
1106
1106
|
onClick: O,
|
|
@@ -1109,21 +1109,21 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1109
1109
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
1110
1110
|
i(ce, {
|
|
1111
1111
|
label: "Cancel",
|
|
1112
|
-
onClick: n[
|
|
1112
|
+
onClick: n[20] || (n[20] = (le) => N(!1)),
|
|
1113
1113
|
variant: "tertiary"
|
|
1114
1114
|
})
|
|
1115
1115
|
])
|
|
1116
1116
|
]),
|
|
1117
1117
|
default: T(() => {
|
|
1118
|
-
var le, $e, Te, Ue, Re, Ie, Be, Ne;
|
|
1118
|
+
var le, $e, Te, Ue, Re, Ie, Be, Ne, De, Ae;
|
|
1119
1119
|
return [
|
|
1120
1120
|
i(Pe, { json: e(t) }, null, 8, ["json"]),
|
|
1121
|
-
e(t) ? (g(), B("div",
|
|
1122
|
-
_("div",
|
|
1121
|
+
e(t) ? (g(), B("div", Zt, [
|
|
1122
|
+
_("div", Qt, [
|
|
1123
1123
|
e(D.Config).getCountry().code == "MY" && ((le = e(b).payoutAccount) == null ? void 0 : le.status) == "APPROVED" && (($e = e(b).payoutAccount) != null && $e.enable) ? (g(), I(C, {
|
|
1124
1124
|
key: 0,
|
|
1125
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
1126
|
-
e(t).isFeedvibe =
|
|
1125
|
+
"onUpdate:modelValue": n[0] || (n[0] = (S) => {
|
|
1126
|
+
e(t).isFeedvibe = S, e(t).isFeedvibe && (e(t).credit.normal = 0, e(t).coinPrice = 0, e(t).titles = [], H.value = {});
|
|
1127
1127
|
}),
|
|
1128
1128
|
"label-placement": "right",
|
|
1129
1129
|
"model-value": e(t).isFeedvibe || !1,
|
|
@@ -1136,39 +1136,39 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1136
1136
|
state: "warning"
|
|
1137
1137
|
})) : M("", !0)
|
|
1138
1138
|
]),
|
|
1139
|
-
_("div",
|
|
1139
|
+
_("div", en, L(e(s)("connect.store.bundle.edit.basicInformation")), 1),
|
|
1140
1140
|
i(E, {
|
|
1141
|
-
label: e(
|
|
1141
|
+
label: e(s)("connect.store.bundle.edit.bundleName"),
|
|
1142
1142
|
modelValue: e(t).name,
|
|
1143
|
-
"onUpdate:modelValue": n[1] || (n[1] = (
|
|
1143
|
+
"onUpdate:modelValue": n[1] || (n[1] = (S) => e(t).name = S),
|
|
1144
1144
|
"helper-state": e(J)(e(d), "name"),
|
|
1145
1145
|
"helper-text": e(G)(e(d), "name")
|
|
1146
1146
|
}, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
|
|
1147
1147
|
i(q, {
|
|
1148
1148
|
modelValue: e(u).category,
|
|
1149
|
-
"onUpdate:modelValue": n[2] || (n[2] = (
|
|
1149
|
+
"onUpdate:modelValue": n[2] || (n[2] = (S) => e(u).category = S),
|
|
1150
1150
|
label: "Store Category",
|
|
1151
|
-
items: e(m).map((
|
|
1151
|
+
items: e(m).map((S, He) => ({ label: S, value: He }))
|
|
1152
1152
|
}, null, 8, ["modelValue", "items"]),
|
|
1153
|
-
i(
|
|
1154
|
-
label: e(
|
|
1153
|
+
i(st, {
|
|
1154
|
+
label: e(s)("connect.store.bundle.edit.bundleImage"),
|
|
1155
1155
|
class: "w-1/2 xs:w-2/3",
|
|
1156
1156
|
"aspect-ratio": "16/9",
|
|
1157
1157
|
thumbnail: e(t).image ?? void 0,
|
|
1158
1158
|
file: e(c) ?? void 0,
|
|
1159
|
-
"onUpdate:file": n[3] || (n[3] = (
|
|
1160
|
-
c.value =
|
|
1159
|
+
"onUpdate:file": n[3] || (n[3] = (S) => {
|
|
1160
|
+
c.value = S;
|
|
1161
1161
|
}),
|
|
1162
1162
|
"helper-state": e(J)(e(d), "image"),
|
|
1163
1163
|
"helper-text": e(G)(e(d), "image")
|
|
1164
1164
|
}, null, 8, ["label", "thumbnail", "file", "helper-state", "helper-text"]),
|
|
1165
|
-
i(
|
|
1165
|
+
i(K, {
|
|
1166
1166
|
"model-value": e(D.Dinero).fromFdoDinero(e(t).price).toUnit(),
|
|
1167
|
-
label: e(
|
|
1167
|
+
label: e(s)("connect.store.bundle.edit.bundlePrice"),
|
|
1168
1168
|
min: 0,
|
|
1169
1169
|
"max-fraction-digits": 2,
|
|
1170
|
-
"onUpdate:modelValue": n[4] || (n[4] = (
|
|
1171
|
-
e(t).price.amount =
|
|
1170
|
+
"onUpdate:modelValue": n[4] || (n[4] = (S) => {
|
|
1171
|
+
e(t).price.amount = S * 10 ** e(t).price.precision;
|
|
1172
1172
|
}),
|
|
1173
1173
|
"is-currency": !0,
|
|
1174
1174
|
"show-steppers": !1,
|
|
@@ -1178,152 +1178,152 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1178
1178
|
"helper-state": e(J)(e(d), "price")
|
|
1179
1179
|
}, {
|
|
1180
1180
|
prepend: T(() => [
|
|
1181
|
-
|
|
1181
|
+
ue(L(e(D.Dinero).defaultCurrency()), 1)
|
|
1182
1182
|
]),
|
|
1183
1183
|
_: 1
|
|
1184
1184
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
1185
|
-
i(
|
|
1185
|
+
i(K, {
|
|
1186
1186
|
"model-value": e(D.Dinero).fromFdoDinero(e(t).originalPrice).toUnit(),
|
|
1187
|
-
label: e(
|
|
1187
|
+
label: e(s)("connect.store.bundle.edit.bundleValue"),
|
|
1188
1188
|
min: 0,
|
|
1189
1189
|
"max-fraction-digits": 2,
|
|
1190
|
-
"onUpdate:modelValue": n[5] || (n[5] = (
|
|
1191
|
-
e(t).originalPrice || (e(t).originalPrice = e(D.Dinero).zero().toObject()), e(t).originalPrice.amount =
|
|
1190
|
+
"onUpdate:modelValue": n[5] || (n[5] = (S) => {
|
|
1191
|
+
e(t).originalPrice || (e(t).originalPrice = e(D.Dinero).zero().toObject()), e(t).originalPrice.amount = S * 10 ** e(t).originalPrice.precision;
|
|
1192
1192
|
}),
|
|
1193
1193
|
"is-currency": !0,
|
|
1194
1194
|
"show-steppers": !1,
|
|
1195
|
-
"helper-text": e(G)(e(d), "originalPrice") || e(
|
|
1195
|
+
"helper-text": e(G)(e(d), "originalPrice") || e(s)("connect.store.bundle.edit.originalPriceHelper"),
|
|
1196
1196
|
"helper-state": e(J)(e(d), "originalPrice")
|
|
1197
1197
|
}, {
|
|
1198
1198
|
prepend: T(() => [
|
|
1199
|
-
|
|
1199
|
+
ue(L(e(D.Dinero).defaultCurrency()), 1)
|
|
1200
1200
|
]),
|
|
1201
1201
|
_: 1
|
|
1202
1202
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
1203
|
-
e(t).isFeedvibe ? M("", !0) : (g(), I(
|
|
1203
|
+
e(t).isFeedvibe ? M("", !0) : (g(), I(K, {
|
|
1204
1204
|
key: 0,
|
|
1205
1205
|
"model-value": e(t).coinPrice ?? null,
|
|
1206
|
-
label: e(
|
|
1206
|
+
label: e(s)("connect.store.bundle.edit.pointNeeded"),
|
|
1207
1207
|
min: 0,
|
|
1208
|
-
"onUpdate:modelValue": n[6] || (n[6] = (
|
|
1209
|
-
|
|
1208
|
+
"onUpdate:modelValue": n[6] || (n[6] = (S) => {
|
|
1209
|
+
S > 0 && e(t).credit.normal > 0 && (e(t).credit.normal = 0), e(t).coinPrice = S;
|
|
1210
1210
|
}),
|
|
1211
1211
|
"show-steppers": !1,
|
|
1212
1212
|
"helper-state": e(J)(e(d), "coinPrice"),
|
|
1213
1213
|
"helper-text": e(G)(e(d), "coinPrice")
|
|
1214
1214
|
}, {
|
|
1215
|
-
append: T(() => n[
|
|
1216
|
-
|
|
1215
|
+
append: T(() => n[22] || (n[22] = [
|
|
1216
|
+
ue(" point(s) ")
|
|
1217
1217
|
])),
|
|
1218
1218
|
_: 1
|
|
1219
1219
|
}, 8, ["model-value", "label", "helper-state", "helper-text"])),
|
|
1220
1220
|
(Te = e(b).storeOption) != null && Te.stripe && !e(t).isFeedvibe ? (g(), B(X, { key: 1 }, [
|
|
1221
|
-
_("div",
|
|
1221
|
+
_("div", tn, L(e(s)("connect.store.bundle.edit.subscriptionSettings")), 1),
|
|
1222
1222
|
i(E, {
|
|
1223
|
-
label: e(
|
|
1223
|
+
label: e(s)("connect.store.bundle.edit.stripePriceId"),
|
|
1224
1224
|
modelValue: e(t).stripePriceId,
|
|
1225
|
-
"onUpdate:modelValue": n[7] || (n[7] = (
|
|
1225
|
+
"onUpdate:modelValue": n[7] || (n[7] = (S) => e(t).stripePriceId = S),
|
|
1226
1226
|
"helper-state": e(J)(e(d), "stripePriceId"),
|
|
1227
1227
|
"helper-text": e(G)(e(d), "stripePriceId")
|
|
1228
1228
|
}, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
|
|
1229
|
-
e(t).stripePriceId ? (g(), I(
|
|
1229
|
+
e(t).stripePriceId ? (g(), I(K, {
|
|
1230
1230
|
key: 0,
|
|
1231
1231
|
"model-value": e(t).subscriptionValidity ?? null,
|
|
1232
1232
|
min: 1,
|
|
1233
1233
|
"onUpdate:modelValue": Y,
|
|
1234
|
-
label: e(
|
|
1234
|
+
label: e(s)("connect.store.bundle.edit.subscriptionValidity"),
|
|
1235
1235
|
"show-steppers": !1,
|
|
1236
1236
|
"helper-state": e(J)(e(d), "subscriptionValidity"),
|
|
1237
1237
|
"helper-text": e(G)(e(d), "subscriptionValidity")
|
|
1238
1238
|
}, null, 8, ["model-value", "label", "helper-state", "helper-text"])) : M("", !0)
|
|
1239
1239
|
], 64)) : M("", !0),
|
|
1240
1240
|
e(t).isFeedvibe ? M("", !0) : (g(), B(X, { key: 2 }, [
|
|
1241
|
-
_("div",
|
|
1242
|
-
i(
|
|
1241
|
+
_("div", nn, L(e(s)("connect.store.bundle.edit.credit")), 1),
|
|
1242
|
+
i(K, {
|
|
1243
1243
|
modelValue: e(t).credit.normal,
|
|
1244
|
-
"onUpdate:modelValue": n[8] || (n[8] = (
|
|
1245
|
-
label: e(
|
|
1244
|
+
"onUpdate:modelValue": n[8] || (n[8] = (S) => e(t).credit.normal = S),
|
|
1245
|
+
label: e(s)("connect.store.bundle.edit.normalCredit"),
|
|
1246
1246
|
"show-steppers": !1,
|
|
1247
1247
|
"helper-state": e(J)(e(d), "credit.normal"),
|
|
1248
1248
|
"helper-text": e(G)(e(d), "credit.normal")
|
|
1249
1249
|
}, {
|
|
1250
|
-
append: T(() => n[
|
|
1251
|
-
|
|
1250
|
+
append: T(() => n[23] || (n[23] = [
|
|
1251
|
+
ue(" credit ")
|
|
1252
1252
|
])),
|
|
1253
1253
|
_: 1
|
|
1254
1254
|
}, 8, ["modelValue", "label", "helper-state", "helper-text"]),
|
|
1255
|
-
i(
|
|
1255
|
+
i(K, {
|
|
1256
1256
|
"model-value": ((Ue = e(t).credit.free) == null ? void 0 : Ue.amount) ?? null,
|
|
1257
1257
|
min: 0,
|
|
1258
|
-
"onUpdate:modelValue": n[9] || (n[9] = (
|
|
1258
|
+
"onUpdate:modelValue": n[9] || (n[9] = (S) => {
|
|
1259
1259
|
e(t).credit.free || (e(t).credit.free = {
|
|
1260
1260
|
amount: 0,
|
|
1261
1261
|
day: 1
|
|
1262
|
-
}), e(t).credit.free.amount =
|
|
1262
|
+
}), e(t).credit.free.amount = S;
|
|
1263
1263
|
}),
|
|
1264
|
-
label: e(
|
|
1264
|
+
label: e(s)("connect.store.bundle.edit.freeCredit"),
|
|
1265
1265
|
"show-steppers": !1,
|
|
1266
1266
|
"helper-state": e(J)(e(d), "credit.free.amount"),
|
|
1267
1267
|
"helper-text": e(G)(e(d), "credit.free.amount")
|
|
1268
1268
|
}, {
|
|
1269
|
-
append: T(() => n[
|
|
1270
|
-
|
|
1269
|
+
append: T(() => n[24] || (n[24] = [
|
|
1270
|
+
ue(" credit ")
|
|
1271
1271
|
])),
|
|
1272
1272
|
_: 1
|
|
1273
1273
|
}, 8, ["model-value", "label", "helper-state", "helper-text"]),
|
|
1274
|
-
(Re = e(t).credit.free) != null && Re.amount ? (g(), I(
|
|
1274
|
+
(Re = e(t).credit.free) != null && Re.amount ? (g(), I(K, {
|
|
1275
1275
|
key: 0,
|
|
1276
1276
|
disabled: !!e(t).stripePriceId,
|
|
1277
1277
|
"model-value": ((Ie = e(t).credit.free) == null ? void 0 : Ie.day) ?? null,
|
|
1278
1278
|
min: 0,
|
|
1279
|
-
"onUpdate:modelValue": n[10] || (n[10] = (
|
|
1279
|
+
"onUpdate:modelValue": n[10] || (n[10] = (S) => {
|
|
1280
1280
|
e(t).credit.free || (e(t).credit.free = {
|
|
1281
1281
|
amount: 0,
|
|
1282
1282
|
day: 1
|
|
1283
|
-
}), e(t).credit.free.day = e(A) ||
|
|
1283
|
+
}), e(t).credit.free.day = e(A) || S;
|
|
1284
1284
|
}),
|
|
1285
1285
|
label: "Free credit valid for",
|
|
1286
1286
|
"show-steppers": !1,
|
|
1287
1287
|
"helper-state": e(J)(e(d), "credit.free.day"),
|
|
1288
1288
|
"helper-text": e(G)(e(d), "credit.free.day")
|
|
1289
1289
|
}, {
|
|
1290
|
-
append: T(() => n[
|
|
1291
|
-
|
|
1290
|
+
append: T(() => n[25] || (n[25] = [
|
|
1291
|
+
ue(" day(s) ")
|
|
1292
1292
|
])),
|
|
1293
1293
|
_: 1
|
|
1294
1294
|
}, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : M("", !0)
|
|
1295
1295
|
], 64)),
|
|
1296
1296
|
e(z) ? (g(), B(X, { key: 3 }, [
|
|
1297
|
-
n[
|
|
1298
|
-
i(
|
|
1297
|
+
n[26] || (n[26] = _("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Taxes", -1)),
|
|
1298
|
+
i(Xt, {
|
|
1299
1299
|
modelValue: e(t).taxes,
|
|
1300
|
-
"onUpdate:modelValue": n[11] || (n[11] = (
|
|
1300
|
+
"onUpdate:modelValue": n[11] || (n[11] = (S) => e(t).taxes = S)
|
|
1301
1301
|
}, null, 8, ["modelValue"]),
|
|
1302
1302
|
i(E, {
|
|
1303
1303
|
label: `Tax Charged (${e(ae)})`,
|
|
1304
|
-
"model-value": e(
|
|
1304
|
+
"model-value": e(k),
|
|
1305
1305
|
disabled: ""
|
|
1306
1306
|
}, null, 8, ["label", "model-value"])
|
|
1307
1307
|
], 64)) : M("", !0),
|
|
1308
|
-
i(
|
|
1308
|
+
i(K, {
|
|
1309
1309
|
label: "Total Price",
|
|
1310
|
-
"model-value": e(
|
|
1310
|
+
"model-value": e(R),
|
|
1311
1311
|
disabled: !0
|
|
1312
1312
|
}, null, 8, ["model-value"]),
|
|
1313
|
-
_("div",
|
|
1314
|
-
_("div",
|
|
1315
|
-
_("div",
|
|
1316
|
-
_("div",
|
|
1317
|
-
i(
|
|
1318
|
-
label: `Reward type: ${e(
|
|
1313
|
+
_("div", on, L(e(s)("connect.store.bundle.edit.bundleReward.title")), 1),
|
|
1314
|
+
_("div", an, L(e(s)("connect.store.bundle.edit.bundleReward.description")), 1),
|
|
1315
|
+
_("div", ln, [
|
|
1316
|
+
_("div", sn, [
|
|
1317
|
+
i(rt, {
|
|
1318
|
+
label: `Reward type: ${e(l).length == 0 ? "All" : e(l)[0].name}`
|
|
1319
1319
|
}, {
|
|
1320
1320
|
default: T(() => [
|
|
1321
|
-
i(
|
|
1322
|
-
onClick: n[12] || (n[12] = (
|
|
1321
|
+
i(de, {
|
|
1322
|
+
onClick: n[12] || (n[12] = (S) => l.value = []),
|
|
1323
1323
|
label: "All"
|
|
1324
1324
|
}),
|
|
1325
|
-
i(
|
|
1326
|
-
onClick: n[13] || (n[13] = (
|
|
1325
|
+
i(de, {
|
|
1326
|
+
onClick: n[13] || (n[13] = (S) => l.value = [
|
|
1327
1327
|
{
|
|
1328
1328
|
id: "type",
|
|
1329
1329
|
value: "VOUCHER",
|
|
@@ -1332,8 +1332,8 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1332
1332
|
]),
|
|
1333
1333
|
label: e(me).VOUCHER.name
|
|
1334
1334
|
}, null, 8, ["label"]),
|
|
1335
|
-
i(
|
|
1336
|
-
onClick: n[14] || (n[14] = (
|
|
1335
|
+
i(de, {
|
|
1336
|
+
onClick: n[14] || (n[14] = (S) => l.value = [
|
|
1337
1337
|
{
|
|
1338
1338
|
id: "type",
|
|
1339
1339
|
value: "TITLE",
|
|
@@ -1347,44 +1347,51 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1347
1347
|
}, 8, ["label"])
|
|
1348
1348
|
]),
|
|
1349
1349
|
i(ge, {
|
|
1350
|
-
modelValue: e(
|
|
1351
|
-
"onUpdate:modelValue": n[15] || (n[15] = (
|
|
1350
|
+
modelValue: e(H),
|
|
1351
|
+
"onUpdate:modelValue": n[15] || (n[15] = (S) => oe(H) ? H.value = S : null),
|
|
1352
1352
|
selection: "multiple",
|
|
1353
|
-
"column-filter": e(
|
|
1353
|
+
"column-filter": e(l),
|
|
1354
1354
|
"column-defs": V,
|
|
1355
|
-
"row-data": e(
|
|
1356
|
-
(
|
|
1355
|
+
"row-data": e(F).filter(
|
|
1356
|
+
(S) => !e(t).isFeedvibe || S.collectible.type == "VOUCHER"
|
|
1357
1357
|
),
|
|
1358
|
-
"hide-footer": e(
|
|
1358
|
+
"hide-footer": e(F).length <= 10
|
|
1359
1359
|
}, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"]),
|
|
1360
1360
|
i($, {
|
|
1361
1361
|
text: e(G)(e(d), "titles"),
|
|
1362
1362
|
state: e(J)(e(d), "titles")
|
|
1363
1363
|
}, null, 8, ["text", "state"])
|
|
1364
1364
|
]),
|
|
1365
|
-
_("div",
|
|
1366
|
-
_("div",
|
|
1365
|
+
_("div", rn, L(e(s)("connect.store.bundle.edit.advanceSetting")), 1),
|
|
1366
|
+
_("div", dn, [
|
|
1367
1367
|
i(C, {
|
|
1368
1368
|
"model-value": e(t).internal ?? !1,
|
|
1369
|
-
"onUpdate:modelValue": n[16] || (n[16] = (
|
|
1369
|
+
"onUpdate:modelValue": n[16] || (n[16] = (S) => e(t).internal = S),
|
|
1370
1370
|
"label-placement": "right",
|
|
1371
|
-
label: e(
|
|
1372
|
-
sublabel: e(
|
|
1371
|
+
label: e(s)("connect.store.bundle.edit.internalBundle"),
|
|
1372
|
+
sublabel: e(s)("connect.store.bundle.edit.internalBundleDescription")
|
|
1373
1373
|
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
1374
1374
|
i(C, {
|
|
1375
1375
|
"model-value": e(t).hideInPos ?? !1,
|
|
1376
|
-
"onUpdate:modelValue": n[17] || (n[17] = (
|
|
1376
|
+
"onUpdate:modelValue": n[17] || (n[17] = (S) => e(t).hideInPos = S),
|
|
1377
1377
|
"label-placement": "right",
|
|
1378
|
-
label: e(
|
|
1379
|
-
sublabel: e(
|
|
1378
|
+
label: e(s)("connect.store.bundle.edit.hideInPos"),
|
|
1379
|
+
sublabel: e(s)("connect.store.bundle.edit.hideInPosDescription")
|
|
1380
1380
|
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
1381
|
-
i(
|
|
1381
|
+
i(K, {
|
|
1382
1382
|
"model-value": ((Ne = (Be = e(t).config) == null ? void 0 : Be.options) == null ? void 0 : Ne.maxPerUser) || null,
|
|
1383
|
-
"onUpdate:modelValue": n[18] || (n[18] = (
|
|
1384
|
-
label: e(
|
|
1383
|
+
"onUpdate:modelValue": n[18] || (n[18] = (S) => e(re).set(e(t), "config.options.maxPerUser", S)),
|
|
1384
|
+
label: e(s)("connect.store.bundle.edit.maxPerUser"),
|
|
1385
1385
|
"show-steppers": !1,
|
|
1386
|
-
placeholder: "
|
|
1387
|
-
}, null, 8, ["model-value", "label"])
|
|
1386
|
+
placeholder: e(s)("connect.store.bundle.edit.unlimited")
|
|
1387
|
+
}, null, 8, ["model-value", "label", "placeholder"]),
|
|
1388
|
+
i(K, {
|
|
1389
|
+
"model-value": ((Ae = (De = e(t).config) == null ? void 0 : De.options) == null ? void 0 : Ae.maxReceive) || null,
|
|
1390
|
+
"onUpdate:modelValue": n[19] || (n[19] = (S) => e(re).set(e(t), "config.options.maxReceive", S)),
|
|
1391
|
+
label: e(s)("connect.store.bundle.edit.maxReceive"),
|
|
1392
|
+
"show-steppers": !1,
|
|
1393
|
+
placeholder: e(s)("connect.store.bundle.edit.unlimited")
|
|
1394
|
+
}, null, 8, ["model-value", "label", "placeholder"])
|
|
1388
1395
|
])
|
|
1389
1396
|
])) : M("", !0)
|
|
1390
1397
|
];
|
|
@@ -1393,47 +1400,47 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1393
1400
|
}, 8, ["modelValue", "header"]);
|
|
1394
1401
|
};
|
|
1395
1402
|
}
|
|
1396
|
-
}),
|
|
1403
|
+
}), mn = { class: "flex gap-8 items-center flex-wrap" }, pn = { class: "flex items-center gap-8" }, yn = /* @__PURE__ */ ee({
|
|
1397
1404
|
__name: "SendBundleSheet",
|
|
1398
1405
|
emits: ["success"],
|
|
1399
|
-
setup(v, { expose: x, emit:
|
|
1400
|
-
const { minor: f } =
|
|
1401
|
-
|
|
1402
|
-
function c(
|
|
1403
|
-
u.value = !0, b.value = null, o.value = "",
|
|
1406
|
+
setup(v, { expose: x, emit: a }) {
|
|
1407
|
+
const { minor: f } = Le, s = U(), b = U(""), o = U(""), m = U([]), u = U(!1), t = U();
|
|
1408
|
+
U(!0);
|
|
1409
|
+
function c(F) {
|
|
1410
|
+
u.value = !0, b.value = null, o.value = "", s.value = F.bundle;
|
|
1404
1411
|
}
|
|
1405
1412
|
function y() {
|
|
1406
1413
|
u.value = !1;
|
|
1407
1414
|
}
|
|
1408
|
-
async function d(
|
|
1409
|
-
const
|
|
1415
|
+
async function d(F) {
|
|
1416
|
+
const w = await mt.read({
|
|
1410
1417
|
limit: 25,
|
|
1411
1418
|
skip: 0,
|
|
1412
1419
|
sortBy: "_id",
|
|
1413
|
-
search:
|
|
1420
|
+
search: F,
|
|
1414
1421
|
descending: !1
|
|
1415
1422
|
});
|
|
1416
|
-
m.value =
|
|
1423
|
+
m.value = w.resources.map((A) => ({
|
|
1417
1424
|
label: `${A.name} (${A.phoneNumber})`,
|
|
1418
1425
|
value: A._id
|
|
1419
1426
|
})), await new Promise((A) => setTimeout(A, 100));
|
|
1420
1427
|
}
|
|
1421
1428
|
async function V() {
|
|
1422
|
-
if (!
|
|
1423
|
-
const
|
|
1429
|
+
if (!s.value || !b.value) return;
|
|
1430
|
+
const F = m.value.find(
|
|
1424
1431
|
(A) => A.value === b.value
|
|
1425
1432
|
);
|
|
1426
1433
|
await _e.confirm(
|
|
1427
|
-
`Are you sure you want to send bundle ${
|
|
1434
|
+
`Are you sure you want to send bundle ${s.value.name} to ${F == null ? void 0 : F.label}?`,
|
|
1428
1435
|
"Confirm",
|
|
1429
1436
|
"Confirm",
|
|
1430
1437
|
"Cancel"
|
|
1431
1438
|
) && await f(
|
|
1432
1439
|
async () => {
|
|
1433
1440
|
const A = {
|
|
1434
|
-
bundle:
|
|
1441
|
+
bundle: s.value._id,
|
|
1435
1442
|
member: b.value,
|
|
1436
|
-
source:
|
|
1443
|
+
source: nt.enum.ADMIN,
|
|
1437
1444
|
ref: `ADMIN:${(/* @__PURE__ */ new Date()).toISOString()}:${o.value}`,
|
|
1438
1445
|
withCoin: !1
|
|
1439
1446
|
};
|
|
@@ -1445,50 +1452,50 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1445
1452
|
}
|
|
1446
1453
|
);
|
|
1447
1454
|
}
|
|
1448
|
-
const
|
|
1449
|
-
var
|
|
1450
|
-
const
|
|
1451
|
-
return ((
|
|
1452
|
-
`${D.Config.getCountry().currency.symbol}${
|
|
1453
|
-
), (Y =
|
|
1455
|
+
const l = j(() => {
|
|
1456
|
+
var w, A, Y;
|
|
1457
|
+
const F = [];
|
|
1458
|
+
return ((w = s.value) == null ? void 0 : w.price.amount) > 0 && F.push(
|
|
1459
|
+
`${D.Config.getCountry().currency.symbol}${Ke((A = s.value) == null ? void 0 : A.price)}`
|
|
1460
|
+
), (Y = s.value) != null && Y.coinPrice && F.push(`${s.value.coinPrice} point(s)`), F.join(" or ");
|
|
1454
1461
|
});
|
|
1455
1462
|
return x({
|
|
1456
1463
|
showSheet: c,
|
|
1457
1464
|
hideSheet: y
|
|
1458
1465
|
}), fe(async () => {
|
|
1459
1466
|
await d("");
|
|
1460
|
-
}), (
|
|
1461
|
-
const A = h("FmCardMedia"), Y = h("FmCardHeader"), W = h("FmChip"),
|
|
1467
|
+
}), (F, w) => {
|
|
1468
|
+
const A = h("FmCardMedia"), Y = h("FmCardHeader"), W = h("FmChip"), H = h("FmCardSection"), z = h("FmCard"), ae = h("FmSelect"), r = h("FmTextField"), k = h("FmForm"), R = h("FmButton"), O = h("FmSideSheet");
|
|
1462
1469
|
return g(), I(O, {
|
|
1463
1470
|
"max-width": 560,
|
|
1464
1471
|
"dismiss-away": !0,
|
|
1465
1472
|
header: "Send bundle to member",
|
|
1466
1473
|
modelValue: e(u),
|
|
1467
1474
|
"onUpdate:modelValue": [
|
|
1468
|
-
|
|
1469
|
-
|
|
1475
|
+
w[4] || (w[4] = (P) => oe(u) ? u.value = P : null),
|
|
1476
|
+
w[5] || (w[5] = (P) => u.value = P)
|
|
1470
1477
|
]
|
|
1471
1478
|
}, {
|
|
1472
1479
|
"side-sheet-footer": T(() => [
|
|
1473
|
-
_("div",
|
|
1474
|
-
i(
|
|
1480
|
+
_("div", pn, [
|
|
1481
|
+
i(R, {
|
|
1475
1482
|
label: "Send",
|
|
1476
1483
|
loading: e(Se)().isLoading,
|
|
1477
|
-
onClick:
|
|
1484
|
+
onClick: w[2] || (w[2] = async () => {
|
|
1478
1485
|
var P;
|
|
1479
1486
|
return (P = e(t)) == null ? void 0 : P.validateInputs();
|
|
1480
1487
|
})
|
|
1481
1488
|
}, null, 8, ["loading"]),
|
|
1482
|
-
i(
|
|
1489
|
+
i(R, {
|
|
1483
1490
|
label: "Cancel",
|
|
1484
1491
|
type: "button",
|
|
1485
1492
|
variant: "tertiary",
|
|
1486
|
-
onClick:
|
|
1493
|
+
onClick: w[3] || (w[3] = (P) => u.value = !1)
|
|
1487
1494
|
})
|
|
1488
1495
|
])
|
|
1489
1496
|
]),
|
|
1490
1497
|
default: T(() => [
|
|
1491
|
-
i(
|
|
1498
|
+
i(k, {
|
|
1492
1499
|
class: "space-y-16",
|
|
1493
1500
|
ref_key: "form",
|
|
1494
1501
|
ref: t,
|
|
@@ -1504,40 +1511,40 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1504
1511
|
default: T(() => {
|
|
1505
1512
|
var P, N;
|
|
1506
1513
|
return [
|
|
1507
|
-
(P = e(
|
|
1514
|
+
(P = e(s)) != null && P.image ? (g(), I(A, {
|
|
1508
1515
|
key: 0,
|
|
1509
1516
|
width: "100",
|
|
1510
|
-
src: (N = e(
|
|
1517
|
+
src: (N = e(s)) == null ? void 0 : N.image
|
|
1511
1518
|
}, null, 8, ["src"])) : M("", !0),
|
|
1512
|
-
i(
|
|
1519
|
+
i(H, { class: "flex flex-col gap-16 justify-between" }, {
|
|
1513
1520
|
default: T(() => {
|
|
1514
1521
|
var p;
|
|
1515
1522
|
return [
|
|
1516
1523
|
i(Y, {
|
|
1517
1524
|
class: "p-0",
|
|
1518
|
-
title: (p = e(
|
|
1519
|
-
subtitle: e(
|
|
1525
|
+
title: (p = e(s)) == null ? void 0 : p.name,
|
|
1526
|
+
subtitle: e(l)
|
|
1520
1527
|
}, null, 8, ["title", "subtitle"]),
|
|
1521
|
-
i(
|
|
1528
|
+
i(H, { class: "p-0" }, {
|
|
1522
1529
|
default: T(() => {
|
|
1523
|
-
var n, C, $, E, q,
|
|
1530
|
+
var n, C, $, E, q, K, de, ge, ce, ve, le;
|
|
1524
1531
|
return [
|
|
1525
|
-
_("div",
|
|
1526
|
-
(n = e(
|
|
1532
|
+
_("div", mn, [
|
|
1533
|
+
(n = e(s)) != null && n.isFeedvibe ? (g(), I(W, {
|
|
1527
1534
|
key: 0,
|
|
1528
1535
|
label: "Feedvibe"
|
|
1529
1536
|
})) : M("", !0),
|
|
1530
|
-
($ = (C = e(
|
|
1537
|
+
($ = (C = e(s)) == null ? void 0 : C.titles) != null && $.length ? (g(), I(W, {
|
|
1531
1538
|
key: 1,
|
|
1532
|
-
label: `${e(
|
|
1539
|
+
label: `${e(s).titles.length} title(s)`
|
|
1533
1540
|
}, null, 8, ["label"])) : M("", !0),
|
|
1534
|
-
(q = (E = e(
|
|
1541
|
+
(q = (E = e(s)) == null ? void 0 : E.vouchers) != null && q.length ? (g(), I(W, {
|
|
1535
1542
|
key: 2,
|
|
1536
|
-
label: `${e(
|
|
1543
|
+
label: `${e(s).vouchers.length} voucher(s)`
|
|
1537
1544
|
}, null, 8, ["label"])) : M("", !0),
|
|
1538
|
-
(
|
|
1545
|
+
(de = (K = e(s)) == null ? void 0 : K.credit) != null && de.normal || (ve = (ce = (ge = e(s)) == null ? void 0 : ge.credit) == null ? void 0 : ce.free) != null && ve.amount ? (g(), I(W, {
|
|
1539
1546
|
key: 3,
|
|
1540
|
-
label: `${(e(
|
|
1547
|
+
label: `${(e(s).credit.normal || 0) + (((le = e(s).credit.free) == null ? void 0 : le.amount) || 0)} credit(s)`
|
|
1541
1548
|
}, null, 8, ["label"])) : M("", !0)
|
|
1542
1549
|
])
|
|
1543
1550
|
];
|
|
@@ -1554,7 +1561,7 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1554
1561
|
}),
|
|
1555
1562
|
i(ae, {
|
|
1556
1563
|
modelValue: e(b),
|
|
1557
|
-
"onUpdate:modelValue":
|
|
1564
|
+
"onUpdate:modelValue": w[0] || (w[0] = (P) => oe(b) ? b.value = P : null),
|
|
1558
1565
|
label: "Select member",
|
|
1559
1566
|
searchable: "",
|
|
1560
1567
|
items: e(m),
|
|
@@ -1562,9 +1569,9 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1562
1569
|
rules: [(P) => !!P > 0 || "Member is required"],
|
|
1563
1570
|
"helper-text": "Type to search member"
|
|
1564
1571
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
1565
|
-
i(
|
|
1572
|
+
i(r, {
|
|
1566
1573
|
modelValue: e(o),
|
|
1567
|
-
"onUpdate:modelValue":
|
|
1574
|
+
"onUpdate:modelValue": w[1] || (w[1] = (P) => oe(o) ? o.value = P : null),
|
|
1568
1575
|
label: "Reference (optional)",
|
|
1569
1576
|
rules: [
|
|
1570
1577
|
(P) => P.length < 50 || "Reference must be less than 50 characters"
|
|
@@ -1579,141 +1586,141 @@ const Jt = /* @__PURE__ */ ee({
|
|
|
1579
1586
|
};
|
|
1580
1587
|
}
|
|
1581
1588
|
});
|
|
1582
|
-
var
|
|
1583
|
-
const
|
|
1589
|
+
var fn = { 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" };
|
|
1590
|
+
const bn = { class: "px-24 flex flex-col gap-y-16" }, gn = { class: "flex gap-8 items-center" }, vn = { class: "fm-typo-en-body-lg-600" }, hn = { class: "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-24" }, xn = { class: "flex flex-col gap-16 text-center" }, _n = { class: "fm-typo-en-title-sm-800" }, Cn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qn = /* @__PURE__ */ ee({
|
|
1584
1591
|
__name: "Store",
|
|
1585
1592
|
setup(v) {
|
|
1586
1593
|
const x = {
|
|
1587
1594
|
label: "Setup payout account",
|
|
1588
1595
|
value: "payout",
|
|
1589
1596
|
isPrimary: !1
|
|
1590
|
-
}, { t:
|
|
1591
|
-
label:
|
|
1597
|
+
}, { t: a } = be(), f = {
|
|
1598
|
+
label: a("connect.store.actions.setting"),
|
|
1592
1599
|
value: "setting",
|
|
1593
1600
|
isPrimary: !1
|
|
1594
|
-
},
|
|
1595
|
-
label:
|
|
1601
|
+
}, s = {
|
|
1602
|
+
label: a("connect.store.actions.manageReward"),
|
|
1596
1603
|
value: "create_reward"
|
|
1597
1604
|
}, b = {
|
|
1598
|
-
label:
|
|
1605
|
+
label: a("connect.store.actions.addCategory"),
|
|
1599
1606
|
value: "create_category",
|
|
1600
1607
|
isPrimary: !0,
|
|
1601
1608
|
prependIcon: "add"
|
|
1602
|
-
}, o =
|
|
1603
|
-
async function
|
|
1604
|
-
var
|
|
1605
|
-
|
|
1609
|
+
}, o = U(), m = pt(), u = ke(), { global: t, minor: c } = Le, y = Ee(), d = j(() => u.sortedStoreCategories), V = j(() => u.sortedStoreCategories.map((r) => r.name)), l = U(), F = U();
|
|
1610
|
+
async function w(r) {
|
|
1611
|
+
var k;
|
|
1612
|
+
r === "setting" ? (k = l.value) == null || k.showSheet(!0, u.storeOption) : r === "create_category" ? Y(-1) : r === "create_reward" ? await m.push({ name: Ze["$connect-STORE_REWARDS"] }) : r == "payout" && window.open(fn.paymentPortalUrl, "_blank");
|
|
1606
1613
|
}
|
|
1607
|
-
async function A(
|
|
1614
|
+
async function A(r) {
|
|
1608
1615
|
await c(
|
|
1609
1616
|
async () => {
|
|
1610
|
-
var
|
|
1611
|
-
await Ce.updateStore(
|
|
1617
|
+
var k;
|
|
1618
|
+
await Ce.updateStore(r), await u.readMemberStore(), (k = l.value) == null || k.showSheet(!1);
|
|
1612
1619
|
},
|
|
1613
1620
|
{
|
|
1614
|
-
message:
|
|
1615
|
-
successMessage:
|
|
1621
|
+
message: a("connect.store.setting.update.message"),
|
|
1622
|
+
successMessage: a("connect.store.setting.update.success")
|
|
1616
1623
|
}
|
|
1617
1624
|
);
|
|
1618
1625
|
}
|
|
1619
|
-
async function Y(
|
|
1620
|
-
var
|
|
1626
|
+
async function Y(r = -1) {
|
|
1627
|
+
var k, R;
|
|
1621
1628
|
if ((!u.storeOption || !u.storeOption.company) && await _e.confirm(
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1629
|
+
a("connect.store.category.setup.title"),
|
|
1630
|
+
a("connect.store.category.setup.button"),
|
|
1631
|
+
a("connect.store.category.setup.action"),
|
|
1632
|
+
a("connect.common.cancel")
|
|
1626
1633
|
))
|
|
1627
|
-
return (
|
|
1634
|
+
return (k = l.value) == null ? void 0 : k.showSheet(!0);
|
|
1628
1635
|
y.open({
|
|
1629
|
-
title:
|
|
1630
|
-
contentComponent:
|
|
1636
|
+
title: r == -1 ? a("connect.store.category.add") : a("connect.store.category.edit"),
|
|
1637
|
+
contentComponent: Pt,
|
|
1631
1638
|
contentComponentProps: {
|
|
1632
|
-
initialValue: ((
|
|
1633
|
-
action:
|
|
1639
|
+
initialValue: ((R = d.value[r]) == null ? void 0 : R.name) ?? "",
|
|
1640
|
+
action: r == -1 ? "add" : "edit"
|
|
1634
1641
|
}
|
|
1635
1642
|
}).onPrimary(async (O) => {
|
|
1636
1643
|
O === null && !await _e.remove(
|
|
1637
|
-
|
|
1638
|
-
|
|
1644
|
+
a("connect.store.category.remove.confirm"),
|
|
1645
|
+
a("connect.store.category.remove.title")
|
|
1639
1646
|
) || await c(
|
|
1640
1647
|
async () => {
|
|
1641
|
-
const P =
|
|
1648
|
+
const P = r == -1 ? [...d.value, { name: O, bundles: [] }] : [...d.value].map((N, p) => p == r ? { ...N, name: O } : N).filter((N) => N.name !== null);
|
|
1642
1649
|
await Ce.updateStoreBundle({
|
|
1643
1650
|
categories: P
|
|
1644
1651
|
}), await u.readMemberStore();
|
|
1645
1652
|
},
|
|
1646
1653
|
{
|
|
1647
|
-
message: O === null ?
|
|
1648
|
-
successMessage: O === null ?
|
|
1654
|
+
message: O === null ? a("connect.store.category.update.deleting") : r == -1 ? a("connect.store.category.update.creating") : a("connect.store.category.update.updating"),
|
|
1655
|
+
successMessage: O === null ? a("connect.store.category.update.success.deleted") : r == -1 ? a("connect.store.category.update.success.created") : a("connect.store.category.update.success.updated")
|
|
1649
1656
|
}
|
|
1650
1657
|
);
|
|
1651
1658
|
});
|
|
1652
1659
|
}
|
|
1653
|
-
async function W(
|
|
1660
|
+
async function W(r, k, R, O) {
|
|
1654
1661
|
var p, n, C;
|
|
1655
|
-
|
|
1656
|
-
const P =
|
|
1662
|
+
k ?? (k = (p = F.value) == null ? void 0 : p.target.category), R ?? (R = (n = F.value) == null ? void 0 : n.target.index), O ?? (O = (C = F.value) == null ? void 0 : C.target.originalCategoryIndex);
|
|
1663
|
+
const P = Me(d.value);
|
|
1657
1664
|
for (const $ of P)
|
|
1658
1665
|
for (const E of $.bundles)
|
|
1659
1666
|
console.log(E, "bundle in payload"), "pf_vouchers" in E && delete E.pf_vouchers;
|
|
1660
|
-
|
|
1661
|
-
const N = P[
|
|
1667
|
+
k != O && O != null && (P[O].bundles.splice(R, 1), R = P[k].bundles.length);
|
|
1668
|
+
const N = P[k];
|
|
1662
1669
|
if (!N) {
|
|
1663
|
-
|
|
1670
|
+
at.error("Unexpected error", 2e3);
|
|
1664
1671
|
return;
|
|
1665
1672
|
}
|
|
1666
|
-
if (
|
|
1673
|
+
if (r == null) {
|
|
1667
1674
|
if (await _e.remove(
|
|
1668
|
-
"
|
|
1669
|
-
"
|
|
1675
|
+
a("connect.store.bundle.delete.confirm"),
|
|
1676
|
+
a("connect.store.bundle.delete.title")
|
|
1670
1677
|
) == !1)
|
|
1671
1678
|
return;
|
|
1672
|
-
N.bundles.splice(
|
|
1679
|
+
N.bundles.splice(R, 1);
|
|
1673
1680
|
} else
|
|
1674
|
-
|
|
1681
|
+
R == -1 ? N.bundles.push(r) : N.bundles[R] = r;
|
|
1675
1682
|
await c(
|
|
1676
1683
|
async () => {
|
|
1677
1684
|
var $, E;
|
|
1678
|
-
if (
|
|
1679
|
-
const q = ($ =
|
|
1680
|
-
q === null &&
|
|
1685
|
+
if (r != null) {
|
|
1686
|
+
const q = ($ = F.value) == null ? void 0 : $.bundleImage;
|
|
1687
|
+
q === null && r.image ? (await Fe.delete(r.image), r.image = null) : q && (r.image = await Fe.update(
|
|
1681
1688
|
Fe.bundleImagePath(void 0, q),
|
|
1682
1689
|
q
|
|
1683
1690
|
));
|
|
1684
1691
|
}
|
|
1685
1692
|
await Ce.updateStoreBundle({
|
|
1686
1693
|
categories: P
|
|
1687
|
-
}), await u.readMemberStore(), await u.readMembership(), await u.readRewards(), (E =
|
|
1694
|
+
}), await u.readMemberStore(), await u.readMembership(), await u.readRewards(), (E = F.value) == null || E.showSheet(!1);
|
|
1688
1695
|
},
|
|
1689
1696
|
{
|
|
1690
|
-
message: `${
|
|
1691
|
-
successMessage: `Bundle ${
|
|
1697
|
+
message: `${r == null ? "Deleting" : R == -1 ? "Creating" : "Updating"} bundle`,
|
|
1698
|
+
successMessage: `Bundle ${r == null ? "deleted" : R == -1 ? "created" : "updated"} successfully`
|
|
1692
1699
|
}
|
|
1693
1700
|
);
|
|
1694
1701
|
}
|
|
1695
|
-
function
|
|
1696
|
-
var
|
|
1697
|
-
(
|
|
1698
|
-
...
|
|
1699
|
-
bundle:
|
|
1702
|
+
function H(r) {
|
|
1703
|
+
var k;
|
|
1704
|
+
(k = F.value) == null || k.showSheet(!0, {
|
|
1705
|
+
...r,
|
|
1706
|
+
bundle: r.bundle ? Me(r.bundle) : void 0
|
|
1700
1707
|
});
|
|
1701
1708
|
}
|
|
1702
|
-
const z =
|
|
1703
|
-
function ae(
|
|
1704
|
-
var
|
|
1705
|
-
(
|
|
1706
|
-
bundle:
|
|
1709
|
+
const z = U([]);
|
|
1710
|
+
function ae(r) {
|
|
1711
|
+
var k;
|
|
1712
|
+
(k = o.value) == null || k.showSheet({
|
|
1713
|
+
bundle: r
|
|
1707
1714
|
});
|
|
1708
1715
|
}
|
|
1709
1716
|
return fe(async () => {
|
|
1710
|
-
var
|
|
1717
|
+
var k, R;
|
|
1711
1718
|
await t(async () => {
|
|
1712
1719
|
var O, P;
|
|
1713
1720
|
if (await u.readMemberStore(), await u.readMembership(), await u.readRewards(), await u.readPayoutAccount(), (O = m.currentRoute.value.query) != null && O.action) {
|
|
1714
1721
|
switch ((P = m.currentRoute.value.query) == null ? void 0 : P.action) {
|
|
1715
1722
|
case "update_setting":
|
|
1716
|
-
|
|
1723
|
+
w("setting");
|
|
1717
1724
|
break;
|
|
1718
1725
|
case "create_category":
|
|
1719
1726
|
Y(-1);
|
|
@@ -1721,14 +1728,14 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1721
1728
|
case "create_feedvibe_bundle":
|
|
1722
1729
|
y.open({
|
|
1723
1730
|
title: "Select category",
|
|
1724
|
-
contentComponent:
|
|
1731
|
+
contentComponent: Ut
|
|
1725
1732
|
}).onPrimary((N) => {
|
|
1726
|
-
y.close(),
|
|
1733
|
+
y.close(), H({
|
|
1727
1734
|
categories: V.value,
|
|
1728
1735
|
category: N,
|
|
1729
1736
|
index: -1,
|
|
1730
1737
|
bundle: {
|
|
1731
|
-
...
|
|
1738
|
+
...re.cloneDeep(Ve),
|
|
1732
1739
|
isFeedvibe: !0,
|
|
1733
1740
|
price: D.Dinero.fromNumber({
|
|
1734
1741
|
number: 10,
|
|
@@ -1742,29 +1749,29 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1742
1749
|
m.replace({ query: {} });
|
|
1743
1750
|
}
|
|
1744
1751
|
});
|
|
1745
|
-
const
|
|
1752
|
+
const r = ((k = u.payoutAccount) == null ? void 0 : k.status) === "APPROVED" && ((R = u.payoutAccount) == null ? void 0 : R.enable) === !0;
|
|
1746
1753
|
z.value = [
|
|
1747
|
-
...
|
|
1754
|
+
...r ? [] : [x],
|
|
1748
1755
|
f,
|
|
1749
|
-
|
|
1756
|
+
s,
|
|
1750
1757
|
b
|
|
1751
1758
|
];
|
|
1752
|
-
}), (
|
|
1753
|
-
const
|
|
1759
|
+
}), (r, k) => {
|
|
1760
|
+
const R = h("FmPageHead"), O = h("FmButton"), P = h("FmCard");
|
|
1754
1761
|
return g(), B(X, null, [
|
|
1755
|
-
i(
|
|
1756
|
-
title: e(
|
|
1762
|
+
i(R, {
|
|
1763
|
+
title: e(a)("connect.store.title"),
|
|
1757
1764
|
actions: e(z),
|
|
1758
|
-
"onClick:action":
|
|
1765
|
+
"onClick:action": w
|
|
1759
1766
|
}, null, 8, ["title", "actions"]),
|
|
1760
|
-
_("div",
|
|
1767
|
+
_("div", bn, [
|
|
1761
1768
|
e(d) && e(d).length > 0 ? (g(), B(X, { key: 0 }, [
|
|
1762
|
-
(g(!0), B(X, null,
|
|
1769
|
+
(g(!0), B(X, null, ie(e(d), (N, p) => (g(), B("div", {
|
|
1763
1770
|
key: N.name,
|
|
1764
1771
|
class: "space-y-8 py-12"
|
|
1765
1772
|
}, [
|
|
1766
|
-
_("div",
|
|
1767
|
-
_("div",
|
|
1773
|
+
_("div", gn, [
|
|
1774
|
+
_("div", vn, L(N.name), 1),
|
|
1768
1775
|
i(Pe, { json: N }, null, 8, ["json"]),
|
|
1769
1776
|
i(O, {
|
|
1770
1777
|
icon: "edit",
|
|
@@ -1773,11 +1780,11 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1773
1780
|
onClick: (n) => Y(p)
|
|
1774
1781
|
}, null, 8, ["onClick"])
|
|
1775
1782
|
]),
|
|
1776
|
-
_("div",
|
|
1777
|
-
(g(!0), B(X, null,
|
|
1783
|
+
_("div", hn, [
|
|
1784
|
+
(g(!0), B(X, null, ie(N.bundles, (n, C) => (g(), I(St, {
|
|
1778
1785
|
bundle: n,
|
|
1779
1786
|
key: n._id,
|
|
1780
|
-
onEdit: ($) =>
|
|
1787
|
+
onEdit: ($) => H({
|
|
1781
1788
|
bundle: n,
|
|
1782
1789
|
category: p,
|
|
1783
1790
|
index: C,
|
|
@@ -1786,8 +1793,8 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1786
1793
|
onDelete: ($) => W(null, p, C),
|
|
1787
1794
|
onSend: ae
|
|
1788
1795
|
}, null, 8, ["bundle", "onEdit", "onDelete"]))), 128)),
|
|
1789
|
-
i(
|
|
1790
|
-
onCreate: (n) =>
|
|
1796
|
+
i(Ft, {
|
|
1797
|
+
onCreate: (n) => H({
|
|
1791
1798
|
category: p,
|
|
1792
1799
|
index: -1,
|
|
1793
1800
|
categories: e(V)
|
|
@@ -1795,9 +1802,9 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1795
1802
|
}, null, 8, ["onCreate"])
|
|
1796
1803
|
])
|
|
1797
1804
|
]))), 128)),
|
|
1798
|
-
i(
|
|
1805
|
+
i(cn, {
|
|
1799
1806
|
ref_key: "bundleSheetRef",
|
|
1800
|
-
ref:
|
|
1807
|
+
ref: F,
|
|
1801
1808
|
onUpdate: W
|
|
1802
1809
|
}, null, 512)
|
|
1803
1810
|
], 64)) : (g(), I(P, {
|
|
@@ -1806,29 +1813,29 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1806
1813
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
1807
1814
|
}, {
|
|
1808
1815
|
default: T(() => [
|
|
1809
|
-
|
|
1810
|
-
src:
|
|
1816
|
+
k[1] || (k[1] = _("img", {
|
|
1817
|
+
src: ze,
|
|
1811
1818
|
class: "aspect-square w-[150px]"
|
|
1812
1819
|
}, null, -1)),
|
|
1813
|
-
_("div",
|
|
1814
|
-
_("div",
|
|
1815
|
-
_("div",
|
|
1820
|
+
_("div", xn, [
|
|
1821
|
+
_("div", _n, L(e(a)("connect.store.bundle.title")), 1),
|
|
1822
|
+
_("div", Cn, L(e(a)("connect.store.bundle.description")), 1)
|
|
1816
1823
|
]),
|
|
1817
1824
|
i(O, {
|
|
1818
1825
|
variant: "primary",
|
|
1819
|
-
label: e(
|
|
1826
|
+
label: e(a)("connect.store.actions.addCategory"),
|
|
1820
1827
|
icon: "add",
|
|
1821
|
-
onClick:
|
|
1828
|
+
onClick: k[0] || (k[0] = (N) => Y(-1))
|
|
1822
1829
|
}, null, 8, ["label"])
|
|
1823
1830
|
]),
|
|
1824
1831
|
_: 1
|
|
1825
1832
|
})),
|
|
1826
|
-
i(
|
|
1833
|
+
i(Jt, {
|
|
1827
1834
|
ref_key: "settingSheetRef",
|
|
1828
|
-
ref:
|
|
1835
|
+
ref: l,
|
|
1829
1836
|
onUpdate: A
|
|
1830
1837
|
}, null, 512),
|
|
1831
|
-
i(
|
|
1838
|
+
i(yn, {
|
|
1832
1839
|
ref_key: "sendBundleSheetRef",
|
|
1833
1840
|
ref: o
|
|
1834
1841
|
}, null, 512)
|
|
@@ -1838,5 +1845,5 @@ const yn = { class: "px-24 flex flex-col gap-y-16" }, fn = { class: "flex gap-8
|
|
|
1838
1845
|
}
|
|
1839
1846
|
});
|
|
1840
1847
|
export {
|
|
1841
|
-
|
|
1848
|
+
Qn as default
|
|
1842
1849
|
};
|