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