@cling-se/widget 0.20.0 → 0.21.0
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/CHANGELOG.md +6 -0
- package/dist/{AddClientCallout-p9hY5ma4.js → AddClientCallout-CHUJdq58.js} +4 -4
- package/dist/{AnswerModal-B5HomjlZ.js → AnswerModal-DyapzyIy.js} +679 -681
- package/dist/{AttachmentItem-vWCnfmSy.js → AttachmentItem-2Lbs4CKr.js} +4 -4
- package/dist/{BaseUpload-CpJcJRjy.js → BaseUpload-BdfjBI10.js} +2 -2
- package/dist/{BlockMedia-TjxVQfRI.js → BlockMedia-Cgrrv6PB.js} +1 -1
- package/dist/{CCallout-mg5CHKbW.js → CCallout-CbGaTfon.js} +1 -1
- package/dist/{CCurrencyDropdown-CYsaulJX.js → CCurrencyDropdown-s6YyITN1.js} +3 -3
- package/dist/{CDropdownItem-Cu4bFWtD.js → CDropdownItem-D2_kvXa_.js} +2 -2
- package/dist/{CFormField.vue_vue_type_script_setup_true_lang-BeIp8_aU.js → CFormField.vue_vue_type_script_setup_true_lang-CXzY3WCV.js} +2 -2
- package/dist/{CPhoneFormat-GM3CZqub.js → CPhoneFormat-CgWUX4xc.js} +1 -1
- package/dist/{CPhoneInput-DKf8eSyK.js → CPhoneInput-Bb78mU9U.js} +5 -5
- package/dist/{CPriceInput-Be3pub6u.js → CPriceInput-1feoLjqZ.js} +2 -2
- package/dist/{CSelect-CNY0-lsV.js → CSelect-DzVWxFr-.js} +1 -1
- package/dist/{CSkeleton-Bh4UU_9s.js → CSkeleton-Che8iURg.js} +1 -1
- package/dist/{ClientAutocomplete-Dm4wSPnJ.js → ClientAutocomplete-BrRpKW_p.js} +3 -3
- package/dist/{ClientModal-BHmZDhYp.js → ClientModal-BkRusR-p.js} +8 -8
- package/dist/{ColorPicker-CDmqEHnY.js → ColorPicker-Ba0bViV-.js} +1 -1
- package/dist/{CompanyModal-CifLcwwI.js → CompanyModal-RtuWTytD.js} +7 -7
- package/dist/{ContentWrapper-CTNDb0ck.js → ContentWrapper-C92i2rMN.js} +6 -6
- package/dist/{CoverBlockSettings-rLaGxL29.js → CoverBlockSettings-BPqtMkhc.js} +7 -7
- package/dist/{DocAnswer-DdRshw-Z.js → DocAnswer-BPB_pIO9.js} +2 -2
- package/dist/{DocDetails-bSPDS7-8.js → DocDetails-CmuE-pGU.js} +4 -4
- package/dist/{DocForm-Cn6th1oG.js → DocForm-MZuCjmqg.js} +24 -24
- package/dist/{DocFormSend-BVoLYwUB.js → DocFormSend-t1DotUWg.js} +2 -2
- package/dist/{DocLinks-BB5jSGpp.js → DocLinks-raND-RV3.js} +2 -2
- package/dist/{DocModalBase-DVMNHrQ0.js → DocModalBase-BTf5RwrM.js} +1 -1
- package/dist/{DocPrint-4LADFj3b.js → DocPrint-rFQCpls5.js} +1 -1
- package/dist/{DocReceipt-DMsRqm6N.js → DocReceipt-BzEv7iQI.js} +2 -2
- package/dist/{DocSendReminder--sHhq7nq.js → DocSendReminder-B3x4IK4a.js} +1 -1
- package/dist/{DocTextEditor-rxDDkurp.js → DocTextEditor-BnizHe_5.js} +141 -134
- package/dist/{DocTimeline-XcSBcUaQ.js → DocTimeline-DnZj_LnM.js} +2 -2
- package/dist/{DocumentClient-C_ZKPKB5.js → DocumentClient-gm-pzudv.js} +5 -5
- package/dist/{DocumentLayout-B49wHYov.js → DocumentLayout-YxxpHY-E.js} +5 -5
- package/dist/{DocumentLogotype-BuK-fBZa.js → DocumentLogotype-ChGKZ_Qg.js} +4 -4
- package/dist/{DocumentVoided-oOGAvC6V.js → DocumentVoided-HJGhl1_K.js} +1 -1
- package/dist/{EmbedInput-D8YWQ-qB.js → EmbedInput-vxzmm0aK.js} +3 -3
- package/dist/{EmbedSettings-CAMvefuZ.js → EmbedSettings-CzXZc7oD.js} +3 -3
- package/dist/{ErrorCallout-BJyb9nBD.js → ErrorCallout-C51ElTfp.js} +1 -1
- package/dist/{FilePreviewModal-DHyhUuZo.js → FilePreviewModal-BAT5txhb.js} +2 -2
- package/dist/{Flag-Ce5qgf2m.js → Flag-BexeJEGw.js} +1 -1
- package/dist/{HeaderSettings-BMOUeMU8.js → HeaderSettings-DrrnesnI.js} +9 -9
- package/dist/{ImageSelectModal-BJEHD53w.js → ImageSelectModal-CZK9a8V7.js} +3 -3
- package/dist/{ImageUploadWrapper-Bm_fsubV.js → ImageUploadWrapper-DMR97A6K.js} +2 -2
- package/dist/{Index-BFUBReG-.js → Index-B1ay-1P2.js} +3 -3
- package/dist/{Index-BRRXjIQP.js → Index-BEuSlOrT.js} +1 -1
- package/dist/{Index-BIAKEao7.js → Index-BVBYxWuz.js} +4 -4
- package/dist/{Index-C9iZyCtn.js → Index-BYFWrKuq.js} +8 -8
- package/dist/{Index-CxSrhoOz.js → Index-BYIKyMnu.js} +5 -5
- package/dist/{Index-ClT5TAft.js → Index-BiP_vcaf.js} +3 -3
- package/dist/{Index-CghqZnil.js → Index-BiuMBcD2.js} +5 -5
- package/dist/{Index-D_j8z8TJ.js → Index-Blrcegjn.js} +9 -9
- package/dist/{Index-BkaAqWBO.js → Index-BwDu8CJK.js} +1 -1
- package/dist/{Index-C7CgBDIF.js → Index-C9yPo8e-.js} +3 -3
- package/dist/{Index-y1iAAknQ.js → Index-CAMIux1F.js} +641 -598
- package/dist/{Index-CAgPjQtC.js → Index-CKG-y86w.js} +6 -6
- package/dist/{Index-Ba4whr1w.js → Index-CLJS5uIx.js} +2 -2
- package/dist/{Index-B7LFM_9O.js → Index-CN7frBBf.js} +2 -2
- package/dist/{Index-SSS__jy7.js → Index-CPcPhA1k.js} +5 -5
- package/dist/{Index-CQ9351hs.js → Index-CRrUmXai.js} +8 -8
- package/dist/{Index-B6utGn5s.js → Index-CWeJqHrl.js} +1 -1
- package/dist/{Index-B8363PUi.js → Index-Cfw4pakU.js} +4 -4
- package/dist/{Index-CItHDT3v.js → Index-CpsMRxtq.js} +4 -4
- package/dist/{Index-CQvg6N5q.js → Index-D2ZkVyYi.js} +5 -5
- package/dist/{Index-BSDfmC22.js → Index-D4YkmlSS.js} +2 -2
- package/dist/{Index-ClIh2IW1.js → Index-DH_R4un3.js} +258 -240
- package/dist/{Index-Bns741YV.js → Index-DLQ_V1c5.js} +3 -3
- package/dist/{Index-D9NojrLE.js → Index-DPDipy5g.js} +4 -4
- package/dist/{Index-2rJaMFcL.js → Index-D_C0qEB3.js} +4 -4
- package/dist/{Index-EFThQNhh.js → Index-DgtEJqd_.js} +2 -2
- package/dist/{Index-CYbVMO20.js → Index-Dnn1-7F6.js} +4 -4
- package/dist/{Index-CrIL3HJg.js → Index-DsFK6Cph.js} +3 -3
- package/dist/{Index-Do4iuEM8.js → Index-DtSc0ZCn.js} +2 -2
- package/dist/{Index-Bcdw8XVA.js → Index-LQVro5oP.js} +5 -5
- package/dist/{Index-DCR65NzU.js → Index-XArklt7b.js} +7 -7
- package/dist/Index-flxUW9JI.js +4 -0
- package/dist/{Index-CzdPYWAZ.js → Index-kyXImimP.js} +4 -4
- package/dist/{Index-CoSRZBAe.js → Index-qVrrTuqd.js} +6 -6
- package/dist/{Index.vue_vue_type_script_lang-cUDsYudO.js → Index.vue_vue_type_script_lang-CkFt4EE-.js} +2 -2
- package/dist/{InputToggleRow-BFnFE9Oc.js → InputToggleRow-CIJ2tdb5.js} +1 -1
- package/dist/{ManualPopover-DmAP6B_Y.js → ManualPopover-Cm4X4puK.js} +1 -1
- package/dist/{MediaWrapper-C4JfFbde.js → MediaWrapper-_QoV0Yp3.js} +3 -3
- package/dist/{NotBindingText-7Rr1u9v1.js → NotBindingText-DXOuTuRU.js} +2 -2
- package/dist/{PackageGroup-DkdCS2oR.js → PackageGroup-CK5XKMRW.js} +5 -5
- package/dist/{PdfTerms-BdymoJyT.js → PdfTerms-4-xS7sSr.js} +2 -2
- package/dist/{PdfViewer-CXkBa0_g.js → PdfViewer-Kl_mnvI8.js} +2 -2
- package/dist/{PlainHtml.vue_vue_type_script_setup_true_lang-lB3eiXpl.js → PlainHtml.vue_vue_type_script_setup_true_lang-BpWlRPKs.js} +1 -1
- package/dist/{PriceHeader-DXustcav.js → PriceHeader-BntNqVVQ.js} +7 -7
- package/dist/{SearchApi-DuZeNjkY.js → SearchApi-BEUkPklX.js} +1 -1
- package/dist/{SendForm-BrSZ5UeL.js → SendForm-BS73k4AT.js} +8 -8
- package/dist/{Setup-CNSgF7b0.js → Setup-CS03IRqK.js} +1 -1
- package/dist/{SmartList-Rb2o-PbW.js → SmartList-DRocSsgI.js} +1 -1
- package/dist/{Sortable.vue_vue_type_script_setup_true_lang-r7QF2LJS.js → Sortable.vue_vue_type_script_setup_true_lang-Dv_klLzu.js} +1 -1
- package/dist/{TermsSettings-yBfUx-7b.js → TermsSettings-DUJ9LO60.js} +5 -5
- package/dist/{ThemeColorRow-DYUR7TXj.js → ThemeColorRow-Dd_GSct6.js} +3 -3
- package/dist/{ToggleBinding-BEjzG2Xh.js → ToggleBinding-CfQWg9lu.js} +4 -4
- package/dist/{UploadModal-s3ML8quJ.js → UploadModal-CbFASSdJ.js} +2 -2
- package/dist/{VideoPlayerInput-Brw0_mfP.js → VideoPlayerInput-DTlqRKfe.js} +4 -4
- package/dist/{VideoPlayerSettings-aNVhnuCo.js → VideoPlayerSettings-Dzjf2pR-.js} +2 -2
- package/dist/{VideoSelectModal-BzIXa-FM.js → VideoSelectModal-l13Jzs11.js} +3 -3
- package/dist/{focusDrawerMixin-DHsxgKiI.js → focusDrawerMixin-D3TS6r2P.js} +1 -1
- package/dist/{formDrawerState-BRzcOCYZ.js → formDrawerState-C4a0CyyW.js} +1 -1
- package/dist/fortnoxTheme-BZNI3z8T.js +8 -0
- package/dist/{helpers-5o9UkEF4.js → helpers-z8_6IC7O.js} +1 -1
- package/dist/{index-BTf-KF-1.js → index-4cF-Byrh.js} +6 -8
- package/dist/{index-TdIPOc2f.js → index-BNLATTGI.js} +1 -1
- package/dist/{index-DKJal8iX.js → index-BahcePwR.js} +8 -8
- package/dist/{index-DxQodQ2P.js → index-C3pwuPoh.js} +1 -1
- package/dist/{index-B02B2of8.js → index-DKdgpzG1.js} +3 -3
- package/dist/{index-BXGeWlwY.js → index-GBvEp_9M.js} +1 -1
- package/dist/{index-CE5j0xPs.js → index-bVINFrWw.js} +1 -1
- package/dist/index.es.js +3 -3
- package/dist/index.umd.js +151 -151
- package/dist/{main-DKpj1mxJ.js → main-D8veaMd1.js} +9728 -9649
- package/dist/{mapFormMixin-D2ME1W30.js → mapFormMixin-CFpAen9Y.js} +2 -2
- package/dist/{omit-BlWnRm5y.js → omit-D0GRsmN6.js} +1 -1
- package/dist/{publicSenderState-CXApLC0x.js → publicSenderState-eqZv8nqt.js} +1 -1
- package/dist/{splitpanes-CxR9KAOD.js → splitpanes-CMv_BjEq.js} +1 -1
- package/dist/{template-B2jjOkEF.js → template-DZJeLTWP.js} +1 -1
- package/dist/{tippy.esm-C_ureXvQ.js → tippy.esm-DfMqnQub.js} +11 -7
- package/dist/{useTermsModal-DctGKo-3.js → useTermsModal-DcYDBUN3.js} +4 -4
- package/dist/{utils-mwks91R5.js → utils-CuhF9735.js} +1 -1
- package/dist/{validation-HJ33ekhX.js → validation-DSHT8mZg.js} +2 -2
- package/dist/widget.css +1 -1
- package/package.json +2 -2
- package/dist/Index-CvYoh9UK.js +0 -4
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { m as q } from "./mapFormMixin-
|
|
2
|
-
import { C as $e } from "./CCallout-
|
|
3
|
-
import { C as Y, a as Z, w as Te } from "./CDropdownItem-
|
|
4
|
-
import { E as me } from "./ErrorCallout-
|
|
5
|
-
import { c5 as Ae, c6 as he, c7 as Ce, c8 as Pe, c9 as xe, ca as
|
|
6
|
-
import { u as
|
|
7
|
-
import { T as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { o as fe } from "./omit-
|
|
10
|
-
import { C as J } from "./CPriceInput-
|
|
11
|
-
import { u as ye } from "./index-
|
|
12
|
-
import { S as
|
|
13
|
-
import { m as
|
|
14
|
-
import { _ as ke } from "./CFormField.vue_vue_type_script_setup_true_lang-
|
|
15
|
-
|
|
1
|
+
import { m as q } from "./mapFormMixin-CFpAen9Y.js";
|
|
2
|
+
import { C as $e } from "./CCallout-CbGaTfon.js";
|
|
3
|
+
import { C as Y, a as Z, w as Te } from "./CDropdownItem-D2_kvXa_.js";
|
|
4
|
+
import { E as me } from "./ErrorCallout-C51ElTfp.js";
|
|
5
|
+
import { c5 as Ae, c6 as he, c7 as Ce, c8 as Pe, c9 as xe, ca as De, cb as Ve, aK as Se, _ as R, b as h, d, o as a, j as l, t as p, x as D, F as C, n as V, W as Q, e as w, f as u, s as H, m as z, a as E, g as L, w as v, R as B, ai as F, T as ne, an as G, cc as Re, cd as se, aF as Me, a8 as ae, bi as W, aD as Oe, ce as Le, bl as Ee, a4 as U, c as A, u as S, q as _, cf as Ue, cg as Be, c1 as ge, v as We, ch as ve, $ as ze, af as x, al as Fe, aH as j, V as je, a2 as oe, b_ as qe, ci as Ne, cj as He, ab as Ge, ck as Ke, ae as Ye, ag as Ze, c4 as Je, cl as re, aE as Qe } from "./main-D8veaMd1.js";
|
|
6
|
+
import { u as Xe } from "./DocumentLayout-YxxpHY-E.js";
|
|
7
|
+
import { T as et } from "./DocTextEditor-BnizHe_5.js";
|
|
8
|
+
import { _ as tt, m as it } from "./Sortable.vue_vue_type_script_setup_true_lang-Dv_klLzu.js";
|
|
9
|
+
import { o as fe } from "./omit-D0GRsmN6.js";
|
|
10
|
+
import { C as J } from "./CPriceInput-1feoLjqZ.js";
|
|
11
|
+
import { u as ye } from "./index-C3pwuPoh.js";
|
|
12
|
+
import { S as nt } from "./SearchApi-BEUkPklX.js";
|
|
13
|
+
import { m as st } from "./index-GBvEp_9M.js";
|
|
14
|
+
import { _ as ke } from "./CFormField.vue_vue_type_script_setup_true_lang-CXzY3WCV.js";
|
|
15
|
+
import { F as at } from "./tippy.esm-DfMqnQub.js";
|
|
16
|
+
const ot = [
|
|
16
17
|
"unit",
|
|
17
18
|
"m2",
|
|
18
19
|
"hour",
|
|
@@ -30,7 +31,7 @@ const nt = [
|
|
|
30
31
|
"kWh"
|
|
31
32
|
];
|
|
32
33
|
var X, le;
|
|
33
|
-
function
|
|
34
|
+
function rt() {
|
|
34
35
|
if (le) return X;
|
|
35
36
|
le = 1;
|
|
36
37
|
function e() {
|
|
@@ -38,56 +39,56 @@ function st() {
|
|
|
38
39
|
return X = e, X;
|
|
39
40
|
}
|
|
40
41
|
var ee, ce;
|
|
41
|
-
function
|
|
42
|
+
function lt() {
|
|
42
43
|
if (ce) return ee;
|
|
43
44
|
ce = 1;
|
|
44
|
-
var e = Ae(), t =
|
|
45
|
+
var e = Ae(), t = rt(), n = he(), o = 1 / 0, s = e && 1 / n(new e([, -0]))[1] == o ? function(i) {
|
|
45
46
|
return new e(i);
|
|
46
47
|
} : t;
|
|
47
48
|
return ee = s, ee;
|
|
48
49
|
}
|
|
49
50
|
var te, de;
|
|
50
|
-
function
|
|
51
|
+
function ct() {
|
|
51
52
|
if (de) return te;
|
|
52
53
|
de = 1;
|
|
53
|
-
var e = Ce(), t = Pe(), n =
|
|
54
|
-
function
|
|
55
|
-
var
|
|
56
|
-
if (
|
|
54
|
+
var e = Ce(), t = Pe(), n = De(), o = xe(), s = lt(), i = he(), f = 200;
|
|
55
|
+
function g(k, c, b) {
|
|
56
|
+
var y = -1, $ = t, m = k.length, T = !0, r = [], P = r;
|
|
57
|
+
if (b)
|
|
57
58
|
T = !1, $ = n;
|
|
58
59
|
else if (m >= f) {
|
|
59
|
-
var
|
|
60
|
-
if (
|
|
61
|
-
return i(
|
|
60
|
+
var I = c ? null : s(k);
|
|
61
|
+
if (I)
|
|
62
|
+
return i(I);
|
|
62
63
|
T = !1, $ = o, P = new e();
|
|
63
64
|
} else
|
|
64
65
|
P = c ? [] : r;
|
|
65
66
|
e:
|
|
66
|
-
for (; ++
|
|
67
|
-
var M = k[
|
|
68
|
-
if (M =
|
|
67
|
+
for (; ++y < m; ) {
|
|
68
|
+
var M = k[y], O = c ? c(M) : M;
|
|
69
|
+
if (M = b || M !== 0 ? M : 0, T && O === O) {
|
|
69
70
|
for (var N = P.length; N--; )
|
|
70
|
-
if (P[N] ===
|
|
71
|
+
if (P[N] === O)
|
|
71
72
|
continue e;
|
|
72
|
-
c && P.push(
|
|
73
|
-
} else $(P,
|
|
73
|
+
c && P.push(O), r.push(M);
|
|
74
|
+
} else $(P, O, b) || (P !== r && P.push(O), r.push(M));
|
|
74
75
|
}
|
|
75
76
|
return r;
|
|
76
77
|
}
|
|
77
|
-
return te =
|
|
78
|
+
return te = g, te;
|
|
78
79
|
}
|
|
79
80
|
var ie, ue;
|
|
80
|
-
function
|
|
81
|
+
function dt() {
|
|
81
82
|
if (ue) return ie;
|
|
82
83
|
ue = 1;
|
|
83
|
-
var e =
|
|
84
|
+
var e = Ve(), t = ct();
|
|
84
85
|
function n(o, s) {
|
|
85
86
|
return o && o.length ? t(o, e(s, 2)) : [];
|
|
86
87
|
}
|
|
87
88
|
return ie = n, ie;
|
|
88
89
|
}
|
|
89
|
-
var
|
|
90
|
-
const
|
|
90
|
+
var ut = dt();
|
|
91
|
+
const pt = /* @__PURE__ */ Se(ut), mt = {
|
|
91
92
|
name: "PackageGroupSelect",
|
|
92
93
|
i18nOptions: {
|
|
93
94
|
namespaces: "PackageGroupSelect",
|
|
@@ -130,7 +131,7 @@ const ct = /* @__PURE__ */ De(lt), dt = {
|
|
|
130
131
|
},
|
|
131
132
|
emits: ["input"],
|
|
132
133
|
setup() {
|
|
133
|
-
return { docWidth:
|
|
134
|
+
return { docWidth: Xe() };
|
|
134
135
|
},
|
|
135
136
|
data() {
|
|
136
137
|
return {
|
|
@@ -156,29 +157,29 @@ const ct = /* @__PURE__ */ De(lt), dt = {
|
|
|
156
157
|
]
|
|
157
158
|
};
|
|
158
159
|
}
|
|
159
|
-
},
|
|
160
|
+
}, ht = {
|
|
160
161
|
class: "font-inter",
|
|
161
162
|
style: { padding: "calc(2 * var(--rem)) 0 calc(1 * var(--rem)) 0", color: "#111" }
|
|
162
|
-
},
|
|
163
|
+
}, gt = { style: { "font-size": "18px", "font-weight": "600", "text-align": "center", "margin-bottom": "calc(1.5 * var(--rem))" } }, vt = ["onClick"], ft = { class: "package-group-option__illustration" }, yt = {
|
|
163
164
|
key: 0,
|
|
164
165
|
class: "package-group-option__illustration-card animate"
|
|
165
|
-
},
|
|
166
|
-
function
|
|
167
|
-
const f =
|
|
168
|
-
return a(), d("div",
|
|
169
|
-
l("div",
|
|
166
|
+
}, kt = { class: "package-group-option__title" }, bt = ["innerHTML"];
|
|
167
|
+
function wt(e, t, n, o, s, i) {
|
|
168
|
+
const f = h("CIcon");
|
|
169
|
+
return a(), d("div", ht, [
|
|
170
|
+
l("div", gt, p(e.$t("title")), 1),
|
|
170
171
|
l("div", null, [
|
|
171
172
|
l("div", {
|
|
172
|
-
class:
|
|
173
|
+
class: D([{ "is-700-or-less": o.docWidth <= 700 }, "options"])
|
|
173
174
|
}, [
|
|
174
|
-
(a(!0), d(C, null,
|
|
175
|
+
(a(!0), d(C, null, V(s.options, (g, k) => (a(), d("div", {
|
|
175
176
|
key: k,
|
|
176
|
-
style: Q({ backgroundColor:
|
|
177
|
+
style: Q({ backgroundColor: g.background }),
|
|
177
178
|
class: "package-group-option",
|
|
178
|
-
onClick: (c) => e.$emit("input",
|
|
179
|
+
onClick: (c) => e.$emit("input", g.value)
|
|
179
180
|
}, [
|
|
180
|
-
l("div",
|
|
181
|
-
|
|
181
|
+
l("div", ft, [
|
|
182
|
+
g.value === "single" ? (a(), d("div", yt, t[0] || (t[0] = [
|
|
182
183
|
l("div", { style: { flex: "1 1 auto" } }, [
|
|
183
184
|
l("div", {
|
|
184
185
|
style: { width: "40%", height: "10px", "margin-bottom": "8px" },
|
|
@@ -189,18 +190,18 @@ function yt(e, t, n, o, s, i) {
|
|
|
189
190
|
class: "bg-gray-100"
|
|
190
191
|
})
|
|
191
192
|
], -1)
|
|
192
|
-
]))) :
|
|
193
|
-
|
|
193
|
+
]))) : w("", !0),
|
|
194
|
+
g.value === "radio" ? (a(), d(C, { key: 1 }, V(3, (c) => l("div", {
|
|
194
195
|
key: c,
|
|
195
|
-
class:
|
|
196
|
+
class: D([{ animate: c === 2 }, "package-group-option__illustration-card"])
|
|
196
197
|
}, [
|
|
197
198
|
l("div", {
|
|
198
199
|
style: Q([
|
|
199
200
|
{ width: "8px", height: "8px", "border-radius": "50%", "box-shadow": `0 0 0 1px white,
|
|
200
201
|
0 0 0 2px hsl(0, 0%, 76%)`, "margin-right": "10px" },
|
|
201
202
|
c === 2 && {
|
|
202
|
-
boxShadow: `0 0 0 1px white, 0 0 0 2px ${
|
|
203
|
-
backgroundColor:
|
|
203
|
+
boxShadow: `0 0 0 1px white, 0 0 0 2px ${g.background}`,
|
|
204
|
+
backgroundColor: g.background
|
|
204
205
|
}
|
|
205
206
|
])
|
|
206
207
|
}, null, 4),
|
|
@@ -214,15 +215,15 @@ function yt(e, t, n, o, s, i) {
|
|
|
214
215
|
class: "bg-gray-100"
|
|
215
216
|
})
|
|
216
217
|
], -1))
|
|
217
|
-
], 2)), 64)) :
|
|
218
|
-
|
|
218
|
+
], 2)), 64)) : w("", !0),
|
|
219
|
+
g.value === "checkbox" ? (a(), d(C, { key: 2 }, V(3, (c) => l("div", {
|
|
219
220
|
key: c,
|
|
220
|
-
class:
|
|
221
|
+
class: D([{ animate: c !== 3 }, "package-group-option__illustration-card"])
|
|
221
222
|
}, [
|
|
222
223
|
l("div", {
|
|
223
|
-
style: Q([{ height: "12px", width: "12px", "border-radius": "2px", "background-color": "hsl(0, 0%, 76%)", "margin-right": "10px", color: "white", padding: "1px", display: "inline-flex", "align-items": "center", "justify-content": "center" }, c !== 3 && { backgroundColor:
|
|
224
|
+
style: Q([{ height: "12px", width: "12px", "border-radius": "2px", "background-color": "hsl(0, 0%, 76%)", "margin-right": "10px", color: "white", padding: "1px", display: "inline-flex", "align-items": "center", "justify-content": "center" }, c !== 3 && { backgroundColor: g.background }])
|
|
224
225
|
}, [
|
|
225
|
-
|
|
226
|
+
u(f, {
|
|
226
227
|
type: c !== 3 ? "check" : "empty",
|
|
227
228
|
"stroke-width": "5",
|
|
228
229
|
size: "8"
|
|
@@ -238,24 +239,24 @@ function yt(e, t, n, o, s, i) {
|
|
|
238
239
|
class: "bg-gray-100"
|
|
239
240
|
})
|
|
240
241
|
], -1))
|
|
241
|
-
], 2)), 64)) :
|
|
242
|
+
], 2)), 64)) : w("", !0)
|
|
242
243
|
]),
|
|
243
244
|
l("div", null, [
|
|
244
|
-
l("div",
|
|
245
|
+
l("div", kt, p(g.title), 1),
|
|
245
246
|
l("div", {
|
|
246
247
|
class: "package-group-option__subtitle",
|
|
247
|
-
innerHTML:
|
|
248
|
-
}, null, 8,
|
|
248
|
+
innerHTML: g.subTitle
|
|
249
|
+
}, null, 8, bt)
|
|
249
250
|
])
|
|
250
|
-
], 12,
|
|
251
|
+
], 12, vt))), 128))
|
|
251
252
|
], 2)
|
|
252
253
|
])
|
|
253
254
|
]);
|
|
254
255
|
}
|
|
255
|
-
const
|
|
256
|
+
const It = /* @__PURE__ */ R(mt, [["render", wt], ["__scopeId", "data-v-9558e77f"]]), _t = {
|
|
256
257
|
name: "ArticleAutocomplete",
|
|
257
258
|
components: {
|
|
258
|
-
SearchApi:
|
|
259
|
+
SearchApi: nt
|
|
259
260
|
},
|
|
260
261
|
mixins: [q([])],
|
|
261
262
|
props: {
|
|
@@ -316,7 +317,7 @@ const kt = /* @__PURE__ */ R(dt, [["render", yt], ["__scopeId", "data-v-9558e77f
|
|
|
316
317
|
},
|
|
317
318
|
methods: {
|
|
318
319
|
...z({
|
|
319
|
-
loadArticles:
|
|
320
|
+
loadArticles: L.LOAD_ARTICLES
|
|
320
321
|
}),
|
|
321
322
|
priceFormat: H,
|
|
322
323
|
search(e, t) {
|
|
@@ -374,32 +375,32 @@ const kt = /* @__PURE__ */ R(dt, [["render", yt], ["__scopeId", "data-v-9558e77f
|
|
|
374
375
|
});
|
|
375
376
|
}
|
|
376
377
|
}
|
|
377
|
-
},
|
|
378
|
+
}, $t = {
|
|
378
379
|
key: 0,
|
|
379
380
|
ref: "dropdown",
|
|
380
381
|
class: "r-container"
|
|
381
|
-
},
|
|
382
|
+
}, Tt = ["onClickCapture"], At = { class: "r-item-title w-full truncate" }, Ct = { class: "r-item-details" }, Pt = {
|
|
382
383
|
key: 0,
|
|
383
384
|
style: { width: "18px", height: "18px", "border-radius": "2px", "background-color": "hsl(0, 0%, 60%)", display: "inline-flex", "justify-content": "center", "align-items": "center" }
|
|
384
|
-
},
|
|
385
|
+
}, xt = { key: 1 }, Dt = { key: 2 }, Vt = { key: 3 }, St = {
|
|
385
386
|
key: 0,
|
|
386
387
|
class: "r-item-icon"
|
|
387
388
|
};
|
|
388
|
-
function
|
|
389
|
-
const f =
|
|
389
|
+
function Rt(e, t, n, o, s, i) {
|
|
390
|
+
const f = h("CInput"), g = h("SearchApi"), k = h("CIcon");
|
|
390
391
|
return a(), d("div", B({
|
|
391
392
|
class: { "is-open": s.isOpen }
|
|
392
393
|
}, e.$attrs, {
|
|
393
394
|
style: { position: "relative" },
|
|
394
395
|
onKeydownPassive: t[0] || (t[0] = (...c) => i.onKeydown && i.onKeydown(...c))
|
|
395
396
|
}), [
|
|
396
|
-
|
|
397
|
+
u(g, { "custom-search": {
|
|
397
398
|
article: !0,
|
|
398
399
|
extensionArticle: !0,
|
|
399
400
|
project: !1
|
|
400
401
|
} }, {
|
|
401
|
-
default:
|
|
402
|
-
|
|
402
|
+
default: v(({ fetch: c }) => [
|
|
403
|
+
u(f, B({
|
|
403
404
|
...e.$attrs,
|
|
404
405
|
...e.$props
|
|
405
406
|
}, {
|
|
@@ -408,18 +409,18 @@ function Vt(e, t, n, o, s, i) {
|
|
|
408
409
|
type: n.tag,
|
|
409
410
|
"auto-resize": !0,
|
|
410
411
|
class: "r-input",
|
|
411
|
-
"onUpdate:modelValue": (
|
|
412
|
+
"onUpdate:modelValue": (b) => i.search(c, b),
|
|
412
413
|
onFocus: i.onFocus,
|
|
413
414
|
onKeydown: [
|
|
414
|
-
|
|
415
|
-
|
|
415
|
+
F(i.hideResults, ["tab"]),
|
|
416
|
+
F(i.hideResults, ["escape"])
|
|
416
417
|
],
|
|
417
418
|
onBlur: i.onBlur
|
|
418
419
|
}), {
|
|
419
|
-
prefix:
|
|
420
|
+
prefix: v(() => [
|
|
420
421
|
ne(e.$slots, "prefix", {}, void 0, !0)
|
|
421
422
|
]),
|
|
422
|
-
suffix:
|
|
423
|
+
suffix: v(() => [
|
|
423
424
|
ne(e.$slots, "suffix", {}, void 0, !0)
|
|
424
425
|
]),
|
|
425
426
|
_: 2
|
|
@@ -427,36 +428,36 @@ function Vt(e, t, n, o, s, i) {
|
|
|
427
428
|
]),
|
|
428
429
|
_: 3
|
|
429
430
|
}),
|
|
430
|
-
s.isOpen ? (a(), d("div",
|
|
431
|
-
(a(!0), d(C, null,
|
|
432
|
-
key:
|
|
433
|
-
class:
|
|
434
|
-
onClickCapture: G((
|
|
431
|
+
s.isOpen ? (a(), d("div", $t, [
|
|
432
|
+
(a(!0), d(C, null, V(s.searchResults, (c, b) => (a(), d("div", {
|
|
433
|
+
key: b,
|
|
434
|
+
class: D([{ active: s.selectedIndex === b }, "r-item"]),
|
|
435
|
+
onClickCapture: G((y) => i.onSelect(c), ["stop"])
|
|
435
436
|
}, [
|
|
436
|
-
l("div",
|
|
437
|
-
l("div",
|
|
438
|
-
c.externalReference && c.externalReference.service ? (a(), d("div",
|
|
439
|
-
|
|
437
|
+
l("div", At, p(c.name), 1),
|
|
438
|
+
l("div", Ct, [
|
|
439
|
+
c.externalReference && c.externalReference.service ? (a(), d("div", Pt, [
|
|
440
|
+
u(k, {
|
|
440
441
|
type: c.externalReference.service,
|
|
441
442
|
style: { color: "white" },
|
|
442
443
|
size: "14"
|
|
443
444
|
}, null, 8, ["type"])
|
|
444
|
-
])) :
|
|
445
|
-
c.article_no ? (a(), d("div",
|
|
446
|
-
c.price ? (a(), d("div",
|
|
447
|
-
c.vat ? (a(), d("div",
|
|
445
|
+
])) : w("", !0),
|
|
446
|
+
c.article_no ? (a(), d("div", xt, p(c.article_no), 1)) : w("", !0),
|
|
447
|
+
c.price ? (a(), d("div", Dt, p(i.priceFormat(c.price, { currency: c.currency })), 1)) : w("", !0),
|
|
448
|
+
c.vat ? (a(), d("div", Vt, p(e.$t("vat.sharedTitle").capitalize()) + " " + p(c.vat) + "% ", 1)) : w("", !0)
|
|
448
449
|
]),
|
|
449
|
-
s.selectedIndex ===
|
|
450
|
-
|
|
450
|
+
s.selectedIndex === b ? (a(), d("div", St, [
|
|
451
|
+
u(k, {
|
|
451
452
|
type: "corner-down-left",
|
|
452
453
|
size: "16"
|
|
453
454
|
})
|
|
454
|
-
])) :
|
|
455
|
-
], 42,
|
|
456
|
-
], 512)) :
|
|
455
|
+
])) : w("", !0)
|
|
456
|
+
], 42, Tt))), 128))
|
|
457
|
+
], 512)) : w("", !0)
|
|
457
458
|
], 16);
|
|
458
459
|
}
|
|
459
|
-
const be = /* @__PURE__ */ R(
|
|
460
|
+
const be = /* @__PURE__ */ R(_t, [["render", Rt], ["__scopeId", "data-v-3e66bf1c"]]), pe = {
|
|
460
461
|
isDeductable: !1,
|
|
461
462
|
isRut: !1,
|
|
462
463
|
greenRot15: !1,
|
|
@@ -488,7 +489,7 @@ const be = /* @__PURE__ */ R(bt, [["render", Vt], ["__scopeId", "data-v-3e66bf1c
|
|
|
488
489
|
packageId: t.packageId
|
|
489
490
|
});
|
|
490
491
|
if (o) {
|
|
491
|
-
const i = (k = []) => k.reduce((c,
|
|
492
|
+
const i = (k = []) => k.reduce((c, b) => ({ ...c, [b]: !1 }), {}), g = Object.values(
|
|
492
493
|
fe({
|
|
493
494
|
rot: "isDeductable",
|
|
494
495
|
rut: "isRut",
|
|
@@ -497,14 +498,14 @@ const be = /* @__PURE__ */ R(bt, [["render", Vt], ["__scopeId", "data-v-3e66bf1c
|
|
|
497
498
|
greenRot50: "greenRot50"
|
|
498
499
|
}, [o])
|
|
499
500
|
);
|
|
500
|
-
|
|
501
|
+
g.some((k) => !!s[k]) && (s = { ...s, ...i(g) });
|
|
501
502
|
}
|
|
502
503
|
return s;
|
|
503
|
-
},
|
|
504
|
+
}, Mt = (e, t = null) => {
|
|
504
505
|
const n = ae(e.currency, t);
|
|
505
506
|
switch (e.priceType) {
|
|
506
507
|
case "approx":
|
|
507
|
-
return `${
|
|
508
|
+
return `${Oe.t("_common:approx")} ${n}`;
|
|
508
509
|
case "openAcc":
|
|
509
510
|
return `${n}/${W(e.unitType)}`;
|
|
510
511
|
case "markup":
|
|
@@ -560,10 +561,10 @@ const be = /* @__PURE__ */ R(bt, [["render", Vt], ["__scopeId", "data-v-3e66bf1c
|
|
|
560
561
|
}, _e = {
|
|
561
562
|
article: {
|
|
562
563
|
name: {
|
|
563
|
-
maxLength:
|
|
564
|
+
maxLength: st(255)
|
|
564
565
|
}
|
|
565
566
|
}
|
|
566
|
-
},
|
|
567
|
+
}, Ot = {
|
|
567
568
|
name: "Article",
|
|
568
569
|
i18nOptions: {
|
|
569
570
|
namespaces: "Article",
|
|
@@ -651,9 +652,9 @@ const be = /* @__PURE__ */ R(bt, [["render", Vt], ["__scopeId", "data-v-3e66bf1c
|
|
|
651
652
|
price: s,
|
|
652
653
|
vat: i,
|
|
653
654
|
discount: f,
|
|
654
|
-
discountType:
|
|
655
|
+
discountType: g
|
|
655
656
|
} = this.article;
|
|
656
|
-
if (t !== "fixed" && e.push({ title: this.$t(`priceTypeShort.${t}`) }),
|
|
657
|
+
if (t !== "fixed" && e.push({ title: this.$t(`priceTypeShort.${t}`) }), Le(this.article)) {
|
|
657
658
|
const k = Ee(this.article);
|
|
658
659
|
e.push({
|
|
659
660
|
title: this.$t(`_common:deduction.${k}_percentage`),
|
|
@@ -680,7 +681,7 @@ const be = /* @__PURE__ */ R(bt, [["render", Vt], ["__scopeId", "data-v-3e66bf1c
|
|
|
680
681
|
})
|
|
681
682
|
}
|
|
682
683
|
}), f && e.push({
|
|
683
|
-
title: "-" + (
|
|
684
|
+
title: "-" + (g === "fixed" ? H(f, {
|
|
684
685
|
withVat: this.isIncVat ? i : !1,
|
|
685
686
|
currency: this.article.currency
|
|
686
687
|
}) : `${f / 100} %`),
|
|
@@ -703,32 +704,32 @@ const be = /* @__PURE__ */ R(bt, [["render", Vt], ["__scopeId", "data-v-3e66bf1c
|
|
|
703
704
|
return e.$error && e.article.name.$error && ((t = e.article.name.maxLength) != null && t.$invalid) ? this.$t("validations.name.maxLength") : null;
|
|
704
705
|
}
|
|
705
706
|
}
|
|
706
|
-
},
|
|
707
|
-
function
|
|
708
|
-
const f =
|
|
707
|
+
}, Lt = { class: "top-row flex w-full" }, Et = ["innerHTML"];
|
|
708
|
+
function Ut(e, t, n, o, s, i) {
|
|
709
|
+
const f = h("CIcon"), g = h("ArticleAutocomplete"), k = h("CPriceInput"), c = h("ErrorCallout"), b = U("tooltip");
|
|
709
710
|
return a(), d("div", {
|
|
710
|
-
class:
|
|
711
|
+
class: D([{
|
|
711
712
|
"has-details": i.details.length,
|
|
712
713
|
compact: n.width <= s.widthCompact,
|
|
713
714
|
"show-controls": !n.hideControls
|
|
714
715
|
}, "article-wrapper"]),
|
|
715
|
-
onKeydown: t[10] || (t[10] =
|
|
716
|
+
onKeydown: t[10] || (t[10] = F((y) => e.$emit("esc"), ["esc"]))
|
|
716
717
|
}, [
|
|
717
|
-
l("div",
|
|
718
|
-
|
|
718
|
+
l("div", Lt, [
|
|
719
|
+
u(g, B({
|
|
719
720
|
ref: "name",
|
|
720
721
|
"model-value": i.article.name,
|
|
721
722
|
placeholder: e.$t("namePlaceholder"),
|
|
722
723
|
size: "large",
|
|
723
724
|
class: "article-name-wrapper article-input-wrapper form-control form-control-left"
|
|
724
725
|
}, e.$attrs, {
|
|
725
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
726
|
-
onFocus: t[2] || (t[2] = (
|
|
727
|
-
onSelect: t[3] || (t[3] = (
|
|
726
|
+
"onUpdate:modelValue": t[1] || (t[1] = (y) => i.updateArticle(y, "name")),
|
|
727
|
+
onFocus: t[2] || (t[2] = (y) => e.$emit("focus")),
|
|
728
|
+
onSelect: t[3] || (t[3] = (y) => {
|
|
728
729
|
e.$emit(
|
|
729
730
|
"input",
|
|
730
731
|
s.addSavedArticle({
|
|
731
|
-
stored:
|
|
732
|
+
stored: y,
|
|
732
733
|
current: i.article,
|
|
733
734
|
hidePrice: n.hidePriceOnNew,
|
|
734
735
|
activeHouseWorkType: n.activeHouseWorkType
|
|
@@ -736,18 +737,18 @@ function Lt(e, t, n, o, s, i) {
|
|
|
736
737
|
), e.$emit("select");
|
|
737
738
|
})
|
|
738
739
|
}), {
|
|
739
|
-
suffix:
|
|
740
|
-
n.hideControls ?
|
|
740
|
+
suffix: v(() => [
|
|
741
|
+
n.hideControls ? w("", !0) : S((a(), d("div", {
|
|
741
742
|
key: 0,
|
|
742
743
|
class: "article-button fade-in",
|
|
743
|
-
onClick: t[0] || (t[0] = (
|
|
744
|
+
onClick: t[0] || (t[0] = (y) => e.$emit("open-modal"))
|
|
744
745
|
}, [
|
|
745
|
-
|
|
746
|
+
u(f, {
|
|
746
747
|
type: "cog",
|
|
747
748
|
size: "18"
|
|
748
749
|
})
|
|
749
750
|
])), [
|
|
750
|
-
[
|
|
751
|
+
[b, {
|
|
751
752
|
content: e.$t("openModalTooltip"),
|
|
752
753
|
delay: { show: 300, hide: 0 }
|
|
753
754
|
}]
|
|
@@ -755,7 +756,7 @@ function Lt(e, t, n, o, s, i) {
|
|
|
755
756
|
]),
|
|
756
757
|
_: 1
|
|
757
758
|
}, 16, ["model-value", "placeholder"]),
|
|
758
|
-
n.hidePriceInput ?
|
|
759
|
+
n.hidePriceInput ? w("", !0) : (a(), A(k, B({
|
|
759
760
|
key: n.rootPriceType + i.article.priceType + i.article.unitType,
|
|
760
761
|
"model-value": i.article.totalAmount,
|
|
761
762
|
currency: i.article.currency,
|
|
@@ -767,23 +768,23 @@ function Lt(e, t, n, o, s, i) {
|
|
|
767
768
|
class: "form-control form-control-right",
|
|
768
769
|
style: { flex: "1 1", "min-width": "200px" }
|
|
769
770
|
}, e.$attrs, {
|
|
770
|
-
"onUpdate:modelValue": t[4] || (t[4] = (
|
|
771
|
-
"onUpdate:currency": t[5] || (t[5] = (
|
|
771
|
+
"onUpdate:modelValue": t[4] || (t[4] = (y) => i.updateArticle(y, "price")),
|
|
772
|
+
"onUpdate:currency": t[5] || (t[5] = (y) => e.$emit("update:currency", y)),
|
|
772
773
|
onFocus: t[6] || (t[6] = () => {
|
|
773
774
|
i.onTotalPriceInputFocus(), e.$emit("focus");
|
|
774
775
|
}),
|
|
775
|
-
onKeydown: t[7] || (t[7] =
|
|
776
|
+
onKeydown: t[7] || (t[7] = F((y) => e.$emit("add"), ["enter"]))
|
|
776
777
|
}), null, 16, ["model-value", "currency", "is-inc-vat", "vat", "placeholder", "price-type", "unit-label"])),
|
|
777
|
-
n.hideControls ?
|
|
778
|
-
|
|
778
|
+
n.hideControls ? w("", !0) : (a(), d(C, { key: 1 }, [
|
|
779
|
+
u(f, {
|
|
779
780
|
class: "a-control-button close-button fade-in",
|
|
780
781
|
circle: "",
|
|
781
782
|
type: "x",
|
|
782
783
|
size: "18",
|
|
783
|
-
onClick: t[8] || (t[8] = (
|
|
784
|
+
onClick: t[8] || (t[8] = (y) => n.enableRemove ? e.$emit("remove") : null)
|
|
784
785
|
}),
|
|
785
|
-
|
|
786
|
-
class:
|
|
786
|
+
u(f, {
|
|
787
|
+
class: D([{ "c-hidden": !n.enableRemove }, "a-control-button fade-in move-button article-draggable-handle"]),
|
|
787
788
|
circle: "",
|
|
788
789
|
type: "handle",
|
|
789
790
|
size: "18"
|
|
@@ -794,29 +795,29 @@ function Lt(e, t, n, o, s, i) {
|
|
|
794
795
|
key: 0,
|
|
795
796
|
class: "article-details-wrapper",
|
|
796
797
|
style: { cursor: "pointer" },
|
|
797
|
-
onClick: t[9] || (t[9] = (
|
|
798
|
+
onClick: t[9] || (t[9] = (y) => e.$emit("open-modal"))
|
|
798
799
|
}, [
|
|
799
|
-
(a(!0), d(C, null,
|
|
800
|
+
(a(!0), d(C, null, V(i.details, ({ title: y, icon: $, subTitle: m = "", detailClass: T = "", tooltip: r }, P) => S((a(), d("div", {
|
|
800
801
|
key: P,
|
|
801
|
-
class:
|
|
802
|
+
class: D([[T], "article-details-item"])
|
|
802
803
|
}, [
|
|
803
|
-
|
|
804
|
+
_(p(y) + " ", 1),
|
|
804
805
|
$ ? (a(), d("div", {
|
|
805
806
|
key: 0,
|
|
806
807
|
innerHTML: $
|
|
807
|
-
}, null, 8,
|
|
808
|
-
|
|
808
|
+
}, null, 8, Et)) : w("", !0),
|
|
809
|
+
_(" " + p(m), 1)
|
|
809
810
|
], 2)), [
|
|
810
|
-
[
|
|
811
|
+
[b, r]
|
|
811
812
|
])), 128))
|
|
812
|
-
])) :
|
|
813
|
+
])) : w("", !0),
|
|
813
814
|
o.v$.$invalid && o.v$.$dirty ? (a(), A(c, {
|
|
814
815
|
key: 1,
|
|
815
816
|
message: i.errorMessage(o.v$)
|
|
816
|
-
}, null, 8, ["message"])) :
|
|
817
|
+
}, null, 8, ["message"])) : w("", !0)
|
|
817
818
|
], 34);
|
|
818
819
|
}
|
|
819
|
-
const
|
|
820
|
+
const Bt = /* @__PURE__ */ R(Ot, [["render", Ut], ["__scopeId", "data-v-495457b4"]]), Wt = {
|
|
820
821
|
emits: ["go", "close"],
|
|
821
822
|
props: {
|
|
822
823
|
canForward: {
|
|
@@ -879,14 +880,14 @@ const Ot = /* @__PURE__ */ R(Dt, [["render", Lt], ["__scopeId", "data-v-495457b4
|
|
|
879
880
|
document.removeEventListener("keyup", this.onKeyUp);
|
|
880
881
|
}
|
|
881
882
|
}
|
|
882
|
-
},
|
|
883
|
-
function
|
|
883
|
+
}, zt = { class: "l-root" };
|
|
884
|
+
function Ft(e, t, n, o, s, i) {
|
|
884
885
|
const f = U("tooltip");
|
|
885
|
-
return a(), d("div",
|
|
886
|
-
|
|
887
|
-
class:
|
|
886
|
+
return a(), d("div", zt, [
|
|
887
|
+
S((a(), d("div", {
|
|
888
|
+
class: D([{ disabled: !n.canBackward }, "l-button"]),
|
|
888
889
|
style: { left: "calc(-4 * var(--rem))" },
|
|
889
|
-
onClick: t[0] || (t[0] = (
|
|
890
|
+
onClick: t[0] || (t[0] = (g) => e.$emit("go", -1))
|
|
890
891
|
}, t[2] || (t[2] = [
|
|
891
892
|
l("svg", {
|
|
892
893
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -904,10 +905,10 @@ function Bt(e, t, n, o, s, i) {
|
|
|
904
905
|
]), 2)), [
|
|
905
906
|
[f, i.getNavTooltip(-1)]
|
|
906
907
|
]),
|
|
907
|
-
|
|
908
|
-
class:
|
|
908
|
+
S((a(), d("div", {
|
|
909
|
+
class: D([{ disabled: !n.canForward }, "l-button"]),
|
|
909
910
|
style: { right: "calc(-4 * var(--rem))" },
|
|
910
|
-
onClick: t[1] || (t[1] = (
|
|
911
|
+
onClick: t[1] || (t[1] = (g) => e.$emit("go", 1))
|
|
911
912
|
}, t[3] || (t[3] = [
|
|
912
913
|
l("svg", {
|
|
913
914
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -927,7 +928,7 @@ function Bt(e, t, n, o, s, i) {
|
|
|
927
928
|
])
|
|
928
929
|
]);
|
|
929
930
|
}
|
|
930
|
-
const
|
|
931
|
+
const jt = /* @__PURE__ */ R(Wt, [["render", Ft], ["__scopeId", "data-v-f685b502"]]), qt = {
|
|
931
932
|
name: "ArticleUnitEditModal",
|
|
932
933
|
i18nOptions: {
|
|
933
934
|
namespaces: "ArticleUnitEditModal",
|
|
@@ -1000,10 +1001,10 @@ const Wt = /* @__PURE__ */ R(Et, [["render", Bt], ["__scopeId", "data-v-f685b502
|
|
|
1000
1001
|
},
|
|
1001
1002
|
methods: {
|
|
1002
1003
|
...z({
|
|
1003
|
-
loadUnits:
|
|
1004
|
-
createUnit:
|
|
1005
|
-
updateUnit:
|
|
1006
|
-
deleteUnit:
|
|
1004
|
+
loadUnits: L.LOAD_UNIT_TYPES,
|
|
1005
|
+
createUnit: L.CREATE_UNIT_TYPE,
|
|
1006
|
+
updateUnit: L.UPDATE_UNIT_TYPE,
|
|
1007
|
+
deleteUnit: L.DELETE_UNIT_TYPE
|
|
1007
1008
|
}),
|
|
1008
1009
|
onEdit(e) {
|
|
1009
1010
|
this.selectedValue = { ...e }, this.$refs.unitInput && this.$refs.unitInput.focus();
|
|
@@ -1035,27 +1036,27 @@ const Wt = /* @__PURE__ */ R(Et, [["render", Bt], ["__scopeId", "data-v-f685b502
|
|
|
1035
1036
|
), this.reset(), await this.loadUnits());
|
|
1036
1037
|
}
|
|
1037
1038
|
}
|
|
1038
|
-
},
|
|
1039
|
+
}, Nt = {
|
|
1039
1040
|
class: "unit-modal-root font-inter",
|
|
1040
1041
|
style: { position: "relative" }
|
|
1041
|
-
},
|
|
1042
|
+
}, Ht = { style: { padding: "calc(1.5 * var(--rem))" } }, Gt = { style: { "font-weight": "600", "font-size": "18px", "margin-bottom": "calc(1.5 * var(--rem))" } }, Kt = { class: "control" }, Yt = { style: { "border-top": "1px solid hsl(0, 0%, 88%)", overflow: "auto", "max-height": "360px" } }, Zt = {
|
|
1042
1043
|
class: "text-gray-400",
|
|
1043
1044
|
style: { "font-size": "14px", padding: "calc(1 * var(--rem)) calc(1.5 * var(--rem)) 0", "font-weight": "500" }
|
|
1044
|
-
},
|
|
1045
|
+
}, Jt = { class: "unit-modal-list" }, Qt = {
|
|
1045
1046
|
key: 0,
|
|
1046
1047
|
class: "unit-modal-list-empty"
|
|
1047
|
-
},
|
|
1048
|
-
function
|
|
1049
|
-
const f =
|
|
1048
|
+
}, Xt = ["onMouseoverPassive", "onClick"], ei = { class: "drag-handle" }, ti = { style: { "padding-left": "0.5em" } }, ii = { class: "unittype-buttons" };
|
|
1049
|
+
function ni(e, t, n, o, s, i) {
|
|
1050
|
+
const f = h("CIcon"), g = h("CButton"), k = h("CInput"), c = h("CField"), b = h("DragItem"), y = h("DragList"), $ = U("tooltip");
|
|
1050
1051
|
return a(), d("div", {
|
|
1051
1052
|
class: "modal-overlay font-inter",
|
|
1052
1053
|
onClickPassive: t[3] || (t[3] = G((...m) => i.close && i.close(...m), ["self"]))
|
|
1053
1054
|
}, [
|
|
1054
|
-
l("div",
|
|
1055
|
-
l("div",
|
|
1056
|
-
l("div",
|
|
1057
|
-
l("span", null,
|
|
1058
|
-
|
|
1055
|
+
l("div", Nt, [
|
|
1056
|
+
l("div", Ht, [
|
|
1057
|
+
l("div", Gt, [
|
|
1058
|
+
l("span", null, p(e.$t("_common:add", { thing: e.$t("_common:unitType.unitType_other") })), 1),
|
|
1059
|
+
S(u(f, {
|
|
1059
1060
|
type: "info",
|
|
1060
1061
|
size: "15",
|
|
1061
1062
|
class: "text-gray-400",
|
|
@@ -1064,12 +1065,12 @@ function ei(e, t, n, o, s, i) {
|
|
|
1064
1065
|
[$, { content: e.$t("tooltip"), html: !0 }]
|
|
1065
1066
|
])
|
|
1066
1067
|
]),
|
|
1067
|
-
|
|
1068
|
+
u(c, {
|
|
1068
1069
|
grouped: "",
|
|
1069
1070
|
style: { margin: "0" }
|
|
1070
1071
|
}, {
|
|
1071
|
-
default:
|
|
1072
|
-
|
|
1072
|
+
default: v(() => [
|
|
1073
|
+
u(k, {
|
|
1073
1074
|
ref: "unitInput",
|
|
1074
1075
|
modelValue: s.selectedValue.value,
|
|
1075
1076
|
"onUpdate:modelValue": t[0] || (t[0] = (m) => s.selectedValue.value = m),
|
|
@@ -1081,8 +1082,8 @@ function ei(e, t, n, o, s, i) {
|
|
|
1081
1082
|
}, ge({ _: 2 }, [
|
|
1082
1083
|
s.selectedValue.id ? {
|
|
1083
1084
|
name: "suffix",
|
|
1084
|
-
fn:
|
|
1085
|
-
|
|
1085
|
+
fn: v(() => [
|
|
1086
|
+
u(g, {
|
|
1086
1087
|
icon: "x",
|
|
1087
1088
|
type: "none",
|
|
1088
1089
|
pattern: "tertiary",
|
|
@@ -1094,15 +1095,15 @@ function ei(e, t, n, o, s, i) {
|
|
|
1094
1095
|
key: "0"
|
|
1095
1096
|
} : void 0
|
|
1096
1097
|
]), 1032, ["modelValue", "placeholder"]),
|
|
1097
|
-
l("div",
|
|
1098
|
-
|
|
1098
|
+
l("div", Kt, [
|
|
1099
|
+
u(g, {
|
|
1099
1100
|
loading: e.isPosting,
|
|
1100
1101
|
disabled: !s.selectedValue.value,
|
|
1101
1102
|
type: "secondary",
|
|
1102
1103
|
onClick: i.submit
|
|
1103
1104
|
}, {
|
|
1104
|
-
default:
|
|
1105
|
-
|
|
1105
|
+
default: v(() => [
|
|
1106
|
+
_(p(s.selectedValue.id ? e.$t("_common:save") : e.$t("_common:add")), 1)
|
|
1106
1107
|
]),
|
|
1107
1108
|
_: 1
|
|
1108
1109
|
}, 8, ["loading", "disabled", "onClick"])
|
|
@@ -1111,41 +1112,41 @@ function ei(e, t, n, o, s, i) {
|
|
|
1111
1112
|
_: 1
|
|
1112
1113
|
})
|
|
1113
1114
|
]),
|
|
1114
|
-
l("div",
|
|
1115
|
-
l("div",
|
|
1116
|
-
l("div",
|
|
1117
|
-
i.unitItems.length ?
|
|
1118
|
-
|
|
1115
|
+
l("div", Yt, [
|
|
1116
|
+
l("div", Zt, p(e.$t("_common:unit_other").capitalize()), 1),
|
|
1117
|
+
l("div", Jt, [
|
|
1118
|
+
i.unitItems.length ? w("", !0) : (a(), d("div", Qt, p(e.$t("_common:add", { thing: e.$t("_common:unit_other") })), 1)),
|
|
1119
|
+
u(y, {
|
|
1119
1120
|
"drop-placeholder": { className: "drag-drop-placeholder" },
|
|
1120
1121
|
"drag-class": "is-dragged",
|
|
1121
1122
|
"lock-axis": "y",
|
|
1122
1123
|
"drag-handle-selector": ".drag-handle",
|
|
1123
1124
|
onDrop: i.onDrop
|
|
1124
1125
|
}, {
|
|
1125
|
-
default:
|
|
1126
|
-
(a(!0), d(C, null,
|
|
1126
|
+
default: v(() => [
|
|
1127
|
+
(a(!0), d(C, null, V(i.unitItems, (m, T) => (a(), A(b, {
|
|
1127
1128
|
key: m.id
|
|
1128
1129
|
}, {
|
|
1129
|
-
default:
|
|
1130
|
+
default: v(() => [
|
|
1130
1131
|
l("div", {
|
|
1131
|
-
class:
|
|
1132
|
+
class: D([{ "is-editing": s.selectedValue.id === m.id }, "unit-modal-list-item"]),
|
|
1132
1133
|
onMouseoverPassive: (r) => s.hoverIndex = T,
|
|
1133
1134
|
onMouseleavePassive: t[2] || (t[2] = (r) => s.hoverIndex = null),
|
|
1134
1135
|
onClick: (r) => i.onEdit(m)
|
|
1135
1136
|
}, [
|
|
1136
|
-
l("div",
|
|
1137
|
-
|
|
1137
|
+
l("div", ei, [
|
|
1138
|
+
u(f, {
|
|
1138
1139
|
type: "handle",
|
|
1139
1140
|
size: "16",
|
|
1140
1141
|
class: "text-gray-300"
|
|
1141
1142
|
})
|
|
1142
1143
|
]),
|
|
1143
|
-
l("div",
|
|
1144
|
-
|
|
1144
|
+
l("div", ti, p(m.label), 1),
|
|
1145
|
+
S(l("span", { class: "delete-confirm" }, p(e.$t("_common:remove")) + "? ", 513), [
|
|
1145
1146
|
[We, s.removeConfirmIndex === T]
|
|
1146
1147
|
]),
|
|
1147
|
-
l("div",
|
|
1148
|
-
s.hoverIndex === T || s.removeConfirmIndex === T ? (a(), A(
|
|
1148
|
+
l("div", ii, [
|
|
1149
|
+
s.hoverIndex === T || s.removeConfirmIndex === T ? (a(), A(g, {
|
|
1149
1150
|
key: 0,
|
|
1150
1151
|
type: s.removeConfirmIndex === T ? "danger" : "none",
|
|
1151
1152
|
pattern: s.removeConfirmIndex === T ? "primary" : "tertiary",
|
|
@@ -1154,8 +1155,8 @@ function ei(e, t, n, o, s, i) {
|
|
|
1154
1155
|
size: "small",
|
|
1155
1156
|
onClick: G((r) => i.remove(m.id, T), ["stop", "prevent"]),
|
|
1156
1157
|
onBlur: t[1] || (t[1] = (r) => s.removeConfirmIndex = null)
|
|
1157
|
-
}, null, 8, ["type", "pattern", "onClick"])) :
|
|
1158
|
-
|
|
1158
|
+
}, null, 8, ["type", "pattern", "onClick"])) : w("", !0),
|
|
1159
|
+
u(g, {
|
|
1159
1160
|
icon: "edit",
|
|
1160
1161
|
size: "small",
|
|
1161
1162
|
type: "none",
|
|
@@ -1163,7 +1164,7 @@ function ei(e, t, n, o, s, i) {
|
|
|
1163
1164
|
circle: ""
|
|
1164
1165
|
})
|
|
1165
1166
|
])
|
|
1166
|
-
], 42,
|
|
1167
|
+
], 42, Xt)
|
|
1167
1168
|
]),
|
|
1168
1169
|
_: 2
|
|
1169
1170
|
}, 1024))), 128))
|
|
@@ -1175,7 +1176,7 @@ function ei(e, t, n, o, s, i) {
|
|
|
1175
1176
|
])
|
|
1176
1177
|
], 32);
|
|
1177
1178
|
}
|
|
1178
|
-
const
|
|
1179
|
+
const si = /* @__PURE__ */ R(qt, [["render", ni], ["__scopeId", "data-v-439571ca"]]), ai = {
|
|
1179
1180
|
name: "ArticleUnitSelect",
|
|
1180
1181
|
components: {
|
|
1181
1182
|
CDropdown: Z,
|
|
@@ -1203,7 +1204,7 @@ const ti = /* @__PURE__ */ R(zt, [["render", ei], ["__scopeId", "data-v-439571ca
|
|
|
1203
1204
|
unitById: "unitTypes/byId"
|
|
1204
1205
|
}),
|
|
1205
1206
|
unitItems() {
|
|
1206
|
-
return this.isPublicForm ?
|
|
1207
|
+
return this.isPublicForm ? ot : (this.unitIds || []).map((e) => this.unitById(e)).map(({ value: e }) => e);
|
|
1207
1208
|
}
|
|
1208
1209
|
},
|
|
1209
1210
|
created() {
|
|
@@ -1212,11 +1213,11 @@ const ti = /* @__PURE__ */ R(zt, [["render", ei], ["__scopeId", "data-v-439571ca
|
|
|
1212
1213
|
methods: {
|
|
1213
1214
|
articleUnitLabel: W,
|
|
1214
1215
|
...z({
|
|
1215
|
-
loadUnits:
|
|
1216
|
+
loadUnits: L.LOAD_UNIT_TYPES
|
|
1216
1217
|
}),
|
|
1217
1218
|
openEditModal() {
|
|
1218
1219
|
this.$modal.show(
|
|
1219
|
-
|
|
1220
|
+
si,
|
|
1220
1221
|
{},
|
|
1221
1222
|
{},
|
|
1222
1223
|
{
|
|
@@ -1226,8 +1227,8 @@ const ti = /* @__PURE__ */ R(zt, [["render", ei], ["__scopeId", "data-v-439571ca
|
|
|
1226
1227
|
}
|
|
1227
1228
|
}
|
|
1228
1229
|
};
|
|
1229
|
-
function
|
|
1230
|
-
const f =
|
|
1230
|
+
function oi(e, t, n, o, s, i) {
|
|
1231
|
+
const f = h("CButton"), g = h("CDropdownItem"), k = h("CDropdown");
|
|
1231
1232
|
return a(), A(k, B({
|
|
1232
1233
|
position: "is-bottom-left",
|
|
1233
1234
|
maxHeight: "240px",
|
|
@@ -1237,21 +1238,21 @@ function ni(e, t, n, o, s, i) {
|
|
|
1237
1238
|
scrollable: "",
|
|
1238
1239
|
"onUpdate:modelValue": t[0] || (t[0] = (c) => e.$emit("update:modelValue", c))
|
|
1239
1240
|
}), {
|
|
1240
|
-
trigger:
|
|
1241
|
+
trigger: v(() => [
|
|
1241
1242
|
ne(e.$slots, "default", {}, () => [
|
|
1242
|
-
|
|
1243
|
+
u(f, {
|
|
1243
1244
|
type: "none",
|
|
1244
1245
|
pattern: "tertiary"
|
|
1245
1246
|
}, {
|
|
1246
|
-
default:
|
|
1247
|
-
|
|
1247
|
+
default: v(() => [
|
|
1248
|
+
_(p(i.articleUnitLabel(n.modelValue)), 1)
|
|
1248
1249
|
]),
|
|
1249
1250
|
_: 1
|
|
1250
1251
|
})
|
|
1251
1252
|
], !0)
|
|
1252
1253
|
]),
|
|
1253
|
-
footer:
|
|
1254
|
-
n.isPublicForm ?
|
|
1254
|
+
footer: v(() => [
|
|
1255
|
+
n.isPublicForm ? w("", !0) : (a(), A(f, {
|
|
1255
1256
|
key: 0,
|
|
1256
1257
|
type: "none",
|
|
1257
1258
|
pattern: "secondary",
|
|
@@ -1259,19 +1260,19 @@ function ni(e, t, n, o, s, i) {
|
|
|
1259
1260
|
class: "edit-button",
|
|
1260
1261
|
onClick: i.openEditModal
|
|
1261
1262
|
}, {
|
|
1262
|
-
default:
|
|
1263
|
-
|
|
1263
|
+
default: v(() => [
|
|
1264
|
+
_(p(e.$t("_common:edit", { thing: e.$t("_common:unit_other") })), 1)
|
|
1264
1265
|
]),
|
|
1265
1266
|
_: 1
|
|
1266
1267
|
}, 8, ["onClick"]))
|
|
1267
1268
|
]),
|
|
1268
|
-
default:
|
|
1269
|
-
(a(!0), d(C, null,
|
|
1270
|
-
key: `${c}-${
|
|
1269
|
+
default: v(() => [
|
|
1270
|
+
(a(!0), d(C, null, V(i.unitItems, (c, b) => (a(), A(g, {
|
|
1271
|
+
key: `${c}-${b}`,
|
|
1271
1272
|
value: c
|
|
1272
1273
|
}, {
|
|
1273
|
-
default:
|
|
1274
|
-
|
|
1274
|
+
default: v(() => [
|
|
1275
|
+
_(p(i.articleUnitLabel(c)), 1)
|
|
1275
1276
|
]),
|
|
1276
1277
|
_: 2
|
|
1277
1278
|
}, 1032, ["value"]))), 128))
|
|
@@ -1279,7 +1280,7 @@ function ni(e, t, n, o, s, i) {
|
|
|
1279
1280
|
_: 3
|
|
1280
1281
|
}, 16, ["model-value"]);
|
|
1281
1282
|
}
|
|
1282
|
-
const
|
|
1283
|
+
const ri = /* @__PURE__ */ R(ai, [["render", oi], ["__scopeId", "data-v-3d10b9fe"]]), li = {
|
|
1283
1284
|
name: "ArticleModal",
|
|
1284
1285
|
i18nOptions: {
|
|
1285
1286
|
namespaces: "ArticleModal",
|
|
@@ -1287,8 +1288,8 @@ const si = /* @__PURE__ */ R(ii, [["render", ni], ["__scopeId", "data-v-3d10b9fe
|
|
|
1287
1288
|
},
|
|
1288
1289
|
components: {
|
|
1289
1290
|
ArticleAutocomplete: be,
|
|
1290
|
-
ArticleUnitSelect:
|
|
1291
|
-
ListModalButtons:
|
|
1291
|
+
ArticleUnitSelect: ri,
|
|
1292
|
+
ListModalButtons: jt,
|
|
1292
1293
|
CPriceInput: J,
|
|
1293
1294
|
CField: ke
|
|
1294
1295
|
},
|
|
@@ -1356,7 +1357,7 @@ const si = /* @__PURE__ */ R(ii, [["render", ni], ["__scopeId", "data-v-3d10b9fe
|
|
|
1356
1357
|
validations: _e,
|
|
1357
1358
|
data() {
|
|
1358
1359
|
return {
|
|
1359
|
-
priceSuffix:
|
|
1360
|
+
priceSuffix: Mt,
|
|
1360
1361
|
updateData: K,
|
|
1361
1362
|
addSavedArticle: we,
|
|
1362
1363
|
vatOptions: [
|
|
@@ -1442,11 +1443,11 @@ const si = /* @__PURE__ */ R(ii, [["render", ni], ["__scopeId", "data-v-3d10b9fe
|
|
|
1442
1443
|
] : []
|
|
1443
1444
|
];
|
|
1444
1445
|
if (this.allowHidePrice) {
|
|
1445
|
-
const { showPrice:
|
|
1446
|
+
const { showPrice: g } = s || {};
|
|
1446
1447
|
f.push({
|
|
1447
1448
|
label: this.$t("hidePriceLabel"),
|
|
1448
|
-
value: !
|
|
1449
|
-
onClick: () => this.updateArticle(!
|
|
1449
|
+
value: !g,
|
|
1450
|
+
onClick: () => this.updateArticle(!g, "showPrice")
|
|
1450
1451
|
});
|
|
1451
1452
|
}
|
|
1452
1453
|
return f;
|
|
@@ -1515,7 +1516,7 @@ const si = /* @__PURE__ */ R(ii, [["render", ni], ["__scopeId", "data-v-3d10b9fe
|
|
|
1515
1516
|
},
|
|
1516
1517
|
methods: {
|
|
1517
1518
|
...z({
|
|
1518
|
-
createArticle:
|
|
1519
|
+
createArticle: L.DO_CREATE_ARTICLE
|
|
1519
1520
|
}),
|
|
1520
1521
|
onCustomVatBlur(e) {
|
|
1521
1522
|
x(e, "target.value") || "" || this.updateArticle(0, "vat");
|
|
@@ -1574,35 +1575,35 @@ const si = /* @__PURE__ */ R(ii, [["render", ni], ["__scopeId", "data-v-3d10b9fe
|
|
|
1574
1575
|
}), this.article = { ...this.article, ArticleId: e });
|
|
1575
1576
|
}
|
|
1576
1577
|
}
|
|
1577
|
-
},
|
|
1578
|
+
}, ci = { class: "modal-container" }, di = {
|
|
1578
1579
|
class: "flex w-full",
|
|
1579
1580
|
style: { "margin-bottom": "1.5em" }
|
|
1580
|
-
},
|
|
1581
|
+
}, ui = {
|
|
1581
1582
|
class: "flex",
|
|
1582
1583
|
style: { "margin-bottom": "1.5em" }
|
|
1583
|
-
},
|
|
1584
|
+
}, pi = {
|
|
1584
1585
|
key: 0,
|
|
1585
1586
|
class: "flex",
|
|
1586
1587
|
style: { "margin-bottom": "1.5em" }
|
|
1587
|
-
},
|
|
1588
|
+
}, mi = { style: { margin: "calc(1 * var(--rem)) calc(-0.5 * var(--rem))" } }, hi = ["value"], gi = ["value"], vi = {
|
|
1588
1589
|
key: 1,
|
|
1589
1590
|
class: "select-css tag-item no-chevron",
|
|
1590
1591
|
style: { display: "inline", "min-height": "initial", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" }
|
|
1591
|
-
},
|
|
1592
|
+
}, fi = ["value"], yi = {
|
|
1592
1593
|
key: 1,
|
|
1593
1594
|
class: "tag-group",
|
|
1594
1595
|
style: { display: "flex", "flex-direction": "row", "flex-wrap": "wrap", "margin-top": "1em" }
|
|
1595
|
-
},
|
|
1596
|
-
function
|
|
1597
|
-
const f =
|
|
1596
|
+
}, ki = ["onClick"], bi = { style: { display: "flex", "flex-direction": "row", "flex-wrap": "wrap", "margin-top": "1em" } }, wi = ["onClick"], Ii = { class: "flex space-x-4 overflow-hidden p-4 md:p-9" };
|
|
1597
|
+
function _i(e, t, n, o, s, i) {
|
|
1598
|
+
const f = h("ListModalButtons"), g = h("CIcon"), k = h("ArticleAutocomplete"), c = h("CField"), b = h("CInput"), y = h("CButton"), $ = h("ArticleUnitSelect"), m = h("CPriceInput"), T = U("tooltip");
|
|
1598
1599
|
return a(), d("div", {
|
|
1599
|
-
class:
|
|
1600
|
+
class: D([{
|
|
1600
1601
|
"full-screen": e.mq === "sm",
|
|
1601
1602
|
"modal-overlay": !0
|
|
1602
1603
|
}, "font-inter"]),
|
|
1603
1604
|
onClickPassive: t[15] || (t[15] = G((...r) => i.close && i.close(...r), ["self"]))
|
|
1604
1605
|
}, [
|
|
1605
|
-
l("div",
|
|
1606
|
+
l("div", ci, [
|
|
1606
1607
|
e.mq !== "sm" ? (a(), A(f, {
|
|
1607
1608
|
key: 0,
|
|
1608
1609
|
"can-forward": !!n.articleList[n.index + 1],
|
|
@@ -1614,15 +1615,15 @@ function bi(e, t, n, o, s, i) {
|
|
|
1614
1615
|
class: "modal-close",
|
|
1615
1616
|
onClick: t[1] || (t[1] = (...r) => i.close && i.close(...r))
|
|
1616
1617
|
}, [
|
|
1617
|
-
|
|
1618
|
+
u(g, { type: "x" })
|
|
1618
1619
|
])),
|
|
1619
|
-
|
|
1620
|
-
default:
|
|
1620
|
+
u(Fe, { name: "slide" }, {
|
|
1621
|
+
default: v(() => [
|
|
1621
1622
|
(a(), d("div", {
|
|
1622
1623
|
key: i.article._uniqueId,
|
|
1623
1624
|
class: "modal-main"
|
|
1624
1625
|
}, [
|
|
1625
|
-
|
|
1626
|
+
u(c, {
|
|
1626
1627
|
validator: o.v$.article.name,
|
|
1627
1628
|
messages: { maxLength: e.$t("validations.name.maxLength") },
|
|
1628
1629
|
label: e.$t("name").capitalize(),
|
|
@@ -1630,8 +1631,8 @@ function bi(e, t, n, o, s, i) {
|
|
|
1630
1631
|
style: { "margin-bottom": "1.5em" },
|
|
1631
1632
|
class: "label-selector"
|
|
1632
1633
|
}, {
|
|
1633
|
-
default:
|
|
1634
|
-
|
|
1634
|
+
default: v(() => [
|
|
1635
|
+
u(k, {
|
|
1635
1636
|
ref: "nameInput",
|
|
1636
1637
|
"model-value": i.article.name,
|
|
1637
1638
|
autosize: !0,
|
|
@@ -1653,15 +1654,15 @@ function bi(e, t, n, o, s, i) {
|
|
|
1653
1654
|
]),
|
|
1654
1655
|
_: 1
|
|
1655
1656
|
}, 8, ["validator", "messages", "label"]),
|
|
1656
|
-
l("div",
|
|
1657
|
-
|
|
1657
|
+
l("div", di, [
|
|
1658
|
+
u(c, {
|
|
1658
1659
|
label: e.$t("quantity").capitalize(),
|
|
1659
1660
|
"label-position": "inside",
|
|
1660
1661
|
class: "label-selector form-control form-control-left flex-grow",
|
|
1661
1662
|
style: { "margin-bottom": "0" }
|
|
1662
1663
|
}, {
|
|
1663
|
-
default:
|
|
1664
|
-
|
|
1664
|
+
default: v(() => [
|
|
1665
|
+
u(b, {
|
|
1665
1666
|
"model-value": i.article.quantity,
|
|
1666
1667
|
disabled: ["openAcc", "markup"].includes(i.article.priceType),
|
|
1667
1668
|
placeholder: "",
|
|
@@ -1673,18 +1674,18 @@ function bi(e, t, n, o, s, i) {
|
|
|
1673
1674
|
]),
|
|
1674
1675
|
_: 1
|
|
1675
1676
|
}, 8, ["label"]),
|
|
1676
|
-
|
|
1677
|
+
u($, {
|
|
1677
1678
|
"model-value": i.article.unitType,
|
|
1678
1679
|
"is-public-form": n.viewSettings.isPublicForm,
|
|
1679
1680
|
"onUpdate:modelValue": t[5] || (t[5] = (r) => i.updateArticle(r, "unitType"))
|
|
1680
1681
|
}, {
|
|
1681
|
-
default:
|
|
1682
|
-
|
|
1682
|
+
default: v(() => [
|
|
1683
|
+
u(y, {
|
|
1683
1684
|
class: "select-css form-control form-control-right",
|
|
1684
1685
|
style: { width: "8em", "box-shadow": "none" }
|
|
1685
1686
|
}, {
|
|
1686
|
-
default:
|
|
1687
|
-
|
|
1687
|
+
default: v(() => [
|
|
1688
|
+
_(p(s.articleUnitLabel(i.article.unitType, {
|
|
1688
1689
|
count: i.article.quantity
|
|
1689
1690
|
})), 1)
|
|
1690
1691
|
]),
|
|
@@ -1694,15 +1695,15 @@ function bi(e, t, n, o, s, i) {
|
|
|
1694
1695
|
_: 1
|
|
1695
1696
|
}, 8, ["model-value", "is-public-form"])
|
|
1696
1697
|
]),
|
|
1697
|
-
n.hidePriceInput ?
|
|
1698
|
-
l("div",
|
|
1699
|
-
|
|
1698
|
+
n.hidePriceInput ? w("", !0) : (a(), d(C, { key: 0 }, [
|
|
1699
|
+
l("div", ui, [
|
|
1700
|
+
u(c, {
|
|
1700
1701
|
label: e.$t("price.price").capitalize(),
|
|
1701
1702
|
"label-position": "inside",
|
|
1702
1703
|
class: "label-selector form-control form-control-left flex-1",
|
|
1703
1704
|
style: { "margin-bottom": "0" }
|
|
1704
1705
|
}, {
|
|
1705
|
-
default:
|
|
1706
|
+
default: v(() => [
|
|
1706
1707
|
(a(), A(m, {
|
|
1707
1708
|
ref: "priceInput",
|
|
1708
1709
|
key: s.priceSuffix(i.article),
|
|
@@ -1725,17 +1726,17 @@ function bi(e, t, n, o, s, i) {
|
|
|
1725
1726
|
class: "select-css form-control form-control-right",
|
|
1726
1727
|
style: { width: "8em" },
|
|
1727
1728
|
onClick: t[9] || (t[9] = (r) => s.setPricesIncVat = !s.setPricesIncVat)
|
|
1728
|
-
},
|
|
1729
|
+
}, p(n._document.$t(`vat.${s.setPricesIncVat ? "incVat" : "exVat"}`)), 1)) : w("", !0)
|
|
1729
1730
|
]),
|
|
1730
|
-
s.showDiscountInput ? (a(), d("div",
|
|
1731
|
-
|
|
1731
|
+
s.showDiscountInput ? (a(), d("div", pi, [
|
|
1732
|
+
u(c, {
|
|
1732
1733
|
label: e.$t("discount").capitalize(),
|
|
1733
1734
|
"label-position": "inside",
|
|
1734
1735
|
class: "label-selector form-control form-control-left flex-grow",
|
|
1735
1736
|
style: { "margin-bottom": "0" }
|
|
1736
1737
|
}, {
|
|
1737
|
-
default:
|
|
1738
|
-
|
|
1738
|
+
default: v(() => [
|
|
1739
|
+
u(m, {
|
|
1739
1740
|
ref: "discountInput",
|
|
1740
1741
|
"model-value": i.article.discount,
|
|
1741
1742
|
currency: i.article.currency,
|
|
@@ -1747,16 +1748,16 @@ function bi(e, t, n, o, s, i) {
|
|
|
1747
1748
|
}, ge({ _: 2 }, [
|
|
1748
1749
|
i.article.discountType === "fixed" ? {
|
|
1749
1750
|
name: "suffix",
|
|
1750
|
-
fn:
|
|
1751
|
-
|
|
1751
|
+
fn: v(() => [
|
|
1752
|
+
_(p(n._document.$t(
|
|
1752
1753
|
`vat.${s.setPricesIncVat ? "incVat" : "exVat"}`
|
|
1753
1754
|
)), 1)
|
|
1754
1755
|
]),
|
|
1755
1756
|
key: "0"
|
|
1756
1757
|
} : {
|
|
1757
1758
|
name: "suffix",
|
|
1758
|
-
fn:
|
|
1759
|
-
|
|
1759
|
+
fn: v(() => [
|
|
1760
|
+
_(p(s.getCurrencySymbol(i.article.currency)), 1)
|
|
1760
1761
|
]),
|
|
1761
1762
|
key: "1"
|
|
1762
1763
|
}
|
|
@@ -1771,10 +1772,10 @@ function bi(e, t, n, o, s, i) {
|
|
|
1771
1772
|
i.article.discountType === "percentage" ? "fixed" : "percentage",
|
|
1772
1773
|
"discountType"
|
|
1773
1774
|
))
|
|
1774
|
-
},
|
|
1775
|
-
])) :
|
|
1775
|
+
}, p(i.article.discountType === "percentage" ? "%" : s.getCurrencySymbol(i.article.currency)), 1)
|
|
1776
|
+
])) : w("", !0)
|
|
1776
1777
|
], 64)),
|
|
1777
|
-
l("div",
|
|
1778
|
+
l("div", mi, [
|
|
1778
1779
|
i.useVat ? (a(), d(C, { key: 0 }, [
|
|
1779
1780
|
e.feature("regionSE") && Number.isInteger(i.article.vat) ? (a(), d("select", {
|
|
1780
1781
|
key: 0,
|
|
@@ -1783,44 +1784,44 @@ function bi(e, t, n, o, s, i) {
|
|
|
1783
1784
|
style: { display: "inline", "min-height": "initial", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" },
|
|
1784
1785
|
onInput: t[12] || (t[12] = (r) => i.updateArticle(Number.parseFloat(r.target.value), "vat"))
|
|
1785
1786
|
}, [
|
|
1786
|
-
(a(!0), d(C, null,
|
|
1787
|
-
key:
|
|
1787
|
+
(a(!0), d(C, null, V(s.vatOptions, ({ translation: r, value: P }, I) => (a(), d("option", {
|
|
1788
|
+
key: I,
|
|
1788
1789
|
value: P
|
|
1789
|
-
},
|
|
1790
|
-
], 40,
|
|
1791
|
-
|
|
1790
|
+
}, p(e.$t(`vat.${i.vatType}`)) + " " + p(r), 9, gi))), 128))
|
|
1791
|
+
], 40, hi)) : (a(), d("span", vi, [
|
|
1792
|
+
_(p(n._document.$t("vat").capitalize()) + " ", 1),
|
|
1792
1793
|
l("input", {
|
|
1793
1794
|
value: i.article.vat || 0,
|
|
1794
1795
|
type: "number",
|
|
1795
1796
|
style: { width: "calc(2.5 * var(--rem))", display: "inline", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" },
|
|
1796
1797
|
onBlur: t[13] || (t[13] = (...r) => i.onCustomVatBlur && i.onCustomVatBlur(...r)),
|
|
1797
1798
|
onInput: t[14] || (t[14] = (...r) => i.onCustomVatInput && i.onCustomVatInput(...r))
|
|
1798
|
-
}, null, 40,
|
|
1799
|
-
t[16] || (t[16] =
|
|
1799
|
+
}, null, 40, fi),
|
|
1800
|
+
t[16] || (t[16] = _(" % "))
|
|
1800
1801
|
]))
|
|
1801
|
-
], 64)) :
|
|
1802
|
-
i.priceTypeOptions.length ? (a(), d("div",
|
|
1803
|
-
(a(!0), d(C, null,
|
|
1804
|
-
key: r +
|
|
1805
|
-
class:
|
|
1806
|
-
onClick:
|
|
1802
|
+
], 64)) : w("", !0),
|
|
1803
|
+
i.priceTypeOptions.length ? (a(), d("div", yi, [
|
|
1804
|
+
(a(!0), d(C, null, V(i.priceTypeOptions, ({ label: r, value: P, onClick: I, tooltip: M }, O) => S((a(), d("div", {
|
|
1805
|
+
key: r + O,
|
|
1806
|
+
class: D([{ active: P }, "tag-item"]),
|
|
1807
|
+
onClick: I
|
|
1807
1808
|
}, [
|
|
1808
|
-
|
|
1809
|
-
], 10,
|
|
1809
|
+
_(p(r), 1)
|
|
1810
|
+
], 10, ki)), [
|
|
1810
1811
|
[T, {
|
|
1811
1812
|
content: M,
|
|
1812
1813
|
delay: { show: 300, hide: 0 }
|
|
1813
1814
|
}]
|
|
1814
1815
|
])), 128))
|
|
1815
|
-
])) :
|
|
1816
|
-
l("div",
|
|
1817
|
-
(a(!0), d(C, null,
|
|
1816
|
+
])) : w("", !0),
|
|
1817
|
+
l("div", bi, [
|
|
1818
|
+
(a(!0), d(C, null, V(i.checkboxItems, ({ label: r, value: P, onClick: I, tooltip: M, style: O }, N) => S((a(), d("div", {
|
|
1818
1819
|
key: r + N,
|
|
1819
|
-
class:
|
|
1820
|
-
onClick:
|
|
1820
|
+
class: D([[{ active: P }, O], "tag-item"]),
|
|
1821
|
+
onClick: I
|
|
1821
1822
|
}, [
|
|
1822
|
-
|
|
1823
|
-
], 10,
|
|
1823
|
+
_(p(r), 1)
|
|
1824
|
+
], 10, wi)), [
|
|
1824
1825
|
[T, {
|
|
1825
1826
|
content: M,
|
|
1826
1827
|
delay: { show: 300, hide: 0 }
|
|
@@ -1832,16 +1833,16 @@ function bi(e, t, n, o, s, i) {
|
|
|
1832
1833
|
]),
|
|
1833
1834
|
_: 1
|
|
1834
1835
|
}),
|
|
1835
|
-
l("div",
|
|
1836
|
-
|
|
1836
|
+
l("div", Ii, [
|
|
1837
|
+
S((a(), A(y, {
|
|
1837
1838
|
type: "primary",
|
|
1838
1839
|
tabindex: "0",
|
|
1839
1840
|
size: "large",
|
|
1840
1841
|
style: { padding: "1.75em", height: "4em", "font-size": "16px", "background-color": "hsl(231, 4%, 20%)", "border-color": "hsl(231, 4%, 20%)" },
|
|
1841
1842
|
onClick: i.addNewArticle
|
|
1842
1843
|
}, {
|
|
1843
|
-
default:
|
|
1844
|
-
|
|
1844
|
+
default: v(() => [
|
|
1845
|
+
u(g, {
|
|
1845
1846
|
type: "zap",
|
|
1846
1847
|
size: "21",
|
|
1847
1848
|
style: { margin: "-3px" }
|
|
@@ -1867,7 +1868,7 @@ function bi(e, t, n, o, s, i) {
|
|
|
1867
1868
|
`
|
|
1868
1869
|
}]
|
|
1869
1870
|
]),
|
|
1870
|
-
|
|
1871
|
+
u(y, {
|
|
1871
1872
|
size: "large",
|
|
1872
1873
|
class: "flex-grow",
|
|
1873
1874
|
type: "secondary",
|
|
@@ -1876,8 +1877,8 @@ function bi(e, t, n, o, s, i) {
|
|
|
1876
1877
|
tabindex: "0",
|
|
1877
1878
|
onClick: i.onSaveArticle
|
|
1878
1879
|
}, {
|
|
1879
|
-
default:
|
|
1880
|
-
|
|
1880
|
+
default: v(() => [
|
|
1881
|
+
_(p(e.$t("save")), 1)
|
|
1881
1882
|
]),
|
|
1882
1883
|
_: 1
|
|
1883
1884
|
}, 8, ["onClick"])
|
|
@@ -1885,7 +1886,7 @@ function bi(e, t, n, o, s, i) {
|
|
|
1885
1886
|
])
|
|
1886
1887
|
], 34);
|
|
1887
1888
|
}
|
|
1888
|
-
const
|
|
1889
|
+
const $i = /* @__PURE__ */ R(li, [["render", _i], ["__scopeId", "data-v-e5bbc8bd"]]), Ti = {
|
|
1889
1890
|
i18nOptions: {
|
|
1890
1891
|
name: "ArticleListEdit",
|
|
1891
1892
|
namespaces: "ArticleListEdit",
|
|
@@ -1905,9 +1906,9 @@ const wi = /* @__PURE__ */ R(ai, [["render", bi], ["__scopeId", "data-v-e5bbc8bd
|
|
|
1905
1906
|
}
|
|
1906
1907
|
},
|
|
1907
1908
|
components: {
|
|
1908
|
-
Article:
|
|
1909
|
-
ArticleModal:
|
|
1910
|
-
Sortable:
|
|
1909
|
+
Article: Bt,
|
|
1910
|
+
ArticleModal: $i,
|
|
1911
|
+
Sortable: tt
|
|
1911
1912
|
},
|
|
1912
1913
|
expose: ["focusLastArticle", "openLastArticle"],
|
|
1913
1914
|
mixins: [q([])],
|
|
@@ -1991,7 +1992,7 @@ const wi = /* @__PURE__ */ R(ai, [["render", bi], ["__scopeId", "data-v-e5bbc8bd
|
|
|
1991
1992
|
e || this.toggleDeductions(!1);
|
|
1992
1993
|
},
|
|
1993
1994
|
setPricesIncVat(e) {
|
|
1994
|
-
this.updateArticlesVatOption(), ["extension", "widget"].includes(
|
|
1995
|
+
this.updateArticlesVatOption(), ["extension", "widget"].includes(je.value) || this.showMessage({
|
|
1995
1996
|
type: "info",
|
|
1996
1997
|
message: this.$t("vatOption.message", {
|
|
1997
1998
|
vatOption: this.$t(`_common:vat.${e ? "incVat" : "exVat"}`, {
|
|
@@ -2003,7 +2004,7 @@ const wi = /* @__PURE__ */ R(ai, [["render", bi], ["__scopeId", "data-v-e5bbc8bd
|
|
|
2003
2004
|
},
|
|
2004
2005
|
methods: {
|
|
2005
2006
|
...z({
|
|
2006
|
-
showMessage:
|
|
2007
|
+
showMessage: L.SHOW_MESSAGE
|
|
2007
2008
|
}),
|
|
2008
2009
|
openModal(e, { focusEl: t = "" } = {}) {
|
|
2009
2010
|
this.selectedIndex = e, this.showModal = !0, t && this.$nextTick(() => {
|
|
@@ -2028,10 +2029,10 @@ const wi = /* @__PURE__ */ R(ai, [["render", bi], ["__scopeId", "data-v-e5bbc8bd
|
|
|
2028
2029
|
updateArticlesVatOption() {
|
|
2029
2030
|
this.articles.forEach((e, t) => {
|
|
2030
2031
|
if (e.priceType === "markup") return;
|
|
2031
|
-
let n =
|
|
2032
|
+
let n = j({ amount: e.price }).divide(
|
|
2032
2033
|
(100 + e.vat) * 0.01
|
|
2033
2034
|
);
|
|
2034
|
-
this.setPricesIncVat || (n =
|
|
2035
|
+
this.setPricesIncVat || (n = j({ amount: e.price }).multiply(
|
|
2035
2036
|
(100 + e.vat) * 0.01
|
|
2036
2037
|
)), this.updateArticleObject(
|
|
2037
2038
|
t,
|
|
@@ -2079,7 +2080,7 @@ const wi = /* @__PURE__ */ R(ai, [["render", bi], ["__scopeId", "data-v-e5bbc8bd
|
|
|
2079
2080
|
this.$emit("remove", e.oldIndex);
|
|
2080
2081
|
},
|
|
2081
2082
|
onUpdate(e) {
|
|
2082
|
-
const t =
|
|
2083
|
+
const t = it(
|
|
2083
2084
|
this.articles,
|
|
2084
2085
|
e.oldIndex,
|
|
2085
2086
|
e.newIndex
|
|
@@ -2087,20 +2088,20 @@ const wi = /* @__PURE__ */ R(ai, [["render", bi], ["__scopeId", "data-v-e5bbc8bd
|
|
|
2087
2088
|
this.$emit("move", t);
|
|
2088
2089
|
}
|
|
2089
2090
|
}
|
|
2090
|
-
},
|
|
2091
|
+
}, Ai = { ref: "container" }, Ci = {
|
|
2091
2092
|
key: 0,
|
|
2092
2093
|
class: "label-text"
|
|
2093
2094
|
};
|
|
2094
|
-
function
|
|
2095
|
-
const f =
|
|
2096
|
-
return a(), d("div",
|
|
2097
|
-
i.showVatToggle ? (a(), d("div",
|
|
2098
|
-
|
|
2095
|
+
function Pi(e, t, n, o, s, i) {
|
|
2096
|
+
const f = h("Article"), g = h("Sortable"), k = h("ArticleModal"), c = h("Portal");
|
|
2097
|
+
return a(), d("div", Ai, [
|
|
2098
|
+
i.showVatToggle ? (a(), d("div", Ci, [
|
|
2099
|
+
_(p(e.$t("vatOption.label")) + " ", 1),
|
|
2099
2100
|
l("span", {
|
|
2100
|
-
onClick: t[0] || (t[0] = (
|
|
2101
|
-
},
|
|
2102
|
-
])) :
|
|
2103
|
-
|
|
2101
|
+
onClick: t[0] || (t[0] = (b) => i.changeVat())
|
|
2102
|
+
}, p(n._document.$t(`vat.${i.setPricesIncVat ? "incVat" : "exVat"}`)), 1)
|
|
2103
|
+
])) : w("", !0),
|
|
2104
|
+
u(g, {
|
|
2104
2105
|
"item-key": "_uniqueId",
|
|
2105
2106
|
options: {
|
|
2106
2107
|
group: "articles",
|
|
@@ -2115,10 +2116,10 @@ function Ti(e, t, n, o, s, i) {
|
|
|
2115
2116
|
list: n.articles,
|
|
2116
2117
|
style: { "min-height": "calc(3 * var(--rem))" }
|
|
2117
2118
|
}, {
|
|
2118
|
-
item:
|
|
2119
|
-
|
|
2119
|
+
item: v(({ item: b, index: y }) => [
|
|
2120
|
+
u(f, {
|
|
2120
2121
|
ref: "articleItem",
|
|
2121
|
-
value:
|
|
2122
|
+
value: b,
|
|
2122
2123
|
width: o.articlesWidth,
|
|
2123
2124
|
"hide-price-input": e.hidePriceInput,
|
|
2124
2125
|
"hide-price-on-new": e.hidePriceOnNew,
|
|
@@ -2128,19 +2129,19 @@ function Ti(e, t, n, o, s, i) {
|
|
|
2128
2129
|
"active-house-work-type": n.activeHouseWorkType,
|
|
2129
2130
|
class: "article-item",
|
|
2130
2131
|
"onUpdate:currency": t[1] || (t[1] = ($) => e.$emit("update:currency", $)),
|
|
2131
|
-
onInput: ($) => i.updateArticleObject(
|
|
2132
|
+
onInput: ($) => i.updateArticleObject(y, $),
|
|
2132
2133
|
onFocus: t[2] || (t[2] = ($) => e.$emit("focus")),
|
|
2133
|
-
onRemove: ($) => i.onRemoveArticle(
|
|
2134
|
-
onOpenModal: ($) => i.openModal(
|
|
2135
|
-
onAdd: ($) =>
|
|
2136
|
-
onSelect: ($) =>
|
|
2137
|
-
onEsc: ($) => i.onEsc(
|
|
2134
|
+
onRemove: ($) => i.onRemoveArticle(y),
|
|
2135
|
+
onOpenModal: ($) => i.openModal(y, $),
|
|
2136
|
+
onAdd: ($) => y === i.articlesWithTotal.length - 1 ? e.$emit("add") : null,
|
|
2137
|
+
onSelect: ($) => y === i.articlesWithTotal.length - 1 ? e.$emit("add") : null,
|
|
2138
|
+
onEsc: ($) => i.onEsc(y, b)
|
|
2138
2139
|
}, null, 8, ["value", "width", "hide-price-input", "hide-price-on-new", "is-inc-vat", "hide-controls", "root-price-type", "active-house-work-type", "onInput", "onRemove", "onOpenModal", "onAdd", "onSelect", "onEsc"])
|
|
2139
2140
|
]),
|
|
2140
2141
|
_: 1
|
|
2141
2142
|
}, 8, ["options", "list"]),
|
|
2142
|
-
|
|
2143
|
-
default:
|
|
2143
|
+
u(c, { to: "modal" }, {
|
|
2144
|
+
default: v(() => [
|
|
2144
2145
|
s.showModal && i.articlesWithTotal[s.selectedIndex] ? (a(), A(k, {
|
|
2145
2146
|
key: 0,
|
|
2146
2147
|
ref: "articleModal",
|
|
@@ -2154,18 +2155,18 @@ function Ti(e, t, n, o, s, i) {
|
|
|
2154
2155
|
currency: i.currency,
|
|
2155
2156
|
"active-house-work-type": n.activeHouseWorkType,
|
|
2156
2157
|
"view-settings": e.viewSettings,
|
|
2157
|
-
"onUpdate:currency": t[3] || (t[3] = (
|
|
2158
|
-
onInput: t[4] || (t[4] = (
|
|
2159
|
-
onAdd: t[5] || (t[5] = (
|
|
2158
|
+
"onUpdate:currency": t[3] || (t[3] = (b) => e.$emit("update:currency", b)),
|
|
2159
|
+
onInput: t[4] || (t[4] = (b) => i.updateArticleObject(s.selectedIndex, b)),
|
|
2160
|
+
onAdd: t[5] || (t[5] = (b) => e.$emit("add", b)),
|
|
2160
2161
|
onOpenModal: i.openModal,
|
|
2161
|
-
onClose: t[6] || (t[6] = (
|
|
2162
|
-
}, null, 8, ["_document", "index", "article-list", "hide-price-input", "hide-price-on-new", "is-inc-vat", "root-price-type", "currency", "active-house-work-type", "view-settings", "onOpenModal"])) :
|
|
2162
|
+
onClose: t[6] || (t[6] = (b) => s.showModal = !1)
|
|
2163
|
+
}, null, 8, ["_document", "index", "article-list", "hide-price-input", "hide-price-on-new", "is-inc-vat", "root-price-type", "currency", "active-house-work-type", "view-settings", "onOpenModal"])) : w("", !0)
|
|
2163
2164
|
]),
|
|
2164
2165
|
_: 1
|
|
2165
2166
|
})
|
|
2166
2167
|
], 512);
|
|
2167
2168
|
}
|
|
2168
|
-
const
|
|
2169
|
+
const xi = /* @__PURE__ */ R(Ti, [["render", Pi], ["__scopeId", "data-v-8ab60481"]]), Di = {
|
|
2169
2170
|
name: "MaxTotalInput",
|
|
2170
2171
|
i18nOptions: {
|
|
2171
2172
|
namespaces: "MaxTotalInput",
|
|
@@ -2208,19 +2209,19 @@ const Ai = /* @__PURE__ */ R(Ii, [["render", Ti], ["__scopeId", "data-v-8ab60481
|
|
|
2208
2209
|
},
|
|
2209
2210
|
watch: {
|
|
2210
2211
|
isIncVat(e) {
|
|
2211
|
-
let t =
|
|
2212
|
+
let t = j({ amount: this.modelValue }).divide(
|
|
2212
2213
|
1.25
|
|
2213
2214
|
);
|
|
2214
|
-
e || (t =
|
|
2215
|
+
e || (t = j({ amount: this.modelValue }).multiply(
|
|
2215
2216
|
125 * 0.01
|
|
2216
2217
|
)), this.$emit("update:modelValue", t.getAmount());
|
|
2217
2218
|
}
|
|
2218
2219
|
}
|
|
2219
|
-
},
|
|
2220
|
-
function
|
|
2221
|
-
const f =
|
|
2222
|
-
return a(), d("div",
|
|
2223
|
-
|
|
2220
|
+
}, Vi = { class: "flex w-full justify-end" };
|
|
2221
|
+
function Si(e, t, n, o, s, i) {
|
|
2222
|
+
const f = h("CPriceInput");
|
|
2223
|
+
return a(), d("div", Vi, [
|
|
2224
|
+
u(f, {
|
|
2224
2225
|
"model-value": n.modelValue,
|
|
2225
2226
|
currency: n.currency,
|
|
2226
2227
|
"is-inc-vat": e.isIncVat,
|
|
@@ -2230,13 +2231,13 @@ function xi(e, t, n, o, s, i) {
|
|
|
2230
2231
|
class: "mt-4 max-w-[275px] text-sm",
|
|
2231
2232
|
"prefix-class": "text-gray-400",
|
|
2232
2233
|
"suffix-class": "text-gray-400",
|
|
2233
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
2234
|
+
"onUpdate:modelValue": t[0] || (t[0] = (g) => e.$emit("update:modelValue", g))
|
|
2234
2235
|
}, {
|
|
2235
|
-
prefix:
|
|
2236
|
-
|
|
2236
|
+
prefix: v(() => [
|
|
2237
|
+
_(p(e.$t("price.maxPrice").capitalize()), 1)
|
|
2237
2238
|
]),
|
|
2238
|
-
suffix:
|
|
2239
|
-
l("span", null,
|
|
2239
|
+
suffix: v(() => [
|
|
2240
|
+
l("span", null, p(s.getCurrencySymbol(n.currency)) + " " + p(e.$t(`vat.${e.isIncVat ? "incVat" : "exVat"}`, {
|
|
2240
2241
|
thing: e.$t(`vat.${n.vatType}`)
|
|
2241
2242
|
})), 1)
|
|
2242
2243
|
]),
|
|
@@ -2244,7 +2245,7 @@ function xi(e, t, n, o, s, i) {
|
|
|
2244
2245
|
}, 8, ["model-value", "currency", "is-inc-vat", "placeholder"])
|
|
2245
2246
|
]);
|
|
2246
2247
|
}
|
|
2247
|
-
const
|
|
2248
|
+
const Ri = /* @__PURE__ */ R(Di, [["render", Si]]), Mi = {
|
|
2248
2249
|
components: {
|
|
2249
2250
|
CDropdown: Z,
|
|
2250
2251
|
CDropdownItem: Y
|
|
@@ -2261,29 +2262,29 @@ const Vi = /* @__PURE__ */ R(Ci, [["render", xi]]), Si = {
|
|
|
2261
2262
|
priceTypeOptions: ["fixed", "approx", "openAcc", "openAccMaxPrice"]
|
|
2262
2263
|
};
|
|
2263
2264
|
}
|
|
2264
|
-
},
|
|
2265
|
-
function
|
|
2266
|
-
const f =
|
|
2267
|
-
return a(), d("div",
|
|
2268
|
-
|
|
2269
|
-
trigger:
|
|
2270
|
-
|
|
2271
|
-
default:
|
|
2272
|
-
|
|
2273
|
-
l("span", null,
|
|
2265
|
+
}, Oi = { class: "flex justify-end" };
|
|
2266
|
+
function Li(e, t, n, o, s, i) {
|
|
2267
|
+
const f = h("CButton"), g = h("CDropdownItem"), k = h("CDropdown");
|
|
2268
|
+
return a(), d("div", Oi, [
|
|
2269
|
+
u(k, { "model-value": n.modelValue }, {
|
|
2270
|
+
trigger: v(() => [
|
|
2271
|
+
u(f, { class: "price-type-button" }, {
|
|
2272
|
+
default: v(() => [
|
|
2273
|
+
_(p(e.$t("price.pricing").capitalize()) + ": ", 1),
|
|
2274
|
+
l("span", null, p(e.$t(`price.${n.modelValue}`)), 1)
|
|
2274
2275
|
]),
|
|
2275
2276
|
_: 1
|
|
2276
2277
|
})
|
|
2277
2278
|
]),
|
|
2278
|
-
default:
|
|
2279
|
-
(a(!0), d(C, null,
|
|
2279
|
+
default: v(() => [
|
|
2280
|
+
(a(!0), d(C, null, V(s.priceTypeOptions, (c) => (a(), A(g, {
|
|
2280
2281
|
key: c,
|
|
2281
2282
|
value: c,
|
|
2282
2283
|
class: "text-right",
|
|
2283
|
-
onClick: (
|
|
2284
|
+
onClick: (b) => e.$emit("update:modelValue", c)
|
|
2284
2285
|
}, {
|
|
2285
|
-
default:
|
|
2286
|
-
|
|
2286
|
+
default: v(() => [
|
|
2287
|
+
_(p(e.$t(`price.${c}`)), 1)
|
|
2287
2288
|
]),
|
|
2288
2289
|
_: 2
|
|
2289
2290
|
}, 1032, ["value", "onClick"]))), 128))
|
|
@@ -2292,12 +2293,35 @@ function Ri(e, t, n, o, s, i) {
|
|
|
2292
2293
|
}, 8, ["model-value"])
|
|
2293
2294
|
]);
|
|
2294
2295
|
}
|
|
2295
|
-
const
|
|
2296
|
+
const Ei = /* @__PURE__ */ R(Mi, [["render", Li], ["__scopeId", "data-v-26c5da6c"]]), Ui = {
|
|
2296
2297
|
name: "EditDeduction",
|
|
2298
|
+
i18nOptions: {
|
|
2299
|
+
namespaces: "EditDeduction",
|
|
2300
|
+
messages: {
|
|
2301
|
+
sv: {
|
|
2302
|
+
deductionDate: {
|
|
2303
|
+
title: "Regelverkets datum",
|
|
2304
|
+
description: "Kommande regeländringar påverkar skattereduktionen. Beräkningen utgår normalt från signeringsdatum, men om arbetet faktureras efter ett ändringsdatum kan du välja de nya reglerna.",
|
|
2305
|
+
label: "Regelverk",
|
|
2306
|
+
automatic: "Signeringsdatum"
|
|
2307
|
+
}
|
|
2308
|
+
},
|
|
2309
|
+
en: {
|
|
2310
|
+
deductionDate: {
|
|
2311
|
+
title: "Ruleset date",
|
|
2312
|
+
description: "Upcoming rule changes affect the tax deduction. The calculation is normally based on the acceptance date, but if the work is invoiced after a change date, you can choose the new rules.",
|
|
2313
|
+
label: "Ruleset date",
|
|
2314
|
+
automatic: "Acceptance date"
|
|
2315
|
+
}
|
|
2316
|
+
}
|
|
2317
|
+
}
|
|
2318
|
+
},
|
|
2297
2319
|
components: {
|
|
2298
|
-
CPriceInput: J
|
|
2320
|
+
CPriceInput: J,
|
|
2321
|
+
CIcon: Ne,
|
|
2322
|
+
FormInputRow: at
|
|
2299
2323
|
},
|
|
2300
|
-
mixins: [q(["houseWorkManualAmount"])],
|
|
2324
|
+
mixins: [q(["houseWorkManualAmount", "houseWorkDeductionDate"])],
|
|
2301
2325
|
props: {
|
|
2302
2326
|
disabled: {
|
|
2303
2327
|
type: Boolean,
|
|
@@ -2320,49 +2344,56 @@ const Mi = /* @__PURE__ */ R(Si, [["render", Ri], ["__scopeId", "data-v-26c5da6c
|
|
|
2320
2344
|
return {
|
|
2321
2345
|
amountUnit: "fixed",
|
|
2322
2346
|
internalValue: null,
|
|
2347
|
+
internalDeductionDate: null,
|
|
2323
2348
|
modalName: `deduction-modal-${this.$.uid}`
|
|
2324
2349
|
};
|
|
2325
2350
|
},
|
|
2351
|
+
computed: {
|
|
2352
|
+
futureDeductionDates() {
|
|
2353
|
+
return He().map((e) => ({
|
|
2354
|
+
value: e.date.toISOString(),
|
|
2355
|
+
label: e.label
|
|
2356
|
+
}));
|
|
2357
|
+
}
|
|
2358
|
+
},
|
|
2326
2359
|
watch: {
|
|
2327
2360
|
houseWorkType(e) {
|
|
2328
2361
|
e || (this.houseWorkManualAmount = null);
|
|
2329
2362
|
}
|
|
2330
2363
|
},
|
|
2331
2364
|
methods: {
|
|
2365
|
+
onManualInput() {
|
|
2366
|
+
this.internalDeductionDate && (this.internalDeductionDate = null);
|
|
2367
|
+
},
|
|
2368
|
+
setDate(e) {
|
|
2369
|
+
this.internalDeductionDate = e, this.internalValue = null;
|
|
2370
|
+
},
|
|
2332
2371
|
setDeduction(e) {
|
|
2333
|
-
this.internalValue =
|
|
2372
|
+
this.internalValue = j({ amount: this.total }).multiply(e).getAmount(), this.internalDeductionDate = null;
|
|
2334
2373
|
},
|
|
2335
2374
|
showModal() {
|
|
2336
|
-
this.internalValue = this.
|
|
2375
|
+
this.internalValue = this.houseWorkManualAmount || null, this.internalDeductionDate = this.houseWorkDeductionDate || null, this.$modal.show(this.modalName);
|
|
2337
2376
|
}
|
|
2338
2377
|
}
|
|
2339
|
-
},
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
"stroke-width": "2",
|
|
2346
|
-
fill: "none",
|
|
2347
|
-
"stroke-linecap": "round",
|
|
2348
|
-
"stroke-linejoin": "round",
|
|
2349
|
-
class: "css-i6dzq1"
|
|
2350
|
-
};
|
|
2351
|
-
function qi(e, t, n, o, s, i) {
|
|
2352
|
-
const f = v("CPriceInput"), h = v("CButton"), k = v("modal"), c = v("portal");
|
|
2378
|
+
}, Bi = { class: "deduction-modal flex w-full flex-col items-center justify-between rounded-lg" }, Wi = { class: "mb-5 text-center text-base font-extrabold" }, zi = { class: "mb-5 w-full" }, Fi = { class: "my-5 text-center text-base font-extrabold" }, ji = { class: "mb-5 w-full rounded-md bg-gray-100 p-2 text-center text-sm font-medium italic text-gray-500" }, qi = { class: "flex w-full flex-wrap justify-center gap-2" }, Ni = ["onClick"], Hi = {
|
|
2379
|
+
key: 0,
|
|
2380
|
+
class: "mt-5 w-full"
|
|
2381
|
+
}, Gi = { class: "mb-3 flex rounded-lg border border-blue-200 bg-blue-50 p-3 shadow-lg" }, Ki = { class: "pl-2" }, Yi = ["textContent"], Zi = { class: "mb-3 text-sm text-blue-600 text-opacity-80" }, Ji = { class: "pl-2" };
|
|
2382
|
+
function Qi(e, t, n, o, s, i) {
|
|
2383
|
+
const f = h("CPriceInput"), g = h("CIcon"), k = h("FormInputRow"), c = h("CButton"), b = h("modal");
|
|
2353
2384
|
return a(), d("div", null, [
|
|
2354
|
-
|
|
2385
|
+
u(b, B({
|
|
2355
2386
|
adaptive: !0,
|
|
2356
2387
|
height: "auto",
|
|
2357
2388
|
width: "90%",
|
|
2358
2389
|
maxWidth: 420,
|
|
2359
2390
|
classes: "primary"
|
|
2360
2391
|
}, { name: s.modalName }), {
|
|
2361
|
-
default:
|
|
2362
|
-
l("div",
|
|
2363
|
-
l("div",
|
|
2364
|
-
l("div",
|
|
2365
|
-
|
|
2392
|
+
default: v(() => [
|
|
2393
|
+
l("div", Bi, [
|
|
2394
|
+
l("div", Wi, p(e.$t("manualDeduction")), 1),
|
|
2395
|
+
l("div", zi, [
|
|
2396
|
+
u(f, {
|
|
2366
2397
|
modelValue: s.internalValue,
|
|
2367
2398
|
"onUpdate:modelValue": t[0] || (t[0] = (y) => s.internalValue = y),
|
|
2368
2399
|
modelModifiers: { number: !0 },
|
|
@@ -2370,18 +2401,19 @@ function qi(e, t, n, o, s, i) {
|
|
|
2370
2401
|
placeholder: e.$t("enterThing", { thing: e.$t("deduction.deduction") }),
|
|
2371
2402
|
min: "0",
|
|
2372
2403
|
size: "medium",
|
|
2373
|
-
"suffix-class": "text-gray-400"
|
|
2404
|
+
"suffix-class": "text-gray-400",
|
|
2405
|
+
onInput: i.onManualInput
|
|
2374
2406
|
}, {
|
|
2375
|
-
suffix:
|
|
2376
|
-
|
|
2407
|
+
suffix: v(() => [
|
|
2408
|
+
_(p(e.$t("currency.SEK")), 1)
|
|
2377
2409
|
]),
|
|
2378
2410
|
_: 1
|
|
2379
|
-
}, 8, ["modelValue", "placeholder"])
|
|
2411
|
+
}, 8, ["modelValue", "placeholder", "onInput"])
|
|
2380
2412
|
]),
|
|
2381
|
-
l("div",
|
|
2382
|
-
l("div",
|
|
2383
|
-
l("div",
|
|
2384
|
-
(a(), d(C, null,
|
|
2413
|
+
l("div", Fi, p(e.$t("standardDeduction")), 1),
|
|
2414
|
+
l("div", ji, p(e.$t("standardDeductionMessage")), 1),
|
|
2415
|
+
l("div", qi, [
|
|
2416
|
+
(a(), d(C, null, V([
|
|
2385
2417
|
{ v: 0.1455, l: "14.55%" },
|
|
2386
2418
|
{ v: 0.15, l: "15%" },
|
|
2387
2419
|
{ v: 0.175, l: "17.5%" },
|
|
@@ -2391,79 +2423,90 @@ function qi(e, t, n, o, s, i) {
|
|
|
2391
2423
|
{ v: 0.5, l: "50%" }
|
|
2392
2424
|
], (y) => l("div", {
|
|
2393
2425
|
key: y.l,
|
|
2394
|
-
class:
|
|
2395
|
-
active: Math.round(n.total * y.v
|
|
2426
|
+
class: D([{
|
|
2427
|
+
active: Math.round(n.total * y.v) === s.internalValue
|
|
2396
2428
|
}, "deduction-button"]),
|
|
2397
|
-
onClick: (
|
|
2398
|
-
},
|
|
2429
|
+
onClick: ($) => i.setDeduction(y.v)
|
|
2430
|
+
}, p(y.l), 11, Ni)), 64))
|
|
2399
2431
|
]),
|
|
2400
|
-
|
|
2432
|
+
i.futureDeductionDates.length ? (a(), d("div", Hi, [
|
|
2433
|
+
l("div", Gi, [
|
|
2434
|
+
l("div", null, [
|
|
2435
|
+
u(g, {
|
|
2436
|
+
type: "info",
|
|
2437
|
+
size: "18",
|
|
2438
|
+
class: "-mt-1 text-blue-600"
|
|
2439
|
+
})
|
|
2440
|
+
]),
|
|
2441
|
+
l("div", null, [
|
|
2442
|
+
l("div", Ki, [
|
|
2443
|
+
l("div", {
|
|
2444
|
+
class: "mb-2 text-sm font-semibold text-blue-600",
|
|
2445
|
+
textContent: p(e.$t("deductionDate.title"))
|
|
2446
|
+
}, null, 8, Yi),
|
|
2447
|
+
l("div", Zi, p(e.$t("deductionDate.description")), 1)
|
|
2448
|
+
]),
|
|
2449
|
+
l("div", Ji, [
|
|
2450
|
+
u(k, {
|
|
2451
|
+
label: e.$t("deductionDate.label"),
|
|
2452
|
+
inputs: [
|
|
2453
|
+
{
|
|
2454
|
+
component: "select",
|
|
2455
|
+
props: {
|
|
2456
|
+
value: s.internalDeductionDate || "",
|
|
2457
|
+
options: [
|
|
2458
|
+
{ value: "", label: e.$t("deductionDate.automatic") },
|
|
2459
|
+
...i.futureDeductionDates.map((y) => ({
|
|
2460
|
+
value: y.value || "",
|
|
2461
|
+
label: y.label
|
|
2462
|
+
}))
|
|
2463
|
+
]
|
|
2464
|
+
},
|
|
2465
|
+
onInput: (y) => this.setDate(y)
|
|
2466
|
+
}
|
|
2467
|
+
]
|
|
2468
|
+
}, null, 8, ["label", "inputs"])
|
|
2469
|
+
])
|
|
2470
|
+
])
|
|
2471
|
+
])
|
|
2472
|
+
])) : w("", !0),
|
|
2473
|
+
u(c, {
|
|
2401
2474
|
type: "secondary",
|
|
2402
2475
|
wide: "",
|
|
2403
2476
|
class: "mt-8",
|
|
2404
2477
|
onClick: t[1] || (t[1] = () => {
|
|
2405
|
-
e.houseWorkManualAmount = s.internalValue, e.$modal.hide(s.modalName);
|
|
2478
|
+
e.houseWorkManualAmount = s.internalValue, e.houseWorkDeductionDate = s.internalDeductionDate, e.$modal.hide(s.modalName);
|
|
2406
2479
|
})
|
|
2407
2480
|
}, {
|
|
2408
|
-
default:
|
|
2409
|
-
|
|
2481
|
+
default: v(() => [
|
|
2482
|
+
_(p(e.$t("save")), 1)
|
|
2410
2483
|
]),
|
|
2411
2484
|
_: 1
|
|
2412
2485
|
}),
|
|
2413
|
-
|
|
2486
|
+
u(c, {
|
|
2414
2487
|
type: "secondary",
|
|
2415
2488
|
pattern: "tertiary",
|
|
2416
2489
|
wide: "",
|
|
2417
2490
|
class: "mt-2",
|
|
2418
2491
|
onClick: t[2] || (t[2] = () => {
|
|
2419
|
-
e.houseWorkManualAmount = null, e.$modal.hide(s.modalName);
|
|
2492
|
+
e.houseWorkManualAmount = null, e.houseWorkDeductionDate = null, e.$modal.hide(s.modalName);
|
|
2420
2493
|
})
|
|
2421
2494
|
}, {
|
|
2422
|
-
default:
|
|
2423
|
-
|
|
2495
|
+
default: v(() => [
|
|
2496
|
+
_(p(e.$t("reset")), 1)
|
|
2424
2497
|
]),
|
|
2425
2498
|
_: 1
|
|
2426
2499
|
})
|
|
2427
2500
|
])
|
|
2428
2501
|
]),
|
|
2429
2502
|
_: 1
|
|
2430
|
-
}, 16, ["name"])
|
|
2431
|
-
e.houseWorkManualAmount ? (a(), A(c, {
|
|
2432
|
-
key: 0,
|
|
2433
|
-
order: 2,
|
|
2434
|
-
to: "document-nav-bottom"
|
|
2435
|
-
}, {
|
|
2436
|
-
default: g(() => [
|
|
2437
|
-
l("div", {
|
|
2438
|
-
class: "housework-manual-nav",
|
|
2439
|
-
onClick: t[3] || (t[3] = (y) => e.$modal.show(s.modalName))
|
|
2440
|
-
}, [
|
|
2441
|
-
(a(), d("svg", Fi, t[4] || (t[4] = [
|
|
2442
|
-
l("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }, null, -1),
|
|
2443
|
-
l("line", {
|
|
2444
|
-
x1: "12",
|
|
2445
|
-
y1: "9",
|
|
2446
|
-
x2: "12",
|
|
2447
|
-
y2: "13"
|
|
2448
|
-
}, null, -1),
|
|
2449
|
-
l("line", {
|
|
2450
|
-
x1: "12",
|
|
2451
|
-
y1: "17",
|
|
2452
|
-
x2: "12.01",
|
|
2453
|
-
y2: "17"
|
|
2454
|
-
}, null, -1)
|
|
2455
|
-
]))),
|
|
2456
|
-
I(" " + u(e.$t("deduction.manualType", { type: e.$t(`deduction.${n.houseWorkType}`) })) + " " + u(e.$t("using")), 1)
|
|
2457
|
-
])
|
|
2458
|
-
]),
|
|
2459
|
-
_: 1
|
|
2460
|
-
})) : b("", !0)
|
|
2503
|
+
}, 16, ["name"])
|
|
2461
2504
|
]);
|
|
2462
2505
|
}
|
|
2463
|
-
const
|
|
2506
|
+
const Xi = /* @__PURE__ */ R(Ui, [["render", Qi], ["__scopeId", "data-v-0a5e7cc0"]]), en = {
|
|
2464
2507
|
name: "Pricing",
|
|
2465
2508
|
components: {
|
|
2466
|
-
EditDeduction:
|
|
2509
|
+
EditDeduction: Xi
|
|
2467
2510
|
},
|
|
2468
2511
|
props: {
|
|
2469
2512
|
_document: {
|
|
@@ -2489,6 +2532,9 @@ const Ni = /* @__PURE__ */ R(Li, [["render", qi], ["__scopeId", "data-v-b12680ea
|
|
|
2489
2532
|
vatType() {
|
|
2490
2533
|
return x(this, "_document.vatType");
|
|
2491
2534
|
},
|
|
2535
|
+
customDeductionDate() {
|
|
2536
|
+
return x(this._document, "data.prices.region.deductionDate", null);
|
|
2537
|
+
},
|
|
2492
2538
|
priceArray() {
|
|
2493
2539
|
return [
|
|
2494
2540
|
{
|
|
@@ -2510,11 +2556,7 @@ const Ni = /* @__PURE__ */ R(Li, [["render", qi], ["__scopeId", "data-v-b12680ea
|
|
|
2510
2556
|
}),
|
|
2511
2557
|
value: -this.prices.region.houseWorkAmount,
|
|
2512
2558
|
action: () => this.$refs.deduction.showModal(),
|
|
2513
|
-
showIcon: !!x(
|
|
2514
|
-
this.prices,
|
|
2515
|
-
"region.houseWorkManualAmount",
|
|
2516
|
-
!1
|
|
2517
|
-
),
|
|
2559
|
+
showIcon: !!x(this.prices, "region.houseWorkManualAmount", !1) || !!this.customDeductionDate,
|
|
2518
2560
|
tooltip: this.$t("_common:manualDeductionTooltip")
|
|
2519
2561
|
}
|
|
2520
2562
|
] : [],
|
|
@@ -2567,40 +2609,41 @@ const Ni = /* @__PURE__ */ R(Li, [["render", qi], ["__scopeId", "data-v-b12680ea
|
|
|
2567
2609
|
return !!x(this.prices, "region.houseWorkType", !1) || !!x(this.prices, "region.houseWorkManualAmount", !1);
|
|
2568
2610
|
}
|
|
2569
2611
|
}
|
|
2570
|
-
},
|
|
2612
|
+
}, tn = { class: "price-bubble" }, nn = { class: "flex w-full items-center justify-between" }, sn = { class: "price-label" }, an = {
|
|
2571
2613
|
key: 0,
|
|
2572
2614
|
class: "pricing-sub-label"
|
|
2573
|
-
},
|
|
2574
|
-
function
|
|
2575
|
-
const f =
|
|
2576
|
-
return a(), d("div",
|
|
2577
|
-
l("div",
|
|
2615
|
+
}, on = ["onClick"], rn = { class: "price-value" };
|
|
2616
|
+
function ln(e, t, n, o, s, i) {
|
|
2617
|
+
const f = h("EditDeduction"), g = h("CIcon"), k = U("tooltip");
|
|
2618
|
+
return a(), d("div", tn, [
|
|
2619
|
+
l("div", nn, [
|
|
2578
2620
|
i.showHouseWork ? (a(), A(f, {
|
|
2579
2621
|
key: 0,
|
|
2580
2622
|
ref: "deduction",
|
|
2581
2623
|
disabled: !s.get(i.prices, "region.houseWorkType", !1),
|
|
2582
2624
|
_document: n._document,
|
|
2583
2625
|
_value: {
|
|
2584
|
-
houseWorkManualAmount: `${n.basePath}.data.prices.region.houseWorkManualAmount
|
|
2626
|
+
houseWorkManualAmount: `${n.basePath}.data.prices.region.houseWorkManualAmount`,
|
|
2627
|
+
houseWorkDeductionDate: "data.prices.region.deductionDate"
|
|
2585
2628
|
},
|
|
2586
2629
|
"house-work-type": i.prices.region.houseWorkType,
|
|
2587
2630
|
"house-work-amount": i.prices.region.houseWorkAmount,
|
|
2588
2631
|
total: i.prices.subTotal + i.prices.taxAmount,
|
|
2589
2632
|
onInput: t[0] || (t[0] = (c) => e.$emit("input", c))
|
|
2590
|
-
}, null, 8, ["disabled", "_document", "_value", "house-work-type", "house-work-amount", "total"])) :
|
|
2633
|
+
}, null, 8, ["disabled", "_document", "_value", "house-work-type", "house-work-amount", "total"])) : w("", !0)
|
|
2591
2634
|
]),
|
|
2592
2635
|
l("div", null, [
|
|
2593
|
-
(a(!0), d(C, null,
|
|
2594
|
-
key:
|
|
2595
|
-
class:
|
|
2636
|
+
(a(!0), d(C, null, V(i.priceArray, (c, b) => (a(), d("div", {
|
|
2637
|
+
key: b,
|
|
2638
|
+
class: D([[c.classList || ""], "price-row flex w-full justify-between"])
|
|
2596
2639
|
}, [
|
|
2597
|
-
l("div",
|
|
2598
|
-
|
|
2599
|
-
c.subLabel ? (a(), d("span",
|
|
2600
|
-
c.action ?
|
|
2640
|
+
l("div", sn, [
|
|
2641
|
+
_(p(c.label.capitalize()) + " ", 1),
|
|
2642
|
+
c.subLabel ? (a(), d("span", an, p(c.subLabel), 1)) : w("", !0),
|
|
2643
|
+
c.action ? S((a(), d("span", {
|
|
2601
2644
|
key: 1,
|
|
2602
2645
|
class: "pricing-action",
|
|
2603
|
-
onClick: (
|
|
2646
|
+
onClick: (y) => c.action ? c.action() : null
|
|
2604
2647
|
}, t[1] || (t[1] = [
|
|
2605
2648
|
l("svg", {
|
|
2606
2649
|
viewBox: "0 0 24 24",
|
|
@@ -2615,24 +2658,24 @@ function Xi(e, t, n, o, s, i) {
|
|
|
2615
2658
|
l("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
2616
2659
|
l("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })
|
|
2617
2660
|
], -1)
|
|
2618
|
-
]), 8,
|
|
2661
|
+
]), 8, on)), [
|
|
2619
2662
|
[k, e.$t("edit", { thing: e.$t("deduction.deduction") })]
|
|
2620
|
-
]) :
|
|
2621
|
-
c.showIcon ?
|
|
2663
|
+
]) : w("", !0),
|
|
2664
|
+
c.showIcon ? S((a(), A(g, {
|
|
2622
2665
|
key: 2,
|
|
2623
2666
|
type: "info",
|
|
2624
2667
|
size: "20",
|
|
2625
2668
|
class: "border-primary-100 bg-primary-100 text-primary-500 mx-1 rounded-full border-2"
|
|
2626
2669
|
}, null, 512)), [
|
|
2627
2670
|
[k, c.tooltip]
|
|
2628
|
-
]) :
|
|
2671
|
+
]) : w("", !0)
|
|
2629
2672
|
]),
|
|
2630
|
-
l("div",
|
|
2673
|
+
l("div", rn, p(c.prefix) + " " + p(c.value), 1)
|
|
2631
2674
|
], 2))), 128))
|
|
2632
2675
|
])
|
|
2633
2676
|
]);
|
|
2634
2677
|
}
|
|
2635
|
-
const
|
|
2678
|
+
const cn = /* @__PURE__ */ R(en, [["render", ln], ["__scopeId", "data-v-b5cda203"]]), dn = {
|
|
2636
2679
|
name: "PackageItemEdit",
|
|
2637
2680
|
i18nOptions: {
|
|
2638
2681
|
namespaces: "PackageItemEdit",
|
|
@@ -2660,11 +2703,11 @@ const en = /* @__PURE__ */ R(Hi, [["render", Xi], ["__scopeId", "data-v-b6c617f4
|
|
|
2660
2703
|
}
|
|
2661
2704
|
},
|
|
2662
2705
|
components: {
|
|
2663
|
-
ArticleList:
|
|
2664
|
-
PriceFormAlternatives:
|
|
2665
|
-
MaxTotalInput:
|
|
2666
|
-
Pricing:
|
|
2667
|
-
TextEditor:
|
|
2706
|
+
ArticleList: xi,
|
|
2707
|
+
PriceFormAlternatives: Ei,
|
|
2708
|
+
MaxTotalInput: Ri,
|
|
2709
|
+
Pricing: cn,
|
|
2710
|
+
TextEditor: et,
|
|
2668
2711
|
CDropdown: Z,
|
|
2669
2712
|
CDropdownItem: Y
|
|
2670
2713
|
},
|
|
@@ -2730,14 +2773,14 @@ const en = /* @__PURE__ */ R(Hi, [["render", Xi], ["__scopeId", "data-v-b6c617f4
|
|
|
2730
2773
|
},
|
|
2731
2774
|
internalDescription: {
|
|
2732
2775
|
get() {
|
|
2733
|
-
return
|
|
2776
|
+
return Ze(
|
|
2734
2777
|
this.description,
|
|
2735
2778
|
this._document.textTemplateMap,
|
|
2736
2779
|
this._document._doc
|
|
2737
2780
|
);
|
|
2738
2781
|
},
|
|
2739
2782
|
set(e) {
|
|
2740
|
-
this.description =
|
|
2783
|
+
this.description = Ye(e);
|
|
2741
2784
|
}
|
|
2742
2785
|
}
|
|
2743
2786
|
},
|
|
@@ -2778,7 +2821,7 @@ const en = /* @__PURE__ */ R(Hi, [["render", Xi], ["__scopeId", "data-v-b6c617f4
|
|
|
2778
2821
|
});
|
|
2779
2822
|
},
|
|
2780
2823
|
onArticleInput({ index: e, value: t }) {
|
|
2781
|
-
const { i: n } = this.mappedPackageArticles[e], o =
|
|
2824
|
+
const { i: n } = this.mappedPackageArticles[e], o = Ke(t, [
|
|
2782
2825
|
"allowRot",
|
|
2783
2826
|
"allowRut",
|
|
2784
2827
|
"isIncVat",
|
|
@@ -2791,7 +2834,7 @@ const en = /* @__PURE__ */ R(Hi, [["render", Xi], ["__scopeId", "data-v-b6c617f4
|
|
|
2791
2834
|
this.createEmptyArticle(), e ? this.$refs.articleList.openLastArticle() : this.$refs.articleList.focusLastArticle();
|
|
2792
2835
|
},
|
|
2793
2836
|
onInsert({ index: e, value: t }) {
|
|
2794
|
-
const n =
|
|
2837
|
+
const n = Ge(this.mappedPackageArticles).add(
|
|
2795
2838
|
{ ...t, packageId: this.packageId },
|
|
2796
2839
|
e
|
|
2797
2840
|
);
|
|
@@ -2821,120 +2864,120 @@ const en = /* @__PURE__ */ R(Hi, [["render", Xi], ["__scopeId", "data-v-b6c617f4
|
|
|
2821
2864
|
});
|
|
2822
2865
|
}
|
|
2823
2866
|
}
|
|
2824
|
-
},
|
|
2825
|
-
function
|
|
2826
|
-
const f =
|
|
2827
|
-
return a(), d("div",
|
|
2828
|
-
l("div",
|
|
2829
|
-
l("div", null,
|
|
2867
|
+
}, un = { class: "min-h-0 rounded-md border border-gray-200 bg-white text-black" }, pn = { class: "flex w-full items-center justify-between bg-gray-100 py-1 pl-4 pr-1 text-sm font-medium text-gray-600" }, mn = { class: "p-4" }, hn = { class: "mb-0.5 flex items-center" }, gn = ["id", "placeholder"], vn = { class: "mt-2 flex gap-2" };
|
|
2868
|
+
function fn(e, t, n, o, s, i) {
|
|
2869
|
+
const f = h("CButton"), g = h("CDropdownItem"), k = h("CDropdown"), c = h("TextEditor"), b = h("MaxTotalInput"), y = h("PriceFormAlternatives"), $ = h("ArticleList"), m = h("CIcon"), T = h("Pricing"), r = U("tooltip"), P = U("click-outside");
|
|
2870
|
+
return a(), d("div", un, [
|
|
2871
|
+
l("div", pn, [
|
|
2872
|
+
l("div", null, p(n.type === "single" ? e.$t("single") : n.type === "radio" || n.toggable ? e.$t("option") : e.$t("base")), 1),
|
|
2830
2873
|
n.type !== "single" ? (a(), A(k, {
|
|
2831
2874
|
key: 0,
|
|
2832
2875
|
class: "ml-4"
|
|
2833
2876
|
}, {
|
|
2834
|
-
trigger:
|
|
2835
|
-
|
|
2877
|
+
trigger: v(() => [
|
|
2878
|
+
u(f, {
|
|
2836
2879
|
size: "small",
|
|
2837
2880
|
type: "text",
|
|
2838
2881
|
pattern: "secondary",
|
|
2839
2882
|
class: "is-thinner opacity-70"
|
|
2840
2883
|
}, {
|
|
2841
|
-
default:
|
|
2842
|
-
|
|
2884
|
+
default: v(() => [
|
|
2885
|
+
_(p(e.$t("_common:change")), 1)
|
|
2843
2886
|
]),
|
|
2844
2887
|
_: 1
|
|
2845
2888
|
})
|
|
2846
2889
|
]),
|
|
2847
|
-
default:
|
|
2890
|
+
default: v(() => [
|
|
2848
2891
|
n.toggable ? (a(), d(C, { key: 0 }, [
|
|
2849
|
-
|
|
2892
|
+
u(g, {
|
|
2850
2893
|
value: e.isSelectedDefault,
|
|
2851
2894
|
toggle: !0,
|
|
2852
2895
|
"close-on-click": !1,
|
|
2853
|
-
onClick: t[0] || (t[0] = (
|
|
2896
|
+
onClick: t[0] || (t[0] = (I) => e.$emit("update:isSelectedDefault", !e.isSelectedDefault))
|
|
2854
2897
|
}, {
|
|
2855
|
-
default:
|
|
2856
|
-
|
|
2898
|
+
default: v(() => [
|
|
2899
|
+
_(p(e.$t("selected")), 1)
|
|
2857
2900
|
]),
|
|
2858
2901
|
_: 1
|
|
2859
2902
|
}, 8, ["value"]),
|
|
2860
|
-
|
|
2861
|
-
], 64)) :
|
|
2862
|
-
|
|
2903
|
+
u(g, { separator: "" })
|
|
2904
|
+
], 64)) : w("", !0),
|
|
2905
|
+
u(g, {
|
|
2863
2906
|
"icon-left": "arrow-up",
|
|
2864
2907
|
disabled: !n.moveOptions.up,
|
|
2865
|
-
onClick: t[1] || (t[1] = (
|
|
2908
|
+
onClick: t[1] || (t[1] = (I) => e.$emit("move", -1))
|
|
2866
2909
|
}, {
|
|
2867
|
-
default:
|
|
2868
|
-
|
|
2910
|
+
default: v(() => [
|
|
2911
|
+
_(p(e.$t("_common:move", { thing: e.$t("_common:up") })), 1)
|
|
2869
2912
|
]),
|
|
2870
2913
|
_: 1
|
|
2871
2914
|
}, 8, ["disabled"]),
|
|
2872
|
-
|
|
2915
|
+
u(g, {
|
|
2873
2916
|
"icon-left": "arrow-down",
|
|
2874
2917
|
disabled: !n.moveOptions.down,
|
|
2875
|
-
onClick: t[2] || (t[2] = (
|
|
2918
|
+
onClick: t[2] || (t[2] = (I) => e.$emit("move", 1))
|
|
2876
2919
|
}, {
|
|
2877
|
-
default:
|
|
2878
|
-
|
|
2920
|
+
default: v(() => [
|
|
2921
|
+
_(p(e.$t("_common:move", { thing: e.$t("_common:down") })), 1)
|
|
2879
2922
|
]),
|
|
2880
2923
|
_: 1
|
|
2881
2924
|
}, 8, ["disabled"]),
|
|
2882
|
-
|
|
2925
|
+
u(g, {
|
|
2883
2926
|
"icon-props": {
|
|
2884
2927
|
stroke: "red"
|
|
2885
2928
|
},
|
|
2886
2929
|
"icon-left": "trash",
|
|
2887
2930
|
onClick: i.onRemove
|
|
2888
2931
|
}, {
|
|
2889
|
-
default:
|
|
2890
|
-
|
|
2932
|
+
default: v(() => [
|
|
2933
|
+
_(p(e.$t("_common:remove")), 1)
|
|
2891
2934
|
]),
|
|
2892
2935
|
_: 1
|
|
2893
2936
|
}, 8, ["onClick"])
|
|
2894
2937
|
]),
|
|
2895
2938
|
_: 1
|
|
2896
|
-
})) :
|
|
2939
|
+
})) : w("", !0)
|
|
2897
2940
|
]),
|
|
2898
|
-
l("div",
|
|
2899
|
-
l("div",
|
|
2900
|
-
|
|
2941
|
+
l("div", mn, [
|
|
2942
|
+
l("div", hn, [
|
|
2943
|
+
S(l("input", {
|
|
2901
2944
|
id: `package-name-${n.packageId}`,
|
|
2902
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
|
2945
|
+
"onUpdate:modelValue": t[3] || (t[3] = (I) => e.name = I),
|
|
2903
2946
|
placeholder: e.$t("namePlaceholder"),
|
|
2904
2947
|
class: "block w-full rounded-lg p-0 text-xl font-bold leading-loose placeholder:text-gray-400",
|
|
2905
|
-
onKeyup: t[4] || (t[4] =
|
|
2906
|
-
}, null, 40,
|
|
2907
|
-
[
|
|
2948
|
+
onKeyup: t[4] || (t[4] = F((I) => e.$refs.editor.focus(), ["enter"]))
|
|
2949
|
+
}, null, 40, gn), [
|
|
2950
|
+
[Je, e.name]
|
|
2908
2951
|
])
|
|
2909
2952
|
]),
|
|
2910
|
-
|
|
2953
|
+
u(c, {
|
|
2911
2954
|
ref: "editor",
|
|
2912
2955
|
modelValue: i.internalDescription,
|
|
2913
|
-
"onUpdate:modelValue": t[5] || (t[5] = (
|
|
2956
|
+
"onUpdate:modelValue": t[5] || (t[5] = (I) => i.internalDescription = I),
|
|
2914
2957
|
placeholder: e.$t("textPlaceholder"),
|
|
2915
2958
|
mentions: () => e._document.textTemplateItems,
|
|
2916
2959
|
class: "text-editor mb-4"
|
|
2917
2960
|
}, null, 8, ["modelValue", "placeholder", "mentions"]),
|
|
2918
|
-
|
|
2919
|
-
onMouseoverPassive: t[15] || (t[15] = (
|
|
2920
|
-
onMouseleavePassive: t[16] || (t[16] = (
|
|
2961
|
+
S((a(), d("div", {
|
|
2962
|
+
onMouseoverPassive: t[15] || (t[15] = (I) => s.isHover = !0),
|
|
2963
|
+
onMouseleavePassive: t[16] || (t[16] = (I) => s.isHover = !1)
|
|
2921
2964
|
}, [
|
|
2922
|
-
e.priceType === "openAccMaxPrice" ? (a(), A(
|
|
2965
|
+
e.priceType === "openAccMaxPrice" ? (a(), A(b, {
|
|
2923
2966
|
key: 0,
|
|
2924
2967
|
modelValue: e.maxTotal,
|
|
2925
|
-
"onUpdate:modelValue": t[6] || (t[6] = (
|
|
2968
|
+
"onUpdate:modelValue": t[6] || (t[6] = (I) => e.maxTotal = I),
|
|
2926
2969
|
currency: e.currency,
|
|
2927
2970
|
"vat-type": e._document.vatType,
|
|
2928
2971
|
class: "mb-4"
|
|
2929
|
-
}, null, 8, ["modelValue", "currency", "vat-type"])) :
|
|
2930
|
-
|
|
2972
|
+
}, null, 8, ["modelValue", "currency", "vat-type"])) : w("", !0),
|
|
2973
|
+
u(y, {
|
|
2931
2974
|
modelValue: e.priceType,
|
|
2932
2975
|
"onUpdate:modelValue": [
|
|
2933
|
-
t[7] || (t[7] = (
|
|
2934
|
-
t[8] || (t[8] = (
|
|
2976
|
+
t[7] || (t[7] = (I) => e.priceType = I),
|
|
2977
|
+
t[8] || (t[8] = (I) => e.$emit("update:priceType", I))
|
|
2935
2978
|
]
|
|
2936
2979
|
}, null, 8, ["modelValue"]),
|
|
2937
|
-
|
|
2980
|
+
u($, {
|
|
2938
2981
|
ref: "articleList",
|
|
2939
2982
|
_document: e._document,
|
|
2940
2983
|
articles: i.mappedPackageArticles,
|
|
@@ -2942,32 +2985,32 @@ function cn(e, t, n, o, s, i) {
|
|
|
2942
2985
|
"active-house-work-type": n.activeHouseWorkType,
|
|
2943
2986
|
"hide-controls": !s.isFocus && !s.isHover,
|
|
2944
2987
|
onInput: i.onArticleInput,
|
|
2945
|
-
"onUpdate:setPricesIncVat": t[9] || (t[9] = (
|
|
2946
|
-
"onUpdate:currency": t[10] || (t[10] = (
|
|
2988
|
+
"onUpdate:setPricesIncVat": t[9] || (t[9] = (I) => e.$emit("update:setPricesIncVat", I)),
|
|
2989
|
+
"onUpdate:currency": t[10] || (t[10] = (I) => e.$emit("update:currency", I)),
|
|
2947
2990
|
onMove: i.onArticleMove,
|
|
2948
2991
|
onRemove: i.onArticleRemove,
|
|
2949
2992
|
onAdd: i.onArticleAdd,
|
|
2950
|
-
onFocus: t[11] || (t[11] = (
|
|
2993
|
+
onFocus: t[11] || (t[11] = (I) => s.isFocus = !0),
|
|
2951
2994
|
onInsert: i.onInsert
|
|
2952
2995
|
}, null, 8, ["_document", "articles", "root-price-type", "active-house-work-type", "hide-controls", "onInput", "onMove", "onRemove", "onAdd", "onInsert"]),
|
|
2953
|
-
l("div",
|
|
2996
|
+
l("div", vn, [
|
|
2954
2997
|
l("div", {
|
|
2955
2998
|
class: "cursor-pointer rounded-md border border-gray-200 bg-gray-100 p-2.5 text-center text-sm font-medium leading-none text-gray-500 transition-colors hover:border-gray-400 hover:bg-gray-500 hover:text-white",
|
|
2956
|
-
onClick: t[12] || (t[12] = (
|
|
2999
|
+
onClick: t[12] || (t[12] = (I) => i.onArticleAdd())
|
|
2957
3000
|
}, [
|
|
2958
|
-
|
|
3001
|
+
u(m, {
|
|
2959
3002
|
type: "plus",
|
|
2960
3003
|
size: "16",
|
|
2961
3004
|
"stroke-width": "3",
|
|
2962
3005
|
class: "mr-1"
|
|
2963
3006
|
}),
|
|
2964
|
-
|
|
3007
|
+
_(" " + p(e.$t("addButton")), 1)
|
|
2965
3008
|
]),
|
|
2966
|
-
|
|
3009
|
+
S((a(), d("div", {
|
|
2967
3010
|
class: "cursor-pointer rounded-md border border-gray-200 bg-gray-100 p-2.5 text-center text-sm font-medium leading-none text-gray-500 transition-colors hover:border-gray-400 hover:bg-gray-500 hover:text-white",
|
|
2968
|
-
onClick: t[13] || (t[13] = (
|
|
3011
|
+
onClick: t[13] || (t[13] = (I) => i.onArticleAdd({ openModal: !0 }))
|
|
2969
3012
|
}, [
|
|
2970
|
-
|
|
3013
|
+
u(m, {
|
|
2971
3014
|
type: "zap",
|
|
2972
3015
|
size: "16",
|
|
2973
3016
|
"stroke-width": "2.5"
|
|
@@ -2979,11 +3022,11 @@ function cn(e, t, n, o, s, i) {
|
|
|
2979
3022
|
}]
|
|
2980
3023
|
])
|
|
2981
3024
|
]),
|
|
2982
|
-
|
|
3025
|
+
u(T, {
|
|
2983
3026
|
_document: e._document,
|
|
2984
3027
|
"base-path": `${e._value.basePath}`,
|
|
2985
3028
|
"package-id": n.packageId,
|
|
2986
|
-
onInput: t[14] || (t[14] = (
|
|
3029
|
+
onInput: t[14] || (t[14] = (I) => e.$emit("input", I))
|
|
2987
3030
|
}, null, 8, ["_document", "base-path", "package-id"])
|
|
2988
3031
|
], 32)), [
|
|
2989
3032
|
[
|
|
@@ -2996,12 +3039,12 @@ function cn(e, t, n, o, s, i) {
|
|
|
2996
3039
|
])
|
|
2997
3040
|
]);
|
|
2998
3041
|
}
|
|
2999
|
-
const
|
|
3042
|
+
const yn = /* @__PURE__ */ R(dn, [["render", fn], ["__scopeId", "data-v-64642fe7"]]), kn = (e) => (e || []).slice(0, 1).map((t) => ({
|
|
3000
3043
|
...t,
|
|
3001
3044
|
isSelected: !0,
|
|
3002
3045
|
isSelectedDefault: !0,
|
|
3003
3046
|
toggable: !1
|
|
3004
|
-
})),
|
|
3047
|
+
})), bn = (e) => {
|
|
3005
3048
|
const t = x(e, "0.data.prices.type") || "fixed";
|
|
3006
3049
|
return (e || []).map((n, o) => ({
|
|
3007
3050
|
...n,
|
|
@@ -3019,7 +3062,7 @@ const dn = /* @__PURE__ */ R(tn, [["render", cn], ["__scopeId", "data-v-64642fe7
|
|
|
3019
3062
|
}
|
|
3020
3063
|
}
|
|
3021
3064
|
}));
|
|
3022
|
-
},
|
|
3065
|
+
}, wn = (e = []) => {
|
|
3023
3066
|
let t = !1;
|
|
3024
3067
|
return e.map((n) => {
|
|
3025
3068
|
const o = {
|
|
@@ -3034,13 +3077,13 @@ const dn = /* @__PURE__ */ R(tn, [["render", cn], ["__scopeId", "data-v-64642fe7
|
|
|
3034
3077
|
return (o.isSelected || o.isSelectedDefault) && (t = !0), o;
|
|
3035
3078
|
}, []);
|
|
3036
3079
|
};
|
|
3037
|
-
function
|
|
3038
|
-
if (e === "single") return
|
|
3039
|
-
if (e === "checkbox") return
|
|
3040
|
-
if (e === "radio") return
|
|
3080
|
+
function In(e, ...t) {
|
|
3081
|
+
if (e === "single") return kn(...t);
|
|
3082
|
+
if (e === "checkbox") return bn(...t);
|
|
3083
|
+
if (e === "radio") return wn(...t);
|
|
3041
3084
|
throw new Error(`Package filter type '${e}' is not implemented`);
|
|
3042
3085
|
}
|
|
3043
|
-
const
|
|
3086
|
+
const _n = {
|
|
3044
3087
|
name: "PackageGroupEdit",
|
|
3045
3088
|
i18nOptions: {
|
|
3046
3089
|
namespaces: "PackageGroupEdit",
|
|
@@ -3079,8 +3122,8 @@ const gn = {
|
|
|
3079
3122
|
},
|
|
3080
3123
|
components: {
|
|
3081
3124
|
ErrorCallout: me,
|
|
3082
|
-
PackageItem:
|
|
3083
|
-
PackageGroupSelect:
|
|
3125
|
+
PackageItem: yn,
|
|
3126
|
+
PackageGroupSelect: It,
|
|
3084
3127
|
CCallout: $e,
|
|
3085
3128
|
CDropdown: Z,
|
|
3086
3129
|
CDropdownItem: Y
|
|
@@ -3156,7 +3199,7 @@ const gn = {
|
|
|
3156
3199
|
},
|
|
3157
3200
|
methods: {
|
|
3158
3201
|
...z({
|
|
3159
|
-
showMessage:
|
|
3202
|
+
showMessage: L.SHOW_MESSAGE
|
|
3160
3203
|
}),
|
|
3161
3204
|
setPricesIncVatAsDefault(e = {}) {
|
|
3162
3205
|
this.$emit("input", {
|
|
@@ -3190,18 +3233,18 @@ const gn = {
|
|
|
3190
3233
|
if (!this.persistedGroup || !this.persistedGroup.type) return;
|
|
3191
3234
|
let { packages: t, articles: n } = this.persistedGroup;
|
|
3192
3235
|
if (!t.length) return;
|
|
3193
|
-
if (e !== this.persistedGroup.type && (t =
|
|
3236
|
+
if (e !== this.persistedGroup.type && (t = In(e, t)), e === "single" && n.length) {
|
|
3194
3237
|
const [{ packageId: s }] = t;
|
|
3195
3238
|
n = n.filter((i) => i.packageId === s);
|
|
3196
3239
|
}
|
|
3197
|
-
const o =
|
|
3240
|
+
const o = pt(
|
|
3198
3241
|
[...this._document.allArticles || [], ...n || []],
|
|
3199
3242
|
(s) => s._uniqueId
|
|
3200
3243
|
);
|
|
3201
3244
|
this.$emit("input", { key: "articles", value: o }), this.$emit("input", { key: `${[this._value.packages]}`, value: t });
|
|
3202
3245
|
},
|
|
3203
3246
|
addPackage(e = {}) {
|
|
3204
|
-
const t =
|
|
3247
|
+
const t = Qe(), n = this.type === "checkbox" && this.packages.length ? this.packages[0].data.prices.type : "fixed", o = this.currency || this.defaultCurrency, s = {
|
|
3205
3248
|
isSelected: this.type === "single",
|
|
3206
3249
|
isSelectedDefault: this.type === "single",
|
|
3207
3250
|
toggable: !0,
|
|
@@ -3279,31 +3322,31 @@ const gn = {
|
|
|
3279
3322
|
this.$emit("input", { key: this._value.packages, value: n });
|
|
3280
3323
|
}
|
|
3281
3324
|
}
|
|
3282
|
-
},
|
|
3325
|
+
}, $n = { class: "package-group-root font-inter" }, Tn = { key: 0 }, An = { style: { position: "absolute", right: "0", top: "-10px", transform: "translateY(-100%)", "z-index": "2" } }, Cn = { class: "pb-4" }, Pn = {
|
|
3283
3326
|
key: 2,
|
|
3284
3327
|
style: { width: "calc(5 * var(--rem))", height: "1px", "margin-left": "calc(50% - calc(2.5 * var(--rem)))", "border-top": "2px dashed hsl(0, 0%, 85%)" }
|
|
3285
|
-
},
|
|
3328
|
+
}, xn = {
|
|
3286
3329
|
key: 4,
|
|
3287
3330
|
class: "flex w-full flex-col items-center justify-center"
|
|
3288
|
-
},
|
|
3331
|
+
}, Dn = { style: { width: "100%" } }, Vn = {
|
|
3289
3332
|
key: 0,
|
|
3290
3333
|
class: "package-placeholder bg-gray-100",
|
|
3291
3334
|
style: { color: "hsl(0, 0%, 24%)", "font-weight": "500" }
|
|
3292
|
-
},
|
|
3335
|
+
}, Sn = {
|
|
3293
3336
|
style: { "vertical-align": "text-bottom", "margin-right": "3px" },
|
|
3294
3337
|
width: "16",
|
|
3295
3338
|
height: "16",
|
|
3296
3339
|
viewBox: "0 0 18 14",
|
|
3297
3340
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3298
|
-
},
|
|
3299
|
-
function
|
|
3300
|
-
const f =
|
|
3301
|
-
return a(), d("div",
|
|
3341
|
+
}, Rn = { class: "flex w-full" };
|
|
3342
|
+
function Mn(e, t, n, o, s, i) {
|
|
3343
|
+
const f = h("PackageGroupSelect"), g = h("ErrorCallout"), k = h("CButton"), c = h("CDropdownItem"), b = h("CDropdown"), y = h("CCallout"), $ = h("PackageItem");
|
|
3344
|
+
return a(), d("div", $n, [
|
|
3302
3345
|
e.type ? (a(), d(C, { key: 1 }, [
|
|
3303
|
-
l("div",
|
|
3304
|
-
|
|
3305
|
-
trigger:
|
|
3306
|
-
|
|
3346
|
+
l("div", An, [
|
|
3347
|
+
u(b, null, {
|
|
3348
|
+
trigger: v(() => [
|
|
3349
|
+
u(k, {
|
|
3307
3350
|
type: "none",
|
|
3308
3351
|
size: "normal",
|
|
3309
3352
|
pattern: "secondary",
|
|
@@ -3311,23 +3354,23 @@ function An(e, t, n, o, s, i) {
|
|
|
3311
3354
|
circle: ""
|
|
3312
3355
|
})
|
|
3313
3356
|
]),
|
|
3314
|
-
default:
|
|
3315
|
-
|
|
3316
|
-
default:
|
|
3317
|
-
|
|
3357
|
+
default: v(() => [
|
|
3358
|
+
u(c, { onClick: i.onResetType }, {
|
|
3359
|
+
default: v(() => [
|
|
3360
|
+
_(p(e.$t("_common:change", {
|
|
3318
3361
|
thing: e.$t("_common:price.proposal").toLowerCase()
|
|
3319
3362
|
})), 1)
|
|
3320
3363
|
]),
|
|
3321
3364
|
_: 1
|
|
3322
3365
|
}, 8, ["onClick"]),
|
|
3323
|
-
|
|
3366
|
+
u(c, {
|
|
3324
3367
|
value: !!e.hideGroupPrice,
|
|
3325
3368
|
"close-on-click": !1,
|
|
3326
3369
|
toggle: "",
|
|
3327
3370
|
onInput: t[1] || (t[1] = (m) => e.hideGroupPrice = m)
|
|
3328
3371
|
}, {
|
|
3329
|
-
default:
|
|
3330
|
-
|
|
3372
|
+
default: v(() => [
|
|
3373
|
+
_(p(e.$t("hideGroupPrice")), 1)
|
|
3331
3374
|
]),
|
|
3332
3375
|
_: 1
|
|
3333
3376
|
}, 8, ["value"])
|
|
@@ -3335,14 +3378,14 @@ function An(e, t, n, o, s, i) {
|
|
|
3335
3378
|
_: 1
|
|
3336
3379
|
})
|
|
3337
3380
|
]),
|
|
3338
|
-
e.type === "checkbox" && !i.internalPackages.find((m) => m.toggable === !1) ? (a(), A(
|
|
3381
|
+
e.type === "checkbox" && !i.internalPackages.find((m) => m.toggable === !1) ? (a(), A(y, {
|
|
3339
3382
|
key: 0,
|
|
3340
3383
|
title: e.$t("base"),
|
|
3341
3384
|
class: "w-full"
|
|
3342
3385
|
}, {
|
|
3343
|
-
default:
|
|
3344
|
-
l("div",
|
|
3345
|
-
|
|
3386
|
+
default: v(() => [
|
|
3387
|
+
l("div", Cn, p(e.$t("basePlaceholder")), 1),
|
|
3388
|
+
u(k, {
|
|
3346
3389
|
type: "secondary",
|
|
3347
3390
|
size: "small",
|
|
3348
3391
|
style: { "font-weight": "600" },
|
|
@@ -3352,8 +3395,8 @@ function An(e, t, n, o, s, i) {
|
|
|
3352
3395
|
toggable: !1
|
|
3353
3396
|
}))
|
|
3354
3397
|
}, {
|
|
3355
|
-
default:
|
|
3356
|
-
|
|
3398
|
+
default: v(() => [
|
|
3399
|
+
_(p(e.$t("_common:add", { thing: e.$t("base").toLowerCase() })), 1)
|
|
3357
3400
|
]),
|
|
3358
3401
|
_: 1
|
|
3359
3402
|
})
|
|
@@ -3364,12 +3407,12 @@ function An(e, t, n, o, s, i) {
|
|
|
3364
3407
|
name: "section-list",
|
|
3365
3408
|
tag: "div"
|
|
3366
3409
|
}, {
|
|
3367
|
-
default:
|
|
3368
|
-
(a(!0), d(C, null,
|
|
3410
|
+
default: v(() => [
|
|
3411
|
+
(a(!0), d(C, null, V(i.topRowPackages, (m, T) => (a(), d("div", {
|
|
3369
3412
|
key: m.packageId,
|
|
3370
3413
|
class: "section-item pb-4"
|
|
3371
3414
|
}, [
|
|
3372
|
-
|
|
3415
|
+
u($, {
|
|
3373
3416
|
_document: e._document,
|
|
3374
3417
|
_value: {
|
|
3375
3418
|
isSelectedDefault: `${e._value.packages}[${m.index}].isSelectedDefault`,
|
|
@@ -3405,20 +3448,20 @@ function An(e, t, n, o, s, i) {
|
|
|
3405
3448
|
]),
|
|
3406
3449
|
_: 1
|
|
3407
3450
|
})),
|
|
3408
|
-
e.type === "checkbox" && i.topRowPackages.length && i.bottomRowPackages.length ? (a(), d("div",
|
|
3451
|
+
e.type === "checkbox" && i.topRowPackages.length && i.bottomRowPackages.length ? (a(), d("div", Pn)) : w("", !0),
|
|
3409
3452
|
e.type === "checkbox" ? (a(), A(re, {
|
|
3410
3453
|
key: 3,
|
|
3411
3454
|
name: "section-list",
|
|
3412
3455
|
tag: "div",
|
|
3413
3456
|
style: { "margin-bottom": "calc(1 * var(--rem))" }
|
|
3414
3457
|
}, {
|
|
3415
|
-
default:
|
|
3416
|
-
(a(!0), d(C, null,
|
|
3458
|
+
default: v(() => [
|
|
3459
|
+
(a(!0), d(C, null, V(i.bottomRowPackages, (m, T) => (a(), d("div", {
|
|
3417
3460
|
key: m.packageId,
|
|
3418
3461
|
class: "section-item",
|
|
3419
3462
|
style: { padding: "calc(1 * var(--rem)) 0" }
|
|
3420
3463
|
}, [
|
|
3421
|
-
|
|
3464
|
+
u($, {
|
|
3422
3465
|
_document: e._document,
|
|
3423
3466
|
_value: {
|
|
3424
3467
|
isSelectedDefault: `${e._value.packages}[${m.index}].isSelectedDefault`,
|
|
@@ -3452,53 +3495,53 @@ function An(e, t, n, o, s, i) {
|
|
|
3452
3495
|
]))), 128))
|
|
3453
3496
|
]),
|
|
3454
3497
|
_: 1
|
|
3455
|
-
})) :
|
|
3456
|
-
e.type !== "single" || !e.packages.length ? (a(), d("div",
|
|
3457
|
-
l("div",
|
|
3458
|
-
e.type === "radio" && !e.packages.length ? (a(), d("div",
|
|
3459
|
-
(a(), d("svg",
|
|
3498
|
+
})) : w("", !0),
|
|
3499
|
+
e.type !== "single" || !e.packages.length ? (a(), d("div", xn, [
|
|
3500
|
+
l("div", Dn, [
|
|
3501
|
+
e.type === "radio" && !e.packages.length ? (a(), d("div", Vn, [
|
|
3502
|
+
(a(), d("svg", Sn, t[13] || (t[13] = [
|
|
3460
3503
|
l("path", {
|
|
3461
3504
|
d: "M8.03.22c.3.3.3.77 0 1.06L5.56 3.75h6.88L9.97 1.28A.75.75 0 1111.03.21l3.53 3.54h2.69a.75.75 0 010 1.5h-.12l-1.17 6.4a2.25 2.25 0 01-2.21 1.85h-9.5a2.25 2.25 0 01-2.21-1.84L.87 5.26H.75a.75.75 0 010-1.5h2.69L6.97.21c.3-.3.77-.3 1.06 0zM2.4 5.25L3.5 11.4c.07.35.38.61.74.61h9.5c.36 0 .67-.26.74-.61l1.11-6.14H2.4zm3.1 1.5c.41-.06.8.22.86.63l.38 2.25a.75.75 0 11-1.48.24l-.37-2.25c-.07-.4.2-.8.61-.86zm7 0c.4.08.68.47.61.87l-.37 2.25a.75.75 0 11-1.48-.24l.38-2.25a.75.75 0 01.86-.62zm-3.5 0c.41 0 .75.34.75.75v2.25a.75.75 0 01-1.5 0V7.5c0-.41.34-.75.75-.75z",
|
|
3462
3505
|
fill: "#000",
|
|
3463
3506
|
"fill-rule": "evenodd"
|
|
3464
3507
|
}, null, -1)
|
|
3465
3508
|
]))),
|
|
3466
|
-
|
|
3467
|
-
])) :
|
|
3509
|
+
_(" " + p(e.$t("selectablePlaceholder")), 1)
|
|
3510
|
+
])) : w("", !0)
|
|
3468
3511
|
]),
|
|
3469
|
-
n.validator.$invalid && n.validator.$dirty ? (a(), A(
|
|
3512
|
+
n.validator.$invalid && n.validator.$dirty ? (a(), A(g, {
|
|
3470
3513
|
key: 0,
|
|
3471
3514
|
message: e.$t("error.minOnePackage"),
|
|
3472
3515
|
style: { margin: "calc(1 * var(--rem)) 0 calc(1 * var(--rem)) 0" }
|
|
3473
|
-
}, null, 8, ["message"])) :
|
|
3474
|
-
l("div",
|
|
3475
|
-
|
|
3516
|
+
}, null, 8, ["message"])) : w("", !0),
|
|
3517
|
+
l("div", Rn, [
|
|
3518
|
+
u(k, {
|
|
3476
3519
|
type: "secondary",
|
|
3477
3520
|
outlined: "",
|
|
3478
3521
|
"icon-left": "plus",
|
|
3479
3522
|
style: { "border-color": "hsl(0, 0%, 82%)" },
|
|
3480
3523
|
onClick: t[12] || (t[12] = (m) => i.addPackage())
|
|
3481
3524
|
}, {
|
|
3482
|
-
default:
|
|
3483
|
-
|
|
3525
|
+
default: v(() => [
|
|
3526
|
+
_(p(e.$t("add")), 1)
|
|
3484
3527
|
]),
|
|
3485
3528
|
_: 1
|
|
3486
3529
|
})
|
|
3487
3530
|
])
|
|
3488
|
-
])) :
|
|
3489
|
-
], 64)) : (a(), d("div",
|
|
3490
|
-
|
|
3531
|
+
])) : w("", !0)
|
|
3532
|
+
], 64)) : (a(), d("div", Tn, [
|
|
3533
|
+
u(f, {
|
|
3491
3534
|
onInput: t[0] || (t[0] = (m) => i.onSelectType(m))
|
|
3492
3535
|
}),
|
|
3493
|
-
n.validator.$invalid && n.validator.$dirty ? (a(), A(
|
|
3536
|
+
n.validator.$invalid && n.validator.$dirty ? (a(), A(g, {
|
|
3494
3537
|
key: 0,
|
|
3495
3538
|
message: e.$t("error.selectType"),
|
|
3496
3539
|
style: { "padding-bottom": "calc(1.5 * var(--rem))" }
|
|
3497
|
-
}, null, 8, ["message"])) :
|
|
3540
|
+
}, null, 8, ["message"])) : w("", !0)
|
|
3498
3541
|
]))
|
|
3499
3542
|
]);
|
|
3500
3543
|
}
|
|
3501
|
-
const
|
|
3544
|
+
const Zn = /* @__PURE__ */ R(_n, [["render", Mn], ["__scopeId", "data-v-03549668"]]);
|
|
3502
3545
|
export {
|
|
3503
|
-
|
|
3546
|
+
Zn as default
|
|
3504
3547
|
};
|