@cling-se/widget 0.14.6 → 1.0.0-beta.1
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/.eslintrc.cjs +4 -4
- package/README.md +40 -40
- package/dist/{AddClientCallout-C7abPZ87.js → AddClientCallout-BWnvyBcK.js} +3 -3
- package/dist/{AnswerModal-CsA2pl2P.js → AnswerModal-CLGRdSnK.js} +7 -7
- package/dist/{AttachmentItem-Da1-7xwf.js → AttachmentItem-BPS0-wyc.js} +3 -3
- package/dist/{BaseDatePicker-k9zlSi5J.js → BaseDatePicker-BbmV_GdD.js} +2 -2
- package/dist/{BaseUpload-BUrXX3fT.js → BaseUpload-9gPgI7r6.js} +3 -3
- package/dist/{BlockMedia-CYI07qAn.js → BlockMedia-DkPFWiYL.js} +2 -2
- package/dist/{CCallout-Qwae66vo.js → CCallout-T26jwUby.js} +4 -4
- package/dist/{CCurrencyDropdown-Y_u0hgBx.js → CCurrencyDropdown-qH-3m2eP.js} +4 -4
- package/dist/{CDropdownItem-CXJ4xD8W.js → CDropdownItem-BE8BAMD1.js} +167 -69
- package/dist/{CFormField--m3PvQuT.js → CFormField-DECEfoVq.js} +1 -1
- package/dist/{CPhoneFormat-Qg6MkDVP.js → CPhoneFormat-CfQayFxw.js} +1 -1
- package/dist/{CPriceInput-Dlx44UrR.js → CPriceInput-C4SOB-P5.js} +2 -2
- package/dist/{ClientAutocomplete-BKKc_br6.js → ClientAutocomplete-DSebA1Mx.js} +3 -3
- package/dist/{ClientModal-CVZFb1Br.js → ClientModal-BXFYvYCF.js} +6 -6
- package/dist/{ColorPicker-Bo3s3Esp.js → ColorPicker-CZ_bJabP.js} +2 -2
- package/dist/{CompanyModal-DadjAioS.js → CompanyModal-CDr3t28n.js} +5 -5
- package/dist/{ContentWrapper-BC3ZBQW9.js → ContentWrapper-BwmMoe4W.js} +9 -9
- package/dist/{CoverBlockSettings-B484eE4g.js → CoverBlockSettings-_F11-DGc.js} +11 -11
- package/dist/{DocAnswer-CcYryOWI.js → DocAnswer-BR59xzkT.js} +2 -2
- package/dist/{DocDetails-BigsoEWL.js → DocDetails-D1qbCbps.js} +43 -30
- package/dist/{DocForm-DlN0eNWt.js → DocForm-DBc2a7z5.js} +91 -92
- package/dist/{DocFormSend-TqKo210I.js → DocFormSend-Casix-yG.js} +4 -3
- package/dist/{DocLinks-DSo54vDn.js → DocLinks-DGTaewyX.js} +2 -2
- package/dist/{DocModalBase-XlM1SThW.js → DocModalBase-BbS_qvSv.js} +2 -2
- package/dist/{DocPrint-tD0Vd9Sw.js → DocPrint-0PqX3mbJ.js} +2 -2
- package/dist/{DocReceipt-CDHPrhXM.js → DocReceipt-CU3VD5pt.js} +1 -1
- package/dist/{DocSendReminder-C62RhltH.js → DocSendReminder-CuycBspr.js} +1 -1
- package/dist/{DocTextEditor-VjhV9IRp.js → DocTextEditor-CntS2Bd-.js} +21 -22
- package/dist/{DocTimeline-LcW4z3nC.js → DocTimeline-DJuv3yBe.js} +1 -1
- package/dist/{DocumentClient-CqbTRdpB.js → DocumentClient-C25XXzz6.js} +5 -5
- package/dist/{DocumentLayout-Dbf8_01r.js → DocumentLayout-B7afHRMr.js} +6 -6
- package/dist/{DocumentLogotype-DXYnBedV.js → DocumentLogotype-sqI51wvM.js} +4 -4
- package/dist/{DocumentVoided-vH1Ti5lZ.js → DocumentVoided-TahdTSMn.js} +1 -1
- package/dist/{EmbedInput-D9qP8OnY.js → EmbedInput-BY-wHSfc.js} +2 -2
- package/dist/{EmbedSettings-DISuNqJT.js → EmbedSettings-8pfjk4NP.js} +3 -3
- package/dist/{ErrorCallout-CCtCVwSh.js → ErrorCallout-Dsr8PNsU.js} +5 -5
- package/dist/{FilePreviewModal-BjhNyb6L.js → FilePreviewModal-CcEinEFg.js} +3 -3
- package/dist/{Flag-Dhukv9_J.js → Flag-PJKrghi9.js} +1 -1
- package/dist/{HeaderSettings-CK4SkB1x.js → HeaderSettings-BqczIOsG.js} +9 -9
- package/dist/{ImageSelectModal-DnvPZzXx.js → ImageSelectModal-Cd-HhKnH.js} +4 -4
- package/dist/{ImageUploadWrapper-B7cNMu5a.js → ImageUploadWrapper-Dv43rGdb.js} +3 -3
- package/dist/{Index-CPJVx14x.js → Index--qPMWUMT.js} +4 -4
- package/dist/{Index-Bh0kMSsA.js → Index-6b5VBKE-.js} +5 -5
- package/dist/{Index-B3HoK_cZ.js → Index-B4pRJnbw.js} +9 -9
- package/dist/{Index-B9H5MMHb.js → Index-B69f8qgZ.js} +5 -5
- package/dist/{Index-dyWK9jgr.js → Index-B79YN9RO.js} +4 -4
- package/dist/{Index-Bs8wprXw.js → Index-BBrlPoe8.js} +4 -4
- package/dist/{Index-D6bc7lg4.js → Index-BXfWJCuq.js} +3 -3
- package/dist/{Index-DtSSgtxB.js → Index-Bd76vb37.js} +5 -5
- package/dist/{Index-lKk_XKJ3.js → Index-BmbtQO5F.js} +5 -5
- package/dist/{Index-CNvp5K3L.js → Index-Bu0MGrj6.js} +8 -8
- package/dist/{Index-DuTw9vhb.js → Index-ByV_kJaH.js} +15 -15
- package/dist/{Index-CWrDtcfT.js → Index-CDV5rhWS.js} +4 -4
- package/dist/{Index-BlQSM7tC.js → Index-CIx4OOK-.js} +9 -9
- package/dist/{Index-CyJnSvDR.js → Index-CL1OWLt6.js} +38 -38
- package/dist/{Index-Dw26jtGV.js → Index-Caow0eZu.js} +5 -5
- package/dist/{Index-S-FHG7_k.js → Index-Cd3-3PEK.js} +316 -316
- package/dist/{Index-BY1UKGEO.js → Index-CdpZBEKU.js} +7 -7
- package/dist/{Index-BAYdvT-t.js → Index-CmU3Sys-.js} +2 -2
- package/dist/{Index-OxN73_fO.js → Index-CtRtgnpm.js} +5 -5
- package/dist/{Index-CQ325eVT.js → Index-Cukkr33D.js} +4 -4
- package/dist/{Index-gb11ngPS.js → Index-Cuqw0ios.js} +3 -3
- package/dist/{Index-B3aucNji.js → Index-Czm_WdqC.js} +4 -4
- package/dist/{Index-Dm8xMFGg.js → Index-D4XgxmbD.js} +2 -2
- package/dist/{Index-D_rfst8y.js → Index-DIOiMm9f.js} +2 -2
- package/dist/{Index-DCR8ev4U.js → Index-DNdYXHgr.js} +4 -4
- package/dist/{Index-BLeQprjq.js → Index-DcQbh-z2.js} +2 -2
- package/dist/{Index-BpcJBGGd.js → Index-DcuBxutp.js} +59 -59
- package/dist/{Index-DXAvlq74.js → Index-DpWNWiyY.js} +13 -14
- package/dist/{Index-DGQSB9cH.js → Index-DzS1rZdF.js} +3 -3
- package/dist/{Index-CFo-3Y5Q.js → Index-N6s5pZxv.js} +7 -7
- package/dist/{Index-ZFkitzfq.js → Index-g_DNu4mt.js} +5 -5
- package/dist/{Index-BOyvQlng.js → Index-mJ8F41GY.js} +6 -6
- package/dist/{Index-BvZZAvFd.js → Index-q7W9KA8m.js} +2 -2
- package/dist/{Index-BVsw2tak.js → Index-rtzblZp4.js} +6 -6
- package/dist/{InputToggleRow-DSSvhPKA.js → InputToggleRow-CZjxsDOQ.js} +2 -2
- package/dist/{ManualPopover-lpJYSkw5.js → ManualPopover-CZrWiT-P.js} +1 -1
- package/dist/{MediaWrapper-BQ22FA2B.js → MediaWrapper-D37qK4KR.js} +3 -3
- package/dist/{NotBindingText-JxwzZLPP.js → NotBindingText-CNV2Wmdx.js} +2 -2
- package/dist/{PackageGroup-BLSMSUDz.js → PackageGroup-Heo_s8ct.js} +10 -10
- package/dist/{PdfTerms-DtutjM5Y.js → PdfTerms-AB9tXAtU.js} +3 -3
- package/dist/{PdfViewer-BsxcZI_x.js → PdfViewer-CIVkvOBr.js} +12 -13
- package/dist/{PlainHtml-BMPZs2fT.js → PlainHtml-CPmIebjY.js} +1 -1
- package/dist/{PriceHeader-BRYY01H2.js → PriceHeader-DhDAruwX.js} +13 -13
- package/dist/{SearchApi-6001iFxU.js → SearchApi-BMgdaI4s.js} +2 -2
- package/dist/{Setup-cw6jMI9M.js → Setup-VIaIV9uT.js} +1 -1
- package/dist/{SmartList-q6H-uLbm.js → SmartList-Qgu0rMrI.js} +1 -1
- package/dist/{TermsSettings-DWvaPneu.js → TermsSettings-CE3h_xkm.js} +4 -4
- package/dist/{ThemeColorRow-BXWnvfz-.js → ThemeColorRow-DYJNgk6S.js} +4 -4
- package/dist/{ToggleBinding-DydtwpNG.js → ToggleBinding-CuwCeYpO.js} +3 -3
- package/dist/{UploadModal-D_EDKHGD.js → UploadModal-BITcxG-J.js} +3 -3
- package/dist/{VideoPlayerInput-B9yzUeBW.js → VideoPlayerInput-8szEX_8L.js} +3 -3
- package/dist/{VideoPlayerSettings-Bvp9l0yj.js → VideoPlayerSettings-BIPytm6w.js} +3 -3
- package/dist/{VideoSelectModal-DY3N4JiS.js → VideoSelectModal-B-Pe34nb.js} +4 -4
- package/dist/{answerDocumentMixin-BYZPU_R-.js → answerDocumentMixin-W7vE1Gp4.js} +3 -3
- package/dist/{debounce-BPnlzNwd.js → debounce-C1AuSpOZ.js} +1 -1
- package/dist/{focusDrawerMixin-DC9Oa1i7.js → focusDrawerMixin-Be6BAK8-.js} +1 -1
- package/dist/{formComponentsInstall-CEW6TK6z.js → formComponentsInstall-Bm3VMOh6.js} +51 -43
- package/dist/{formDrawerState-CAzvSMiQ.js → formDrawerState-DRbg5rVI.js} +1 -1
- package/dist/{formValidationMixin-D7zXxCpC.js → formValidationMixin-COkY8COk.js} +2 -2
- package/dist/{index-BbscgdRg.js → index-BFvjENMH.js} +1 -1
- package/dist/{index-BDMI4NVY.js → index-BV2nGWay.js} +1 -1
- package/dist/{index-B9WDC3Xe.js → index-BgJ05dYc.js} +10 -11
- package/dist/{index-CLUljEDI.js → index-CMPAXxzs.js} +8 -8
- package/dist/{index-BCMaUC5r.js → index-DNDjI5uI.js} +7 -7
- package/dist/{index-SxyZvewN.js → index-aoff9oUi.js} +2 -2
- package/dist/index.es.js +3 -3
- package/dist/index.umd.js +106 -106
- package/dist/{main-CQBEuZk9.js → main-WKzC-Dnu.js} +879 -878
- package/dist/{mapFormMixin-DlFcgwhm.js → mapFormMixin-QbevCwJK.js} +1 -1
- package/dist/{omit-BWy0Zhd3.js → omit-CTp9CXoU.js} +1 -1
- package/dist/{publicSenderState-CvOcFv2U.js → publicSenderState-BujjYsZZ.js} +1 -1
- package/dist/style.css +2 -2
- package/dist/{throttle-BrC8eGjQ.js → throttle-CWPJmFid.js} +2 -2
- package/dist/{tinycolor-PhFP695w.js → tinycolor-kTl0yxzz.js} +1 -1
- package/dist/{tippy.esm-7dmKOUvu.js → tippy.esm-sS5koDSU.js} +6 -6
- package/dist/{utils-NBLgNGHR.js → utils-CA_Zy6u1.js} +1 -1
- package/dist/{vuedraggable.umd-ByfH7ZxC.js → vuedraggable.umd-BA3ZDRAp.js} +1 -1
- package/package.json +1 -1
- package/tsconfig.json +26 -26
- package/tsconfig.node.json +10 -10
- package/tsconfig.paths.json +17 -17
- package/vite.config.ts +60 -60
- package/dist/dom-CJxkno7i.js +0 -91
- /package/dist/{CTabs.vue_vue_type_style_index_0_scoped_b7262014_lang-l0sNRNKZ.js → CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { m as y } from "./mapFormMixin-
|
|
2
|
-
import { E as P } from "./ErrorCallout-
|
|
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-
|
|
1
|
+
import { m as y } from "./mapFormMixin-QbevCwJK.js";
|
|
2
|
+
import { E as P } from "./ErrorCallout-Dsr8PNsU.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-WKzC-Dnu.js";
|
|
4
4
|
import { m as h, a as v } from "./vuex.esm-DKGl8mcw.js";
|
|
5
|
-
import { T as ie } from "./DocTextEditor-
|
|
6
|
-
import { W as
|
|
7
|
-
import { o as V } from "./omit-
|
|
8
|
-
import { d as
|
|
9
|
-
import { C as x } from "./CPriceInput-
|
|
10
|
-
import { S as ne } from "./SearchApi-
|
|
11
|
-
import { v as re } from "./index-
|
|
12
|
-
import { w as oe } from "./CDropdownItem-
|
|
5
|
+
import { T as ie } from "./DocTextEditor-CntS2Bd-.js";
|
|
6
|
+
import { W as se } from "./DocumentLayout-B7afHRMr.js";
|
|
7
|
+
import { o as V } from "./omit-CTp9CXoU.js";
|
|
8
|
+
import { d as ae } from "./vuedraggable.umd-BA3ZDRAp.js";
|
|
9
|
+
import { C as x } from "./CPriceInput-C4SOB-P5.js";
|
|
10
|
+
import { S as ne } from "./SearchApi-BMgdaI4s.js";
|
|
11
|
+
import { v as re } from "./index-BV2nGWay.js";
|
|
12
|
+
import { w as oe } from "./CDropdownItem-BE8BAMD1.js";
|
|
13
13
|
const ce = [
|
|
14
14
|
"unit",
|
|
15
15
|
"m2",
|
|
@@ -29,23 +29,23 @@ const ce = [
|
|
|
29
29
|
];
|
|
30
30
|
function le() {
|
|
31
31
|
}
|
|
32
|
-
var ue = le, b = L, de = ue, pe = S, he = 1 / 0, me = b && 1 / pe(new b([, -0]))[1] == he ? function(
|
|
33
|
-
return new b(
|
|
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
34
|
} : de, fe = me, ve = E, ge = z, ye = B, _e = W, ke = fe, $e = S, xe = 200;
|
|
35
|
-
function be(
|
|
36
|
-
var i = -1, n = ge,
|
|
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
38
|
r = !1, n = ye;
|
|
39
|
-
else if (
|
|
40
|
-
var _ = e ? null : ke(
|
|
39
|
+
else if (a >= xe) {
|
|
40
|
+
var _ = e ? null : ke(s);
|
|
41
41
|
if (_)
|
|
42
42
|
return $e(_);
|
|
43
43
|
r = !1, n = _e, l = new ve();
|
|
44
44
|
} else
|
|
45
45
|
l = e ? [] : c;
|
|
46
46
|
e:
|
|
47
|
-
for (; ++i <
|
|
48
|
-
var d =
|
|
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
50
|
for (var I = l.length; I--; )
|
|
51
51
|
if (l[I] === m)
|
|
@@ -57,8 +57,8 @@ function be(a, e, t) {
|
|
|
57
57
|
return c;
|
|
58
58
|
}
|
|
59
59
|
var we = be, Ce = j, Te = we;
|
|
60
|
-
function Ie(
|
|
61
|
-
return
|
|
60
|
+
function Ie(s, e) {
|
|
61
|
+
return s && s.length ? Te(s, Ce(e)) : [];
|
|
62
62
|
}
|
|
63
63
|
var Ae = Ie;
|
|
64
64
|
const Pe = /* @__PURE__ */ F(Ae), Se = {
|
|
@@ -131,25 +131,25 @@ const Pe = /* @__PURE__ */ F(Ae), Se = {
|
|
|
131
131
|
var Ve = function() {
|
|
132
132
|
var e = this, t = e._self._c;
|
|
133
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(
|
|
134
|
+
return t("div", { key: n, staticClass: "package-group-option", style: { backgroundColor: i.background }, on: { click: function(a) {
|
|
135
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(
|
|
137
|
-
return t("div", { key:
|
|
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
|
+
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
138
|
boxShadow: `0 0 0 1px white, 0 0 0 2px ${i.background}`,
|
|
139
139
|
backgroundColor: i.background
|
|
140
140
|
} }), e._m(1, !0)]);
|
|
141
|
-
}) : e._e(), i.value === "checkbox" ? e._l(3, function(
|
|
142
|
-
return t("div", { key:
|
|
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
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
145
|
}, Re = [function() {
|
|
146
|
-
var
|
|
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
155
|
Se,
|
|
@@ -157,7 +157,7 @@ var Ve = function() {
|
|
|
157
157
|
Re,
|
|
158
158
|
!1,
|
|
159
159
|
null,
|
|
160
|
-
"
|
|
160
|
+
"b67c5afd"
|
|
161
161
|
);
|
|
162
162
|
const Oe = De.exports, Me = {
|
|
163
163
|
name: "ArticleAutocomplete",
|
|
@@ -193,23 +193,23 @@ const Oe = De.exports, Me = {
|
|
|
193
193
|
ids: "articles/articleIdList"
|
|
194
194
|
}),
|
|
195
195
|
whiteList() {
|
|
196
|
-
const
|
|
196
|
+
const s = [];
|
|
197
197
|
if (this.$refs.dropdown !== void 0) {
|
|
198
198
|
const e = this.$refs.dropdown.querySelectorAll("*");
|
|
199
199
|
for (const t of e)
|
|
200
|
-
|
|
200
|
+
s.push(t);
|
|
201
201
|
}
|
|
202
202
|
if (this.$refs.input !== void 0) {
|
|
203
203
|
const e = this.$refs.input.$el.querySelectorAll("*");
|
|
204
204
|
for (const t of e)
|
|
205
|
-
|
|
205
|
+
s.push(t);
|
|
206
206
|
}
|
|
207
|
-
return
|
|
207
|
+
return s;
|
|
208
208
|
}
|
|
209
209
|
},
|
|
210
210
|
watch: {
|
|
211
|
-
searchResults(
|
|
212
|
-
|
|
211
|
+
searchResults(s, e) {
|
|
212
|
+
s.length !== e.length && (this.selectedIndex = 0);
|
|
213
213
|
}
|
|
214
214
|
},
|
|
215
215
|
created() {
|
|
@@ -225,12 +225,12 @@ const Oe = De.exports, Me = {
|
|
|
225
225
|
loadArticles: p.LOAD_ARTICLES
|
|
226
226
|
}),
|
|
227
227
|
priceFormat: k,
|
|
228
|
-
search(
|
|
229
|
-
this.$emit("input", e), !this.viewSettings.isPublicForm &&
|
|
228
|
+
search(s, e) {
|
|
229
|
+
this.$emit("input", e), !this.viewSettings.isPublicForm && s({
|
|
230
230
|
q: e,
|
|
231
231
|
cb: ({ article: t = [], extensionArticle: i = [] }) => {
|
|
232
232
|
this.searchResults = [
|
|
233
|
-
...t.sort((n,
|
|
233
|
+
...t.sort((n, a) => n.usedTimes > a.usedTimes ? -1 : 1),
|
|
234
234
|
...i
|
|
235
235
|
], !this.isOpen && this.searchResults.length && this.showResults();
|
|
236
236
|
}
|
|
@@ -240,11 +240,11 @@ const Oe = De.exports, Me = {
|
|
|
240
240
|
focus() {
|
|
241
241
|
this.$refs.input.focus();
|
|
242
242
|
},
|
|
243
|
-
onFocus(
|
|
244
|
-
this.isFocus = !0, this.$emit("focus",
|
|
243
|
+
onFocus(s) {
|
|
244
|
+
this.isFocus = !0, this.$emit("focus", s);
|
|
245
245
|
},
|
|
246
|
-
onBlur(
|
|
247
|
-
this.isFocus = !1, this.$emit("blur",
|
|
246
|
+
onBlur(s) {
|
|
247
|
+
this.isFocus = !1, this.$emit("blur", s);
|
|
248
248
|
},
|
|
249
249
|
showResults() {
|
|
250
250
|
this.isOpen = !0;
|
|
@@ -252,15 +252,15 @@ const Oe = De.exports, Me = {
|
|
|
252
252
|
hideResults() {
|
|
253
253
|
this.isOpen = !1;
|
|
254
254
|
},
|
|
255
|
-
onSelect(
|
|
256
|
-
this.$emit("select",
|
|
255
|
+
onSelect(s) {
|
|
256
|
+
this.$emit("select", s), this.hideResults(), this.$refs.input && this.$refs.input.blur();
|
|
257
257
|
},
|
|
258
|
-
onClickOutside(
|
|
259
|
-
this.whiteList.indexOf(
|
|
258
|
+
onClickOutside(s) {
|
|
259
|
+
this.whiteList.indexOf(s.target) < 0 && this.hideResults();
|
|
260
260
|
},
|
|
261
|
-
onKeydown({ keyCode:
|
|
261
|
+
onKeydown({ keyCode: s }) {
|
|
262
262
|
if (this.isOpen) {
|
|
263
|
-
switch (
|
|
263
|
+
switch (s) {
|
|
264
264
|
case 38:
|
|
265
265
|
this.selectedIndex > 0 && this.selectedIndex--;
|
|
266
266
|
break;
|
|
@@ -302,8 +302,8 @@ var Le = function() {
|
|
|
302
302
|
...e.$props
|
|
303
303
|
}, !1), [e._t("prefix", null, { slot: "prefix" }), e._t("suffix", null, { slot: "suffix" })], 2)];
|
|
304
304
|
} }], null, !0) }), e.isOpen ? t("div", { ref: "dropdown", staticClass: "r-container" }, e._l(e.searchResults, function(i, n) {
|
|
305
|
-
return t("div", { key: n, staticClass: "r-item", class: { active: e.selectedIndex === n }, on: { "!click": function(
|
|
306
|
-
return
|
|
305
|
+
return t("div", { key: n, staticClass: "r-item", class: { active: e.selectedIndex === n }, on: { "!click": function(a) {
|
|
306
|
+
return a.stopPropagation(), e.onSelect(i);
|
|
307
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()]);
|
|
308
308
|
}), 0) : e._e()], 1);
|
|
309
309
|
}, Ee = [], ze = /* @__PURE__ */ u(
|
|
@@ -312,7 +312,7 @@ var Le = function() {
|
|
|
312
312
|
Ee,
|
|
313
313
|
!1,
|
|
314
314
|
null,
|
|
315
|
-
"
|
|
315
|
+
"d068ad40"
|
|
316
316
|
);
|
|
317
317
|
const R = ze.exports, A = {
|
|
318
318
|
isDeductable: !1,
|
|
@@ -320,9 +320,9 @@ const R = ze.exports, A = {
|
|
|
320
320
|
greenRot15: !1,
|
|
321
321
|
greenRot20: !1,
|
|
322
322
|
greenRot50: !1
|
|
323
|
-
}, $ = (
|
|
323
|
+
}, $ = (s, e = "", t) => {
|
|
324
324
|
let i = {
|
|
325
|
-
...
|
|
325
|
+
...s,
|
|
326
326
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
327
327
|
// Trigger updatedAt as it us used to decide which houseWork to prioritize
|
|
328
328
|
};
|
|
@@ -332,21 +332,21 @@ const R = ze.exports, A = {
|
|
|
332
332
|
[t]: !0
|
|
333
333
|
}), N(i.quantity) !== "number" && (i.quantity = 0), w(i);
|
|
334
334
|
}, D = ({
|
|
335
|
-
stored:
|
|
335
|
+
stored: s,
|
|
336
336
|
current: e,
|
|
337
337
|
hidePrice: t = !1,
|
|
338
338
|
activeHouseWorkType: i
|
|
339
339
|
}) => {
|
|
340
340
|
let n = H({
|
|
341
|
-
...
|
|
341
|
+
...s,
|
|
342
342
|
quantity: 1,
|
|
343
343
|
showPrice: !t,
|
|
344
344
|
id: null,
|
|
345
|
-
ArticleId:
|
|
345
|
+
ArticleId: s.id,
|
|
346
346
|
packageId: e.packageId
|
|
347
347
|
});
|
|
348
348
|
if (i) {
|
|
349
|
-
const
|
|
349
|
+
const a = (l = []) => l.reduce((_, d) => ({ ..._, [d]: !1 }), {}), c = Object.values(
|
|
350
350
|
V({
|
|
351
351
|
rot: "isDeductable",
|
|
352
352
|
rut: "isRut",
|
|
@@ -355,16 +355,16 @@ const R = ze.exports, A = {
|
|
|
355
355
|
greenRot50: "greenRot50"
|
|
356
356
|
}, [i])
|
|
357
357
|
);
|
|
358
|
-
c.some((l) => !!n[l]) && (n = { ...n, ...
|
|
358
|
+
c.some((l) => !!n[l]) && (n = { ...n, ...a(c) });
|
|
359
359
|
}
|
|
360
360
|
return n;
|
|
361
|
-
}, Be = (
|
|
362
|
-
const t = C(
|
|
363
|
-
switch (
|
|
361
|
+
}, Be = (s, e = null) => {
|
|
362
|
+
const t = C(s.currency, e);
|
|
363
|
+
switch (s.priceType) {
|
|
364
364
|
case "approx":
|
|
365
365
|
return `${q.t("_common:approx")} ${t}`;
|
|
366
366
|
case "openAcc":
|
|
367
|
-
return `${t}/${f(
|
|
367
|
+
return `${t}/${f(s.unitType)}`;
|
|
368
368
|
case "markup":
|
|
369
369
|
return "%";
|
|
370
370
|
default:
|
|
@@ -489,27 +489,27 @@ const R = ze.exports, A = {
|
|
|
489
489
|
get() {
|
|
490
490
|
return this.value || {};
|
|
491
491
|
},
|
|
492
|
-
set(
|
|
493
|
-
this.$emit("input",
|
|
492
|
+
set(s) {
|
|
493
|
+
this.$emit("input", s);
|
|
494
494
|
}
|
|
495
495
|
},
|
|
496
496
|
details() {
|
|
497
|
-
const
|
|
497
|
+
const s = [], {
|
|
498
498
|
priceType: e,
|
|
499
499
|
quantity: t,
|
|
500
500
|
unitType: i,
|
|
501
501
|
price: n,
|
|
502
|
-
vat:
|
|
502
|
+
vat: a,
|
|
503
503
|
discount: r,
|
|
504
504
|
discountType: c
|
|
505
505
|
} = this.article;
|
|
506
|
-
if (e !== "fixed" &&
|
|
506
|
+
if (e !== "fixed" && s.push({ title: this.$t(`priceTypeShort.${e}`) }), U(this.article)) {
|
|
507
507
|
const l = G(this.article);
|
|
508
|
-
|
|
508
|
+
s.push({
|
|
509
509
|
title: this.$t(`_common:deduction.${l}_percentage`)
|
|
510
510
|
});
|
|
511
511
|
}
|
|
512
|
-
return t && ["fixed", "approx"].includes(e) && (i !== "unit" || t > 1) &&
|
|
512
|
+
return t && ["fixed", "approx"].includes(e) && (i !== "unit" || t > 1) && s.push({
|
|
513
513
|
title: f(this.article.unitType, {
|
|
514
514
|
count: t,
|
|
515
515
|
includeCount: !0
|
|
@@ -518,24 +518,24 @@ const R = ze.exports, A = {
|
|
|
518
518
|
icon: '<svg style="margin: 0 4px;" width="6" height="6" viewBox="0 0 148 141" xmlns="http://www.w3.org/2000/svg"><path d="M73.742787 92.65535l-34.444359 47.40859-18.607391-13.51906 34.060775-46.88064L0 61.8743 7.107391 40 62 57.83569V0h23v57.99346L140.378182 40l7.107391 21.8743-54.751812 17.78994 34.060775 46.88064-18.607391 13.51906-34.444358-47.40859z" fill="currentColor" fill-rule="evenodd"/></svg>',
|
|
519
519
|
subTitle: k(n, {
|
|
520
520
|
showZero: !0,
|
|
521
|
-
withVat: this.isIncVat ?
|
|
521
|
+
withVat: this.isIncVat ? a : !1,
|
|
522
522
|
currency: this.article.currency,
|
|
523
523
|
decimals: 2,
|
|
524
524
|
hideZeroDecimals: !0
|
|
525
525
|
})
|
|
526
526
|
}
|
|
527
|
-
}), r &&
|
|
527
|
+
}), r && s.push({
|
|
528
528
|
title: "-" + (c === "fixed" ? k(r, {
|
|
529
|
-
withVat: this.isIncVat ?
|
|
529
|
+
withVat: this.isIncVat ? a : !1,
|
|
530
530
|
currency: this.article.currency
|
|
531
531
|
}) : `${r / 100} %`),
|
|
532
532
|
detailClass: "discount"
|
|
533
|
-
}),
|
|
533
|
+
}), s;
|
|
534
534
|
}
|
|
535
535
|
},
|
|
536
536
|
methods: {
|
|
537
|
-
updateArticle(
|
|
538
|
-
this.article = $(this.article,
|
|
537
|
+
updateArticle(s, e) {
|
|
538
|
+
this.article = $(this.article, s, e);
|
|
539
539
|
},
|
|
540
540
|
onTotalPriceInputFocus() {
|
|
541
541
|
(this.article.discount || this.article.quantity !== 1) && this.$emit("open-modal", { focusEl: "priceInput" });
|
|
@@ -543,8 +543,8 @@ const R = ze.exports, A = {
|
|
|
543
543
|
focusName() {
|
|
544
544
|
this.$refs.name.focus();
|
|
545
545
|
},
|
|
546
|
-
errorMessage(
|
|
547
|
-
return
|
|
546
|
+
errorMessage(s) {
|
|
547
|
+
return s.$error && s.article.name.$error && !s.article.name.maxLength ? this.$t("validations.name.maxLength") : null;
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
550
|
};
|
|
@@ -590,8 +590,8 @@ var Fe = function() {
|
|
|
590
590
|
e.enableRemove && e.$emit("remove");
|
|
591
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) {
|
|
592
592
|
return e.$emit("open-modal");
|
|
593
|
-
} } }, e._l(e.details, function({ title: i, icon: n, subTitle:
|
|
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(
|
|
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) + " ")]);
|
|
595
595
|
}), 0) : e._e(), e.$v.$invalid && e.$v.$dirty ? t("ErrorCallout", { attrs: { message: e.errorMessage(e.$v) } }) : e._e()], 1);
|
|
596
596
|
}, je = [], Ne = /* @__PURE__ */ u(
|
|
597
597
|
We,
|
|
@@ -599,7 +599,7 @@ var Fe = function() {
|
|
|
599
599
|
je,
|
|
600
600
|
!1,
|
|
601
601
|
null,
|
|
602
|
-
"
|
|
602
|
+
"44d89db4"
|
|
603
603
|
);
|
|
604
604
|
const He = Ne.exports, qe = {
|
|
605
605
|
props: {
|
|
@@ -619,8 +619,8 @@ const He = Ne.exports, qe = {
|
|
|
619
619
|
this.removeKeyHandler();
|
|
620
620
|
},
|
|
621
621
|
methods: {
|
|
622
|
-
getNavTooltip(
|
|
623
|
-
return
|
|
622
|
+
getNavTooltip(s) {
|
|
623
|
+
return s === -1 ? {
|
|
624
624
|
content: `
|
|
625
625
|
<div style='margin-bottom: 0.6em;'>
|
|
626
626
|
${this.$t("show", { thing: this.$t("previous") })}
|
|
@@ -632,7 +632,7 @@ const He = Ne.exports, qe = {
|
|
|
632
632
|
</div>
|
|
633
633
|
`,
|
|
634
634
|
html: !0
|
|
635
|
-
} :
|
|
635
|
+
} : s === 1 ? {
|
|
636
636
|
content: `
|
|
637
637
|
<div style='margin-bottom: 0.6em;'>
|
|
638
638
|
${this.$t("show", { thing: this.$t("next") })}
|
|
@@ -644,18 +644,18 @@ const He = Ne.exports, qe = {
|
|
|
644
644
|
</div>
|
|
645
645
|
`,
|
|
646
646
|
html: !0
|
|
647
|
-
} :
|
|
647
|
+
} : s === "close" ? {
|
|
648
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>',
|
|
649
649
|
html: !0
|
|
650
650
|
} : null;
|
|
651
651
|
},
|
|
652
|
-
onKeyUp(
|
|
652
|
+
onKeyUp(s) {
|
|
653
653
|
const e = document.activeElement;
|
|
654
|
-
!(e.hasAttribute("contenteditable") || ["input", "textarea"].includes(e.tagName.toLowerCase())) && (parseInt(
|
|
655
|
-
const i =
|
|
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
656
|
if (i === "Escape" || i === "Esc" || i === 27) {
|
|
657
657
|
const n = this.$modal.getOpenInstances();
|
|
658
|
-
if (
|
|
658
|
+
if (s.defaultPrevented || n.length)
|
|
659
659
|
return;
|
|
660
660
|
this.$emit("close");
|
|
661
661
|
}
|
|
@@ -685,7 +685,7 @@ var Ue = function() {
|
|
|
685
685
|
Ge,
|
|
686
686
|
!1,
|
|
687
687
|
null,
|
|
688
|
-
"
|
|
688
|
+
"226f5608"
|
|
689
689
|
);
|
|
690
690
|
const Ye = Ke.exports, Ze = {
|
|
691
691
|
name: "ArticleUnitEditModal",
|
|
@@ -736,8 +736,8 @@ const Ye = Ke.exports, Ze = {
|
|
|
736
736
|
unitById: "unitTypes/byId"
|
|
737
737
|
}),
|
|
738
738
|
unitItems() {
|
|
739
|
-
return (this.idList || []).map((
|
|
740
|
-
const e = this.unitById(
|
|
739
|
+
return (this.idList || []).map((s) => {
|
|
740
|
+
const e = this.unitById(s), t = f(e.value);
|
|
741
741
|
return {
|
|
742
742
|
...e,
|
|
743
743
|
label: t,
|
|
@@ -751,8 +751,8 @@ const Ye = Ke.exports, Ze = {
|
|
|
751
751
|
watch: {
|
|
752
752
|
stateUnitIds: {
|
|
753
753
|
immediate: !0,
|
|
754
|
-
handler(
|
|
755
|
-
this.idList =
|
|
754
|
+
handler(s) {
|
|
755
|
+
this.idList = s || [];
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
758
|
},
|
|
@@ -763,22 +763,22 @@ const Ye = Ke.exports, Ze = {
|
|
|
763
763
|
updateUnit: p.UPDATE_UNIT_TYPE,
|
|
764
764
|
deleteUnit: p.DELETE_UNIT_TYPE
|
|
765
765
|
}),
|
|
766
|
-
onEdit(
|
|
767
|
-
this.selectedValue = { ...
|
|
766
|
+
onEdit(s) {
|
|
767
|
+
this.selectedValue = { ...s }, this.$refs.unitInput && this.$refs.unitInput.focus();
|
|
768
768
|
},
|
|
769
769
|
async submit() {
|
|
770
|
-
const { id:
|
|
770
|
+
const { id: s, value: e } = this.selectedValue || {};
|
|
771
771
|
if (!e)
|
|
772
772
|
throw new Error("New unitTypes need truthy value!");
|
|
773
773
|
const t = `$${e}`;
|
|
774
|
-
|
|
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();
|
|
775
775
|
},
|
|
776
|
-
async remove(
|
|
776
|
+
async remove(s, e) {
|
|
777
777
|
if (this.removeConfirmIndex !== e) {
|
|
778
778
|
this.removeConfirmIndex = e;
|
|
779
779
|
return;
|
|
780
780
|
}
|
|
781
|
-
await this.deleteUnit({ id:
|
|
781
|
+
await this.deleteUnit({ id: s }), this.reset(), this.removeConfirmIndex = null;
|
|
782
782
|
},
|
|
783
783
|
reset() {
|
|
784
784
|
this.selectedValue = { id: null, value: "" };
|
|
@@ -786,8 +786,8 @@ const Ye = Ke.exports, Ze = {
|
|
|
786
786
|
close() {
|
|
787
787
|
this.$emit("close");
|
|
788
788
|
},
|
|
789
|
-
async onDrop({ removedIndex:
|
|
790
|
-
|
|
789
|
+
async onDrop({ removedIndex: s, addedIndex: e }) {
|
|
790
|
+
s === null && e === null || s !== e && (this.idList = T(this.idList, s, e), await Z(
|
|
791
791
|
"/unitType/setPositions",
|
|
792
792
|
{ ids: this.idList },
|
|
793
793
|
{ invalidateCache: { type: "unitType" } }
|
|
@@ -802,15 +802,15 @@ var Je = function() {
|
|
|
802
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
803
|
e.$set(e.selectedValue, "value", typeof i == "string" ? i.trim() : i);
|
|
804
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(
|
|
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) {
|
|
806
806
|
e.hoverIndex = n;
|
|
807
|
-
}, "&mouseleave": function(
|
|
807
|
+
}, "&mouseleave": function(a) {
|
|
808
808
|
e.hoverIndex = null;
|
|
809
|
-
}, click: function(
|
|
809
|
+
}, click: function(a) {
|
|
810
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(
|
|
812
|
-
return
|
|
813
|
-
}, blur: function(
|
|
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);
|
|
813
|
+
}, blur: function(a) {
|
|
814
814
|
e.removeConfirmIndex = null;
|
|
815
815
|
} } }) : e._e(), t("CButton", { attrs: { icon: "edit", size: "small", type: "none", pattern: "tertiary", circle: "" } })], 1)])]);
|
|
816
816
|
}), 1)], 1)])])]);
|
|
@@ -820,7 +820,7 @@ var Je = function() {
|
|
|
820
820
|
Qe,
|
|
821
821
|
!1,
|
|
822
822
|
null,
|
|
823
|
-
"
|
|
823
|
+
"136d8414"
|
|
824
824
|
);
|
|
825
825
|
const et = Xe.exports, tt = {
|
|
826
826
|
name: "ArticleUnitSelect",
|
|
@@ -845,7 +845,7 @@ const et = Xe.exports, tt = {
|
|
|
845
845
|
unitById: "unitTypes/byId"
|
|
846
846
|
}),
|
|
847
847
|
unitItems() {
|
|
848
|
-
return this.isPublicForm ? ce : (this.unitIds || []).map((
|
|
848
|
+
return this.isPublicForm ? ce : (this.unitIds || []).map((s) => this.unitById(s)).map(({ value: s }) => s);
|
|
849
849
|
}
|
|
850
850
|
},
|
|
851
851
|
created() {
|
|
@@ -862,7 +862,7 @@ const et = Xe.exports, tt = {
|
|
|
862
862
|
{},
|
|
863
863
|
{},
|
|
864
864
|
{
|
|
865
|
-
select: (
|
|
865
|
+
select: (s) => this.$emit("input", s)
|
|
866
866
|
}
|
|
867
867
|
);
|
|
868
868
|
}
|
|
@@ -881,15 +881,15 @@ var it = function() {
|
|
|
881
881
|
}, { slot: "trigger" }), e._l(e.unitItems, function(i, n) {
|
|
882
882
|
return t("CDropdownItem", { key: `${i}-${n}`, attrs: { value: i } }, [e._v(" " + e._s(e.articleUnitLabel(i)) + " ")]);
|
|
883
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);
|
|
884
|
-
},
|
|
884
|
+
}, st = [], at = /* @__PURE__ */ u(
|
|
885
885
|
tt,
|
|
886
886
|
it,
|
|
887
|
-
|
|
887
|
+
st,
|
|
888
888
|
!1,
|
|
889
889
|
null,
|
|
890
|
-
"
|
|
890
|
+
"ff74de30"
|
|
891
891
|
);
|
|
892
|
-
const nt =
|
|
892
|
+
const nt = at.exports, rt = {
|
|
893
893
|
name: "ArticleModal",
|
|
894
894
|
i18nOptions: {
|
|
895
895
|
namespaces: "ArticleModal",
|
|
@@ -984,8 +984,8 @@ const nt = st.exports, rt = {
|
|
|
984
984
|
get() {
|
|
985
985
|
return this.articleList[this.index] || {};
|
|
986
986
|
},
|
|
987
|
-
set(
|
|
988
|
-
this.$emit("input",
|
|
987
|
+
set(s) {
|
|
988
|
+
this.$emit("input", s);
|
|
989
989
|
}
|
|
990
990
|
},
|
|
991
991
|
useVat() {
|
|
@@ -995,52 +995,52 @@ const nt = st.exports, rt = {
|
|
|
995
995
|
return o(this, "_document.vatType") || "";
|
|
996
996
|
},
|
|
997
997
|
checkboxItems() {
|
|
998
|
-
const { article:
|
|
998
|
+
const { article: s } = this || {}, { priceType: e } = this.article || {}, t = [
|
|
999
999
|
...e !== "markup" ? [
|
|
1000
1000
|
{
|
|
1001
1001
|
label: this.$t("discount").capitalize(),
|
|
1002
|
-
value:
|
|
1002
|
+
value: s.discount || this.showDiscountInput,
|
|
1003
1003
|
onClick: () => {
|
|
1004
1004
|
this.showDiscountInput || this.focusEl("discountInput"), this.showDiscountInput = !this.showDiscountInput;
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
1007
|
] : [],
|
|
1008
|
-
...this.getCompanySetting("showRot") ||
|
|
1008
|
+
...this.getCompanySetting("showRot") || s.isDeductable ? [
|
|
1009
1009
|
{
|
|
1010
1010
|
label: this.$t("_common:deduction.rot"),
|
|
1011
1011
|
value: this.article.isDeductable,
|
|
1012
|
-
onClick: () => this.updateArticle(!
|
|
1012
|
+
onClick: () => this.updateArticle(!s.isDeductable, "isDeductable")
|
|
1013
1013
|
}
|
|
1014
1014
|
] : [],
|
|
1015
|
-
...this.getCompanySetting("showRut") ||
|
|
1015
|
+
...this.getCompanySetting("showRut") || s.isRut ? [
|
|
1016
1016
|
{
|
|
1017
1017
|
label: this.$t("_common:deduction.rut"),
|
|
1018
|
-
value:
|
|
1019
|
-
onClick: () => this.updateArticle(!
|
|
1018
|
+
value: s.isRut,
|
|
1019
|
+
onClick: () => this.updateArticle(!s.isRut, "isRut")
|
|
1020
1020
|
}
|
|
1021
1021
|
] : [],
|
|
1022
|
-
...
|
|
1022
|
+
...s.greenRot15 ? [
|
|
1023
1023
|
{
|
|
1024
1024
|
label: this.$t("_common:deduction.greenRot15_percentage"),
|
|
1025
|
-
value:
|
|
1026
|
-
onClick: () => this.updateArticle(!
|
|
1025
|
+
value: s.greenRot15,
|
|
1026
|
+
onClick: () => this.updateArticle(!s.greenRot15, "greenRot15")
|
|
1027
1027
|
}
|
|
1028
1028
|
] : [],
|
|
1029
|
-
...this.getCompanySetting("showGreenRot") ||
|
|
1029
|
+
...this.getCompanySetting("showGreenRot") || s.greenRot20 || s.greenRot50 ? [
|
|
1030
1030
|
{
|
|
1031
1031
|
label: this.$t("_common:deduction.greenRot20_percentage"),
|
|
1032
|
-
value:
|
|
1033
|
-
onClick: () => this.updateArticle(!
|
|
1032
|
+
value: s.greenRot20,
|
|
1033
|
+
onClick: () => this.updateArticle(!s.greenRot20, "greenRot20")
|
|
1034
1034
|
},
|
|
1035
1035
|
{
|
|
1036
1036
|
label: this.$t("_common:deduction.greenRot50_percentage"),
|
|
1037
|
-
value:
|
|
1038
|
-
onClick: () => this.updateArticle(!
|
|
1037
|
+
value: s.greenRot50,
|
|
1038
|
+
onClick: () => this.updateArticle(!s.greenRot50, "greenRot50")
|
|
1039
1039
|
}
|
|
1040
1040
|
] : []
|
|
1041
1041
|
];
|
|
1042
1042
|
if (this.allowHidePrice) {
|
|
1043
|
-
const { showPrice: i } =
|
|
1043
|
+
const { showPrice: i } = s || {};
|
|
1044
1044
|
t.push({
|
|
1045
1045
|
label: this.$t("hidePriceLabel"),
|
|
1046
1046
|
value: !i,
|
|
@@ -1052,28 +1052,28 @@ const nt = st.exports, rt = {
|
|
|
1052
1052
|
priceTypeOptions() {
|
|
1053
1053
|
if (!this.enablePriceTypes || this.rootPriceType === "fixed")
|
|
1054
1054
|
return [];
|
|
1055
|
-
const { priceType:
|
|
1055
|
+
const { priceType: s } = this.article, e = (i) => this.$t(`priceTypeTooltips.${i}`), t = [
|
|
1056
1056
|
{
|
|
1057
1057
|
label: this.$t("price.fixed"),
|
|
1058
1058
|
tooltip: e("fixed"),
|
|
1059
|
-
value:
|
|
1059
|
+
value: s === "fixed",
|
|
1060
1060
|
onClick: () => this.updateArticle("fixed", "priceType")
|
|
1061
1061
|
}
|
|
1062
1062
|
];
|
|
1063
1063
|
return this.rootPriceType === "approx" && t.push({
|
|
1064
1064
|
label: this.$t("price.approx"),
|
|
1065
1065
|
tooltip: e("approx"),
|
|
1066
|
-
value:
|
|
1066
|
+
value: s === "approx",
|
|
1067
1067
|
onClick: () => this.updateArticle("approx", "priceType")
|
|
1068
1068
|
}), this.rootPriceType.startsWith("openAcc") && (t.push({
|
|
1069
1069
|
label: this.$t("price.openAcc"),
|
|
1070
1070
|
tooltip: e("openAcc"),
|
|
1071
|
-
value:
|
|
1071
|
+
value: s === "openAcc",
|
|
1072
1072
|
onClick: () => this.updateArticle("openAcc", "priceType")
|
|
1073
1073
|
}), t.push({
|
|
1074
1074
|
label: this.$t("price.markup"),
|
|
1075
1075
|
tooltip: e("markup"),
|
|
1076
|
-
value:
|
|
1076
|
+
value: s === "markup",
|
|
1077
1077
|
onClick: () => this.updateArticle("markup", "priceType")
|
|
1078
1078
|
})), t;
|
|
1079
1079
|
}
|
|
@@ -1081,29 +1081,29 @@ const nt = st.exports, rt = {
|
|
|
1081
1081
|
watch: {
|
|
1082
1082
|
index: {
|
|
1083
1083
|
immediate: !0,
|
|
1084
|
-
handler(
|
|
1085
|
-
|
|
1084
|
+
handler(s, e) {
|
|
1085
|
+
s !== e && (this.showDiscountInput = !1);
|
|
1086
1086
|
}
|
|
1087
1087
|
},
|
|
1088
1088
|
isIncVat: {
|
|
1089
1089
|
immediate: !0,
|
|
1090
|
-
handler(
|
|
1091
|
-
this.setPricesIncVat = !!
|
|
1090
|
+
handler(s) {
|
|
1091
|
+
this.setPricesIncVat = !!s;
|
|
1092
1092
|
}
|
|
1093
1093
|
},
|
|
1094
1094
|
"article.discount": {
|
|
1095
1095
|
immediate: !0,
|
|
1096
|
-
handler(
|
|
1097
|
-
|
|
1096
|
+
handler(s) {
|
|
1097
|
+
s && (this.showDiscountInput = !0);
|
|
1098
1098
|
}
|
|
1099
1099
|
},
|
|
1100
1100
|
"article.priceType": {
|
|
1101
|
-
handler(
|
|
1102
|
-
|
|
1101
|
+
handler(s) {
|
|
1102
|
+
s === "markup" && (this.showDiscountInput = !1), ["openAcc", "markup"].includes(s) && this.updateArticle(1, "quantity");
|
|
1103
1103
|
}
|
|
1104
1104
|
},
|
|
1105
|
-
showDiscountInput(
|
|
1106
|
-
|
|
1105
|
+
showDiscountInput(s) {
|
|
1106
|
+
s || this.updateArticle(0, "discount");
|
|
1107
1107
|
}
|
|
1108
1108
|
},
|
|
1109
1109
|
mounted() {
|
|
@@ -1116,36 +1116,36 @@ const nt = st.exports, rt = {
|
|
|
1116
1116
|
...v({
|
|
1117
1117
|
createArticle: p.DO_CREATE_ARTICLE
|
|
1118
1118
|
}),
|
|
1119
|
-
onCustomVatBlur(
|
|
1120
|
-
o(
|
|
1119
|
+
onCustomVatBlur(s) {
|
|
1120
|
+
o(s, "target.value") || "" || this.updateArticle(0, "vat");
|
|
1121
1121
|
},
|
|
1122
|
-
onCustomVatInput(
|
|
1123
|
-
const e = o(
|
|
1122
|
+
onCustomVatInput(s) {
|
|
1123
|
+
const e = o(s, "target.value") || "";
|
|
1124
1124
|
if (!e)
|
|
1125
1125
|
return;
|
|
1126
1126
|
let t = e > 100 ? e.slice(0, e.length - 1) : e;
|
|
1127
1127
|
t < 0 && (t = 0), this.updateArticle(Number.parseFloat(t), "vat");
|
|
1128
1128
|
},
|
|
1129
|
-
updateArticle(
|
|
1130
|
-
this.article = $(this.article,
|
|
1129
|
+
updateArticle(s, e) {
|
|
1130
|
+
this.article = $(this.article, s, e);
|
|
1131
1131
|
},
|
|
1132
1132
|
close() {
|
|
1133
1133
|
this.$emit("close");
|
|
1134
1134
|
},
|
|
1135
|
-
onKeydown(
|
|
1136
|
-
|
|
1135
|
+
onKeydown(s) {
|
|
1136
|
+
s.keyCode === 13 && s.shiftKey && (s.preventDefault(), this.addNewArticle());
|
|
1137
1137
|
},
|
|
1138
|
-
onGo(
|
|
1139
|
-
const e = this.index +
|
|
1138
|
+
onGo(s) {
|
|
1139
|
+
const e = this.index + s;
|
|
1140
1140
|
this.articleList[e] && (this.close(), this.$emit("open-modal", e));
|
|
1141
1141
|
},
|
|
1142
1142
|
async addNewArticle() {
|
|
1143
1143
|
this.$v.$invalid || await this.saveArticle(), this.$emit("add", { openModal: !0 }), this.close();
|
|
1144
1144
|
},
|
|
1145
|
-
focusEl(
|
|
1145
|
+
focusEl(s) {
|
|
1146
1146
|
this.$nextTick(() => {
|
|
1147
1147
|
this.$nextTick(() => {
|
|
1148
|
-
this.$refs[
|
|
1148
|
+
this.$refs[s] && this.$refs[s].focus && this.$refs[s].focus();
|
|
1149
1149
|
});
|
|
1150
1150
|
});
|
|
1151
1151
|
},
|
|
@@ -1155,8 +1155,8 @@ const nt = st.exports, rt = {
|
|
|
1155
1155
|
});
|
|
1156
1156
|
},
|
|
1157
1157
|
toggleDiscountType() {
|
|
1158
|
-
let
|
|
1159
|
-
this.article.discountType === "fixed" && (
|
|
1158
|
+
let s = "fixed";
|
|
1159
|
+
this.article.discountType === "fixed" && (s = "percentage"), this.updateArticle(s, "discountType");
|
|
1160
1160
|
},
|
|
1161
1161
|
async onSaveArticle() {
|
|
1162
1162
|
if (this.$v.$invalid) {
|
|
@@ -1168,11 +1168,11 @@ const nt = st.exports, rt = {
|
|
|
1168
1168
|
async saveArticle() {
|
|
1169
1169
|
if (this.viewSettings.isPublicForm)
|
|
1170
1170
|
return;
|
|
1171
|
-
let { ArticleId:
|
|
1172
|
-
!
|
|
1171
|
+
let { ArticleId: s } = this.article;
|
|
1172
|
+
!s && ((t) => typeof t == "string" && !!t.trim())(this.article.name) && (s = await this.createArticle({
|
|
1173
1173
|
body: this.article,
|
|
1174
1174
|
showMessage: !1
|
|
1175
|
-
}), this.article = { ...this.article, ArticleId:
|
|
1175
|
+
}), this.article = { ...this.article, ArticleId: s });
|
|
1176
1176
|
}
|
|
1177
1177
|
}
|
|
1178
1178
|
};
|
|
@@ -1218,18 +1218,18 @@ var ot = function() {
|
|
|
1218
1218
|
);
|
|
1219
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
1220
|
e.updateArticle(Number.parseFloat(i.target.value), "vat");
|
|
1221
|
-
} } }, e._l(e.vatOptions, function({ translation: i, value: n },
|
|
1222
|
-
return t("option", { key:
|
|
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:
|
|
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) {
|
|
1224
1224
|
return t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: {
|
|
1225
1225
|
content: r,
|
|
1226
1226
|
delay: { show: 300, hide: 0 }
|
|
1227
1227
|
}, expression: `{
|
|
1228
1228
|
content: tooltip,
|
|
1229
1229
|
delay: { show: 300, hide: 0 }
|
|
1230
|
-
}` }], key: i + c, staticClass: "tag-item", class: { active: n }, on: { click:
|
|
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:
|
|
1232
|
-
return t("div", { key: i + r, staticClass: "tag-item", class: { active: n }, on: { click:
|
|
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) + " ")]);
|
|
1233
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: {
|
|
1234
1234
|
offset: 7,
|
|
1235
1235
|
html: !0,
|
|
@@ -1269,7 +1269,7 @@ var ot = function() {
|
|
|
1269
1269
|
ct,
|
|
1270
1270
|
!1,
|
|
1271
1271
|
null,
|
|
1272
|
-
"
|
|
1272
|
+
"06018d45"
|
|
1273
1273
|
);
|
|
1274
1274
|
const ut = lt.exports, dt = {
|
|
1275
1275
|
i18nOptions: {
|
|
@@ -1294,8 +1294,8 @@ const ut = lt.exports, dt = {
|
|
|
1294
1294
|
// eslint-disable-next-line vue/no-reserved-component-names
|
|
1295
1295
|
Article: He,
|
|
1296
1296
|
ArticleModal: ut,
|
|
1297
|
-
WithDimensions:
|
|
1298
|
-
draggable:
|
|
1297
|
+
WithDimensions: se,
|
|
1298
|
+
draggable: ae
|
|
1299
1299
|
},
|
|
1300
1300
|
mixins: [y([])],
|
|
1301
1301
|
props: {
|
|
@@ -1350,24 +1350,24 @@ const ut = lt.exports, dt = {
|
|
|
1350
1350
|
return o(this, "_document.vatType");
|
|
1351
1351
|
},
|
|
1352
1352
|
showVatToggle() {
|
|
1353
|
-
return this.useVat && (this.setPricesIncVat || (this.articles || []).some(({ vat:
|
|
1353
|
+
return this.useVat && (this.setPricesIncVat || (this.articles || []).some(({ vat: s }) => s !== null));
|
|
1354
1354
|
}
|
|
1355
1355
|
},
|
|
1356
1356
|
watch: {
|
|
1357
1357
|
activeHouseWorkType: {
|
|
1358
1358
|
immediate: !0,
|
|
1359
|
-
handler(
|
|
1360
|
-
this.toggleDeductions(
|
|
1359
|
+
handler(s) {
|
|
1360
|
+
this.toggleDeductions(s);
|
|
1361
1361
|
}
|
|
1362
1362
|
},
|
|
1363
|
-
isIndivid(
|
|
1364
|
-
|
|
1363
|
+
isIndivid(s) {
|
|
1364
|
+
s || this.toggleDeductions(!1);
|
|
1365
1365
|
},
|
|
1366
|
-
setPricesIncVat(
|
|
1366
|
+
setPricesIncVat(s) {
|
|
1367
1367
|
this.updateArticlesVatOption(), this.showMessage({
|
|
1368
1368
|
type: "info",
|
|
1369
1369
|
message: this.$t("vatOption.message", {
|
|
1370
|
-
vatOption: this.$t(`_common:vat.${
|
|
1370
|
+
vatOption: this.$t(`_common:vat.${s ? "incVat" : "exVat"}`, {
|
|
1371
1371
|
thing: this.$t("_common:vat.sharedTitle")
|
|
1372
1372
|
})
|
|
1373
1373
|
}),
|
|
@@ -1379,38 +1379,38 @@ const ut = lt.exports, dt = {
|
|
|
1379
1379
|
...v({
|
|
1380
1380
|
showMessage: p.SHOW_MESSAGE
|
|
1381
1381
|
}),
|
|
1382
|
-
openModal(
|
|
1383
|
-
this.selectedIndex =
|
|
1382
|
+
openModal(s, { focusEl: e = "" } = {}) {
|
|
1383
|
+
this.selectedIndex = s, this.showModal = !0, e && this.$nextTick(() => {
|
|
1384
1384
|
this.$nextTick(() => {
|
|
1385
1385
|
this.$refs.articleModal && this.$refs.articleModal.focusEl(e);
|
|
1386
1386
|
});
|
|
1387
1387
|
});
|
|
1388
1388
|
},
|
|
1389
|
-
updateArticleObject(
|
|
1389
|
+
updateArticleObject(s, e) {
|
|
1390
1390
|
const t = e;
|
|
1391
|
-
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 });
|
|
1392
1392
|
},
|
|
1393
|
-
onRemoveArticle(
|
|
1394
|
-
this.$emit("remove",
|
|
1393
|
+
onRemoveArticle(s) {
|
|
1394
|
+
this.$emit("remove", s);
|
|
1395
1395
|
},
|
|
1396
|
-
onEsc(
|
|
1397
|
-
|
|
1396
|
+
onEsc(s, e) {
|
|
1397
|
+
s === this.articles.length - 1 && ["name", "price", "discount"].every((t) => !e[t]) && this.onRemoveArticle(s);
|
|
1398
1398
|
},
|
|
1399
1399
|
changeVat() {
|
|
1400
1400
|
this.$emit("update:setPricesIncVat", !this.setPricesIncVat);
|
|
1401
1401
|
},
|
|
1402
1402
|
updateArticlesVatOption() {
|
|
1403
|
-
this.articles.forEach((
|
|
1404
|
-
if (
|
|
1403
|
+
this.articles.forEach((s, e) => {
|
|
1404
|
+
if (s.priceType === "markup")
|
|
1405
1405
|
return;
|
|
1406
|
-
let t = g({ amount:
|
|
1407
|
-
(100 +
|
|
1406
|
+
let t = g({ amount: s.price }).divide(
|
|
1407
|
+
(100 + s.vat) * 0.01
|
|
1408
1408
|
);
|
|
1409
|
-
this.setPricesIncVat || (t = g({ amount:
|
|
1410
|
-
(100 +
|
|
1409
|
+
this.setPricesIncVat || (t = g({ amount: s.price }).multiply(
|
|
1410
|
+
(100 + s.vat) * 0.01
|
|
1411
1411
|
)), this.updateArticleObject(
|
|
1412
1412
|
e,
|
|
1413
|
-
w({ ...
|
|
1413
|
+
w({ ...s, price: t.getAmount() })
|
|
1414
1414
|
);
|
|
1415
1415
|
});
|
|
1416
1416
|
},
|
|
@@ -1423,33 +1423,33 @@ const ut = lt.exports, dt = {
|
|
|
1423
1423
|
openLastArticle() {
|
|
1424
1424
|
this.$nextTick(() => this.openModal(this.articles.length - 1));
|
|
1425
1425
|
},
|
|
1426
|
-
toggleDeductions(
|
|
1426
|
+
toggleDeductions(s) {
|
|
1427
1427
|
const e = {
|
|
1428
1428
|
rot: "isDeductable",
|
|
1429
1429
|
rut: "isRut",
|
|
1430
1430
|
greenRot15: "greenRot15",
|
|
1431
1431
|
greenRot20: "greenRot20",
|
|
1432
1432
|
greenRot50: "greenRot50"
|
|
1433
|
-
}, t = (i = []) => i.reduce((n,
|
|
1434
|
-
e[
|
|
1435
|
-
const
|
|
1436
|
-
if (
|
|
1437
|
-
const r = { ...i, ...t(
|
|
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) };
|
|
1438
1438
|
this.$emit("input", { index: n, value: r });
|
|
1439
1439
|
}
|
|
1440
|
-
}) :
|
|
1441
|
-
const
|
|
1442
|
-
if (
|
|
1443
|
-
const r = { ...i, ...t(
|
|
1440
|
+
}) : s === !1 && this.articles.forEach((i, n) => {
|
|
1441
|
+
const a = Object.values(e);
|
|
1442
|
+
if (a.some((r) => !!i[r])) {
|
|
1443
|
+
const r = { ...i, ...t(a) };
|
|
1444
1444
|
this.$emit("input", { index: n, value: r });
|
|
1445
1445
|
}
|
|
1446
1446
|
});
|
|
1447
1447
|
},
|
|
1448
|
-
onChange(
|
|
1449
|
-
const { added: e, moved: t, removed: i } =
|
|
1448
|
+
onChange(s) {
|
|
1449
|
+
const { added: e, moved: t, removed: i } = s;
|
|
1450
1450
|
if (e) {
|
|
1451
|
-
const { newIndex: n, element:
|
|
1452
|
-
this.$emit("insert", { index: n, value:
|
|
1451
|
+
const { newIndex: n, element: a } = e;
|
|
1452
|
+
this.$emit("insert", { index: n, value: a });
|
|
1453
1453
|
} else if (t) {
|
|
1454
1454
|
const n = T(
|
|
1455
1455
|
this.articles,
|
|
@@ -1474,23 +1474,23 @@ var pt = function() {
|
|
|
1474
1474
|
animation: 150,
|
|
1475
1475
|
ghostClass: "article-ghost",
|
|
1476
1476
|
handle: ".article-draggable-handle"
|
|
1477
|
-
}, !1), [t("transition-group", { staticStyle: { position: "relative", transition: "100ms" }, attrs: { name: "article-list" } }, e._l(e.articlesWithTotal, function(n,
|
|
1477
|
+
}, !1), [t("transition-group", { staticStyle: { position: "relative", transition: "100ms" }, attrs: { name: "article-list" } }, e._l(e.articlesWithTotal, function(n, a) {
|
|
1478
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) {
|
|
1479
1479
|
return e.$emit("update:currency", r);
|
|
1480
1480
|
}, input: function(r) {
|
|
1481
|
-
return e.updateArticleObject(
|
|
1481
|
+
return e.updateArticleObject(a, r);
|
|
1482
1482
|
}, focus: function(r) {
|
|
1483
1483
|
return e.$emit("focus");
|
|
1484
1484
|
}, remove: function(r) {
|
|
1485
|
-
return e.onRemoveArticle(
|
|
1485
|
+
return e.onRemoveArticle(a);
|
|
1486
1486
|
}, "open-modal": function(r) {
|
|
1487
|
-
return e.openModal(
|
|
1487
|
+
return e.openModal(a, r);
|
|
1488
1488
|
}, add: function(r) {
|
|
1489
|
-
|
|
1489
|
+
a === e.articlesWithTotal.length - 1 && e.$emit("add");
|
|
1490
1490
|
}, select: function(r) {
|
|
1491
|
-
|
|
1491
|
+
a === e.articlesWithTotal.length - 1 && e.$emit("add");
|
|
1492
1492
|
}, esc: function(r) {
|
|
1493
|
-
return e.onEsc(
|
|
1493
|
+
return e.onEsc(a, n);
|
|
1494
1494
|
} } });
|
|
1495
1495
|
}), 1)], 1)];
|
|
1496
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) {
|
|
@@ -1508,7 +1508,7 @@ var pt = function() {
|
|
|
1508
1508
|
ht,
|
|
1509
1509
|
!1,
|
|
1510
1510
|
null,
|
|
1511
|
-
"
|
|
1511
|
+
"3e63aac7"
|
|
1512
1512
|
);
|
|
1513
1513
|
const ft = mt.exports, vt = {
|
|
1514
1514
|
name: "MaxTotalInput",
|
|
@@ -1551,9 +1551,9 @@ const ft = mt.exports, vt = {
|
|
|
1551
1551
|
})
|
|
1552
1552
|
},
|
|
1553
1553
|
watch: {
|
|
1554
|
-
isIncVat(
|
|
1554
|
+
isIncVat(s) {
|
|
1555
1555
|
let e = g({ amount: this.value }).divide(1.25);
|
|
1556
|
-
|
|
1556
|
+
s || (e = g({ amount: this.value }).multiply(125 * 0.01)), this.$emit("input", e.getAmount());
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
1559
1559
|
};
|
|
@@ -1596,7 +1596,7 @@ var xt = function() {
|
|
|
1596
1596
|
bt,
|
|
1597
1597
|
!1,
|
|
1598
1598
|
null,
|
|
1599
|
-
"
|
|
1599
|
+
"13ef0942"
|
|
1600
1600
|
);
|
|
1601
1601
|
const Ct = wt.exports, Tt = {
|
|
1602
1602
|
name: "EditDeduction",
|
|
@@ -1629,13 +1629,13 @@ const Ct = wt.exports, Tt = {
|
|
|
1629
1629
|
};
|
|
1630
1630
|
},
|
|
1631
1631
|
watch: {
|
|
1632
|
-
houseWorkType(
|
|
1633
|
-
|
|
1632
|
+
houseWorkType(s) {
|
|
1633
|
+
s || (this.houseWorkManualAmount = null);
|
|
1634
1634
|
}
|
|
1635
1635
|
},
|
|
1636
1636
|
methods: {
|
|
1637
|
-
setDeduction(
|
|
1638
|
-
this.internalValue = g({ amount: this.total }).multiply(
|
|
1637
|
+
setDeduction(s) {
|
|
1638
|
+
this.internalValue = g({ amount: this.total }).multiply(s).getAmount();
|
|
1639
1639
|
},
|
|
1640
1640
|
showModal() {
|
|
1641
1641
|
this.internalValue = this.houseWorkAmount, this.$modal.show(`deduction-modal-${this._uid}`);
|
|
@@ -1681,7 +1681,7 @@ var It = function() {
|
|
|
1681
1681
|
At,
|
|
1682
1682
|
!1,
|
|
1683
1683
|
null,
|
|
1684
|
-
"
|
|
1684
|
+
"f3ba2092"
|
|
1685
1685
|
);
|
|
1686
1686
|
const St = Pt.exports, Vt = {
|
|
1687
1687
|
name: "Pricing",
|
|
@@ -1772,10 +1772,10 @@ const St = Pt.exports, Vt = {
|
|
|
1772
1772
|
}));
|
|
1773
1773
|
},
|
|
1774
1774
|
prices() {
|
|
1775
|
-
const { prices:
|
|
1775
|
+
const { prices: s } = this._document.packageGroups.getPackageById(
|
|
1776
1776
|
this.packageId
|
|
1777
1777
|
);
|
|
1778
|
-
return
|
|
1778
|
+
return s;
|
|
1779
1779
|
},
|
|
1780
1780
|
showHouseWork() {
|
|
1781
1781
|
return !!o(this.prices, "region.houseWorkType", !1) || !!o(this.prices, "region.houseWorkManualAmount", !1);
|
|
@@ -1787,7 +1787,7 @@ var Rt = function() {
|
|
|
1787
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: {
|
|
1788
1788
|
houseWorkManualAmount: `${e.basePath}.data.prices.region.houseWorkManualAmount`
|
|
1789
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(
|
|
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
1791
|
i.action && i.action();
|
|
1792
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) + " ")])]);
|
|
1793
1793
|
}), 0)]);
|
|
@@ -1797,7 +1797,7 @@ var Rt = function() {
|
|
|
1797
1797
|
Dt,
|
|
1798
1798
|
!1,
|
|
1799
1799
|
null,
|
|
1800
|
-
"
|
|
1800
|
+
"d22ef0b4"
|
|
1801
1801
|
);
|
|
1802
1802
|
const Mt = Ot.exports, Lt = {
|
|
1803
1803
|
name: "PackageItemEdit",
|
|
@@ -1881,7 +1881,7 @@ const Mt = Ot.exports, Lt = {
|
|
|
1881
1881
|
return this._document.allArticles;
|
|
1882
1882
|
},
|
|
1883
1883
|
mappedPackageArticles() {
|
|
1884
|
-
return (this.articles || []).map((
|
|
1884
|
+
return (this.articles || []).map((s, e) => ({ ...s, i: e })).filter(({ packageId: s }) => s === this.packageId);
|
|
1885
1885
|
},
|
|
1886
1886
|
internalDescription: {
|
|
1887
1887
|
get() {
|
|
@@ -1891,16 +1891,16 @@ const Mt = Ot.exports, Lt = {
|
|
|
1891
1891
|
this._document._doc
|
|
1892
1892
|
);
|
|
1893
1893
|
},
|
|
1894
|
-
set(
|
|
1895
|
-
this.description = Q(
|
|
1894
|
+
set(s) {
|
|
1895
|
+
this.description = Q(s);
|
|
1896
1896
|
}
|
|
1897
1897
|
}
|
|
1898
1898
|
},
|
|
1899
1899
|
watch: {
|
|
1900
|
-
priceType(
|
|
1901
|
-
if (!(
|
|
1902
|
-
if (
|
|
1903
|
-
const t =
|
|
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
1904
|
this.mappedPackageArticles.forEach((i, n) => {
|
|
1905
1905
|
this.onArticleInput({
|
|
1906
1906
|
index: n,
|
|
@@ -1913,7 +1913,7 @@ const Mt = Ot.exports, Lt = {
|
|
|
1913
1913
|
});
|
|
1914
1914
|
}
|
|
1915
1915
|
}
|
|
1916
|
-
|
|
1916
|
+
s !== "openAccMaxPrice" && (this.maxTotal = null);
|
|
1917
1917
|
}
|
|
1918
1918
|
},
|
|
1919
1919
|
methods: {
|
|
@@ -1922,18 +1922,18 @@ const Mt = Ot.exports, Lt = {
|
|
|
1922
1922
|
},
|
|
1923
1923
|
// Article Methods
|
|
1924
1924
|
createEmptyArticle() {
|
|
1925
|
-
const
|
|
1925
|
+
const s = this.newArticle({
|
|
1926
1926
|
priceType: this.priceType.startsWith("open") ? "openAcc" : this.priceType,
|
|
1927
1927
|
packageId: this.packageId,
|
|
1928
1928
|
currency: this.currency
|
|
1929
1929
|
});
|
|
1930
1930
|
this.$emit("input", {
|
|
1931
1931
|
key: "articles",
|
|
1932
|
-
value: [...this.articles,
|
|
1932
|
+
value: [...this.articles, s]
|
|
1933
1933
|
});
|
|
1934
1934
|
},
|
|
1935
|
-
onArticleInput({ index:
|
|
1936
|
-
const { i: t } = this.mappedPackageArticles[
|
|
1935
|
+
onArticleInput({ index: s, value: e }) {
|
|
1936
|
+
const { i: t } = this.mappedPackageArticles[s], i = X(e, [
|
|
1937
1937
|
"allowRot",
|
|
1938
1938
|
"allowRut",
|
|
1939
1939
|
"isIncVat",
|
|
@@ -1942,13 +1942,13 @@ const Mt = Ot.exports, Lt = {
|
|
|
1942
1942
|
]);
|
|
1943
1943
|
i.currency = this.currency, this.$emit("input", { key: `articles[${[t]}]`, value: i });
|
|
1944
1944
|
},
|
|
1945
|
-
onArticleAdd({ openModal:
|
|
1946
|
-
this.createEmptyArticle(),
|
|
1945
|
+
onArticleAdd({ openModal: s = !1 } = {}) {
|
|
1946
|
+
this.createEmptyArticle(), s ? this.$refs.articleList.openLastArticle() : this.$refs.articleList.focusLastArticle();
|
|
1947
1947
|
},
|
|
1948
|
-
onInsert({ index:
|
|
1948
|
+
onInsert({ index: s, value: e }) {
|
|
1949
1949
|
const t = ee(this.mappedPackageArticles).add(
|
|
1950
1950
|
{ ...e, packageId: this.packageId },
|
|
1951
|
-
|
|
1951
|
+
s
|
|
1952
1952
|
);
|
|
1953
1953
|
this.$emit("input", {
|
|
1954
1954
|
key: "articles",
|
|
@@ -1960,18 +1960,18 @@ const Mt = Ot.exports, Lt = {
|
|
|
1960
1960
|
]
|
|
1961
1961
|
});
|
|
1962
1962
|
},
|
|
1963
|
-
onArticleRemove(
|
|
1964
|
-
const { i: e } = this.mappedPackageArticles[
|
|
1963
|
+
onArticleRemove(s) {
|
|
1964
|
+
const { i: e } = this.mappedPackageArticles[s];
|
|
1965
1965
|
this.$emit("remove", { key: `articles[${[e]}]` });
|
|
1966
1966
|
},
|
|
1967
|
-
onArticleMove(
|
|
1967
|
+
onArticleMove(s) {
|
|
1968
1968
|
this.$emit("input", {
|
|
1969
1969
|
key: "articles",
|
|
1970
1970
|
value: [
|
|
1971
1971
|
...this.articles.filter(
|
|
1972
1972
|
({ packageId: e }) => e !== this.packageId
|
|
1973
1973
|
),
|
|
1974
|
-
...
|
|
1974
|
+
...s
|
|
1975
1975
|
]
|
|
1976
1976
|
});
|
|
1977
1977
|
}
|
|
@@ -2033,16 +2033,16 @@ var Et = function() {
|
|
|
2033
2033
|
zt,
|
|
2034
2034
|
!1,
|
|
2035
2035
|
null,
|
|
2036
|
-
"
|
|
2036
|
+
"667ca0c1"
|
|
2037
2037
|
);
|
|
2038
|
-
const Wt = Bt.exports, Ft = (
|
|
2038
|
+
const Wt = Bt.exports, Ft = (s) => (s || []).slice(0, 1).map((e) => ({
|
|
2039
2039
|
...e,
|
|
2040
2040
|
isSelected: !0,
|
|
2041
2041
|
isSelectedDefault: !0,
|
|
2042
2042
|
toggable: !1
|
|
2043
|
-
})), jt = (
|
|
2044
|
-
const e = o(
|
|
2045
|
-
return (
|
|
2043
|
+
})), jt = (s) => {
|
|
2044
|
+
const e = o(s, "0.data.prices.type") || "fixed";
|
|
2045
|
+
return (s || []).map((t, i) => ({
|
|
2046
2046
|
...t,
|
|
2047
2047
|
toggable: !0,
|
|
2048
2048
|
...i === 0 ? {
|
|
@@ -2058,9 +2058,9 @@ const Wt = Bt.exports, Ft = (a) => (a || []).slice(0, 1).map((e) => ({
|
|
|
2058
2058
|
}
|
|
2059
2059
|
}
|
|
2060
2060
|
}));
|
|
2061
|
-
}, Nt = (
|
|
2061
|
+
}, Nt = (s = []) => {
|
|
2062
2062
|
let e = !1;
|
|
2063
|
-
return
|
|
2063
|
+
return s.map((t) => {
|
|
2064
2064
|
const i = {
|
|
2065
2065
|
...t,
|
|
2066
2066
|
// if any earlier pkg is selected, deselect pkg, otherwise keep as is
|
|
@@ -2073,14 +2073,14 @@ const Wt = Bt.exports, Ft = (a) => (a || []).slice(0, 1).map((e) => ({
|
|
|
2073
2073
|
return (i.isSelected || i.isSelectedDefault) && (e = !0), i;
|
|
2074
2074
|
}, []);
|
|
2075
2075
|
};
|
|
2076
|
-
function Ht(
|
|
2077
|
-
if (
|
|
2076
|
+
function Ht(s, ...e) {
|
|
2077
|
+
if (s === "single")
|
|
2078
2078
|
return Ft(...e);
|
|
2079
|
-
if (
|
|
2079
|
+
if (s === "checkbox")
|
|
2080
2080
|
return jt(...e);
|
|
2081
|
-
if (
|
|
2081
|
+
if (s === "radio")
|
|
2082
2082
|
return Nt(...e);
|
|
2083
|
-
throw new Error(`Package filter type '${
|
|
2083
|
+
throw new Error(`Package filter type '${s}' is not implemented`);
|
|
2084
2084
|
}
|
|
2085
2085
|
const qt = {
|
|
2086
2086
|
name: "PackageGroupEdit",
|
|
@@ -2155,13 +2155,13 @@ const qt = {
|
|
|
2155
2155
|
newArticle: "articles/getNewArticle"
|
|
2156
2156
|
}),
|
|
2157
2157
|
internalPackages() {
|
|
2158
|
-
return this.packages.map((
|
|
2158
|
+
return this.packages.map((s, e) => ({ ...s, index: e }));
|
|
2159
2159
|
},
|
|
2160
2160
|
topRowPackages() {
|
|
2161
|
-
return this.type === "checkbox" ? this.internalPackages.filter(({ toggable:
|
|
2161
|
+
return this.type === "checkbox" ? this.internalPackages.filter(({ toggable: s }) => s === !1) : this.internalPackages;
|
|
2162
2162
|
},
|
|
2163
2163
|
bottomRowPackages() {
|
|
2164
|
-
return this.type === "checkbox" ? this.internalPackages.filter(({ toggable:
|
|
2164
|
+
return this.type === "checkbox" ? this.internalPackages.filter(({ toggable: s }) => s === !0) : [];
|
|
2165
2165
|
},
|
|
2166
2166
|
group() {
|
|
2167
2167
|
return this._document.packageGroups.getPackageGroupUniqId(
|
|
@@ -2196,18 +2196,18 @@ const qt = {
|
|
|
2196
2196
|
...v({
|
|
2197
2197
|
showMessage: p.SHOW_MESSAGE
|
|
2198
2198
|
}),
|
|
2199
|
-
setPricesIncVatAsDefault(
|
|
2199
|
+
setPricesIncVatAsDefault(s = {}) {
|
|
2200
2200
|
this.$emit("input", {
|
|
2201
2201
|
key: "data.formSettings.setPricesIncVat",
|
|
2202
2202
|
value: this.defaultVatInput === "incVat",
|
|
2203
|
-
options:
|
|
2203
|
+
options: s
|
|
2204
2204
|
});
|
|
2205
2205
|
},
|
|
2206
|
-
onSelectType(
|
|
2207
|
-
this.type =
|
|
2206
|
+
onSelectType(s) {
|
|
2207
|
+
this.type = s;
|
|
2208
2208
|
const { type: e, packages: t } = this.persistedGroup || {};
|
|
2209
2209
|
if (e && t && t.length)
|
|
2210
|
-
this.addPersistedGroup(
|
|
2210
|
+
this.addPersistedGroup(s), s !== e && this.showMessage({
|
|
2211
2211
|
type: "info",
|
|
2212
2212
|
message: this.$t("reset.message"),
|
|
2213
2213
|
actions: {
|
|
@@ -2220,20 +2220,20 @@ const qt = {
|
|
|
2220
2220
|
}
|
|
2221
2221
|
});
|
|
2222
2222
|
else {
|
|
2223
|
-
if (
|
|
2223
|
+
if (s === "checkbox")
|
|
2224
2224
|
return;
|
|
2225
2225
|
this.addPackage({});
|
|
2226
2226
|
}
|
|
2227
2227
|
},
|
|
2228
|
-
addPersistedGroup(
|
|
2228
|
+
addPersistedGroup(s) {
|
|
2229
2229
|
if (!this.persistedGroup || !this.persistedGroup.type)
|
|
2230
2230
|
return;
|
|
2231
2231
|
let { packages: e, articles: t } = this.persistedGroup;
|
|
2232
2232
|
if (!e.length)
|
|
2233
2233
|
return;
|
|
2234
|
-
if (
|
|
2234
|
+
if (s !== this.persistedGroup.type && (e = Ht(s, e)), s === "single" && t.length) {
|
|
2235
2235
|
const [{ packageId: n }] = e;
|
|
2236
|
-
t = t.filter((
|
|
2236
|
+
t = t.filter((a) => a.packageId === n);
|
|
2237
2237
|
}
|
|
2238
2238
|
const i = Pe(
|
|
2239
2239
|
[...this._document.allArticles || [], ...t || []],
|
|
@@ -2241,7 +2241,7 @@ const qt = {
|
|
|
2241
2241
|
);
|
|
2242
2242
|
this.$emit("input", { key: "articles", value: i }), this.$emit("input", { key: `${[this._value.packages]}`, value: e });
|
|
2243
2243
|
},
|
|
2244
|
-
addPackage(
|
|
2244
|
+
addPackage(s = {}) {
|
|
2245
2245
|
const e = te(), t = this.type === "checkbox" && this.packages.length ? this.packages[0].data.prices.type : "fixed", i = this.currency || this.defaultCurrency, n = {
|
|
2246
2246
|
isSelected: this.type === "single",
|
|
2247
2247
|
isSelectedDefault: this.type === "single",
|
|
@@ -2255,7 +2255,7 @@ const qt = {
|
|
|
2255
2255
|
currency: i
|
|
2256
2256
|
}
|
|
2257
2257
|
},
|
|
2258
|
-
...
|
|
2258
|
+
...s
|
|
2259
2259
|
};
|
|
2260
2260
|
this.$emit("input", { key: this._value.packages, value: n }), this.$emit("input", {
|
|
2261
2261
|
key: "articles",
|
|
@@ -2265,21 +2265,21 @@ const qt = {
|
|
|
2265
2265
|
currency: i
|
|
2266
2266
|
})
|
|
2267
2267
|
}), this.$nextTick(() => {
|
|
2268
|
-
const
|
|
2269
|
-
|
|
2268
|
+
const a = document.getElementById(`package-name-${e}`);
|
|
2269
|
+
a && a.focus();
|
|
2270
2270
|
});
|
|
2271
2271
|
},
|
|
2272
|
-
onInputPriceType(
|
|
2272
|
+
onInputPriceType(s, e) {
|
|
2273
2273
|
this.type === "checkbox" && this.packages.forEach((t, i) => {
|
|
2274
|
-
i !==
|
|
2274
|
+
i !== s && this.$emit("input", {
|
|
2275
2275
|
key: `${[this._value.packages]}[${[i]}].data.prices.type`,
|
|
2276
2276
|
value: e
|
|
2277
2277
|
});
|
|
2278
2278
|
});
|
|
2279
2279
|
},
|
|
2280
|
-
onInputSelectedDefault(
|
|
2280
|
+
onInputSelectedDefault(s, e) {
|
|
2281
2281
|
this.type === "radio" && !e || (this.type === "radio" && e && this.packages.forEach((t, i) => {
|
|
2282
|
-
i !==
|
|
2282
|
+
i !== s && (this.$emit("input", {
|
|
2283
2283
|
key: `${[this._value.packages]}[${[i]}].isSelectedDefault`,
|
|
2284
2284
|
value: !1
|
|
2285
2285
|
}), this.$emit("input", {
|
|
@@ -2287,22 +2287,22 @@ const qt = {
|
|
|
2287
2287
|
value: !1
|
|
2288
2288
|
}));
|
|
2289
2289
|
}), this.$emit("input", {
|
|
2290
|
-
key: `${[this._value.packages]}[${[
|
|
2290
|
+
key: `${[this._value.packages]}[${[s]}].isSelectedDefault`,
|
|
2291
2291
|
value: e
|
|
2292
2292
|
}), this.$emit("input", {
|
|
2293
|
-
key: `${[this._value.packages]}[${[
|
|
2293
|
+
key: `${[this._value.packages]}[${[s]}].isSelected`,
|
|
2294
2294
|
value: e
|
|
2295
2295
|
}));
|
|
2296
2296
|
},
|
|
2297
|
-
removeByIndex(
|
|
2298
|
-
const { packageId: e } = this.packages[
|
|
2297
|
+
removeByIndex(s) {
|
|
2298
|
+
const { packageId: e } = this.packages[s], t = this._document.allArticles.filter(
|
|
2299
2299
|
({ packageId: i }) => i !== e
|
|
2300
2300
|
);
|
|
2301
|
-
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]}]` });
|
|
2302
2302
|
},
|
|
2303
2303
|
async onResetType() {
|
|
2304
|
-
const
|
|
2305
|
-
([i, n],
|
|
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]],
|
|
2306
2306
|
[[], []]
|
|
2307
2307
|
);
|
|
2308
2308
|
this.$emit("update:persisted-group", {
|
|
@@ -2311,12 +2311,12 @@ const qt = {
|
|
|
2311
2311
|
articles: e
|
|
2312
2312
|
}), this.$emit("input", { key: "articles", value: t }), this.$emit("input", { key: `${[this._value.packages]}`, value: [] }), this.type = "";
|
|
2313
2313
|
},
|
|
2314
|
-
moveOptions(
|
|
2314
|
+
moveOptions(s, e) {
|
|
2315
2315
|
const t = { up: !1, down: !1 };
|
|
2316
|
-
return
|
|
2316
|
+
return s > 0 && (t.up = !0), s < e - 1 && (t.down = !0), t;
|
|
2317
2317
|
},
|
|
2318
|
-
moveItem(
|
|
2319
|
-
const t = T(this.packages,
|
|
2318
|
+
moveItem(s, e) {
|
|
2319
|
+
const t = T(this.packages, s, e);
|
|
2320
2320
|
this.$emit("input", { key: this._value.packages, value: t });
|
|
2321
2321
|
}
|
|
2322
2322
|
}
|
|
@@ -2341,21 +2341,21 @@ var Ut = function() {
|
|
|
2341
2341
|
maxTotal: `${e._value.packages}[${i.index}].data.prices.maxTotal`,
|
|
2342
2342
|
basePath: `${e._value.packages}[${i.index}]`,
|
|
2343
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(
|
|
2345
|
-
return e.$emit("input",
|
|
2346
|
-
}, add: function(
|
|
2347
|
-
return e.$emit("add",
|
|
2348
|
-
}, "update:isSelectedDefault": (
|
|
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) {
|
|
2345
|
+
return e.$emit("input", a);
|
|
2346
|
+
}, add: function(a) {
|
|
2347
|
+
return e.$emit("add", a);
|
|
2348
|
+
}, "update:isSelectedDefault": (a) => e.onInputSelectedDefault(i.index, a), "update:priceType": (a) => e.onInputPriceType(i.index, a), "update:setPricesIncVat": (a) => {
|
|
2349
2349
|
e.$emit("input", {
|
|
2350
2350
|
key: "data.formSettings.setPricesIncVat",
|
|
2351
|
-
value:
|
|
2351
|
+
value: a
|
|
2352
2352
|
}), e.setPricesDirty = !0;
|
|
2353
|
-
}, "update:currency": (
|
|
2354
|
-
return e.$emit("remove",
|
|
2355
|
-
}, "remove-package": function(
|
|
2353
|
+
}, "update:currency": (a) => e.$emit("input", { key: "currency", value: a }), remove: function(a) {
|
|
2354
|
+
return e.$emit("remove", a);
|
|
2355
|
+
}, "remove-package": function(a) {
|
|
2356
2356
|
return e.removeByIndex(i.index);
|
|
2357
|
-
}, move: function(
|
|
2358
|
-
return e.moveItem(i.index, e.topRowPackages[n +
|
|
2357
|
+
}, move: function(a) {
|
|
2358
|
+
return e.moveItem(i.index, e.topRowPackages[n + a].index);
|
|
2359
2359
|
} } })], 1);
|
|
2360
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
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: {
|
|
@@ -2367,21 +2367,21 @@ var Ut = function() {
|
|
|
2367
2367
|
maxTotal: `${e._value.packages}[${i.index}].data.prices.maxTotal`,
|
|
2368
2368
|
basePath: `${e._value.packages}[${i.index}]`,
|
|
2369
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(
|
|
2371
|
-
return e.$emit("input",
|
|
2372
|
-
}, add: function(
|
|
2373
|
-
return e.$emit("add",
|
|
2374
|
-
}, "update:isSelectedDefault": (
|
|
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) {
|
|
2371
|
+
return e.$emit("input", a);
|
|
2372
|
+
}, add: function(a) {
|
|
2373
|
+
return e.$emit("add", a);
|
|
2374
|
+
}, "update:isSelectedDefault": (a) => e.onInputSelectedDefault(i.index, a), "update:priceType": (a) => e.onInputPriceType(i.index, a), "update:setPricesIncVat": (a) => {
|
|
2375
2375
|
e.$emit("input", {
|
|
2376
2376
|
key: "data.formSettings.setPricesIncVat",
|
|
2377
|
-
value:
|
|
2377
|
+
value: a
|
|
2378
2378
|
}), e.setPricesDirty = !0;
|
|
2379
|
-
}, remove: function(
|
|
2380
|
-
return e.$emit("remove",
|
|
2381
|
-
}, "remove-package": function(
|
|
2379
|
+
}, remove: function(a) {
|
|
2380
|
+
return e.$emit("remove", a);
|
|
2381
|
+
}, "remove-package": function(a) {
|
|
2382
2382
|
return e.removeByIndex(i.index);
|
|
2383
|
-
}, move: function(
|
|
2384
|
-
return e.moveItem(i.index, e.bottomRowPackages[n +
|
|
2383
|
+
}, move: function(a) {
|
|
2384
|
+
return e.moveItem(i.index, e.bottomRowPackages[n + a].index);
|
|
2385
2385
|
} } })], 1);
|
|
2386
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) {
|
|
2387
2387
|
return e.addPackage();
|
|
@@ -2394,7 +2394,7 @@ var Ut = function() {
|
|
|
2394
2394
|
Gt,
|
|
2395
2395
|
!1,
|
|
2396
2396
|
null,
|
|
2397
|
-
"
|
|
2397
|
+
"c6ce4c7e"
|
|
2398
2398
|
);
|
|
2399
2399
|
const oi = Kt.exports;
|
|
2400
2400
|
export {
|