@feedmepos/mf-connect 0.1.38-beta.69 → 0.1.38-beta.70
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-CHjBLSET.js → Analytic-qVhEo_im.js} +14 -14
- package/dist/{App-C1xIj-B0.js → App-Ixv1jrHc.js} +7 -7
- package/dist/{AuditLogs-Dki6qsI-.js → AuditLogs-B2D62tMF.js} +9 -9
- package/dist/{Bin-ttFSC2lf.js → Bin-Lj7jtS9m.js} +8 -8
- package/dist/{Broadcast-Cz_pjrR6.js → Broadcast-BpP9VJsx.js} +10 -10
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-jQ8AgB-p.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BB43gKXv.js} +6 -6
- package/dist/{Card-BaNfbyIP.js → Card-CjArjpou.js} +17 -17
- package/dist/{Collections-DZctA4hK.js → Collections-CFzUAHxz.js} +7 -7
- package/dist/{Credit-BYJWTi-b.js → Credit-D43x-T3d.js} +10 -10
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BXqC2jJb.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DlgTeQLe.js} +33 -33
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Cun-ghGF.js → EffectSheet.vue_vue_type_style_index_0_lang-9UhSzClJ.js} +6 -6
- package/dist/{Experience-dWjLOoui.js → Experience-BaUbRoHV.js} +10 -10
- package/dist/{FileSaver.min-BZHXGiQH.js → FileSaver.min-BO_rbswB.js} +1 -1
- package/dist/{Game-DeXSmFww.js → Game-DaVqgPWQ.js} +11 -11
- package/dist/{GenerateMaterial-B_uWYDyj.js → GenerateMaterial-DJM8fZyl.js} +6 -6
- package/dist/{Grab-BKcVVW_I.js → Grab-CykZDrWI.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-Bbx9DDzu.js → ImageInput.vue_vue_type_script_setup_true_lang-C51yGAp9.js} +1 -1
- package/dist/{Index-CSb87tjr.js → Index-Do3WIIfM.js} +10 -10
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BCkKQUoM.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BjdBaj4c.js} +1 -1
- package/dist/{MainLayout-CpEOM8Wc.js → MainLayout-DD-OlYxZ.js} +1 -1
- package/dist/{Marketing-ClRXLCul.js → Marketing-C9bsnUaQ.js} +4 -4
- package/dist/{MarketingMaterialEdit-CJW-eGTF.js → MarketingMaterialEdit-CbSh8dpn.js} +4 -4
- package/dist/{Member-_oGCdXUL.js → Member-IcVRwAAS.js} +11 -11
- package/dist/{MemberList-C8m7EtI5.js → MemberList-C_A4PrQN.js} +25 -25
- package/dist/{MemberTransactions-COilUChO.js → MemberTransactions-CBoaY-gv.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-3awjwsoo.js → MessageInput.vue_vue_type_script_setup_true_lang-Dx28XNPi.js} +8 -8
- package/dist/{Mission-QhcGGV4d.js → Mission-COY_uhwz.js} +11 -11
- package/dist/{Overview-BAVHQHWB.js → Overview-DDSz2R4K.js} +18 -18
- package/dist/{Point-D0xZ5rrR.js → Point-C-KEwgx4.js} +10 -10
- package/dist/{Promotion-C4IE0Qbc.js → Promotion-BpW9qWzf.js} +11 -11
- package/dist/{Queue-DurTWu5p.js → Queue-CO32O8i6.js} +10 -10
- package/dist/{Record-CFMWd4O2.js → Record-BrT5DR9L.js} +9 -9
- package/dist/{Reward-CHqVLyQb.js → Reward-CbrEw-If.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BOs0aSOO.js → RewardGroup.vue_vue_type_script_setup_true_lang-CpNjlbjZ.js} +11 -11
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BS5jsRiN.js +1912 -0
- package/dist/{Segment-DLPq88Ky.js → Segment-Cu9_qwXc.js} +24 -24
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-D3CO54II.js → SelectItems.vue_vue_type_script_setup_true_lang-BH-hzxSs.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-LzGBxhRf.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DGm3gujH.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CL7fIjz8.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DcUb8X-q.js} +4 -4
- package/dist/Setting-CQKfb5b_.js +1999 -0
- package/dist/{SettingAdvertisements-DPzlV5EE.js → SettingAdvertisements-BxR6Gl-5.js} +11 -11
- package/dist/{Store-O1-8l-R3.js → Store-6TUpmqAr.js} +287 -283
- package/dist/{StoreRewards-l0gYOgXi.js → StoreRewards-BOThAOWU.js} +14 -14
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-cQXkAOhr.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BYD229dz.js} +19 -19
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CAamZtdf.js +7005 -0
- package/dist/{Tier-hKiEGb6o.js → Tier-MF-ad-xm.js} +23 -23
- package/dist/{Title-D-KimgP5.js → Title-MkjTHBzb.js} +20 -20
- package/dist/{Transaction-Cdd_JyrK.js → Transaction-trYJwTrc.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CMW8EAdN.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DwlNK1TC.js} +6 -6
- package/dist/{Voucher-Dfc73Csg.js → Voucher-BD5dTdht.js} +14 -14
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-T8H35FPU.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BhR_s48Q.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BZNmcUU3.js → ZodTextField.vue_vue_type_script_setup_true_lang-CcTe5TJL.js} +2 -2
- package/dist/{app-CPwdgRZv.js → app-CybjF-6Q.js} +550 -265
- package/dist/app.js +1 -1
- package/dist/{business-BaWiU14d.js → business-2hCbD0JX.js} +1 -1
- package/dist/{campaign-CjorwtX0.js → campaign-Bv-8uM2S.js} +2 -2
- package/dist/{campaign-CDz0jHT_.js → campaign-h1J8NTAo.js} +8 -8
- package/dist/{campaign.enum-DYEesXC5.js → campaign.enum-Dea0E4o1.js} +1 -1
- package/dist/{campaign.fn-DpVmqfwa.js → campaign.fn-DqxZMyu0.js} +3 -3
- package/dist/{collectible.enum-C4KUmspK.js → collectible.enum-DOyAoz4F.js} +1 -1
- package/dist/{collection.fn-DSYVoV0Q.js → collection.fn-DU2HuZod.js} +2 -2
- package/dist/{dto-Da7ErVjD.js → dto-CT65-FHY.js} +4 -4
- package/dist/{duplicateCampaign-9jH_zm0I.js → duplicateCampaign-YJGHvOqb.js} +2 -2
- package/dist/{effect-DU7hFznC.js → effect-XZ767UQ4.js} +1 -1
- package/dist/{email-addresses-DaG6NhSR.js → email-addresses-DSgkxSnV.js} +2 -2
- package/dist/{export-DQ7mAt1L.js → export-4gx5C9s9.js} +2 -2
- package/dist/{helper-DoitYM-F.js → helper-HOLsJca3.js} +1 -1
- package/dist/{index-BHXZzBnz.js → index-BO7N-s4K.js} +3 -3
- package/dist/{index-D4IBwcT5.js → index-BfRa1sI3.js} +3 -3
- package/dist/{index-DxSN3k9t.js → index-BnCtmlvU.js} +2 -2
- package/dist/{index-YFu3E6Ag.js → index-C5VvGYtP.js} +1 -1
- package/dist/{index-D1fonJ2y.js → index-CSzvYzf4.js} +4 -4
- package/dist/{index-BzjRqjaa.js → index-CrdkPXsx.js} +1 -1
- package/dist/{index-CDCOpWhV.js → index-CxE-VVlL.js} +1 -1
- package/dist/{index-Cq6KrPV_.js → index-Djenbz3F.js} +1 -1
- package/dist/{index-T4Vlp9cv.js → index-IHteBJ_D.js} +1 -1
- package/dist/{index-BkpmY2GE.js → index-dUhOAfj9.js} +6 -6
- package/dist/{index-CkZ9FtS6.js → index-wm4nGBB_.js} +3 -3
- package/dist/{index-CaZnCYlf.js → index-xTrAj026.js} +1 -1
- package/dist/{index-COWak_tY.js → index-yViT18i_.js} +1 -1
- package/dist/{index.esm2017-B4OXxsXJ.js → index.esm2017-Wq4FUMEv.js} +1 -1
- package/dist/{loading-DlBFOncH.js → loading-D22xapd8.js} +2 -2
- package/dist/{lodash-DYkOiP6W.js → lodash-HM6bxuWV.js} +1 -1
- package/dist/{membership-Ba48hky6.js → membership-CX464ZBI.js} +3 -3
- package/dist/{money-DzYV_AqB.js → money-B3cPZAZu.js} +1 -1
- package/dist/{number-DZhr2aQi.js → number-DT65dEZt.js} +1 -1
- package/dist/{objectid-lBGc5CTo.js → objectid-DZWw4iLL.js} +10 -10
- package/dist/{plugins-DnfvdXvl.js → plugins-D-4BlIGs.js} +3 -3
- package/dist/{reward-BDRlCjZq.js → reward-C6B-kn0X.js} +1 -1
- package/dist/{rule-CXgUDav7.js → rule-B94SrDX1.js} +3 -3
- package/dist/{rule-builder-K8ZRQKcJ.js → rule-builder-CQ3uHeX4.js} +1 -1
- package/dist/{template-B7SczDYk.js → template-CXB2Ez2S.js} +6 -6
- package/dist/{timezone-CVrjbFra.js → timezone-D3NuV-rx.js} +2 -2
- package/dist/{trigger-C07rM7Na.js → trigger-BsCVC_nU.js} +5 -5
- package/dist/{usePagination-dYbEzX5Y.js → usePagination-BOZ0-D67.js} +1 -1
- package/dist/{user-BSrjSLnx.js → user-Dxp7kluY.js} +1 -1
- package/dist/{vue-i18n-DBanfH9w.js → vue-i18n-DpCWu1gI.js} +2 -2
- package/dist/{xlsx-PsqFEjbr.js → xlsx-Cc2a2IL9.js} +440 -440
- package/dist/{zod-ph5Ab9oy.js → zod-BCSHGdXs.js} +1 -1
- package/package.json +1 -1
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dyfa78rG.js +0 -1790
- package/dist/Setting-BTmw7C4E.js +0 -1992
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BjawHGS0.js +0 -8093
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { defineComponent as te, computed as L, resolveComponent as
|
|
1
|
+
import { defineComponent as te, computed as L, resolveComponent as S, openBlock as x, createBlock as O, withCtx as B, createElementVNode as F, toDisplayString as K, createVNode as r, createCommentVNode as E, createElementBlock as D, 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
2
|
import { _ as Xe } from "./tier-BJDhpH6X.js";
|
|
3
3
|
import { useDialog as je, useDialogChild as Le, components as Ze } from "@feedmepos/ui-library";
|
|
4
|
-
import { c as A, e as
|
|
5
|
-
import { m as ge, u as Ke } from "./loading-
|
|
6
|
-
import { u as
|
|
7
|
-
import { m as et, n as tt, o as nt, p as Ae, q as ot } from "./index-
|
|
4
|
+
import { c as A, e as _e, S as Qe } from "./index-BnCtmlvU.js";
|
|
5
|
+
import { m as ge, u as Ke } from "./loading-D22xapd8.js";
|
|
6
|
+
import { u as ke, C as ye } from "./membership-CX464ZBI.js";
|
|
7
|
+
import { m as et, n as tt, o as nt, p as Ae, q as ot } from "./index-CSzvYzf4.js";
|
|
8
8
|
import { a as at, c as Fe } from "./object-qECH92oz.js";
|
|
9
|
-
import { _ as ae } from "./lodash-
|
|
10
|
-
import { c as ue } from "./index-
|
|
11
|
-
import { u as xe } from "./vue-i18n-
|
|
12
|
-
import { Z as Q, g as G, a as X } from "./zod-
|
|
13
|
-
import { z as ee, R as lt } from "./app-
|
|
14
|
-
import { u as
|
|
15
|
-
import { _ as le } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
import { a as st, p as pe, n as rt, f as Ve } from "./plugins-
|
|
17
|
-
import { J as
|
|
18
|
-
import { _ as it } from "./index-
|
|
19
|
-
import { _ as dt } from "./ImageInput.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { _ as ae } from "./lodash-HM6bxuWV.js";
|
|
10
|
+
import { c as ue } from "./index-wm4nGBB_.js";
|
|
11
|
+
import { u as xe } from "./vue-i18n-DpCWu1gI.js";
|
|
12
|
+
import { Z as Q, g as G, a as X } from "./zod-BCSHGdXs.js";
|
|
13
|
+
import { z as ee, R as lt } from "./app-CybjF-6Q.js";
|
|
14
|
+
import { u as Se } from "./app-wDQR6dpb.js";
|
|
15
|
+
import { _ as le } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CcTe5TJL.js";
|
|
16
|
+
import { a as st, p as pe, n as rt, f as Ve } from "./plugins-D-4BlIGs.js";
|
|
17
|
+
import { J as Te } from "./JsonViewer-v8_C7l5N.js";
|
|
18
|
+
import { _ as it } from "./index-BO7N-s4K.js";
|
|
19
|
+
import { _ as dt } from "./ImageInput.vue_vue_type_script_setup_true_lang-C51yGAp9.js";
|
|
20
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-
|
|
22
|
-
import { F as pt } from "./number-
|
|
23
|
-
import { a as ft, t as yt } from "./helper-
|
|
24
|
-
import "./index-
|
|
25
|
-
import "./index-
|
|
26
|
-
import "./index-
|
|
27
|
-
import { m as bt } from "./index-
|
|
21
|
+
import { z as ct, a as mt } from "./money-B3cPZAZu.js";
|
|
22
|
+
import { F as pt } from "./number-DT65dEZt.js";
|
|
23
|
+
import { a as ft, t as yt } from "./helper-HOLsJca3.js";
|
|
24
|
+
import "./index-Djenbz3F.js";
|
|
25
|
+
import "./index-dUhOAfj9.js";
|
|
26
|
+
import "./index-BfRa1sI3.js";
|
|
27
|
+
import { m as bt } from "./index-CxE-VVlL.js";
|
|
28
28
|
import { useRouter as gt } from "vue-router";
|
|
29
29
|
function He(C) {
|
|
30
30
|
return ue.DineroFactory(C).toUnit();
|
|
31
31
|
}
|
|
32
|
-
function qe(C,
|
|
32
|
+
function qe(C, _, o, b, s = [], v = []) {
|
|
33
33
|
const a = it.compact(
|
|
34
|
-
|
|
34
|
+
_.map((t) => C.find((c) => c.systemCode === t.systemCode && c.taxCode === t.taxCode)).filter((t) => !!t && v.includes(t.systemCode))
|
|
35
35
|
), m = a.reduce(
|
|
36
36
|
(t, c) => {
|
|
37
37
|
var y;
|
|
@@ -83,23 +83,23 @@ function qe(C, S, o, b, s = [], v = []) {
|
|
|
83
83
|
}).convertPrecision(2).toObject()
|
|
84
84
|
}));
|
|
85
85
|
}
|
|
86
|
-
function We(C,
|
|
86
|
+
function We(C, _, o) {
|
|
87
87
|
return C ? C.reduce((b, s) => {
|
|
88
88
|
var v;
|
|
89
89
|
return (v = o.find((a) => a.systemCode === s.systemCode)) != null && v.inclusive || (b = ue.DineroFactory(b.toObject()).add(s.total)), b;
|
|
90
|
-
}, ue.DineroFactory(
|
|
90
|
+
}, ue.DineroFactory(_)).toObject() : ue.DineroFactory(_).toObject();
|
|
91
91
|
}
|
|
92
|
-
const vt = { class: "relative h-[120px] aspect-video flex items-center justify-center border rounded-md border-fm-color-neutral-gray-300" },
|
|
92
|
+
const vt = { class: "flex justify-between items-start gap-4 w-full" }, ht = { class: "fm-typo-en-body-lg-600 text-left pt-4 break-words line-clamp-2" }, xt = { class: "flex-shrink-0 -mr-8 -mt-8" }, Ct = { class: "relative h-[120px] aspect-video flex mx-auto items-center justify-center border rounded-md border-fm-color-neutral-gray-300" }, _t = ["src"], St = {
|
|
93
93
|
key: 2,
|
|
94
94
|
class: "absolute top-2 left-2"
|
|
95
|
-
},
|
|
95
|
+
}, Ft = { class: "flex flex-col gap-8 flex-1 text-left w-full" }, Vt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, wt = { class: "flex gap-8 items-center flex-wrap" }, Pt = /* @__PURE__ */ te({
|
|
96
96
|
__name: "StoreBundleCard",
|
|
97
97
|
props: {
|
|
98
98
|
bundle: { type: Object, required: !0 }
|
|
99
99
|
},
|
|
100
100
|
emits: ["edit", "delete", "send"],
|
|
101
|
-
setup(C, { emit:
|
|
102
|
-
const o = C, b =
|
|
101
|
+
setup(C, { emit: _ }) {
|
|
102
|
+
const o = C, b = _, s = L(() => {
|
|
103
103
|
const a = [];
|
|
104
104
|
return o.bundle.price.amount > 0 && a.push(
|
|
105
105
|
`${A.Config.getCountry().currency.symbol}${He(o.bundle.price)}`
|
|
@@ -114,57 +114,40 @@ const vt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
114
114
|
return a;
|
|
115
115
|
});
|
|
116
116
|
return (a, m) => {
|
|
117
|
-
const i =
|
|
118
|
-
return x(), O(
|
|
117
|
+
const i = S("FmButton"), t = S("FmMenuItem"), c = S("FmMenu"), y = S("FmIcon"), u = S("FmChip"), k = S("FmCard");
|
|
118
|
+
return x(), O(k, {
|
|
119
119
|
variant: "outlined",
|
|
120
|
-
class: "flex flex-col gap-y-8 p-16 min-h-[240px] h-full
|
|
120
|
+
class: "flex flex-col gap-y-8 p-16 min-h-[240px] h-full"
|
|
121
121
|
}, {
|
|
122
122
|
default: B(() => [
|
|
123
|
-
|
|
124
|
-
C.bundle.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
class: "w-full h-full object-contain aspect-video"
|
|
128
|
-
}, null, 8, ht)) : (x(), O(i, {
|
|
129
|
-
key: 0,
|
|
130
|
-
name: "image",
|
|
131
|
-
outline: !0,
|
|
132
|
-
size: "md",
|
|
133
|
-
class: "text-fm-color-neutral-gray-200"
|
|
134
|
-
})),
|
|
135
|
-
C.bundle.isFeedvibe ? (x(), D("div", xt, [
|
|
136
|
-
r(t, {
|
|
137
|
-
label: "Feedvibe",
|
|
138
|
-
class: "text-fm-color-primary bg-fm-color-system-warning-100",
|
|
139
|
-
compact: ""
|
|
140
|
-
})
|
|
141
|
-
])) : E("", !0),
|
|
142
|
-
V("div", Ct, [
|
|
143
|
-
r(u, { placement: "bottom-end" }, {
|
|
123
|
+
F("div", vt, [
|
|
124
|
+
F("div", ht, K(C.bundle.name), 1),
|
|
125
|
+
F("div", xt, [
|
|
126
|
+
r(c, { placement: "bottom-end" }, {
|
|
144
127
|
"menu-button": B(() => [
|
|
145
|
-
r(
|
|
128
|
+
r(i, {
|
|
146
129
|
icon: "more_vert",
|
|
147
130
|
variant: "tertiary"
|
|
148
131
|
})
|
|
149
132
|
]),
|
|
150
133
|
default: B(() => [
|
|
151
|
-
r(
|
|
134
|
+
r(t, {
|
|
152
135
|
onClick: m[0] || (m[0] = (l) => b("edit", C.bundle)),
|
|
153
136
|
icon: "edit",
|
|
154
137
|
label: "Edit"
|
|
155
138
|
}),
|
|
156
|
-
C.bundle.stripePriceId ? E("", !0) : (x(), O(
|
|
139
|
+
C.bundle.stripePriceId ? E("", !0) : (x(), O(t, {
|
|
157
140
|
key: 0,
|
|
158
141
|
onClick: m[1] || (m[1] = (l) => b("send", C.bundle)),
|
|
159
142
|
icon: "send",
|
|
160
143
|
label: "Send"
|
|
161
144
|
})),
|
|
162
|
-
r(
|
|
145
|
+
r(t, {
|
|
163
146
|
onClick: m[2] || (m[2] = (l) => b("delete", C.bundle)),
|
|
164
147
|
icon: "delete"
|
|
165
148
|
}, {
|
|
166
149
|
label: B(() => [...m[3] || (m[3] = [
|
|
167
|
-
|
|
150
|
+
F("div", { class: "text-fm-color-typo-error fm-typo-en-body-md-400" }, " Delete ", -1)
|
|
168
151
|
])]),
|
|
169
152
|
_: 1
|
|
170
153
|
})
|
|
@@ -173,26 +156,47 @@ const vt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
173
156
|
})
|
|
174
157
|
])
|
|
175
158
|
]),
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
159
|
+
F("div", Ct, [
|
|
160
|
+
C.bundle.image ? (x(), D("img", {
|
|
161
|
+
key: 1,
|
|
162
|
+
src: C.bundle.image,
|
|
163
|
+
class: "w-full h-full object-contain aspect-video"
|
|
164
|
+
}, null, 8, _t)) : (x(), O(y, {
|
|
165
|
+
key: 0,
|
|
166
|
+
name: "image",
|
|
167
|
+
outline: !0,
|
|
168
|
+
size: "md",
|
|
169
|
+
class: "text-fm-color-neutral-gray-200"
|
|
170
|
+
})),
|
|
171
|
+
C.bundle.isFeedvibe ? (x(), D("div", St, [
|
|
172
|
+
r(u, {
|
|
173
|
+
label: "Feedvibe",
|
|
174
|
+
class: "text-fm-color-primary bg-fm-color-system-warning-100",
|
|
175
|
+
compact: ""
|
|
176
|
+
})
|
|
177
|
+
])) : E("", !0)
|
|
178
|
+
]),
|
|
179
|
+
F("div", Ft, [
|
|
180
|
+
F("div", Vt, K(e(s) || "Free"), 1),
|
|
181
|
+
F("div", wt, [
|
|
182
|
+
(x(!0), D(Y, null, ce(e(v), (l, w) => (x(), O(u, {
|
|
183
|
+
key: w,
|
|
184
|
+
label: l
|
|
185
|
+
}, null, 8, ["label"]))), 128))
|
|
186
|
+
])
|
|
183
187
|
])
|
|
184
188
|
]),
|
|
185
189
|
_: 1
|
|
186
190
|
});
|
|
187
191
|
};
|
|
188
192
|
}
|
|
189
|
-
}),
|
|
193
|
+
}), kt = /* @__PURE__ */ te({
|
|
190
194
|
__name: "AddBundleCard",
|
|
191
195
|
emits: ["create"],
|
|
192
|
-
setup(C, { emit:
|
|
193
|
-
const { t: o } = xe(), b =
|
|
196
|
+
setup(C, { emit: _ }) {
|
|
197
|
+
const { t: o } = xe(), b = _;
|
|
194
198
|
return (s, v) => {
|
|
195
|
-
const a =
|
|
199
|
+
const a = S("FmButton"), m = S("FmCard");
|
|
196
200
|
return x(), O(m, {
|
|
197
201
|
variant: "outlined",
|
|
198
202
|
class: "flex flex-col gap-y-8 p-16 h-full min-h-[240px] items-center justify-center"
|
|
@@ -209,7 +213,7 @@ const vt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
209
213
|
});
|
|
210
214
|
};
|
|
211
215
|
}
|
|
212
|
-
}),
|
|
216
|
+
}), Tt = { class: "space-y-16" }, $t = { class: "flex w-full justify-between pb-16" }, Ut = { class: "flex items-center justify-end gap-8" }, Rt = /* @__PURE__ */ te({
|
|
213
217
|
__name: "CategoryDialog",
|
|
214
218
|
props: {
|
|
215
219
|
action: {
|
|
@@ -222,7 +226,7 @@ const vt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
222
226
|
}
|
|
223
227
|
},
|
|
224
228
|
setup(C) {
|
|
225
|
-
const { t:
|
|
229
|
+
const { t: _ } = xe(), o = C, b = je(), { emitData: s, emitAction: v } = Le(), a = N(o.initialValue), m = ee.string().min(1);
|
|
226
230
|
function i() {
|
|
227
231
|
s(a.value), v("primary"), b.close();
|
|
228
232
|
}
|
|
@@ -230,31 +234,31 @@ const vt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
230
234
|
s(null), v("primary"), b.close();
|
|
231
235
|
}
|
|
232
236
|
return (c, y) => {
|
|
233
|
-
const u =
|
|
234
|
-
return x(), D("div",
|
|
237
|
+
const u = S("FmTextField"), k = S("FmButton");
|
|
238
|
+
return x(), D("div", Tt, [
|
|
235
239
|
r(u, {
|
|
236
240
|
modelValue: e(a),
|
|
237
241
|
"onUpdate:modelValue": y[0] || (y[0] = (l) => re(a) ? a.value = l : null),
|
|
238
|
-
label: e(
|
|
242
|
+
label: e(_)("connect.store.category.label"),
|
|
239
243
|
rules: [e(Q).toRule(e(m))]
|
|
240
244
|
}, null, 8, ["modelValue", "label", "rules"]),
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
C.action == "edit" ? (x(), O(
|
|
245
|
+
F("div", $t, [
|
|
246
|
+
F("div", null, [
|
|
247
|
+
C.action == "edit" ? (x(), O(k, {
|
|
244
248
|
key: 0,
|
|
245
249
|
onClick: t,
|
|
246
|
-
label: e(
|
|
250
|
+
label: e(_)("connect.common.delete"),
|
|
247
251
|
variant: "destructive"
|
|
248
252
|
}, null, 8, ["label"])) : E("", !0)
|
|
249
253
|
]),
|
|
250
|
-
|
|
251
|
-
r(
|
|
252
|
-
label: e(
|
|
254
|
+
F("div", Ut, [
|
|
255
|
+
r(k, {
|
|
256
|
+
label: e(_)("connect.common.cancel"),
|
|
253
257
|
variant: "tertiary",
|
|
254
258
|
onClick: y[1] || (y[1] = (l) => e(b).close())
|
|
255
259
|
}, null, 8, ["label"]),
|
|
256
|
-
r(
|
|
257
|
-
label: C.action == "edit" ? e(
|
|
260
|
+
r(k, {
|
|
261
|
+
label: C.action == "edit" ? e(_)("connect.common.edit") : e(_)("connect.common.add"),
|
|
258
262
|
disabled: !e(a),
|
|
259
263
|
onClick: i
|
|
260
264
|
}, null, 8, ["label", "disabled"])
|
|
@@ -263,30 +267,30 @@ const vt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
263
267
|
]);
|
|
264
268
|
};
|
|
265
269
|
}
|
|
266
|
-
}),
|
|
270
|
+
}), It = { class: "space-y-16" }, Bt = { class: "flex items-center justify-end gap-8 pb-16" }, Nt = /* @__PURE__ */ te({
|
|
267
271
|
__name: "SelectCategoryDialog",
|
|
268
272
|
setup(C) {
|
|
269
|
-
const { emitData:
|
|
273
|
+
const { emitData: _, emitAction: o } = Le(), b = ke(), s = N(), v = L(
|
|
270
274
|
() => b.sortedStoreCategories.map((a, m) => ({
|
|
271
275
|
label: a.name,
|
|
272
276
|
value: m
|
|
273
277
|
}))
|
|
274
278
|
);
|
|
275
279
|
return (a, m) => {
|
|
276
|
-
const i =
|
|
277
|
-
return x(), D("div",
|
|
278
|
-
m[4] || (m[4] =
|
|
280
|
+
const i = S("FmSelect"), t = S("FmButton");
|
|
281
|
+
return x(), D("div", It, [
|
|
282
|
+
m[4] || (m[4] = F("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Select a category to create FeedMe CNY 2025 bundle ", -1)),
|
|
279
283
|
r(i, {
|
|
280
284
|
placeholder: "Select a category",
|
|
281
285
|
items: e(v),
|
|
282
286
|
modelValue: e(s),
|
|
283
287
|
"onUpdate:modelValue": [
|
|
284
288
|
m[0] || (m[0] = (c) => re(s) ? s.value = c : null),
|
|
285
|
-
m[1] || (m[1] = (c) => e(
|
|
289
|
+
m[1] || (m[1] = (c) => e(_)(c))
|
|
286
290
|
],
|
|
287
291
|
label: "Category"
|
|
288
292
|
}, null, 8, ["items", "modelValue"]),
|
|
289
|
-
|
|
293
|
+
F("div", Bt, [
|
|
290
294
|
r(t, {
|
|
291
295
|
variant: "tertiary",
|
|
292
296
|
label: "Cancel",
|
|
@@ -303,10 +307,10 @@ const vt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
303
307
|
}
|
|
304
308
|
});
|
|
305
309
|
function se(C) {
|
|
306
|
-
return C.states.map((
|
|
310
|
+
return C.states.map((_) => ({ label: _, value: _ }));
|
|
307
311
|
}
|
|
308
|
-
const
|
|
309
|
-
[
|
|
312
|
+
const Dt = {
|
|
313
|
+
[_e.F_COUNTRY.enum.MY]: {
|
|
310
314
|
states: [
|
|
311
315
|
"Johor",
|
|
312
316
|
"Kedah",
|
|
@@ -329,7 +333,7 @@ const Bt = {
|
|
|
329
333
|
return se(this);
|
|
330
334
|
}
|
|
331
335
|
},
|
|
332
|
-
[
|
|
336
|
+
[_e.F_COUNTRY.enum.SG]: {
|
|
333
337
|
states: [],
|
|
334
338
|
get stateItems() {
|
|
335
339
|
return se(this);
|
|
@@ -365,7 +369,7 @@ const Bt = {
|
|
|
365
369
|
return se(this);
|
|
366
370
|
}
|
|
367
371
|
},
|
|
368
|
-
[
|
|
372
|
+
[_e.F_COUNTRY.enum.ID]: {
|
|
369
373
|
states: [
|
|
370
374
|
"Aceh",
|
|
371
375
|
"Bali",
|
|
@@ -405,7 +409,7 @@ const Bt = {
|
|
|
405
409
|
return se(this);
|
|
406
410
|
}
|
|
407
411
|
},
|
|
408
|
-
[
|
|
412
|
+
[_e.F_COUNTRY.enum.TH]: {
|
|
409
413
|
states: [
|
|
410
414
|
"Bangkok",
|
|
411
415
|
"Amnat Charoen",
|
|
@@ -503,26 +507,26 @@ const Bt = {
|
|
|
503
507
|
return be().taxSystems;
|
|
504
508
|
},
|
|
505
509
|
taxInclusion(C) {
|
|
506
|
-
return ve.taxSystem.map((
|
|
507
|
-
systemCode:
|
|
510
|
+
return ve.taxSystem.map((_) => ({
|
|
511
|
+
systemCode: _.code,
|
|
508
512
|
inclusive: C !== void 0 ? C : !1
|
|
509
513
|
}));
|
|
510
514
|
},
|
|
511
515
|
groupedTaxOptions() {
|
|
512
516
|
const C = A.Country.getCountryFlattenTaxes(be().code);
|
|
513
|
-
return ve.taxSystem.map((
|
|
514
|
-
code:
|
|
515
|
-
options: C.map((o) => ({ ...o, feedmeTaxCode: ve.generateCode(o) })).filter((o) => o.systemCode ===
|
|
517
|
+
return ve.taxSystem.map((_) => ({
|
|
518
|
+
code: _.code,
|
|
519
|
+
options: C.map((o) => ({ ...o, feedmeTaxCode: ve.generateCode(o) })).filter((o) => o.systemCode === _.code)
|
|
516
520
|
}));
|
|
517
521
|
},
|
|
518
522
|
systemDefaultCode(C) {
|
|
519
|
-
const
|
|
520
|
-
return
|
|
523
|
+
const _ = ve.groupedTaxOptions().find((o) => o.code === C);
|
|
524
|
+
return _ == null ? void 0 : _.options.find((o) => o.default);
|
|
521
525
|
},
|
|
522
526
|
generateCode(C) {
|
|
523
527
|
return `${C.systemCode}/${C.taxCode}`;
|
|
524
528
|
}
|
|
525
|
-
}, W = ve,
|
|
529
|
+
}, W = ve, Ot = /* @__PURE__ */ te({
|
|
526
530
|
__name: "TaxInclusiveSetting",
|
|
527
531
|
props: {
|
|
528
532
|
modelValue: {
|
|
@@ -532,11 +536,11 @@ const Bt = {
|
|
|
532
536
|
}
|
|
533
537
|
},
|
|
534
538
|
emits: ["update:model-value"],
|
|
535
|
-
setup(C, { emit:
|
|
536
|
-
const o = C, b = W.taxSystem, s =
|
|
539
|
+
setup(C, { emit: _ }) {
|
|
540
|
+
const o = C, b = W.taxSystem, s = _, v = N(o.modelValue);
|
|
537
541
|
function a(c, y) {
|
|
538
|
-
const u = ae.clone(o.modelValue),
|
|
539
|
-
|
|
542
|
+
const u = ae.clone(o.modelValue), k = u.findIndex((l) => l.systemCode === c);
|
|
543
|
+
k >= 0 ? u[k].inclusive = y : u.push({
|
|
540
544
|
systemCode: c,
|
|
541
545
|
inclusive: y
|
|
542
546
|
}), v.value = u, s("update:model-value", u);
|
|
@@ -567,19 +571,19 @@ const Bt = {
|
|
|
567
571
|
c != y && !c.length && a(b[0].code, !1);
|
|
568
572
|
}
|
|
569
573
|
), (c, y) => {
|
|
570
|
-
const u =
|
|
571
|
-
return x(!0), D(Y, null, ce(e(i), (
|
|
574
|
+
const u = S("FmSwitch");
|
|
575
|
+
return x(!0), D(Y, null, ce(e(i), (k, l) => {
|
|
572
576
|
var w;
|
|
573
577
|
return x(), D("div", { key: l }, [
|
|
574
578
|
r(u, {
|
|
575
579
|
"model-value": ((w = e(v)[l]) == null ? void 0 : w.inclusive) || !1,
|
|
576
580
|
"label-placement": "left",
|
|
577
|
-
"onUpdate:modelValue": (U) =>
|
|
581
|
+
"onUpdate:modelValue": (U) => k.input(U)
|
|
578
582
|
}, {
|
|
579
583
|
label: B(() => {
|
|
580
584
|
var U;
|
|
581
585
|
return [
|
|
582
|
-
|
|
586
|
+
F("div", null, K(t(k.label, ((U = e(v)[l]) == null ? void 0 : U.inclusive) || !1)), 1)
|
|
583
587
|
];
|
|
584
588
|
}),
|
|
585
589
|
_: 2
|
|
@@ -589,18 +593,18 @@ const Bt = {
|
|
|
589
593
|
};
|
|
590
594
|
}
|
|
591
595
|
});
|
|
592
|
-
var
|
|
593
|
-
const
|
|
596
|
+
var Mt = { mode: "development", appMode: "mf" };
|
|
597
|
+
const At = { class: "space-y-8" }, Et = {
|
|
594
598
|
key: 0,
|
|
595
599
|
class: "space-y-16"
|
|
596
|
-
},
|
|
600
|
+
}, jt = /* @__PURE__ */ te({
|
|
597
601
|
__name: "StripeSetting",
|
|
598
602
|
props: {
|
|
599
603
|
modelValue: {}
|
|
600
604
|
},
|
|
601
605
|
emits: ["update:modelValue"],
|
|
602
|
-
setup(C, { emit:
|
|
603
|
-
const o = C, b =
|
|
606
|
+
setup(C, { emit: _ }) {
|
|
607
|
+
const o = C, b = _, s = N(!1);
|
|
604
608
|
Pe(s, (a, m) => {
|
|
605
609
|
m != a && (!o.modelValue && a ? b("update:modelValue", {
|
|
606
610
|
apiKey: "",
|
|
@@ -608,21 +612,21 @@ const Ot = { class: "space-y-8" }, Mt = {
|
|
|
608
612
|
}) : a || b("update:modelValue", void 0));
|
|
609
613
|
});
|
|
610
614
|
const v = L(() => {
|
|
611
|
-
const a =
|
|
615
|
+
const a = Mt.mode === "development", m = A.Config.getCountry().code.toLowerCase(), i = m != "my" ? `.${m}` : "";
|
|
612
616
|
return `https://marketing${a ? "-dev" : ""}${i}.feedmeapi.com/stripe/${Qe.getBusinessId()}/webhook`;
|
|
613
617
|
});
|
|
614
618
|
return he(() => {
|
|
615
619
|
s.value = !!o.modelValue;
|
|
616
620
|
}), (a, m) => {
|
|
617
|
-
const i =
|
|
618
|
-
return x(), D("div",
|
|
621
|
+
const i = S("FmSwitch"), t = S("FmTextField"), c = S("FmButton");
|
|
622
|
+
return x(), D("div", At, [
|
|
619
623
|
r(i, {
|
|
620
624
|
modelValue: e(s),
|
|
621
625
|
"onUpdate:modelValue": m[0] || (m[0] = (y) => re(s) ? s.value = y : null),
|
|
622
626
|
value: "true",
|
|
623
627
|
label: "Enable Stripe"
|
|
624
628
|
}, null, 8, ["modelValue"]),
|
|
625
|
-
o.modelValue ? (x(), D("div",
|
|
629
|
+
o.modelValue ? (x(), D("div", Et, [
|
|
626
630
|
r(t, {
|
|
627
631
|
label: "API Key",
|
|
628
632
|
modelValue: o.modelValue.apiKey,
|
|
@@ -655,16 +659,16 @@ const Ot = { class: "space-y-8" }, Mt = {
|
|
|
655
659
|
]);
|
|
656
660
|
};
|
|
657
661
|
}
|
|
658
|
-
}),
|
|
662
|
+
}), Lt = {
|
|
659
663
|
key: 0,
|
|
660
664
|
class: "space-y-16 pr-12"
|
|
661
|
-
},
|
|
665
|
+
}, Kt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Ht = {
|
|
662
666
|
key: 1,
|
|
663
667
|
class: "space-y-16"
|
|
664
|
-
},
|
|
668
|
+
}, qt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Wt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Yt = { class: "grid grid-cols-2 gap-x-16 gap-y-16" }, zt = { class: "space-y-4" }, Jt = { class: "fm-typo-en-body-lg-400" }, Gt = { class: "space-y-16" }, Xt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Zt = { class: "flex items-center gap-8" }, Qt = /* @__PURE__ */ te({
|
|
665
669
|
__name: "StoreSettingSheet",
|
|
666
670
|
emits: ["update"],
|
|
667
|
-
setup(C, { expose:
|
|
671
|
+
setup(C, { expose: _, emit: o }) {
|
|
668
672
|
const { t: b } = xe(), s = o, v = N(!1), a = N(), m = N(!1), i = et.extend({
|
|
669
673
|
company: tt.extend({
|
|
670
674
|
name: ee.string().min(1, "Company name is required"),
|
|
@@ -682,8 +686,8 @@ const Ot = { class: "space-y-8" }, Mt = {
|
|
|
682
686
|
})
|
|
683
687
|
}), t = L(() => i.safeParse(a.value).success);
|
|
684
688
|
function c() {
|
|
685
|
-
const
|
|
686
|
-
|
|
689
|
+
const k = i.safeParse(a.value);
|
|
690
|
+
k.success && s("update", k.data);
|
|
687
691
|
}
|
|
688
692
|
function y() {
|
|
689
693
|
return {
|
|
@@ -704,14 +708,14 @@ const Ot = { class: "space-y-8" }, Mt = {
|
|
|
704
708
|
inclusiveTaxes: []
|
|
705
709
|
};
|
|
706
710
|
}
|
|
707
|
-
function u(
|
|
708
|
-
v.value =
|
|
711
|
+
function u(k, l) {
|
|
712
|
+
v.value = k, k && (a.value = l != null && l.company ? ae.cloneDeep(l) : y());
|
|
709
713
|
}
|
|
710
|
-
return
|
|
714
|
+
return _({
|
|
711
715
|
showSheet: u,
|
|
712
716
|
data: a
|
|
713
|
-
}), (
|
|
714
|
-
const w =
|
|
717
|
+
}), (k, l) => {
|
|
718
|
+
const w = S("FmIcon"), U = S("FmMenuItem"), j = S("FmMenu"), ne = S("FmSelect"), Z = S("FmButton"), H = S("FmSideSheet");
|
|
715
719
|
return x(), O(H, {
|
|
716
720
|
"max-width": 560,
|
|
717
721
|
modelValue: e(v),
|
|
@@ -719,12 +723,12 @@ const Ot = { class: "space-y-8" }, Mt = {
|
|
|
719
723
|
header: e(b)("connect.store.setting.title")
|
|
720
724
|
}, {
|
|
721
725
|
"side-sheet-footer": B(() => [
|
|
722
|
-
|
|
726
|
+
F("div", Zt, [
|
|
723
727
|
r(Z, {
|
|
724
728
|
label: e(b)("connect.common.save"),
|
|
725
729
|
onClick: c,
|
|
726
|
-
disabled: !e(t) || e(
|
|
727
|
-
loading: e(
|
|
730
|
+
disabled: !e(t) || e(Se)().isLoading,
|
|
731
|
+
loading: e(Se)().isLoading
|
|
728
732
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
729
733
|
r(Z, {
|
|
730
734
|
label: e(b)("connect.common.cancel"),
|
|
@@ -736,18 +740,18 @@ const Ot = { class: "space-y-8" }, Mt = {
|
|
|
736
740
|
default: B(() => {
|
|
737
741
|
var z, oe;
|
|
738
742
|
return [
|
|
739
|
-
r(
|
|
740
|
-
e(a) && e(a).company ? (x(), D("div",
|
|
741
|
-
|
|
743
|
+
r(Te, { json: e(a) }, null, 8, ["json"]),
|
|
744
|
+
e(a) && e(a).company ? (x(), D("div", Lt, [
|
|
745
|
+
F("div", Kt, K(e(b)("connect.store.setting.company.legal_info")), 1),
|
|
742
746
|
r(le, {
|
|
743
747
|
modelValue: e(a).company.name,
|
|
744
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
748
|
+
"onUpdate:modelValue": l[0] || (l[0] = (V) => e(a).company.name = V),
|
|
745
749
|
label: e(b)("connect.store.setting.company.name"),
|
|
746
750
|
schema: e(Q).typeAtPath(e(i), "company.name")
|
|
747
751
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
748
752
|
r(le, {
|
|
749
753
|
modelValue: e(a).company.regNo,
|
|
750
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
754
|
+
"onUpdate:modelValue": l[1] || (l[1] = (V) => e(a).company.regNo = V),
|
|
751
755
|
label: e(b)("connect.store.setting.company.reg_no"),
|
|
752
756
|
schema: e(Q).typeAtPath(e(i), "company.regNo")
|
|
753
757
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
@@ -755,53 +759,53 @@ const Ot = { class: "space-y-8" }, Mt = {
|
|
|
755
759
|
key: 0,
|
|
756
760
|
modelValue: e(a).company.sstRegNo,
|
|
757
761
|
"onUpdate:modelValue": [
|
|
758
|
-
l[2] || (l[2] = (
|
|
759
|
-
l[3] || (l[3] = (
|
|
762
|
+
l[2] || (l[2] = (V) => e(a).company.sstRegNo = V),
|
|
763
|
+
l[3] || (l[3] = (V) => V ? null : e(a).inclusiveTaxes = [])
|
|
760
764
|
],
|
|
761
765
|
label: e(b)("connect.store.setting.company.tax_reg_no"),
|
|
762
766
|
schema: e(Q).typeAtPath(e(i), "company.sstRegNo")
|
|
763
767
|
}, null, 8, ["modelValue", "label", "schema"])) : E("", !0),
|
|
764
|
-
(z = e(a).company) != null && z.sstRegNo && e(a).inclusiveTaxes ? (x(), D("div",
|
|
765
|
-
|
|
766
|
-
r(
|
|
768
|
+
(z = e(a).company) != null && z.sstRegNo && e(a).inclusiveTaxes ? (x(), D("div", Ht, [
|
|
769
|
+
F("div", qt, K(e(b)("connect.store.setting.company.tax")), 1),
|
|
770
|
+
r(Ot, {
|
|
767
771
|
modelValue: e(a).inclusiveTaxes,
|
|
768
|
-
"onUpdate:modelValue": l[4] || (l[4] = (
|
|
772
|
+
"onUpdate:modelValue": l[4] || (l[4] = (V) => e(a).inclusiveTaxes = V)
|
|
769
773
|
}, null, 8, ["modelValue"])
|
|
770
774
|
])) : E("", !0),
|
|
771
775
|
r(le, {
|
|
772
776
|
modelValue: e(a).company.phoneNo,
|
|
773
|
-
"onUpdate:modelValue": l[5] || (l[5] = (
|
|
777
|
+
"onUpdate:modelValue": l[5] || (l[5] = (V) => e(a).company.phoneNo = V),
|
|
774
778
|
label: e(b)("connect.store.setting.company.phone"),
|
|
775
779
|
schema: e(Q).typeAtPath(e(i), "company.phoneNo")
|
|
776
780
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
777
|
-
|
|
781
|
+
F("div", Wt, K(e(b)("connect.store.setting.company.address.title")), 1),
|
|
778
782
|
r(le, {
|
|
779
783
|
modelValue: e(a).company.address.line1,
|
|
780
|
-
"onUpdate:modelValue": l[6] || (l[6] = (
|
|
784
|
+
"onUpdate:modelValue": l[6] || (l[6] = (V) => e(a).company.address.line1 = V),
|
|
781
785
|
label: e(b)("connect.store.setting.company.address.line1"),
|
|
782
786
|
schema: e(Q).typeAtPath(e(i), "company.address.line1")
|
|
783
787
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
784
788
|
r(le, {
|
|
785
789
|
modelValue: e(a).company.address.line2,
|
|
786
|
-
"onUpdate:modelValue": l[7] || (l[7] = (
|
|
790
|
+
"onUpdate:modelValue": l[7] || (l[7] = (V) => e(a).company.address.line2 = V),
|
|
787
791
|
label: e(b)("connect.store.setting.company.address.line2"),
|
|
788
792
|
schema: e(Q).typeAtPath(e(i), "company.address.line2")
|
|
789
793
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
790
|
-
|
|
794
|
+
F("div", Yt, [
|
|
791
795
|
r(le, {
|
|
792
796
|
modelValue: e(a).company.address.city,
|
|
793
|
-
"onUpdate:modelValue": l[8] || (l[8] = (
|
|
797
|
+
"onUpdate:modelValue": l[8] || (l[8] = (V) => e(a).company.address.city = V),
|
|
794
798
|
label: e(b)("connect.store.setting.company.address.city"),
|
|
795
799
|
schema: e(Q).typeAtPath(e(i), "company.address.city")
|
|
796
800
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
797
801
|
r(le, {
|
|
798
802
|
modelValue: e(a).company.address.postcode,
|
|
799
|
-
"onUpdate:modelValue": l[9] || (l[9] = (
|
|
803
|
+
"onUpdate:modelValue": l[9] || (l[9] = (V) => e(a).company.address.postcode = V),
|
|
800
804
|
label: e(b)("connect.store.setting.company.address.postcode"),
|
|
801
805
|
schema: e(Q).typeAtPath(e(i), "company.address.postcode")
|
|
802
806
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
803
|
-
|
|
804
|
-
|
|
807
|
+
F("div", zt, [
|
|
808
|
+
F("div", Jt, K(e(b)("connect.store.setting.company.address.state")), 1),
|
|
805
809
|
r(j, {
|
|
806
810
|
placement: "top-end",
|
|
807
811
|
"model-value": e(m)
|
|
@@ -809,9 +813,9 @@ const Ot = { class: "space-y-8" }, Mt = {
|
|
|
809
813
|
"menu-button": B(() => [
|
|
810
814
|
r(le, {
|
|
811
815
|
modelValue: e(a).company.address.state,
|
|
812
|
-
"onUpdate:modelValue": l[10] || (l[10] = (
|
|
816
|
+
"onUpdate:modelValue": l[10] || (l[10] = (V) => e(a).company.address.state = V),
|
|
813
817
|
schema: e(Q).typeAtPath(e(i), "company.address.state"),
|
|
814
|
-
onFocusChanged: l[11] || (l[11] = (
|
|
818
|
+
onFocusChanged: l[11] || (l[11] = (V) => m.value = V)
|
|
815
819
|
}, {
|
|
816
820
|
append: B(() => [
|
|
817
821
|
r(w, {
|
|
@@ -822,17 +826,17 @@ const Ot = { class: "space-y-8" }, Mt = {
|
|
|
822
826
|
}, 8, ["modelValue", "schema"])
|
|
823
827
|
]),
|
|
824
828
|
default: B(() => [
|
|
825
|
-
(x(!0), D(Y, null, ce(e(
|
|
826
|
-
(
|
|
829
|
+
(x(!0), D(Y, null, ce(e(Dt)[e(A.Config).getCountry().code].stateItems.filter(
|
|
830
|
+
(V) => {
|
|
827
831
|
var ie, g;
|
|
828
|
-
return
|
|
832
|
+
return V.label.toLowerCase().includes(((g = (ie = e(a)) == null ? void 0 : ie.company) == null ? void 0 : g.address.state.toLowerCase()) ?? "");
|
|
829
833
|
}
|
|
830
|
-
) || [], (
|
|
831
|
-
key:
|
|
832
|
-
"model-value": e(a).company.address.state ===
|
|
833
|
-
label:
|
|
834
|
+
) || [], (V) => (x(), O(U, {
|
|
835
|
+
key: V.value,
|
|
836
|
+
"model-value": e(a).company.address.state === V.value,
|
|
837
|
+
label: V.label,
|
|
834
838
|
onClick: () => {
|
|
835
|
-
e(a).company.address.state =
|
|
839
|
+
e(a).company.address.state = V.value, m.value = !1;
|
|
836
840
|
}
|
|
837
841
|
}, null, 8, ["model-value", "label", "onClick"]))), 128))
|
|
838
842
|
]),
|
|
@@ -842,7 +846,7 @@ const Ot = { class: "space-y-8" }, Mt = {
|
|
|
842
846
|
r(ne, {
|
|
843
847
|
label: e(b)("connect.store.setting.company.address.country"),
|
|
844
848
|
modelValue: e(a).company.address.country,
|
|
845
|
-
"onUpdate:modelValue": l[12] || (l[12] = (
|
|
849
|
+
"onUpdate:modelValue": l[12] || (l[12] = (V) => e(a).company.address.country = V),
|
|
846
850
|
items: [
|
|
847
851
|
{
|
|
848
852
|
label: e(A.Config).getCountry().name,
|
|
@@ -852,11 +856,11 @@ const Ot = { class: "space-y-8" }, Mt = {
|
|
|
852
856
|
rules: [e(Q).ruleAtPath(e(i), "company.address.country")]
|
|
853
857
|
}, null, 8, ["label", "modelValue", "items", "rules"])
|
|
854
858
|
]),
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
r(
|
|
859
|
+
F("div", Gt, [
|
|
860
|
+
F("div", Xt, K(e(b)("connect.store.setting.stripe.title")), 1),
|
|
861
|
+
r(jt, {
|
|
858
862
|
"model-value": (oe = e(a)) == null ? void 0 : oe.stripe,
|
|
859
|
-
"onUpdate:modelValue": l[13] || (l[13] = (
|
|
863
|
+
"onUpdate:modelValue": l[13] || (l[13] = (V) => e(a).stripe = V)
|
|
860
864
|
}, null, 8, ["model-value"])
|
|
861
865
|
])
|
|
862
866
|
])) : E("", !0)
|
|
@@ -867,10 +871,10 @@ const Ot = { class: "space-y-8" }, Mt = {
|
|
|
867
871
|
};
|
|
868
872
|
}
|
|
869
873
|
});
|
|
870
|
-
function
|
|
871
|
-
return A.DineroFactory(C).toFormat(
|
|
874
|
+
function en(C, _ = !0) {
|
|
875
|
+
return A.DineroFactory(C).toFormat(_);
|
|
872
876
|
}
|
|
873
|
-
const
|
|
877
|
+
const tn = /* @__PURE__ */ te({
|
|
874
878
|
__name: "TaxVariantSetting",
|
|
875
879
|
props: {
|
|
876
880
|
modelValue: {
|
|
@@ -880,15 +884,15 @@ const Qt = /* @__PURE__ */ te({
|
|
|
880
884
|
}
|
|
881
885
|
},
|
|
882
886
|
emits: ["update:modelValue"],
|
|
883
|
-
setup(C, { emit:
|
|
884
|
-
const o = C, b =
|
|
887
|
+
setup(C, { emit: _ }) {
|
|
888
|
+
const o = C, b = _;
|
|
885
889
|
he(() => {
|
|
886
890
|
if (a.value.length !== v.value.length) {
|
|
887
891
|
const t = v.value.reduce((c, y) => {
|
|
888
892
|
const u = W.systemDefaultCode(y.name);
|
|
889
893
|
if (!u) return c;
|
|
890
|
-
const { systemCode:
|
|
891
|
-
return y.value || c.push({ systemCode:
|
|
894
|
+
const { systemCode: k, taxCode: l } = u;
|
|
895
|
+
return y.value || c.push({ systemCode: k, taxCode: l }), c;
|
|
892
896
|
}, []);
|
|
893
897
|
i(t);
|
|
894
898
|
}
|
|
@@ -911,37 +915,37 @@ const Qt = /* @__PURE__ */ te({
|
|
|
911
915
|
(l) => l.options.some((w) => w.feedmeTaxCode === t)
|
|
912
916
|
), y = c == null ? void 0 : c.options.find((l) => l.feedmeTaxCode === t);
|
|
913
917
|
if (!y) return;
|
|
914
|
-
const { systemCode: u, taxCode:
|
|
915
|
-
i([{ systemCode: u, taxCode:
|
|
918
|
+
const { systemCode: u, taxCode: k } = y;
|
|
919
|
+
i([{ systemCode: u, taxCode: k }]);
|
|
916
920
|
}
|
|
917
921
|
function i(t) {
|
|
918
922
|
const c = ae.clone(o.modelValue);
|
|
919
923
|
t.forEach((y) => {
|
|
920
924
|
const u = s().find(
|
|
921
925
|
(w) => w.options.some((U) => U.feedmeTaxCode === W.generateCode(y))
|
|
922
|
-
),
|
|
923
|
-
(w) =>
|
|
926
|
+
), k = (u == null ? void 0 : u.options) || [], l = c.findIndex(
|
|
927
|
+
(w) => k.some((U) => W.generateCode(U) === W.generateCode(w))
|
|
924
928
|
);
|
|
925
929
|
l >= 0 ? c.splice(l, 1, y) : c.push(y);
|
|
926
930
|
}), b("update:modelValue", c);
|
|
927
931
|
}
|
|
928
932
|
return (t, c) => {
|
|
929
|
-
const y =
|
|
930
|
-
return x(!0), D(Y, null, ce(e(v), (
|
|
931
|
-
key:
|
|
933
|
+
const y = S("FmRadio"), u = S("FmRadioGroup");
|
|
934
|
+
return x(!0), D(Y, null, ce(e(v), (k) => (x(), D("div", {
|
|
935
|
+
key: k.name,
|
|
932
936
|
class: "flex items-start"
|
|
933
937
|
}, [
|
|
934
938
|
r(u, {
|
|
935
|
-
modelValue:
|
|
939
|
+
modelValue: k.value,
|
|
936
940
|
"onUpdate:modelValue": [
|
|
937
|
-
(l) =>
|
|
941
|
+
(l) => k.value = l,
|
|
938
942
|
c[0] || (c[0] = (l) => {
|
|
939
943
|
m(l);
|
|
940
944
|
})
|
|
941
945
|
]
|
|
942
946
|
}, {
|
|
943
947
|
default: B(() => [
|
|
944
|
-
(x(!0), D(Y, null, ce(
|
|
948
|
+
(x(!0), D(Y, null, ce(k.options, (l, w) => (x(), O(y, {
|
|
945
949
|
key: w,
|
|
946
950
|
value: l.value,
|
|
947
951
|
label: l.label
|
|
@@ -975,21 +979,21 @@ const Qt = /* @__PURE__ */ te({
|
|
|
975
979
|
taxTotals: [],
|
|
976
980
|
internal: !1,
|
|
977
981
|
priceWithTaxes: ct()
|
|
978
|
-
},
|
|
982
|
+
}, nn = {
|
|
979
983
|
key: 0,
|
|
980
984
|
class: "space-y-24 pr-12"
|
|
981
|
-
},
|
|
985
|
+
}, on = { class: "space-y-8" }, an = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, ln = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, sn = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, rn = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, dn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary !mb-[-16px]" }, un = { class: "space-y-8" }, cn = { class: "flex items-center justify-between" }, mn = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, pn = { class: "space-y-8" }, fn = { class: "flex items-center gap-8" }, yn = /* @__PURE__ */ te({
|
|
982
986
|
__name: "EditBundleSheet",
|
|
983
987
|
emits: ["update"],
|
|
984
|
-
setup(C, { expose:
|
|
985
|
-
const b = o, { t: s } = xe(), v =
|
|
988
|
+
setup(C, { expose: _, emit: o }) {
|
|
989
|
+
const b = o, { t: s } = xe(), v = ke(), a = N(!1), m = N([]), i = N({
|
|
986
990
|
category: 0,
|
|
987
991
|
index: -1,
|
|
988
992
|
originalCategoryIndex: void 0
|
|
989
993
|
}), t = N(ae.cloneDeep(we)), c = N(), y = Ae, u = L(() => {
|
|
990
994
|
const d = y.safeParse(t.value);
|
|
991
995
|
return d.success ? [] : d.error.errors;
|
|
992
|
-
}),
|
|
996
|
+
}), k = [
|
|
993
997
|
{
|
|
994
998
|
header: "Reward title",
|
|
995
999
|
accessorFn: (d) => d.collectible.name,
|
|
@@ -1088,7 +1092,7 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1088
1092
|
}), oe = L(() => {
|
|
1089
1093
|
var d, n, p;
|
|
1090
1094
|
return (p = (n = (d = v.storeOption) == null ? void 0 : d.inclusiveTaxes) == null ? void 0 : n[0]) != null && p.inclusive ? "Inclusive" : "Exclusive";
|
|
1091
|
-
}),
|
|
1095
|
+
}), V = L(() => {
|
|
1092
1096
|
var d, n, p;
|
|
1093
1097
|
return qe(
|
|
1094
1098
|
W.fullTax,
|
|
@@ -1098,22 +1102,22 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1098
1102
|
((d = v.storeOption) == null ? void 0 : d.inclusiveTaxes) ?? [],
|
|
1099
1103
|
(p = (n = v.storeOption) == null ? void 0 : n.company) != null && p.sstRegNo ? W.taxSystem.map((f) => f.code) : []
|
|
1100
1104
|
);
|
|
1101
|
-
}), ie = L(() =>
|
|
1105
|
+
}), ie = L(() => V.value.reduce(
|
|
1102
1106
|
(n, p) => n.add(p.total),
|
|
1103
1107
|
mt()
|
|
1104
1108
|
).toFormat()), g = L(() => {
|
|
1105
1109
|
var f;
|
|
1106
1110
|
const d = We(
|
|
1107
|
-
|
|
1111
|
+
V.value,
|
|
1108
1112
|
t.value.price,
|
|
1109
1113
|
((f = v.storeOption) == null ? void 0 : f.inclusiveTaxes) ?? []
|
|
1110
1114
|
);
|
|
1111
1115
|
t.value.priceWithTaxes = d;
|
|
1112
|
-
const n =
|
|
1116
|
+
const n = en(d, !1), p = Number(n.replace(/[^\d.-]/g, ""));
|
|
1113
1117
|
return Number.isNaN(p) ? 0 : p;
|
|
1114
1118
|
});
|
|
1115
|
-
function
|
|
1116
|
-
t.value.taxTotals =
|
|
1119
|
+
function T() {
|
|
1120
|
+
t.value.taxTotals = V.value, b("update", Ae.parse(at(t.value)));
|
|
1117
1121
|
}
|
|
1118
1122
|
function h() {
|
|
1119
1123
|
return ae.cloneDeep(we);
|
|
@@ -1121,13 +1125,13 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1121
1125
|
function $(d, n) {
|
|
1122
1126
|
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), {}));
|
|
1123
1127
|
}
|
|
1124
|
-
return
|
|
1128
|
+
return _({
|
|
1125
1129
|
showSheet: $,
|
|
1126
1130
|
bundleImage: c,
|
|
1127
1131
|
target: i,
|
|
1128
1132
|
data: t
|
|
1129
1133
|
}), (d, n) => {
|
|
1130
|
-
const p =
|
|
1134
|
+
const p = S("FmSwitch"), f = S("FmHelperText"), I = S("FmTextField"), M = S("FmSelect"), R = S("FmStepperField"), q = S("FmMenuItem"), J = S("FmTable"), fe = S("FmButton"), Ce = S("FmSideSheet");
|
|
1131
1135
|
return x(), O(Ce, {
|
|
1132
1136
|
"max-width": 768,
|
|
1133
1137
|
modelValue: e(a),
|
|
@@ -1135,12 +1139,12 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1135
1139
|
header: e(i).index != -1 ? e(s)("connect.store.bundle.edit.title") : e(s)("connect.store.bundle.edit.create")
|
|
1136
1140
|
}, {
|
|
1137
1141
|
"side-sheet-footer": B(() => [
|
|
1138
|
-
|
|
1142
|
+
F("div", fn, [
|
|
1139
1143
|
r(fe, {
|
|
1140
1144
|
label: e(i).index != -1 ? "Save" : "Add",
|
|
1141
|
-
onClick:
|
|
1145
|
+
onClick: T,
|
|
1142
1146
|
disabled: e(u).length > 0,
|
|
1143
|
-
loading: e(
|
|
1147
|
+
loading: e(Se)().isLoading
|
|
1144
1148
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
1145
1149
|
r(fe, {
|
|
1146
1150
|
label: "Cancel",
|
|
@@ -1152,9 +1156,9 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1152
1156
|
default: B(() => {
|
|
1153
1157
|
var de, $e, Ue, Re, Ie, Be, Ne, De, Oe, Me;
|
|
1154
1158
|
return [
|
|
1155
|
-
r(
|
|
1156
|
-
e(t) ? (x(), D("div",
|
|
1157
|
-
|
|
1159
|
+
r(Te, { json: e(t) }, null, 8, ["json"]),
|
|
1160
|
+
e(t) ? (x(), D("div", nn, [
|
|
1161
|
+
F("div", on, [
|
|
1158
1162
|
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, {
|
|
1159
1163
|
key: 0,
|
|
1160
1164
|
"onUpdate:modelValue": n[0] || (n[0] = (P) => {
|
|
@@ -1171,7 +1175,7 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1171
1175
|
state: "warning"
|
|
1172
1176
|
})) : E("", !0)
|
|
1173
1177
|
]),
|
|
1174
|
-
|
|
1178
|
+
F("div", an, K(e(s)("connect.store.bundle.edit.basicInformation")), 1),
|
|
1175
1179
|
r(I, {
|
|
1176
1180
|
label: e(s)("connect.store.bundle.edit.bundleName"),
|
|
1177
1181
|
modelValue: e(t).name,
|
|
@@ -1253,7 +1257,7 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1253
1257
|
_: 1
|
|
1254
1258
|
}, 8, ["model-value", "label", "helper-state", "helper-text"])),
|
|
1255
1259
|
(Ue = e(v).storeOption) != null && Ue.stripe && !e(t).isFeedvibe ? (x(), D(Y, { key: 1 }, [
|
|
1256
|
-
|
|
1260
|
+
F("div", ln, K(e(s)("connect.store.bundle.edit.subscriptionSettings")), 1),
|
|
1257
1261
|
r(I, {
|
|
1258
1262
|
label: e(s)("connect.store.bundle.edit.stripePriceId"),
|
|
1259
1263
|
modelValue: e(t).stripePriceId,
|
|
@@ -1273,7 +1277,7 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1273
1277
|
}, null, 8, ["model-value", "label", "helper-state", "helper-text"])) : E("", !0)
|
|
1274
1278
|
], 64)) : E("", !0),
|
|
1275
1279
|
e(t).isFeedvibe ? E("", !0) : (x(), D(Y, { key: 2 }, [
|
|
1276
|
-
|
|
1280
|
+
F("div", sn, K(e(s)("connect.store.bundle.edit.credit")), 1),
|
|
1277
1281
|
r(R, {
|
|
1278
1282
|
modelValue: e(t).credit.normal,
|
|
1279
1283
|
"onUpdate:modelValue": n[8] || (n[8] = (P) => e(t).credit.normal = P),
|
|
@@ -1329,8 +1333,8 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1329
1333
|
}, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : E("", !0)
|
|
1330
1334
|
], 64)),
|
|
1331
1335
|
e(z) ? (x(), D(Y, { key: 3 }, [
|
|
1332
|
-
n[26] || (n[26] =
|
|
1333
|
-
r(
|
|
1336
|
+
n[26] || (n[26] = F("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Taxes", -1)),
|
|
1337
|
+
r(tn, {
|
|
1334
1338
|
modelValue: e(t).taxes,
|
|
1335
1339
|
"onUpdate:modelValue": n[11] || (n[11] = (P) => e(t).taxes = P)
|
|
1336
1340
|
}, null, 8, ["modelValue"]),
|
|
@@ -1345,10 +1349,10 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1345
1349
|
"model-value": e(g),
|
|
1346
1350
|
disabled: !0
|
|
1347
1351
|
}, null, 8, ["model-value"]),
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
+
F("div", rn, K(e(s)("connect.store.bundle.edit.bundleReward.title")), 1),
|
|
1353
|
+
F("div", dn, K(e(s)("connect.store.bundle.edit.bundleReward.description")), 1),
|
|
1354
|
+
F("div", un, [
|
|
1355
|
+
F("div", cn, [
|
|
1352
1356
|
r(ut, {
|
|
1353
1357
|
label: `Reward type: ${e(l).length == 0 ? "All" : e(l)[0].name}`
|
|
1354
1358
|
}, {
|
|
@@ -1386,7 +1390,7 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1386
1390
|
"onUpdate:modelValue": n[15] || (n[15] = (P) => re(H) ? H.value = P : null),
|
|
1387
1391
|
selection: "multiple",
|
|
1388
1392
|
"column-filter": e(l),
|
|
1389
|
-
"column-defs":
|
|
1393
|
+
"column-defs": k,
|
|
1390
1394
|
"row-data": e(w),
|
|
1391
1395
|
"hide-footer": e(w).length <= 10
|
|
1392
1396
|
}, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"]),
|
|
@@ -1395,8 +1399,8 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1395
1399
|
state: e(G)(e(u), "titles")
|
|
1396
1400
|
}, null, 8, ["text", "state"])
|
|
1397
1401
|
]),
|
|
1398
|
-
|
|
1399
|
-
|
|
1402
|
+
F("div", mn, K(e(s)("connect.store.bundle.edit.advanceSetting")), 1),
|
|
1403
|
+
F("div", pn, [
|
|
1400
1404
|
e(t).isFeedvibe ? E("", !0) : (x(), D(Y, { key: 0 }, [
|
|
1401
1405
|
r(p, {
|
|
1402
1406
|
"model-value": e(t).internal ?? !1,
|
|
@@ -1435,10 +1439,10 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1435
1439
|
}, 8, ["modelValue", "header"]);
|
|
1436
1440
|
};
|
|
1437
1441
|
}
|
|
1438
|
-
}),
|
|
1442
|
+
}), bn = { class: "flex gap-8 items-center flex-wrap" }, gn = { class: "flex items-center gap-8" }, vn = /* @__PURE__ */ te({
|
|
1439
1443
|
__name: "SendBundleSheet",
|
|
1440
1444
|
emits: ["success"],
|
|
1441
|
-
setup(C, { expose:
|
|
1445
|
+
setup(C, { expose: _, emit: o }) {
|
|
1442
1446
|
const { minor: b } = Ke, s = N(), v = N(""), a = N(""), m = N([]), i = N(!1), t = N();
|
|
1443
1447
|
N(!0);
|
|
1444
1448
|
function c(w) {
|
|
@@ -1460,7 +1464,7 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1460
1464
|
value: j._id
|
|
1461
1465
|
})), await new Promise((j) => setTimeout(j, 100));
|
|
1462
1466
|
}
|
|
1463
|
-
async function
|
|
1467
|
+
async function k() {
|
|
1464
1468
|
if (!s.value || !v.value) return;
|
|
1465
1469
|
const w = m.value.find(
|
|
1466
1470
|
(j) => j.value === v.value
|
|
@@ -1494,14 +1498,14 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1494
1498
|
`${A.Config.getCountry().currency.symbol}${He((j = s.value) == null ? void 0 : j.price)}`
|
|
1495
1499
|
), (ne = s.value) != null && ne.coinPrice && w.push(`${s.value.coinPrice} point(s)`), w.join(" or ");
|
|
1496
1500
|
});
|
|
1497
|
-
return
|
|
1501
|
+
return _({
|
|
1498
1502
|
showSheet: c,
|
|
1499
1503
|
hideSheet: y
|
|
1500
1504
|
}), he(async () => {
|
|
1501
1505
|
await u("");
|
|
1502
1506
|
}), (w, U) => {
|
|
1503
|
-
const j =
|
|
1504
|
-
return x(), O(
|
|
1507
|
+
const j = S("FmCardMedia"), ne = S("FmCardHeader"), Z = S("FmChip"), H = S("FmCardSection"), z = S("FmCard"), oe = S("FmSelect"), V = S("FmTextField"), ie = S("FmForm"), g = S("FmButton"), T = S("FmSideSheet");
|
|
1508
|
+
return x(), O(T, {
|
|
1505
1509
|
"max-width": 560,
|
|
1506
1510
|
"dismiss-away": !0,
|
|
1507
1511
|
header: "Send bundle to member",
|
|
@@ -1512,10 +1516,10 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1512
1516
|
]
|
|
1513
1517
|
}, {
|
|
1514
1518
|
"side-sheet-footer": B(() => [
|
|
1515
|
-
|
|
1519
|
+
F("div", gn, [
|
|
1516
1520
|
r(g, {
|
|
1517
1521
|
label: "Send",
|
|
1518
|
-
loading: e(
|
|
1522
|
+
loading: e(Se)().isLoading,
|
|
1519
1523
|
onClick: U[2] || (U[2] = async () => {
|
|
1520
1524
|
var h;
|
|
1521
1525
|
return (h = e(t)) == null ? void 0 : h.validateInputs();
|
|
@@ -1534,7 +1538,7 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1534
1538
|
class: "space-y-16",
|
|
1535
1539
|
ref_key: "form",
|
|
1536
1540
|
ref: t,
|
|
1537
|
-
onValidationSuccess:
|
|
1541
|
+
onValidationSuccess: k,
|
|
1538
1542
|
blameFormChildOnValidationFailed: ""
|
|
1539
1543
|
}, {
|
|
1540
1544
|
default: B(() => [
|
|
@@ -1564,7 +1568,7 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1564
1568
|
default: B(() => {
|
|
1565
1569
|
var n, p, f, I, M, R, q, J, fe, Ce, de;
|
|
1566
1570
|
return [
|
|
1567
|
-
|
|
1571
|
+
F("div", bn, [
|
|
1568
1572
|
(n = e(s)) != null && n.isFeedvibe ? (x(), O(Z, {
|
|
1569
1573
|
key: 0,
|
|
1570
1574
|
label: "Feedvibe"
|
|
@@ -1604,7 +1608,7 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1604
1608
|
rules: [(h) => !!h > 0 || "Member is required"],
|
|
1605
1609
|
"helper-text": "Type to search member"
|
|
1606
1610
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
1607
|
-
r(
|
|
1611
|
+
r(V, {
|
|
1608
1612
|
modelValue: e(a),
|
|
1609
1613
|
"onUpdate:modelValue": U[1] || (U[1] = (h) => re(a) ? a.value = h : null),
|
|
1610
1614
|
label: "Reference (optional)",
|
|
@@ -1623,16 +1627,16 @@ const Qt = /* @__PURE__ */ te({
|
|
|
1623
1627
|
});
|
|
1624
1628
|
async function Ee({
|
|
1625
1629
|
hasStoreCompany: C,
|
|
1626
|
-
confirm:
|
|
1630
|
+
confirm: _,
|
|
1627
1631
|
showSettingSheet: o
|
|
1628
1632
|
}) {
|
|
1629
|
-
return C ? !0 : (await
|
|
1633
|
+
return C ? !0 : (await _() && o(!0), !1);
|
|
1630
1634
|
}
|
|
1631
|
-
var
|
|
1632
|
-
const
|
|
1635
|
+
var hn = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
|
|
1636
|
+
const xn = { class: "px-24 flex flex-col gap-y-16" }, Cn = { class: "flex gap-8 items-center" }, _n = { class: "fm-typo-en-body-lg-600" }, Sn = { class: "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-24" }, Fn = { class: "flex flex-col gap-16 text-center" }, Vn = { class: "fm-typo-en-title-sm-800" }, wn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, to = /* @__PURE__ */ te({
|
|
1633
1637
|
__name: "Store",
|
|
1634
1638
|
setup(C) {
|
|
1635
|
-
const
|
|
1639
|
+
const _ = {
|
|
1636
1640
|
label: "Setup payout account",
|
|
1637
1641
|
value: "payout",
|
|
1638
1642
|
isPrimary: !1
|
|
@@ -1648,14 +1652,14 @@ const vn = { class: "px-24 flex flex-col gap-y-16" }, hn = { class: "flex gap-8
|
|
|
1648
1652
|
value: "create_category",
|
|
1649
1653
|
isPrimary: !0,
|
|
1650
1654
|
prependIcon: "add"
|
|
1651
|
-
}, a = N(), m = gt(), i =
|
|
1655
|
+
}, a = N(), m = gt(), i = ke(), { global: t, minor: c } = Ke, y = je(), u = L(() => i.sortedStoreCategories), k = L(() => i.sortedStoreCategories.map((g) => g.name)), l = N(), w = N();
|
|
1652
1656
|
async function U(g) {
|
|
1653
|
-
var
|
|
1654
|
-
g === "setting" ? (
|
|
1657
|
+
var T;
|
|
1658
|
+
g === "setting" ? (T = l.value) == null || T.showSheet(!0, i.storeOption) : g === "create_category" ? H(-1) : g === "create_reward" ? await m.push({ name: lt["$connect-STORE_REWARDS"] }) : g == "payout" && window.open(hn.paymentPortalUrl, "_blank");
|
|
1655
1659
|
}
|
|
1656
|
-
function j(g,
|
|
1660
|
+
function j(g, T) {
|
|
1657
1661
|
var p;
|
|
1658
|
-
const h = !!((p =
|
|
1662
|
+
const h = !!((p = T.company) != null && p.sstRegNo), $ = T.inclusiveTaxes ?? [], d = W.taxSystem.map((f) => f.code), n = h ? $.flatMap((f) => {
|
|
1659
1663
|
console.log(f, "inclusive tax");
|
|
1660
1664
|
const I = W.systemDefaultCode(f.systemCode);
|
|
1661
1665
|
return I ? [{ systemCode: f.systemCode, taxCode: I.taxCode }] : [];
|
|
@@ -1697,8 +1701,8 @@ const vn = { class: "px-24 flex flex-col gap-y-16" }, hn = { class: "flex gap-8
|
|
|
1697
1701
|
})
|
|
1698
1702
|
}));
|
|
1699
1703
|
}
|
|
1700
|
-
async function ne(g,
|
|
1701
|
-
const $ = !h && !!
|
|
1704
|
+
async function ne(g, T, h) {
|
|
1705
|
+
const $ = !h && !!T, d = !!h && !T;
|
|
1702
1706
|
let n;
|
|
1703
1707
|
if ($) {
|
|
1704
1708
|
const f = W.taxSystem[0] ? W.systemDefaultCode(W.taxSystem[0].code) : void 0, I = f ? `${f.name} (${f.taxCode})` : o("connect.store.taxPropagation.defaultTax");
|
|
@@ -1724,7 +1728,7 @@ const vn = { class: "px-24 flex flex-col gap-y-16" }, hn = { class: "flex gap-8
|
|
|
1724
1728
|
}
|
|
1725
1729
|
async function Z(g) {
|
|
1726
1730
|
var I, M, R, q;
|
|
1727
|
-
const
|
|
1731
|
+
const T = ((M = (I = i.storeOption) == null ? void 0 : I.company) == null ? void 0 : M.sstRegNo) ?? "", h = ae.cloneDeep(
|
|
1728
1732
|
((R = i.storeOption) == null ? void 0 : R.inclusiveTaxes) ?? []
|
|
1729
1733
|
), $ = ((q = g.company) == null ? void 0 : q.sstRegNo) ?? "";
|
|
1730
1734
|
await c(
|
|
@@ -1737,13 +1741,13 @@ const vn = { class: "px-24 flex flex-col gap-y-16" }, hn = { class: "flex gap-8
|
|
|
1737
1741
|
successMessage: o("connect.store.setting.update.success")
|
|
1738
1742
|
}
|
|
1739
1743
|
);
|
|
1740
|
-
const d =
|
|
1744
|
+
const d = T !== $, n = !ae.isEqual(
|
|
1741
1745
|
h,
|
|
1742
1746
|
g.inclusiveTaxes ?? []
|
|
1743
1747
|
);
|
|
1744
1748
|
!(d || n) || i.sortedStoreCategories.flatMap(
|
|
1745
1749
|
(J) => J.bundles
|
|
1746
|
-
).length === 0 || await ne(g, $,
|
|
1750
|
+
).length === 0 || await ne(g, $, T);
|
|
1747
1751
|
}
|
|
1748
1752
|
async function H(g = -1) {
|
|
1749
1753
|
var h, $;
|
|
@@ -1761,7 +1765,7 @@ const vn = { class: "px-24 flex flex-col gap-y-16" }, hn = { class: "flex gap-8
|
|
|
1761
1765
|
}
|
|
1762
1766
|
}) && y.open({
|
|
1763
1767
|
title: g == -1 ? o("connect.store.category.add") : o("connect.store.category.edit"),
|
|
1764
|
-
contentComponent:
|
|
1768
|
+
contentComponent: Rt,
|
|
1765
1769
|
contentComponentProps: {
|
|
1766
1770
|
initialValue: (($ = u.value[g]) == null ? void 0 : $.name) ?? "",
|
|
1767
1771
|
action: g == -1 ? "add" : "edit"
|
|
@@ -1784,15 +1788,15 @@ const vn = { class: "px-24 flex flex-col gap-y-16" }, hn = { class: "flex gap-8
|
|
|
1784
1788
|
);
|
|
1785
1789
|
});
|
|
1786
1790
|
}
|
|
1787
|
-
async function z(g,
|
|
1791
|
+
async function z(g, T, h, $) {
|
|
1788
1792
|
var p, f, I;
|
|
1789
|
-
|
|
1793
|
+
T ?? (T = (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);
|
|
1790
1794
|
const d = Fe(u.value);
|
|
1791
1795
|
for (const M of d)
|
|
1792
1796
|
for (const R of M.bundles)
|
|
1793
1797
|
console.log(R, "bundle in payload"), "pf_vouchers" in R && delete R.pf_vouchers;
|
|
1794
|
-
|
|
1795
|
-
const n = d[
|
|
1798
|
+
T != $ && $ != null && (d[$].bundles.splice(h, 1), h = d[T].bundles.length);
|
|
1799
|
+
const n = d[T];
|
|
1796
1800
|
if (!n) {
|
|
1797
1801
|
rt.error("Unexpected error", 2e3);
|
|
1798
1802
|
return;
|
|
@@ -1827,9 +1831,9 @@ const vn = { class: "px-24 flex flex-col gap-y-16" }, hn = { class: "flex gap-8
|
|
|
1827
1831
|
);
|
|
1828
1832
|
}
|
|
1829
1833
|
function oe(g) {
|
|
1830
|
-
var
|
|
1834
|
+
var T;
|
|
1831
1835
|
Ee({
|
|
1832
|
-
hasStoreCompany: !!((
|
|
1836
|
+
hasStoreCompany: !!((T = i.storeOption) != null && T.company),
|
|
1833
1837
|
confirm: () => pe.confirm(
|
|
1834
1838
|
o("connect.store.category.setup.title"),
|
|
1835
1839
|
o("connect.store.category.setup.button"),
|
|
@@ -1848,15 +1852,15 @@ const vn = { class: "px-24 flex flex-col gap-y-16" }, hn = { class: "flex gap-8
|
|
|
1848
1852
|
}));
|
|
1849
1853
|
});
|
|
1850
1854
|
}
|
|
1851
|
-
const
|
|
1855
|
+
const V = N([]);
|
|
1852
1856
|
function ie(g) {
|
|
1853
|
-
var
|
|
1854
|
-
(
|
|
1857
|
+
var T;
|
|
1858
|
+
(T = a.value) == null || T.showSheet({
|
|
1855
1859
|
bundle: g
|
|
1856
1860
|
});
|
|
1857
1861
|
}
|
|
1858
1862
|
return he(async () => {
|
|
1859
|
-
var
|
|
1863
|
+
var T, h;
|
|
1860
1864
|
await t(async () => {
|
|
1861
1865
|
var $, d;
|
|
1862
1866
|
if (await i.readMemberStore(), await i.readMembership(), await i.readRewards(), await i.readPayoutAccount(), ($ = m.currentRoute.value.query) != null && $.action) {
|
|
@@ -1870,10 +1874,10 @@ const vn = { class: "px-24 flex flex-col gap-y-16" }, hn = { class: "flex gap-8
|
|
|
1870
1874
|
case "create_feedvibe_bundle":
|
|
1871
1875
|
y.open({
|
|
1872
1876
|
title: "Select category",
|
|
1873
|
-
contentComponent:
|
|
1877
|
+
contentComponent: Nt
|
|
1874
1878
|
}).onPrimary((n) => {
|
|
1875
1879
|
y.close(), oe({
|
|
1876
|
-
categories:
|
|
1880
|
+
categories: k.value,
|
|
1877
1881
|
category: n,
|
|
1878
1882
|
index: -1,
|
|
1879
1883
|
bundle: {
|
|
@@ -1891,30 +1895,30 @@ const vn = { class: "px-24 flex flex-col gap-y-16" }, hn = { class: "flex gap-8
|
|
|
1891
1895
|
m.replace({ query: {} });
|
|
1892
1896
|
}
|
|
1893
1897
|
});
|
|
1894
|
-
const g = ((
|
|
1895
|
-
|
|
1896
|
-
...g ? [] : [
|
|
1898
|
+
const g = ((T = i.payoutAccount) == null ? void 0 : T.status) === "APPROVED" && ((h = i.payoutAccount) == null ? void 0 : h.enable) === !0;
|
|
1899
|
+
V.value = [
|
|
1900
|
+
...g ? [] : [_],
|
|
1897
1901
|
b,
|
|
1898
1902
|
s,
|
|
1899
1903
|
v
|
|
1900
1904
|
];
|
|
1901
|
-
}), (g,
|
|
1902
|
-
const h =
|
|
1905
|
+
}), (g, T) => {
|
|
1906
|
+
const h = S("FmPageHead"), $ = S("FmButton"), d = S("FmCard");
|
|
1903
1907
|
return x(), D(Y, null, [
|
|
1904
1908
|
r(h, {
|
|
1905
1909
|
title: e(o)("connect.store.title"),
|
|
1906
|
-
actions: e(
|
|
1910
|
+
actions: e(V),
|
|
1907
1911
|
"onClick:action": U
|
|
1908
1912
|
}, null, 8, ["title", "actions"]),
|
|
1909
|
-
|
|
1913
|
+
F("div", xn, [
|
|
1910
1914
|
e(u) && e(u).length > 0 ? (x(), D(Y, { key: 0 }, [
|
|
1911
1915
|
(x(!0), D(Y, null, ce(e(u), (n, p) => (x(), D("div", {
|
|
1912
1916
|
key: n.name,
|
|
1913
1917
|
class: "space-y-8 py-12"
|
|
1914
1918
|
}, [
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
r(
|
|
1919
|
+
F("div", Cn, [
|
|
1920
|
+
F("div", _n, K(n.name), 1),
|
|
1921
|
+
r(Te, { json: n }, null, 8, ["json"]),
|
|
1918
1922
|
r($, {
|
|
1919
1923
|
icon: "edit",
|
|
1920
1924
|
size: "md",
|
|
@@ -1922,29 +1926,29 @@ const vn = { class: "px-24 flex flex-col gap-y-16" }, hn = { class: "flex gap-8
|
|
|
1922
1926
|
onClick: (f) => H(p)
|
|
1923
1927
|
}, null, 8, ["onClick"])
|
|
1924
1928
|
]),
|
|
1925
|
-
|
|
1926
|
-
(x(!0), D(Y, null, ce(n.bundles, (f, I) => (x(), O(
|
|
1929
|
+
F("div", Sn, [
|
|
1930
|
+
(x(!0), D(Y, null, ce(n.bundles, (f, I) => (x(), O(Pt, {
|
|
1927
1931
|
bundle: f,
|
|
1928
1932
|
key: f._id,
|
|
1929
1933
|
onEdit: (M) => oe({
|
|
1930
1934
|
bundle: f,
|
|
1931
1935
|
category: p,
|
|
1932
1936
|
index: I,
|
|
1933
|
-
categories: e(
|
|
1937
|
+
categories: e(k)
|
|
1934
1938
|
}),
|
|
1935
1939
|
onDelete: (M) => z(null, p, I),
|
|
1936
1940
|
onSend: ie
|
|
1937
1941
|
}, null, 8, ["bundle", "onEdit", "onDelete"]))), 128)),
|
|
1938
|
-
r(
|
|
1942
|
+
r(kt, {
|
|
1939
1943
|
onCreate: (f) => oe({
|
|
1940
1944
|
category: p,
|
|
1941
1945
|
index: -1,
|
|
1942
|
-
categories: e(
|
|
1946
|
+
categories: e(k)
|
|
1943
1947
|
})
|
|
1944
1948
|
}, null, 8, ["onCreate"])
|
|
1945
1949
|
])
|
|
1946
1950
|
]))), 128)),
|
|
1947
|
-
r(
|
|
1951
|
+
r(yn, {
|
|
1948
1952
|
ref_key: "bundleSheetRef",
|
|
1949
1953
|
ref: w,
|
|
1950
1954
|
onUpdate: z
|
|
@@ -1955,29 +1959,29 @@ const vn = { class: "px-24 flex flex-col gap-y-16" }, hn = { class: "flex gap-8
|
|
|
1955
1959
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
1956
1960
|
}, {
|
|
1957
1961
|
default: B(() => [
|
|
1958
|
-
|
|
1962
|
+
T[1] || (T[1] = F("img", {
|
|
1959
1963
|
src: Xe,
|
|
1960
1964
|
class: "aspect-square w-[150px]"
|
|
1961
1965
|
}, null, -1)),
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1966
|
+
F("div", Fn, [
|
|
1967
|
+
F("div", Vn, K(e(o)("connect.store.bundle.title")), 1),
|
|
1968
|
+
F("div", wn, K(e(o)("connect.store.bundle.description")), 1)
|
|
1965
1969
|
]),
|
|
1966
1970
|
r($, {
|
|
1967
1971
|
variant: "primary",
|
|
1968
1972
|
label: e(o)("connect.store.actions.addCategory"),
|
|
1969
1973
|
icon: "add",
|
|
1970
|
-
onClick:
|
|
1974
|
+
onClick: T[0] || (T[0] = (n) => H(-1))
|
|
1971
1975
|
}, null, 8, ["label"])
|
|
1972
1976
|
]),
|
|
1973
1977
|
_: 1
|
|
1974
1978
|
})),
|
|
1975
|
-
r(
|
|
1979
|
+
r(Qt, {
|
|
1976
1980
|
ref_key: "settingSheetRef",
|
|
1977
1981
|
ref: l,
|
|
1978
1982
|
onUpdate: Z
|
|
1979
1983
|
}, null, 512),
|
|
1980
|
-
r(
|
|
1984
|
+
r(vn, {
|
|
1981
1985
|
ref_key: "sendBundleSheetRef",
|
|
1982
1986
|
ref: a
|
|
1983
1987
|
}, null, 512)
|
|
@@ -1987,5 +1991,5 @@ const vn = { class: "px-24 flex flex-col gap-y-16" }, hn = { class: "flex gap-8
|
|
|
1987
1991
|
}
|
|
1988
1992
|
});
|
|
1989
1993
|
export {
|
|
1990
|
-
|
|
1994
|
+
to as default
|
|
1991
1995
|
};
|