@cling-se/widget 0.14.0 → 0.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AddClientCallout-C7BLDW6Y.js → AddClientCallout-DKH-LP5B.js} +3 -3
- package/dist/{AnswerModal-KWFteFV9.js → AnswerModal-BCbq8wc4.js} +3 -3
- package/dist/{AttachmentItem-CSerklBS.js → AttachmentItem-60CSZnkF.js} +2 -2
- package/dist/{BaseDatePicker-BOxfHGS8.js → BaseDatePicker-Cl8SnC1k.js} +481 -481
- package/dist/{BaseUpload-B-CktrCH.js → BaseUpload-D4FCjlhL.js} +14 -14
- package/dist/{BlockMedia-T4OxMb4n.js → BlockMedia-CqkwdGnE.js} +1 -1
- package/dist/{CCallout-yFt7TFJa.js → CCallout-BTBgU8f-.js} +2 -2
- package/dist/CCurrencyDropdown-CL32Mo-Y.js +246 -0
- package/dist/{CDropdownItem-DhEpCmQt.js → CDropdownItem-DlWtQwO6.js} +7 -5
- package/dist/{CFormField-DDLf5YY4.js → CFormField-BxJv-nUO.js} +1 -1
- package/dist/{CPhoneFormat-B88rkuf0.js → CPhoneFormat-CJ9kndtJ.js} +1 -1
- package/dist/CPriceInput-BpXI5X2j.js +112 -0
- package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +1 -0
- package/dist/{ClientAutocomplete-DmRl3SUj.js → ClientAutocomplete-D9Dj9iBW.js} +2 -2
- package/dist/{ClientModal-Dn3WDhGU.js → ClientModal-JOt8NGcR.js} +48 -40
- package/dist/{ColorPicker-DX6JAsTn.js → ColorPicker-uPKD-Gvm.js} +1 -1
- package/dist/{CompanyModal-BbO2nTd5.js → CompanyModal-7bG0iIRd.js} +4 -4
- package/dist/{ContentWrapper-BvbmcTXK.js → ContentWrapper-B2nyZHL4.js} +6 -6
- package/dist/{CoverBlockSettings-C8FDwx7i.js → CoverBlockSettings-C1O_FAde.js} +5 -5
- package/dist/{DocAnswer-OttbybQs.js → DocAnswer-B9G-y4Px.js} +2 -2
- package/dist/{DocDetails-J7O26zqa.js → DocDetails-DYHxKChO.js} +7 -7
- package/dist/{DocForm-Bgbesq79.js → DocForm-BktEXjML.js} +54 -53
- package/dist/{DocFormSend-D_U3ztgw.js → DocFormSend-DM6QgUOj.js} +2 -2
- package/dist/{DocLinks-Dp-iQ-B_.js → DocLinks-BIGwfB3H.js} +2 -2
- package/dist/{DocModalBase-F-wlPg7j.js → DocModalBase-D5GdwTI7.js} +1 -1
- package/dist/{DocPrint-B45voy0W.js → DocPrint-HqbaIGms.js} +11 -17
- package/dist/{DocReceipt-jKVK5U-a.js → DocReceipt-WXo6vWyW.js} +6 -6
- package/dist/{DocSendReminder-BersSNb1.js → DocSendReminder-C8dNEpLg.js} +1 -1
- package/dist/{DocTextEditor-CYe_jWZ8.js → DocTextEditor-BfOZFDTP.js} +281 -270
- package/dist/{DocTimeline-yyzh51yB.js → DocTimeline-CitwS9px.js} +1 -1
- package/dist/{DocumentClient-CS_EVjK9.js → DocumentClient-CQ_z8ajY.js} +5 -5
- package/dist/{DocumentLayout-Ba121Zro.js → DocumentLayout-BA7mFfZh.js} +4 -4
- package/dist/{DocumentLogotype-DUVhl9xC.js → DocumentLogotype-woc_hfll.js} +3 -3
- package/dist/{DocumentVoided-D5ePc-a5.js → DocumentVoided-DC4FzpxG.js} +1 -1
- package/dist/{EmbedInput-Ds-Z-0J2.js → EmbedInput-CheqYcNr.js} +2 -2
- package/dist/{EmbedSettings-C8BP4YuY.js → EmbedSettings-YcwM8hJw.js} +2 -2
- package/dist/{ErrorCallout-B_QrRAm6.js → ErrorCallout-6pCYcx00.js} +1 -1
- package/dist/{FilePreviewModal-B105PxLD.js → FilePreviewModal-T8AiphqO.js} +2 -2
- package/dist/{Flag-hg61To9C.js → Flag-Ddm6a4Il.js} +1 -1
- package/dist/{HeaderSettings-DIBiJc4I.js → HeaderSettings-DHdZweJH.js} +7 -7
- package/dist/{ImageSelectModal-D2g42vWJ.js → ImageSelectModal-CAoBhnI8.js} +3 -3
- package/dist/{ImageUploadWrapper-CREUMKh3.js → ImageUploadWrapper-CNv59Lhh.js} +2 -2
- package/dist/{Index-YkoWXviW.js → Index-B6S9U4Z-.js} +4 -4
- package/dist/{Index-DVQ6ZsHz.js → Index-BHX0D5fW.js} +5 -5
- package/dist/{Index-7rbX01Io.js → Index-BL_7m5Ca.js} +5 -5
- package/dist/{Index-Dqp7TmnQ.js → Index-BXMXEUfo.js} +32 -30
- package/dist/{Index-DRgVg0CH.js → Index-BhVBvMu6.js} +4 -4
- package/dist/{Index-CYHxrllv.js → Index-Bl_SNW80.js} +4 -4
- package/dist/{Index-BiK7PqAm.js → Index-BsguntKl.js} +2 -2
- package/dist/{Index-Dy7K8KMB.js → Index-CGYjPfsf.js} +590 -694
- package/dist/{Index-sltQx4D3.js → Index-CKrGb3of.js} +3 -3
- package/dist/{Index-Bu6aOCmM.js → Index-CMNrQo5a.js} +3 -3
- package/dist/{Index-kAu-7TWv.js → Index-CU50Al5c.js} +10 -10
- package/dist/{Index-DDj3_T_m.js → Index-CdqrrZxd.js} +4 -4
- package/dist/{Index-D0gS476H.js → Index-CfnL9dAw.js} +4 -4
- package/dist/{Index-BLQwYzIX.js → Index-CuW0MYrT.js} +6 -6
- package/dist/{Index-BG9x90V0.js → Index-D-z8JSn6.js} +5 -5
- package/dist/{Index-agYFtWMw.js → Index-D8giJ_bs.js} +6 -6
- package/dist/{Index-02IKjPth.js → Index-DDvfqy_h.js} +3 -3
- package/dist/{Index-CUxvKTfn.js → Index-DQDalqZ-.js} +5 -5
- package/dist/{Index-8DAfMA_s.js → Index-DTIPKKkV.js} +5 -5
- package/dist/{Index-BUTYZCat.js → Index-DWxzUBff.js} +2 -2
- package/dist/{Index-CwulQoRG.js → Index-DaNGeDQw.js} +8 -8
- package/dist/{Index-lKo8z-71.js → Index-DfLU_AyN.js} +3 -3
- package/dist/{Index-bTXYCG9Y.js → Index-DkVav_I7.js} +4 -4
- package/dist/{Index-B8xcDVQ1.js → Index-Dxp8QAtB.js} +5 -5
- package/dist/{Index-CpWW7m5F.js → Index-DzjxFkcv.js} +11 -13
- package/dist/{Index-CL12KArA.js → Index-EwUJJWaB.js} +22 -18
- package/dist/{Index-BZM-FsHY.js → Index-I60qAqLl.js} +1 -1
- package/dist/{Index-D_MonVUx.js → Index-LfF-7lQK.js} +13 -13
- package/dist/{Index-BqBi-EmE.js → Index-P0_dyc2V.js} +3 -3
- package/dist/{Index-4NdatdH2.js → Index-RQMPSeHw.js} +6 -6
- package/dist/{Index-DIg77V9c.js → Index-oipNLl3Y.js} +3 -3
- package/dist/{Index-C56fTFO3.js → Index-sJq2Iyvt.js} +4 -4
- package/dist/{Index-BuDj2yrd.js → Index-uubi3NHX.js} +4 -4
- package/dist/{Index-DeNpUKh8.js → Index-vNj2kYZT.js} +5 -5
- package/dist/{InputToggleRow-C7aWJpUF.js → InputToggleRow-B2pWvVyx.js} +1 -1
- package/dist/{ManualPopover-CK9Xp-mo.js → ManualPopover-BI_Sf1zG.js} +1 -1
- package/dist/{MediaWrapper-v87wlFnj.js → MediaWrapper-eFpWxv3n.js} +3 -3
- package/dist/{NotBindingText-BGy3SnK3.js → NotBindingText-DA5NpePz.js} +3 -3
- package/dist/{PackageGroup-CrsOkWIb.js → PackageGroup-DOSijBdN.js} +8 -8
- package/dist/{PdfTerms-UmEmlI0Y.js → PdfTerms-Q5YuVtrJ.js} +2 -2
- package/dist/{PdfViewer-C6VBu4tT.js → PdfViewer-zcWl8XZT.js} +3 -3
- package/dist/{PlainHtml-Dsaxrq3D.js → PlainHtml-BmA83UAm.js} +1 -1
- package/dist/{PriceHeader-DQ615L9Q.js → PriceHeader-C14L5zgG.js} +9 -9
- package/dist/{SearchApi-CbWFQfoc.js → SearchApi-CGT7-jVf.js} +2 -2
- package/dist/{Setup-Byd-0W7U.js → Setup-RJQvZlDO.js} +1 -1
- package/dist/{CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-DbBb6ZId.js → SmartList-YosKRPVn.js} +1 -1
- package/dist/{TermsSettings-Cah7_3Ba.js → TermsSettings-C5JTv7rT.js} +3 -3
- package/dist/{ThemeColorRow-DqsjvQfY.js → ThemeColorRow-D-C_tm2f.js} +3 -3
- package/dist/{ToggleBinding-DFr6xW2B.js → ToggleBinding-KEVHHvKf.js} +3 -3
- package/dist/{UploadModal-jRI9ITty.js → UploadModal-DOYoWELI.js} +2 -2
- package/dist/{VideoPlayerInput-C5_Ft8-4.js → VideoPlayerInput-Dxb6CNk-.js} +3 -3
- package/dist/{VideoPlayerSettings-LZluC-Tg.js → VideoPlayerSettings-DsVN4Ix-.js} +2 -2
- package/dist/{VideoSelectModal-OGDq_lwv.js → VideoSelectModal-BpfzNx61.js} +3 -3
- package/dist/{answerDocumentMixin-D8BXcPWt.js → answerDocumentMixin-BJMGrfUs.js} +3 -3
- package/dist/{debounce-BQXg61RJ.js → debounce-BN83gOVd.js} +11 -11
- package/dist/{focusDrawerMixin-D3Pzr0P-.js → focusDrawerMixin-CawyQaGq.js} +1 -1
- package/dist/{formComponentsInstall-D1VBPt9o.js → formComponentsInstall-jcnyQ1zw.js} +74 -76
- package/dist/{formDrawerState-wG6RdIXD.js → formDrawerState-BdNohvZH.js} +1 -1
- package/dist/{formValidationMixin-D9qFZJf9.js → formValidationMixin-DOwgebZk.js} +1 -1
- package/dist/{index-BEOnzeEr.js → index-BBJIOkm_.js} +5 -5
- package/dist/{index-1DmXjcSN.js → index-BNq9YCWc.js} +12 -12
- package/dist/{index-BFnwm62-.js → index-BdhbkLLU.js} +1 -1
- package/dist/{index-DETqm8Jy.js → index-COf8F6CL.js} +15 -18
- package/dist/{index-Dnp3LAf2.js → index-D0WvZHX_.js} +1 -1
- package/dist/{index-M-GXl2PO.js → index-DTzZP4yq.js} +20 -20
- package/dist/index.es.js +3 -3
- package/dist/index.umd.js +135 -143
- package/dist/{main-CWRB9q-W.js → main-DE5THsiR.js} +4228 -4195
- package/dist/{mapFormMixin-BOmDynJ-.js → mapFormMixin-y2txvLw9.js} +1 -1
- package/dist/omit-BrsWQAtU.js +31 -0
- package/dist/{publicSenderState-D_VhSyXD.js → publicSenderState-BYsq95Vt.js} +1 -1
- package/dist/style.css +2 -2
- package/dist/{throttle-Bixql7MZ.js → throttle-C2srA2wa.js} +2 -2
- package/dist/{tinycolor-CIjZZX-6.js → tinycolor-SjV_ROuP.js} +1 -1
- package/dist/tippy.esm-Dj7DQppr.js +1799 -0
- package/dist/{utils-1ypnMuRv.js → utils-16HMuRfY.js} +1 -1
- package/dist/{omit-CMqxXOLn.js → vuedraggable.umd-Cd1g2Hr7.js} +526 -554
- package/package.json +1 -1
- package/tsconfig.json +2 -2
- package/dist/BaseInput-BDjhI5P9.js +0 -364
- package/dist/tippy.esm-BcAHvKwR.js +0 -2039
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { m as y } from "./mapFormMixin-
|
|
2
|
-
import { E as
|
|
3
|
-
import { aF as
|
|
1
|
+
import { m as y } from "./mapFormMixin-y2txvLw9.js";
|
|
2
|
+
import { E as P } from "./ErrorCallout-6pCYcx00.js";
|
|
3
|
+
import { aF as L, aG as S, aH as E, aI as z, aJ as B, aK as W, k as F, aL as j, n as u, g as p, w as k, aC as N, aM as w, aN as H, r as C, an as f, ae as q, aO as U, ao as G, aP as K, aQ as Y, aR as T, p as Z, b as o, T as g, z as J, B as Q, aS as X, t as ee, a6 as te } from "./main-DE5THsiR.js";
|
|
4
4
|
import { m as h, a as v } from "./vuex.esm-DKGl8mcw.js";
|
|
5
|
-
import { T as
|
|
6
|
-
import { W as
|
|
7
|
-
import { o as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
const
|
|
5
|
+
import { T as ie } from "./DocTextEditor-BfOZFDTP.js";
|
|
6
|
+
import { W as se } from "./DocumentLayout-BA7mFfZh.js";
|
|
7
|
+
import { o as V } from "./omit-BrsWQAtU.js";
|
|
8
|
+
import { d as ae } from "./vuedraggable.umd-Cd1g2Hr7.js";
|
|
9
|
+
import { C as x } from "./CPriceInput-BpXI5X2j.js";
|
|
10
|
+
import { S as ne } from "./SearchApi-CGT7-jVf.js";
|
|
11
|
+
import { v as re } from "./index-DTzZP4yq.js";
|
|
12
|
+
import { w as oe } from "./CDropdownItem-DlWtQwO6.js";
|
|
13
|
+
const ce = [
|
|
14
14
|
"unit",
|
|
15
15
|
"m2",
|
|
16
16
|
"hour",
|
|
@@ -27,41 +27,41 @@ const de = [
|
|
|
27
27
|
"year",
|
|
28
28
|
"kWh"
|
|
29
29
|
];
|
|
30
|
-
function
|
|
30
|
+
function le() {
|
|
31
31
|
}
|
|
32
|
-
var
|
|
33
|
-
return new
|
|
34
|
-
} :
|
|
35
|
-
function
|
|
36
|
-
var
|
|
32
|
+
var ue = le, b = L, de = ue, pe = S, he = 1 / 0, me = b && 1 / pe(new b([, -0]))[1] == he ? function(s) {
|
|
33
|
+
return new b(s);
|
|
34
|
+
} : de, fe = me, ve = E, ge = z, ye = B, _e = W, ke = fe, $e = S, xe = 200;
|
|
35
|
+
function be(s, e, t) {
|
|
36
|
+
var i = -1, n = ge, a = s.length, r = !0, c = [], l = c;
|
|
37
37
|
if (t)
|
|
38
|
-
r = !1, n =
|
|
39
|
-
else if (a >=
|
|
40
|
-
var _ = e ? null :
|
|
38
|
+
r = !1, n = ye;
|
|
39
|
+
else if (a >= xe) {
|
|
40
|
+
var _ = e ? null : ke(s);
|
|
41
41
|
if (_)
|
|
42
|
-
return
|
|
43
|
-
r = !1, n =
|
|
42
|
+
return $e(_);
|
|
43
|
+
r = !1, n = _e, l = new ve();
|
|
44
44
|
} else
|
|
45
|
-
|
|
45
|
+
l = e ? [] : c;
|
|
46
46
|
e:
|
|
47
|
-
for (; ++
|
|
48
|
-
var d = i
|
|
47
|
+
for (; ++i < a; ) {
|
|
48
|
+
var d = s[i], m = e ? e(d) : d;
|
|
49
49
|
if (d = t || d !== 0 ? d : 0, r && m === m) {
|
|
50
|
-
for (var I =
|
|
51
|
-
if (
|
|
50
|
+
for (var I = l.length; I--; )
|
|
51
|
+
if (l[I] === m)
|
|
52
52
|
continue e;
|
|
53
|
-
e &&
|
|
53
|
+
e && l.push(m), c.push(d);
|
|
54
54
|
} else
|
|
55
|
-
n(
|
|
55
|
+
n(l, m, t) || (l !== c && l.push(m), c.push(d));
|
|
56
56
|
}
|
|
57
57
|
return c;
|
|
58
58
|
}
|
|
59
|
-
var
|
|
60
|
-
function
|
|
61
|
-
return
|
|
59
|
+
var we = be, Ce = j, Te = we;
|
|
60
|
+
function Ie(s, e) {
|
|
61
|
+
return s && s.length ? Te(s, Ce(e)) : [];
|
|
62
62
|
}
|
|
63
|
-
var
|
|
64
|
-
const
|
|
63
|
+
var Ae = Ie;
|
|
64
|
+
const Pe = /* @__PURE__ */ F(Ae), Se = {
|
|
65
65
|
name: "PackageGroupSelect",
|
|
66
66
|
i18nOptions: {
|
|
67
67
|
namespaces: "PackageGroupSelect",
|
|
@@ -128,147 +128,41 @@ const De = /* @__PURE__ */ j(Ve), Re = {
|
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
|
-
var
|
|
131
|
+
var Ve = function() {
|
|
132
132
|
var e = this, t = e._self._c;
|
|
133
|
-
return t("div", { staticClass: "font-inter", staticStyle: { padding: "calc(2 * var(--rem)) 0 calc(1 * var(--rem)) 0", color: "#111" } }, [t("div", { staticStyle: { "font-size": "18px", "font-weight": "600", "text-align": "center", "margin-bottom": "calc(1.5 * var(--rem))" } }, [e._v(" " + e._s(e.$t("title")) + " ")]), t("div", [t("div", { staticClass: "options", class: { "is-700-or-less": e.parentSize.width <= 700 } }, e._l(e.options, function(
|
|
134
|
-
return t("div", { key: n, staticClass: "package-group-option", style: { backgroundColor:
|
|
135
|
-
return e.$emit("input",
|
|
136
|
-
} } }, [t("div", { staticClass: "package-group-option__illustration" }, [
|
|
133
|
+
return t("div", { staticClass: "font-inter", staticStyle: { padding: "calc(2 * var(--rem)) 0 calc(1 * var(--rem)) 0", color: "#111" } }, [t("div", { staticStyle: { "font-size": "18px", "font-weight": "600", "text-align": "center", "margin-bottom": "calc(1.5 * var(--rem))" } }, [e._v(" " + e._s(e.$t("title")) + " ")]), t("div", [t("div", { staticClass: "options", class: { "is-700-or-less": e.parentSize.width <= 700 } }, e._l(e.options, function(i, n) {
|
|
134
|
+
return t("div", { key: n, staticClass: "package-group-option", style: { backgroundColor: i.background }, on: { click: function(a) {
|
|
135
|
+
return e.$emit("input", i.value);
|
|
136
|
+
} } }, [t("div", { staticClass: "package-group-option__illustration" }, [i.value === "single" ? t("div", { staticClass: "package-group-option__illustration-card animate" }, [e._m(0, !0)]) : e._e(), i.value === "radio" ? e._l(3, function(a) {
|
|
137
137
|
return t("div", { key: a, staticClass: "package-group-option__illustration-card", class: { animate: a === 2 } }, [t("div", { staticStyle: { width: "8px", height: "8px", "border-radius": "50%", "margin-right": "10px" }, style: a === 2 && {
|
|
138
|
-
boxShadow: `0 0 0 1px white, 0 0 0 2px ${
|
|
139
|
-
backgroundColor:
|
|
138
|
+
boxShadow: `0 0 0 1px white, 0 0 0 2px ${i.background}`,
|
|
139
|
+
backgroundColor: i.background
|
|
140
140
|
} }), e._m(1, !0)]);
|
|
141
|
-
}) : e._e(),
|
|
142
|
-
return t("div", { key: a, staticClass: "package-group-option__illustration-card", class: { animate: a !== 3 } }, [t("div", { staticStyle: { 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" }, style: a !== 3 && { backgroundColor:
|
|
143
|
-
}) : e._e()], 2), t("div", [t("div", { staticClass: "package-group-option__title" }, [e._v(" " + e._s(
|
|
141
|
+
}) : e._e(), i.value === "checkbox" ? e._l(3, function(a) {
|
|
142
|
+
return t("div", { key: a, staticClass: "package-group-option__illustration-card", class: { animate: a !== 3 } }, [t("div", { staticStyle: { 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" }, style: a !== 3 && { backgroundColor: i.background } }, [t("CIcon", { attrs: { type: a !== 3 ? "check" : "empty", "stroke-width": "5", size: "8" } })], 1), e._m(2, !0)]);
|
|
143
|
+
}) : e._e()], 2), t("div", [t("div", { staticClass: "package-group-option__title" }, [e._v(" " + e._s(i.title) + " ")]), t("div", { staticClass: "package-group-option__subtitle", domProps: { innerHTML: e._s(i.subTitle) } })])]);
|
|
144
144
|
}), 0)])]);
|
|
145
|
-
},
|
|
146
|
-
var
|
|
145
|
+
}, Re = [function() {
|
|
146
|
+
var s = this, e = s._self._c;
|
|
147
147
|
return e("div", { staticStyle: { flex: "1 1 auto" } }, [e("div", { staticClass: "bg-gray-100", staticStyle: { width: "40%", height: "10px", "margin-bottom": "8px" } }), e("div", { staticClass: "bg-gray-100", staticStyle: { width: "80%", height: "10px" } })]);
|
|
148
148
|
}, function() {
|
|
149
|
-
var
|
|
149
|
+
var s = this, e = s._self._c;
|
|
150
150
|
return e("div", { staticStyle: { flex: "1 1 auto" } }, [e("div", { staticClass: "bg-gray-100", staticStyle: { width: "40%", height: "10px", "margin-bottom": "8px" } }), e("div", { staticClass: "bg-gray-100", staticStyle: { width: "80%", height: "10px" } })]);
|
|
151
151
|
}, function() {
|
|
152
|
-
var
|
|
152
|
+
var s = this, e = s._self._c;
|
|
153
153
|
return e("div", { staticStyle: { flex: "1 1 auto" } }, [e("div", { staticClass: "bg-gray-100", staticStyle: { width: "40%", height: "10px", "margin-bottom": "8px" } }), e("div", { staticClass: "bg-gray-100", staticStyle: { width: "80%", height: "10px" } })]);
|
|
154
|
-
}],
|
|
154
|
+
}], De = /* @__PURE__ */ u(
|
|
155
|
+
Se,
|
|
156
|
+
Ve,
|
|
155
157
|
Re,
|
|
156
|
-
Oe,
|
|
157
|
-
Le,
|
|
158
158
|
!1,
|
|
159
159
|
null,
|
|
160
160
|
"b67c5afd"
|
|
161
161
|
);
|
|
162
|
-
const
|
|
163
|
-
name: "CPriceInput",
|
|
164
|
-
components: {
|
|
165
|
-
CInput: H,
|
|
166
|
-
CCurrencyDropdown: oe
|
|
167
|
-
},
|
|
168
|
-
props: {
|
|
169
|
-
value: {
|
|
170
|
-
type: Number,
|
|
171
|
-
default: 0
|
|
172
|
-
},
|
|
173
|
-
currency: {
|
|
174
|
-
type: String,
|
|
175
|
-
required: !0
|
|
176
|
-
},
|
|
177
|
-
priceType: {
|
|
178
|
-
type: String,
|
|
179
|
-
default: "fixed",
|
|
180
|
-
validator: (i) => ["fixed", "markup", "openAcc", "approx"].includes(i)
|
|
181
|
-
},
|
|
182
|
-
unitLabel: {
|
|
183
|
-
type: String,
|
|
184
|
-
default: ""
|
|
185
|
-
},
|
|
186
|
-
isIncVat: {
|
|
187
|
-
type: Boolean,
|
|
188
|
-
default: !1
|
|
189
|
-
},
|
|
190
|
-
// Vat in percentage
|
|
191
|
-
vat: {
|
|
192
|
-
type: Number,
|
|
193
|
-
default: null
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
|
-
data() {
|
|
197
|
-
return {
|
|
198
|
-
isCurrencyDropdownOpen: !1
|
|
199
|
-
};
|
|
200
|
-
},
|
|
201
|
-
computed: {
|
|
202
|
-
internalValue: {
|
|
203
|
-
get() {
|
|
204
|
-
if (!Number.isNaN(parseFloat(this.value)) && Number.isFinite(this.value)) {
|
|
205
|
-
if (!this.value && !this.showZero)
|
|
206
|
-
return "";
|
|
207
|
-
let i = this.value;
|
|
208
|
-
return this.isIncVat && (i *= (100 + this.vat) / 100), Math.round(i) / 100;
|
|
209
|
-
}
|
|
210
|
-
return this.value;
|
|
211
|
-
},
|
|
212
|
-
set(i) {
|
|
213
|
-
let e = i;
|
|
214
|
-
e = i * 100, this.isIncVat && (e /= (100 + this.vat) / 100), e = Math.round(e), this.$emit("input", e);
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
internalCurrency: {
|
|
218
|
-
get() {
|
|
219
|
-
return this.currency;
|
|
220
|
-
},
|
|
221
|
-
set(i) {
|
|
222
|
-
this.$emit("update:currency", i);
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
suffixValue() {
|
|
226
|
-
const i = b(this.internalCurrency);
|
|
227
|
-
switch (this.priceType) {
|
|
228
|
-
case "openAcc":
|
|
229
|
-
return `${i}/${this.unitLabel || this.$t("_common:unitType.unit")}`;
|
|
230
|
-
case "markup":
|
|
231
|
-
return "%";
|
|
232
|
-
default:
|
|
233
|
-
return i;
|
|
234
|
-
}
|
|
235
|
-
},
|
|
236
|
-
showCurrencyDropdown() {
|
|
237
|
-
return !["markup"].includes(this.priceType);
|
|
238
|
-
},
|
|
239
|
-
eventListeners() {
|
|
240
|
-
return { ...this.$listeners, onInput: () => ({}), input: () => ({}) };
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
methods: {
|
|
244
|
-
focus() {
|
|
245
|
-
this.$refs.priceInput && typeof this.$refs.priceInput.focus == "function" && this.$refs.priceInput.focus();
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
};
|
|
249
|
-
var Be = function() {
|
|
250
|
-
var e = this, t = e._self._c;
|
|
251
|
-
return t("CInput", e._g(e._b({ key: e.internalCurrency + e.priceType, ref: "priceInput", style: e.isCurrencyDropdownOpen && { zIndex: 99 }, attrs: { size: e.$attrs.size, placeholder: e.$attrs.placeholder, type: "number" }, model: { value: e.internalValue, callback: function(s) {
|
|
252
|
-
e.internalValue = s;
|
|
253
|
-
}, expression: "internalValue" } }, "CInput", { ...e.$attrs, ...e.$props }, !1), e.eventListeners), [e.$slots.suffix ? t("div", [e._t("suffix")], 2) : t("template", { slot: "suffix" }, [e.showCurrencyDropdown ? t("CCurrencyDropdown", { on: { "active-change": function(s) {
|
|
254
|
-
e.isCurrencyDropdownOpen = s;
|
|
255
|
-
} }, scopedSlots: e._u([{ key: "default", fn: function({ selectedValue: s }) {
|
|
256
|
-
return [t("CButton", { staticClass: "is-thinner", staticStyle: { "padding-left": "0.5em", "padding-right": "0.5em", "border-radius": "0.25em" }, attrs: { size: e.$attrs.size, type: "none", pattern: "tertiary" } }, [e._v(" " + e._s(s) + " ")])];
|
|
257
|
-
} }], null, !1, 1723986040), model: { value: e.internalCurrency, callback: function(s) {
|
|
258
|
-
e.internalCurrency = s;
|
|
259
|
-
}, expression: "internalCurrency" } }) : t("div", [e._v(e._s(e.suffixValue))])], 1)], 2);
|
|
260
|
-
}, We = [], Fe = /* @__PURE__ */ l(
|
|
261
|
-
ze,
|
|
262
|
-
Be,
|
|
263
|
-
We,
|
|
264
|
-
!1,
|
|
265
|
-
null,
|
|
266
|
-
null
|
|
267
|
-
);
|
|
268
|
-
const D = Fe.exports, je = {
|
|
162
|
+
const Oe = De.exports, Me = {
|
|
269
163
|
name: "ArticleAutocomplete",
|
|
270
164
|
components: {
|
|
271
|
-
SearchApi:
|
|
165
|
+
SearchApi: ne
|
|
272
166
|
},
|
|
273
167
|
mixins: [y([])],
|
|
274
168
|
props: {
|
|
@@ -299,23 +193,23 @@ const D = Fe.exports, je = {
|
|
|
299
193
|
ids: "articles/articleIdList"
|
|
300
194
|
}),
|
|
301
195
|
whiteList() {
|
|
302
|
-
const
|
|
196
|
+
const s = [];
|
|
303
197
|
if (this.$refs.dropdown !== void 0) {
|
|
304
198
|
const e = this.$refs.dropdown.querySelectorAll("*");
|
|
305
199
|
for (const t of e)
|
|
306
|
-
|
|
200
|
+
s.push(t);
|
|
307
201
|
}
|
|
308
202
|
if (this.$refs.input !== void 0) {
|
|
309
203
|
const e = this.$refs.input.$el.querySelectorAll("*");
|
|
310
204
|
for (const t of e)
|
|
311
|
-
|
|
205
|
+
s.push(t);
|
|
312
206
|
}
|
|
313
|
-
return
|
|
207
|
+
return s;
|
|
314
208
|
}
|
|
315
209
|
},
|
|
316
210
|
watch: {
|
|
317
|
-
searchResults(
|
|
318
|
-
|
|
211
|
+
searchResults(s, e) {
|
|
212
|
+
s.length !== e.length && (this.selectedIndex = 0);
|
|
319
213
|
}
|
|
320
214
|
},
|
|
321
215
|
created() {
|
|
@@ -331,13 +225,13 @@ const D = Fe.exports, je = {
|
|
|
331
225
|
loadArticles: p.LOAD_ARTICLES
|
|
332
226
|
}),
|
|
333
227
|
priceFormat: k,
|
|
334
|
-
search(
|
|
335
|
-
this.$emit("input", e), !this.viewSettings.isPublicForm &&
|
|
228
|
+
search(s, e) {
|
|
229
|
+
this.$emit("input", e), !this.viewSettings.isPublicForm && s({
|
|
336
230
|
q: e,
|
|
337
|
-
cb: ({ article: t = [], extensionArticle:
|
|
231
|
+
cb: ({ article: t = [], extensionArticle: i = [] }) => {
|
|
338
232
|
this.searchResults = [
|
|
339
233
|
...t.sort((n, a) => n.usedTimes > a.usedTimes ? -1 : 1),
|
|
340
|
-
...
|
|
234
|
+
...i
|
|
341
235
|
], !this.isOpen && this.searchResults.length && this.showResults();
|
|
342
236
|
}
|
|
343
237
|
});
|
|
@@ -346,11 +240,11 @@ const D = Fe.exports, je = {
|
|
|
346
240
|
focus() {
|
|
347
241
|
this.$refs.input.focus();
|
|
348
242
|
},
|
|
349
|
-
onFocus(
|
|
350
|
-
this.isFocus = !0, this.$emit("focus",
|
|
243
|
+
onFocus(s) {
|
|
244
|
+
this.isFocus = !0, this.$emit("focus", s);
|
|
351
245
|
},
|
|
352
|
-
onBlur(
|
|
353
|
-
this.isFocus = !1, this.$emit("blur",
|
|
246
|
+
onBlur(s) {
|
|
247
|
+
this.isFocus = !1, this.$emit("blur", s);
|
|
354
248
|
},
|
|
355
249
|
showResults() {
|
|
356
250
|
this.isOpen = !0;
|
|
@@ -358,15 +252,15 @@ const D = Fe.exports, je = {
|
|
|
358
252
|
hideResults() {
|
|
359
253
|
this.isOpen = !1;
|
|
360
254
|
},
|
|
361
|
-
onSelect(
|
|
362
|
-
this.$emit("select",
|
|
255
|
+
onSelect(s) {
|
|
256
|
+
this.$emit("select", s), this.hideResults(), this.$refs.input && this.$refs.input.blur();
|
|
363
257
|
},
|
|
364
|
-
onClickOutside(
|
|
365
|
-
this.whiteList.indexOf(
|
|
258
|
+
onClickOutside(s) {
|
|
259
|
+
this.whiteList.indexOf(s.target) < 0 && this.hideResults();
|
|
366
260
|
},
|
|
367
|
-
onKeydown({ keyCode:
|
|
261
|
+
onKeydown({ keyCode: s }) {
|
|
368
262
|
if (this.isOpen) {
|
|
369
|
-
switch (
|
|
263
|
+
switch (s) {
|
|
370
264
|
case 38:
|
|
371
265
|
this.selectedIndex > 0 && this.selectedIndex--;
|
|
372
266
|
break;
|
|
@@ -387,18 +281,18 @@ const D = Fe.exports, je = {
|
|
|
387
281
|
}
|
|
388
282
|
}
|
|
389
283
|
};
|
|
390
|
-
var
|
|
284
|
+
var Le = function() {
|
|
391
285
|
var e = this, t = e._self._c;
|
|
392
|
-
return t("div", { class: { "is-open": e.isOpen }, staticStyle: { position: "relative" }, on: { "&keydown": function(
|
|
286
|
+
return t("div", { class: { "is-open": e.isOpen }, staticStyle: { position: "relative" }, on: { "&keydown": function(i) {
|
|
393
287
|
return e.onKeydown.apply(null, arguments);
|
|
394
288
|
} } }, [t("SearchApi", { attrs: { "custom-search": {
|
|
395
289
|
article: !0,
|
|
396
290
|
extensionArticle: !0,
|
|
397
291
|
project: !1,
|
|
398
292
|
user: !1
|
|
399
|
-
} }, scopedSlots: e._u([{ key: "default", fn: function({ fetch:
|
|
293
|
+
} }, scopedSlots: e._u([{ key: "default", fn: function({ fetch: i }) {
|
|
400
294
|
return [t("CInput", e._b({ ref: "input", staticClass: "r-input", attrs: { value: e.value, type: e.tag, "auto-resize": !0 }, on: { input: function(n) {
|
|
401
|
-
return e.search(
|
|
295
|
+
return e.search(i, n);
|
|
402
296
|
}, focus: e.onFocus, blur: e.onBlur }, nativeOn: { keydown: [function(n) {
|
|
403
297
|
return !n.type.indexOf("key") && e._k(n.keyCode, "tab", 9, n.key, "Tab") ? null : e.hideResults.apply(null, arguments);
|
|
404
298
|
}, function(n) {
|
|
@@ -407,76 +301,76 @@ var Ne = function() {
|
|
|
407
301
|
...e.$attrs,
|
|
408
302
|
...e.$props
|
|
409
303
|
}, !1), [e._t("prefix", null, { slot: "prefix" }), e._t("suffix", null, { slot: "suffix" })], 2)];
|
|
410
|
-
} }], null, !0) }), e.isOpen ? t("div", { ref: "dropdown", staticClass: "r-container" }, e._l(e.searchResults, function(
|
|
304
|
+
} }], null, !0) }), e.isOpen ? t("div", { ref: "dropdown", staticClass: "r-container" }, e._l(e.searchResults, function(i, n) {
|
|
411
305
|
return t("div", { key: n, staticClass: "r-item", class: { active: e.selectedIndex === n }, on: { "!click": function(a) {
|
|
412
|
-
return a.stopPropagation(), e.onSelect(
|
|
413
|
-
} } }, [t("div", { staticClass: "r-item-title truncate-text" }, [e._v(e._s(
|
|
306
|
+
return a.stopPropagation(), e.onSelect(i);
|
|
307
|
+
} } }, [t("div", { staticClass: "r-item-title truncate-text" }, [e._v(e._s(i.name))]), t("div", { staticClass: "r-item-details" }, [i.externalReference && i.externalReference.service ? t("div", { staticStyle: { width: "18px", height: "18px", "border-radius": "2px", "background-color": "hsl(0, 0%, 60%)", display: "inline-flex", "justify-content": "center", "align-items": "center" } }, [t("CIcon", { staticStyle: { color: "white" }, attrs: { type: i.externalReference.service, size: "14" } })], 1) : e._e(), i.article_no ? t("div", [e._v(e._s(i.article_no))]) : e._e(), i.price ? t("div", [e._v(" " + e._s(e.priceFormat(i.price, { currency: i.currency })) + " ")]) : e._e(), i.vat ? t("div", [e._v(" " + e._s(e.$t("vat.sharedTitle").capitalize()) + " " + e._s(i.vat) + "% ")]) : e._e()]), e.selectedIndex === n ? t("div", { staticClass: "r-item-icon" }, [t("CIcon", { attrs: { type: "corner-down-left", size: "16" } })], 1) : e._e()]);
|
|
414
308
|
}), 0) : e._e()], 1);
|
|
415
|
-
},
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
309
|
+
}, Ee = [], ze = /* @__PURE__ */ u(
|
|
310
|
+
Me,
|
|
311
|
+
Le,
|
|
312
|
+
Ee,
|
|
419
313
|
!1,
|
|
420
314
|
null,
|
|
421
315
|
"d068ad40"
|
|
422
316
|
);
|
|
423
|
-
const R =
|
|
317
|
+
const R = ze.exports, A = {
|
|
424
318
|
isDeductable: !1,
|
|
425
319
|
isRut: !1,
|
|
426
320
|
greenRot15: !1,
|
|
427
321
|
greenRot20: !1,
|
|
428
322
|
greenRot50: !1
|
|
429
|
-
}, $ = (
|
|
430
|
-
let
|
|
431
|
-
...
|
|
323
|
+
}, $ = (s, e = "", t) => {
|
|
324
|
+
let i = {
|
|
325
|
+
...s,
|
|
432
326
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
433
327
|
// Trigger updatedAt as it us used to decide which houseWork to prioritize
|
|
434
328
|
};
|
|
435
|
-
return typeof t < "u" && (
|
|
436
|
-
...
|
|
437
|
-
...
|
|
329
|
+
return typeof t < "u" && (i[t] = e), Object.keys(A).includes(t) && e && (i = {
|
|
330
|
+
...i,
|
|
331
|
+
...A,
|
|
438
332
|
[t]: !0
|
|
439
|
-
}),
|
|
440
|
-
},
|
|
441
|
-
stored:
|
|
333
|
+
}), N(i.quantity) !== "number" && (i.quantity = 0), w(i);
|
|
334
|
+
}, D = ({
|
|
335
|
+
stored: s,
|
|
442
336
|
current: e,
|
|
443
337
|
hidePrice: t = !1,
|
|
444
|
-
activeHouseWorkType:
|
|
338
|
+
activeHouseWorkType: i
|
|
445
339
|
}) => {
|
|
446
|
-
let n =
|
|
447
|
-
...
|
|
340
|
+
let n = H({
|
|
341
|
+
...s,
|
|
448
342
|
quantity: 1,
|
|
449
343
|
showPrice: !t,
|
|
450
344
|
id: null,
|
|
451
|
-
ArticleId:
|
|
345
|
+
ArticleId: s.id,
|
|
452
346
|
packageId: e.packageId
|
|
453
347
|
});
|
|
454
|
-
if (
|
|
455
|
-
const a = (
|
|
456
|
-
|
|
348
|
+
if (i) {
|
|
349
|
+
const a = (l = []) => l.reduce((_, d) => ({ ..._, [d]: !1 }), {}), c = Object.values(
|
|
350
|
+
V({
|
|
457
351
|
rot: "isDeductable",
|
|
458
352
|
rut: "isRut",
|
|
459
353
|
greenRot15: "greenRot15",
|
|
460
354
|
greenRot20: "greenRot20",
|
|
461
355
|
greenRot50: "greenRot50"
|
|
462
|
-
}, [
|
|
356
|
+
}, [i])
|
|
463
357
|
);
|
|
464
|
-
c.some((
|
|
358
|
+
c.some((l) => !!n[l]) && (n = { ...n, ...a(c) });
|
|
465
359
|
}
|
|
466
360
|
return n;
|
|
467
|
-
},
|
|
468
|
-
const t =
|
|
469
|
-
switch (
|
|
361
|
+
}, Be = (s, e = null) => {
|
|
362
|
+
const t = C(s.currency, e);
|
|
363
|
+
switch (s.priceType) {
|
|
470
364
|
case "approx":
|
|
471
|
-
return `${
|
|
365
|
+
return `${q.t("_common:approx")} ${t}`;
|
|
472
366
|
case "openAcc":
|
|
473
|
-
return `${t}/${f(
|
|
367
|
+
return `${t}/${f(s.unitType)}`;
|
|
474
368
|
case "markup":
|
|
475
369
|
return "%";
|
|
476
370
|
default:
|
|
477
371
|
return t;
|
|
478
372
|
}
|
|
479
|
-
},
|
|
373
|
+
}, O = {
|
|
480
374
|
en: {
|
|
481
375
|
namePlaceholder: "Service or product name",
|
|
482
376
|
openModalTooltip: "Edit amount and unit",
|
|
@@ -524,20 +418,20 @@ const R = qe.exports, T = {
|
|
|
524
418
|
}, M = {
|
|
525
419
|
article: {
|
|
526
420
|
name: {
|
|
527
|
-
maxLength:
|
|
421
|
+
maxLength: re.maxLength(255)
|
|
528
422
|
}
|
|
529
423
|
}
|
|
530
|
-
},
|
|
424
|
+
}, We = {
|
|
531
425
|
// eslint-disable-next-line vue/no-reserved-component-names
|
|
532
426
|
name: "Article",
|
|
533
427
|
i18nOptions: {
|
|
534
428
|
namespaces: "Article",
|
|
535
|
-
messages:
|
|
429
|
+
messages: O
|
|
536
430
|
},
|
|
537
431
|
components: {
|
|
538
|
-
ErrorCallout:
|
|
432
|
+
ErrorCallout: P,
|
|
539
433
|
ArticleAutocomplete: R,
|
|
540
|
-
CPriceInput:
|
|
434
|
+
CPriceInput: x
|
|
541
435
|
},
|
|
542
436
|
props: {
|
|
543
437
|
// Article object
|
|
@@ -584,7 +478,7 @@ const R = qe.exports, T = {
|
|
|
584
478
|
data() {
|
|
585
479
|
return {
|
|
586
480
|
updateData: $,
|
|
587
|
-
addSavedArticle:
|
|
481
|
+
addSavedArticle: D,
|
|
588
482
|
articleUnitLabel: f,
|
|
589
483
|
widthCompact: 580,
|
|
590
484
|
visualDisable: !1
|
|
@@ -595,27 +489,27 @@ const R = qe.exports, T = {
|
|
|
595
489
|
get() {
|
|
596
490
|
return this.value || {};
|
|
597
491
|
},
|
|
598
|
-
set(
|
|
599
|
-
this.$emit("input",
|
|
492
|
+
set(s) {
|
|
493
|
+
this.$emit("input", s);
|
|
600
494
|
}
|
|
601
495
|
},
|
|
602
496
|
details() {
|
|
603
|
-
const
|
|
497
|
+
const s = [], {
|
|
604
498
|
priceType: e,
|
|
605
499
|
quantity: t,
|
|
606
|
-
unitType:
|
|
500
|
+
unitType: i,
|
|
607
501
|
price: n,
|
|
608
502
|
vat: a,
|
|
609
503
|
discount: r,
|
|
610
504
|
discountType: c
|
|
611
505
|
} = this.article;
|
|
612
|
-
if (e !== "fixed" &&
|
|
613
|
-
const
|
|
614
|
-
|
|
615
|
-
title: this.$t(`_common:deduction.${
|
|
506
|
+
if (e !== "fixed" && s.push({ title: this.$t(`priceTypeShort.${e}`) }), U(this.article)) {
|
|
507
|
+
const l = G(this.article);
|
|
508
|
+
s.push({
|
|
509
|
+
title: this.$t(`_common:deduction.${l}_percentage`)
|
|
616
510
|
});
|
|
617
511
|
}
|
|
618
|
-
return t && ["fixed", "approx"].includes(e) && (
|
|
512
|
+
return t && ["fixed", "approx"].includes(e) && (i !== "unit" || t > 1) && s.push({
|
|
619
513
|
title: f(this.article.unitType, {
|
|
620
514
|
count: t,
|
|
621
515
|
includeCount: !0
|
|
@@ -630,18 +524,18 @@ const R = qe.exports, T = {
|
|
|
630
524
|
hideZeroDecimals: !0
|
|
631
525
|
})
|
|
632
526
|
}
|
|
633
|
-
}), r &&
|
|
527
|
+
}), r && s.push({
|
|
634
528
|
title: "-" + (c === "fixed" ? k(r, {
|
|
635
529
|
withVat: this.isIncVat ? a : !1,
|
|
636
530
|
currency: this.article.currency
|
|
637
531
|
}) : `${r / 100} %`),
|
|
638
532
|
detailClass: "discount"
|
|
639
|
-
}),
|
|
533
|
+
}), s;
|
|
640
534
|
}
|
|
641
535
|
},
|
|
642
536
|
methods: {
|
|
643
|
-
updateArticle(
|
|
644
|
-
this.article = $(this.article,
|
|
537
|
+
updateArticle(s, e) {
|
|
538
|
+
this.article = $(this.article, s, e);
|
|
645
539
|
},
|
|
646
540
|
onTotalPriceInputFocus() {
|
|
647
541
|
(this.article.discount || this.article.quantity !== 1) && this.$emit("open-modal", { focusEl: "priceInput" });
|
|
@@ -649,28 +543,28 @@ const R = qe.exports, T = {
|
|
|
649
543
|
focusName() {
|
|
650
544
|
this.$refs.name.focus();
|
|
651
545
|
},
|
|
652
|
-
errorMessage(
|
|
653
|
-
return
|
|
546
|
+
errorMessage(s) {
|
|
547
|
+
return s.$error && s.article.name.$error && !s.article.name.maxLength ? this.$t("validations.name.maxLength") : null;
|
|
654
548
|
}
|
|
655
549
|
}
|
|
656
550
|
};
|
|
657
|
-
var
|
|
551
|
+
var Fe = function() {
|
|
658
552
|
var e = this, t = e._self._c;
|
|
659
553
|
return t("div", { staticClass: "article-wrapper", class: {
|
|
660
554
|
"has-details": e.details.length,
|
|
661
555
|
compact: e.width <= e.widthCompact,
|
|
662
556
|
"show-controls": !e.hideControls
|
|
663
|
-
}, on: { keydown: function(
|
|
664
|
-
return !
|
|
665
|
-
} } }, [t("div", { staticClass: "top-row flex w-full" }, [t("ArticleAutocomplete", { ref: "name", staticClass: "article-name-wrapper article-input-wrapper form-control form-control-left", attrs: { value: e.article.name, placeholder: e.$t("namePlaceholder"), size: "large" }, on: { input: function(
|
|
666
|
-
return e.updateArticle(
|
|
667
|
-
}, focus: function(
|
|
557
|
+
}, on: { keydown: function(i) {
|
|
558
|
+
return !i.type.indexOf("key") && e._k(i.keyCode, "esc", 27, i.key, ["Esc", "Escape"]) ? null : e.$emit("esc");
|
|
559
|
+
} } }, [t("div", { staticClass: "top-row flex w-full" }, [t("ArticleAutocomplete", { ref: "name", staticClass: "article-name-wrapper article-input-wrapper form-control form-control-left", attrs: { value: e.article.name, placeholder: e.$t("namePlaceholder"), size: "large" }, on: { input: function(i) {
|
|
560
|
+
return e.updateArticle(i, "name");
|
|
561
|
+
}, focus: function(i) {
|
|
668
562
|
return e.$emit("focus");
|
|
669
|
-
}, select: function(
|
|
563
|
+
}, select: function(i) {
|
|
670
564
|
e.$emit(
|
|
671
565
|
"input",
|
|
672
566
|
e.addSavedArticle({
|
|
673
|
-
stored:
|
|
567
|
+
stored: i,
|
|
674
568
|
current: e.article,
|
|
675
569
|
hidePrice: e.hidePriceOnNew,
|
|
676
570
|
activeHouseWorkType: e.activeHouseWorkType
|
|
@@ -682,32 +576,32 @@ var Ke = function() {
|
|
|
682
576
|
}, expression: `{
|
|
683
577
|
content: $t('openModalTooltip'),
|
|
684
578
|
delay: { show: 300, hide: 0 }
|
|
685
|
-
}` }], staticClass: "article-button fade-in", attrs: { slot: "suffix" }, on: { click: function(
|
|
579
|
+
}` }], staticClass: "article-button fade-in", attrs: { slot: "suffix" }, on: { click: function(i) {
|
|
686
580
|
return e.$emit("open-modal");
|
|
687
|
-
} }, slot: "suffix" }, [t("CIcon", { attrs: { type: "cog", size: "18" } })], 1)]), e.hidePriceInput ? e._e() : t("CPriceInput", { key: e.rootPriceType + e.article.priceType + e.article.unitType, staticClass: "form-control form-control-right", staticStyle: { flex: "1 1", "min-width": "200px" }, attrs: { value: e.article.totalAmount, currency: e.article.currency, "is-inc-vat": e.article.priceType !== "markup" && e.isIncVat, vat: e.article.vat, placeholder: e.$t("_common:price.price").capitalize(), "price-type": e.article.priceType, "unit-label": e.articleUnitLabel(e.article.unitType) }, on: { input: function(
|
|
688
|
-
return e.updateArticle(
|
|
689
|
-
}, "update:currency": function(
|
|
690
|
-
return e.$emit("update:currency",
|
|
691
|
-
}, focus: function(
|
|
581
|
+
} }, slot: "suffix" }, [t("CIcon", { attrs: { type: "cog", size: "18" } })], 1)]), e.hidePriceInput ? e._e() : t("CPriceInput", { key: e.rootPriceType + e.article.priceType + e.article.unitType, staticClass: "form-control form-control-right", staticStyle: { flex: "1 1", "min-width": "200px" }, attrs: { value: e.article.totalAmount, currency: e.article.currency, "is-inc-vat": e.article.priceType !== "markup" && e.isIncVat, vat: e.article.vat, placeholder: e.$t("_common:price.price").capitalize(), "price-type": e.article.priceType, "unit-label": e.articleUnitLabel(e.article.unitType) }, on: { input: function(i) {
|
|
582
|
+
return e.updateArticle(i, "price");
|
|
583
|
+
}, "update:currency": function(i) {
|
|
584
|
+
return e.$emit("update:currency", i);
|
|
585
|
+
}, focus: function(i) {
|
|
692
586
|
e.onTotalPriceInputFocus(), e.$emit("focus");
|
|
693
|
-
} }, nativeOn: { keydown: function(
|
|
694
|
-
return !
|
|
695
|
-
} } }), e.hideControls ? e._e() : [t("CIcon", { staticClass: "a-control-button close-button fade-in", attrs: { circle: "", type: "x", size: "18" }, nativeOn: { click: function(
|
|
587
|
+
} }, nativeOn: { keydown: function(i) {
|
|
588
|
+
return !i.type.indexOf("key") && e._k(i.keyCode, "enter", 13, i.key, "Enter") ? null : e.$emit("add");
|
|
589
|
+
} } }), e.hideControls ? e._e() : [t("CIcon", { staticClass: "a-control-button close-button fade-in", attrs: { circle: "", type: "x", size: "18" }, nativeOn: { click: function(i) {
|
|
696
590
|
e.enableRemove && e.$emit("remove");
|
|
697
|
-
} } }), t("CIcon", { staticClass: "a-control-button fade-in move-button article-draggable-handle", class: { "c-hidden": !e.enableRemove }, attrs: { circle: "", type: "handle", size: "18" } })]], 2), e.details.length ? t("div", { staticClass: "article-details-wrapper", staticStyle: { cursor: "pointer" }, on: { click: function(
|
|
591
|
+
} } }), t("CIcon", { staticClass: "a-control-button fade-in move-button article-draggable-handle", class: { "c-hidden": !e.enableRemove }, attrs: { circle: "", type: "handle", size: "18" } })]], 2), e.details.length ? t("div", { staticClass: "article-details-wrapper", staticStyle: { cursor: "pointer" }, on: { click: function(i) {
|
|
698
592
|
return e.$emit("open-modal");
|
|
699
|
-
} } }, e._l(e.details, function({ title:
|
|
700
|
-
return t("div", { key: c, staticClass: "article-details-item", class: [r] }, [e._v(" " + e._s(
|
|
593
|
+
} } }, e._l(e.details, function({ title: i, icon: n, subTitle: a = "", detailClass: r = "" }, c) {
|
|
594
|
+
return t("div", { key: c, staticClass: "article-details-item", class: [r] }, [e._v(" " + e._s(i) + " "), n ? t("div", { domProps: { innerHTML: e._s(n) } }) : e._e(), e._v(" " + e._s(a) + " ")]);
|
|
701
595
|
}), 0) : e._e(), e.$v.$invalid && e.$v.$dirty ? t("ErrorCallout", { attrs: { message: e.errorMessage(e.$v) } }) : e._e()], 1);
|
|
702
|
-
},
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
596
|
+
}, je = [], Ne = /* @__PURE__ */ u(
|
|
597
|
+
We,
|
|
598
|
+
Fe,
|
|
599
|
+
je,
|
|
706
600
|
!1,
|
|
707
601
|
null,
|
|
708
602
|
"44d89db4"
|
|
709
603
|
);
|
|
710
|
-
const
|
|
604
|
+
const He = Ne.exports, qe = {
|
|
711
605
|
props: {
|
|
712
606
|
canForward: {
|
|
713
607
|
type: Boolean,
|
|
@@ -725,8 +619,8 @@ const Je = Ze.exports, Qe = {
|
|
|
725
619
|
this.removeKeyHandler();
|
|
726
620
|
},
|
|
727
621
|
methods: {
|
|
728
|
-
getNavTooltip(
|
|
729
|
-
return
|
|
622
|
+
getNavTooltip(s) {
|
|
623
|
+
return s === -1 ? {
|
|
730
624
|
content: `
|
|
731
625
|
<div style='margin-bottom: 0.6em;'>
|
|
732
626
|
${this.$t("show", { thing: this.$t("previous") })}
|
|
@@ -738,7 +632,7 @@ const Je = Ze.exports, Qe = {
|
|
|
738
632
|
</div>
|
|
739
633
|
`,
|
|
740
634
|
html: !0
|
|
741
|
-
} :
|
|
635
|
+
} : s === 1 ? {
|
|
742
636
|
content: `
|
|
743
637
|
<div style='margin-bottom: 0.6em;'>
|
|
744
638
|
${this.$t("show", { thing: this.$t("next") })}
|
|
@@ -750,18 +644,18 @@ const Je = Ze.exports, Qe = {
|
|
|
750
644
|
</div>
|
|
751
645
|
`,
|
|
752
646
|
html: !0
|
|
753
|
-
} :
|
|
647
|
+
} : s === "close" ? {
|
|
754
648
|
content: '<div style="margin-bottom: 0.6em;">Stäng</div><div style="text-align: center; opacity: 0.85;"><svg width="30" height="20" xmlns="http://www.w3.org/2000/svg" viewBox="17 0 105.5 72" style="enable-background:new 17 0 105.5 72"><path d="M103.3 70.3H36.2c-9.6 0-17.5-7.9-17.5-17.5V19.2c0-9.6 7.9-17.5 17.5-17.5h67.1c9.6 0 17.5 7.9 17.5 17.5v33.6c0 9.6-7.9 17.5-17.5 17.5z" style="fill:none;stroke:currentColor;stroke-width:3;stroke-miterlimit:10"/><path style="fill:none" d="M17 17.8h105.5V49H17z"/><path fill="currentColor" d="M46.6 38.2c.1 5 3.3 7.1 7 7.1 2.6 0 4.2-.5 5.6-1l.6 2.6c-1.3.6-3.5 1.3-6.8 1.3-6.3 0-10-4.1-10-10.2s3.6-11 9.5-11c6.6 0 8.4 5.8 8.4 9.6 0 .8-.1 1.3-.1 1.7l-14.2-.1zm10.9-2.7c0-2.4-1-6-5.1-6-3.7 0-5.4 3.4-5.7 6h10.8zM65.1 43.9c1.1.7 3 1.5 4.9 1.5 2.7 0 3.9-1.3 3.9-3 0-1.8-1-2.7-3.8-3.7-3.7-1.3-5.4-3.3-5.4-5.8 0-3.3 2.6-6 7-6 2.1 0 3.9.6 5 1.3l-.9 2.7c-.8-.5-2.3-1.2-4.2-1.2-2.2 0-3.4 1.3-3.4 2.8 0 1.7 1.2 2.4 3.9 3.4 3.5 1.3 5.3 3.1 5.3 6.1 0 3.6-2.8 6.1-7.6 6.1-2.2 0-4.3-.5-5.7-1.4l1-2.8zM96.7 46.9c-1 .5-3.1 1.2-5.8 1.2-6.1 0-10.1-4.2-10.1-10.4 0-6.3 4.3-10.8 10.9-10.8 2.2 0 4.1.5 5.1 1l-.8 2.9c-.9-.5-2.3-1-4.3-1-4.7 0-7.2 3.4-7.2 7.7 0 4.7 3 7.6 7.1 7.6 2.1 0 3.5-.5 4.5-1l.6 2.8z"/></svg></div>',
|
|
755
649
|
html: !0
|
|
756
650
|
} : null;
|
|
757
651
|
},
|
|
758
|
-
onKeyUp(
|
|
652
|
+
onKeyUp(s) {
|
|
759
653
|
const e = document.activeElement;
|
|
760
|
-
!(e.hasAttribute("contenteditable") || ["input", "textarea"].includes(e.tagName.toLowerCase())) && (parseInt(
|
|
761
|
-
const
|
|
762
|
-
if (
|
|
654
|
+
!(e.hasAttribute("contenteditable") || ["input", "textarea"].includes(e.tagName.toLowerCase())) && (parseInt(s.keyCode, 10) === 37 && this.$emit("go", -1), parseInt(s.keyCode, 10) === 39 && this.$emit("go", 1));
|
|
655
|
+
const i = s.key || s.keyCode;
|
|
656
|
+
if (i === "Escape" || i === "Esc" || i === 27) {
|
|
763
657
|
const n = this.$modal.getOpenInstances();
|
|
764
|
-
if (
|
|
658
|
+
if (s.defaultPrevented || n.length)
|
|
765
659
|
return;
|
|
766
660
|
this.$emit("close");
|
|
767
661
|
}
|
|
@@ -778,22 +672,22 @@ const Je = Ze.exports, Qe = {
|
|
|
778
672
|
});
|
|
779
673
|
}
|
|
780
674
|
};
|
|
781
|
-
var
|
|
675
|
+
var Ue = function() {
|
|
782
676
|
var e = this, t = e._self._c;
|
|
783
|
-
return t("div", { staticClass: "l-root" }, [t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.getNavTooltip(-1), expression: "getNavTooltip(-1)" }], staticClass: "l-button", class: { disabled: !e.canBackward }, staticStyle: { left: "calc(-4 * var(--rem))" }, on: { click: function(
|
|
677
|
+
return t("div", { staticClass: "l-root" }, [t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.getNavTooltip(-1), expression: "getNavTooltip(-1)" }], staticClass: "l-button", class: { disabled: !e.canBackward }, staticStyle: { left: "calc(-4 * var(--rem))" }, on: { click: function(i) {
|
|
784
678
|
return e.$emit("go", -1);
|
|
785
|
-
} } }, [t("svg", { attrs: { xmlns: "http://www.w3.org/2000/svg", width: "35", height: "35", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("path", { attrs: { d: "M15 18l-6-6 6-6" } })])]), t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.getNavTooltip(1), expression: "getNavTooltip(1)" }], staticClass: "l-button", class: { disabled: !e.canForward }, staticStyle: { right: "calc(-4 * var(--rem))" }, on: { click: function(
|
|
679
|
+
} } }, [t("svg", { attrs: { xmlns: "http://www.w3.org/2000/svg", width: "35", height: "35", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("path", { attrs: { d: "M15 18l-6-6 6-6" } })])]), t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.getNavTooltip(1), expression: "getNavTooltip(1)" }], staticClass: "l-button", class: { disabled: !e.canForward }, staticStyle: { right: "calc(-4 * var(--rem))" }, on: { click: function(i) {
|
|
786
680
|
return e.$emit("go", 1);
|
|
787
681
|
} } }, [t("svg", { attrs: { xmlns: "http://www.w3.org/2000/svg", width: "35", height: "35", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("path", { attrs: { d: "M9 18l6-6-6-6" } })])])]);
|
|
788
|
-
},
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
682
|
+
}, Ge = [], Ke = /* @__PURE__ */ u(
|
|
683
|
+
qe,
|
|
684
|
+
Ue,
|
|
685
|
+
Ge,
|
|
792
686
|
!1,
|
|
793
687
|
null,
|
|
794
688
|
"226f5608"
|
|
795
689
|
);
|
|
796
|
-
const
|
|
690
|
+
const Ye = Ke.exports, Ze = {
|
|
797
691
|
name: "ArticleUnitEditModal",
|
|
798
692
|
i18nOptions: {
|
|
799
693
|
namespaces: "ArticleUnitEditModal",
|
|
@@ -821,8 +715,8 @@ const it = tt.exports, st = {
|
|
|
821
715
|
}
|
|
822
716
|
},
|
|
823
717
|
components: {
|
|
824
|
-
DragList:
|
|
825
|
-
DragItem:
|
|
718
|
+
DragList: K,
|
|
719
|
+
DragItem: Y
|
|
826
720
|
},
|
|
827
721
|
data() {
|
|
828
722
|
return {
|
|
@@ -842,8 +736,8 @@ const it = tt.exports, st = {
|
|
|
842
736
|
unitById: "unitTypes/byId"
|
|
843
737
|
}),
|
|
844
738
|
unitItems() {
|
|
845
|
-
return (this.idList || []).map((
|
|
846
|
-
const e = this.unitById(
|
|
739
|
+
return (this.idList || []).map((s) => {
|
|
740
|
+
const e = this.unitById(s), t = f(e.value);
|
|
847
741
|
return {
|
|
848
742
|
...e,
|
|
849
743
|
label: t,
|
|
@@ -857,8 +751,8 @@ const it = tt.exports, st = {
|
|
|
857
751
|
watch: {
|
|
858
752
|
stateUnitIds: {
|
|
859
753
|
immediate: !0,
|
|
860
|
-
handler(
|
|
861
|
-
this.idList =
|
|
754
|
+
handler(s) {
|
|
755
|
+
this.idList = s || [];
|
|
862
756
|
}
|
|
863
757
|
}
|
|
864
758
|
},
|
|
@@ -869,22 +763,22 @@ const it = tt.exports, st = {
|
|
|
869
763
|
updateUnit: p.UPDATE_UNIT_TYPE,
|
|
870
764
|
deleteUnit: p.DELETE_UNIT_TYPE
|
|
871
765
|
}),
|
|
872
|
-
onEdit(
|
|
873
|
-
this.selectedValue = { ...
|
|
766
|
+
onEdit(s) {
|
|
767
|
+
this.selectedValue = { ...s }, this.$refs.unitInput && this.$refs.unitInput.focus();
|
|
874
768
|
},
|
|
875
769
|
async submit() {
|
|
876
|
-
const { id:
|
|
770
|
+
const { id: s, value: e } = this.selectedValue || {};
|
|
877
771
|
if (!e)
|
|
878
772
|
throw new Error("New unitTypes need truthy value!");
|
|
879
773
|
const t = `$${e}`;
|
|
880
|
-
|
|
774
|
+
s ? await this.updateUnit({ id: s, body: { value: t } }) : await this.createUnit({ body: { value: t } }), this.reset(), this.$parent.$emit("select", t), this.close();
|
|
881
775
|
},
|
|
882
|
-
async remove(
|
|
776
|
+
async remove(s, e) {
|
|
883
777
|
if (this.removeConfirmIndex !== e) {
|
|
884
778
|
this.removeConfirmIndex = e;
|
|
885
779
|
return;
|
|
886
780
|
}
|
|
887
|
-
await this.deleteUnit({ id:
|
|
781
|
+
await this.deleteUnit({ id: s }), this.reset(), this.removeConfirmIndex = null;
|
|
888
782
|
},
|
|
889
783
|
reset() {
|
|
890
784
|
this.selectedValue = { id: null, value: "" };
|
|
@@ -892,8 +786,8 @@ const it = tt.exports, st = {
|
|
|
892
786
|
close() {
|
|
893
787
|
this.$emit("close");
|
|
894
788
|
},
|
|
895
|
-
async onDrop({ removedIndex:
|
|
896
|
-
|
|
789
|
+
async onDrop({ removedIndex: s, addedIndex: e }) {
|
|
790
|
+
s === null && e === null || s !== e && (this.idList = T(this.idList, s, e), await Z(
|
|
897
791
|
"/unitType/setPositions",
|
|
898
792
|
{ ids: this.idList },
|
|
899
793
|
{ invalidateCache: { type: "unitType" } }
|
|
@@ -901,34 +795,34 @@ const it = tt.exports, st = {
|
|
|
901
795
|
}
|
|
902
796
|
}
|
|
903
797
|
};
|
|
904
|
-
var
|
|
798
|
+
var Je = function() {
|
|
905
799
|
var e = this, t = e._self._c;
|
|
906
|
-
return t("div", { staticClass: "modal-overlay font-inter", on: { "&click": function(
|
|
907
|
-
return
|
|
908
|
-
} } }, [t("div", { staticClass: "unit-modal-root font-inter", staticStyle: { position: "relative" } }, [t("div", { staticStyle: { padding: "calc(1.5 * var(--rem))" } }, [t("div", { staticStyle: { "font-weight": "600", "font-size": "18px", "margin-bottom": "calc(1.5 * var(--rem))" } }, [t("span", [e._v(e._s(e.$t("_common:add", { thing: e.$t("_common:unitType.unitType_plural") })))]), t("CIcon", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: { content: e.$t("tooltip"), html: !0 }, expression: "{ content: $t('tooltip'), html: true }" }], staticClass: "text-gray-400", staticStyle: { "margin-left": "0.5em" }, attrs: { type: "info", size: "15" } })], 1), t("CField", { staticStyle: { margin: "0" }, attrs: { grouped: "" } }, [t("CInput", { ref: "unitInput", staticClass: "unit-input", attrs: { placeholder: e.$t("_common:name").capitalize(), expanded: "", filled: "" }, model: { value: e.selectedValue.value, callback: function(
|
|
909
|
-
e.$set(e.selectedValue, "value", typeof
|
|
910
|
-
}, expression: "selectedValue.value" } }, [e.selectedValue.id ? t("template", { slot: "suffix" }, [t("CButton", { staticStyle: { "border-radius": "4px" }, attrs: { icon: "x", type: "none", pattern: "tertiary", size: "small" }, on: { click: e.reset } })], 1) : e._e()], 2), t("div", { staticClass: "control" }, [t("CButton", { attrs: { loading: e.isPosting, disabled: !e.selectedValue.value, type: "secondary" }, on: { click: e.submit } }, [e._v(" " + e._s(e.selectedValue.id ? e.$t("_common:save") : e.$t("_common:add")) + " ")])], 1)], 1)], 1), t("div", { staticStyle: { "border-top": "1px solid hsl(0, 0%, 88%)", overflow: "auto", "max-height": "360px" } }, [t("div", { staticClass: "text-gray-400", staticStyle: { "font-size": "14px", padding: "calc(1 * var(--rem)) calc(1.5 * var(--rem)) 0", "font-weight": "500" } }, [e._v(" " + e._s(e.$t("_common:unit_plural").capitalize()) + " ")]), t("div", { staticClass: "unit-modal-list" }, [e.unitItems.length ? e._e() : t("div", { staticClass: "unit-modal-list-empty" }, [e._v(" " + e._s(e.$t("_common:add", { thing: e.$t("_common:unit_plural") })) + " ")]), t("DragList", { attrs: { "drop-placeholder": { className: "drag-drop-placeholder" }, "drag-class": "is-dragged", "lock-axis": "y", "drag-handle-selector": ".drag-handle" }, on: { drop: e.onDrop } }, e._l(e.unitItems, function(
|
|
911
|
-
return t("DragItem", { key:
|
|
800
|
+
return t("div", { staticClass: "modal-overlay font-inter", on: { "&click": function(i) {
|
|
801
|
+
return i.target !== i.currentTarget ? null : e.close.apply(null, arguments);
|
|
802
|
+
} } }, [t("div", { staticClass: "unit-modal-root font-inter", staticStyle: { position: "relative" } }, [t("div", { staticStyle: { padding: "calc(1.5 * var(--rem))" } }, [t("div", { staticStyle: { "font-weight": "600", "font-size": "18px", "margin-bottom": "calc(1.5 * var(--rem))" } }, [t("span", [e._v(e._s(e.$t("_common:add", { thing: e.$t("_common:unitType.unitType_plural") })))]), t("CIcon", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: { content: e.$t("tooltip"), html: !0 }, expression: "{ content: $t('tooltip'), html: true }" }], staticClass: "text-gray-400", staticStyle: { "margin-left": "0.5em" }, attrs: { type: "info", size: "15" } })], 1), t("CField", { staticStyle: { margin: "0" }, attrs: { grouped: "" } }, [t("CInput", { ref: "unitInput", staticClass: "unit-input", attrs: { placeholder: e.$t("_common:name").capitalize(), expanded: "", filled: "" }, model: { value: e.selectedValue.value, callback: function(i) {
|
|
803
|
+
e.$set(e.selectedValue, "value", typeof i == "string" ? i.trim() : i);
|
|
804
|
+
}, expression: "selectedValue.value" } }, [e.selectedValue.id ? t("template", { slot: "suffix" }, [t("CButton", { staticStyle: { "border-radius": "4px" }, attrs: { icon: "x", type: "none", pattern: "tertiary", size: "small" }, on: { click: e.reset } })], 1) : e._e()], 2), t("div", { staticClass: "control" }, [t("CButton", { attrs: { loading: e.isPosting, disabled: !e.selectedValue.value, type: "secondary" }, on: { click: e.submit } }, [e._v(" " + e._s(e.selectedValue.id ? e.$t("_common:save") : e.$t("_common:add")) + " ")])], 1)], 1)], 1), t("div", { staticStyle: { "border-top": "1px solid hsl(0, 0%, 88%)", overflow: "auto", "max-height": "360px" } }, [t("div", { staticClass: "text-gray-400", staticStyle: { "font-size": "14px", padding: "calc(1 * var(--rem)) calc(1.5 * var(--rem)) 0", "font-weight": "500" } }, [e._v(" " + e._s(e.$t("_common:unit_plural").capitalize()) + " ")]), t("div", { staticClass: "unit-modal-list" }, [e.unitItems.length ? e._e() : t("div", { staticClass: "unit-modal-list-empty" }, [e._v(" " + e._s(e.$t("_common:add", { thing: e.$t("_common:unit_plural") })) + " ")]), t("DragList", { attrs: { "drop-placeholder": { className: "drag-drop-placeholder" }, "drag-class": "is-dragged", "lock-axis": "y", "drag-handle-selector": ".drag-handle" }, on: { drop: e.onDrop } }, e._l(e.unitItems, function(i, n) {
|
|
805
|
+
return t("DragItem", { key: i.id }, [t("div", { staticClass: "unit-modal-list-item", class: { "is-editing": e.selectedValue.id === i.id }, on: { "&mouseover": function(a) {
|
|
912
806
|
e.hoverIndex = n;
|
|
913
807
|
}, "&mouseleave": function(a) {
|
|
914
808
|
e.hoverIndex = null;
|
|
915
809
|
}, click: function(a) {
|
|
916
|
-
return e.onEdit(
|
|
917
|
-
} } }, [t("div", { staticClass: "drag-handle" }, [t("CIcon", { staticClass: "text-gray-300", attrs: { type: "handle", size: "16" } })], 1), t("div", { staticStyle: { "padding-left": "0.5em" } }, [e._v(" " + e._s(
|
|
918
|
-
return a.stopPropagation(), a.preventDefault(), e.remove(
|
|
810
|
+
return e.onEdit(i);
|
|
811
|
+
} } }, [t("div", { staticClass: "drag-handle" }, [t("CIcon", { staticClass: "text-gray-300", attrs: { type: "handle", size: "16" } })], 1), t("div", { staticStyle: { "padding-left": "0.5em" } }, [e._v(" " + e._s(i.label) + " ")]), t("span", { directives: [{ name: "show", rawName: "v-show", value: e.removeConfirmIndex === n, expression: "removeConfirmIndex === i" }], staticClass: "delete-confirm" }, [e._v(" " + e._s(e.$t("_common:remove")) + "? ")]), t("div", { staticClass: "unittype-buttons" }, [e.hoverIndex === n || e.removeConfirmIndex === n ? t("CButton", { attrs: { type: e.removeConfirmIndex === n ? "danger" : "none", pattern: e.removeConfirmIndex === n ? "primary" : "tertiary", circle: "", icon: "x", size: "small" }, on: { click: function(a) {
|
|
812
|
+
return a.stopPropagation(), a.preventDefault(), e.remove(i.id, n);
|
|
919
813
|
}, blur: function(a) {
|
|
920
814
|
e.removeConfirmIndex = null;
|
|
921
815
|
} } }) : e._e(), t("CButton", { attrs: { icon: "edit", size: "small", type: "none", pattern: "tertiary", circle: "" } })], 1)])]);
|
|
922
816
|
}), 1)], 1)])])]);
|
|
923
|
-
},
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
817
|
+
}, Qe = [], Xe = /* @__PURE__ */ u(
|
|
818
|
+
Ze,
|
|
819
|
+
Je,
|
|
820
|
+
Qe,
|
|
927
821
|
!1,
|
|
928
822
|
null,
|
|
929
823
|
"136d8414"
|
|
930
824
|
);
|
|
931
|
-
const
|
|
825
|
+
const et = Xe.exports, tt = {
|
|
932
826
|
name: "ArticleUnitSelect",
|
|
933
827
|
props: {
|
|
934
828
|
value: {
|
|
@@ -951,7 +845,7 @@ const ot = rt.exports, ct = {
|
|
|
951
845
|
unitById: "unitTypes/byId"
|
|
952
846
|
}),
|
|
953
847
|
unitItems() {
|
|
954
|
-
return this.isPublicForm ?
|
|
848
|
+
return this.isPublicForm ? ce : (this.unitIds || []).map((s) => this.unitById(s)).map(({ value: s }) => s);
|
|
955
849
|
}
|
|
956
850
|
},
|
|
957
851
|
created() {
|
|
@@ -964,50 +858,50 @@ const ot = rt.exports, ct = {
|
|
|
964
858
|
}),
|
|
965
859
|
openEditModal() {
|
|
966
860
|
this.$modal.show(
|
|
967
|
-
|
|
861
|
+
et,
|
|
968
862
|
{},
|
|
969
863
|
{},
|
|
970
864
|
{
|
|
971
|
-
select: (
|
|
865
|
+
select: (s) => this.$emit("input", s)
|
|
972
866
|
}
|
|
973
867
|
);
|
|
974
868
|
}
|
|
975
869
|
}
|
|
976
870
|
};
|
|
977
|
-
var
|
|
871
|
+
var it = function() {
|
|
978
872
|
var e = this, t = e._self._c;
|
|
979
|
-
return t("CDropdown", e._b({ attrs: { value: e.value, scrollable: "" }, on: { input: function(
|
|
980
|
-
return e.$emit("input",
|
|
873
|
+
return t("CDropdown", e._b({ attrs: { value: e.value, scrollable: "" }, on: { input: function(i) {
|
|
874
|
+
return e.$emit("input", i);
|
|
981
875
|
} } }, "CDropdown", {
|
|
982
876
|
position: "is-bottom-left",
|
|
983
877
|
maxHeight: "240px",
|
|
984
878
|
...e.$attrs
|
|
985
879
|
}, !1), [e._t("default", function() {
|
|
986
880
|
return [t("CButton", { attrs: { slot: "trigger", type: "none", pattern: "tertiary" }, slot: "trigger" }, [e._v(" " + e._s(e.articleUnitLabel(e.value)) + " ")])];
|
|
987
|
-
}, { slot: "trigger" }), e._l(e.unitItems, function(
|
|
988
|
-
return t("CDropdownItem", { key: `${
|
|
881
|
+
}, { slot: "trigger" }), e._l(e.unitItems, function(i, n) {
|
|
882
|
+
return t("CDropdownItem", { key: `${i}-${n}`, attrs: { value: i } }, [e._v(" " + e._s(e.articleUnitLabel(i)) + " ")]);
|
|
989
883
|
}), e.isPublicForm ? e._e() : t("CButton", { staticClass: "edit-button", attrs: { slot: "footer", type: "none", pattern: "secondary", size: "small" }, on: { click: e.openEditModal }, slot: "footer" }, [e._v(" " + e._s(e.$t("_common:edit", { thing: e.$t("_common:unit_plural") })) + " ")])], 2);
|
|
990
|
-
},
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
884
|
+
}, st = [], at = /* @__PURE__ */ u(
|
|
885
|
+
tt,
|
|
886
|
+
it,
|
|
887
|
+
st,
|
|
994
888
|
!1,
|
|
995
889
|
null,
|
|
996
890
|
"ff74de30"
|
|
997
891
|
);
|
|
998
|
-
const
|
|
892
|
+
const nt = at.exports, rt = {
|
|
999
893
|
name: "ArticleModal",
|
|
1000
894
|
i18nOptions: {
|
|
1001
895
|
namespaces: "ArticleModal",
|
|
1002
|
-
messages:
|
|
896
|
+
messages: O
|
|
1003
897
|
},
|
|
1004
898
|
components: {
|
|
1005
899
|
ArticleAutocomplete: R,
|
|
1006
|
-
ArticleUnitSelect:
|
|
1007
|
-
ListModalButtons:
|
|
1008
|
-
CPriceInput:
|
|
900
|
+
ArticleUnitSelect: nt,
|
|
901
|
+
ListModalButtons: Ye,
|
|
902
|
+
CPriceInput: x
|
|
1009
903
|
},
|
|
1010
|
-
mixins: [
|
|
904
|
+
mixins: [oe],
|
|
1011
905
|
props: {
|
|
1012
906
|
_document: {
|
|
1013
907
|
type: Object,
|
|
@@ -1065,9 +959,9 @@ const pt = dt.exports, ht = {
|
|
|
1065
959
|
validations: M,
|
|
1066
960
|
data() {
|
|
1067
961
|
return {
|
|
1068
|
-
priceSuffix:
|
|
962
|
+
priceSuffix: Be,
|
|
1069
963
|
updateData: $,
|
|
1070
|
-
addSavedArticle:
|
|
964
|
+
addSavedArticle: D,
|
|
1071
965
|
vatOptions: [
|
|
1072
966
|
{ value: 25, translation: "25%" },
|
|
1073
967
|
{ value: 12, translation: "12%" },
|
|
@@ -1076,7 +970,7 @@ const pt = dt.exports, ht = {
|
|
|
1076
970
|
],
|
|
1077
971
|
showDiscountInput: !1,
|
|
1078
972
|
setPricesIncVat: !1,
|
|
1079
|
-
getCurrencySymbol:
|
|
973
|
+
getCurrencySymbol: C,
|
|
1080
974
|
articleUnitLabel: f
|
|
1081
975
|
};
|
|
1082
976
|
},
|
|
@@ -1090,8 +984,8 @@ const pt = dt.exports, ht = {
|
|
|
1090
984
|
get() {
|
|
1091
985
|
return this.articleList[this.index] || {};
|
|
1092
986
|
},
|
|
1093
|
-
set(
|
|
1094
|
-
this.$emit("input",
|
|
987
|
+
set(s) {
|
|
988
|
+
this.$emit("input", s);
|
|
1095
989
|
}
|
|
1096
990
|
},
|
|
1097
991
|
useVat() {
|
|
@@ -1101,56 +995,56 @@ const pt = dt.exports, ht = {
|
|
|
1101
995
|
return o(this, "_document.vatType") || "";
|
|
1102
996
|
},
|
|
1103
997
|
checkboxItems() {
|
|
1104
|
-
const { article:
|
|
998
|
+
const { article: s } = this || {}, { priceType: e } = this.article || {}, t = [
|
|
1105
999
|
...e !== "markup" ? [
|
|
1106
1000
|
{
|
|
1107
1001
|
label: this.$t("discount").capitalize(),
|
|
1108
|
-
value:
|
|
1002
|
+
value: s.discount || this.showDiscountInput,
|
|
1109
1003
|
onClick: () => {
|
|
1110
1004
|
this.showDiscountInput || this.focusEl("discountInput"), this.showDiscountInput = !this.showDiscountInput;
|
|
1111
1005
|
}
|
|
1112
1006
|
}
|
|
1113
1007
|
] : [],
|
|
1114
|
-
...this.getCompanySetting("showRot") ||
|
|
1008
|
+
...this.getCompanySetting("showRot") || s.isDeductable ? [
|
|
1115
1009
|
{
|
|
1116
1010
|
label: this.$t("_common:deduction.rot"),
|
|
1117
1011
|
value: this.article.isDeductable,
|
|
1118
|
-
onClick: () => this.updateArticle(!
|
|
1012
|
+
onClick: () => this.updateArticle(!s.isDeductable, "isDeductable")
|
|
1119
1013
|
}
|
|
1120
1014
|
] : [],
|
|
1121
|
-
...this.getCompanySetting("showRut") ||
|
|
1015
|
+
...this.getCompanySetting("showRut") || s.isRut ? [
|
|
1122
1016
|
{
|
|
1123
1017
|
label: this.$t("_common:deduction.rut"),
|
|
1124
|
-
value:
|
|
1125
|
-
onClick: () => this.updateArticle(!
|
|
1018
|
+
value: s.isRut,
|
|
1019
|
+
onClick: () => this.updateArticle(!s.isRut, "isRut")
|
|
1126
1020
|
}
|
|
1127
1021
|
] : [],
|
|
1128
|
-
...
|
|
1022
|
+
...s.greenRot15 ? [
|
|
1129
1023
|
{
|
|
1130
1024
|
label: this.$t("_common:deduction.greenRot15_percentage"),
|
|
1131
|
-
value:
|
|
1132
|
-
onClick: () => this.updateArticle(!
|
|
1025
|
+
value: s.greenRot15,
|
|
1026
|
+
onClick: () => this.updateArticle(!s.greenRot15, "greenRot15")
|
|
1133
1027
|
}
|
|
1134
1028
|
] : [],
|
|
1135
|
-
...this.getCompanySetting("showGreenRot") ||
|
|
1029
|
+
...this.getCompanySetting("showGreenRot") || s.greenRot20 || s.greenRot50 ? [
|
|
1136
1030
|
{
|
|
1137
1031
|
label: this.$t("_common:deduction.greenRot20_percentage"),
|
|
1138
|
-
value:
|
|
1139
|
-
onClick: () => this.updateArticle(!
|
|
1032
|
+
value: s.greenRot20,
|
|
1033
|
+
onClick: () => this.updateArticle(!s.greenRot20, "greenRot20")
|
|
1140
1034
|
},
|
|
1141
1035
|
{
|
|
1142
1036
|
label: this.$t("_common:deduction.greenRot50_percentage"),
|
|
1143
|
-
value:
|
|
1144
|
-
onClick: () => this.updateArticle(!
|
|
1037
|
+
value: s.greenRot50,
|
|
1038
|
+
onClick: () => this.updateArticle(!s.greenRot50, "greenRot50")
|
|
1145
1039
|
}
|
|
1146
1040
|
] : []
|
|
1147
1041
|
];
|
|
1148
1042
|
if (this.allowHidePrice) {
|
|
1149
|
-
const { showPrice:
|
|
1043
|
+
const { showPrice: i } = s || {};
|
|
1150
1044
|
t.push({
|
|
1151
1045
|
label: this.$t("hidePriceLabel"),
|
|
1152
|
-
value: !
|
|
1153
|
-
onClick: () => this.updateArticle(!
|
|
1046
|
+
value: !i,
|
|
1047
|
+
onClick: () => this.updateArticle(!i, "showPrice")
|
|
1154
1048
|
});
|
|
1155
1049
|
}
|
|
1156
1050
|
return t;
|
|
@@ -1158,28 +1052,28 @@ const pt = dt.exports, ht = {
|
|
|
1158
1052
|
priceTypeOptions() {
|
|
1159
1053
|
if (!this.enablePriceTypes || this.rootPriceType === "fixed")
|
|
1160
1054
|
return [];
|
|
1161
|
-
const { priceType:
|
|
1055
|
+
const { priceType: s } = this.article, e = (i) => this.$t(`priceTypeTooltips.${i}`), t = [
|
|
1162
1056
|
{
|
|
1163
1057
|
label: this.$t("price.fixed"),
|
|
1164
1058
|
tooltip: e("fixed"),
|
|
1165
|
-
value:
|
|
1059
|
+
value: s === "fixed",
|
|
1166
1060
|
onClick: () => this.updateArticle("fixed", "priceType")
|
|
1167
1061
|
}
|
|
1168
1062
|
];
|
|
1169
1063
|
return this.rootPriceType === "approx" && t.push({
|
|
1170
1064
|
label: this.$t("price.approx"),
|
|
1171
1065
|
tooltip: e("approx"),
|
|
1172
|
-
value:
|
|
1066
|
+
value: s === "approx",
|
|
1173
1067
|
onClick: () => this.updateArticle("approx", "priceType")
|
|
1174
1068
|
}), this.rootPriceType.startsWith("openAcc") && (t.push({
|
|
1175
1069
|
label: this.$t("price.openAcc"),
|
|
1176
1070
|
tooltip: e("openAcc"),
|
|
1177
|
-
value:
|
|
1071
|
+
value: s === "openAcc",
|
|
1178
1072
|
onClick: () => this.updateArticle("openAcc", "priceType")
|
|
1179
1073
|
}), t.push({
|
|
1180
1074
|
label: this.$t("price.markup"),
|
|
1181
1075
|
tooltip: e("markup"),
|
|
1182
|
-
value:
|
|
1076
|
+
value: s === "markup",
|
|
1183
1077
|
onClick: () => this.updateArticle("markup", "priceType")
|
|
1184
1078
|
})), t;
|
|
1185
1079
|
}
|
|
@@ -1187,29 +1081,29 @@ const pt = dt.exports, ht = {
|
|
|
1187
1081
|
watch: {
|
|
1188
1082
|
index: {
|
|
1189
1083
|
immediate: !0,
|
|
1190
|
-
handler(
|
|
1191
|
-
|
|
1084
|
+
handler(s, e) {
|
|
1085
|
+
s !== e && (this.showDiscountInput = !1);
|
|
1192
1086
|
}
|
|
1193
1087
|
},
|
|
1194
1088
|
isIncVat: {
|
|
1195
1089
|
immediate: !0,
|
|
1196
|
-
handler(
|
|
1197
|
-
this.setPricesIncVat = !!
|
|
1090
|
+
handler(s) {
|
|
1091
|
+
this.setPricesIncVat = !!s;
|
|
1198
1092
|
}
|
|
1199
1093
|
},
|
|
1200
1094
|
"article.discount": {
|
|
1201
1095
|
immediate: !0,
|
|
1202
|
-
handler(
|
|
1203
|
-
|
|
1096
|
+
handler(s) {
|
|
1097
|
+
s && (this.showDiscountInput = !0);
|
|
1204
1098
|
}
|
|
1205
1099
|
},
|
|
1206
1100
|
"article.priceType": {
|
|
1207
|
-
handler(
|
|
1208
|
-
|
|
1101
|
+
handler(s) {
|
|
1102
|
+
s === "markup" && (this.showDiscountInput = !1), ["openAcc", "markup"].includes(s) && this.updateArticle(1, "quantity");
|
|
1209
1103
|
}
|
|
1210
1104
|
},
|
|
1211
|
-
showDiscountInput(
|
|
1212
|
-
|
|
1105
|
+
showDiscountInput(s) {
|
|
1106
|
+
s || this.updateArticle(0, "discount");
|
|
1213
1107
|
}
|
|
1214
1108
|
},
|
|
1215
1109
|
mounted() {
|
|
@@ -1222,36 +1116,36 @@ const pt = dt.exports, ht = {
|
|
|
1222
1116
|
...v({
|
|
1223
1117
|
createArticle: p.DO_CREATE_ARTICLE
|
|
1224
1118
|
}),
|
|
1225
|
-
onCustomVatBlur(
|
|
1226
|
-
o(
|
|
1119
|
+
onCustomVatBlur(s) {
|
|
1120
|
+
o(s, "target.value") || "" || this.updateArticle(0, "vat");
|
|
1227
1121
|
},
|
|
1228
|
-
onCustomVatInput(
|
|
1229
|
-
const e = o(
|
|
1122
|
+
onCustomVatInput(s) {
|
|
1123
|
+
const e = o(s, "target.value") || "";
|
|
1230
1124
|
if (!e)
|
|
1231
1125
|
return;
|
|
1232
1126
|
let t = e > 100 ? e.slice(0, e.length - 1) : e;
|
|
1233
1127
|
t < 0 && (t = 0), this.updateArticle(Number.parseFloat(t), "vat");
|
|
1234
1128
|
},
|
|
1235
|
-
updateArticle(
|
|
1236
|
-
this.article = $(this.article,
|
|
1129
|
+
updateArticle(s, e) {
|
|
1130
|
+
this.article = $(this.article, s, e);
|
|
1237
1131
|
},
|
|
1238
1132
|
close() {
|
|
1239
1133
|
this.$emit("close");
|
|
1240
1134
|
},
|
|
1241
|
-
onKeydown(
|
|
1242
|
-
|
|
1135
|
+
onKeydown(s) {
|
|
1136
|
+
s.keyCode === 13 && s.shiftKey && (s.preventDefault(), this.addNewArticle());
|
|
1243
1137
|
},
|
|
1244
|
-
onGo(
|
|
1245
|
-
const e = this.index +
|
|
1138
|
+
onGo(s) {
|
|
1139
|
+
const e = this.index + s;
|
|
1246
1140
|
this.articleList[e] && (this.close(), this.$emit("open-modal", e));
|
|
1247
1141
|
},
|
|
1248
1142
|
async addNewArticle() {
|
|
1249
1143
|
this.$v.$invalid || await this.saveArticle(), this.$emit("add", { openModal: !0 }), this.close();
|
|
1250
1144
|
},
|
|
1251
|
-
focusEl(
|
|
1145
|
+
focusEl(s) {
|
|
1252
1146
|
this.$nextTick(() => {
|
|
1253
1147
|
this.$nextTick(() => {
|
|
1254
|
-
this.$refs[
|
|
1148
|
+
this.$refs[s] && this.$refs[s].focus && this.$refs[s].focus();
|
|
1255
1149
|
});
|
|
1256
1150
|
});
|
|
1257
1151
|
},
|
|
@@ -1261,8 +1155,8 @@ const pt = dt.exports, ht = {
|
|
|
1261
1155
|
});
|
|
1262
1156
|
},
|
|
1263
1157
|
toggleDiscountType() {
|
|
1264
|
-
let
|
|
1265
|
-
this.article.discountType === "fixed" && (
|
|
1158
|
+
let s = "fixed";
|
|
1159
|
+
this.article.discountType === "fixed" && (s = "percentage"), this.updateArticle(s, "discountType");
|
|
1266
1160
|
},
|
|
1267
1161
|
async onSaveArticle() {
|
|
1268
1162
|
if (this.$v.$invalid) {
|
|
@@ -1274,68 +1168,68 @@ const pt = dt.exports, ht = {
|
|
|
1274
1168
|
async saveArticle() {
|
|
1275
1169
|
if (this.viewSettings.isPublicForm)
|
|
1276
1170
|
return;
|
|
1277
|
-
let { ArticleId:
|
|
1278
|
-
!
|
|
1171
|
+
let { ArticleId: s } = this.article;
|
|
1172
|
+
!s && ((t) => typeof t == "string" && !!t.trim())(this.article.name) && (s = await this.createArticle({
|
|
1279
1173
|
body: this.article,
|
|
1280
1174
|
showMessage: !1
|
|
1281
|
-
}), this.article = { ...this.article, ArticleId:
|
|
1175
|
+
}), this.article = { ...this.article, ArticleId: s });
|
|
1282
1176
|
}
|
|
1283
1177
|
}
|
|
1284
1178
|
};
|
|
1285
|
-
var
|
|
1179
|
+
var ot = function() {
|
|
1286
1180
|
var e = this, t = e._self._c;
|
|
1287
1181
|
return t("div", { staticClass: "font-inter", class: {
|
|
1288
1182
|
"full-screen": e.mq === "sm",
|
|
1289
1183
|
"modal-overlay": !0
|
|
1290
|
-
}, on: { "&click": function(
|
|
1291
|
-
return
|
|
1292
|
-
} } }, [t("div", { staticClass: "modal-container" }, [e.mq !== "sm" ? t("ListModalButtons", { attrs: { "can-forward": !!e.articleList[e.index + 1], "can-backward": !!e.articleList[e.index - 1] }, on: { close: e.close, go: function(
|
|
1293
|
-
return e.onGo(
|
|
1294
|
-
} } }) : t("div", { staticClass: "modal-close", on: { click: e.close } }, [t("CIcon", { attrs: { type: "x" } })], 1), t("transition", { attrs: { name: "slide" } }, [t("div", { key: e.article._uniqueId, staticClass: "modal-main" }, [t("CField", { staticClass: "label-selector", staticStyle: { "margin-bottom": "1.5em" }, attrs: { validator: e.$v.article.name, messages: { maxLength: e.$t("validations.name.maxLength") }, label: e.$t("name").capitalize(), "label-position": "inside" } }, [t("ArticleAutocomplete", { ref: "nameInput", staticClass: "input-selector", attrs: { value: e.article.name, autosize: !0, tag: "textarea", placeholder: "", size: "large" }, on: { input: function(
|
|
1295
|
-
return e.updateArticle(
|
|
1296
|
-
}, select: function(
|
|
1184
|
+
}, on: { "&click": function(i) {
|
|
1185
|
+
return i.target !== i.currentTarget ? null : e.close.apply(null, arguments);
|
|
1186
|
+
} } }, [t("div", { staticClass: "modal-container" }, [e.mq !== "sm" ? t("ListModalButtons", { attrs: { "can-forward": !!e.articleList[e.index + 1], "can-backward": !!e.articleList[e.index - 1] }, on: { close: e.close, go: function(i) {
|
|
1187
|
+
return e.onGo(i);
|
|
1188
|
+
} } }) : t("div", { staticClass: "modal-close", on: { click: e.close } }, [t("CIcon", { attrs: { type: "x" } })], 1), t("transition", { attrs: { name: "slide" } }, [t("div", { key: e.article._uniqueId, staticClass: "modal-main" }, [t("CField", { staticClass: "label-selector", staticStyle: { "margin-bottom": "1.5em" }, attrs: { validator: e.$v.article.name, messages: { maxLength: e.$t("validations.name.maxLength") }, label: e.$t("name").capitalize(), "label-position": "inside" } }, [t("ArticleAutocomplete", { ref: "nameInput", staticClass: "input-selector", attrs: { value: e.article.name, autosize: !0, tag: "textarea", placeholder: "", size: "large" }, on: { input: function(i) {
|
|
1189
|
+
return e.updateArticle(i, "name");
|
|
1190
|
+
}, select: function(i) {
|
|
1297
1191
|
e.$emit(
|
|
1298
1192
|
"input",
|
|
1299
1193
|
e.addSavedArticle({
|
|
1300
|
-
stored:
|
|
1194
|
+
stored: i,
|
|
1301
1195
|
current: e.article,
|
|
1302
1196
|
hidePrice: e.hidePriceOnNew,
|
|
1303
1197
|
activeHouseWorkType: e.activeHouseWorkType
|
|
1304
1198
|
})
|
|
1305
1199
|
);
|
|
1306
|
-
} } })], 1), t("div", { staticClass: "flex w-full", staticStyle: { "margin-bottom": "1.5em" } }, [t("CField", { staticClass: "label-selector form-control form-control-left flex-grow", staticStyle: { "margin-bottom": "0" }, attrs: { label: e.$t("quantity").capitalize(), "label-position": "inside" } }, [t("CInput", { staticClass: "input-selector", attrs: { value: e.article.quantity, disabled: ["openAcc", "markup"].includes(e.article.priceType), placeholder: "", type: "number", size: "large" }, on: { input: function(
|
|
1307
|
-
e.updateArticle(Number.parseFloat(
|
|
1308
|
-
} } })], 1), t("ArticleUnitSelect", { attrs: { value: e.article.unitType, "is-public-form": e.viewSettings.isPublicForm }, on: { input: function(
|
|
1309
|
-
return e.updateArticle(
|
|
1310
|
-
} } }, [t("CButton", { staticClass: "select-css form-control form-control-right", staticStyle: { width: "8em", "box-shadow": "none" } }, [e._v(" " + e._s(e.articleUnitLabel(e.article.unitType, { count: e.article.quantity })) + " ")])], 1)], 1), e.hidePriceInput ? e._e() : [t("div", { staticClass: "flex", staticStyle: { "margin-bottom": "1.5em" } }, [t("CField", { staticClass: "label-selector form-control form-control-left flex-1", staticStyle: { "margin-bottom": "0" }, attrs: { label: e.$t("price.price").capitalize(), "label-position": "inside" } }, [t("CPriceInput", { key: e.priceSuffix(e.article), ref: "priceInput", staticClass: "input-selector", attrs: { value: e.article.price, currency: e.article.currency, "is-inc-vat": e.article.priceType !== "markup" && e.setPricesIncVat, vat: e.article.vat, "price-type": e.article.priceType, "unit-label": e.articleUnitLabel(e.article.unitType) }, on: { input: function(
|
|
1311
|
-
return e.updateArticle(
|
|
1312
|
-
}, "update:currency": function(
|
|
1313
|
-
return e.$emit("update:currency",
|
|
1314
|
-
}, focus: function(
|
|
1200
|
+
} } })], 1), t("div", { staticClass: "flex w-full", staticStyle: { "margin-bottom": "1.5em" } }, [t("CField", { staticClass: "label-selector form-control form-control-left flex-grow", staticStyle: { "margin-bottom": "0" }, attrs: { label: e.$t("quantity").capitalize(), "label-position": "inside" } }, [t("CInput", { staticClass: "input-selector", attrs: { value: e.article.quantity, disabled: ["openAcc", "markup"].includes(e.article.priceType), placeholder: "", type: "number", size: "large" }, on: { input: function(i) {
|
|
1201
|
+
e.updateArticle(Number.parseFloat(i), "quantity");
|
|
1202
|
+
} } })], 1), t("ArticleUnitSelect", { attrs: { value: e.article.unitType, "is-public-form": e.viewSettings.isPublicForm }, on: { input: function(i) {
|
|
1203
|
+
return e.updateArticle(i, "unitType");
|
|
1204
|
+
} } }, [t("CButton", { staticClass: "select-css form-control form-control-right", staticStyle: { width: "8em", "box-shadow": "none" } }, [e._v(" " + e._s(e.articleUnitLabel(e.article.unitType, { count: e.article.quantity })) + " ")])], 1)], 1), e.hidePriceInput ? e._e() : [t("div", { staticClass: "flex", staticStyle: { "margin-bottom": "1.5em" } }, [t("CField", { staticClass: "label-selector form-control form-control-left flex-1", staticStyle: { "margin-bottom": "0" }, attrs: { label: e.$t("price.price").capitalize(), "label-position": "inside" } }, [t("CPriceInput", { key: e.priceSuffix(e.article), ref: "priceInput", staticClass: "input-selector", attrs: { value: e.article.price, currency: e.article.currency, "is-inc-vat": e.article.priceType !== "markup" && e.setPricesIncVat, vat: e.article.vat, "price-type": e.article.priceType, "unit-label": e.articleUnitLabel(e.article.unitType) }, on: { input: function(i) {
|
|
1205
|
+
return e.updateArticle(i, "price");
|
|
1206
|
+
}, "update:currency": function(i) {
|
|
1207
|
+
return e.$emit("update:currency", i);
|
|
1208
|
+
}, focus: function(i) {
|
|
1315
1209
|
return e.$emit("focus");
|
|
1316
|
-
} } })], 1), e.useVat ? t("div", { staticClass: "select-css form-control form-control-right", staticStyle: { width: "8em" }, on: { click: function(
|
|
1210
|
+
} } })], 1), e.useVat ? t("div", { staticClass: "select-css form-control form-control-right", staticStyle: { width: "8em" }, on: { click: function(i) {
|
|
1317
1211
|
e.setPricesIncVat = !e.setPricesIncVat;
|
|
1318
|
-
} } }, [e._v(" " + e._s(e._document.$t(`vat.${e.setPricesIncVat ? "incVat" : "exVat"}`)) + " ")]) : e._e()], 1), e.showDiscountInput ? t("div", { staticClass: "flex", staticStyle: { "margin-bottom": "1.5em" } }, [t("CField", { staticClass: "label-selector form-control form-control-left flex-grow", staticStyle: { "margin-bottom": "0" }, attrs: { label: e.$t("discount").capitalize(), "label-position": "inside" } }, [t("CPriceInput", { ref: "discountInput", staticClass: "input-selector", attrs: { value: e.article.discount, currency: e.article.currency, "is-inc-vat": e.article.discountType !== "percentage" && e.setPricesIncVat, vat: e.article.vat }, on: { input: function(
|
|
1319
|
-
e.updateArticle(Math.abs(
|
|
1320
|
-
} } }, [e.article.discountType === "fixed" ? t("template", { slot: "suffix" }, [e._v(" " + e._s(e._document.$t(`vat.${e.setPricesIncVat ? "incVat" : "exVat"}`)) + " ")]) : t("template", { slot: "suffix" }, [e._v(" " + e._s(e.getCurrencySymbol(e.article.currency)) + " ")])], 2)], 1), t("div", { staticClass: "select-css form-control form-control-right", staticStyle: { width: "5em" }, on: { click: function(
|
|
1212
|
+
} } }, [e._v(" " + e._s(e._document.$t(`vat.${e.setPricesIncVat ? "incVat" : "exVat"}`)) + " ")]) : e._e()], 1), e.showDiscountInput ? t("div", { staticClass: "flex", staticStyle: { "margin-bottom": "1.5em" } }, [t("CField", { staticClass: "label-selector form-control form-control-left flex-grow", staticStyle: { "margin-bottom": "0" }, attrs: { label: e.$t("discount").capitalize(), "label-position": "inside" } }, [t("CPriceInput", { ref: "discountInput", staticClass: "input-selector", attrs: { value: e.article.discount, currency: e.article.currency, "is-inc-vat": e.article.discountType !== "percentage" && e.setPricesIncVat, vat: e.article.vat, "suffix-class": "text-gray-400" }, on: { input: function(i) {
|
|
1213
|
+
e.updateArticle(Math.abs(i), "discount");
|
|
1214
|
+
} } }, [e.article.discountType === "fixed" ? t("template", { slot: "suffix" }, [e._v(" " + e._s(e._document.$t(`vat.${e.setPricesIncVat ? "incVat" : "exVat"}`)) + " ")]) : t("template", { slot: "suffix" }, [e._v(" " + e._s(e.getCurrencySymbol(e.article.currency)) + " ")])], 2)], 1), t("div", { staticClass: "select-css form-control form-control-right", staticStyle: { width: "5em" }, on: { click: function(i) {
|
|
1321
1215
|
return e.updateArticle(
|
|
1322
1216
|
e.article.discountType === "percentage" ? "fixed" : "percentage",
|
|
1323
1217
|
"discountType"
|
|
1324
1218
|
);
|
|
1325
|
-
} } }, [e._v(" " + e._s(e.article.discountType === "percentage" ? "%" : e.getCurrencySymbol(e.article.currency)) + " ")])], 1) : e._e()], t("div", { staticStyle: { margin: "calc(1 * var(--rem)) calc(-0.5 * var(--rem))" } }, [e.useVat ? [e.feature("regionSE") && Number.isInteger(e.article.vat) ? t("select", { staticClass: "select-css tag-item no-chevron", staticStyle: { display: "inline", "min-height": "initial", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" }, domProps: { value: e.article.vat }, on: { input: function(
|
|
1326
|
-
e.updateArticle(Number.parseFloat(
|
|
1327
|
-
} } }, e._l(e.vatOptions, function({ translation:
|
|
1328
|
-
return t("option", { key: a, domProps: { value: n } }, [e._v(" " + e._s(e.$t(`vat.${e.vatType}`)) + " " + e._s(
|
|
1329
|
-
}), 0) : t("span", { staticClass: "select-css tag-item no-chevron", staticStyle: { display: "inline", "min-height": "initial", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" } }, [e._v(" " + e._s(e._document.$t("vat").capitalize()) + " "), t("input", { staticStyle: { width: "calc(2.5 * var(--rem))", display: "inline", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" }, attrs: { type: "number" }, domProps: { value: e.article.vat || 0 }, on: { blur: e.onCustomVatBlur, input: e.onCustomVatInput } }), e._v(" % ")])] : e._e(), e.priceTypeOptions.length ? t("div", { staticClass: "tag-group", staticStyle: { display: "flex", "flex-direction": "row", "flex-wrap": "wrap", "margin-top": "1em" } }, e._l(e.priceTypeOptions, function({ label:
|
|
1219
|
+
} } }, [e._v(" " + e._s(e.article.discountType === "percentage" ? "%" : e.getCurrencySymbol(e.article.currency)) + " ")])], 1) : e._e()], t("div", { staticStyle: { margin: "calc(1 * var(--rem)) calc(-0.5 * var(--rem))" } }, [e.useVat ? [e.feature("regionSE") && Number.isInteger(e.article.vat) ? t("select", { staticClass: "select-css tag-item no-chevron", staticStyle: { display: "inline", "min-height": "initial", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" }, domProps: { value: e.article.vat }, on: { input: function(i) {
|
|
1220
|
+
e.updateArticle(Number.parseFloat(i.target.value), "vat");
|
|
1221
|
+
} } }, e._l(e.vatOptions, function({ translation: i, value: n }, a) {
|
|
1222
|
+
return t("option", { key: a, domProps: { value: n } }, [e._v(" " + e._s(e.$t(`vat.${e.vatType}`)) + " " + e._s(i) + " ")]);
|
|
1223
|
+
}), 0) : t("span", { staticClass: "select-css tag-item no-chevron", staticStyle: { display: "inline", "min-height": "initial", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" } }, [e._v(" " + e._s(e._document.$t("vat").capitalize()) + " "), t("input", { staticStyle: { width: "calc(2.5 * var(--rem))", display: "inline", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" }, attrs: { type: "number" }, domProps: { value: e.article.vat || 0 }, on: { blur: e.onCustomVatBlur, input: e.onCustomVatInput } }), e._v(" % ")])] : e._e(), e.priceTypeOptions.length ? t("div", { staticClass: "tag-group", staticStyle: { display: "flex", "flex-direction": "row", "flex-wrap": "wrap", "margin-top": "1em" } }, e._l(e.priceTypeOptions, function({ label: i, value: n, onClick: a, tooltip: r }, c) {
|
|
1330
1224
|
return t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: {
|
|
1331
1225
|
content: r,
|
|
1332
1226
|
delay: { show: 300, hide: 0 }
|
|
1333
1227
|
}, expression: `{
|
|
1334
1228
|
content: tooltip,
|
|
1335
1229
|
delay: { show: 300, hide: 0 }
|
|
1336
|
-
}` }], key:
|
|
1337
|
-
}), 0) : e._e(), t("div", { staticStyle: { display: "flex", "flex-direction": "row", "flex-wrap": "wrap", "margin-top": "1em" } }, e._l(e.checkboxItems, function({ label:
|
|
1338
|
-
return t("div", { key:
|
|
1230
|
+
}` }], key: i + c, staticClass: "tag-item", class: { active: n }, on: { click: a } }, [e._v(" " + e._s(i) + " ")]);
|
|
1231
|
+
}), 0) : e._e(), t("div", { staticStyle: { display: "flex", "flex-direction": "row", "flex-wrap": "wrap", "margin-top": "1em" } }, e._l(e.checkboxItems, function({ label: i, value: n, onClick: a }, r) {
|
|
1232
|
+
return t("div", { key: i + r, staticClass: "tag-item", class: { active: n }, on: { click: a } }, [e._v(" " + e._s(i) + " ")]);
|
|
1339
1233
|
}), 0)], 2)], 2)]), t("div", { staticClass: "flex space-x-4 overflow-hidden p-4 md:p-9" }, [t("CButton", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: {
|
|
1340
1234
|
offset: 7,
|
|
1341
1235
|
html: !0,
|
|
@@ -1369,15 +1263,15 @@ var mt = function() {
|
|
|
1369
1263
|
</div>
|
|
1370
1264
|
\`
|
|
1371
1265
|
}` }], staticStyle: { padding: "1.75em", height: "4em", "font-size": "16px", "background-color": "hsl(231, 4%, 20%)", "border-color": "hsl(231, 4%, 20%)" }, attrs: { type: "primary", tabindex: "0", size: "large" }, on: { click: e.addNewArticle } }, [t("CIcon", { staticStyle: { margin: "-3px" }, attrs: { type: "zap", size: "21" } })], 1), t("CButton", { staticClass: "flex-grow", staticStyle: { padding: "1.75em", height: "4em", "font-size": "16px" }, attrs: { size: "large", type: "secondary", "full-width": "", tabindex: "0" }, on: { click: e.onSaveArticle } }, [e._v(" " + e._s(e.$t("save")) + " ")])], 1)], 1)]);
|
|
1372
|
-
},
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1266
|
+
}, ct = [], lt = /* @__PURE__ */ u(
|
|
1267
|
+
rt,
|
|
1268
|
+
ot,
|
|
1269
|
+
ct,
|
|
1376
1270
|
!1,
|
|
1377
1271
|
null,
|
|
1378
|
-
"
|
|
1272
|
+
"06018d45"
|
|
1379
1273
|
);
|
|
1380
|
-
const
|
|
1274
|
+
const ut = lt.exports, dt = {
|
|
1381
1275
|
i18nOptions: {
|
|
1382
1276
|
name: "ArticleListEdit",
|
|
1383
1277
|
namespaces: "ArticleListEdit",
|
|
@@ -1398,10 +1292,10 @@ const gt = vt.exports, yt = {
|
|
|
1398
1292
|
},
|
|
1399
1293
|
components: {
|
|
1400
1294
|
// eslint-disable-next-line vue/no-reserved-component-names
|
|
1401
|
-
Article:
|
|
1402
|
-
ArticleModal:
|
|
1403
|
-
WithDimensions:
|
|
1404
|
-
draggable:
|
|
1295
|
+
Article: He,
|
|
1296
|
+
ArticleModal: ut,
|
|
1297
|
+
WithDimensions: se,
|
|
1298
|
+
draggable: ae
|
|
1405
1299
|
},
|
|
1406
1300
|
mixins: [y([])],
|
|
1407
1301
|
props: {
|
|
@@ -1456,24 +1350,24 @@ const gt = vt.exports, yt = {
|
|
|
1456
1350
|
return o(this, "_document.vatType");
|
|
1457
1351
|
},
|
|
1458
1352
|
showVatToggle() {
|
|
1459
|
-
return this.useVat && (this.setPricesIncVat || (this.articles || []).some(({ vat:
|
|
1353
|
+
return this.useVat && (this.setPricesIncVat || (this.articles || []).some(({ vat: s }) => s !== null));
|
|
1460
1354
|
}
|
|
1461
1355
|
},
|
|
1462
1356
|
watch: {
|
|
1463
1357
|
activeHouseWorkType: {
|
|
1464
1358
|
immediate: !0,
|
|
1465
|
-
handler(
|
|
1466
|
-
this.toggleDeductions(
|
|
1359
|
+
handler(s) {
|
|
1360
|
+
this.toggleDeductions(s);
|
|
1467
1361
|
}
|
|
1468
1362
|
},
|
|
1469
|
-
isIndivid(
|
|
1470
|
-
|
|
1363
|
+
isIndivid(s) {
|
|
1364
|
+
s || this.toggleDeductions(!1);
|
|
1471
1365
|
},
|
|
1472
|
-
setPricesIncVat(
|
|
1366
|
+
setPricesIncVat(s) {
|
|
1473
1367
|
this.updateArticlesVatOption(), this.showMessage({
|
|
1474
1368
|
type: "info",
|
|
1475
1369
|
message: this.$t("vatOption.message", {
|
|
1476
|
-
vatOption: this.$t(`_common:vat.${
|
|
1370
|
+
vatOption: this.$t(`_common:vat.${s ? "incVat" : "exVat"}`, {
|
|
1477
1371
|
thing: this.$t("_common:vat.sharedTitle")
|
|
1478
1372
|
})
|
|
1479
1373
|
}),
|
|
@@ -1485,38 +1379,38 @@ const gt = vt.exports, yt = {
|
|
|
1485
1379
|
...v({
|
|
1486
1380
|
showMessage: p.SHOW_MESSAGE
|
|
1487
1381
|
}),
|
|
1488
|
-
openModal(
|
|
1489
|
-
this.selectedIndex =
|
|
1382
|
+
openModal(s, { focusEl: e = "" } = {}) {
|
|
1383
|
+
this.selectedIndex = s, this.showModal = !0, e && this.$nextTick(() => {
|
|
1490
1384
|
this.$nextTick(() => {
|
|
1491
1385
|
this.$refs.articleModal && this.$refs.articleModal.focusEl(e);
|
|
1492
1386
|
});
|
|
1493
1387
|
});
|
|
1494
1388
|
},
|
|
1495
|
-
updateArticleObject(
|
|
1389
|
+
updateArticleObject(s, e) {
|
|
1496
1390
|
const t = e;
|
|
1497
|
-
this.isIndivid || (t.isDeductable = !1, t.isRut = !1, t.greenRot15 = !1, t.greenRot20 = !1, t.greenRot50 = !1), this.$emit("input", { index:
|
|
1391
|
+
this.isIndivid || (t.isDeductable = !1, t.isRut = !1, t.greenRot15 = !1, t.greenRot20 = !1, t.greenRot50 = !1), this.$emit("input", { index: s, value: t });
|
|
1498
1392
|
},
|
|
1499
|
-
onRemoveArticle(
|
|
1500
|
-
this.$emit("remove",
|
|
1393
|
+
onRemoveArticle(s) {
|
|
1394
|
+
this.$emit("remove", s);
|
|
1501
1395
|
},
|
|
1502
|
-
onEsc(
|
|
1503
|
-
|
|
1396
|
+
onEsc(s, e) {
|
|
1397
|
+
s === this.articles.length - 1 && ["name", "price", "discount"].every((t) => !e[t]) && this.onRemoveArticle(s);
|
|
1504
1398
|
},
|
|
1505
1399
|
changeVat() {
|
|
1506
1400
|
this.$emit("update:setPricesIncVat", !this.setPricesIncVat);
|
|
1507
1401
|
},
|
|
1508
1402
|
updateArticlesVatOption() {
|
|
1509
|
-
this.articles.forEach((
|
|
1510
|
-
if (
|
|
1403
|
+
this.articles.forEach((s, e) => {
|
|
1404
|
+
if (s.priceType === "markup")
|
|
1511
1405
|
return;
|
|
1512
|
-
let t = g({ amount:
|
|
1513
|
-
(100 +
|
|
1406
|
+
let t = g({ amount: s.price }).divide(
|
|
1407
|
+
(100 + s.vat) * 0.01
|
|
1514
1408
|
);
|
|
1515
|
-
this.setPricesIncVat || (t = g({ amount:
|
|
1516
|
-
(100 +
|
|
1409
|
+
this.setPricesIncVat || (t = g({ amount: s.price }).multiply(
|
|
1410
|
+
(100 + s.vat) * 0.01
|
|
1517
1411
|
)), this.updateArticleObject(
|
|
1518
1412
|
e,
|
|
1519
|
-
w({ ...
|
|
1413
|
+
w({ ...s, price: t.getAmount() })
|
|
1520
1414
|
);
|
|
1521
1415
|
});
|
|
1522
1416
|
},
|
|
@@ -1529,59 +1423,59 @@ const gt = vt.exports, yt = {
|
|
|
1529
1423
|
openLastArticle() {
|
|
1530
1424
|
this.$nextTick(() => this.openModal(this.articles.length - 1));
|
|
1531
1425
|
},
|
|
1532
|
-
toggleDeductions(
|
|
1426
|
+
toggleDeductions(s) {
|
|
1533
1427
|
const e = {
|
|
1534
1428
|
rot: "isDeductable",
|
|
1535
1429
|
rut: "isRut",
|
|
1536
1430
|
greenRot15: "greenRot15",
|
|
1537
1431
|
greenRot20: "greenRot20",
|
|
1538
1432
|
greenRot50: "greenRot50"
|
|
1539
|
-
}, t = (
|
|
1540
|
-
e[
|
|
1541
|
-
const a = Object.values(
|
|
1542
|
-
if (a.some((r) => !!
|
|
1543
|
-
const r = { ...
|
|
1433
|
+
}, t = (i = []) => i.reduce((n, a) => ({ ...n, [a]: !1 }), {});
|
|
1434
|
+
e[s] ? this.articles.forEach((i, n) => {
|
|
1435
|
+
const a = Object.values(V(e, [s]));
|
|
1436
|
+
if (a.some((r) => !!i[r])) {
|
|
1437
|
+
const r = { ...i, ...t(a) };
|
|
1544
1438
|
this.$emit("input", { index: n, value: r });
|
|
1545
1439
|
}
|
|
1546
|
-
}) :
|
|
1440
|
+
}) : s === !1 && this.articles.forEach((i, n) => {
|
|
1547
1441
|
const a = Object.values(e);
|
|
1548
|
-
if (a.some((r) => !!
|
|
1549
|
-
const r = { ...
|
|
1442
|
+
if (a.some((r) => !!i[r])) {
|
|
1443
|
+
const r = { ...i, ...t(a) };
|
|
1550
1444
|
this.$emit("input", { index: n, value: r });
|
|
1551
1445
|
}
|
|
1552
1446
|
});
|
|
1553
1447
|
},
|
|
1554
|
-
onChange(
|
|
1555
|
-
const { added: e, moved: t, removed:
|
|
1448
|
+
onChange(s) {
|
|
1449
|
+
const { added: e, moved: t, removed: i } = s;
|
|
1556
1450
|
if (e) {
|
|
1557
1451
|
const { newIndex: n, element: a } = e;
|
|
1558
1452
|
this.$emit("insert", { index: n, value: a });
|
|
1559
1453
|
} else if (t) {
|
|
1560
|
-
const n =
|
|
1454
|
+
const n = T(
|
|
1561
1455
|
this.articles,
|
|
1562
1456
|
t.oldIndex,
|
|
1563
1457
|
t.newIndex
|
|
1564
1458
|
);
|
|
1565
1459
|
this.$emit("move", n);
|
|
1566
|
-
} else if (
|
|
1567
|
-
const { oldIndex: n } =
|
|
1460
|
+
} else if (i) {
|
|
1461
|
+
const { oldIndex: n } = i;
|
|
1568
1462
|
this.$emit("remove", n);
|
|
1569
1463
|
}
|
|
1570
1464
|
}
|
|
1571
1465
|
}
|
|
1572
1466
|
};
|
|
1573
|
-
var
|
|
1467
|
+
var pt = function() {
|
|
1574
1468
|
var e = this, t = e._self._c;
|
|
1575
|
-
return t("div", [e.showVatToggle ? t("div", { staticClass: "label-text" }, [e._v(" " + e._s(e.$t("vatOption.label")) + " "), t("span", { on: { click: function(
|
|
1469
|
+
return t("div", [e.showVatToggle ? t("div", { staticClass: "label-text" }, [e._v(" " + e._s(e.$t("vatOption.label")) + " "), t("span", { on: { click: function(i) {
|
|
1576
1470
|
return e.changeVat();
|
|
1577
|
-
} } }, [e._v(" " + e._s(e._document.$t(`vat.${e.setPricesIncVat ? "incVat" : "exVat"}`)) + " ")])]) : e._e(), t("WithDimensions", { scopedSlots: e._u([{ key: "default", fn: function({ width:
|
|
1471
|
+
} } }, [e._v(" " + e._s(e._document.$t(`vat.${e.setPricesIncVat ? "incVat" : "exVat"}`)) + " ")])]) : e._e(), t("WithDimensions", { scopedSlots: e._u([{ key: "default", fn: function({ width: i }) {
|
|
1578
1472
|
return [t("draggable", e._b({ staticStyle: { "min-height": "calc(3 * var(--rem))" }, attrs: { value: e.articles, group: "articles" }, on: { change: e.onChange } }, "draggable", {
|
|
1579
1473
|
sort: !0,
|
|
1580
1474
|
animation: 150,
|
|
1581
1475
|
ghostClass: "article-ghost",
|
|
1582
1476
|
handle: ".article-draggable-handle"
|
|
1583
1477
|
}, !1), [t("transition-group", { staticStyle: { position: "relative", transition: "100ms" }, attrs: { name: "article-list" } }, e._l(e.articlesWithTotal, function(n, a) {
|
|
1584
|
-
return t("Article", { key: n._uniqueId || 0, ref: "articleItem", refInFor: !0, staticClass: "article-item", attrs: { value: n, width:
|
|
1478
|
+
return t("Article", { key: n._uniqueId || 0, ref: "articleItem", refInFor: !0, staticClass: "article-item", attrs: { value: n, width: i, "hide-price-input": e.hidePriceInput, "hide-price-on-new": e.hidePriceOnNew, "is-inc-vat": e.setPricesIncVat, "hide-controls": e.hideControls, "root-price-type": e.rootPriceType, "active-house-work-type": e.activeHouseWorkType }, on: { "update:currency": function(r) {
|
|
1585
1479
|
return e.$emit("update:currency", r);
|
|
1586
1480
|
}, input: function(r) {
|
|
1587
1481
|
return e.updateArticleObject(a, r);
|
|
@@ -1599,24 +1493,24 @@ var _t = function() {
|
|
|
1599
1493
|
return e.onEsc(a, n);
|
|
1600
1494
|
} } });
|
|
1601
1495
|
}), 1)], 1)];
|
|
1602
|
-
} }]) }), t("Portal", { attrs: { to: "modal" } }, [e.showModal && e.articlesWithTotal[e.selectedIndex] ? t("ArticleModal", { ref: "articleModal", attrs: { _document: e._document, index: e.selectedIndex, "article-list": e.articlesWithTotal, "hide-price-input": e.hidePriceInput, "hide-price-on-new": e.hidePriceOnNew, "is-inc-vat": e.setPricesIncVat, "root-price-type": e.rootPriceType, currency: e.currency, "active-house-work-type": e.activeHouseWorkType, "view-settings": e.viewSettings }, on: { "update:currency": function(
|
|
1603
|
-
return e.$emit("update:currency",
|
|
1604
|
-
}, input: function(
|
|
1605
|
-
return e.updateArticleObject(e.selectedIndex,
|
|
1606
|
-
}, add: function(
|
|
1607
|
-
return e.$emit("add",
|
|
1608
|
-
}, "open-modal": e.openModal, close: function(
|
|
1496
|
+
} }]) }), t("Portal", { attrs: { to: "modal" } }, [e.showModal && e.articlesWithTotal[e.selectedIndex] ? t("ArticleModal", { ref: "articleModal", attrs: { _document: e._document, index: e.selectedIndex, "article-list": e.articlesWithTotal, "hide-price-input": e.hidePriceInput, "hide-price-on-new": e.hidePriceOnNew, "is-inc-vat": e.setPricesIncVat, "root-price-type": e.rootPriceType, currency: e.currency, "active-house-work-type": e.activeHouseWorkType, "view-settings": e.viewSettings }, on: { "update:currency": function(i) {
|
|
1497
|
+
return e.$emit("update:currency", i);
|
|
1498
|
+
}, input: function(i) {
|
|
1499
|
+
return e.updateArticleObject(e.selectedIndex, i);
|
|
1500
|
+
}, add: function(i) {
|
|
1501
|
+
return e.$emit("add", i);
|
|
1502
|
+
}, "open-modal": e.openModal, close: function(i) {
|
|
1609
1503
|
e.showModal = !1;
|
|
1610
1504
|
} } }) : e._e()], 1)], 1);
|
|
1611
|
-
},
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1505
|
+
}, ht = [], mt = /* @__PURE__ */ u(
|
|
1506
|
+
dt,
|
|
1507
|
+
pt,
|
|
1508
|
+
ht,
|
|
1615
1509
|
!1,
|
|
1616
1510
|
null,
|
|
1617
1511
|
"3e63aac7"
|
|
1618
1512
|
);
|
|
1619
|
-
const
|
|
1513
|
+
const ft = mt.exports, vt = {
|
|
1620
1514
|
name: "MaxTotalInput",
|
|
1621
1515
|
i18nOptions: {
|
|
1622
1516
|
namespaces: "MaxTotalInput",
|
|
@@ -1630,7 +1524,7 @@ const bt = $t.exports, xt = {
|
|
|
1630
1524
|
}
|
|
1631
1525
|
},
|
|
1632
1526
|
components: {
|
|
1633
|
-
|
|
1527
|
+
CPriceInput: x
|
|
1634
1528
|
},
|
|
1635
1529
|
props: {
|
|
1636
1530
|
value: {
|
|
@@ -1648,7 +1542,7 @@ const bt = $t.exports, xt = {
|
|
|
1648
1542
|
},
|
|
1649
1543
|
data() {
|
|
1650
1544
|
return {
|
|
1651
|
-
getCurrencySymbol:
|
|
1545
|
+
getCurrencySymbol: C
|
|
1652
1546
|
};
|
|
1653
1547
|
},
|
|
1654
1548
|
computed: {
|
|
@@ -1657,26 +1551,26 @@ const bt = $t.exports, xt = {
|
|
|
1657
1551
|
})
|
|
1658
1552
|
},
|
|
1659
1553
|
watch: {
|
|
1660
|
-
isIncVat(
|
|
1554
|
+
isIncVat(s) {
|
|
1661
1555
|
let e = g({ amount: this.value }).divide(1.25);
|
|
1662
|
-
|
|
1556
|
+
s || (e = g({ amount: this.value }).multiply(125 * 0.01)), this.$emit("input", e.getAmount());
|
|
1663
1557
|
}
|
|
1664
1558
|
}
|
|
1665
1559
|
};
|
|
1666
|
-
var
|
|
1560
|
+
var gt = function() {
|
|
1667
1561
|
var e = this, t = e._self._c;
|
|
1668
|
-
return t("div", { staticClass: "flex w-full justify-end" }, [t("
|
|
1669
|
-
return e.$emit("input",
|
|
1670
|
-
} } }, [t("template", { slot: "prefix" }, [e._v(e._s(e.$t("price.maxPrice").capitalize()))]), t("template", { slot: "suffix" }, [e._v(e._s(e.getCurrencySymbol(e.currency)) + " " + e._s(e.$t(`vat.${e.isIncVat ? "incVat" : "exVat"}`, { thing: e.$t(`vat.${e.vatType}`) })))])], 2)], 1);
|
|
1671
|
-
},
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1562
|
+
return t("div", { staticClass: "flex w-full justify-end" }, [t("CPriceInput", { staticClass: "mt-4 max-w-[275px] text-sm", attrs: { value: e.value, currency: e.currency, "is-inc-vat": e.isIncVat, vat: 25, placeholder: e.$t("maxTotalLabel"), min: "0", "prefix-class": "text-gray-400", "suffix-class": "text-gray-400" }, on: { input: function(i) {
|
|
1563
|
+
return e.$emit("input", i);
|
|
1564
|
+
} } }, [t("template", { slot: "prefix" }, [e._v(e._s(e.$t("price.maxPrice").capitalize()))]), t("template", { slot: "suffix" }, [t("span", [e._v(" " + e._s(e.getCurrencySymbol(e.currency)) + " " + e._s(e.$t(`vat.${e.isIncVat ? "incVat" : "exVat"}`, { thing: e.$t(`vat.${e.vatType}`) })) + " ")])])], 2)], 1);
|
|
1565
|
+
}, yt = [], _t = /* @__PURE__ */ u(
|
|
1566
|
+
vt,
|
|
1567
|
+
gt,
|
|
1568
|
+
yt,
|
|
1675
1569
|
!1,
|
|
1676
1570
|
null,
|
|
1677
|
-
|
|
1571
|
+
null
|
|
1678
1572
|
);
|
|
1679
|
-
const
|
|
1573
|
+
const kt = _t.exports, $t = {
|
|
1680
1574
|
props: {
|
|
1681
1575
|
value: {
|
|
1682
1576
|
type: String,
|
|
@@ -1689,25 +1583,25 @@ const Tt = It.exports, At = {
|
|
|
1689
1583
|
};
|
|
1690
1584
|
}
|
|
1691
1585
|
};
|
|
1692
|
-
var
|
|
1586
|
+
var xt = function() {
|
|
1693
1587
|
var e = this, t = e._self._c;
|
|
1694
|
-
return t("div", { staticClass: "flex justify-end" }, [t("CDropdown", { attrs: { value: e.value } }, [t("CButton", { staticClass: "price-type-button", attrs: { slot: "trigger" }, slot: "trigger" }, [e._v(" " + e._s(e.$t("price.pricing").capitalize()) + ": "), t("span", [e._v(e._s(e.$t(`price.${e.value}`)))])]), e._l(e.priceTypeOptions, function(
|
|
1695
|
-
return t("CDropdownItem", { key:
|
|
1696
|
-
return e.$emit("input",
|
|
1697
|
-
} } }, [e._v(" " + e._s(e.$t(`price.${
|
|
1588
|
+
return t("div", { staticClass: "flex justify-end" }, [t("CDropdown", { attrs: { value: e.value } }, [t("CButton", { staticClass: "price-type-button", attrs: { slot: "trigger" }, slot: "trigger" }, [e._v(" " + e._s(e.$t("price.pricing").capitalize()) + ": "), t("span", [e._v(e._s(e.$t(`price.${e.value}`)))])]), e._l(e.priceTypeOptions, function(i) {
|
|
1589
|
+
return t("CDropdownItem", { key: i, staticClass: "text-right", attrs: { value: i }, on: { click: function(n) {
|
|
1590
|
+
return e.$emit("input", i);
|
|
1591
|
+
} } }, [e._v(" " + e._s(e.$t(`price.${i}`)) + " ")]);
|
|
1698
1592
|
})], 2)], 1);
|
|
1699
|
-
},
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1593
|
+
}, bt = [], wt = /* @__PURE__ */ u(
|
|
1594
|
+
$t,
|
|
1595
|
+
xt,
|
|
1596
|
+
bt,
|
|
1703
1597
|
!1,
|
|
1704
1598
|
null,
|
|
1705
1599
|
"13ef0942"
|
|
1706
1600
|
);
|
|
1707
|
-
const
|
|
1601
|
+
const Ct = wt.exports, Tt = {
|
|
1708
1602
|
name: "EditDeduction",
|
|
1709
1603
|
components: {
|
|
1710
|
-
|
|
1604
|
+
CPriceInput: x
|
|
1711
1605
|
},
|
|
1712
1606
|
mixins: [y(["houseWorkManualAmount"])],
|
|
1713
1607
|
props: {
|
|
@@ -1735,20 +1629,20 @@ const Dt = Vt.exports, Rt = {
|
|
|
1735
1629
|
};
|
|
1736
1630
|
},
|
|
1737
1631
|
watch: {
|
|
1738
|
-
houseWorkType(
|
|
1739
|
-
|
|
1632
|
+
houseWorkType(s) {
|
|
1633
|
+
s || (this.houseWorkManualAmount = null);
|
|
1740
1634
|
}
|
|
1741
1635
|
},
|
|
1742
1636
|
methods: {
|
|
1743
|
-
setDeduction(
|
|
1744
|
-
this.internalValue = g({ amount: this.total }).multiply(
|
|
1637
|
+
setDeduction(s) {
|
|
1638
|
+
this.internalValue = g({ amount: this.total }).multiply(s).getAmount();
|
|
1745
1639
|
},
|
|
1746
1640
|
showModal() {
|
|
1747
1641
|
this.internalValue = this.houseWorkAmount, this.$modal.show(`deduction-modal-${this._uid}`);
|
|
1748
1642
|
}
|
|
1749
1643
|
}
|
|
1750
1644
|
};
|
|
1751
|
-
var
|
|
1645
|
+
var It = function() {
|
|
1752
1646
|
var e = this, t = e._self._c;
|
|
1753
1647
|
return t("div", [t("modal", e._b({ attrs: { name: `deduction-modal-${e._uid}` } }, "modal", {
|
|
1754
1648
|
adaptive: !0,
|
|
@@ -1756,9 +1650,11 @@ var Ot = function() {
|
|
|
1756
1650
|
width: "90%",
|
|
1757
1651
|
maxWidth: 420,
|
|
1758
1652
|
classes: "primary"
|
|
1759
|
-
}, !1), [t("div", { staticClass: "deduction-modal flex w-full flex-col items-center justify-between" }, [t("div", { staticStyle: { "font-size": "calc(calc(1 * var(--rem)) + 2px)", "font-weight": "800", "text-align": "center", "margin-bottom": "calc(1.5 * var(--rem))" } }, [e._v(" " + e._s(e.$t("deduction.manualType", { type: e.houseWorkType })) + " ")]), t("div", { staticStyle: { "margin-bottom": "calc(1 * var(--rem))", width: "100%" } }, [t("
|
|
1760
|
-
e.
|
|
1761
|
-
},
|
|
1653
|
+
}, !1), [t("div", { staticClass: "deduction-modal flex w-full flex-col items-center justify-between rounded-lg" }, [t("div", { staticStyle: { "font-size": "calc(calc(1 * var(--rem)) + 2px)", "font-weight": "800", "text-align": "center", "margin-bottom": "calc(1.5 * var(--rem))" } }, [e._v(" " + e._s(e.$t("deduction.manualType", { type: e.houseWorkType })) + " ")]), t("div", { staticStyle: { "margin-bottom": "calc(1 * var(--rem))", width: "100%" } }, [t("CPriceInput", { attrs: { currency: "SEK", placeholder: e.$t("enterThing", { thing: e.$t("deduction.deduction") }), min: "0", size: "medium", "suffix-class": "text-gray-400" }, scopedSlots: e._u([{ key: "suffix", fn: function() {
|
|
1654
|
+
return [e._v(e._s(e.$t("currency.SEK")))];
|
|
1655
|
+
}, proxy: !0 }]), model: { value: e.internalValue, callback: function(i) {
|
|
1656
|
+
e.internalValue = e._n(i);
|
|
1657
|
+
}, expression: "internalValue" } })], 1), t("div", { staticClass: "flex w-full flex-wrap justify-center gap-2" }, e._l([
|
|
1762
1658
|
{ v: 0.09, l: "9%" },
|
|
1763
1659
|
{ v: 0.105, l: "10.5%" },
|
|
1764
1660
|
{ v: 0.1455, l: "14.55%" },
|
|
@@ -1766,31 +1662,31 @@ var Ot = function() {
|
|
|
1766
1662
|
{ v: 0.21, l: "21%" },
|
|
1767
1663
|
{ v: 0.485, l: "48.5%" },
|
|
1768
1664
|
{ v: 0.5, l: "50%" }
|
|
1769
|
-
], function(
|
|
1770
|
-
return t("div", { key:
|
|
1771
|
-
active: Math.round(e.total *
|
|
1665
|
+
], function(i) {
|
|
1666
|
+
return t("div", { key: i.l, staticClass: "deduction-button", class: {
|
|
1667
|
+
active: Math.round(e.total * i.v * 0.01) * 100 === e.internalValue
|
|
1772
1668
|
}, on: { click: function(n) {
|
|
1773
|
-
return e.setDeduction(
|
|
1774
|
-
} } }, [e._v(" " + e._s(
|
|
1775
|
-
}), 0), t("CButton", { staticClass: "mt-8", attrs: { type: "secondary", wide: "" }, on: { click: function(
|
|
1669
|
+
return e.setDeduction(i.v);
|
|
1670
|
+
} } }, [e._v(" " + e._s(i.l) + " ")]);
|
|
1671
|
+
}), 0), t("CButton", { staticClass: "mt-8", attrs: { type: "secondary", wide: "" }, on: { click: function(i) {
|
|
1776
1672
|
e.houseWorkManualAmount = e.internalValue, e.$modal.hide(`deduction-modal-${e._uid}`);
|
|
1777
|
-
} } }, [e._v(" " + e._s(e.$t("save")) + " ")]), t("CButton", { staticClass: "mt-2", attrs: { type: "secondary", pattern: "tertiary", wide: "" }, on: { click: function(
|
|
1673
|
+
} } }, [e._v(" " + e._s(e.$t("save")) + " ")]), t("CButton", { staticClass: "mt-2", attrs: { type: "secondary", pattern: "tertiary", wide: "" }, on: { click: function(i) {
|
|
1778
1674
|
e.houseWorkManualAmount = null, e.$modal.hide(`deduction-modal-${e._uid}`);
|
|
1779
|
-
} } }, [e._v(" " + e._s(e.$t("reset")) + " ")])], 1)]), e.houseWorkManualAmount ? t("portal", { attrs: { order: 2, to: "document-nav-bottom" } }, [t("div", { staticClass: "housework-manual-nav", on: { click: function(
|
|
1675
|
+
} } }, [e._v(" " + e._s(e.$t("reset")) + " ")])], 1)]), e.houseWorkManualAmount ? t("portal", { attrs: { order: 2, to: "document-nav-bottom" } }, [t("div", { staticClass: "housework-manual-nav", on: { click: function(i) {
|
|
1780
1676
|
return e.$modal.show(`deduction-modal-${e._uid}`);
|
|
1781
1677
|
} } }, [t("svg", { staticClass: "css-i6dzq1", staticStyle: { "margin-right": "0.5em" }, attrs: { viewBox: "0 0 24 24", width: "12", height: "12", stroke: "currentColor", "stroke-width": "2", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("path", { attrs: { 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" } }), t("line", { attrs: { x1: "12", y1: "9", x2: "12", y2: "13" } }), t("line", { attrs: { x1: "12", y1: "17", x2: "12.01", y2: "17" } })]), e._v(" " + e._s(e.$t("deduction.manualType", { type: e.houseWorkType })) + " " + e._s(e.$t("using")) + " ")])]) : e._e()], 1);
|
|
1782
|
-
},
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1678
|
+
}, At = [], Pt = /* @__PURE__ */ u(
|
|
1679
|
+
Tt,
|
|
1680
|
+
It,
|
|
1681
|
+
At,
|
|
1786
1682
|
!1,
|
|
1787
1683
|
null,
|
|
1788
|
-
"
|
|
1684
|
+
"f3ba2092"
|
|
1789
1685
|
);
|
|
1790
|
-
const
|
|
1686
|
+
const St = Pt.exports, Vt = {
|
|
1791
1687
|
name: "Pricing",
|
|
1792
1688
|
components: {
|
|
1793
|
-
EditDeduction:
|
|
1689
|
+
EditDeduction: St
|
|
1794
1690
|
},
|
|
1795
1691
|
props: {
|
|
1796
1692
|
_document: {
|
|
@@ -1876,34 +1772,34 @@ const Et = Mt.exports, zt = {
|
|
|
1876
1772
|
}));
|
|
1877
1773
|
},
|
|
1878
1774
|
prices() {
|
|
1879
|
-
const { prices:
|
|
1775
|
+
const { prices: s } = this._document.packageGroups.getPackageById(
|
|
1880
1776
|
this.packageId
|
|
1881
1777
|
);
|
|
1882
|
-
return
|
|
1778
|
+
return s;
|
|
1883
1779
|
},
|
|
1884
1780
|
showHouseWork() {
|
|
1885
1781
|
return !!o(this.prices, "region.houseWorkType", !1) || !!o(this.prices, "region.houseWorkManualAmount", !1);
|
|
1886
1782
|
}
|
|
1887
1783
|
}
|
|
1888
1784
|
};
|
|
1889
|
-
var
|
|
1785
|
+
var Rt = function() {
|
|
1890
1786
|
var e = this, t = e._self._c;
|
|
1891
1787
|
return t("div", { staticClass: "price-bubble" }, [t("div", { staticClass: "flex w-full items-center justify-between" }, [e.showHouseWork ? t("EditDeduction", e._g({ ref: "deduction", attrs: { disabled: !e.get(e.prices, "region.houseWorkType", !1), _document: e._document, _value: {
|
|
1892
1788
|
houseWorkManualAmount: `${e.basePath}.data.prices.region.houseWorkManualAmount`
|
|
1893
|
-
}, "house-work-type": e.prices.region.houseWorkType, "house-work-amount": e.prices.region.houseWorkAmount, total: e.prices.subTotal + e.prices.taxAmount } }, e.$listeners)) : e._e()], 1), t("div", e._l(e.priceArray, function(
|
|
1894
|
-
return t("div", { key: n, staticClass: "price-row flex w-full justify-between", class: [
|
|
1895
|
-
|
|
1896
|
-
} } }, [t("svg", { attrs: { viewBox: "0 0 24 24", width: "15", height: "15", stroke: "currentColor", "stroke-width": "2.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("path", { attrs: { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" } }), t("path", { attrs: { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" } })])]) : e._e()]), t("div", { staticClass: "price-value" }, [e._v(" " + e._s(
|
|
1789
|
+
}, "house-work-type": e.prices.region.houseWorkType, "house-work-amount": e.prices.region.houseWorkAmount, total: e.prices.subTotal + e.prices.taxAmount } }, e.$listeners)) : e._e()], 1), t("div", e._l(e.priceArray, function(i, n) {
|
|
1790
|
+
return t("div", { key: n, staticClass: "price-row flex w-full justify-between", class: [i.classList || ""] }, [t("div", { staticClass: "price-label" }, [e._v(" " + e._s(i.label.capitalize()) + " "), i.subLabel ? t("span", { staticClass: "pricing-sub-label" }, [e._v(" " + e._s(i.subLabel) + " ")]) : e._e(), i.action ? t("span", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.$t("edit", { thing: e.$t("deduction.deduction") }), expression: "$t('edit', { thing: $t('deduction.deduction') })" }], staticClass: "pricing-action", on: { click: function(a) {
|
|
1791
|
+
i.action && i.action();
|
|
1792
|
+
} } }, [t("svg", { attrs: { viewBox: "0 0 24 24", width: "15", height: "15", stroke: "currentColor", "stroke-width": "2.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("path", { attrs: { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" } }), t("path", { attrs: { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" } })])]) : e._e()]), t("div", { staticClass: "price-value" }, [e._v(" " + e._s(i.prefix) + " " + e._s(i.value) + " ")])]);
|
|
1897
1793
|
}), 0)]);
|
|
1898
|
-
},
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1794
|
+
}, Dt = [], Ot = /* @__PURE__ */ u(
|
|
1795
|
+
Vt,
|
|
1796
|
+
Rt,
|
|
1797
|
+
Dt,
|
|
1902
1798
|
!1,
|
|
1903
1799
|
null,
|
|
1904
1800
|
"d22ef0b4"
|
|
1905
1801
|
);
|
|
1906
|
-
const
|
|
1802
|
+
const Mt = Ot.exports, Lt = {
|
|
1907
1803
|
name: "PackageItemEdit",
|
|
1908
1804
|
i18nOptions: {
|
|
1909
1805
|
namespaces: "PackageItemEdit",
|
|
@@ -1931,11 +1827,11 @@ const jt = Ft.exports, Nt = {
|
|
|
1931
1827
|
}
|
|
1932
1828
|
},
|
|
1933
1829
|
components: {
|
|
1934
|
-
ArticleList:
|
|
1935
|
-
PriceFormAlternatives:
|
|
1936
|
-
MaxTotalInput:
|
|
1937
|
-
Pricing:
|
|
1938
|
-
TextEditor:
|
|
1830
|
+
ArticleList: ft,
|
|
1831
|
+
PriceFormAlternatives: Ct,
|
|
1832
|
+
MaxTotalInput: kt,
|
|
1833
|
+
Pricing: Mt,
|
|
1834
|
+
TextEditor: ie
|
|
1939
1835
|
},
|
|
1940
1836
|
mixins: [
|
|
1941
1837
|
y([
|
|
@@ -1985,31 +1881,31 @@ const jt = Ft.exports, Nt = {
|
|
|
1985
1881
|
return this._document.allArticles;
|
|
1986
1882
|
},
|
|
1987
1883
|
mappedPackageArticles() {
|
|
1988
|
-
return (this.articles || []).map((
|
|
1884
|
+
return (this.articles || []).map((s, e) => ({ ...s, i: e })).filter(({ packageId: s }) => s === this.packageId);
|
|
1989
1885
|
},
|
|
1990
1886
|
internalDescription: {
|
|
1991
1887
|
get() {
|
|
1992
|
-
return
|
|
1888
|
+
return J(
|
|
1993
1889
|
this.description,
|
|
1994
1890
|
this._document.textTemplateMap,
|
|
1995
1891
|
this._document._doc
|
|
1996
1892
|
);
|
|
1997
1893
|
},
|
|
1998
|
-
set(
|
|
1999
|
-
this.description =
|
|
1894
|
+
set(s) {
|
|
1895
|
+
this.description = Q(s);
|
|
2000
1896
|
}
|
|
2001
1897
|
}
|
|
2002
1898
|
},
|
|
2003
1899
|
watch: {
|
|
2004
|
-
priceType(
|
|
2005
|
-
if (!(
|
|
2006
|
-
if (
|
|
2007
|
-
const t =
|
|
2008
|
-
this.mappedPackageArticles.forEach((
|
|
1900
|
+
priceType(s, e) {
|
|
1901
|
+
if (!(s && s.startsWith("open") && e && e.startsWith("open"))) {
|
|
1902
|
+
if (s) {
|
|
1903
|
+
const t = s.startsWith("open") ? "openAcc" : s;
|
|
1904
|
+
this.mappedPackageArticles.forEach((i, n) => {
|
|
2009
1905
|
this.onArticleInput({
|
|
2010
1906
|
index: n,
|
|
2011
1907
|
value: {
|
|
2012
|
-
...
|
|
1908
|
+
...i,
|
|
2013
1909
|
priceType: t,
|
|
2014
1910
|
...t === "openAcc" && { quantity: 1 }
|
|
2015
1911
|
}
|
|
@@ -2017,7 +1913,7 @@ const jt = Ft.exports, Nt = {
|
|
|
2017
1913
|
});
|
|
2018
1914
|
}
|
|
2019
1915
|
}
|
|
2020
|
-
|
|
1916
|
+
s !== "openAccMaxPrice" && (this.maxTotal = null);
|
|
2021
1917
|
}
|
|
2022
1918
|
},
|
|
2023
1919
|
methods: {
|
|
@@ -2026,77 +1922,77 @@ const jt = Ft.exports, Nt = {
|
|
|
2026
1922
|
},
|
|
2027
1923
|
// Article Methods
|
|
2028
1924
|
createEmptyArticle() {
|
|
2029
|
-
const
|
|
1925
|
+
const s = this.newArticle({
|
|
2030
1926
|
priceType: this.priceType.startsWith("open") ? "openAcc" : this.priceType,
|
|
2031
1927
|
packageId: this.packageId,
|
|
2032
1928
|
currency: this.currency
|
|
2033
1929
|
});
|
|
2034
1930
|
this.$emit("input", {
|
|
2035
1931
|
key: "articles",
|
|
2036
|
-
value: [...this.articles,
|
|
1932
|
+
value: [...this.articles, s]
|
|
2037
1933
|
});
|
|
2038
1934
|
},
|
|
2039
|
-
onArticleInput({ index:
|
|
2040
|
-
const { i: t } = this.mappedPackageArticles[
|
|
1935
|
+
onArticleInput({ index: s, value: e }) {
|
|
1936
|
+
const { i: t } = this.mappedPackageArticles[s], i = X(e, [
|
|
2041
1937
|
"allowRot",
|
|
2042
1938
|
"allowRut",
|
|
2043
1939
|
"isIncVat",
|
|
2044
1940
|
"rootPriceType",
|
|
2045
1941
|
"hideControls"
|
|
2046
1942
|
]);
|
|
2047
|
-
|
|
1943
|
+
i.currency = this.currency, this.$emit("input", { key: `articles[${[t]}]`, value: i });
|
|
2048
1944
|
},
|
|
2049
|
-
onArticleAdd({ openModal:
|
|
2050
|
-
this.createEmptyArticle(),
|
|
1945
|
+
onArticleAdd({ openModal: s = !1 } = {}) {
|
|
1946
|
+
this.createEmptyArticle(), s ? this.$refs.articleList.openLastArticle() : this.$refs.articleList.focusLastArticle();
|
|
2051
1947
|
},
|
|
2052
|
-
onInsert({ index:
|
|
2053
|
-
const t =
|
|
1948
|
+
onInsert({ index: s, value: e }) {
|
|
1949
|
+
const t = ee(this.mappedPackageArticles).add(
|
|
2054
1950
|
{ ...e, packageId: this.packageId },
|
|
2055
|
-
|
|
1951
|
+
s
|
|
2056
1952
|
);
|
|
2057
1953
|
this.$emit("input", {
|
|
2058
1954
|
key: "articles",
|
|
2059
1955
|
value: [
|
|
2060
1956
|
...this.articles.filter(
|
|
2061
|
-
({ packageId:
|
|
1957
|
+
({ packageId: i }) => i !== this.packageId
|
|
2062
1958
|
),
|
|
2063
1959
|
...t
|
|
2064
1960
|
]
|
|
2065
1961
|
});
|
|
2066
1962
|
},
|
|
2067
|
-
onArticleRemove(
|
|
2068
|
-
const { i: e } = this.mappedPackageArticles[
|
|
1963
|
+
onArticleRemove(s) {
|
|
1964
|
+
const { i: e } = this.mappedPackageArticles[s];
|
|
2069
1965
|
this.$emit("remove", { key: `articles[${[e]}]` });
|
|
2070
1966
|
},
|
|
2071
|
-
onArticleMove(
|
|
1967
|
+
onArticleMove(s) {
|
|
2072
1968
|
this.$emit("input", {
|
|
2073
1969
|
key: "articles",
|
|
2074
1970
|
value: [
|
|
2075
1971
|
...this.articles.filter(
|
|
2076
1972
|
({ packageId: e }) => e !== this.packageId
|
|
2077
1973
|
),
|
|
2078
|
-
...
|
|
1974
|
+
...s
|
|
2079
1975
|
]
|
|
2080
1976
|
});
|
|
2081
1977
|
}
|
|
2082
1978
|
}
|
|
2083
1979
|
};
|
|
2084
|
-
var
|
|
1980
|
+
var Et = function() {
|
|
2085
1981
|
var e = this, t = e._self._c;
|
|
2086
|
-
return t("div", { staticClass: "min-h-0 rounded-md border border-gray-200 bg-white text-black" }, [t("div", { staticClass: "flex w-full items-center justify-between bg-gray-100 py-1 pl-4 pr-1 text-sm font-medium text-gray-600" }, [t("div", [e._v(" " + e._s(e.type === "single" ? e.$t("single") : e.type === "radio" || e.toggable ? e.$t("option") : e.$t("base")) + " ")]), e.type !== "single" ? t("CDropdown", { staticClass: "ml-4" }, [t("CButton", { staticClass: "is-thinner opacity-70", attrs: { slot: "trigger", size: "small", type: "text", pattern: "secondary" }, slot: "trigger" }, [e._v(" " + e._s(e.$t("_common:change")) + " ")]), e.toggable ? [t("CDropdownItem", { attrs: { value: e.isSelectedDefault, toggle: !0, "close-on-click": !1 }, on: { click: function(
|
|
1982
|
+
return t("div", { staticClass: "min-h-0 rounded-md border border-gray-200 bg-white text-black" }, [t("div", { staticClass: "flex w-full items-center justify-between bg-gray-100 py-1 pl-4 pr-1 text-sm font-medium text-gray-600" }, [t("div", [e._v(" " + e._s(e.type === "single" ? e.$t("single") : e.type === "radio" || e.toggable ? e.$t("option") : e.$t("base")) + " ")]), e.type !== "single" ? t("CDropdown", { staticClass: "ml-4" }, [t("CButton", { staticClass: "is-thinner opacity-70", attrs: { slot: "trigger", size: "small", type: "text", pattern: "secondary" }, slot: "trigger" }, [e._v(" " + e._s(e.$t("_common:change")) + " ")]), e.toggable ? [t("CDropdownItem", { attrs: { value: e.isSelectedDefault, toggle: !0, "close-on-click": !1 }, on: { click: function(i) {
|
|
2087
1983
|
return e.$emit("update:isSelectedDefault", !e.isSelectedDefault);
|
|
2088
|
-
} } }, [e._v(" " + e._s(e.$t("selected")) + " ")]), t("CDropdownItem", { attrs: { separator: "" } })] : e._e(), t("CDropdownItem", { attrs: { "icon-left": "arrow-up", disabled: !e.moveOptions.up }, on: { click: function(
|
|
1984
|
+
} } }, [e._v(" " + e._s(e.$t("selected")) + " ")]), t("CDropdownItem", { attrs: { separator: "" } })] : e._e(), t("CDropdownItem", { attrs: { "icon-left": "arrow-up", disabled: !e.moveOptions.up }, on: { click: function(i) {
|
|
2089
1985
|
return e.$emit("move", -1);
|
|
2090
|
-
} } }, [e._v(" " + e._s(e.$t("_common:move", { thing: e.$t("_common:up") })) + " ")]), t("CDropdownItem", { attrs: { "icon-left": "arrow-down", disabled: !e.moveOptions.down }, on: { click: function(
|
|
1986
|
+
} } }, [e._v(" " + e._s(e.$t("_common:move", { thing: e.$t("_common:up") })) + " ")]), t("CDropdownItem", { attrs: { "icon-left": "arrow-down", disabled: !e.moveOptions.down }, on: { click: function(i) {
|
|
2091
1987
|
return e.$emit("move", 1);
|
|
2092
1988
|
} } }, [e._v(" " + e._s(e.$t("_common:move", { thing: e.$t("_common:down") })) + " ")]), t("CDropdownItem", { attrs: { "icon-props": {
|
|
2093
1989
|
stroke: "red"
|
|
2094
|
-
}, "icon-left": "trash" }, on: { click: e.onRemove } }, [e._v(" " + e._s(e.$t("_common:remove")) + " ")])], 2) : e._e()], 1), t("div", { staticClass: "p-4" }, [t("div", { staticClass: "mb-0.5 flex items-center" }, [t("input", { directives: [{ name: "model", rawName: "v-model", value: e.name, expression: "name" }], staticClass: "block w-full rounded-lg p-0 text-xl font-bold leading-loose placeholder:text-gray-400", attrs: { id: `package-name-${e.packageId}`, placeholder: e.$t("namePlaceholder") }, domProps: { value: e.name }, on: { keyup: function(
|
|
2095
|
-
return !
|
|
2096
|
-
}, input: function(
|
|
2097
|
-
|
|
2098
|
-
} } })]), t("TextEditor", { ref: "editor", staticClass: "text-editor mb-4", attrs: { placeholder: e.$t("textPlaceholder"), mentions: () => e._document.textTemplateItems, snippets: !0 }, model: { value: e.internalDescription, callback: function(
|
|
2099
|
-
e.internalDescription =
|
|
1990
|
+
}, "icon-left": "trash" }, on: { click: e.onRemove } }, [e._v(" " + e._s(e.$t("_common:remove")) + " ")])], 2) : e._e()], 1), t("div", { staticClass: "p-4" }, [t("div", { staticClass: "mb-0.5 flex items-center" }, [t("input", { directives: [{ name: "model", rawName: "v-model", value: e.name, expression: "name" }], staticClass: "block w-full rounded-lg p-0 text-xl font-bold leading-loose placeholder:text-gray-400", attrs: { id: `package-name-${e.packageId}`, placeholder: e.$t("namePlaceholder") }, domProps: { value: e.name }, on: { keyup: function(i) {
|
|
1991
|
+
return !i.type.indexOf("key") && e._k(i.keyCode, "enter", 13, i.key, "Enter") ? null : e.$refs.editor.focus();
|
|
1992
|
+
}, input: function(i) {
|
|
1993
|
+
i.target.composing || (e.name = i.target.value);
|
|
1994
|
+
} } })]), t("TextEditor", { ref: "editor", staticClass: "text-editor mb-4", attrs: { placeholder: e.$t("textPlaceholder"), mentions: () => e._document.textTemplateItems, snippets: !0 }, model: { value: e.internalDescription, callback: function(i) {
|
|
1995
|
+
e.internalDescription = i;
|
|
2100
1996
|
}, expression: "internalDescription" } }), t("div", { directives: [{ name: "click-outside", rawName: "v-click-outside", value: () => {
|
|
2101
1997
|
e.isFocus = !1, e.isHover = !1;
|
|
2102
1998
|
}, expression: `
|
|
@@ -2104,23 +2000,23 @@ var Ht = function() {
|
|
|
2104
2000
|
isFocus = false
|
|
2105
2001
|
isHover = false
|
|
2106
2002
|
}
|
|
2107
|
-
` }], on: { "&mouseover": function(
|
|
2003
|
+
` }], on: { "&mouseover": function(i) {
|
|
2108
2004
|
e.isHover = !0;
|
|
2109
|
-
}, "&mouseleave": function(
|
|
2005
|
+
}, "&mouseleave": function(i) {
|
|
2110
2006
|
e.isHover = !1;
|
|
2111
|
-
} } }, [e.priceType === "openAccMaxPrice" ? t("MaxTotalInput", { staticClass: "mb-4", attrs: { currency: e.currency, "vat-type": e._document.vatType }, model: { value: e.maxTotal, callback: function(
|
|
2112
|
-
e.maxTotal =
|
|
2113
|
-
}, expression: "maxTotal" } }) : e._e(), t("PriceFormAlternatives", { on: { input: function(
|
|
2114
|
-
return e.$emit("update:priceType",
|
|
2115
|
-
} }, model: { value: e.priceType, callback: function(
|
|
2116
|
-
e.priceType =
|
|
2117
|
-
}, expression: "priceType" } }), t("ArticleList", { ref: "articleList", attrs: { _document: e._document, articles: e.mappedPackageArticles, "root-price-type": e.priceType, "active-house-work-type": e.activeHouseWorkType, "hide-controls": !e.isFocus && !e.isHover }, on: { input: e.onArticleInput, "update:setPricesIncVat": function(
|
|
2118
|
-
return e.$emit("update:setPricesIncVat",
|
|
2119
|
-
}, "update:currency": function(
|
|
2120
|
-
return e.$emit("update:currency",
|
|
2121
|
-
}, move: e.onArticleMove, remove: e.onArticleRemove, add: e.onArticleAdd, focus: function(
|
|
2007
|
+
} } }, [e.priceType === "openAccMaxPrice" ? t("MaxTotalInput", { staticClass: "mb-4", attrs: { currency: e.currency, "vat-type": e._document.vatType }, model: { value: e.maxTotal, callback: function(i) {
|
|
2008
|
+
e.maxTotal = i;
|
|
2009
|
+
}, expression: "maxTotal" } }) : e._e(), t("PriceFormAlternatives", { on: { input: function(i) {
|
|
2010
|
+
return e.$emit("update:priceType", i);
|
|
2011
|
+
} }, model: { value: e.priceType, callback: function(i) {
|
|
2012
|
+
e.priceType = i;
|
|
2013
|
+
}, expression: "priceType" } }), t("ArticleList", { ref: "articleList", attrs: { _document: e._document, articles: e.mappedPackageArticles, "root-price-type": e.priceType, "active-house-work-type": e.activeHouseWorkType, "hide-controls": !e.isFocus && !e.isHover }, on: { input: e.onArticleInput, "update:setPricesIncVat": function(i) {
|
|
2014
|
+
return e.$emit("update:setPricesIncVat", i);
|
|
2015
|
+
}, "update:currency": function(i) {
|
|
2016
|
+
return e.$emit("update:currency", i);
|
|
2017
|
+
}, move: e.onArticleMove, remove: e.onArticleRemove, add: e.onArticleAdd, focus: function(i) {
|
|
2122
2018
|
e.isFocus = !0;
|
|
2123
|
-
}, insert: e.onInsert } }), t("div", { staticClass: "mt-2 flex gap-2" }, [t("div", { staticClass: "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", on: { click: function(
|
|
2019
|
+
}, insert: e.onInsert } }), t("div", { staticClass: "mt-2 flex gap-2" }, [t("div", { staticClass: "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", on: { click: function(i) {
|
|
2124
2020
|
return e.onArticleAdd();
|
|
2125
2021
|
} } }, [t("CIcon", { staticClass: "mr-1", attrs: { type: "plus", size: "16", "stroke-width": "3" } }), e._v(" " + e._s(e.$t("addButton")) + " ")], 1), t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: {
|
|
2126
2022
|
content: e.$t("advancedButtonTooltip"),
|
|
@@ -2128,28 +2024,28 @@ var Ht = function() {
|
|
|
2128
2024
|
}, expression: `{
|
|
2129
2025
|
content: $t('advancedButtonTooltip'),
|
|
2130
2026
|
offset: 6
|
|
2131
|
-
}` }], staticClass: "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", on: { click: function(
|
|
2027
|
+
}` }], staticClass: "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", on: { click: function(i) {
|
|
2132
2028
|
return e.onArticleAdd({ openModal: !0 });
|
|
2133
2029
|
} } }, [t("CIcon", { attrs: { type: "zap", size: "16", "stroke-width": "2.5" } })], 1)]), t("Pricing", e._g({ attrs: { _document: e._document, "base-path": `${e._value.basePath}`, "package-id": e.packageId } }, e.$listeners))], 1)], 1)]);
|
|
2134
|
-
},
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2030
|
+
}, zt = [], Bt = /* @__PURE__ */ u(
|
|
2031
|
+
Lt,
|
|
2032
|
+
Et,
|
|
2033
|
+
zt,
|
|
2138
2034
|
!1,
|
|
2139
2035
|
null,
|
|
2140
2036
|
"667ca0c1"
|
|
2141
2037
|
);
|
|
2142
|
-
const
|
|
2038
|
+
const Wt = Bt.exports, Ft = (s) => (s || []).slice(0, 1).map((e) => ({
|
|
2143
2039
|
...e,
|
|
2144
2040
|
isSelected: !0,
|
|
2145
2041
|
isSelectedDefault: !0,
|
|
2146
2042
|
toggable: !1
|
|
2147
|
-
})),
|
|
2148
|
-
const e = o(
|
|
2149
|
-
return (
|
|
2043
|
+
})), jt = (s) => {
|
|
2044
|
+
const e = o(s, "0.data.prices.type") || "fixed";
|
|
2045
|
+
return (s || []).map((t, i) => ({
|
|
2150
2046
|
...t,
|
|
2151
2047
|
toggable: !0,
|
|
2152
|
-
...
|
|
2048
|
+
...i === 0 ? {
|
|
2153
2049
|
isSelected: !0,
|
|
2154
2050
|
isSelectedDefault: !0,
|
|
2155
2051
|
toggable: !1
|
|
@@ -2162,10 +2058,10 @@ const Gt = Ut.exports, Kt = (i) => (i || []).slice(0, 1).map((e) => ({
|
|
|
2162
2058
|
}
|
|
2163
2059
|
}
|
|
2164
2060
|
}));
|
|
2165
|
-
},
|
|
2061
|
+
}, Nt = (s = []) => {
|
|
2166
2062
|
let e = !1;
|
|
2167
|
-
return
|
|
2168
|
-
const
|
|
2063
|
+
return s.map((t) => {
|
|
2064
|
+
const i = {
|
|
2169
2065
|
...t,
|
|
2170
2066
|
// if any earlier pkg is selected, deselect pkg, otherwise keep as is
|
|
2171
2067
|
...e ? {
|
|
@@ -2174,19 +2070,19 @@ const Gt = Ut.exports, Kt = (i) => (i || []).slice(0, 1).map((e) => ({
|
|
|
2174
2070
|
} : null,
|
|
2175
2071
|
toggable: !0
|
|
2176
2072
|
};
|
|
2177
|
-
return (
|
|
2073
|
+
return (i.isSelected || i.isSelectedDefault) && (e = !0), i;
|
|
2178
2074
|
}, []);
|
|
2179
2075
|
};
|
|
2180
|
-
function
|
|
2181
|
-
if (
|
|
2182
|
-
return
|
|
2183
|
-
if (
|
|
2184
|
-
return
|
|
2185
|
-
if (
|
|
2186
|
-
return
|
|
2187
|
-
throw new Error(`Package filter type '${
|
|
2076
|
+
function Ht(s, ...e) {
|
|
2077
|
+
if (s === "single")
|
|
2078
|
+
return Ft(...e);
|
|
2079
|
+
if (s === "checkbox")
|
|
2080
|
+
return jt(...e);
|
|
2081
|
+
if (s === "radio")
|
|
2082
|
+
return Nt(...e);
|
|
2083
|
+
throw new Error(`Package filter type '${s}' is not implemented`);
|
|
2188
2084
|
}
|
|
2189
|
-
const
|
|
2085
|
+
const qt = {
|
|
2190
2086
|
name: "PackageGroupEdit",
|
|
2191
2087
|
i18nOptions: {
|
|
2192
2088
|
namespaces: "PackageGroupEdit",
|
|
@@ -2224,9 +2120,9 @@ const Qt = {
|
|
|
2224
2120
|
}
|
|
2225
2121
|
},
|
|
2226
2122
|
components: {
|
|
2227
|
-
ErrorCallout:
|
|
2228
|
-
PackageItem:
|
|
2229
|
-
PackageGroupSelect:
|
|
2123
|
+
ErrorCallout: P,
|
|
2124
|
+
PackageItem: Wt,
|
|
2125
|
+
PackageGroupSelect: Oe
|
|
2230
2126
|
},
|
|
2231
2127
|
mixins: [
|
|
2232
2128
|
y([
|
|
@@ -2259,13 +2155,13 @@ const Qt = {
|
|
|
2259
2155
|
newArticle: "articles/getNewArticle"
|
|
2260
2156
|
}),
|
|
2261
2157
|
internalPackages() {
|
|
2262
|
-
return this.packages.map((
|
|
2158
|
+
return this.packages.map((s, e) => ({ ...s, index: e }));
|
|
2263
2159
|
},
|
|
2264
2160
|
topRowPackages() {
|
|
2265
|
-
return this.type === "checkbox" ? this.internalPackages.filter(({ toggable:
|
|
2161
|
+
return this.type === "checkbox" ? this.internalPackages.filter(({ toggable: s }) => s === !1) : this.internalPackages;
|
|
2266
2162
|
},
|
|
2267
2163
|
bottomRowPackages() {
|
|
2268
|
-
return this.type === "checkbox" ? this.internalPackages.filter(({ toggable:
|
|
2164
|
+
return this.type === "checkbox" ? this.internalPackages.filter(({ toggable: s }) => s === !0) : [];
|
|
2269
2165
|
},
|
|
2270
2166
|
group() {
|
|
2271
2167
|
return this._document.packageGroups.getPackageGroupUniqId(
|
|
@@ -2300,18 +2196,18 @@ const Qt = {
|
|
|
2300
2196
|
...v({
|
|
2301
2197
|
showMessage: p.SHOW_MESSAGE
|
|
2302
2198
|
}),
|
|
2303
|
-
setPricesIncVatAsDefault(
|
|
2199
|
+
setPricesIncVatAsDefault(s = {}) {
|
|
2304
2200
|
this.$emit("input", {
|
|
2305
2201
|
key: "data.formSettings.setPricesIncVat",
|
|
2306
2202
|
value: this.defaultVatInput === "incVat",
|
|
2307
|
-
options:
|
|
2203
|
+
options: s
|
|
2308
2204
|
});
|
|
2309
2205
|
},
|
|
2310
|
-
onSelectType(
|
|
2311
|
-
this.type =
|
|
2206
|
+
onSelectType(s) {
|
|
2207
|
+
this.type = s;
|
|
2312
2208
|
const { type: e, packages: t } = this.persistedGroup || {};
|
|
2313
2209
|
if (e && t && t.length)
|
|
2314
|
-
this.addPersistedGroup(
|
|
2210
|
+
this.addPersistedGroup(s), s !== e && this.showMessage({
|
|
2315
2211
|
type: "info",
|
|
2316
2212
|
message: this.$t("reset.message"),
|
|
2317
2213
|
actions: {
|
|
@@ -2324,29 +2220,29 @@ const Qt = {
|
|
|
2324
2220
|
}
|
|
2325
2221
|
});
|
|
2326
2222
|
else {
|
|
2327
|
-
if (
|
|
2223
|
+
if (s === "checkbox")
|
|
2328
2224
|
return;
|
|
2329
2225
|
this.addPackage({});
|
|
2330
2226
|
}
|
|
2331
2227
|
},
|
|
2332
|
-
addPersistedGroup(
|
|
2228
|
+
addPersistedGroup(s) {
|
|
2333
2229
|
if (!this.persistedGroup || !this.persistedGroup.type)
|
|
2334
2230
|
return;
|
|
2335
2231
|
let { packages: e, articles: t } = this.persistedGroup;
|
|
2336
2232
|
if (!e.length)
|
|
2337
2233
|
return;
|
|
2338
|
-
if (
|
|
2234
|
+
if (s !== this.persistedGroup.type && (e = Ht(s, e)), s === "single" && t.length) {
|
|
2339
2235
|
const [{ packageId: n }] = e;
|
|
2340
2236
|
t = t.filter((a) => a.packageId === n);
|
|
2341
2237
|
}
|
|
2342
|
-
const
|
|
2238
|
+
const i = Pe(
|
|
2343
2239
|
[...this._document.allArticles || [], ...t || []],
|
|
2344
2240
|
(n) => n._uniqueId
|
|
2345
2241
|
);
|
|
2346
|
-
this.$emit("input", { key: "articles", value:
|
|
2242
|
+
this.$emit("input", { key: "articles", value: i }), this.$emit("input", { key: `${[this._value.packages]}`, value: e });
|
|
2347
2243
|
},
|
|
2348
|
-
addPackage(
|
|
2349
|
-
const e =
|
|
2244
|
+
addPackage(s = {}) {
|
|
2245
|
+
const e = te(), t = this.type === "checkbox" && this.packages.length ? this.packages[0].data.prices.type : "fixed", i = this.currency || this.defaultCurrency, n = {
|
|
2350
2246
|
isSelected: this.type === "single",
|
|
2351
2247
|
isSelectedDefault: this.type === "single",
|
|
2352
2248
|
toggable: !0,
|
|
@@ -2356,57 +2252,57 @@ const Qt = {
|
|
|
2356
2252
|
description: "",
|
|
2357
2253
|
prices: {
|
|
2358
2254
|
type: t,
|
|
2359
|
-
currency:
|
|
2255
|
+
currency: i
|
|
2360
2256
|
}
|
|
2361
2257
|
},
|
|
2362
|
-
...
|
|
2258
|
+
...s
|
|
2363
2259
|
};
|
|
2364
2260
|
this.$emit("input", { key: this._value.packages, value: n }), this.$emit("input", {
|
|
2365
2261
|
key: "articles",
|
|
2366
2262
|
value: this.newArticle({
|
|
2367
2263
|
priceType: t.startsWith("open") ? "openAcc" : t,
|
|
2368
2264
|
packageId: e,
|
|
2369
|
-
currency:
|
|
2265
|
+
currency: i
|
|
2370
2266
|
})
|
|
2371
2267
|
}), this.$nextTick(() => {
|
|
2372
2268
|
const a = document.getElementById(`package-name-${e}`);
|
|
2373
2269
|
a && a.focus();
|
|
2374
2270
|
});
|
|
2375
2271
|
},
|
|
2376
|
-
onInputPriceType(
|
|
2377
|
-
this.type === "checkbox" && this.packages.forEach((t,
|
|
2378
|
-
|
|
2379
|
-
key: `${[this._value.packages]}[${[
|
|
2272
|
+
onInputPriceType(s, e) {
|
|
2273
|
+
this.type === "checkbox" && this.packages.forEach((t, i) => {
|
|
2274
|
+
i !== s && this.$emit("input", {
|
|
2275
|
+
key: `${[this._value.packages]}[${[i]}].data.prices.type`,
|
|
2380
2276
|
value: e
|
|
2381
2277
|
});
|
|
2382
2278
|
});
|
|
2383
2279
|
},
|
|
2384
|
-
onInputSelectedDefault(
|
|
2385
|
-
this.type === "radio" && !e || (this.type === "radio" && e && this.packages.forEach((t,
|
|
2386
|
-
|
|
2387
|
-
key: `${[this._value.packages]}[${[
|
|
2280
|
+
onInputSelectedDefault(s, e) {
|
|
2281
|
+
this.type === "radio" && !e || (this.type === "radio" && e && this.packages.forEach((t, i) => {
|
|
2282
|
+
i !== s && (this.$emit("input", {
|
|
2283
|
+
key: `${[this._value.packages]}[${[i]}].isSelectedDefault`,
|
|
2388
2284
|
value: !1
|
|
2389
2285
|
}), this.$emit("input", {
|
|
2390
|
-
key: `${[this._value.packages]}[${[
|
|
2286
|
+
key: `${[this._value.packages]}[${[i]}].isSelected`,
|
|
2391
2287
|
value: !1
|
|
2392
2288
|
}));
|
|
2393
2289
|
}), this.$emit("input", {
|
|
2394
|
-
key: `${[this._value.packages]}[${[
|
|
2290
|
+
key: `${[this._value.packages]}[${[s]}].isSelectedDefault`,
|
|
2395
2291
|
value: e
|
|
2396
2292
|
}), this.$emit("input", {
|
|
2397
|
-
key: `${[this._value.packages]}[${[
|
|
2293
|
+
key: `${[this._value.packages]}[${[s]}].isSelected`,
|
|
2398
2294
|
value: e
|
|
2399
2295
|
}));
|
|
2400
2296
|
},
|
|
2401
|
-
removeByIndex(
|
|
2402
|
-
const { packageId: e } = this.packages[
|
|
2403
|
-
({ packageId:
|
|
2297
|
+
removeByIndex(s) {
|
|
2298
|
+
const { packageId: e } = this.packages[s], t = this._document.allArticles.filter(
|
|
2299
|
+
({ packageId: i }) => i !== e
|
|
2404
2300
|
);
|
|
2405
|
-
this.$emit("input", { key: "articles", value: t }), this.$emit("remove", { key: `${[this._value.packages]}[${[
|
|
2301
|
+
this.$emit("input", { key: "articles", value: t }), this.$emit("remove", { key: `${[this._value.packages]}[${[s]}]` });
|
|
2406
2302
|
},
|
|
2407
2303
|
async onResetType() {
|
|
2408
|
-
const
|
|
2409
|
-
([
|
|
2304
|
+
const s = this.packages.map((i) => i.packageId), [e, t] = this._document.allArticles.reduce(
|
|
2305
|
+
([i, n], a) => s.includes(a.packageId) ? [[...i, a], n] : [i, [...n, a]],
|
|
2410
2306
|
[[], []]
|
|
2411
2307
|
);
|
|
2412
2308
|
this.$emit("update:persisted-group", {
|
|
@@ -2415,41 +2311,41 @@ const Qt = {
|
|
|
2415
2311
|
articles: e
|
|
2416
2312
|
}), this.$emit("input", { key: "articles", value: t }), this.$emit("input", { key: `${[this._value.packages]}`, value: [] }), this.type = "";
|
|
2417
2313
|
},
|
|
2418
|
-
moveOptions(
|
|
2314
|
+
moveOptions(s, e) {
|
|
2419
2315
|
const t = { up: !1, down: !1 };
|
|
2420
|
-
return
|
|
2316
|
+
return s > 0 && (t.up = !0), s < e - 1 && (t.down = !0), t;
|
|
2421
2317
|
},
|
|
2422
|
-
moveItem(
|
|
2423
|
-
const t =
|
|
2318
|
+
moveItem(s, e) {
|
|
2319
|
+
const t = T(this.packages, s, e);
|
|
2424
2320
|
this.$emit("input", { key: this._value.packages, value: t });
|
|
2425
2321
|
}
|
|
2426
2322
|
}
|
|
2427
2323
|
};
|
|
2428
|
-
var
|
|
2324
|
+
var Ut = function() {
|
|
2429
2325
|
var e = this, t = e._self._c;
|
|
2430
|
-
return t("div", { staticClass: "package-group-root font-inter" }, [e.type ? [t("div", { staticStyle: { position: "absolute", right: "0", top: "-10px", transform: "translateY(-100%)", "z-index": "2" } }, [t("CDropdown", [t("CButton", { attrs: { slot: "trigger", type: "none", size: "normal", pattern: "secondary", icon: "more-horizontal", circle: "" }, slot: "trigger" }), t("CDropdownItem", { on: { click: e.onResetType } }, [e._v(e._s(e.$t("_common:change", { thing: e.$t("_common:price.proposal").toLowerCase() })))]), t("CDropdownItem", { attrs: { value: !!e.hideGroupPrice, "close-on-click": !1, toggle: "" }, on: { input: function(
|
|
2431
|
-
e.hideGroupPrice =
|
|
2432
|
-
} } }, [e._v(" " + e._s(e.$t("hideGroupPrice")) + " ")])], 1)], 1), e.type === "checkbox" && !e.internalPackages.find((
|
|
2326
|
+
return t("div", { staticClass: "package-group-root font-inter" }, [e.type ? [t("div", { staticStyle: { position: "absolute", right: "0", top: "-10px", transform: "translateY(-100%)", "z-index": "2" } }, [t("CDropdown", [t("CButton", { attrs: { slot: "trigger", type: "none", size: "normal", pattern: "secondary", icon: "more-horizontal", circle: "" }, slot: "trigger" }), t("CDropdownItem", { on: { click: e.onResetType } }, [e._v(e._s(e.$t("_common:change", { thing: e.$t("_common:price.proposal").toLowerCase() })))]), t("CDropdownItem", { attrs: { value: !!e.hideGroupPrice, "close-on-click": !1, toggle: "" }, on: { input: function(i) {
|
|
2327
|
+
e.hideGroupPrice = i;
|
|
2328
|
+
} } }, [e._v(" " + e._s(e.$t("hideGroupPrice")) + " ")])], 1)], 1), e.type === "checkbox" && !e.internalPackages.find((i) => i.toggable === !1) ? t("CCallout", { staticClass: "w-full", attrs: { title: e.$t("base") } }, [t("div", { staticClass: "pb-4" }, [e._v(" " + e._s(e.$t("basePlaceholder")) + " ")]), t("CButton", { staticStyle: { "font-weight": "600" }, attrs: { type: "secondary", size: "small" }, on: { click: function(i) {
|
|
2433
2329
|
return e.addPackage({
|
|
2434
2330
|
isSelected: !0,
|
|
2435
2331
|
isSelectedDefault: !0,
|
|
2436
2332
|
toggable: !1
|
|
2437
2333
|
});
|
|
2438
|
-
} } }, [e._v(" " + e._s(e.$t("_common:add", { thing: e.$t("base").toLowerCase() })) + " ")])], 1) : t("transition-group", { attrs: { name: "section-list", tag: "div" } }, e._l(e.topRowPackages, function(
|
|
2439
|
-
return t("div", { key:
|
|
2440
|
-
isSelectedDefault: `${e._value.packages}[${
|
|
2441
|
-
isSelected: `${e._value.packages}[${
|
|
2442
|
-
name: `${e._value.packages}[${
|
|
2443
|
-
description: `${e._value.packages}[${
|
|
2444
|
-
priceType: `${e._value.packages}[${
|
|
2445
|
-
maxTotal: `${e._value.packages}[${
|
|
2446
|
-
basePath: `${e._value.packages}[${
|
|
2447
|
-
currency: `${e._value.packages}[${
|
|
2448
|
-
}, type: e.type, "active-house-work-type": e.houseWorkType, toggable:
|
|
2334
|
+
} } }, [e._v(" " + e._s(e.$t("_common:add", { thing: e.$t("base").toLowerCase() })) + " ")])], 1) : t("transition-group", { attrs: { name: "section-list", tag: "div" } }, e._l(e.topRowPackages, function(i, n) {
|
|
2335
|
+
return t("div", { key: i.packageId, staticClass: "section-item pb-4" }, [t("PackageItem", { attrs: { _document: e._document, _value: {
|
|
2336
|
+
isSelectedDefault: `${e._value.packages}[${i.index}].isSelectedDefault`,
|
|
2337
|
+
isSelected: `${e._value.packages}[${i.index}].isSelected`,
|
|
2338
|
+
name: `${e._value.packages}[${i.index}].data.name`,
|
|
2339
|
+
description: `${e._value.packages}[${i.index}].data.description`,
|
|
2340
|
+
priceType: `${e._value.packages}[${i.index}].data.prices.type`,
|
|
2341
|
+
maxTotal: `${e._value.packages}[${i.index}].data.prices.maxTotal`,
|
|
2342
|
+
basePath: `${e._value.packages}[${i.index}]`,
|
|
2343
|
+
currency: `${e._value.packages}[${i.index}].data.prices.currency`
|
|
2344
|
+
}, type: e.type, "active-house-work-type": e.houseWorkType, toggable: i.toggable, "package-id": i.packageId, "move-options": e.moveOptions(n, e.topRowPackages.length) }, on: { input: function(a) {
|
|
2449
2345
|
return e.$emit("input", a);
|
|
2450
2346
|
}, add: function(a) {
|
|
2451
2347
|
return e.$emit("add", a);
|
|
2452
|
-
}, "update:isSelectedDefault": (a) => e.onInputSelectedDefault(
|
|
2348
|
+
}, "update:isSelectedDefault": (a) => e.onInputSelectedDefault(i.index, a), "update:priceType": (a) => e.onInputPriceType(i.index, a), "update:setPricesIncVat": (a) => {
|
|
2453
2349
|
e.$emit("input", {
|
|
2454
2350
|
key: "data.formSettings.setPricesIncVat",
|
|
2455
2351
|
value: a
|
|
@@ -2457,25 +2353,25 @@ var Xt = function() {
|
|
|
2457
2353
|
}, "update:currency": (a) => e.$emit("input", { key: "currency", value: a }), remove: function(a) {
|
|
2458
2354
|
return e.$emit("remove", a);
|
|
2459
2355
|
}, "remove-package": function(a) {
|
|
2460
|
-
return e.removeByIndex(
|
|
2356
|
+
return e.removeByIndex(i.index);
|
|
2461
2357
|
}, move: function(a) {
|
|
2462
|
-
return e.moveItem(
|
|
2358
|
+
return e.moveItem(i.index, e.topRowPackages[n + a].index);
|
|
2463
2359
|
} } })], 1);
|
|
2464
|
-
}), 0), e.type === "checkbox" && e.topRowPackages.length && e.bottomRowPackages.length ? t("div", { staticStyle: { width: "calc(5 * var(--rem))", height: "1px", "margin-left": "calc(50% - calc(2.5 * var(--rem)))", "border-top": "2px dashed hsl(0, 0%, 85%)" } }) : e._e(), e.type === "checkbox" ? [t("transition-group", { staticStyle: { "margin-bottom": "calc(1 * var(--rem))" }, attrs: { name: "section-list", tag: "div" } }, e._l(e.bottomRowPackages, function(
|
|
2465
|
-
return t("div", { key:
|
|
2466
|
-
isSelectedDefault: `${e._value.packages}[${
|
|
2467
|
-
isSelected: `${e._value.packages}[${
|
|
2468
|
-
name: `${e._value.packages}[${
|
|
2469
|
-
description: `${e._value.packages}[${
|
|
2470
|
-
priceType: `${e._value.packages}[${
|
|
2471
|
-
maxTotal: `${e._value.packages}[${
|
|
2472
|
-
basePath: `${e._value.packages}[${
|
|
2473
|
-
currency: `${e._value.packages}[${
|
|
2474
|
-
}, type: e.type, "active-house-work-type": e.houseWorkType, "package-id":
|
|
2360
|
+
}), 0), e.type === "checkbox" && e.topRowPackages.length && e.bottomRowPackages.length ? t("div", { staticStyle: { width: "calc(5 * var(--rem))", height: "1px", "margin-left": "calc(50% - calc(2.5 * var(--rem)))", "border-top": "2px dashed hsl(0, 0%, 85%)" } }) : e._e(), e.type === "checkbox" ? [t("transition-group", { staticStyle: { "margin-bottom": "calc(1 * var(--rem))" }, attrs: { name: "section-list", tag: "div" } }, e._l(e.bottomRowPackages, function(i, n) {
|
|
2361
|
+
return t("div", { key: i.packageId, staticClass: "section-item", staticStyle: { padding: "calc(1 * var(--rem)) 0" } }, [t("PackageItem", { staticClass: "package-item", attrs: { _document: e._document, _value: {
|
|
2362
|
+
isSelectedDefault: `${e._value.packages}[${i.index}].isSelectedDefault`,
|
|
2363
|
+
isSelected: `${e._value.packages}[${i.index}].isSelected`,
|
|
2364
|
+
name: `${e._value.packages}[${i.index}].data.name`,
|
|
2365
|
+
description: `${e._value.packages}[${i.index}].data.description`,
|
|
2366
|
+
priceType: `${e._value.packages}[${i.index}].data.prices.type`,
|
|
2367
|
+
maxTotal: `${e._value.packages}[${i.index}].data.prices.maxTotal`,
|
|
2368
|
+
basePath: `${e._value.packages}[${i.index}]`,
|
|
2369
|
+
currency: `${e._value.packages}[${i.index}].data.prices.currency`
|
|
2370
|
+
}, type: e.type, "active-house-work-type": e.houseWorkType, "package-id": i.packageId, "move-options": e.moveOptions(n, e.bottomRowPackages.length) }, on: { input: function(a) {
|
|
2475
2371
|
return e.$emit("input", a);
|
|
2476
2372
|
}, add: function(a) {
|
|
2477
2373
|
return e.$emit("add", a);
|
|
2478
|
-
}, "update:isSelectedDefault": (a) => e.onInputSelectedDefault(
|
|
2374
|
+
}, "update:isSelectedDefault": (a) => e.onInputSelectedDefault(i.index, a), "update:priceType": (a) => e.onInputPriceType(i.index, a), "update:setPricesIncVat": (a) => {
|
|
2479
2375
|
e.$emit("input", {
|
|
2480
2376
|
key: "data.formSettings.setPricesIncVat",
|
|
2481
2377
|
value: a
|
|
@@ -2483,24 +2379,24 @@ var Xt = function() {
|
|
|
2483
2379
|
}, remove: function(a) {
|
|
2484
2380
|
return e.$emit("remove", a);
|
|
2485
2381
|
}, "remove-package": function(a) {
|
|
2486
|
-
return e.removeByIndex(
|
|
2382
|
+
return e.removeByIndex(i.index);
|
|
2487
2383
|
}, move: function(a) {
|
|
2488
|
-
return e.moveItem(
|
|
2384
|
+
return e.moveItem(i.index, e.bottomRowPackages[n + a].index);
|
|
2489
2385
|
} } })], 1);
|
|
2490
|
-
}), 0)] : e._e(), e.type !== "single" || !e.packages.length ? t("div", { staticClass: "flex w-full flex-col items-center justify-center" }, [t("div", { staticStyle: { width: "100%" } }, [e.type === "radio" && !e.packages.length ? t("div", { staticClass: "package-placeholder bg-gray-100", staticStyle: { color: "hsl(0, 0%, 24%)", "font-weight": "500" } }, [t("svg", { staticStyle: { "vertical-align": "text-bottom", "margin-right": "3px" }, attrs: { width: "16", height: "16", viewBox: "0 0 18 14", xmlns: "http://www.w3.org/2000/svg" } }, [t("path", { attrs: { 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", fill: "#000", "fill-rule": "evenodd" } })]), e._v(" " + e._s(e.$t("selectablePlaceholder")) + " ")]) : e._e()]), e.validator.$invalid && e.validator.$dirty ? t("ErrorCallout", { staticStyle: { margin: "calc(1 * var(--rem)) 0 calc(1 * var(--rem)) 0" }, attrs: { message: e.$t("error.minOnePackage") } }) : e._e(), t("div", { staticClass: "flex w-full" }, [t("CButton", { staticStyle: { "border-color": "hsl(0, 0%, 82%)" }, attrs: { type: "secondary", outlined: "", "icon-left": "plus" }, on: { click: function(
|
|
2386
|
+
}), 0)] : e._e(), e.type !== "single" || !e.packages.length ? t("div", { staticClass: "flex w-full flex-col items-center justify-center" }, [t("div", { staticStyle: { width: "100%" } }, [e.type === "radio" && !e.packages.length ? t("div", { staticClass: "package-placeholder bg-gray-100", staticStyle: { color: "hsl(0, 0%, 24%)", "font-weight": "500" } }, [t("svg", { staticStyle: { "vertical-align": "text-bottom", "margin-right": "3px" }, attrs: { width: "16", height: "16", viewBox: "0 0 18 14", xmlns: "http://www.w3.org/2000/svg" } }, [t("path", { attrs: { 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", fill: "#000", "fill-rule": "evenodd" } })]), e._v(" " + e._s(e.$t("selectablePlaceholder")) + " ")]) : e._e()]), e.validator.$invalid && e.validator.$dirty ? t("ErrorCallout", { staticStyle: { margin: "calc(1 * var(--rem)) 0 calc(1 * var(--rem)) 0" }, attrs: { message: e.$t("error.minOnePackage") } }) : e._e(), t("div", { staticClass: "flex w-full" }, [t("CButton", { staticStyle: { "border-color": "hsl(0, 0%, 82%)" }, attrs: { type: "secondary", outlined: "", "icon-left": "plus" }, on: { click: function(i) {
|
|
2491
2387
|
return e.addPackage();
|
|
2492
|
-
} } }, [e._v(" " + e._s(e.$t("add")) + " ")])], 1)], 1) : e._e()] : t("div", [t("PackageGroupSelect", { on: { input: function(
|
|
2493
|
-
return e.onSelectType(
|
|
2388
|
+
} } }, [e._v(" " + e._s(e.$t("add")) + " ")])], 1)], 1) : e._e()] : t("div", [t("PackageGroupSelect", { on: { input: function(i) {
|
|
2389
|
+
return e.onSelectType(i);
|
|
2494
2390
|
} } }), e.validator.$invalid && e.validator.$dirty ? t("ErrorCallout", { staticStyle: { "padding-bottom": "calc(1.5 * var(--rem))" }, attrs: { message: e.$t("error.selectType") } }) : e._e()], 1)], 2);
|
|
2495
|
-
},
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2391
|
+
}, Gt = [], Kt = /* @__PURE__ */ u(
|
|
2392
|
+
qt,
|
|
2393
|
+
Ut,
|
|
2394
|
+
Gt,
|
|
2499
2395
|
!1,
|
|
2500
2396
|
null,
|
|
2501
2397
|
"c6ce4c7e"
|
|
2502
2398
|
);
|
|
2503
|
-
const
|
|
2399
|
+
const oi = Kt.exports;
|
|
2504
2400
|
export {
|
|
2505
|
-
|
|
2401
|
+
oi as default
|
|
2506
2402
|
};
|