@feedmepos/mf-connect 0.1.84-prod → 0.1.86-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---kwMsJh.js → Analytic-NBYws-xJ.js} +11 -11
- package/dist/{App-Dz1QFoj1.js → App-B9uc4uAB.js} +7 -7
- package/dist/{Bin-CRYowBLt.js → Bin-Dd-7uENK.js} +8 -8
- package/dist/{Broadcast-C8_buAc0.js → Broadcast-C57geedD.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CYY2JwZP.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-kp9alY2C.js} +7 -6
- package/dist/{Card-DePqhNID.js → Card-0JNty6vz.js} +19 -19
- package/dist/{Collections-RwrRqA0j.js → Collections-DEWu2bk5.js} +8 -8
- package/dist/{Credit-C8PUzFqm.js → Credit-B1HqzpDi.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CgUd84nn.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-mmkn3juE.js} +33 -33
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DnPaODeO.js → EffectSheet.vue_vue_type_style_index_0_lang-DFbCf9em.js} +6 -6
- package/dist/{Experience-DhtTPHu-.js → Experience-BeXr3SDh.js} +8 -8
- package/dist/{FileSaver.min-BWjfwA9o.js → FileSaver.min-Dd3kdScu.js} +1 -1
- package/dist/{Game-CYj7LBJv.js → Game-HM2JItCg.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CUltj6id.js → ImageInput.vue_vue_type_script_setup_true_lang-Dd1o2By9.js} +1 -1
- package/dist/{Index-D8AcIz6r.js → Index-CvArBvmi.js} +10 -10
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CpUmN6FR.js → LottieAnimation.vue_vue_type_script_setup_true_lang-bmE6aMf9.js} +1 -1
- package/dist/{MainLayout-DkxA5idl.js → MainLayout-BlcAKDUD.js} +1 -1
- package/dist/{Marketing-4h6RtJ9w.js → Marketing-CdKTCEpI.js} +6 -6
- package/dist/{Member-Mi1lEgxG.js → Member-9amfN0s7.js} +14 -13
- package/dist/{MemberList-Cd7SXI7d.js → MemberList-5V8Xdu9g.js} +27 -27
- package/dist/{MemberTransactions-aM_CTN3-.js → MemberTransactions-Ch3eSP7_.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-LkKXfpQ8.js → MessageInput.vue_vue_type_script_setup_true_lang-D2M6xz4y.js} +5345 -5264
- package/dist/{Mission-BbZXMfe2.js → Mission-lmqffCWr.js} +9 -9
- package/dist/{Overview-tjz1RxkD.js → Overview-CJRz8io0.js} +19 -19
- package/dist/{Point-DqSlh8lv.js → Point-CnJ69ymH.js} +8 -8
- package/dist/{Promotion-FNZOyKDM.js → Promotion-FLyLR9hV.js} +9 -9
- package/dist/{Queue-BGr-V2dv.js → Queue-nZRf2HuR.js} +11 -11
- package/dist/{Record-YSp6Ra7G.js → Record-Cj-ppR2D.js} +9 -9
- package/dist/{Reward-CfWeF_XY.js → Reward-EOCgH_D6.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BdT11T69.js → RewardGroup.vue_vue_type_script_setup_true_lang-Bmm4Q5iv.js} +12 -12
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-D7pC5cM-.js → RuleGroup.vue_vue_type_script_setup_true_lang-Dh6mmPWI.js} +15 -15
- package/dist/{Segment-B8kCEI6G.js → Segment-Bit8pzO7.js} +31 -31
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-iK1tNyZN.js → SelectItems.vue_vue_type_script_setup_true_lang-BrPoO5ew.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Cd9_IVCK.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BoYZSL1N.js} +31 -30
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CDNCuGzR.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-AcbNYbsb.js} +4 -4
- package/dist/Setting-CWWXCdg7.js +1982 -0
- package/dist/{SettingAdvertisements-CPBFpIuM.js → SettingAdvertisements-OyBbygXk.js} +12 -12
- package/dist/{Store-CF55C7mv.js → Store-C3u_SOcu.js} +781 -724
- package/dist/{StoreRewards-hF8rcPIS.js → StoreRewards-BMVKJb6e.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BYugGARP.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Bzs1JqM4.js} +20 -20
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BSOpqCbD.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BF75L_C-.js} +1 -1
- package/dist/{Tier-RKT4ClDE.js → Tier-DI25GNig.js} +22 -22
- package/dist/{Title-vFFh4BdE.js → Title-DJS3Lro_.js} +23 -22
- package/dist/{Transaction-BHeWenhg.js → Transaction-C8BbInlR.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-iKbV9AAj.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-i0Rmd6-t.js} +6 -6
- package/dist/{Voucher-C6ywMiLW.js → Voucher-CuNm_1Ys.js} +12 -12
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DHlpDIkL.js → VoucherEditor.vue_vue_type_script_setup_true_lang-B1Xv8osE.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BHhDgBiv.js → ZodTextField.vue_vue_type_script_setup_true_lang-2lAQ7itS.js} +2 -2
- package/dist/{app-P5wZqN7K.js → app-CrlU8BQt.js} +64 -49
- package/dist/app.js +1 -1
- package/dist/{business-B35Wh7fa.js → business-DSJ3vlHq.js} +1 -1
- package/dist/{campaign-CdGwiufg.js → campaign-BkGl-Azc.js} +1 -1
- package/dist/{campaign-CxeRf6Kf.js → campaign-CD5LYcGE.js} +8 -8
- package/dist/{campaign.enum-G61yFqyz.js → campaign.enum-VymUXOzy.js} +1 -1
- package/dist/{campaign.fn-DBGVgh7k.js → campaign.fn-BySZ29iI.js} +107 -107
- package/dist/{collectible.enum-CmO4wF4e.js → collectible.enum-CaoiTdBM.js} +1 -1
- package/dist/{collection.fn-BZtvtGPA.js → collection.fn-CdOHMaS5.js} +2 -2
- package/dist/{dto-BmjMkp1Z.js → dto-DXSxijtu.js} +4 -4
- package/dist/{effect-eEYO0AvV.js → effect-CQg8wIhY.js} +1 -1
- package/dist/{email-addresses-sloQNBJG.js → email-addresses-D1vS-M__.js} +2 -2
- package/dist/{export-CmGCO7dx.js → export-CPwQDq5v.js} +3 -3
- package/dist/{helper-CW7xMPjC.js → helper-Ddi9Ypo8.js} +1 -1
- package/dist/{index-INxinXgP.js → index-BCtUj5K0.js} +1 -1
- package/dist/{index-639mCQ6J.js → index-C74X6b5n.js} +1 -1
- package/dist/{index-CLoMa41m.js → index-CBNZMw5T.js} +1 -1
- package/dist/{index-B6dK27Ud.js → index-CIG3I6UQ.js} +3 -3
- package/dist/{index-CqtPReHP.js → index-Cssv_Y-f.js} +376 -369
- package/dist/{index-C7X2wMHZ.js → index-CvQcsgQS.js} +3 -3
- package/dist/index-DoE5X--7.js +28897 -0
- package/dist/{index-B5KXKlhV.js → index-DuufBhXS.js} +1 -1
- package/dist/{index-BD00XsAg.js → index-Dw_aPOsa.js} +6 -6
- package/dist/{index-DF11MBlC.js → index-EvaDAbW_.js} +1 -1
- package/dist/{index-CmdjTQSX.js → index-LtGRDAPs.js} +1 -1
- package/dist/{index-CK4IRu1N.js → index-NlM6a88a.js} +1 -1
- package/dist/index-e2Rb4HHN.js +30289 -0
- package/dist/{index.esm2017-CFPCtvwG.js → index.esm2017-qspgWl2R.js} +1 -1
- package/dist/{loading-D77DfZBP.js → loading-BiX4mF7V.js} +1 -1
- package/dist/{lodash-B8BR1gR7.js → lodash-BiybCWQB.js} +1 -1
- package/dist/{membership-B5p556SC.js → membership-Dnkc7J8U.js} +3 -3
- package/dist/{money-CRPmLrb_.js → money-BKxUbqL2.js} +1 -1
- package/dist/{number-bJoTVZNO.js → number-s7gy0q08.js} +1 -1
- package/dist/objectid-B7dlIhZI.js +145 -0
- package/dist/{plugins-DQdMt5nO.js → plugins-_4R196pf.js} +3 -3
- package/dist/{reward-DeTD3TQ1.js → reward-D624Kic_.js} +1 -1
- package/dist/{rule-builder-D8rRlIOO.js → rule-builder-BC_A9GsJ.js} +1 -1
- package/dist/{rule-DSuuXRg3.js → rule-u0unBmVJ.js} +3 -3
- package/dist/{template-HTjC1_ed.js → template-B-WEfANP.js} +7 -7
- package/dist/{timezone-CWcYmamV.js → timezone-DWWhMtv-.js} +5 -2
- package/dist/{trigger-BZa0mW7v.js → trigger-VG08oklM.js} +5 -5
- package/dist/{usePagination-Abs8KbO-.js → usePagination-U8tHccOt.js} +1 -1
- package/dist/{user-B94fPQnM.js → user-B5TU4FOd.js} +1 -1
- package/dist/{vue-i18n-D5HHFPRa.js → vue-i18n-CfjKmwVs.js} +437 -437
- package/dist/{xlsx-BsqWVudt.js → xlsx-Cxfclh15.js} +1 -1
- package/dist/{zod-Bp867gMI.js → zod-D4HcRDps.js} +1 -1
- package/package.json +4 -4
- package/dist/Setting-DRK1-tm8.js +0 -1928
- package/dist/index-DCzBwaDb.js +0 -32272
- package/dist/index-DzgPdiHK.js +0 -30933
- package/dist/objectid-DCHsjF9h.js +0 -145
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { defineComponent as te, computed as L, resolveComponent as _, openBlock as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { useDialog as
|
|
4
|
-
import { c as A, e as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as Te, C as
|
|
7
|
-
import { m as
|
|
8
|
-
import { a as
|
|
9
|
-
import { _ as ae } from "./lodash-
|
|
10
|
-
import { c as
|
|
11
|
-
import { u as
|
|
12
|
-
import { Z as Q, g as G, a as X } from "./zod-
|
|
13
|
-
import { z as ee, R as
|
|
14
|
-
import { u as
|
|
15
|
-
import { _ as le } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
import { a as
|
|
1
|
+
import { defineComponent as te, computed as L, resolveComponent as _, openBlock as x, createBlock as O, withCtx as B, createElementVNode as V, createElementBlock as D, createVNode as r, createCommentVNode as E, toDisplayString as K, unref as e, Fragment as Y, renderList as ce, ref as N, isRef as re, reactive as ze, onMounted as he, watch as Pe, toRaw as Je, createTextVNode as me, h as Ge } from "vue";
|
|
2
|
+
import { _ as Xe } from "./tier-BJDhpH6X.js";
|
|
3
|
+
import { useDialog as je, useDialogChild as Le, components as Ze } from "@feedmepos/ui-library";
|
|
4
|
+
import { c as A, e as Se, S as Qe } from "./index-DoE5X--7.js";
|
|
5
|
+
import { u as Ke } from "./loading-BiX4mF7V.js";
|
|
6
|
+
import { u as Te, C as ye } from "./membership-Dnkc7J8U.js";
|
|
7
|
+
import { m as et, n as tt, o as nt, p as Ae, q as ot } from "./index-Cssv_Y-f.js";
|
|
8
|
+
import { a as at, c as Fe } from "./object-qECH92oz.js";
|
|
9
|
+
import { _ as ae } from "./lodash-BiybCWQB.js";
|
|
10
|
+
import { c as ue } from "./index-e2Rb4HHN.js";
|
|
11
|
+
import { u as xe } from "./vue-i18n-CfjKmwVs.js";
|
|
12
|
+
import { Z as Q, g as G, a as X } from "./zod-D4HcRDps.js";
|
|
13
|
+
import { z as ee, R as lt } from "./app-CrlU8BQt.js";
|
|
14
|
+
import { u as _e } from "./app-wDQR6dpb.js";
|
|
15
|
+
import { _ as le } from "./ZodTextField.vue_vue_type_script_setup_true_lang-2lAQ7itS.js";
|
|
16
|
+
import { a as st, p as pe, n as rt, f as Ve } from "./plugins-_4R196pf.js";
|
|
17
17
|
import { J as ke } from "./JsonViewer-v8_C7l5N.js";
|
|
18
|
-
import { _ as
|
|
19
|
-
import { _ as
|
|
20
|
-
import { _ as
|
|
21
|
-
import { z as
|
|
22
|
-
import { F as
|
|
23
|
-
import { a as
|
|
24
|
-
import "./index-
|
|
25
|
-
import "./index-
|
|
26
|
-
import "./index-
|
|
27
|
-
import "./index-
|
|
28
|
-
import { m as
|
|
29
|
-
import { m as
|
|
30
|
-
import { useRouter as
|
|
31
|
-
function
|
|
32
|
-
return
|
|
18
|
+
import { _ as it } from "./index-CvQcsgQS.js";
|
|
19
|
+
import { _ as dt } from "./ImageInput.vue_vue_type_script_setup_true_lang-Dd1o2By9.js";
|
|
20
|
+
import { _ as ut } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
21
|
+
import { z as ct, a as mt } from "./money-BKxUbqL2.js";
|
|
22
|
+
import { F as pt } from "./number-s7gy0q08.js";
|
|
23
|
+
import { a as ft, t as yt } from "./helper-Ddi9Ypo8.js";
|
|
24
|
+
import "./index-BCtUj5K0.js";
|
|
25
|
+
import "./index-Dw_aPOsa.js";
|
|
26
|
+
import "./index-CBNZMw5T.js";
|
|
27
|
+
import "./index-CIG3I6UQ.js";
|
|
28
|
+
import { m as bt } from "./index-EvaDAbW_.js";
|
|
29
|
+
import { m as ge } from "./index-C74X6b5n.js";
|
|
30
|
+
import { useRouter as gt } from "vue-router";
|
|
31
|
+
function He(C) {
|
|
32
|
+
return ue.DineroFactory(C).toUnit();
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
const
|
|
36
|
-
S.map((t) =>
|
|
37
|
-
),
|
|
38
|
-
(t,
|
|
39
|
-
var
|
|
34
|
+
function qe(C, S, o, b, s = [], v = []) {
|
|
35
|
+
const a = it.compact(
|
|
36
|
+
S.map((t) => C.find((c) => c.systemCode === t.systemCode && c.taxCode === t.taxCode)).filter((t) => !!t && v.includes(t.systemCode))
|
|
37
|
+
), m = a.reduce(
|
|
38
|
+
(t, c) => {
|
|
39
|
+
var y;
|
|
40
40
|
return Object.assign(t, {
|
|
41
|
-
[
|
|
42
|
-
inclusive: ((
|
|
41
|
+
[c.taxCode]: {
|
|
42
|
+
inclusive: ((y = s.find((u) => u.systemCode === c.systemCode)) == null ? void 0 : y.inclusive) || !1,
|
|
43
43
|
adjustment: {
|
|
44
44
|
level: 1,
|
|
45
45
|
type: {
|
|
46
46
|
type: "BY_MULTIPLIER",
|
|
47
47
|
amount: {
|
|
48
|
-
amount:
|
|
49
|
-
precision:
|
|
48
|
+
amount: c.rate.amount,
|
|
49
|
+
precision: c.rate.precision,
|
|
50
50
|
currency: "MYR"
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -55,7 +55,7 @@ function He(x, S, a, g, s = [], v = []) {
|
|
|
55
55
|
});
|
|
56
56
|
},
|
|
57
57
|
{}
|
|
58
|
-
), i =
|
|
58
|
+
), i = ue.Calculator.calculate({
|
|
59
59
|
items: {
|
|
60
60
|
0: {
|
|
61
61
|
quantity: 1,
|
|
@@ -64,108 +64,108 @@ function He(x, S, a, g, s = [], v = []) {
|
|
|
64
64
|
level: 0,
|
|
65
65
|
type: {
|
|
66
66
|
type: "BY_AMOUNT",
|
|
67
|
-
amount:
|
|
67
|
+
amount: ue.DineroFactory(o).subtract(ue.Dinero.fromNumber({ number: b }).toObject()).toObject()
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
|
-
taxes:
|
|
71
|
+
taxes: m
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
adjustments: {},
|
|
75
75
|
roundToNearest: 0
|
|
76
76
|
});
|
|
77
|
-
return
|
|
77
|
+
return a.map((t) => ({
|
|
78
78
|
setting: t,
|
|
79
79
|
systemCode: t.systemCode,
|
|
80
80
|
name: t.name,
|
|
81
81
|
taxCode: t.taxCode,
|
|
82
82
|
rate: t.rate,
|
|
83
|
-
total:
|
|
83
|
+
total: ue.DineroFactory({
|
|
84
84
|
...i.items[0].taxes[t.taxCode].amount
|
|
85
85
|
}).convertPrecision(2).toObject()
|
|
86
86
|
}));
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
return
|
|
88
|
+
function We(C, S, o) {
|
|
89
|
+
return C ? C.reduce((b, s) => {
|
|
90
90
|
var v;
|
|
91
|
-
return (v =
|
|
92
|
-
},
|
|
91
|
+
return (v = o.find((a) => a.systemCode === s.systemCode)) != null && v.inclusive || (b = ue.DineroFactory(b.toObject()).add(s.total)), b;
|
|
92
|
+
}, ue.DineroFactory(S)).toObject() : ue.DineroFactory(S).toObject();
|
|
93
93
|
}
|
|
94
|
-
const
|
|
94
|
+
const vt = { class: "relative h-[120px] aspect-video flex items-center justify-center border rounded-md border-fm-color-neutral-gray-300" }, ht = ["src"], xt = {
|
|
95
95
|
key: 2,
|
|
96
96
|
class: "absolute top-2 left-2"
|
|
97
|
-
},
|
|
97
|
+
}, Ct = { class: "absolute top-0 right-0" }, St = { class: "fm-typo-en-body-lg-600" }, _t = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ft = { class: "flex gap-8 items-center flex-wrap" }, Vt = /* @__PURE__ */ te({
|
|
98
98
|
__name: "StoreBundleCard",
|
|
99
99
|
props: {
|
|
100
100
|
bundle: { type: Object, required: !0 }
|
|
101
101
|
},
|
|
102
102
|
emits: ["edit", "delete", "send"],
|
|
103
|
-
setup(
|
|
104
|
-
const
|
|
105
|
-
const
|
|
106
|
-
return
|
|
107
|
-
`${A.Config.getCountry().currency.symbol}${
|
|
108
|
-
),
|
|
103
|
+
setup(C, { emit: S }) {
|
|
104
|
+
const o = C, b = S, s = L(() => {
|
|
105
|
+
const a = [];
|
|
106
|
+
return o.bundle.price.amount > 0 && a.push(
|
|
107
|
+
`${A.Config.getCountry().currency.symbol}${He(o.bundle.price)}`
|
|
108
|
+
), o.bundle.coinPrice && a.push(`${o.bundle.coinPrice} point(s)`), a.join(" or ");
|
|
109
109
|
}), v = L(() => {
|
|
110
|
-
var
|
|
111
|
-
const
|
|
112
|
-
if (
|
|
113
|
-
const t =
|
|
114
|
-
|
|
110
|
+
var m, i;
|
|
111
|
+
const a = [];
|
|
112
|
+
if (o.bundle.titles.length > 0 && a.push(`${o.bundle.titles.length} title(s)`), o.bundle.vouchers.length > 0 && a.push(`${o.bundle.vouchers.length} voucher(s)`), o.bundle.credit.normal || (m = o.bundle.credit.free) != null && m.amount) {
|
|
113
|
+
const t = o.bundle.credit.normal + (((i = o.bundle.credit.free) == null ? void 0 : i.amount) ?? 0);
|
|
114
|
+
a.push(`${t} credit(s)`);
|
|
115
115
|
}
|
|
116
|
-
return
|
|
116
|
+
return a;
|
|
117
117
|
});
|
|
118
|
-
return (
|
|
119
|
-
const i = _("FmIcon"), t = _("FmChip"),
|
|
120
|
-
return
|
|
118
|
+
return (a, m) => {
|
|
119
|
+
const i = _("FmIcon"), t = _("FmChip"), c = _("FmButton"), y = _("FmMenuItem"), u = _("FmMenu"), T = _("FmCard");
|
|
120
|
+
return x(), O(T, {
|
|
121
121
|
variant: "outlined",
|
|
122
122
|
class: "flex flex-col gap-y-8 p-16 min-h-[240px] h-full text-center items-center"
|
|
123
123
|
}, {
|
|
124
|
-
default:
|
|
125
|
-
V("div",
|
|
126
|
-
|
|
124
|
+
default: B(() => [
|
|
125
|
+
V("div", vt, [
|
|
126
|
+
C.bundle.image ? (x(), D("img", {
|
|
127
127
|
key: 1,
|
|
128
|
-
src:
|
|
128
|
+
src: C.bundle.image,
|
|
129
129
|
class: "w-full h-full object-contain aspect-video"
|
|
130
|
-
}, null, 8,
|
|
130
|
+
}, null, 8, ht)) : (x(), O(i, {
|
|
131
131
|
key: 0,
|
|
132
132
|
name: "image",
|
|
133
133
|
outline: !0,
|
|
134
134
|
size: "md",
|
|
135
135
|
class: "text-fm-color-neutral-gray-200"
|
|
136
136
|
})),
|
|
137
|
-
|
|
137
|
+
C.bundle.isFeedvibe ? (x(), D("div", xt, [
|
|
138
138
|
r(t, {
|
|
139
139
|
label: "Feedvibe",
|
|
140
140
|
class: "text-fm-color-primary bg-fm-color-system-warning-100",
|
|
141
141
|
compact: ""
|
|
142
142
|
})
|
|
143
143
|
])) : E("", !0),
|
|
144
|
-
V("div",
|
|
145
|
-
r(
|
|
146
|
-
"menu-button":
|
|
147
|
-
r(
|
|
144
|
+
V("div", Ct, [
|
|
145
|
+
r(u, { placement: "bottom-end" }, {
|
|
146
|
+
"menu-button": B(() => [
|
|
147
|
+
r(c, {
|
|
148
148
|
icon: "more_vert",
|
|
149
149
|
variant: "tertiary"
|
|
150
150
|
})
|
|
151
151
|
]),
|
|
152
|
-
default:
|
|
153
|
-
r(
|
|
154
|
-
onClick:
|
|
152
|
+
default: B(() => [
|
|
153
|
+
r(y, {
|
|
154
|
+
onClick: m[0] || (m[0] = (l) => b("edit", C.bundle)),
|
|
155
155
|
icon: "edit",
|
|
156
156
|
label: "Edit"
|
|
157
157
|
}),
|
|
158
|
-
|
|
158
|
+
C.bundle.stripePriceId ? E("", !0) : (x(), O(y, {
|
|
159
159
|
key: 0,
|
|
160
|
-
onClick:
|
|
160
|
+
onClick: m[1] || (m[1] = (l) => b("send", C.bundle)),
|
|
161
161
|
icon: "send",
|
|
162
162
|
label: "Send"
|
|
163
163
|
})),
|
|
164
|
-
r(
|
|
165
|
-
onClick:
|
|
164
|
+
r(y, {
|
|
165
|
+
onClick: m[2] || (m[2] = (l) => b("delete", C.bundle)),
|
|
166
166
|
icon: "delete"
|
|
167
167
|
}, {
|
|
168
|
-
label:
|
|
168
|
+
label: B(() => [...m[3] || (m[3] = [
|
|
169
169
|
V("div", { class: "text-fm-color-typo-error fm-typo-en-body-md-400" }, " Delete ", -1)
|
|
170
170
|
])]),
|
|
171
171
|
_: 1
|
|
@@ -175,10 +175,10 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
175
175
|
})
|
|
176
176
|
])
|
|
177
177
|
]),
|
|
178
|
-
V("div",
|
|
178
|
+
V("div", St, K(C.bundle.name), 1),
|
|
179
179
|
V("div", _t, K(e(s) || "Free"), 1),
|
|
180
|
-
V("div",
|
|
181
|
-
(
|
|
180
|
+
V("div", Ft, [
|
|
181
|
+
(x(!0), D(Y, null, ce(e(v), (l, w) => (x(), O(t, {
|
|
182
182
|
key: w,
|
|
183
183
|
label: l
|
|
184
184
|
}, null, 8, ["label"]))), 128))
|
|
@@ -188,21 +188,21 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
188
188
|
});
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
-
}),
|
|
191
|
+
}), wt = /* @__PURE__ */ te({
|
|
192
192
|
__name: "AddBundleCard",
|
|
193
193
|
emits: ["create"],
|
|
194
|
-
setup(
|
|
195
|
-
const { t:
|
|
194
|
+
setup(C, { emit: S }) {
|
|
195
|
+
const { t: o } = xe(), b = S;
|
|
196
196
|
return (s, v) => {
|
|
197
|
-
const
|
|
198
|
-
return
|
|
197
|
+
const a = _("FmButton"), m = _("FmCard");
|
|
198
|
+
return x(), O(m, {
|
|
199
199
|
variant: "outlined",
|
|
200
200
|
class: "flex flex-col gap-y-8 p-16 h-full min-h-[240px] items-center justify-center"
|
|
201
201
|
}, {
|
|
202
|
-
default:
|
|
203
|
-
r(
|
|
204
|
-
onClick: v[0] || (v[0] = (i) =>
|
|
205
|
-
label: e(
|
|
202
|
+
default: B(() => [
|
|
203
|
+
r(a, {
|
|
204
|
+
onClick: v[0] || (v[0] = (i) => b("create")),
|
|
205
|
+
label: e(o)("connect.store.actions.addBundle"),
|
|
206
206
|
icon: "add",
|
|
207
207
|
variant: "secondary"
|
|
208
208
|
}, null, 8, ["label"])
|
|
@@ -211,7 +211,7 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
211
211
|
});
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
|
-
}),
|
|
214
|
+
}), Pt = { class: "space-y-16" }, Tt = { class: "flex w-full justify-between pb-16" }, kt = { class: "flex items-center justify-end gap-8" }, $t = /* @__PURE__ */ te({
|
|
215
215
|
__name: "CategoryDialog",
|
|
216
216
|
props: {
|
|
217
217
|
action: {
|
|
@@ -223,41 +223,41 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
223
223
|
default: () => ""
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
|
-
setup(
|
|
227
|
-
const { t: S } =
|
|
226
|
+
setup(C) {
|
|
227
|
+
const { t: S } = xe(), o = C, b = je(), { emitData: s, emitAction: v } = Le(), a = N(o.initialValue), m = ee.string().min(1);
|
|
228
228
|
function i() {
|
|
229
|
-
s(
|
|
229
|
+
s(a.value), v("primary"), b.close();
|
|
230
230
|
}
|
|
231
231
|
function t() {
|
|
232
|
-
s(null), v("primary"),
|
|
232
|
+
s(null), v("primary"), b.close();
|
|
233
233
|
}
|
|
234
|
-
return (
|
|
235
|
-
const
|
|
236
|
-
return
|
|
237
|
-
r(
|
|
238
|
-
modelValue: e(
|
|
239
|
-
"onUpdate:modelValue":
|
|
234
|
+
return (c, y) => {
|
|
235
|
+
const u = _("FmTextField"), T = _("FmButton");
|
|
236
|
+
return x(), D("div", Pt, [
|
|
237
|
+
r(u, {
|
|
238
|
+
modelValue: e(a),
|
|
239
|
+
"onUpdate:modelValue": y[0] || (y[0] = (l) => re(a) ? a.value = l : null),
|
|
240
240
|
label: e(S)("connect.store.category.label"),
|
|
241
|
-
rules: [e(Q).toRule(e(
|
|
241
|
+
rules: [e(Q).toRule(e(m))]
|
|
242
242
|
}, null, 8, ["modelValue", "label", "rules"]),
|
|
243
|
-
V("div",
|
|
243
|
+
V("div", Tt, [
|
|
244
244
|
V("div", null, [
|
|
245
|
-
|
|
245
|
+
C.action == "edit" ? (x(), O(T, {
|
|
246
246
|
key: 0,
|
|
247
247
|
onClick: t,
|
|
248
248
|
label: e(S)("connect.common.delete"),
|
|
249
249
|
variant: "destructive"
|
|
250
250
|
}, null, 8, ["label"])) : E("", !0)
|
|
251
251
|
]),
|
|
252
|
-
V("div",
|
|
252
|
+
V("div", kt, [
|
|
253
253
|
r(T, {
|
|
254
254
|
label: e(S)("connect.common.cancel"),
|
|
255
255
|
variant: "tertiary",
|
|
256
|
-
onClick:
|
|
256
|
+
onClick: y[1] || (y[1] = (l) => e(b).close())
|
|
257
257
|
}, null, 8, ["label"]),
|
|
258
258
|
r(T, {
|
|
259
|
-
label:
|
|
260
|
-
disabled: !e(
|
|
259
|
+
label: C.action == "edit" ? e(S)("connect.common.edit") : e(S)("connect.common.add"),
|
|
260
|
+
disabled: !e(a),
|
|
261
261
|
onClick: i
|
|
262
262
|
}, null, 8, ["label", "disabled"])
|
|
263
263
|
])
|
|
@@ -265,26 +265,26 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
265
265
|
]);
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
|
-
}),
|
|
268
|
+
}), Ut = { class: "space-y-16" }, Rt = { class: "flex items-center justify-end gap-8 pb-16" }, It = /* @__PURE__ */ te({
|
|
269
269
|
__name: "SelectCategoryDialog",
|
|
270
|
-
setup(
|
|
271
|
-
const { emitData: S, emitAction:
|
|
272
|
-
() =>
|
|
273
|
-
label:
|
|
274
|
-
value:
|
|
270
|
+
setup(C) {
|
|
271
|
+
const { emitData: S, emitAction: o } = Le(), b = Te(), s = N(), v = L(
|
|
272
|
+
() => b.sortedStoreCategories.map((a, m) => ({
|
|
273
|
+
label: a.name,
|
|
274
|
+
value: m
|
|
275
275
|
}))
|
|
276
276
|
);
|
|
277
|
-
return (
|
|
277
|
+
return (a, m) => {
|
|
278
278
|
const i = _("FmSelect"), t = _("FmButton");
|
|
279
|
-
return
|
|
280
|
-
|
|
279
|
+
return x(), D("div", Ut, [
|
|
280
|
+
m[4] || (m[4] = V("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Select a category to create FeedMe CNY 2025 bundle ", -1)),
|
|
281
281
|
r(i, {
|
|
282
282
|
placeholder: "Select a category",
|
|
283
283
|
items: e(v),
|
|
284
284
|
modelValue: e(s),
|
|
285
285
|
"onUpdate:modelValue": [
|
|
286
|
-
|
|
287
|
-
|
|
286
|
+
m[0] || (m[0] = (c) => re(s) ? s.value = c : null),
|
|
287
|
+
m[1] || (m[1] = (c) => e(S)(c))
|
|
288
288
|
],
|
|
289
289
|
label: "Category"
|
|
290
290
|
}, null, 8, ["items", "modelValue"]),
|
|
@@ -292,11 +292,11 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
292
292
|
r(t, {
|
|
293
293
|
variant: "tertiary",
|
|
294
294
|
label: "Cancel",
|
|
295
|
-
onClick:
|
|
295
|
+
onClick: m[2] || (m[2] = (c) => e(o)("tertiary"))
|
|
296
296
|
}),
|
|
297
297
|
r(t, {
|
|
298
298
|
label: "Select",
|
|
299
|
-
onClick:
|
|
299
|
+
onClick: m[3] || (m[3] = (c) => e(o)("primary")),
|
|
300
300
|
disabled: e(s) == null
|
|
301
301
|
}, null, 8, ["disabled"])
|
|
302
302
|
])
|
|
@@ -304,11 +304,11 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
306
|
});
|
|
307
|
-
function
|
|
308
|
-
return
|
|
307
|
+
function se(C) {
|
|
308
|
+
return C.states.map((S) => ({ label: S, value: S }));
|
|
309
309
|
}
|
|
310
310
|
const Bt = {
|
|
311
|
-
[
|
|
311
|
+
[Se.F_COUNTRY.enum.MY]: {
|
|
312
312
|
states: [
|
|
313
313
|
"Johor",
|
|
314
314
|
"Kedah",
|
|
@@ -328,16 +328,46 @@ const Bt = {
|
|
|
328
328
|
"Terengganu"
|
|
329
329
|
],
|
|
330
330
|
get stateItems() {
|
|
331
|
-
return
|
|
331
|
+
return se(this);
|
|
332
332
|
}
|
|
333
333
|
},
|
|
334
|
-
[
|
|
334
|
+
[Se.F_COUNTRY.enum.SG]: {
|
|
335
335
|
states: [],
|
|
336
336
|
get stateItems() {
|
|
337
|
-
return
|
|
337
|
+
return se(this);
|
|
338
338
|
}
|
|
339
339
|
},
|
|
340
|
-
|
|
340
|
+
JP: {
|
|
341
|
+
states: [],
|
|
342
|
+
get stateItems() {
|
|
343
|
+
return se(this);
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
AE: {
|
|
347
|
+
states: [],
|
|
348
|
+
get stateItems() {
|
|
349
|
+
return se(this);
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
AU: {
|
|
353
|
+
states: [],
|
|
354
|
+
get stateItems() {
|
|
355
|
+
return se(this);
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
MO: {
|
|
359
|
+
states: [],
|
|
360
|
+
get stateItems() {
|
|
361
|
+
return se(this);
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
VN: {
|
|
365
|
+
states: [],
|
|
366
|
+
get stateItems() {
|
|
367
|
+
return se(this);
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
[Se.F_COUNTRY.enum.ID]: {
|
|
341
371
|
states: [
|
|
342
372
|
"Aceh",
|
|
343
373
|
"Bali",
|
|
@@ -374,10 +404,10 @@ const Bt = {
|
|
|
374
404
|
"West Sumatra"
|
|
375
405
|
],
|
|
376
406
|
get stateItems() {
|
|
377
|
-
return
|
|
407
|
+
return se(this);
|
|
378
408
|
}
|
|
379
409
|
},
|
|
380
|
-
[
|
|
410
|
+
[Se.F_COUNTRY.enum.TH]: {
|
|
381
411
|
states: [
|
|
382
412
|
"Bangkok",
|
|
383
413
|
"Amnat Charoen",
|
|
@@ -458,43 +488,43 @@ const Bt = {
|
|
|
458
488
|
"Yasothon"
|
|
459
489
|
],
|
|
460
490
|
get stateItems() {
|
|
461
|
-
return
|
|
491
|
+
return se(this);
|
|
462
492
|
}
|
|
463
493
|
}
|
|
464
|
-
},
|
|
494
|
+
}, be = () => A.Config.getCountry(), ve = {
|
|
465
495
|
get fullCurrency() {
|
|
466
|
-
return
|
|
496
|
+
return be().currency;
|
|
467
497
|
},
|
|
468
498
|
get currency() {
|
|
469
|
-
return
|
|
499
|
+
return be().currency.code;
|
|
470
500
|
},
|
|
471
501
|
get fullTax() {
|
|
472
|
-
return A.Country.getCountryFlattenTaxes(
|
|
502
|
+
return A.Country.getCountryFlattenTaxes(be().code);
|
|
473
503
|
},
|
|
474
504
|
get taxSystem() {
|
|
475
|
-
return
|
|
505
|
+
return be().taxSystems;
|
|
476
506
|
},
|
|
477
|
-
taxInclusion(
|
|
478
|
-
return
|
|
507
|
+
taxInclusion(C) {
|
|
508
|
+
return ve.taxSystem.map((S) => ({
|
|
479
509
|
systemCode: S.code,
|
|
480
|
-
inclusive:
|
|
510
|
+
inclusive: C !== void 0 ? C : !1
|
|
481
511
|
}));
|
|
482
512
|
},
|
|
483
513
|
groupedTaxOptions() {
|
|
484
|
-
const
|
|
485
|
-
return
|
|
514
|
+
const C = A.Country.getCountryFlattenTaxes(be().code);
|
|
515
|
+
return ve.taxSystem.map((S) => ({
|
|
486
516
|
code: S.code,
|
|
487
|
-
options:
|
|
517
|
+
options: C.map((o) => ({ ...o, feedmeTaxCode: ve.generateCode(o) })).filter((o) => o.systemCode === S.code)
|
|
488
518
|
}));
|
|
489
519
|
},
|
|
490
|
-
systemDefaultCode(
|
|
491
|
-
const S =
|
|
492
|
-
return S == null ? void 0 : S.options.find((
|
|
520
|
+
systemDefaultCode(C) {
|
|
521
|
+
const S = ve.groupedTaxOptions().find((o) => o.code === C);
|
|
522
|
+
return S == null ? void 0 : S.options.find((o) => o.default);
|
|
493
523
|
},
|
|
494
|
-
generateCode(
|
|
495
|
-
return `${
|
|
524
|
+
generateCode(C) {
|
|
525
|
+
return `${C.systemCode}/${C.taxCode}`;
|
|
496
526
|
}
|
|
497
|
-
}, W =
|
|
527
|
+
}, W = ve, Nt = /* @__PURE__ */ te({
|
|
498
528
|
__name: "TaxInclusiveSetting",
|
|
499
529
|
props: {
|
|
500
530
|
modelValue: {
|
|
@@ -504,54 +534,54 @@ const Bt = {
|
|
|
504
534
|
}
|
|
505
535
|
},
|
|
506
536
|
emits: ["update:model-value"],
|
|
507
|
-
setup(
|
|
508
|
-
const
|
|
509
|
-
function
|
|
510
|
-
const
|
|
511
|
-
T >= 0 ?
|
|
512
|
-
systemCode:
|
|
513
|
-
inclusive:
|
|
514
|
-
}), v.value =
|
|
537
|
+
setup(C, { emit: S }) {
|
|
538
|
+
const o = C, b = W.taxSystem, s = S, v = N(o.modelValue);
|
|
539
|
+
function a(c, y) {
|
|
540
|
+
const u = ae.clone(o.modelValue), T = u.findIndex((l) => l.systemCode === c);
|
|
541
|
+
T >= 0 ? u[T].inclusive = y : u.push({
|
|
542
|
+
systemCode: c,
|
|
543
|
+
inclusive: y
|
|
544
|
+
}), v.value = u, s("update:model-value", u);
|
|
515
545
|
}
|
|
516
|
-
function
|
|
517
|
-
return
|
|
518
|
-
const
|
|
546
|
+
function m() {
|
|
547
|
+
return b.map((c) => {
|
|
548
|
+
const y = o.modelValue ? o.modelValue.find((u) => u.systemCode === c.code) : !1;
|
|
519
549
|
return {
|
|
520
|
-
label:
|
|
550
|
+
label: c.name,
|
|
521
551
|
config: {
|
|
522
|
-
value:
|
|
552
|
+
value: y ? y.inclusive : !1
|
|
523
553
|
},
|
|
524
|
-
input: (
|
|
525
|
-
|
|
554
|
+
input: (u) => {
|
|
555
|
+
a(c.code, u);
|
|
526
556
|
}
|
|
527
557
|
};
|
|
528
558
|
});
|
|
529
559
|
}
|
|
530
|
-
const i =
|
|
531
|
-
function t(
|
|
532
|
-
return `${
|
|
560
|
+
const i = ze(m());
|
|
561
|
+
function t(c, y) {
|
|
562
|
+
return `${c} ${y ? "Inclusive" : "Exclusive"}`;
|
|
533
563
|
}
|
|
534
|
-
return
|
|
535
|
-
|
|
564
|
+
return he(() => {
|
|
565
|
+
o.modelValue.length || a(b[0].code, !1);
|
|
536
566
|
}), Pe(
|
|
537
|
-
() =>
|
|
538
|
-
(
|
|
539
|
-
|
|
567
|
+
() => o.modelValue,
|
|
568
|
+
(c, y) => {
|
|
569
|
+
c != y && !c.length && a(b[0].code, !1);
|
|
540
570
|
}
|
|
541
|
-
), (
|
|
542
|
-
const
|
|
543
|
-
return
|
|
571
|
+
), (c, y) => {
|
|
572
|
+
const u = _("FmSwitch");
|
|
573
|
+
return x(!0), D(Y, null, ce(e(i), (T, l) => {
|
|
544
574
|
var w;
|
|
545
|
-
return
|
|
546
|
-
r(
|
|
575
|
+
return x(), D("div", { key: l }, [
|
|
576
|
+
r(u, {
|
|
547
577
|
"model-value": ((w = e(v)[l]) == null ? void 0 : w.inclusive) || !1,
|
|
548
578
|
"label-placement": "left",
|
|
549
|
-
"onUpdate:modelValue": (
|
|
579
|
+
"onUpdate:modelValue": (U) => T.input(U)
|
|
550
580
|
}, {
|
|
551
|
-
label:
|
|
552
|
-
var
|
|
581
|
+
label: B(() => {
|
|
582
|
+
var U;
|
|
553
583
|
return [
|
|
554
|
-
V("div", null, K(t(T.label, ((
|
|
584
|
+
V("div", null, K(t(T.label, ((U = e(v)[l]) == null ? void 0 : U.inclusive) || !1)), 1)
|
|
555
585
|
];
|
|
556
586
|
}),
|
|
557
587
|
_: 2
|
|
@@ -561,44 +591,44 @@ const Bt = {
|
|
|
561
591
|
};
|
|
562
592
|
}
|
|
563
593
|
});
|
|
564
|
-
var
|
|
565
|
-
const
|
|
594
|
+
var Dt = { mode: "production", appMode: "mf" };
|
|
595
|
+
const Ot = { class: "space-y-8" }, Mt = {
|
|
566
596
|
key: 0,
|
|
567
597
|
class: "space-y-16"
|
|
568
|
-
},
|
|
598
|
+
}, At = /* @__PURE__ */ te({
|
|
569
599
|
__name: "StripeSetting",
|
|
570
600
|
props: {
|
|
571
601
|
modelValue: {}
|
|
572
602
|
},
|
|
573
603
|
emits: ["update:modelValue"],
|
|
574
|
-
setup(
|
|
575
|
-
const
|
|
576
|
-
Pe(s, (
|
|
577
|
-
|
|
604
|
+
setup(C, { emit: S }) {
|
|
605
|
+
const o = C, b = S, s = N(!1);
|
|
606
|
+
Pe(s, (a, m) => {
|
|
607
|
+
m != a && (!o.modelValue && a ? b("update:modelValue", {
|
|
578
608
|
apiKey: "",
|
|
579
609
|
webhookSecret: ""
|
|
580
|
-
}) :
|
|
610
|
+
}) : a || b("update:modelValue", void 0));
|
|
581
611
|
});
|
|
582
612
|
const v = L(() => {
|
|
583
|
-
const
|
|
584
|
-
return `https://marketing${
|
|
613
|
+
const a = Dt.mode === "development", m = A.Config.getCountry().code.toLowerCase(), i = m != "my" ? `.${m}` : "";
|
|
614
|
+
return `https://marketing${a ? "-dev" : ""}${i}.feedmeapi.com/stripe/${Qe.getBusinessId()}/webhook`;
|
|
585
615
|
});
|
|
586
|
-
return
|
|
587
|
-
s.value = !!
|
|
588
|
-
}), (
|
|
589
|
-
const i = _("FmSwitch"), t = _("FmTextField"),
|
|
590
|
-
return
|
|
616
|
+
return he(() => {
|
|
617
|
+
s.value = !!o.modelValue;
|
|
618
|
+
}), (a, m) => {
|
|
619
|
+
const i = _("FmSwitch"), t = _("FmTextField"), c = _("FmButton");
|
|
620
|
+
return x(), D("div", Ot, [
|
|
591
621
|
r(i, {
|
|
592
622
|
modelValue: e(s),
|
|
593
|
-
"onUpdate:modelValue":
|
|
623
|
+
"onUpdate:modelValue": m[0] || (m[0] = (y) => re(s) ? s.value = y : null),
|
|
594
624
|
value: "true",
|
|
595
625
|
label: "Enable Stripe"
|
|
596
626
|
}, null, 8, ["modelValue"]),
|
|
597
|
-
|
|
627
|
+
o.modelValue ? (x(), D("div", Mt, [
|
|
598
628
|
r(t, {
|
|
599
629
|
label: "API Key",
|
|
600
|
-
modelValue:
|
|
601
|
-
"onUpdate:modelValue":
|
|
630
|
+
modelValue: o.modelValue.apiKey,
|
|
631
|
+
"onUpdate:modelValue": m[1] || (m[1] = (y) => o.modelValue.apiKey = y),
|
|
602
632
|
"helper-text": "Go to Stripe Dashboard get your API Key and paste here."
|
|
603
633
|
}, null, 8, ["modelValue"]),
|
|
604
634
|
r(t, {
|
|
@@ -607,18 +637,18 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
607
637
|
readonly: "",
|
|
608
638
|
"helper-text": "Copy this URL to your Stripe dashboard"
|
|
609
639
|
}, {
|
|
610
|
-
append:
|
|
611
|
-
r(
|
|
640
|
+
append: B(() => [
|
|
641
|
+
r(c, {
|
|
612
642
|
icon: "content_copy",
|
|
613
643
|
variant: "tertiary",
|
|
614
|
-
onClick:
|
|
644
|
+
onClick: m[2] || (m[2] = (y) => e(st)(e(v)))
|
|
615
645
|
})
|
|
616
646
|
]),
|
|
617
647
|
_: 1
|
|
618
648
|
}, 8, ["model-value"]),
|
|
619
649
|
r(t, {
|
|
620
|
-
modelValue:
|
|
621
|
-
"onUpdate:modelValue":
|
|
650
|
+
modelValue: o.modelValue.webhookSecret,
|
|
651
|
+
"onUpdate:modelValue": m[3] || (m[3] = (y) => o.modelValue.webhookSecret = y),
|
|
622
652
|
label: "Webhook Secret",
|
|
623
653
|
"helper-text": `Copy the webhook signing secret from your Stripe account and paste
|
|
624
654
|
here.`
|
|
@@ -627,21 +657,21 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
627
657
|
]);
|
|
628
658
|
};
|
|
629
659
|
}
|
|
630
|
-
}),
|
|
660
|
+
}), Et = {
|
|
631
661
|
key: 0,
|
|
632
662
|
class: "space-y-16 pr-12"
|
|
633
|
-
},
|
|
663
|
+
}, jt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Lt = {
|
|
634
664
|
key: 1,
|
|
635
665
|
class: "space-y-16"
|
|
636
|
-
},
|
|
666
|
+
}, Kt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Ht = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, qt = { class: "grid grid-cols-2 gap-x-16 gap-y-16" }, Wt = { class: "space-y-4" }, Yt = { class: "fm-typo-en-body-lg-400" }, zt = { class: "space-y-16" }, Jt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Gt = { class: "flex items-center gap-8" }, Xt = /* @__PURE__ */ te({
|
|
637
667
|
__name: "StoreSettingSheet",
|
|
638
668
|
emits: ["update"],
|
|
639
|
-
setup(
|
|
640
|
-
const { t:
|
|
641
|
-
company:
|
|
669
|
+
setup(C, { expose: S, emit: o }) {
|
|
670
|
+
const { t: b } = xe(), s = o, v = N(!1), a = N(), m = N(!1), i = et.extend({
|
|
671
|
+
company: tt.extend({
|
|
642
672
|
name: ee.string().min(1, "Company name is required"),
|
|
643
673
|
regNo: ee.string().min(1, "Registration number is required"),
|
|
644
|
-
address:
|
|
674
|
+
address: nt.extend({
|
|
645
675
|
line1: ee.string().min(1, "Line 1 is required"),
|
|
646
676
|
line2: ee.string().optional(),
|
|
647
677
|
state: ee.string().min(1, "State is required"),
|
|
@@ -652,12 +682,12 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
652
682
|
phoneNo: ee.string().min(1, "Phone number is required"),
|
|
653
683
|
sstRegNo: ee.string().optional()
|
|
654
684
|
})
|
|
655
|
-
}), t = L(() => i.safeParse(
|
|
656
|
-
function
|
|
657
|
-
const T = i.safeParse(
|
|
685
|
+
}), t = L(() => i.safeParse(a.value).success);
|
|
686
|
+
function c() {
|
|
687
|
+
const T = i.safeParse(a.value);
|
|
658
688
|
T.success && s("update", T.data);
|
|
659
689
|
}
|
|
660
|
-
function
|
|
690
|
+
function y() {
|
|
661
691
|
return {
|
|
662
692
|
company: {
|
|
663
693
|
name: "",
|
|
@@ -676,135 +706,135 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
676
706
|
inclusiveTaxes: []
|
|
677
707
|
};
|
|
678
708
|
}
|
|
679
|
-
function
|
|
680
|
-
v.value = T, T && (
|
|
709
|
+
function u(T, l) {
|
|
710
|
+
v.value = T, T && (a.value = l != null && l.company ? ae.cloneDeep(l) : y());
|
|
681
711
|
}
|
|
682
712
|
return S({
|
|
683
|
-
showSheet:
|
|
684
|
-
data:
|
|
713
|
+
showSheet: u,
|
|
714
|
+
data: a
|
|
685
715
|
}), (T, l) => {
|
|
686
|
-
const w = _("FmIcon"),
|
|
687
|
-
return
|
|
716
|
+
const w = _("FmIcon"), U = _("FmMenuItem"), j = _("FmMenu"), ne = _("FmSelect"), Z = _("FmButton"), H = _("FmSideSheet");
|
|
717
|
+
return x(), O(H, {
|
|
688
718
|
"max-width": 560,
|
|
689
719
|
modelValue: e(v),
|
|
690
|
-
"onUpdate:modelValue": l[15] || (l[15] = (z) =>
|
|
691
|
-
header: e(
|
|
720
|
+
"onUpdate:modelValue": l[15] || (l[15] = (z) => re(v) ? v.value = z : null),
|
|
721
|
+
header: e(b)("connect.store.setting.title")
|
|
692
722
|
}, {
|
|
693
|
-
"side-sheet-footer":
|
|
694
|
-
V("div",
|
|
723
|
+
"side-sheet-footer": B(() => [
|
|
724
|
+
V("div", Gt, [
|
|
695
725
|
r(Z, {
|
|
696
|
-
label: e(
|
|
697
|
-
onClick:
|
|
698
|
-
disabled: !e(t) || e(
|
|
699
|
-
loading: e(
|
|
726
|
+
label: e(b)("connect.common.save"),
|
|
727
|
+
onClick: c,
|
|
728
|
+
disabled: !e(t) || e(_e)().isLoading,
|
|
729
|
+
loading: e(_e)().isLoading
|
|
700
730
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
701
731
|
r(Z, {
|
|
702
|
-
label: e(
|
|
703
|
-
onClick: l[14] || (l[14] = (z) =>
|
|
732
|
+
label: e(b)("connect.common.cancel"),
|
|
733
|
+
onClick: l[14] || (l[14] = (z) => u(!1)),
|
|
704
734
|
variant: "tertiary"
|
|
705
735
|
}, null, 8, ["label"])
|
|
706
736
|
])
|
|
707
737
|
]),
|
|
708
|
-
default:
|
|
738
|
+
default: B(() => {
|
|
709
739
|
var z, oe;
|
|
710
740
|
return [
|
|
711
|
-
r(ke, { json: e(
|
|
712
|
-
e(
|
|
713
|
-
V("div",
|
|
741
|
+
r(ke, { json: e(a) }, null, 8, ["json"]),
|
|
742
|
+
e(a) && e(a).company ? (x(), D("div", Et, [
|
|
743
|
+
V("div", jt, K(e(b)("connect.store.setting.company.legal_info")), 1),
|
|
714
744
|
r(le, {
|
|
715
|
-
modelValue: e(
|
|
716
|
-
"onUpdate:modelValue": l[0] || (l[0] = (F) => e(
|
|
717
|
-
label: e(
|
|
745
|
+
modelValue: e(a).company.name,
|
|
746
|
+
"onUpdate:modelValue": l[0] || (l[0] = (F) => e(a).company.name = F),
|
|
747
|
+
label: e(b)("connect.store.setting.company.name"),
|
|
718
748
|
schema: e(Q).typeAtPath(e(i), "company.name")
|
|
719
749
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
720
750
|
r(le, {
|
|
721
|
-
modelValue: e(
|
|
722
|
-
"onUpdate:modelValue": l[1] || (l[1] = (F) => e(
|
|
723
|
-
label: e(
|
|
751
|
+
modelValue: e(a).company.regNo,
|
|
752
|
+
"onUpdate:modelValue": l[1] || (l[1] = (F) => e(a).company.regNo = F),
|
|
753
|
+
label: e(b)("connect.store.setting.company.reg_no"),
|
|
724
754
|
schema: e(Q).typeAtPath(e(i), "company.regNo")
|
|
725
755
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
726
|
-
e(A.Config).getCountry().taxSystems.length ? (
|
|
756
|
+
e(A.Config).getCountry().taxSystems.length ? (x(), O(le, {
|
|
727
757
|
key: 0,
|
|
728
|
-
modelValue: e(
|
|
758
|
+
modelValue: e(a).company.sstRegNo,
|
|
729
759
|
"onUpdate:modelValue": [
|
|
730
|
-
l[2] || (l[2] = (F) => e(
|
|
731
|
-
l[3] || (l[3] = (F) => F ? null : e(
|
|
760
|
+
l[2] || (l[2] = (F) => e(a).company.sstRegNo = F),
|
|
761
|
+
l[3] || (l[3] = (F) => F ? null : e(a).inclusiveTaxes = [])
|
|
732
762
|
],
|
|
733
|
-
label: e(
|
|
763
|
+
label: e(b)("connect.store.setting.company.tax_reg_no"),
|
|
734
764
|
schema: e(Q).typeAtPath(e(i), "company.sstRegNo")
|
|
735
765
|
}, null, 8, ["modelValue", "label", "schema"])) : E("", !0),
|
|
736
|
-
(z = e(
|
|
737
|
-
V("div",
|
|
766
|
+
(z = e(a).company) != null && z.sstRegNo && e(a).inclusiveTaxes ? (x(), D("div", Lt, [
|
|
767
|
+
V("div", Kt, K(e(b)("connect.store.setting.company.tax")), 1),
|
|
738
768
|
r(Nt, {
|
|
739
|
-
modelValue: e(
|
|
740
|
-
"onUpdate:modelValue": l[4] || (l[4] = (F) => e(
|
|
769
|
+
modelValue: e(a).inclusiveTaxes,
|
|
770
|
+
"onUpdate:modelValue": l[4] || (l[4] = (F) => e(a).inclusiveTaxes = F)
|
|
741
771
|
}, null, 8, ["modelValue"])
|
|
742
772
|
])) : E("", !0),
|
|
743
773
|
r(le, {
|
|
744
|
-
modelValue: e(
|
|
745
|
-
"onUpdate:modelValue": l[5] || (l[5] = (F) => e(
|
|
746
|
-
label: e(
|
|
774
|
+
modelValue: e(a).company.phoneNo,
|
|
775
|
+
"onUpdate:modelValue": l[5] || (l[5] = (F) => e(a).company.phoneNo = F),
|
|
776
|
+
label: e(b)("connect.store.setting.company.phone"),
|
|
747
777
|
schema: e(Q).typeAtPath(e(i), "company.phoneNo")
|
|
748
778
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
749
|
-
V("div",
|
|
779
|
+
V("div", Ht, K(e(b)("connect.store.setting.company.address.title")), 1),
|
|
750
780
|
r(le, {
|
|
751
|
-
modelValue: e(
|
|
752
|
-
"onUpdate:modelValue": l[6] || (l[6] = (F) => e(
|
|
753
|
-
label: e(
|
|
781
|
+
modelValue: e(a).company.address.line1,
|
|
782
|
+
"onUpdate:modelValue": l[6] || (l[6] = (F) => e(a).company.address.line1 = F),
|
|
783
|
+
label: e(b)("connect.store.setting.company.address.line1"),
|
|
754
784
|
schema: e(Q).typeAtPath(e(i), "company.address.line1")
|
|
755
785
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
756
786
|
r(le, {
|
|
757
|
-
modelValue: e(
|
|
758
|
-
"onUpdate:modelValue": l[7] || (l[7] = (F) => e(
|
|
759
|
-
label: e(
|
|
787
|
+
modelValue: e(a).company.address.line2,
|
|
788
|
+
"onUpdate:modelValue": l[7] || (l[7] = (F) => e(a).company.address.line2 = F),
|
|
789
|
+
label: e(b)("connect.store.setting.company.address.line2"),
|
|
760
790
|
schema: e(Q).typeAtPath(e(i), "company.address.line2")
|
|
761
791
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
762
|
-
V("div",
|
|
792
|
+
V("div", qt, [
|
|
763
793
|
r(le, {
|
|
764
|
-
modelValue: e(
|
|
765
|
-
"onUpdate:modelValue": l[8] || (l[8] = (F) => e(
|
|
766
|
-
label: e(
|
|
794
|
+
modelValue: e(a).company.address.city,
|
|
795
|
+
"onUpdate:modelValue": l[8] || (l[8] = (F) => e(a).company.address.city = F),
|
|
796
|
+
label: e(b)("connect.store.setting.company.address.city"),
|
|
767
797
|
schema: e(Q).typeAtPath(e(i), "company.address.city")
|
|
768
798
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
769
799
|
r(le, {
|
|
770
|
-
modelValue: e(
|
|
771
|
-
"onUpdate:modelValue": l[9] || (l[9] = (F) => e(
|
|
772
|
-
label: e(
|
|
800
|
+
modelValue: e(a).company.address.postcode,
|
|
801
|
+
"onUpdate:modelValue": l[9] || (l[9] = (F) => e(a).company.address.postcode = F),
|
|
802
|
+
label: e(b)("connect.store.setting.company.address.postcode"),
|
|
773
803
|
schema: e(Q).typeAtPath(e(i), "company.address.postcode")
|
|
774
804
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
775
|
-
V("div",
|
|
776
|
-
V("div",
|
|
805
|
+
V("div", Wt, [
|
|
806
|
+
V("div", Yt, K(e(b)("connect.store.setting.company.address.state")), 1),
|
|
777
807
|
r(j, {
|
|
778
808
|
placement: "top-end",
|
|
779
|
-
"model-value": e(
|
|
809
|
+
"model-value": e(m)
|
|
780
810
|
}, {
|
|
781
|
-
"menu-button":
|
|
811
|
+
"menu-button": B(() => [
|
|
782
812
|
r(le, {
|
|
783
|
-
modelValue: e(
|
|
784
|
-
"onUpdate:modelValue": l[10] || (l[10] = (F) => e(
|
|
813
|
+
modelValue: e(a).company.address.state,
|
|
814
|
+
"onUpdate:modelValue": l[10] || (l[10] = (F) => e(a).company.address.state = F),
|
|
785
815
|
schema: e(Q).typeAtPath(e(i), "company.address.state"),
|
|
786
|
-
onFocusChanged: l[11] || (l[11] = (F) =>
|
|
816
|
+
onFocusChanged: l[11] || (l[11] = (F) => m.value = F)
|
|
787
817
|
}, {
|
|
788
|
-
append:
|
|
818
|
+
append: B(() => [
|
|
789
819
|
r(w, {
|
|
790
|
-
name: e(
|
|
820
|
+
name: e(m) ? "keyboard_arrow_up" : "keyboard_arrow_down"
|
|
791
821
|
}, null, 8, ["name"])
|
|
792
822
|
]),
|
|
793
823
|
_: 1
|
|
794
824
|
}, 8, ["modelValue", "schema"])
|
|
795
825
|
]),
|
|
796
|
-
default:
|
|
797
|
-
(
|
|
826
|
+
default: B(() => [
|
|
827
|
+
(x(!0), D(Y, null, ce(e(Bt)[e(A.Config).getCountry().code].stateItems.filter(
|
|
798
828
|
(F) => {
|
|
799
|
-
var
|
|
800
|
-
return F.label.toLowerCase().includes(((
|
|
829
|
+
var ie, g;
|
|
830
|
+
return F.label.toLowerCase().includes(((g = (ie = e(a)) == null ? void 0 : ie.company) == null ? void 0 : g.address.state.toLowerCase()) ?? "");
|
|
801
831
|
}
|
|
802
|
-
) || [], (F) => (
|
|
832
|
+
) || [], (F) => (x(), O(U, {
|
|
803
833
|
key: F.value,
|
|
804
|
-
"model-value": e(
|
|
834
|
+
"model-value": e(a).company.address.state === F.value,
|
|
805
835
|
label: F.label,
|
|
806
836
|
onClick: () => {
|
|
807
|
-
e(
|
|
837
|
+
e(a).company.address.state = F.value, m.value = !1;
|
|
808
838
|
}
|
|
809
839
|
}, null, 8, ["model-value", "label", "onClick"]))), 128))
|
|
810
840
|
]),
|
|
@@ -812,9 +842,9 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
812
842
|
}, 8, ["model-value"])
|
|
813
843
|
]),
|
|
814
844
|
r(ne, {
|
|
815
|
-
label: e(
|
|
816
|
-
modelValue: e(
|
|
817
|
-
"onUpdate:modelValue": l[12] || (l[12] = (F) => e(
|
|
845
|
+
label: e(b)("connect.store.setting.company.address.country"),
|
|
846
|
+
modelValue: e(a).company.address.country,
|
|
847
|
+
"onUpdate:modelValue": l[12] || (l[12] = (F) => e(a).company.address.country = F),
|
|
818
848
|
items: [
|
|
819
849
|
{
|
|
820
850
|
label: e(A.Config).getCountry().name,
|
|
@@ -824,11 +854,11 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
824
854
|
rules: [e(Q).ruleAtPath(e(i), "company.address.country")]
|
|
825
855
|
}, null, 8, ["label", "modelValue", "items", "rules"])
|
|
826
856
|
]),
|
|
827
|
-
V("div",
|
|
828
|
-
V("div",
|
|
829
|
-
r(
|
|
830
|
-
"model-value": (oe = e(
|
|
831
|
-
"onUpdate:modelValue": l[13] || (l[13] = (F) => e(
|
|
857
|
+
V("div", zt, [
|
|
858
|
+
V("div", Jt, K(e(b)("connect.store.setting.stripe.title")), 1),
|
|
859
|
+
r(At, {
|
|
860
|
+
"model-value": (oe = e(a)) == null ? void 0 : oe.stripe,
|
|
861
|
+
"onUpdate:modelValue": l[13] || (l[13] = (F) => e(a).stripe = F)
|
|
832
862
|
}, null, 8, ["model-value"])
|
|
833
863
|
])
|
|
834
864
|
])) : E("", !0)
|
|
@@ -839,10 +869,10 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
839
869
|
};
|
|
840
870
|
}
|
|
841
871
|
});
|
|
842
|
-
function
|
|
843
|
-
return A.DineroFactory(
|
|
872
|
+
function Zt(C, S = !0) {
|
|
873
|
+
return A.DineroFactory(C).toFormat(S);
|
|
844
874
|
}
|
|
845
|
-
const
|
|
875
|
+
const Qt = /* @__PURE__ */ te({
|
|
846
876
|
__name: "TaxVariantSetting",
|
|
847
877
|
props: {
|
|
848
878
|
modelValue: {
|
|
@@ -852,15 +882,15 @@ const Zt = /* @__PURE__ */ te({
|
|
|
852
882
|
}
|
|
853
883
|
},
|
|
854
884
|
emits: ["update:modelValue"],
|
|
855
|
-
setup(
|
|
856
|
-
const
|
|
857
|
-
|
|
858
|
-
if (
|
|
859
|
-
const t = v.value.reduce((
|
|
860
|
-
const
|
|
861
|
-
if (!
|
|
862
|
-
const { systemCode: T, taxCode: l } =
|
|
863
|
-
return
|
|
885
|
+
setup(C, { emit: S }) {
|
|
886
|
+
const o = C, b = S;
|
|
887
|
+
he(() => {
|
|
888
|
+
if (a.value.length !== v.value.length) {
|
|
889
|
+
const t = v.value.reduce((c, y) => {
|
|
890
|
+
const u = W.systemDefaultCode(y.name);
|
|
891
|
+
if (!u) return c;
|
|
892
|
+
const { systemCode: T, taxCode: l } = u;
|
|
893
|
+
return y.value || c.push({ systemCode: T, taxCode: l }), c;
|
|
864
894
|
}, []);
|
|
865
895
|
i(t);
|
|
866
896
|
}
|
|
@@ -870,50 +900,50 @@ const Zt = /* @__PURE__ */ te({
|
|
|
870
900
|
}
|
|
871
901
|
const v = L(() => s().map((t) => ({
|
|
872
902
|
name: t.code,
|
|
873
|
-
value: (
|
|
874
|
-
(
|
|
903
|
+
value: (a.value || []).find(
|
|
904
|
+
(c) => t.options.some((y) => y.feedmeTaxCode === c)
|
|
875
905
|
),
|
|
876
|
-
options: t.options.map((
|
|
877
|
-
label: `${
|
|
878
|
-
value:
|
|
906
|
+
options: t.options.map((c) => ({
|
|
907
|
+
label: `${c.name} (${pt(c.rate)}%)`,
|
|
908
|
+
value: c.feedmeTaxCode
|
|
879
909
|
}))
|
|
880
|
-
}))),
|
|
881
|
-
function
|
|
882
|
-
const
|
|
910
|
+
}))), a = L(() => o.modelValue.map((t) => W.generateCode(t)));
|
|
911
|
+
function m(t) {
|
|
912
|
+
const c = s().find(
|
|
883
913
|
(l) => l.options.some((w) => w.feedmeTaxCode === t)
|
|
884
|
-
),
|
|
885
|
-
if (!
|
|
886
|
-
const { systemCode:
|
|
887
|
-
i([{ systemCode:
|
|
914
|
+
), y = c == null ? void 0 : c.options.find((l) => l.feedmeTaxCode === t);
|
|
915
|
+
if (!y) return;
|
|
916
|
+
const { systemCode: u, taxCode: T } = y;
|
|
917
|
+
i([{ systemCode: u, taxCode: T }]);
|
|
888
918
|
}
|
|
889
919
|
function i(t) {
|
|
890
|
-
const
|
|
891
|
-
t.forEach((
|
|
892
|
-
const
|
|
893
|
-
(w) => w.options.some((
|
|
894
|
-
), T = (
|
|
895
|
-
(w) => T.some((
|
|
920
|
+
const c = ae.clone(o.modelValue);
|
|
921
|
+
t.forEach((y) => {
|
|
922
|
+
const u = s().find(
|
|
923
|
+
(w) => w.options.some((U) => U.feedmeTaxCode === W.generateCode(y))
|
|
924
|
+
), T = (u == null ? void 0 : u.options) || [], l = c.findIndex(
|
|
925
|
+
(w) => T.some((U) => W.generateCode(U) === W.generateCode(w))
|
|
896
926
|
);
|
|
897
|
-
l >= 0 ?
|
|
898
|
-
}),
|
|
927
|
+
l >= 0 ? c.splice(l, 1, y) : c.push(y);
|
|
928
|
+
}), b("update:modelValue", c);
|
|
899
929
|
}
|
|
900
|
-
return (t,
|
|
901
|
-
const
|
|
902
|
-
return
|
|
930
|
+
return (t, c) => {
|
|
931
|
+
const y = _("FmRadio"), u = _("FmRadioGroup");
|
|
932
|
+
return x(!0), D(Y, null, ce(e(v), (T) => (x(), D("div", {
|
|
903
933
|
key: T.name,
|
|
904
934
|
class: "flex items-start"
|
|
905
935
|
}, [
|
|
906
|
-
r(
|
|
936
|
+
r(u, {
|
|
907
937
|
modelValue: T.value,
|
|
908
938
|
"onUpdate:modelValue": [
|
|
909
939
|
(l) => T.value = l,
|
|
910
|
-
|
|
911
|
-
|
|
940
|
+
c[0] || (c[0] = (l) => {
|
|
941
|
+
m(l);
|
|
912
942
|
})
|
|
913
943
|
]
|
|
914
944
|
}, {
|
|
915
|
-
default:
|
|
916
|
-
(
|
|
945
|
+
default: B(() => [
|
|
946
|
+
(x(!0), D(Y, null, ce(T.options, (l, w) => (x(), O(y, {
|
|
917
947
|
key: w,
|
|
918
948
|
value: l.value,
|
|
919
949
|
label: l.label
|
|
@@ -946,78 +976,78 @@ const Zt = /* @__PURE__ */ te({
|
|
|
946
976
|
taxes: [],
|
|
947
977
|
taxTotals: [],
|
|
948
978
|
internal: !1,
|
|
949
|
-
priceWithTaxes:
|
|
950
|
-
},
|
|
979
|
+
priceWithTaxes: ct()
|
|
980
|
+
}, en = {
|
|
951
981
|
key: 0,
|
|
952
982
|
class: "space-y-24 pr-12"
|
|
953
|
-
},
|
|
983
|
+
}, tn = { class: "space-y-8" }, nn = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, on = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, an = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, ln = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, sn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary !mb-[-16px]" }, rn = { class: "space-y-8" }, dn = { class: "flex items-center justify-between" }, un = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, cn = { class: "space-y-8" }, mn = { class: "flex items-center gap-8" }, pn = /* @__PURE__ */ te({
|
|
954
984
|
__name: "EditBundleSheet",
|
|
955
985
|
emits: ["update"],
|
|
956
|
-
setup(
|
|
957
|
-
const
|
|
986
|
+
setup(C, { expose: S, emit: o }) {
|
|
987
|
+
const b = o, { t: s } = xe(), v = Te(), a = N(!1), m = N([]), i = N({
|
|
958
988
|
category: 0,
|
|
959
989
|
index: -1,
|
|
960
990
|
originalCategoryIndex: void 0
|
|
961
|
-
}), t =
|
|
962
|
-
const
|
|
963
|
-
return
|
|
991
|
+
}), t = N(ae.cloneDeep(we)), c = N(), y = Ae, u = L(() => {
|
|
992
|
+
const d = y.safeParse(t.value);
|
|
993
|
+
return d.success ? [] : d.error.errors;
|
|
964
994
|
}), T = [
|
|
965
995
|
{
|
|
966
996
|
header: "Reward title",
|
|
967
|
-
accessorFn: (
|
|
997
|
+
accessorFn: (d) => d.collectible.name,
|
|
968
998
|
enableSorting: !0
|
|
969
999
|
},
|
|
970
1000
|
{
|
|
971
1001
|
id: "type",
|
|
972
1002
|
header: "Reward type",
|
|
973
|
-
accessorFn: (
|
|
974
|
-
cell(
|
|
975
|
-
return
|
|
1003
|
+
accessorFn: (d) => d.collectible.type,
|
|
1004
|
+
cell(d) {
|
|
1005
|
+
return ye[d.row.original.collectible.type].chip();
|
|
976
1006
|
}
|
|
977
1007
|
},
|
|
978
1008
|
{
|
|
979
1009
|
header: "Description",
|
|
980
|
-
accessorFn: (
|
|
981
|
-
cell(
|
|
1010
|
+
accessorFn: (d) => d.description,
|
|
1011
|
+
cell(d) {
|
|
982
1012
|
var p;
|
|
983
|
-
const n =
|
|
984
|
-
return n.collectible.type == "VOUCHER" || n.selectedReward == null ? n.description :
|
|
985
|
-
"onUpdate:modelValue": (
|
|
1013
|
+
const n = d.row.original;
|
|
1014
|
+
return n.collectible.type == "VOUCHER" || n.selectedReward == null ? n.description : Ge(Ze.FmStepperField, {
|
|
1015
|
+
"onUpdate:modelValue": (f) => {
|
|
986
1016
|
t.value.titles = t.value.titles.map(
|
|
987
|
-
(
|
|
1017
|
+
(I) => I.id == n.collectible._id ? { ...I, dayToExpire: f } : I
|
|
988
1018
|
);
|
|
989
1019
|
},
|
|
990
1020
|
modelValue: ((p = n.selectedReward) == null ? void 0 : p.extra) ?? 0,
|
|
991
1021
|
appendText: "day(s)",
|
|
992
|
-
helperState: G(
|
|
993
|
-
helperText: X(
|
|
1022
|
+
helperState: G(u.value, "titles"),
|
|
1023
|
+
helperText: X(u.value, "titles"),
|
|
994
1024
|
max: 9999,
|
|
995
|
-
rules: [(
|
|
1025
|
+
rules: [(f) => f <= 9999 || "Maximum 9999 days allowed"],
|
|
996
1026
|
showSteppers: !1,
|
|
997
1027
|
disabled: !!t.value.stripePriceId
|
|
998
1028
|
});
|
|
999
1029
|
}
|
|
1000
1030
|
}
|
|
1001
|
-
], l =
|
|
1031
|
+
], l = N([]), w = L(() => {
|
|
1002
1032
|
var n;
|
|
1003
|
-
const
|
|
1033
|
+
const d = (n = t.value) != null && n.isFeedvibe ? "STORE_BUNDLE:FEEDVIBE" : "STORE_BUNDLE:DEFAULT";
|
|
1004
1034
|
return v.bundleRewards.filter((p) => {
|
|
1005
|
-
var
|
|
1006
|
-
return (
|
|
1035
|
+
var f;
|
|
1036
|
+
return (f = t.value) != null && f.isFeedvibe && p.type !== "VOUCHER" ? !1 : ft(p.capabilities, d);
|
|
1007
1037
|
}).map((p) => {
|
|
1008
|
-
const
|
|
1038
|
+
const f = U.value.find((M) => M.id == p._id), I = p.type === "VOUCHER" ? `${p.options.maxUse} use(s), ${yt(
|
|
1009
1039
|
p.options.validityOption || {}
|
|
1010
1040
|
)}` : "No expiry";
|
|
1011
1041
|
return {
|
|
1012
1042
|
collectible: p,
|
|
1013
|
-
description:
|
|
1014
|
-
selectedReward:
|
|
1043
|
+
description: I,
|
|
1044
|
+
selectedReward: f
|
|
1015
1045
|
};
|
|
1016
1046
|
});
|
|
1017
|
-
}),
|
|
1018
|
-
var
|
|
1047
|
+
}), U = L(() => {
|
|
1048
|
+
var d, n;
|
|
1019
1049
|
return [
|
|
1020
|
-
...((
|
|
1050
|
+
...((d = t.value) == null ? void 0 : d.titles.map((p) => ({
|
|
1021
1051
|
id: p.id,
|
|
1022
1052
|
extra: p.dayToExpire
|
|
1023
1053
|
}))) ?? [],
|
|
@@ -1029,105 +1059,105 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1029
1059
|
}), j = L(
|
|
1030
1060
|
() => t.value.stripePriceId && t.value.subscriptionValidity ? t.value.subscriptionValidity : 0
|
|
1031
1061
|
);
|
|
1032
|
-
function ne(
|
|
1033
|
-
t.value.subscriptionValidity =
|
|
1062
|
+
function ne(d) {
|
|
1063
|
+
t.value.subscriptionValidity = d;
|
|
1034
1064
|
for (const n of t.value.titles)
|
|
1035
|
-
n.dayToExpire =
|
|
1036
|
-
t.value.credit.free && (t.value.credit.free.day =
|
|
1065
|
+
n.dayToExpire = d;
|
|
1066
|
+
t.value.credit.free && (t.value.credit.free.day = d);
|
|
1037
1067
|
}
|
|
1038
1068
|
function Z() {
|
|
1039
|
-
const
|
|
1040
|
-
if (!(!n || !
|
|
1041
|
-
for (let p = 0; p <
|
|
1042
|
-
const
|
|
1043
|
-
H.value[p] ?
|
|
1044
|
-
(R) => R.id ==
|
|
1069
|
+
const d = w.value, n = t.value;
|
|
1070
|
+
if (!(!n || !d))
|
|
1071
|
+
for (let p = 0; p < d.length; p++) {
|
|
1072
|
+
const f = d[p];
|
|
1073
|
+
H.value[p] ? f.collectible.type == "TITLE" ? n.titles.findIndex(
|
|
1074
|
+
(R) => R.id == f.collectible._id
|
|
1045
1075
|
) < 0 && n.titles.push({
|
|
1046
|
-
id:
|
|
1076
|
+
id: f.collectible._id,
|
|
1047
1077
|
dayToExpire: j.value
|
|
1048
1078
|
}) : n.vouchers.findIndex(
|
|
1049
|
-
(R) => R ==
|
|
1050
|
-
) < 0 && n.vouchers.push(
|
|
1051
|
-
(
|
|
1079
|
+
(R) => R == f.collectible._id
|
|
1080
|
+
) < 0 && n.vouchers.push(f.collectible._id) : (n.titles = n.titles.filter((M) => M.id != f.collectible._id), n.vouchers = n.vouchers.filter(
|
|
1081
|
+
(M) => M != f.collectible._id
|
|
1052
1082
|
));
|
|
1053
1083
|
}
|
|
1054
1084
|
}
|
|
1055
|
-
const H =
|
|
1085
|
+
const H = N({});
|
|
1056
1086
|
Pe(H, Z, { deep: !0 });
|
|
1057
1087
|
const z = L(() => {
|
|
1058
|
-
var
|
|
1059
|
-
return (n = (
|
|
1088
|
+
var d, n;
|
|
1089
|
+
return (n = (d = v.storeOption) == null ? void 0 : d.company) == null ? void 0 : n.sstRegNo;
|
|
1060
1090
|
}), oe = L(() => {
|
|
1061
|
-
var
|
|
1062
|
-
return (p = (n = (
|
|
1091
|
+
var d, n, p;
|
|
1092
|
+
return (p = (n = (d = v.storeOption) == null ? void 0 : d.inclusiveTaxes) == null ? void 0 : n[0]) != null && p.inclusive ? "Inclusive" : "Exclusive";
|
|
1063
1093
|
}), F = L(() => {
|
|
1064
|
-
var
|
|
1065
|
-
return
|
|
1094
|
+
var d, n, p;
|
|
1095
|
+
return qe(
|
|
1066
1096
|
W.fullTax,
|
|
1067
|
-
|
|
1097
|
+
Je(t.value.taxes),
|
|
1068
1098
|
t.value.price,
|
|
1069
1099
|
Number(t.value.credit.normal),
|
|
1070
|
-
((
|
|
1071
|
-
(p = (n = v.storeOption) == null ? void 0 : n.company) != null && p.sstRegNo ? W.taxSystem.map((
|
|
1100
|
+
((d = v.storeOption) == null ? void 0 : d.inclusiveTaxes) ?? [],
|
|
1101
|
+
(p = (n = v.storeOption) == null ? void 0 : n.company) != null && p.sstRegNo ? W.taxSystem.map((f) => f.code) : []
|
|
1072
1102
|
);
|
|
1073
|
-
}),
|
|
1103
|
+
}), ie = L(() => F.value.reduce(
|
|
1074
1104
|
(n, p) => n.add(p.total),
|
|
1075
|
-
|
|
1076
|
-
).toFormat()),
|
|
1077
|
-
var
|
|
1078
|
-
const
|
|
1105
|
+
mt()
|
|
1106
|
+
).toFormat()), g = L(() => {
|
|
1107
|
+
var f;
|
|
1108
|
+
const d = We(
|
|
1079
1109
|
F.value,
|
|
1080
1110
|
t.value.price,
|
|
1081
|
-
((
|
|
1111
|
+
((f = v.storeOption) == null ? void 0 : f.inclusiveTaxes) ?? []
|
|
1082
1112
|
);
|
|
1083
|
-
t.value.priceWithTaxes =
|
|
1084
|
-
const n =
|
|
1113
|
+
t.value.priceWithTaxes = d;
|
|
1114
|
+
const n = Zt(d, !1), p = Number(n.replace(/[^\d.-]/g, ""));
|
|
1085
1115
|
return Number.isNaN(p) ? 0 : p;
|
|
1086
1116
|
});
|
|
1087
1117
|
function k() {
|
|
1088
|
-
t.value.taxTotals = F.value,
|
|
1118
|
+
t.value.taxTotals = F.value, b("update", Ae.parse(at(t.value)));
|
|
1089
1119
|
}
|
|
1090
|
-
function
|
|
1120
|
+
function h() {
|
|
1091
1121
|
return ae.cloneDeep(we);
|
|
1092
1122
|
}
|
|
1093
|
-
function
|
|
1094
|
-
|
|
1123
|
+
function $(d, n) {
|
|
1124
|
+
a.value = d, d && n && (c.value = void 0, m.value = n.categories, t.value = n.bundle || h(), i.value.category = n.category, i.value.index = n.index, i.value.originalCategoryIndex = n.category, H.value = w.value.reduce((p, f, I) => (p[I] = !!f.selectedReward, p), {}));
|
|
1095
1125
|
}
|
|
1096
1126
|
return S({
|
|
1097
|
-
showSheet:
|
|
1098
|
-
bundleImage:
|
|
1127
|
+
showSheet: $,
|
|
1128
|
+
bundleImage: c,
|
|
1099
1129
|
target: i,
|
|
1100
1130
|
data: t
|
|
1101
|
-
}), (
|
|
1102
|
-
const p = _("FmSwitch"),
|
|
1103
|
-
return
|
|
1131
|
+
}), (d, n) => {
|
|
1132
|
+
const p = _("FmSwitch"), f = _("FmHelperText"), I = _("FmTextField"), M = _("FmSelect"), R = _("FmStepperField"), q = _("FmMenuItem"), J = _("FmTable"), fe = _("FmButton"), Ce = _("FmSideSheet");
|
|
1133
|
+
return x(), O(Ce, {
|
|
1104
1134
|
"max-width": 768,
|
|
1105
|
-
modelValue: e(
|
|
1106
|
-
"onUpdate:modelValue": n[21] || (n[21] = (
|
|
1135
|
+
modelValue: e(a),
|
|
1136
|
+
"onUpdate:modelValue": n[21] || (n[21] = (de) => re(a) ? a.value = de : null),
|
|
1107
1137
|
header: e(i).index != -1 ? e(s)("connect.store.bundle.edit.title") : e(s)("connect.store.bundle.edit.create")
|
|
1108
1138
|
}, {
|
|
1109
|
-
"side-sheet-footer":
|
|
1110
|
-
V("div",
|
|
1111
|
-
r(
|
|
1139
|
+
"side-sheet-footer": B(() => [
|
|
1140
|
+
V("div", mn, [
|
|
1141
|
+
r(fe, {
|
|
1112
1142
|
label: e(i).index != -1 ? "Save" : "Add",
|
|
1113
1143
|
onClick: k,
|
|
1114
|
-
disabled: e(
|
|
1115
|
-
loading: e(
|
|
1144
|
+
disabled: e(u).length > 0,
|
|
1145
|
+
loading: e(_e)().isLoading
|
|
1116
1146
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
1117
|
-
r(
|
|
1147
|
+
r(fe, {
|
|
1118
1148
|
label: "Cancel",
|
|
1119
|
-
onClick: n[20] || (n[20] = (
|
|
1149
|
+
onClick: n[20] || (n[20] = (de) => $(!1)),
|
|
1120
1150
|
variant: "tertiary"
|
|
1121
1151
|
})
|
|
1122
1152
|
])
|
|
1123
1153
|
]),
|
|
1124
|
-
default:
|
|
1125
|
-
var
|
|
1154
|
+
default: B(() => {
|
|
1155
|
+
var de, $e, Ue, Re, Ie, Be, Ne, De, Oe, Me;
|
|
1126
1156
|
return [
|
|
1127
1157
|
r(ke, { json: e(t) }, null, 8, ["json"]),
|
|
1128
|
-
e(t) ? (
|
|
1129
|
-
V("div",
|
|
1130
|
-
e(A.Config).getCountry().code == "MY" && ((
|
|
1158
|
+
e(t) ? (x(), D("div", en, [
|
|
1159
|
+
V("div", tn, [
|
|
1160
|
+
e(A.Config).getCountry().code == "MY" && ((de = e(v).payoutAccount) == null ? void 0 : de.status) == "APPROVED" && (($e = e(v).payoutAccount) != null && $e.enable) ? (x(), O(p, {
|
|
1131
1161
|
key: 0,
|
|
1132
1162
|
"onUpdate:modelValue": n[0] || (n[0] = (P) => {
|
|
1133
1163
|
e(t).isFeedvibe = P, e(t).isFeedvibe && (e(t).credit.normal = 0, e(t).coinPrice = 0, e(t).titles = [], H.value = {}, e(t).hideInPos = !0, e(t).internal = !0);
|
|
@@ -1137,37 +1167,37 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1137
1167
|
label: "Feedvibe Campaign",
|
|
1138
1168
|
sublabel: "Bundle will be appear for Feedvibe campaign use"
|
|
1139
1169
|
}, null, 8, ["model-value"])) : E("", !0),
|
|
1140
|
-
e(t).isFeedvibe ? (
|
|
1170
|
+
e(t).isFeedvibe ? (x(), O(f, {
|
|
1141
1171
|
key: 1,
|
|
1142
1172
|
text: "There will be a 15% charge for FeedVibe bundles sold in the FeedVibe app. FeedVibe bundles only show up in the FeedVibe app and cannot be sold in the POS and mini program. For more information, please contact support.",
|
|
1143
1173
|
state: "warning"
|
|
1144
1174
|
})) : E("", !0)
|
|
1145
1175
|
]),
|
|
1146
|
-
V("div",
|
|
1147
|
-
r(
|
|
1176
|
+
V("div", nn, K(e(s)("connect.store.bundle.edit.basicInformation")), 1),
|
|
1177
|
+
r(I, {
|
|
1148
1178
|
label: e(s)("connect.store.bundle.edit.bundleName"),
|
|
1149
1179
|
modelValue: e(t).name,
|
|
1150
1180
|
"onUpdate:modelValue": n[1] || (n[1] = (P) => e(t).name = P),
|
|
1151
|
-
"helper-state": e(G)(e(
|
|
1152
|
-
"helper-text": e(X)(e(
|
|
1181
|
+
"helper-state": e(G)(e(u), "name"),
|
|
1182
|
+
"helper-text": e(X)(e(u), "name")
|
|
1153
1183
|
}, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
|
|
1154
|
-
r(
|
|
1184
|
+
r(M, {
|
|
1155
1185
|
modelValue: e(i).category,
|
|
1156
1186
|
"onUpdate:modelValue": n[2] || (n[2] = (P) => e(i).category = P),
|
|
1157
1187
|
label: "Store Category",
|
|
1158
|
-
items: e(
|
|
1188
|
+
items: e(m).map((P, Ye) => ({ label: P, value: Ye }))
|
|
1159
1189
|
}, null, 8, ["modelValue", "items"]),
|
|
1160
|
-
r(
|
|
1190
|
+
r(dt, {
|
|
1161
1191
|
label: e(s)("connect.store.bundle.edit.bundleImage"),
|
|
1162
1192
|
class: "w-1/2 xs:w-2/3",
|
|
1163
1193
|
"aspect-ratio": "16/9",
|
|
1164
1194
|
thumbnail: e(t).image ?? void 0,
|
|
1165
|
-
file: e(
|
|
1195
|
+
file: e(c) ?? void 0,
|
|
1166
1196
|
"onUpdate:file": n[3] || (n[3] = (P) => {
|
|
1167
|
-
|
|
1197
|
+
c.value = P;
|
|
1168
1198
|
}),
|
|
1169
|
-
"helper-state": e(G)(e(
|
|
1170
|
-
"helper-text": e(X)(e(
|
|
1199
|
+
"helper-state": e(G)(e(u), "image"),
|
|
1200
|
+
"helper-text": e(X)(e(u), "image")
|
|
1171
1201
|
}, null, 8, ["label", "thumbnail", "file", "helper-state", "helper-text"]),
|
|
1172
1202
|
r(R, {
|
|
1173
1203
|
"model-value": e(A.Dinero).fromFdoDinero(e(t).price).toUnit(),
|
|
@@ -1179,13 +1209,13 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1179
1209
|
}),
|
|
1180
1210
|
"is-currency": !0,
|
|
1181
1211
|
"show-steppers": !1,
|
|
1182
|
-
"helper-text": e(X)(e(
|
|
1212
|
+
"helper-text": e(X)(e(u), "price") || `${e(A.Dinero).fromNumber({ number: 1 }).toFormat(
|
|
1183
1213
|
!0
|
|
1184
1214
|
)} = ${e(A.Dinero).fromNumber({ number: 1 }).toUnit()} credit`,
|
|
1185
|
-
"helper-state": e(G)(e(
|
|
1215
|
+
"helper-state": e(G)(e(u), "price")
|
|
1186
1216
|
}, {
|
|
1187
|
-
prepend:
|
|
1188
|
-
|
|
1217
|
+
prepend: B(() => [
|
|
1218
|
+
me(K(e(A.Dinero).defaultCurrency()), 1)
|
|
1189
1219
|
]),
|
|
1190
1220
|
_: 1
|
|
1191
1221
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
@@ -1199,15 +1229,15 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1199
1229
|
}),
|
|
1200
1230
|
"is-currency": !0,
|
|
1201
1231
|
"show-steppers": !1,
|
|
1202
|
-
"helper-text": e(X)(e(
|
|
1203
|
-
"helper-state": e(G)(e(
|
|
1232
|
+
"helper-text": e(X)(e(u), "originalPrice") || e(s)("connect.store.bundle.edit.originalPriceHelper"),
|
|
1233
|
+
"helper-state": e(G)(e(u), "originalPrice")
|
|
1204
1234
|
}, {
|
|
1205
|
-
prepend:
|
|
1206
|
-
|
|
1235
|
+
prepend: B(() => [
|
|
1236
|
+
me(K(e(A.Dinero).defaultCurrency()), 1)
|
|
1207
1237
|
]),
|
|
1208
1238
|
_: 1
|
|
1209
1239
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
1210
|
-
e(t).isFeedvibe ? E("", !0) : (
|
|
1240
|
+
e(t).isFeedvibe ? E("", !0) : (x(), O(R, {
|
|
1211
1241
|
key: 0,
|
|
1212
1242
|
"model-value": e(t).coinPrice ?? null,
|
|
1213
1243
|
label: e(s)("connect.store.bundle.edit.pointNeeded"),
|
|
@@ -1216,51 +1246,51 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1216
1246
|
P > 0 && e(t).credit.normal > 0 && (e(t).credit.normal = 0), e(t).coinPrice = P;
|
|
1217
1247
|
}),
|
|
1218
1248
|
"show-steppers": !1,
|
|
1219
|
-
"helper-state": e(G)(e(
|
|
1220
|
-
"helper-text": e(X)(e(
|
|
1249
|
+
"helper-state": e(G)(e(u), "coinPrice"),
|
|
1250
|
+
"helper-text": e(X)(e(u), "coinPrice")
|
|
1221
1251
|
}, {
|
|
1222
|
-
append:
|
|
1223
|
-
|
|
1252
|
+
append: B(() => [...n[22] || (n[22] = [
|
|
1253
|
+
me(" point(s) ", -1)
|
|
1224
1254
|
])]),
|
|
1225
1255
|
_: 1
|
|
1226
1256
|
}, 8, ["model-value", "label", "helper-state", "helper-text"])),
|
|
1227
|
-
(
|
|
1228
|
-
V("div",
|
|
1229
|
-
r(
|
|
1257
|
+
(Ue = e(v).storeOption) != null && Ue.stripe && !e(t).isFeedvibe ? (x(), D(Y, { key: 1 }, [
|
|
1258
|
+
V("div", on, K(e(s)("connect.store.bundle.edit.subscriptionSettings")), 1),
|
|
1259
|
+
r(I, {
|
|
1230
1260
|
label: e(s)("connect.store.bundle.edit.stripePriceId"),
|
|
1231
1261
|
modelValue: e(t).stripePriceId,
|
|
1232
1262
|
"onUpdate:modelValue": n[7] || (n[7] = (P) => e(t).stripePriceId = P),
|
|
1233
|
-
"helper-state": e(G)(e(
|
|
1234
|
-
"helper-text": e(X)(e(
|
|
1263
|
+
"helper-state": e(G)(e(u), "stripePriceId"),
|
|
1264
|
+
"helper-text": e(X)(e(u), "stripePriceId")
|
|
1235
1265
|
}, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
|
|
1236
|
-
e(t).stripePriceId ? (
|
|
1266
|
+
e(t).stripePriceId ? (x(), O(R, {
|
|
1237
1267
|
key: 0,
|
|
1238
1268
|
"model-value": e(t).subscriptionValidity ?? null,
|
|
1239
1269
|
min: 1,
|
|
1240
1270
|
"onUpdate:modelValue": ne,
|
|
1241
1271
|
label: e(s)("connect.store.bundle.edit.subscriptionValidity"),
|
|
1242
1272
|
"show-steppers": !1,
|
|
1243
|
-
"helper-state": e(G)(e(
|
|
1244
|
-
"helper-text": e(X)(e(
|
|
1273
|
+
"helper-state": e(G)(e(u), "subscriptionValidity"),
|
|
1274
|
+
"helper-text": e(X)(e(u), "subscriptionValidity")
|
|
1245
1275
|
}, null, 8, ["model-value", "label", "helper-state", "helper-text"])) : E("", !0)
|
|
1246
1276
|
], 64)) : E("", !0),
|
|
1247
|
-
e(t).isFeedvibe ? E("", !0) : (
|
|
1248
|
-
V("div",
|
|
1277
|
+
e(t).isFeedvibe ? E("", !0) : (x(), D(Y, { key: 2 }, [
|
|
1278
|
+
V("div", an, K(e(s)("connect.store.bundle.edit.credit")), 1),
|
|
1249
1279
|
r(R, {
|
|
1250
1280
|
modelValue: e(t).credit.normal,
|
|
1251
1281
|
"onUpdate:modelValue": n[8] || (n[8] = (P) => e(t).credit.normal = P),
|
|
1252
1282
|
label: e(s)("connect.store.bundle.edit.normalCredit"),
|
|
1253
1283
|
"show-steppers": !1,
|
|
1254
|
-
"helper-state": e(G)(e(
|
|
1255
|
-
"helper-text": e(X)(e(
|
|
1284
|
+
"helper-state": e(G)(e(u), "credit.normal"),
|
|
1285
|
+
"helper-text": e(X)(e(u), "credit.normal")
|
|
1256
1286
|
}, {
|
|
1257
|
-
append:
|
|
1258
|
-
|
|
1287
|
+
append: B(() => [...n[23] || (n[23] = [
|
|
1288
|
+
me(" credit ", -1)
|
|
1259
1289
|
])]),
|
|
1260
1290
|
_: 1
|
|
1261
1291
|
}, 8, ["modelValue", "label", "helper-state", "helper-text"]),
|
|
1262
1292
|
r(R, {
|
|
1263
|
-
"model-value": ((
|
|
1293
|
+
"model-value": ((Re = e(t).credit.free) == null ? void 0 : Re.amount) ?? null,
|
|
1264
1294
|
min: 0,
|
|
1265
1295
|
"onUpdate:modelValue": n[9] || (n[9] = (P) => {
|
|
1266
1296
|
e(t).credit.free || (e(t).credit.free = {
|
|
@@ -1270,18 +1300,18 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1270
1300
|
}),
|
|
1271
1301
|
label: e(s)("connect.store.bundle.edit.freeCredit"),
|
|
1272
1302
|
"show-steppers": !1,
|
|
1273
|
-
"helper-state": e(G)(e(
|
|
1274
|
-
"helper-text": e(X)(e(
|
|
1303
|
+
"helper-state": e(G)(e(u), "credit.free.amount"),
|
|
1304
|
+
"helper-text": e(X)(e(u), "credit.free.amount")
|
|
1275
1305
|
}, {
|
|
1276
|
-
append:
|
|
1277
|
-
|
|
1306
|
+
append: B(() => [...n[24] || (n[24] = [
|
|
1307
|
+
me(" credit ", -1)
|
|
1278
1308
|
])]),
|
|
1279
1309
|
_: 1
|
|
1280
1310
|
}, 8, ["model-value", "label", "helper-state", "helper-text"]),
|
|
1281
|
-
(
|
|
1311
|
+
(Ie = e(t).credit.free) != null && Ie.amount ? (x(), O(R, {
|
|
1282
1312
|
key: 0,
|
|
1283
1313
|
disabled: !!e(t).stripePriceId,
|
|
1284
|
-
"model-value": ((
|
|
1314
|
+
"model-value": ((Be = e(t).credit.free) == null ? void 0 : Be.day) ?? null,
|
|
1285
1315
|
min: 0,
|
|
1286
1316
|
"onUpdate:modelValue": n[10] || (n[10] = (P) => {
|
|
1287
1317
|
e(t).credit.free || (e(t).credit.free = {
|
|
@@ -1291,40 +1321,40 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1291
1321
|
}),
|
|
1292
1322
|
label: "Free credit valid for",
|
|
1293
1323
|
"show-steppers": !1,
|
|
1294
|
-
"helper-state": e(G)(e(
|
|
1295
|
-
"helper-text": e(X)(e(
|
|
1324
|
+
"helper-state": e(G)(e(u), "credit.free.day"),
|
|
1325
|
+
"helper-text": e(X)(e(u), "credit.free.day")
|
|
1296
1326
|
}, {
|
|
1297
|
-
append:
|
|
1298
|
-
|
|
1327
|
+
append: B(() => [...n[25] || (n[25] = [
|
|
1328
|
+
me(" day(s) ", -1)
|
|
1299
1329
|
])]),
|
|
1300
1330
|
_: 1
|
|
1301
1331
|
}, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : E("", !0)
|
|
1302
1332
|
], 64)),
|
|
1303
|
-
e(z) ? (
|
|
1333
|
+
e(z) ? (x(), D(Y, { key: 3 }, [
|
|
1304
1334
|
n[26] || (n[26] = V("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Taxes", -1)),
|
|
1305
|
-
r(
|
|
1335
|
+
r(Qt, {
|
|
1306
1336
|
modelValue: e(t).taxes,
|
|
1307
1337
|
"onUpdate:modelValue": n[11] || (n[11] = (P) => e(t).taxes = P)
|
|
1308
1338
|
}, null, 8, ["modelValue"]),
|
|
1309
|
-
r(
|
|
1339
|
+
r(I, {
|
|
1310
1340
|
label: `Tax Charged (${e(oe)})`,
|
|
1311
|
-
"model-value": e(
|
|
1341
|
+
"model-value": e(ie),
|
|
1312
1342
|
disabled: ""
|
|
1313
1343
|
}, null, 8, ["label", "model-value"])
|
|
1314
1344
|
], 64)) : E("", !0),
|
|
1315
1345
|
r(R, {
|
|
1316
1346
|
label: "Total Price",
|
|
1317
|
-
"model-value": e(
|
|
1347
|
+
"model-value": e(g),
|
|
1318
1348
|
disabled: !0
|
|
1319
1349
|
}, null, 8, ["model-value"]),
|
|
1320
|
-
V("div",
|
|
1321
|
-
V("div",
|
|
1322
|
-
V("div",
|
|
1323
|
-
V("div",
|
|
1324
|
-
r(
|
|
1350
|
+
V("div", ln, K(e(s)("connect.store.bundle.edit.bundleReward.title")), 1),
|
|
1351
|
+
V("div", sn, K(e(s)("connect.store.bundle.edit.bundleReward.description")), 1),
|
|
1352
|
+
V("div", rn, [
|
|
1353
|
+
V("div", dn, [
|
|
1354
|
+
r(ut, {
|
|
1325
1355
|
label: `Reward type: ${e(l).length == 0 ? "All" : e(l)[0].name}`
|
|
1326
1356
|
}, {
|
|
1327
|
-
default:
|
|
1357
|
+
default: B(() => [
|
|
1328
1358
|
r(q, {
|
|
1329
1359
|
onClick: n[12] || (n[12] = (P) => l.value = []),
|
|
1330
1360
|
label: "All"
|
|
@@ -1334,20 +1364,20 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1334
1364
|
{
|
|
1335
1365
|
id: "type",
|
|
1336
1366
|
value: "VOUCHER",
|
|
1337
|
-
name: e(
|
|
1367
|
+
name: e(ye).VOUCHER.name
|
|
1338
1368
|
}
|
|
1339
1369
|
]),
|
|
1340
|
-
label: e(
|
|
1370
|
+
label: e(ye).VOUCHER.name
|
|
1341
1371
|
}, null, 8, ["label"]),
|
|
1342
1372
|
r(q, {
|
|
1343
1373
|
onClick: n[14] || (n[14] = (P) => l.value = [
|
|
1344
1374
|
{
|
|
1345
1375
|
id: "type",
|
|
1346
1376
|
value: "TITLE",
|
|
1347
|
-
name: e(
|
|
1377
|
+
name: e(ye).TITLE.name
|
|
1348
1378
|
}
|
|
1349
1379
|
]),
|
|
1350
|
-
label: e(
|
|
1380
|
+
label: e(ye).TITLE.name
|
|
1351
1381
|
}, null, 8, ["label"])
|
|
1352
1382
|
]),
|
|
1353
1383
|
_: 1
|
|
@@ -1355,21 +1385,21 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1355
1385
|
]),
|
|
1356
1386
|
r(J, {
|
|
1357
1387
|
modelValue: e(H),
|
|
1358
|
-
"onUpdate:modelValue": n[15] || (n[15] = (P) =>
|
|
1388
|
+
"onUpdate:modelValue": n[15] || (n[15] = (P) => re(H) ? H.value = P : null),
|
|
1359
1389
|
selection: "multiple",
|
|
1360
1390
|
"column-filter": e(l),
|
|
1361
1391
|
"column-defs": T,
|
|
1362
1392
|
"row-data": e(w),
|
|
1363
1393
|
"hide-footer": e(w).length <= 10
|
|
1364
1394
|
}, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"]),
|
|
1365
|
-
r(
|
|
1366
|
-
text: e(X)(e(
|
|
1367
|
-
state: e(G)(e(
|
|
1395
|
+
r(f, {
|
|
1396
|
+
text: e(X)(e(u), "titles"),
|
|
1397
|
+
state: e(G)(e(u), "titles")
|
|
1368
1398
|
}, null, 8, ["text", "state"])
|
|
1369
1399
|
]),
|
|
1370
|
-
V("div",
|
|
1371
|
-
V("div",
|
|
1372
|
-
e(t).isFeedvibe ? E("", !0) : (
|
|
1400
|
+
V("div", un, K(e(s)("connect.store.bundle.edit.advanceSetting")), 1),
|
|
1401
|
+
V("div", cn, [
|
|
1402
|
+
e(t).isFeedvibe ? E("", !0) : (x(), D(Y, { key: 0 }, [
|
|
1373
1403
|
r(p, {
|
|
1374
1404
|
"model-value": e(t).internal ?? !1,
|
|
1375
1405
|
"onUpdate:modelValue": n[16] || (n[16] = (P) => e(t).internal = P),
|
|
@@ -1386,14 +1416,14 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1386
1416
|
}, null, 8, ["model-value", "label", "sublabel"])
|
|
1387
1417
|
], 64)),
|
|
1388
1418
|
r(R, {
|
|
1389
|
-
"model-value": ((De = (
|
|
1419
|
+
"model-value": ((De = (Ne = e(t).config) == null ? void 0 : Ne.options) == null ? void 0 : De.maxPerUser) || null,
|
|
1390
1420
|
"onUpdate:modelValue": n[18] || (n[18] = (P) => e(ae).set(e(t), "config.options.maxPerUser", P)),
|
|
1391
1421
|
label: e(s)("connect.store.bundle.edit.maxPerUser"),
|
|
1392
1422
|
"show-steppers": !1,
|
|
1393
1423
|
placeholder: e(s)("connect.store.bundle.edit.unlimited")
|
|
1394
1424
|
}, null, 8, ["model-value", "label", "placeholder"]),
|
|
1395
1425
|
r(R, {
|
|
1396
|
-
"model-value": ((
|
|
1426
|
+
"model-value": ((Me = (Oe = e(t).config) == null ? void 0 : Oe.options) == null ? void 0 : Me.maxReceive) || null,
|
|
1397
1427
|
"onUpdate:modelValue": n[19] || (n[19] = (P) => e(ae).set(e(t), "config.options.maxReceive", P)),
|
|
1398
1428
|
label: e(s)("connect.store.bundle.edit.maxReceive"),
|
|
1399
1429
|
"show-steppers": !1,
|
|
@@ -1407,51 +1437,51 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1407
1437
|
}, 8, ["modelValue", "header"]);
|
|
1408
1438
|
};
|
|
1409
1439
|
}
|
|
1410
|
-
}),
|
|
1440
|
+
}), fn = { class: "flex gap-8 items-center flex-wrap" }, yn = { class: "flex items-center gap-8" }, bn = /* @__PURE__ */ te({
|
|
1411
1441
|
__name: "SendBundleSheet",
|
|
1412
1442
|
emits: ["success"],
|
|
1413
|
-
setup(
|
|
1414
|
-
const { minor:
|
|
1415
|
-
|
|
1416
|
-
function
|
|
1417
|
-
i.value = !0, v.value = null,
|
|
1443
|
+
setup(C, { expose: S, emit: o }) {
|
|
1444
|
+
const { minor: b } = Ke, s = N(), v = N(""), a = N(""), m = N([]), i = N(!1), t = N();
|
|
1445
|
+
N(!0);
|
|
1446
|
+
function c(w) {
|
|
1447
|
+
i.value = !0, v.value = null, a.value = "", s.value = w.bundle;
|
|
1418
1448
|
}
|
|
1419
|
-
function
|
|
1449
|
+
function y() {
|
|
1420
1450
|
i.value = !1;
|
|
1421
1451
|
}
|
|
1422
|
-
async function
|
|
1423
|
-
const
|
|
1452
|
+
async function u(w) {
|
|
1453
|
+
const U = await bt.read({
|
|
1424
1454
|
limit: 25,
|
|
1425
1455
|
skip: 0,
|
|
1426
1456
|
sortBy: "_id",
|
|
1427
1457
|
search: w,
|
|
1428
1458
|
descending: !1
|
|
1429
1459
|
});
|
|
1430
|
-
|
|
1460
|
+
m.value = U.resources.map((j) => ({
|
|
1431
1461
|
label: `${j.name} (${j.phoneNumber})`,
|
|
1432
1462
|
value: j._id
|
|
1433
1463
|
})), await new Promise((j) => setTimeout(j, 100));
|
|
1434
1464
|
}
|
|
1435
1465
|
async function T() {
|
|
1436
1466
|
if (!s.value || !v.value) return;
|
|
1437
|
-
const w =
|
|
1467
|
+
const w = m.value.find(
|
|
1438
1468
|
(j) => j.value === v.value
|
|
1439
1469
|
);
|
|
1440
|
-
await
|
|
1470
|
+
await pe.confirm(
|
|
1441
1471
|
`Are you sure you want to send bundle ${s.value.name} to ${w == null ? void 0 : w.label}?`,
|
|
1442
1472
|
"Confirm",
|
|
1443
1473
|
"Confirm",
|
|
1444
1474
|
"Cancel"
|
|
1445
|
-
) && await
|
|
1475
|
+
) && await b(
|
|
1446
1476
|
async () => {
|
|
1447
1477
|
const j = {
|
|
1448
1478
|
bundle: s.value._id,
|
|
1449
1479
|
member: v.value,
|
|
1450
|
-
source:
|
|
1451
|
-
ref: `ADMIN:${(/* @__PURE__ */ new Date()).toISOString()}:${
|
|
1480
|
+
source: ot.enum.ADMIN,
|
|
1481
|
+
ref: `ADMIN:${(/* @__PURE__ */ new Date()).toISOString()}:${a.value}`,
|
|
1452
1482
|
withCoin: !1
|
|
1453
1483
|
};
|
|
1454
|
-
await
|
|
1484
|
+
await ge.sendBundle(j), y();
|
|
1455
1485
|
},
|
|
1456
1486
|
{
|
|
1457
1487
|
message: "Sending bundle",
|
|
@@ -1460,98 +1490,98 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1460
1490
|
);
|
|
1461
1491
|
}
|
|
1462
1492
|
const l = L(() => {
|
|
1463
|
-
var
|
|
1493
|
+
var U, j, ne;
|
|
1464
1494
|
const w = [];
|
|
1465
|
-
return ((
|
|
1466
|
-
`${A.Config.getCountry().currency.symbol}${
|
|
1495
|
+
return ((U = s.value) == null ? void 0 : U.price.amount) > 0 && w.push(
|
|
1496
|
+
`${A.Config.getCountry().currency.symbol}${He((j = s.value) == null ? void 0 : j.price)}`
|
|
1467
1497
|
), (ne = s.value) != null && ne.coinPrice && w.push(`${s.value.coinPrice} point(s)`), w.join(" or ");
|
|
1468
1498
|
});
|
|
1469
1499
|
return S({
|
|
1470
|
-
showSheet:
|
|
1471
|
-
hideSheet:
|
|
1472
|
-
}),
|
|
1473
|
-
await
|
|
1474
|
-
}), (w,
|
|
1475
|
-
const j = _("FmCardMedia"), ne = _("FmCardHeader"), Z = _("FmChip"), H = _("FmCardSection"), z = _("FmCard"), oe = _("FmSelect"), F = _("FmTextField"),
|
|
1476
|
-
return
|
|
1500
|
+
showSheet: c,
|
|
1501
|
+
hideSheet: y
|
|
1502
|
+
}), he(async () => {
|
|
1503
|
+
await u("");
|
|
1504
|
+
}), (w, U) => {
|
|
1505
|
+
const j = _("FmCardMedia"), ne = _("FmCardHeader"), Z = _("FmChip"), H = _("FmCardSection"), z = _("FmCard"), oe = _("FmSelect"), F = _("FmTextField"), ie = _("FmForm"), g = _("FmButton"), k = _("FmSideSheet");
|
|
1506
|
+
return x(), O(k, {
|
|
1477
1507
|
"max-width": 560,
|
|
1478
1508
|
"dismiss-away": !0,
|
|
1479
1509
|
header: "Send bundle to member",
|
|
1480
1510
|
modelValue: e(i),
|
|
1481
1511
|
"onUpdate:modelValue": [
|
|
1482
|
-
|
|
1483
|
-
|
|
1512
|
+
U[4] || (U[4] = (h) => re(i) ? i.value = h : null),
|
|
1513
|
+
U[5] || (U[5] = (h) => i.value = h)
|
|
1484
1514
|
]
|
|
1485
1515
|
}, {
|
|
1486
|
-
"side-sheet-footer":
|
|
1487
|
-
V("div",
|
|
1488
|
-
r(
|
|
1516
|
+
"side-sheet-footer": B(() => [
|
|
1517
|
+
V("div", yn, [
|
|
1518
|
+
r(g, {
|
|
1489
1519
|
label: "Send",
|
|
1490
|
-
loading: e(
|
|
1491
|
-
onClick:
|
|
1492
|
-
var
|
|
1493
|
-
return (
|
|
1520
|
+
loading: e(_e)().isLoading,
|
|
1521
|
+
onClick: U[2] || (U[2] = async () => {
|
|
1522
|
+
var h;
|
|
1523
|
+
return (h = e(t)) == null ? void 0 : h.validateInputs();
|
|
1494
1524
|
})
|
|
1495
1525
|
}, null, 8, ["loading"]),
|
|
1496
|
-
r(
|
|
1526
|
+
r(g, {
|
|
1497
1527
|
label: "Cancel",
|
|
1498
1528
|
type: "button",
|
|
1499
1529
|
variant: "tertiary",
|
|
1500
|
-
onClick:
|
|
1530
|
+
onClick: U[3] || (U[3] = (h) => i.value = !1)
|
|
1501
1531
|
})
|
|
1502
1532
|
])
|
|
1503
1533
|
]),
|
|
1504
|
-
default:
|
|
1505
|
-
r(
|
|
1534
|
+
default: B(() => [
|
|
1535
|
+
r(ie, {
|
|
1506
1536
|
class: "space-y-16",
|
|
1507
1537
|
ref_key: "form",
|
|
1508
1538
|
ref: t,
|
|
1509
1539
|
onValidationSuccess: T,
|
|
1510
1540
|
blameFormChildOnValidationFailed: ""
|
|
1511
1541
|
}, {
|
|
1512
|
-
default:
|
|
1542
|
+
default: B(() => [
|
|
1513
1543
|
r(z, {
|
|
1514
1544
|
class: "max-w-[700px]",
|
|
1515
1545
|
horizontal: "",
|
|
1516
1546
|
variant: "outlined"
|
|
1517
1547
|
}, {
|
|
1518
|
-
default:
|
|
1519
|
-
var
|
|
1548
|
+
default: B(() => {
|
|
1549
|
+
var h, $;
|
|
1520
1550
|
return [
|
|
1521
|
-
(
|
|
1551
|
+
(h = e(s)) != null && h.image ? (x(), O(j, {
|
|
1522
1552
|
key: 0,
|
|
1523
1553
|
width: "100",
|
|
1524
|
-
src: (
|
|
1554
|
+
src: ($ = e(s)) == null ? void 0 : $.image
|
|
1525
1555
|
}, null, 8, ["src"])) : E("", !0),
|
|
1526
1556
|
r(H, { class: "flex flex-col gap-16 justify-between" }, {
|
|
1527
|
-
default:
|
|
1528
|
-
var
|
|
1557
|
+
default: B(() => {
|
|
1558
|
+
var d;
|
|
1529
1559
|
return [
|
|
1530
1560
|
r(ne, {
|
|
1531
1561
|
class: "p-0",
|
|
1532
|
-
title: (
|
|
1562
|
+
title: (d = e(s)) == null ? void 0 : d.name,
|
|
1533
1563
|
subtitle: e(l)
|
|
1534
1564
|
}, null, 8, ["title", "subtitle"]),
|
|
1535
1565
|
r(H, { class: "p-0" }, {
|
|
1536
|
-
default:
|
|
1537
|
-
var n, p,
|
|
1566
|
+
default: B(() => {
|
|
1567
|
+
var n, p, f, I, M, R, q, J, fe, Ce, de;
|
|
1538
1568
|
return [
|
|
1539
|
-
V("div",
|
|
1540
|
-
(n = e(s)) != null && n.isFeedvibe ? (
|
|
1569
|
+
V("div", fn, [
|
|
1570
|
+
(n = e(s)) != null && n.isFeedvibe ? (x(), O(Z, {
|
|
1541
1571
|
key: 0,
|
|
1542
1572
|
label: "Feedvibe"
|
|
1543
1573
|
})) : E("", !0),
|
|
1544
|
-
(
|
|
1574
|
+
(f = (p = e(s)) == null ? void 0 : p.titles) != null && f.length ? (x(), O(Z, {
|
|
1545
1575
|
key: 1,
|
|
1546
1576
|
label: `${e(s).titles.length} title(s)`
|
|
1547
1577
|
}, null, 8, ["label"])) : E("", !0),
|
|
1548
|
-
(
|
|
1578
|
+
(M = (I = e(s)) == null ? void 0 : I.vouchers) != null && M.length ? (x(), O(Z, {
|
|
1549
1579
|
key: 2,
|
|
1550
1580
|
label: `${e(s).vouchers.length} voucher(s)`
|
|
1551
1581
|
}, null, 8, ["label"])) : E("", !0),
|
|
1552
|
-
(q = (R = e(s)) == null ? void 0 : R.credit) != null && q.normal || (
|
|
1582
|
+
(q = (R = e(s)) == null ? void 0 : R.credit) != null && q.normal || (Ce = (fe = (J = e(s)) == null ? void 0 : J.credit) == null ? void 0 : fe.free) != null && Ce.amount ? (x(), O(Z, {
|
|
1553
1583
|
key: 3,
|
|
1554
|
-
label: `${(e(s).credit.normal || 0) + (((
|
|
1584
|
+
label: `${(e(s).credit.normal || 0) + (((de = e(s).credit.free) == null ? void 0 : de.amount) || 0)} credit(s)`
|
|
1555
1585
|
}, null, 8, ["label"])) : E("", !0)
|
|
1556
1586
|
])
|
|
1557
1587
|
];
|
|
@@ -1568,20 +1598,20 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1568
1598
|
}),
|
|
1569
1599
|
r(oe, {
|
|
1570
1600
|
modelValue: e(v),
|
|
1571
|
-
"onUpdate:modelValue":
|
|
1601
|
+
"onUpdate:modelValue": U[0] || (U[0] = (h) => re(v) ? v.value = h : null),
|
|
1572
1602
|
label: "Select member",
|
|
1573
1603
|
searchable: "",
|
|
1574
|
-
items: e(
|
|
1575
|
-
onSearch:
|
|
1576
|
-
rules: [(
|
|
1604
|
+
items: e(m),
|
|
1605
|
+
onSearch: u,
|
|
1606
|
+
rules: [(h) => !!h > 0 || "Member is required"],
|
|
1577
1607
|
"helper-text": "Type to search member"
|
|
1578
1608
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
1579
1609
|
r(F, {
|
|
1580
|
-
modelValue: e(
|
|
1581
|
-
"onUpdate:modelValue":
|
|
1610
|
+
modelValue: e(a),
|
|
1611
|
+
"onUpdate:modelValue": U[1] || (U[1] = (h) => re(a) ? a.value = h : null),
|
|
1582
1612
|
label: "Reference (optional)",
|
|
1583
1613
|
rules: [
|
|
1584
|
-
(
|
|
1614
|
+
(h) => h.length < 50 || "Reference must be less than 50 characters"
|
|
1585
1615
|
]
|
|
1586
1616
|
}, null, 8, ["modelValue", "rules"])
|
|
1587
1617
|
]),
|
|
@@ -1593,231 +1623,258 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1593
1623
|
};
|
|
1594
1624
|
}
|
|
1595
1625
|
});
|
|
1596
|
-
|
|
1597
|
-
|
|
1626
|
+
async function Ee({
|
|
1627
|
+
hasStoreCompany: C,
|
|
1628
|
+
confirm: S,
|
|
1629
|
+
showSettingSheet: o
|
|
1630
|
+
}) {
|
|
1631
|
+
return C ? !0 : (await S() && o(!0), !1);
|
|
1632
|
+
}
|
|
1633
|
+
var gn = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", licensePortalUrl: "https://license.feedme.cc/", marketingV1Portal: "https://marketing-v1.feedme.cc", voucherAppUrl: "https://voucher.feedme.cc/" };
|
|
1634
|
+
const vn = { class: "px-24 flex flex-col gap-y-16" }, hn = { class: "flex gap-8 items-center" }, xn = { class: "fm-typo-en-body-lg-600" }, Cn = { class: "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-24" }, Sn = { class: "flex flex-col gap-16 text-center" }, _n = { class: "fm-typo-en-title-sm-800" }, Fn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, to = /* @__PURE__ */ te({
|
|
1598
1635
|
__name: "Store",
|
|
1599
|
-
setup(
|
|
1636
|
+
setup(C) {
|
|
1600
1637
|
const S = {
|
|
1601
1638
|
label: "Setup payout account",
|
|
1602
1639
|
value: "payout",
|
|
1603
1640
|
isPrimary: !1
|
|
1604
|
-
}, { t:
|
|
1605
|
-
label:
|
|
1641
|
+
}, { t: o } = xe(), b = {
|
|
1642
|
+
label: o("connect.store.actions.setting"),
|
|
1606
1643
|
value: "setting",
|
|
1607
1644
|
isPrimary: !1
|
|
1608
1645
|
}, s = {
|
|
1609
|
-
label:
|
|
1646
|
+
label: o("connect.store.actions.manageReward"),
|
|
1610
1647
|
value: "create_reward"
|
|
1611
1648
|
}, v = {
|
|
1612
|
-
label:
|
|
1649
|
+
label: o("connect.store.actions.addCategory"),
|
|
1613
1650
|
value: "create_category",
|
|
1614
1651
|
isPrimary: !0,
|
|
1615
1652
|
prependIcon: "add"
|
|
1616
|
-
},
|
|
1617
|
-
async function
|
|
1653
|
+
}, a = N(), m = gt(), i = Te(), { global: t, minor: c } = Ke, y = je(), u = L(() => i.sortedStoreCategories), T = L(() => i.sortedStoreCategories.map((g) => g.name)), l = N(), w = N();
|
|
1654
|
+
async function U(g) {
|
|
1618
1655
|
var k;
|
|
1619
|
-
|
|
1656
|
+
g === "setting" ? (k = l.value) == null || k.showSheet(!0, i.storeOption) : g === "create_category" ? H(-1) : g === "create_reward" ? await m.push({ name: lt["$connect-STORE_REWARDS"] }) : g == "payout" && window.open(gn.paymentPortalUrl, "_blank");
|
|
1620
1657
|
}
|
|
1621
|
-
function j(
|
|
1658
|
+
function j(g, k) {
|
|
1622
1659
|
var p;
|
|
1623
|
-
const
|
|
1624
|
-
console.log(
|
|
1625
|
-
const
|
|
1626
|
-
return
|
|
1660
|
+
const h = !!((p = k.company) != null && p.sstRegNo), $ = k.inclusiveTaxes ?? [], d = W.taxSystem.map((f) => f.code), n = h ? $.flatMap((f) => {
|
|
1661
|
+
console.log(f, "inclusive tax");
|
|
1662
|
+
const I = W.systemDefaultCode(f.systemCode);
|
|
1663
|
+
return I ? [{ systemCode: f.systemCode, taxCode: I.taxCode }] : [];
|
|
1627
1664
|
}) : [];
|
|
1628
1665
|
return console.log([
|
|
1629
|
-
["hasSstRegNo",
|
|
1666
|
+
["hasSstRegNo", h],
|
|
1630
1667
|
["defaultTaxCodes", n],
|
|
1631
|
-
["inclusiveTaxes",
|
|
1632
|
-
["taxSystemCodes",
|
|
1633
|
-
]),
|
|
1634
|
-
...
|
|
1635
|
-
bundles:
|
|
1636
|
-
const { pf_vouchers:
|
|
1637
|
-
if (!
|
|
1668
|
+
["inclusiveTaxes", $],
|
|
1669
|
+
["taxSystemCodes", d]
|
|
1670
|
+
]), g.map((f) => ({
|
|
1671
|
+
...f,
|
|
1672
|
+
bundles: f.bundles.map((I) => {
|
|
1673
|
+
const { pf_vouchers: M, ...R } = I;
|
|
1674
|
+
if (!h)
|
|
1638
1675
|
return {
|
|
1639
1676
|
...R,
|
|
1640
1677
|
taxes: [],
|
|
1641
1678
|
taxTotals: [],
|
|
1642
1679
|
priceWithTaxes: { ...R.price }
|
|
1643
1680
|
};
|
|
1644
|
-
const q = n, J =
|
|
1681
|
+
const q = n, J = qe(
|
|
1645
1682
|
W.fullTax,
|
|
1646
1683
|
q,
|
|
1647
1684
|
R.price,
|
|
1648
1685
|
Number(R.credit.normal),
|
|
1649
|
-
|
|
1650
|
-
|
|
1686
|
+
$,
|
|
1687
|
+
d
|
|
1651
1688
|
);
|
|
1652
1689
|
return {
|
|
1653
1690
|
...R,
|
|
1654
1691
|
taxes: q,
|
|
1655
1692
|
taxTotals: J,
|
|
1656
|
-
priceWithTaxes:
|
|
1693
|
+
priceWithTaxes: We(
|
|
1657
1694
|
J,
|
|
1658
1695
|
R.price,
|
|
1659
|
-
|
|
1696
|
+
$
|
|
1660
1697
|
)
|
|
1661
1698
|
};
|
|
1662
1699
|
})
|
|
1663
1700
|
}));
|
|
1664
1701
|
}
|
|
1665
|
-
async function ne(
|
|
1666
|
-
const
|
|
1702
|
+
async function ne(g, k, h) {
|
|
1703
|
+
const $ = !h && !!k, d = !!h && !k;
|
|
1667
1704
|
let n;
|
|
1668
|
-
if (
|
|
1669
|
-
const
|
|
1670
|
-
n =
|
|
1671
|
-
taxCode:
|
|
1705
|
+
if ($) {
|
|
1706
|
+
const f = W.taxSystem[0] ? W.systemDefaultCode(W.taxSystem[0].code) : void 0, I = f ? `${f.name} (${f.taxCode})` : o("connect.store.taxPropagation.defaultTax");
|
|
1707
|
+
n = o("connect.store.taxPropagation.addConfirm", {
|
|
1708
|
+
taxCode: I
|
|
1672
1709
|
});
|
|
1673
|
-
} else
|
|
1674
|
-
await
|
|
1710
|
+
} else d ? n = o("connect.store.taxPropagation.removeConfirm") : n = o("connect.store.taxPropagation.updateConfirm");
|
|
1711
|
+
await pe.confirm(
|
|
1675
1712
|
n,
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
) && await
|
|
1713
|
+
o("connect.store.taxPropagation.title"),
|
|
1714
|
+
o("connect.store.taxPropagation.confirm"),
|
|
1715
|
+
o("connect.common.cancel")
|
|
1716
|
+
) && await c(
|
|
1680
1717
|
async () => {
|
|
1681
|
-
const
|
|
1682
|
-
await
|
|
1718
|
+
const f = Fe(i.sortedStoreCategories), I = j(f, g);
|
|
1719
|
+
await ge.updateStoreBundle({ categories: I }), await i.readMemberStore(), await i.readMembership(), await i.readRewards();
|
|
1683
1720
|
},
|
|
1684
1721
|
{
|
|
1685
|
-
message:
|
|
1686
|
-
successMessage:
|
|
1722
|
+
message: o("connect.store.taxPropagation.updating"),
|
|
1723
|
+
successMessage: o("connect.store.taxPropagation.success")
|
|
1687
1724
|
}
|
|
1688
1725
|
);
|
|
1689
1726
|
}
|
|
1690
|
-
async function Z(
|
|
1691
|
-
var
|
|
1692
|
-
const k = ((
|
|
1727
|
+
async function Z(g) {
|
|
1728
|
+
var I, M, R, q;
|
|
1729
|
+
const k = ((M = (I = i.storeOption) == null ? void 0 : I.company) == null ? void 0 : M.sstRegNo) ?? "", h = ae.cloneDeep(
|
|
1693
1730
|
((R = i.storeOption) == null ? void 0 : R.inclusiveTaxes) ?? []
|
|
1694
|
-
),
|
|
1695
|
-
await
|
|
1731
|
+
), $ = ((q = g.company) == null ? void 0 : q.sstRegNo) ?? "";
|
|
1732
|
+
await c(
|
|
1696
1733
|
async () => {
|
|
1697
1734
|
var J;
|
|
1698
|
-
await
|
|
1735
|
+
await ge.updateStore(g), await i.readMemberStore(), (J = l.value) == null || J.showSheet(!1);
|
|
1699
1736
|
},
|
|
1700
1737
|
{
|
|
1701
|
-
message:
|
|
1702
|
-
successMessage:
|
|
1738
|
+
message: o("connect.store.setting.update.message"),
|
|
1739
|
+
successMessage: o("connect.store.setting.update.success")
|
|
1703
1740
|
}
|
|
1704
1741
|
);
|
|
1705
|
-
const
|
|
1706
|
-
|
|
1707
|
-
|
|
1742
|
+
const d = k !== $, n = !ae.isEqual(
|
|
1743
|
+
h,
|
|
1744
|
+
g.inclusiveTaxes ?? []
|
|
1708
1745
|
);
|
|
1709
|
-
!(
|
|
1746
|
+
!(d || n) || i.sortedStoreCategories.flatMap(
|
|
1710
1747
|
(J) => J.bundles
|
|
1711
|
-
).length === 0 || await ne(
|
|
1748
|
+
).length === 0 || await ne(g, $, k);
|
|
1712
1749
|
}
|
|
1713
|
-
async function H(
|
|
1714
|
-
var
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1750
|
+
async function H(g = -1) {
|
|
1751
|
+
var h, $;
|
|
1752
|
+
await Ee({
|
|
1753
|
+
hasStoreCompany: !!((h = i.storeOption) != null && h.company),
|
|
1754
|
+
confirm: () => pe.confirm(
|
|
1755
|
+
o("connect.store.category.setup.title"),
|
|
1756
|
+
o("connect.store.category.setup.button"),
|
|
1757
|
+
o("connect.store.category.setup.action"),
|
|
1758
|
+
o("connect.common.cancel")
|
|
1759
|
+
),
|
|
1760
|
+
showSettingSheet: (d) => {
|
|
1761
|
+
var n;
|
|
1762
|
+
return (n = l.value) == null ? void 0 : n.showSheet(d);
|
|
1763
|
+
}
|
|
1764
|
+
}) && y.open({
|
|
1765
|
+
title: g == -1 ? o("connect.store.category.add") : o("connect.store.category.edit"),
|
|
1766
|
+
contentComponent: $t,
|
|
1725
1767
|
contentComponentProps: {
|
|
1726
|
-
initialValue: ((
|
|
1727
|
-
action:
|
|
1768
|
+
initialValue: (($ = u.value[g]) == null ? void 0 : $.name) ?? "",
|
|
1769
|
+
action: g == -1 ? "add" : "edit"
|
|
1728
1770
|
}
|
|
1729
|
-
}).onPrimary(async (
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
) || await
|
|
1771
|
+
}).onPrimary(async (d) => {
|
|
1772
|
+
d === null && !await pe.remove(
|
|
1773
|
+
o("connect.store.category.remove.confirm"),
|
|
1774
|
+
o("connect.store.category.remove.title")
|
|
1775
|
+
) || await c(
|
|
1734
1776
|
async () => {
|
|
1735
|
-
const
|
|
1736
|
-
await
|
|
1737
|
-
categories:
|
|
1777
|
+
const n = g == -1 ? [...u.value, { name: d, bundles: [] }] : [...u.value].map((p, f) => f == g ? { ...p, name: d } : p).filter((p) => p.name !== null);
|
|
1778
|
+
await ge.updateStoreBundle({
|
|
1779
|
+
categories: n
|
|
1738
1780
|
}), await i.readMemberStore();
|
|
1739
1781
|
},
|
|
1740
1782
|
{
|
|
1741
|
-
message:
|
|
1742
|
-
successMessage:
|
|
1783
|
+
message: d === null ? o("connect.store.category.update.deleting") : g == -1 ? o("connect.store.category.update.creating") : o("connect.store.category.update.updating"),
|
|
1784
|
+
successMessage: d === null ? o("connect.store.category.update.success.deleted") : g == -1 ? o("connect.store.category.update.success.created") : o("connect.store.category.update.success.updated")
|
|
1743
1785
|
}
|
|
1744
1786
|
);
|
|
1745
1787
|
});
|
|
1746
1788
|
}
|
|
1747
|
-
async function z(
|
|
1748
|
-
var p,
|
|
1749
|
-
k ?? (k = (p = w.value) == null ? void 0 : p.target.category),
|
|
1750
|
-
const
|
|
1751
|
-
for (const
|
|
1752
|
-
for (const R of
|
|
1789
|
+
async function z(g, k, h, $) {
|
|
1790
|
+
var p, f, I;
|
|
1791
|
+
k ?? (k = (p = w.value) == null ? void 0 : p.target.category), h ?? (h = (f = w.value) == null ? void 0 : f.target.index), $ ?? ($ = (I = w.value) == null ? void 0 : I.target.originalCategoryIndex);
|
|
1792
|
+
const d = Fe(u.value);
|
|
1793
|
+
for (const M of d)
|
|
1794
|
+
for (const R of M.bundles)
|
|
1753
1795
|
console.log(R, "bundle in payload"), "pf_vouchers" in R && delete R.pf_vouchers;
|
|
1754
|
-
k !=
|
|
1755
|
-
const n =
|
|
1796
|
+
k != $ && $ != null && (d[$].bundles.splice(h, 1), h = d[k].bundles.length);
|
|
1797
|
+
const n = d[k];
|
|
1756
1798
|
if (!n) {
|
|
1757
|
-
|
|
1799
|
+
rt.error("Unexpected error", 2e3);
|
|
1758
1800
|
return;
|
|
1759
1801
|
}
|
|
1760
|
-
if (
|
|
1761
|
-
if (await
|
|
1762
|
-
|
|
1763
|
-
|
|
1802
|
+
if (g == null) {
|
|
1803
|
+
if (await pe.remove(
|
|
1804
|
+
o("connect.store.bundle.delete.confirm"),
|
|
1805
|
+
o("connect.store.bundle.delete.title")
|
|
1764
1806
|
) == !1)
|
|
1765
1807
|
return;
|
|
1766
|
-
n.bundles.splice(
|
|
1808
|
+
n.bundles.splice(h, 1);
|
|
1767
1809
|
} else
|
|
1768
|
-
|
|
1769
|
-
await
|
|
1810
|
+
h == -1 ? n.bundles.push(g) : n.bundles[h] = g;
|
|
1811
|
+
await c(
|
|
1770
1812
|
async () => {
|
|
1771
|
-
var
|
|
1772
|
-
if (
|
|
1773
|
-
const q = (
|
|
1774
|
-
q === null &&
|
|
1813
|
+
var M, R;
|
|
1814
|
+
if (g != null) {
|
|
1815
|
+
const q = (M = w.value) == null ? void 0 : M.bundleImage;
|
|
1816
|
+
q === null && g.image ? (await Ve.delete(g.image), g.image = null) : q && (g.image = await Ve.update(
|
|
1775
1817
|
Ve.bundleImagePath(void 0, q),
|
|
1776
1818
|
q
|
|
1777
1819
|
));
|
|
1778
1820
|
}
|
|
1779
|
-
await
|
|
1780
|
-
categories:
|
|
1821
|
+
await ge.updateStoreBundle({
|
|
1822
|
+
categories: d
|
|
1781
1823
|
}), await i.readMemberStore(), await i.readMembership(), await i.readRewards(), (R = w.value) == null || R.showSheet(!1);
|
|
1782
1824
|
},
|
|
1783
1825
|
{
|
|
1784
|
-
message: `${
|
|
1785
|
-
successMessage: `Bundle ${
|
|
1826
|
+
message: `${g == null ? "Deleting" : h == -1 ? "Creating" : "Updating"} bundle`,
|
|
1827
|
+
successMessage: `Bundle ${g == null ? "deleted" : h == -1 ? "created" : "updated"} successfully`
|
|
1786
1828
|
}
|
|
1787
1829
|
);
|
|
1788
1830
|
}
|
|
1789
|
-
function oe(
|
|
1831
|
+
function oe(g) {
|
|
1790
1832
|
var k;
|
|
1791
|
-
(
|
|
1792
|
-
|
|
1793
|
-
|
|
1833
|
+
Ee({
|
|
1834
|
+
hasStoreCompany: !!((k = i.storeOption) != null && k.company),
|
|
1835
|
+
confirm: () => pe.confirm(
|
|
1836
|
+
o("connect.store.category.setup.title"),
|
|
1837
|
+
o("connect.store.category.setup.button"),
|
|
1838
|
+
o("connect.store.category.setup.action"),
|
|
1839
|
+
o("connect.common.cancel")
|
|
1840
|
+
),
|
|
1841
|
+
showSettingSheet: (h) => {
|
|
1842
|
+
var $;
|
|
1843
|
+
return ($ = l.value) == null ? void 0 : $.showSheet(h);
|
|
1844
|
+
}
|
|
1845
|
+
}).then((h) => {
|
|
1846
|
+
var $;
|
|
1847
|
+
h && (($ = w.value) == null || $.showSheet(!0, {
|
|
1848
|
+
...g,
|
|
1849
|
+
bundle: g.bundle ? Fe(g.bundle) : void 0
|
|
1850
|
+
}));
|
|
1794
1851
|
});
|
|
1795
1852
|
}
|
|
1796
|
-
const F =
|
|
1797
|
-
function
|
|
1853
|
+
const F = N([]);
|
|
1854
|
+
function ie(g) {
|
|
1798
1855
|
var k;
|
|
1799
|
-
(k =
|
|
1800
|
-
bundle:
|
|
1856
|
+
(k = a.value) == null || k.showSheet({
|
|
1857
|
+
bundle: g
|
|
1801
1858
|
});
|
|
1802
1859
|
}
|
|
1803
|
-
return
|
|
1804
|
-
var k,
|
|
1860
|
+
return he(async () => {
|
|
1861
|
+
var k, h;
|
|
1805
1862
|
await t(async () => {
|
|
1806
|
-
var
|
|
1807
|
-
if (await i.readMemberStore(), await i.readMembership(), await i.readRewards(), await i.readPayoutAccount(), (
|
|
1808
|
-
switch ((
|
|
1863
|
+
var $, d;
|
|
1864
|
+
if (await i.readMemberStore(), await i.readMembership(), await i.readRewards(), await i.readPayoutAccount(), ($ = m.currentRoute.value.query) != null && $.action) {
|
|
1865
|
+
switch ((d = m.currentRoute.value.query) == null ? void 0 : d.action) {
|
|
1809
1866
|
case "update_setting":
|
|
1810
|
-
|
|
1867
|
+
U("setting");
|
|
1811
1868
|
break;
|
|
1812
1869
|
case "create_category":
|
|
1813
1870
|
H(-1);
|
|
1814
1871
|
break;
|
|
1815
1872
|
case "create_feedvibe_bundle":
|
|
1816
|
-
|
|
1873
|
+
y.open({
|
|
1817
1874
|
title: "Select category",
|
|
1818
|
-
contentComponent:
|
|
1875
|
+
contentComponent: It
|
|
1819
1876
|
}).onPrimary((n) => {
|
|
1820
|
-
|
|
1877
|
+
y.close(), oe({
|
|
1821
1878
|
categories: T.value,
|
|
1822
1879
|
category: n,
|
|
1823
1880
|
index: -1,
|
|
@@ -1830,58 +1887,58 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1830
1887
|
}).toObject()
|
|
1831
1888
|
}
|
|
1832
1889
|
});
|
|
1833
|
-
}).onTertiary(() =>
|
|
1890
|
+
}).onTertiary(() => y.close());
|
|
1834
1891
|
break;
|
|
1835
1892
|
}
|
|
1836
|
-
|
|
1893
|
+
m.replace({ query: {} });
|
|
1837
1894
|
}
|
|
1838
1895
|
});
|
|
1839
|
-
const
|
|
1896
|
+
const g = ((k = i.payoutAccount) == null ? void 0 : k.status) === "APPROVED" && ((h = i.payoutAccount) == null ? void 0 : h.enable) === !0;
|
|
1840
1897
|
F.value = [
|
|
1841
|
-
...
|
|
1842
|
-
|
|
1898
|
+
...g ? [] : [S],
|
|
1899
|
+
b,
|
|
1843
1900
|
s,
|
|
1844
1901
|
v
|
|
1845
1902
|
];
|
|
1846
|
-
}), (
|
|
1847
|
-
const
|
|
1848
|
-
return
|
|
1849
|
-
r(
|
|
1850
|
-
title: e(
|
|
1903
|
+
}), (g, k) => {
|
|
1904
|
+
const h = _("FmPageHead"), $ = _("FmButton"), d = _("FmCard");
|
|
1905
|
+
return x(), D(Y, null, [
|
|
1906
|
+
r(h, {
|
|
1907
|
+
title: e(o)("connect.store.title"),
|
|
1851
1908
|
actions: e(F),
|
|
1852
|
-
"onClick:action":
|
|
1909
|
+
"onClick:action": U
|
|
1853
1910
|
}, null, 8, ["title", "actions"]),
|
|
1854
|
-
V("div",
|
|
1855
|
-
e(
|
|
1856
|
-
(
|
|
1911
|
+
V("div", vn, [
|
|
1912
|
+
e(u) && e(u).length > 0 ? (x(), D(Y, { key: 0 }, [
|
|
1913
|
+
(x(!0), D(Y, null, ce(e(u), (n, p) => (x(), D("div", {
|
|
1857
1914
|
key: n.name,
|
|
1858
1915
|
class: "space-y-8 py-12"
|
|
1859
1916
|
}, [
|
|
1860
|
-
V("div",
|
|
1861
|
-
V("div",
|
|
1917
|
+
V("div", hn, [
|
|
1918
|
+
V("div", xn, K(n.name), 1),
|
|
1862
1919
|
r(ke, { json: n }, null, 8, ["json"]),
|
|
1863
|
-
r(
|
|
1920
|
+
r($, {
|
|
1864
1921
|
icon: "edit",
|
|
1865
1922
|
size: "md",
|
|
1866
1923
|
variant: "tertiary",
|
|
1867
|
-
onClick: (
|
|
1924
|
+
onClick: (f) => H(p)
|
|
1868
1925
|
}, null, 8, ["onClick"])
|
|
1869
1926
|
]),
|
|
1870
|
-
V("div",
|
|
1871
|
-
(
|
|
1872
|
-
bundle:
|
|
1873
|
-
key:
|
|
1874
|
-
onEdit: (
|
|
1875
|
-
bundle:
|
|
1927
|
+
V("div", Cn, [
|
|
1928
|
+
(x(!0), D(Y, null, ce(n.bundles, (f, I) => (x(), O(Vt, {
|
|
1929
|
+
bundle: f,
|
|
1930
|
+
key: f._id,
|
|
1931
|
+
onEdit: (M) => oe({
|
|
1932
|
+
bundle: f,
|
|
1876
1933
|
category: p,
|
|
1877
|
-
index:
|
|
1934
|
+
index: I,
|
|
1878
1935
|
categories: e(T)
|
|
1879
1936
|
}),
|
|
1880
|
-
onDelete: (
|
|
1881
|
-
onSend:
|
|
1937
|
+
onDelete: (M) => z(null, p, I),
|
|
1938
|
+
onSend: ie
|
|
1882
1939
|
}, null, 8, ["bundle", "onEdit", "onDelete"]))), 128)),
|
|
1883
|
-
r(
|
|
1884
|
-
onCreate: (
|
|
1940
|
+
r(wt, {
|
|
1941
|
+
onCreate: (f) => oe({
|
|
1885
1942
|
category: p,
|
|
1886
1943
|
index: -1,
|
|
1887
1944
|
categories: e(T)
|
|
@@ -1889,42 +1946,42 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1889
1946
|
}, null, 8, ["onCreate"])
|
|
1890
1947
|
])
|
|
1891
1948
|
]))), 128)),
|
|
1892
|
-
r(
|
|
1949
|
+
r(pn, {
|
|
1893
1950
|
ref_key: "bundleSheetRef",
|
|
1894
1951
|
ref: w,
|
|
1895
1952
|
onUpdate: z
|
|
1896
1953
|
}, null, 512)
|
|
1897
|
-
], 64)) : (
|
|
1954
|
+
], 64)) : (x(), O(d, {
|
|
1898
1955
|
key: 1,
|
|
1899
1956
|
variant: "outlined",
|
|
1900
1957
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
1901
1958
|
}, {
|
|
1902
|
-
default:
|
|
1959
|
+
default: B(() => [
|
|
1903
1960
|
k[1] || (k[1] = V("img", {
|
|
1904
|
-
src:
|
|
1961
|
+
src: Xe,
|
|
1905
1962
|
class: "aspect-square w-[150px]"
|
|
1906
1963
|
}, null, -1)),
|
|
1907
|
-
V("div",
|
|
1908
|
-
V("div", _n, K(e(
|
|
1909
|
-
V("div",
|
|
1964
|
+
V("div", Sn, [
|
|
1965
|
+
V("div", _n, K(e(o)("connect.store.bundle.title")), 1),
|
|
1966
|
+
V("div", Fn, K(e(o)("connect.store.bundle.description")), 1)
|
|
1910
1967
|
]),
|
|
1911
|
-
r(
|
|
1968
|
+
r($, {
|
|
1912
1969
|
variant: "primary",
|
|
1913
|
-
label: e(
|
|
1970
|
+
label: e(o)("connect.store.actions.addCategory"),
|
|
1914
1971
|
icon: "add",
|
|
1915
1972
|
onClick: k[0] || (k[0] = (n) => H(-1))
|
|
1916
1973
|
}, null, 8, ["label"])
|
|
1917
1974
|
]),
|
|
1918
1975
|
_: 1
|
|
1919
1976
|
})),
|
|
1920
|
-
r(
|
|
1977
|
+
r(Xt, {
|
|
1921
1978
|
ref_key: "settingSheetRef",
|
|
1922
1979
|
ref: l,
|
|
1923
1980
|
onUpdate: Z
|
|
1924
1981
|
}, null, 512),
|
|
1925
|
-
r(
|
|
1982
|
+
r(bn, {
|
|
1926
1983
|
ref_key: "sendBundleSheetRef",
|
|
1927
|
-
ref:
|
|
1984
|
+
ref: a
|
|
1928
1985
|
}, null, 512)
|
|
1929
1986
|
])
|
|
1930
1987
|
], 64);
|
|
@@ -1932,5 +1989,5 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1932
1989
|
}
|
|
1933
1990
|
});
|
|
1934
1991
|
export {
|
|
1935
|
-
|
|
1992
|
+
to as default
|
|
1936
1993
|
};
|