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