@cling-se/widget 0.9.23 → 0.9.24
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-49655a64.js → AddClientCallout-4afb07ff.js} +5 -5
- package/dist/{AnswerModal-6f4004e1.js → AnswerModal-2b11381b.js} +84 -27
- package/dist/{AttachmentItem-e3bfcd82.js → AttachmentItem-c666fb74.js} +7 -5
- package/dist/{BaseDatePicker-d04f761f.js → BaseDatePicker-e1efcf48.js} +1 -1
- package/dist/{BaseInput-e14e8b12.js → BaseInput-44c3af54.js} +6 -2
- package/dist/{BaseUpload-0fa8ad72.js → BaseUpload-740b1f88.js} +28 -11
- package/dist/{BlockMedia-b49a63f3.js → BlockMedia-f5086397.js} +5 -3
- package/dist/{CCallout-baeb732f.js → CCallout-1a1feea0.js} +6 -9
- package/dist/{CDropdownItem-e0cecd02.js → CDropdownItem-cc274799.js} +3 -3
- package/dist/{CField-c10f5951.js → CField-372bd9c7.js} +18 -4
- package/dist/{CPhoneFormat-636103a1.js → CPhoneFormat-b273a499.js} +1 -1
- package/dist/{CSlider.vue_vue_type_style_index_0_lang-d964f857.js → CSlider.vue_vue_type_style_index_0_lang-ef031b7b.js} +4 -2
- package/dist/{ClientAutocomplete-28bf2076.js → ClientAutocomplete-0f51c1cd.js} +3 -3
- package/dist/{ClientModal-b94206f4.js → ClientModal-1bec5a45.js} +34 -19
- package/dist/{ColorPicker-b5a7f700.js → ColorPicker-43c741fb.js} +2 -2
- package/dist/{CompanyModal-c47e7c55.js → CompanyModal-adec1d7e.js} +8 -5
- package/dist/{ContentWrapper-8293109f.js → ContentWrapper-48e69342.js} +40 -27
- package/dist/{CoverBlockSettings-2242d653.js → CoverBlockSettings-c0a57bee.js} +49 -34
- package/dist/{DocAnswer-75f53dd5.js → DocAnswer-f0f7d55d.js} +4 -4
- package/dist/{DocDetails-1bdecff4.js → DocDetails-0e25552f.js} +71 -46
- package/dist/{DocForm-263bac20.js → DocForm-2ab0c521.js} +515 -291
- package/dist/{DocFormSend-5b098ca6.js → DocFormSend-e60808ca.js} +18 -18
- package/dist/{DocLinks-500b61b0.js → DocLinks-20719644.js} +2 -2
- package/dist/{DocModalBase-b64e792b.js → DocModalBase-039f53c2.js} +4 -4
- package/dist/{DocPrint-555475c6.js → DocPrint-aafc72e2.js} +2 -2
- package/dist/{DocReceipt-5a393f79.js → DocReceipt-641b141c.js} +33 -10
- package/dist/{DocSendReminder-8d875174.js → DocSendReminder-aabc0994.js} +30 -5
- package/dist/{DocTextEditor-7fd7ca5f.js → DocTextEditor-3eb97671.js} +86 -37
- package/dist/{DocTimeline-0273acd1.js → DocTimeline-9d765ded.js} +11 -2
- package/dist/{DocumentClient-342454c2.js → DocumentClient-8d59d823.js} +7 -7
- package/dist/{DocumentLayout-00ec1c6f.js → DocumentLayout-a659ce2a.js} +31 -11
- package/dist/{DocumentLogotype-137fd8f5.js → DocumentLogotype-393d1610.js} +8 -8
- package/dist/{DocumentVoided-584cbee7.js → DocumentVoided-9294f5d4.js} +1 -1
- package/dist/{EmbedInput-19362c0b.js → EmbedInput-e6a9ee21.js} +2 -2
- package/dist/{EmbedSettings-cbffd133.js → EmbedSettings-e31ccfdc.js} +7 -7
- package/dist/ErrorCallout-d6c77efa.js +30 -0
- package/dist/{FilePreviewModal-80a5f1fc.js → FilePreviewModal-84d6ab65.js} +6 -6
- package/dist/{HeaderSettings-e5e52b5a.js → HeaderSettings-51d44d2d.js} +65 -63
- package/dist/{ImageSelectModal-f54699a2.js → ImageSelectModal-051e0929.js} +27 -27
- package/dist/{ImageUploadWrapper-d4291dd3.js → ImageUploadWrapper-dcceec48.js} +11 -5
- package/dist/{Index-dbeaf863.js → Index-06045b22.js} +9 -10
- package/dist/{Index-d60eb16f.js → Index-0932b744.js} +32 -20
- package/dist/{Index-468190f0.js → Index-20c0168b.js} +15 -15
- package/dist/{Index-e813c8cd.js → Index-3571dbbe.js} +2 -2
- package/dist/{Index-8ef32146.js → Index-36ba2c7c.js} +20 -16
- package/dist/{Index-c89d17d9.js → Index-39d0e781.js} +17 -17
- package/dist/{Index-7fe05fe5.js → Index-3bdfc806.js} +3 -3
- package/dist/{Index-a3ee21e6.js → Index-3cb4cf49.js} +4 -4
- package/dist/Index-42639492.js +28 -0
- package/dist/{Index-4df3c1d2.js → Index-494c3112.js} +300 -147
- package/dist/{Index-d6635896.js → Index-51ceb867.js} +20 -16
- package/dist/{Index-630c21f5.js → Index-54695ef1.js} +13 -11
- package/dist/{Index-9afa091c.js → Index-5b2c568a.js} +13 -11
- package/dist/{Index-843f81bd.js → Index-5def7508.js} +17 -12
- package/dist/{Index-5093d646.js → Index-5ead0dc5.js} +2 -2
- package/dist/{Index-a79cd9b6.js → Index-652a82d0.js} +6 -6
- package/dist/{Index-0f2bf3b1.js → Index-75922cfc.js} +13 -13
- package/dist/{Index-bf0e9351.js → Index-9a162ce6.js} +2 -2
- package/dist/{Index-7c60cb32.js → Index-a94f257f.js} +56 -31
- package/dist/{Index-7dec77f5.js → Index-a98c290d.js} +21 -18
- package/dist/{Index-0eb9d45b.js → Index-b33109a3.js} +13 -9
- package/dist/{Index-12a6485f.js → Index-c1aa1453.js} +3 -3
- package/dist/{Index-a36c3418.js → Index-c2008029.js} +2 -2
- package/dist/{Index-bb62e92d.js → Index-c4942c4e.js} +22 -27
- package/dist/{Index-aad34e7e.js → Index-c5983b2b.js} +13 -15
- package/dist/{Index-f640eb29.js → Index-c8ded03a.js} +2 -2
- package/dist/{Index-16155aba.js → Index-cc56dad6.js} +7 -7
- package/dist/{Index-29147f73.js → Index-d77ba606.js} +51 -43
- package/dist/{Index-4c78a308.js → Index-d7a7de69.js} +24 -17
- package/dist/{Index-0b1a9238.js → Index-e8a3b12b.js} +4 -4
- package/dist/{Index-bf2ed6a3.js → Index-e9da5a9c.js} +3 -3
- package/dist/{Index-b66d1e1a.js → Index-f36accd7.js} +4 -4
- package/dist/{Index-96725e56.js → Index-fd6da129.js} +7 -7
- package/dist/{Index-64236029.js → Index-fdb53118.js} +6 -9
- package/dist/{InputToggleRow-40b7b57e.js → InputToggleRow-79bbd6c6.js} +4 -4
- package/dist/{IsPremiumPreStep-d2ceb183.js → IsPremiumPreStep-f0524e76.js} +81 -36
- package/dist/{ManualPopover-58c3f059.js → ManualPopover-8a1e53a5.js} +5 -2
- package/dist/{MediaWrapper-0e3ff436.js → MediaWrapper-b128c707.js} +3 -3
- package/dist/{NotBindingText-38e6e74c.js → NotBindingText-561df6d3.js} +2 -2
- package/dist/{PackageGroup-6e6dd719.js → PackageGroup-3eaff6a7.js} +184 -69
- package/dist/{PdfTerms-3be0f8d1.js → PdfTerms-27d7ea41.js} +8 -8
- package/dist/{PdfViewer-991eb731.js → PdfViewer-5b2bcbb5.js} +2 -2
- package/dist/{PlainHtml-4aaf6438.js → PlainHtml-c743e90e.js} +1 -1
- package/dist/{PriceHeader-f3e7b525.js → PriceHeader-287b8219.js} +48 -32
- package/dist/{SearchApi-2523a5fb.js → SearchApi-1cd32dd3.js} +40 -20
- package/dist/{Setup-2849b519.js → Setup-647c8d19.js} +1 -1
- package/dist/{TermsSettings-6d3dfe8d.js → TermsSettings-28e00bdf.js} +11 -11
- package/dist/{ThemeColorRow-a33d04b5.js → ThemeColorRow-87aad7e1.js} +4 -4
- package/dist/{ToggleBinding-7c726915.js → ToggleBinding-86912659.js} +3 -3
- package/dist/{UploadModal-814fc3af.js → UploadModal-4065d410.js} +16 -14
- package/dist/{VideoPlayerInput-fa0774c1.js → VideoPlayerInput-1b402e91.js} +3 -3
- package/dist/{VideoPlayerSettings-ff82938f.js → VideoPlayerSettings-4dcca863.js} +5 -5
- package/dist/{VideoSelectModal-7b213a09.js → VideoSelectModal-4f9def15.js} +32 -36
- package/dist/{answerDocumentMixin-b2488be9.js → answerDocumentMixin-6b6cfdb6.js} +3 -3
- package/dist/{debounce-0451fa9d.js → debounce-97bb38ac.js} +1 -1
- package/dist/{focusDrawerMixin-0d406532.js → focusDrawerMixin-0d00dfeb.js} +1 -1
- package/dist/{formComponentsInstall-9c59efba.js → formComponentsInstall-0e28cca8.js} +210 -168
- package/dist/{formDrawerState-6c57d51e.js → formDrawerState-68670778.js} +1 -1
- package/dist/{formValidationMixin-7603171e.js → formValidationMixin-cb6f10e2.js} +1 -1
- package/dist/{image-58c45661.js → image-456aa00c.js} +1 -1
- package/dist/{index-b20167b3.js → index-1f6e36c5.js} +4 -4
- package/dist/{index-cf014fd4.js → index-2710ab1c.js} +2 -2
- package/dist/{index-c0b45aa7.js → index-63ab2d14.js} +12 -12
- package/dist/{index-4afc771b.js → index-b8207e2a.js} +1 -1
- package/dist/{index-47e427b4.js → index-e4f936ec.js} +8 -6
- package/dist/{index-0c493549.js → index-ea1c7f84.js} +17 -9
- package/dist/index.es.js +3 -3
- package/dist/index.umd.js +95 -66
- package/dist/{main-8d566a02.js → main-b5eb6366.js} +134 -76
- package/dist/{mapFormMixin-4446a1bd.js → mapFormMixin-e0c45bbd.js} +1 -1
- package/dist/{publicSenderState-02c0c9eb.js → publicSenderState-4163b1b6.js} +1 -1
- package/dist/{simplebar.min-d30d6e1f.js → simplebar.min-147772cd.js} +1 -1
- package/dist/style.css +2 -2
- package/dist/{template-e04cc32f.js → template-6e93622c.js} +7 -7
- package/dist/{throttle-b0a5ba09.js → throttle-7a7a1299.js} +2 -2
- package/dist/{tinycolor-c6f29f33.js → tinycolor-bb8652ea.js} +1 -1
- package/dist/{tippy.esm-2cb937d0.js → tippy.esm-f533f77b.js} +8 -8
- package/dist/{utils-36338df7.js → utils-066c47a5.js} +1 -1
- package/dist/{vuedraggable.umd-a0d21ce9.js → vuedraggable.umd-76911d11.js} +1 -1
- package/package.json +2 -2
- package/dist/ErrorCallout-4ce34a95.js +0 -30
- package/dist/Index-66295ea9.js +0 -28
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { aO as B, aP as A, aQ as E, aR as z, aS as W, aT as F, j, aU as N, b as o, n as c, q as H, aV as x, au as q, aW as w, aX as U, ai as f, X as G, g as p, u as k, aY as K, aj as Y, aZ as Z, a_ as X, a$ as C, p as J, L as g, x as Q, z as ee, b0 as te, o as ie, O as se } from "./main-
|
|
1
|
+
import { aO as B, aP as A, aQ as E, aR as z, aS as W, aT as F, j, aU as N, b as o, n as c, q as H, aV as x, au as q, aW as w, aX as U, ai as f, X as G, g as p, u as k, aY as K, aj as Y, aZ as Z, a_ as X, a$ as C, p as J, L as g, x as Q, z as ee, b0 as te, o as ie, O as se } from "./main-b5eb6366.js";
|
|
2
2
|
import { m as h, a as v } from "./vuex.esm-4a0fff7c.js";
|
|
3
|
-
import { m as y } from "./mapFormMixin-
|
|
4
|
-
import { E as P } from "./ErrorCallout-
|
|
5
|
-
import { T as ae } from "./DocTextEditor-
|
|
6
|
-
import { o as S, d as ne } from "./vuedraggable.umd-
|
|
7
|
-
import { W as re } from "./DocumentLayout-
|
|
8
|
-
import { C as oe } from "./tippy.esm-
|
|
3
|
+
import { m as y } from "./mapFormMixin-e0c45bbd.js";
|
|
4
|
+
import { E as P } from "./ErrorCallout-d6c77efa.js";
|
|
5
|
+
import { T as ae } from "./DocTextEditor-3eb97671.js";
|
|
6
|
+
import { o as S, d as ne } from "./vuedraggable.umd-76911d11.js";
|
|
7
|
+
import { W as re } from "./DocumentLayout-a659ce2a.js";
|
|
8
|
+
import { C as oe } from "./tippy.esm-f533f77b.js";
|
|
9
9
|
import { v as le } from "./index-805c56e4.js";
|
|
10
|
-
import { S as ce } from "./SearchApi-
|
|
11
|
-
import { w as ue } from "./CDropdownItem-
|
|
12
|
-
import { B as V } from "./BaseInput-
|
|
10
|
+
import { S as ce } from "./SearchApi-1cd32dd3.js";
|
|
11
|
+
import { w as ue } from "./CDropdownItem-cc274799.js";
|
|
12
|
+
import { B as V } from "./BaseInput-44c3af54.js";
|
|
13
13
|
import "./dom-962579a6.js";
|
|
14
|
-
import "./CSlider.vue_vue_type_style_index_0_lang-
|
|
14
|
+
import "./CSlider.vue_vue_type_style_index_0_lang-ef031b7b.js";
|
|
15
15
|
import "./CField.vue_vue_type_style_index_0_lang-4ed993c7.js";
|
|
16
|
-
import "./ManualPopover-
|
|
17
|
-
import "./ColorPicker-
|
|
16
|
+
import "./ManualPopover-8a1e53a5.js";
|
|
17
|
+
import "./ColorPicker-43c741fb.js";
|
|
18
18
|
import "./color-71c20583.js";
|
|
19
|
-
import "./debounce-
|
|
19
|
+
import "./debounce-97bb38ac.js";
|
|
20
20
|
const de = [
|
|
21
21
|
"unit",
|
|
22
22
|
"m2",
|
|
@@ -381,7 +381,9 @@ const je = {
|
|
|
381
381
|
document.addEventListener("click", this.onClickOutside, { passive: !0 });
|
|
382
382
|
},
|
|
383
383
|
beforeDestroy() {
|
|
384
|
-
document.removeEventListener("click", this.onClickOutside, {
|
|
384
|
+
document.removeEventListener("click", this.onClickOutside, {
|
|
385
|
+
passive: !0
|
|
386
|
+
});
|
|
385
387
|
},
|
|
386
388
|
methods: {
|
|
387
389
|
...v({
|
|
@@ -392,7 +394,10 @@ const je = {
|
|
|
392
394
|
this.$emit("input", e), !this.viewSettings.isPublicForm && i({
|
|
393
395
|
q: e,
|
|
394
396
|
cb: ({ article: t = [], extensionArticle: s = [] }) => {
|
|
395
|
-
this.searchResults = [
|
|
397
|
+
this.searchResults = [
|
|
398
|
+
...t.sort((n, a) => n.usedTimes > a.usedTimes ? -1 : 1),
|
|
399
|
+
...s
|
|
400
|
+
], !this.isOpen && this.searchResults.length && this.showResults();
|
|
396
401
|
}
|
|
397
402
|
});
|
|
398
403
|
},
|
|
@@ -435,7 +440,9 @@ const je = {
|
|
|
435
440
|
}
|
|
436
441
|
},
|
|
437
442
|
scrollToHighlighted() {
|
|
438
|
-
!this.$refs.dropdown || !this.$refs.dropdown.children || !this.$refs.dropdown.children[this.selectedIndex] || this.$refs.dropdown.children[this.selectedIndex].scrollIntoView({
|
|
443
|
+
!this.$refs.dropdown || !this.$refs.dropdown.children || !this.$refs.dropdown.children[this.selectedIndex] || this.$refs.dropdown.children[this.selectedIndex].scrollIntoView({
|
|
444
|
+
block: "nearest"
|
|
445
|
+
});
|
|
439
446
|
}
|
|
440
447
|
}
|
|
441
448
|
};
|
|
@@ -443,7 +450,12 @@ var Ne = function() {
|
|
|
443
450
|
var e = this, t = e._self._c;
|
|
444
451
|
return t("div", { class: { "is-open": e.isOpen }, staticStyle: { position: "relative" }, on: { "&keydown": function(s) {
|
|
445
452
|
return e.onKeydown.apply(null, arguments);
|
|
446
|
-
} } }, [t("SearchApi", { attrs: { "custom-search": {
|
|
453
|
+
} } }, [t("SearchApi", { attrs: { "custom-search": {
|
|
454
|
+
article: !0,
|
|
455
|
+
extensionArticle: !0,
|
|
456
|
+
project: !1,
|
|
457
|
+
user: !1
|
|
458
|
+
} }, scopedSlots: e._u([{ key: "default", fn: function({ fetch: s }) {
|
|
447
459
|
return [t("CInput", e._b({ ref: "input", staticClass: "r-input", attrs: { value: e.value, type: e.tag, "auto-resize": !0 }, on: { input: function(n) {
|
|
448
460
|
return e.search(s, n);
|
|
449
461
|
}, focus: e.onFocus, blur: e.onBlur }, nativeOn: { keydown: [function(n) {
|
|
@@ -457,7 +469,7 @@ var Ne = function() {
|
|
|
457
469
|
} }], null, !0) }), e.isOpen ? t("div", { ref: "dropdown", staticClass: "r-container" }, e._l(e.searchResults, function(s, n) {
|
|
458
470
|
return t("div", { key: n, staticClass: "r-item", class: { active: e.selectedIndex === n }, on: { "!click": function(a) {
|
|
459
471
|
return a.stopPropagation(), e.onSelect(s);
|
|
460
|
-
} } }, [t("div", { staticClass: "r-item-title truncate-text" }, [e._v(e._s(s.name))]), t("div", { staticClass: "r-item-details" }, [s.externalReference && s.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("BaseIcon", { staticStyle: { color: "white" }, attrs: { type: s.externalReference.service, size: "14" } })], 1) : e._e(), s.article_no ? t("div", [e._v(e._s(s.article_no))]) : e._e(), s.price ? t("div", [e._v(e._s(e.priceFormat(s.price, { currency: s.currency })))]) : e._e(), s.vat ? t("div", [e._v(e._s(e.$t("vat.sharedTitle").capitalize()) + " " + e._s(s.vat) + "%")]) : e._e()]), e.selectedIndex === n ? t("div", { staticClass: "r-item-icon" }, [t("BaseIcon", { attrs: { type: "corner-down-left", size: "16" } })], 1) : e._e()]);
|
|
472
|
+
} } }, [t("div", { staticClass: "r-item-title truncate-text" }, [e._v(e._s(s.name))]), t("div", { staticClass: "r-item-details" }, [s.externalReference && s.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("BaseIcon", { staticStyle: { color: "white" }, attrs: { type: s.externalReference.service, size: "14" } })], 1) : e._e(), s.article_no ? t("div", [e._v(e._s(s.article_no))]) : e._e(), s.price ? t("div", [e._v(" " + e._s(e.priceFormat(s.price, { currency: s.currency })) + " ")]) : e._e(), s.vat ? t("div", [e._v(" " + e._s(e.$t("vat.sharedTitle").capitalize()) + " " + e._s(s.vat) + "% ")]) : e._e()]), e.selectedIndex === n ? t("div", { staticClass: "r-item-icon" }, [t("BaseIcon", { attrs: { type: "corner-down-left", size: "16" } })], 1) : e._e()]);
|
|
461
473
|
}), 0) : e._e()], 1);
|
|
462
474
|
}, He = [], qe = /* @__PURE__ */ c(
|
|
463
475
|
je,
|
|
@@ -465,7 +477,7 @@ var Ne = function() {
|
|
|
465
477
|
He,
|
|
466
478
|
!1,
|
|
467
479
|
null,
|
|
468
|
-
"
|
|
480
|
+
"086d55a5",
|
|
469
481
|
null,
|
|
470
482
|
null
|
|
471
483
|
);
|
|
@@ -553,11 +565,16 @@ const Ue = {
|
|
|
553
565
|
} = this.article;
|
|
554
566
|
if (e !== "fixed" && i.push({ title: this.$t(`priceTypeShort.${e}`) }), K(this.article)) {
|
|
555
567
|
const u = Y(this.article);
|
|
556
|
-
i.push({
|
|
568
|
+
i.push({
|
|
569
|
+
title: this.$t(`_common:deduction.${u}_percentage`)
|
|
570
|
+
});
|
|
557
571
|
}
|
|
558
572
|
return t && ["fixed", "approx"].includes(e) && (s !== "unit" || t > 1) && i.push({
|
|
559
573
|
// eslint-disable-next-line prefer-template
|
|
560
|
-
title: f(this.article.unitType, {
|
|
574
|
+
title: f(this.article.unitType, {
|
|
575
|
+
count: t,
|
|
576
|
+
includeCount: !0
|
|
577
|
+
}),
|
|
561
578
|
...!this.hidePriceInput && {
|
|
562
579
|
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>',
|
|
563
580
|
subTitle: k(n, {
|
|
@@ -570,7 +587,10 @@ const Ue = {
|
|
|
570
587
|
}
|
|
571
588
|
}), r && i.push({
|
|
572
589
|
// eslint-disable-next-line prefer-template
|
|
573
|
-
title: "-" + (l === "fixed" ? k(r, {
|
|
590
|
+
title: "-" + (l === "fixed" ? k(r, {
|
|
591
|
+
withVat: this.isIncVat ? a : !1,
|
|
592
|
+
currency: this.article.currency
|
|
593
|
+
}) : `${r / 100} %`),
|
|
574
594
|
detailClass: "discount"
|
|
575
595
|
}), i;
|
|
576
596
|
}
|
|
@@ -603,13 +623,21 @@ var Ge = function() {
|
|
|
603
623
|
}, focus: function(s) {
|
|
604
624
|
return e.$emit("focus");
|
|
605
625
|
}, select: function(s) {
|
|
606
|
-
e.$emit(
|
|
626
|
+
e.$emit(
|
|
627
|
+
"input",
|
|
628
|
+
e.addSavedArticle({
|
|
629
|
+
stored: s,
|
|
630
|
+
current: e.article,
|
|
631
|
+
hidePrice: e.hidePriceOnNew,
|
|
632
|
+
activeHouseWorkType: e.activeHouseWorkType
|
|
633
|
+
})
|
|
634
|
+
), e.$emit("select");
|
|
607
635
|
} } }, [e.hideControls ? e._e() : t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: {
|
|
608
636
|
content: e.$t("openModalTooltip"),
|
|
609
637
|
delay: { show: 300, hide: 0 }
|
|
610
638
|
}, expression: `{
|
|
611
639
|
content: $t('openModalTooltip'),
|
|
612
|
-
delay: { show: 300, hide: 0 }
|
|
640
|
+
delay: { show: 300, hide: 0 }
|
|
613
641
|
}` }], staticClass: "article-button fade-in", attrs: { slot: "suffix" }, on: { click: function(s) {
|
|
614
642
|
return e.$emit("open-modal");
|
|
615
643
|
} }, slot: "suffix" }, [t("BaseIcon", { 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(s) {
|
|
@@ -633,7 +661,7 @@ var Ge = function() {
|
|
|
633
661
|
Ke,
|
|
634
662
|
!1,
|
|
635
663
|
null,
|
|
636
|
-
"
|
|
664
|
+
"66da1f1f",
|
|
637
665
|
null,
|
|
638
666
|
null
|
|
639
667
|
);
|
|
@@ -722,7 +750,7 @@ var Je = function() {
|
|
|
722
750
|
Qe,
|
|
723
751
|
!1,
|
|
724
752
|
null,
|
|
725
|
-
"
|
|
753
|
+
"7d125e97",
|
|
726
754
|
null,
|
|
727
755
|
null
|
|
728
756
|
);
|
|
@@ -827,7 +855,11 @@ const it = {
|
|
|
827
855
|
this.$emit("close");
|
|
828
856
|
},
|
|
829
857
|
async onDrop({ removedIndex: i, addedIndex: e }) {
|
|
830
|
-
i === null && e === null || i !== e && (this.idList = C(this.idList, i, e), await J(
|
|
858
|
+
i === null && e === null || i !== e && (this.idList = C(this.idList, i, e), await J(
|
|
859
|
+
"/unitType/setPositions",
|
|
860
|
+
{ ids: this.idList },
|
|
861
|
+
{ invalidateCache: { type: "unitType" } }
|
|
862
|
+
), this.reset(), await this.loadUnits());
|
|
831
863
|
}
|
|
832
864
|
}
|
|
833
865
|
};
|
|
@@ -856,7 +888,7 @@ var st = function() {
|
|
|
856
888
|
at,
|
|
857
889
|
!1,
|
|
858
890
|
null,
|
|
859
|
-
"
|
|
891
|
+
"cd39480b",
|
|
860
892
|
null,
|
|
861
893
|
null
|
|
862
894
|
);
|
|
@@ -926,7 +958,7 @@ var lt = function() {
|
|
|
926
958
|
ct,
|
|
927
959
|
!1,
|
|
928
960
|
null,
|
|
929
|
-
"
|
|
961
|
+
"e7364b17",
|
|
930
962
|
null,
|
|
931
963
|
null
|
|
932
964
|
);
|
|
@@ -1038,23 +1070,29 @@ const pt = {
|
|
|
1038
1070
|
},
|
|
1039
1071
|
checkboxItems() {
|
|
1040
1072
|
const { article: i } = this || {}, { priceType: e } = this.article || {}, t = [
|
|
1041
|
-
...e !== "markup" ? [
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1073
|
+
...e !== "markup" ? [
|
|
1074
|
+
{
|
|
1075
|
+
label: this.$t("discount").capitalize(),
|
|
1076
|
+
value: i.discount || this.showDiscountInput,
|
|
1077
|
+
onClick: () => {
|
|
1078
|
+
this.showDiscountInput || this.focusEl("discountInput"), this.showDiscountInput = !this.showDiscountInput;
|
|
1079
|
+
}
|
|
1046
1080
|
}
|
|
1047
|
-
|
|
1048
|
-
...this.getCompanySetting("showRot") || i.isDeductable ? [
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1081
|
+
] : [],
|
|
1082
|
+
...this.getCompanySetting("showRot") || i.isDeductable ? [
|
|
1083
|
+
{
|
|
1084
|
+
label: this.$t("_common:deduction.rot"),
|
|
1085
|
+
value: this.article.isDeductable,
|
|
1086
|
+
onClick: () => this.updateArticle(!i.isDeductable, "isDeductable")
|
|
1087
|
+
}
|
|
1088
|
+
] : [],
|
|
1089
|
+
...this.getCompanySetting("showRut") || i.isRut ? [
|
|
1090
|
+
{
|
|
1091
|
+
label: this.$t("_common:deduction.rut"),
|
|
1092
|
+
value: i.isRut,
|
|
1093
|
+
onClick: () => this.updateArticle(!i.isRut, "isRut")
|
|
1094
|
+
}
|
|
1095
|
+
] : [],
|
|
1058
1096
|
...i.greenRot15 ? [
|
|
1059
1097
|
{
|
|
1060
1098
|
label: this.$t("_common:deduction.greenRot15_percentage"),
|
|
@@ -1088,12 +1126,14 @@ const pt = {
|
|
|
1088
1126
|
priceTypeOptions() {
|
|
1089
1127
|
if (!this.enablePriceTypes || this.rootPriceType === "fixed")
|
|
1090
1128
|
return [];
|
|
1091
|
-
const { priceType: i } = this.article, e = (s) => this.$t(`priceTypeTooltips.${s}`), t = [
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1129
|
+
const { priceType: i } = this.article, e = (s) => this.$t(`priceTypeTooltips.${s}`), t = [
|
|
1130
|
+
{
|
|
1131
|
+
label: this.$t("price.fixed"),
|
|
1132
|
+
tooltip: e("fixed"),
|
|
1133
|
+
value: i === "fixed",
|
|
1134
|
+
onClick: () => this.updateArticle("fixed", "priceType")
|
|
1135
|
+
}
|
|
1136
|
+
];
|
|
1097
1137
|
return this.rootPriceType === "approx" && t.push({
|
|
1098
1138
|
label: this.$t("price.approx"),
|
|
1099
1139
|
tooltip: e("approx"),
|
|
@@ -1177,9 +1217,11 @@ const pt = {
|
|
|
1177
1217
|
this.$v.$invalid || await this.saveArticle(), this.$emit("add", { openModal: !0 }), this.close();
|
|
1178
1218
|
},
|
|
1179
1219
|
focusEl(i) {
|
|
1180
|
-
this.$nextTick(
|
|
1181
|
-
|
|
1182
|
-
|
|
1220
|
+
this.$nextTick(
|
|
1221
|
+
() => this.$nextTick(() => {
|
|
1222
|
+
this.$refs[i] && this.$refs[i].focus && this.$refs[i].focus();
|
|
1223
|
+
})
|
|
1224
|
+
);
|
|
1183
1225
|
},
|
|
1184
1226
|
onTotalPriceInputFocus() {
|
|
1185
1227
|
this.article.quantity > 1 && this.$nextTick(() => {
|
|
@@ -1201,7 +1243,10 @@ const pt = {
|
|
|
1201
1243
|
if (this.viewSettings.isPublicForm)
|
|
1202
1244
|
return;
|
|
1203
1245
|
let { ArticleId: i } = this.article;
|
|
1204
|
-
!i && ((t) => typeof t == "string" && !!t.trim())(this.article.name) && (i = await this.createArticle({
|
|
1246
|
+
!i && ((t) => typeof t == "string" && !!t.trim())(this.article.name) && (i = await this.createArticle({
|
|
1247
|
+
body: this.article,
|
|
1248
|
+
showMessage: !1
|
|
1249
|
+
}), this.article = { ...this.article, ArticleId: i });
|
|
1205
1250
|
}
|
|
1206
1251
|
}
|
|
1207
1252
|
};
|
|
@@ -1217,7 +1262,15 @@ var ht = function() {
|
|
|
1217
1262
|
} } }) : t("div", { staticClass: "modal-close", on: { click: e.close } }, [t("BaseIcon", { 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(s) {
|
|
1218
1263
|
return e.updateArticle(s, "name");
|
|
1219
1264
|
}, select: function(s) {
|
|
1220
|
-
e.$emit(
|
|
1265
|
+
e.$emit(
|
|
1266
|
+
"input",
|
|
1267
|
+
e.addSavedArticle({
|
|
1268
|
+
stored: s,
|
|
1269
|
+
current: e.article,
|
|
1270
|
+
hidePrice: e.hidePriceOnNew,
|
|
1271
|
+
activeHouseWorkType: e.activeHouseWorkType
|
|
1272
|
+
})
|
|
1273
|
+
);
|
|
1221
1274
|
} } })], 1), t("div", { staticClass: "flex w-full", staticStyle: { "margin-bottom": "1.5em" } }, [t("CField", { staticClass: "flex-grow label-selector form-control form-control-left", 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(s) {
|
|
1222
1275
|
e.updateArticle(Number.parseFloat(s), "quantity");
|
|
1223
1276
|
} } })], 1), t("ArticleUnitSelect", { attrs: { value: e.article.unitType, "is-public-form": e.viewSettings.isPublicForm }, on: { input: function(s) {
|
|
@@ -1233,7 +1286,10 @@ var ht = function() {
|
|
|
1233
1286
|
} } }, [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: "flex-grow label-selector form-control form-control-left", 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(s) {
|
|
1234
1287
|
e.updateArticle(Math.abs(s), "discount");
|
|
1235
1288
|
} } }, [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(s) {
|
|
1236
|
-
return e.updateArticle(
|
|
1289
|
+
return e.updateArticle(
|
|
1290
|
+
e.article.discountType === "percentage" ? "fixed" : "percentage",
|
|
1291
|
+
"discountType"
|
|
1292
|
+
);
|
|
1237
1293
|
} } }, [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(s) {
|
|
1238
1294
|
e.updateArticle(Number.parseFloat(s.target.value), "vat");
|
|
1239
1295
|
} } }, e._l(e.vatOptions, function({ translation: s, value: n }, a) {
|
|
@@ -1279,7 +1335,7 @@ var ht = function() {
|
|
|
1279
1335
|
<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 -12 50 50'><path fill='none' stroke='#ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' stroke d='M45.706.897c.55.002.994.458.993.994l-.036 18.01c0 .55-.44.996-1.008.996H5.12l10.568 8.886-1.467 1.738L0 19.758 14.22 8l1.468 1.738L5.12 18.624h38.987c.162 0 .293-.134.293-.296V3.445c0-.163-.144-.295-.292-.295H32.054c-.278 0-.504-.23-.504-.5v-1.3c0-.277.214-.5.504-.498l13.652.045z'/></svg>
|
|
1280
1336
|
</div>
|
|
1281
1337
|
</div>
|
|
1282
|
-
|
|
1338
|
+
\`
|
|
1283
1339
|
}` }], staticStyle: { padding: "1.75em", height: "4em", "border-radius": "0", "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("BaseIcon", { staticStyle: { margin: "-3px" }, attrs: { type: "zap", size: "21" } })], 1)], 1)], 1)]);
|
|
1284
1340
|
}, mt = [], ft = /* @__PURE__ */ c(
|
|
1285
1341
|
pt,
|
|
@@ -1287,7 +1343,7 @@ var ht = function() {
|
|
|
1287
1343
|
mt,
|
|
1288
1344
|
!1,
|
|
1289
1345
|
null,
|
|
1290
|
-
"
|
|
1346
|
+
"efd067c3",
|
|
1291
1347
|
null,
|
|
1292
1348
|
null
|
|
1293
1349
|
);
|
|
@@ -1386,7 +1442,11 @@ const gt = {
|
|
|
1386
1442
|
setPricesIncVat(i) {
|
|
1387
1443
|
this.updateArticlesVatOption(), this.showMessage({
|
|
1388
1444
|
type: "info",
|
|
1389
|
-
message: this.$t("vatOption.message", {
|
|
1445
|
+
message: this.$t("vatOption.message", {
|
|
1446
|
+
vatOption: this.$t(`_common:vat.${i ? "incVat" : "exVat"}`, {
|
|
1447
|
+
thing: this.$t("_common:vat.sharedTitle")
|
|
1448
|
+
})
|
|
1449
|
+
}),
|
|
1390
1450
|
omit: "$view:extension,$view:widget"
|
|
1391
1451
|
});
|
|
1392
1452
|
}
|
|
@@ -1396,9 +1456,11 @@ const gt = {
|
|
|
1396
1456
|
showMessage: p.SHOW_MESSAGE
|
|
1397
1457
|
}),
|
|
1398
1458
|
openModal(i, { focusEl: e = "" } = {}) {
|
|
1399
|
-
this.selectedIndex = i, this.showModal = !0, e && this.$nextTick(
|
|
1400
|
-
|
|
1401
|
-
|
|
1459
|
+
this.selectedIndex = i, this.showModal = !0, e && this.$nextTick(
|
|
1460
|
+
() => this.$nextTick(() => {
|
|
1461
|
+
this.$refs.articleModal && this.$refs.articleModal.focusEl(e);
|
|
1462
|
+
})
|
|
1463
|
+
);
|
|
1402
1464
|
},
|
|
1403
1465
|
updateArticleObject(i, e) {
|
|
1404
1466
|
const t = e;
|
|
@@ -1417,13 +1479,22 @@ const gt = {
|
|
|
1417
1479
|
this.articles.forEach((i, e) => {
|
|
1418
1480
|
if (i.priceType === "markup")
|
|
1419
1481
|
return;
|
|
1420
|
-
let t = g({ amount: i.price }).divide(
|
|
1421
|
-
|
|
1482
|
+
let t = g({ amount: i.price }).divide(
|
|
1483
|
+
(100 + i.vat) * 0.01
|
|
1484
|
+
);
|
|
1485
|
+
this.setPricesIncVat || (t = g({ amount: i.price }).multiply(
|
|
1486
|
+
(100 + i.vat) * 0.01
|
|
1487
|
+
)), this.updateArticleObject(
|
|
1488
|
+
e,
|
|
1489
|
+
w({ ...i, price: t.getAmount() })
|
|
1490
|
+
);
|
|
1422
1491
|
});
|
|
1423
1492
|
},
|
|
1424
1493
|
// Method used by parent component
|
|
1425
1494
|
focusLastArticle() {
|
|
1426
|
-
this.$nextTick(
|
|
1495
|
+
this.$nextTick(
|
|
1496
|
+
() => this.$refs.articleItem[this.articles.length - 1].focusName()
|
|
1497
|
+
);
|
|
1427
1498
|
},
|
|
1428
1499
|
openLastArticle() {
|
|
1429
1500
|
this.$nextTick(() => this.openModal(this.articles.length - 1));
|
|
@@ -1456,7 +1527,11 @@ const gt = {
|
|
|
1456
1527
|
const { newIndex: n, element: a } = e;
|
|
1457
1528
|
this.$emit("insert", { index: n, value: a });
|
|
1458
1529
|
} else if (t) {
|
|
1459
|
-
const n = C(
|
|
1530
|
+
const n = C(
|
|
1531
|
+
this.articles,
|
|
1532
|
+
t.oldIndex,
|
|
1533
|
+
t.newIndex
|
|
1534
|
+
);
|
|
1460
1535
|
this.$emit("move", n);
|
|
1461
1536
|
} else if (s) {
|
|
1462
1537
|
const { oldIndex: n } = s;
|
|
@@ -1509,7 +1584,7 @@ var yt = function() {
|
|
|
1509
1584
|
_t,
|
|
1510
1585
|
!1,
|
|
1511
1586
|
null,
|
|
1512
|
-
"
|
|
1587
|
+
"8e3ec674",
|
|
1513
1588
|
null,
|
|
1514
1589
|
null
|
|
1515
1590
|
);
|
|
@@ -1523,12 +1598,7 @@ const xt = {
|
|
|
1523
1598
|
},
|
|
1524
1599
|
data() {
|
|
1525
1600
|
return {
|
|
1526
|
-
priceTypeOptions: [
|
|
1527
|
-
"fixed",
|
|
1528
|
-
"approx",
|
|
1529
|
-
"openAcc",
|
|
1530
|
-
"openAccMaxPrice"
|
|
1531
|
-
]
|
|
1601
|
+
priceTypeOptions: ["fixed", "approx", "openAcc", "openAccMaxPrice"]
|
|
1532
1602
|
};
|
|
1533
1603
|
}
|
|
1534
1604
|
};
|
|
@@ -1545,7 +1615,7 @@ var bt = function() {
|
|
|
1545
1615
|
wt,
|
|
1546
1616
|
!1,
|
|
1547
1617
|
null,
|
|
1548
|
-
"
|
|
1618
|
+
"13ef0942",
|
|
1549
1619
|
null,
|
|
1550
1620
|
null
|
|
1551
1621
|
);
|
|
@@ -1608,7 +1678,7 @@ var At = function() {
|
|
|
1608
1678
|
Pt,
|
|
1609
1679
|
!1,
|
|
1610
1680
|
null,
|
|
1611
|
-
"
|
|
1681
|
+
"260ca3df",
|
|
1612
1682
|
null,
|
|
1613
1683
|
null
|
|
1614
1684
|
);
|
|
@@ -1676,9 +1746,11 @@ var Rt = function() {
|
|
|
1676
1746
|
{ v: 0.485, l: "48.5%" },
|
|
1677
1747
|
{ v: 0.5, l: "50%" }
|
|
1678
1748
|
], function(s) {
|
|
1679
|
-
return t("div", { key: s.l, staticClass: "deduction-button", class: {
|
|
1749
|
+
return t("div", { key: s.l, staticClass: "deduction-button", class: {
|
|
1750
|
+
active: Math.round(e.total * s.v * 0.01) * 100 === e.internalValue
|
|
1751
|
+
}, on: { click: function(n) {
|
|
1680
1752
|
return e.setDeduction(s.v);
|
|
1681
|
-
} } }, [e._v(e._s(s.l))]);
|
|
1753
|
+
} } }, [e._v(" " + e._s(s.l) + " ")]);
|
|
1682
1754
|
}), 0), t("CButton", { staticClass: "mt-8", attrs: { type: "secondary", wide: "" }, on: { click: function(s) {
|
|
1683
1755
|
e.houseWorkManualAmount = e.internalValue, e.$modal.hide(`deduction-modal-${e._uid}`);
|
|
1684
1756
|
} } }, [e._v(" " + e._s(e.$t("save")) + " ")]), t("CButton", { staticClass: "mt-2", attrs: { type: "secondary", pattern: "tertiary", wide: "" }, on: { click: function(s) {
|
|
@@ -1692,7 +1764,7 @@ var Rt = function() {
|
|
|
1692
1764
|
Ot,
|
|
1693
1765
|
!1,
|
|
1694
1766
|
null,
|
|
1695
|
-
"
|
|
1767
|
+
"97b347dc",
|
|
1696
1768
|
null,
|
|
1697
1769
|
null
|
|
1698
1770
|
);
|
|
@@ -1731,19 +1803,29 @@ const Bt = {
|
|
|
1731
1803
|
label: this._document.$t("price.net"),
|
|
1732
1804
|
value: this.prices.subTotal
|
|
1733
1805
|
},
|
|
1734
|
-
...this.prices.useVat ? [
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1806
|
+
...this.prices.useVat ? [
|
|
1807
|
+
{
|
|
1808
|
+
label: this._document.$t(`vat.${this.vatType}`),
|
|
1809
|
+
value: this.prices.taxAmount
|
|
1810
|
+
}
|
|
1811
|
+
] : [],
|
|
1812
|
+
...this.showHouseWork ? [
|
|
1813
|
+
{
|
|
1814
|
+
label: this._document.$t("deduction.type", {
|
|
1815
|
+
type: `${this.prices.region.houseWorkType}${this.prices.region.houseWorkManualAmount === null ? "_percentage" : ""}`
|
|
1816
|
+
}),
|
|
1817
|
+
value: -this.prices.region.houseWorkAmount,
|
|
1818
|
+
action: () => this.$refs.deduction.showModal()
|
|
1819
|
+
}
|
|
1820
|
+
] : [],
|
|
1821
|
+
...this.prices.rounding.enabled && this.prices.rounding.show ? [
|
|
1822
|
+
{
|
|
1823
|
+
label: this._document.$t(
|
|
1824
|
+
"chapters.pricingSummary.blocks.rounding"
|
|
1825
|
+
),
|
|
1826
|
+
value: this.prices.roundingAmount
|
|
1827
|
+
}
|
|
1828
|
+
] : [],
|
|
1747
1829
|
{
|
|
1748
1830
|
classList: "main",
|
|
1749
1831
|
label: this._document.$t("total"),
|
|
@@ -1751,13 +1833,15 @@ const Bt = {
|
|
|
1751
1833
|
prefix: this.prices.type === "approx" ? `${this._document.$t("approx")} ` : "",
|
|
1752
1834
|
value: this.prices.total
|
|
1753
1835
|
},
|
|
1754
|
-
...typeof this.prices.maxTotal == "number" ? [
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1836
|
+
...typeof this.prices.maxTotal == "number" ? [
|
|
1837
|
+
{
|
|
1838
|
+
classList: "main",
|
|
1839
|
+
label: this._document.$t("price.maxPrice"),
|
|
1840
|
+
subLabel: this.prices.useVat ? this._document.$t("vat.incVat") : "",
|
|
1841
|
+
value: Math.round(this.prices.maxTotal * 1.25 || 0)
|
|
1842
|
+
// ! Hard coded swedish VAT
|
|
1843
|
+
}
|
|
1844
|
+
] : []
|
|
1761
1845
|
].map((e) => ({
|
|
1762
1846
|
...e,
|
|
1763
1847
|
value: k(e.value, {
|
|
@@ -1768,7 +1852,9 @@ const Bt = {
|
|
|
1768
1852
|
}));
|
|
1769
1853
|
},
|
|
1770
1854
|
prices() {
|
|
1771
|
-
const { prices: i } = this._document.packageGroups.getPackageById(
|
|
1855
|
+
const { prices: i } = this._document.packageGroups.getPackageById(
|
|
1856
|
+
this.packageId
|
|
1857
|
+
);
|
|
1772
1858
|
return i;
|
|
1773
1859
|
},
|
|
1774
1860
|
showHouseWork() {
|
|
@@ -1791,7 +1877,7 @@ var Et = function() {
|
|
|
1791
1877
|
zt,
|
|
1792
1878
|
!1,
|
|
1793
1879
|
null,
|
|
1794
|
-
"
|
|
1880
|
+
"18ff599a",
|
|
1795
1881
|
null,
|
|
1796
1882
|
null
|
|
1797
1883
|
);
|
|
@@ -1830,15 +1916,17 @@ const jt = {
|
|
|
1830
1916
|
Pricing: Ft,
|
|
1831
1917
|
TextEditor: ae
|
|
1832
1918
|
},
|
|
1833
|
-
mixins: [
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1919
|
+
mixins: [
|
|
1920
|
+
y([
|
|
1921
|
+
"isSelectedDefault",
|
|
1922
|
+
"isSelected",
|
|
1923
|
+
"name",
|
|
1924
|
+
"description",
|
|
1925
|
+
"priceType",
|
|
1926
|
+
"maxTotal",
|
|
1927
|
+
"currency"
|
|
1928
|
+
])
|
|
1929
|
+
],
|
|
1842
1930
|
props: {
|
|
1843
1931
|
packageId: {
|
|
1844
1932
|
type: String,
|
|
@@ -1880,7 +1968,11 @@ const jt = {
|
|
|
1880
1968
|
},
|
|
1881
1969
|
internalDescription: {
|
|
1882
1970
|
get() {
|
|
1883
|
-
return Q(
|
|
1971
|
+
return Q(
|
|
1972
|
+
this.description,
|
|
1973
|
+
this._document.textTemplateMap,
|
|
1974
|
+
this._document._doc
|
|
1975
|
+
);
|
|
1884
1976
|
},
|
|
1885
1977
|
set(i) {
|
|
1886
1978
|
this.description = ee(i);
|
|
@@ -1918,20 +2010,37 @@ const jt = {
|
|
|
1918
2010
|
packageId: this.packageId,
|
|
1919
2011
|
currency: this.currency
|
|
1920
2012
|
});
|
|
1921
|
-
this.$emit("input", {
|
|
2013
|
+
this.$emit("input", {
|
|
2014
|
+
key: "articles",
|
|
2015
|
+
value: [...this.articles, i]
|
|
2016
|
+
});
|
|
1922
2017
|
},
|
|
1923
2018
|
onArticleInput({ index: i, value: e }) {
|
|
1924
|
-
const { i: t } = this.mappedPackageArticles[i], s = te(e, [
|
|
2019
|
+
const { i: t } = this.mappedPackageArticles[i], s = te(e, [
|
|
2020
|
+
"allowRot",
|
|
2021
|
+
"allowRut",
|
|
2022
|
+
"isIncVat",
|
|
2023
|
+
"rootPriceType",
|
|
2024
|
+
"hideControls"
|
|
2025
|
+
]);
|
|
1925
2026
|
s.currency = this.currency, this.$emit("input", { key: `articles[${[t]}]`, value: s });
|
|
1926
2027
|
},
|
|
1927
2028
|
onArticleAdd({ openModal: i = !1 } = {}) {
|
|
1928
2029
|
this.createEmptyArticle(), i ? this.$refs.articleList.openLastArticle() : this.$refs.articleList.focusLastArticle();
|
|
1929
2030
|
},
|
|
1930
2031
|
onInsert({ index: i, value: e }) {
|
|
1931
|
-
const t = ie(this.mappedPackageArticles).add(
|
|
2032
|
+
const t = ie(this.mappedPackageArticles).add(
|
|
2033
|
+
{ ...e, packageId: this.packageId },
|
|
2034
|
+
i
|
|
2035
|
+
);
|
|
1932
2036
|
this.$emit("input", {
|
|
1933
2037
|
key: "articles",
|
|
1934
|
-
value: [
|
|
2038
|
+
value: [
|
|
2039
|
+
...this.articles.filter(
|
|
2040
|
+
({ packageId: s }) => s !== this.packageId
|
|
2041
|
+
),
|
|
2042
|
+
...t
|
|
2043
|
+
]
|
|
1935
2044
|
});
|
|
1936
2045
|
},
|
|
1937
2046
|
onArticleRemove(i) {
|
|
@@ -1941,7 +2050,12 @@ const jt = {
|
|
|
1941
2050
|
onArticleMove(i) {
|
|
1942
2051
|
this.$emit("input", {
|
|
1943
2052
|
key: "articles",
|
|
1944
|
-
value: [
|
|
2053
|
+
value: [
|
|
2054
|
+
...this.articles.filter(
|
|
2055
|
+
({ packageId: e }) => e !== this.packageId
|
|
2056
|
+
),
|
|
2057
|
+
...i
|
|
2058
|
+
]
|
|
1945
2059
|
});
|
|
1946
2060
|
}
|
|
1947
2061
|
}
|
|
@@ -1964,7 +2078,12 @@ var Nt = function() {
|
|
|
1964
2078
|
e.internalDescription = s;
|
|
1965
2079
|
}, expression: "internalDescription" } }), t("div", { directives: [{ name: "click-outside", rawName: "v-click-outside", value: () => {
|
|
1966
2080
|
e.isFocus = !1, e.isHover = !1;
|
|
1967
|
-
}, expression:
|
|
2081
|
+
}, expression: `
|
|
2082
|
+
() => {
|
|
2083
|
+
isFocus = false
|
|
2084
|
+
isHover = false
|
|
2085
|
+
}
|
|
2086
|
+
` }], on: { "&mouseover": function(s) {
|
|
1968
2087
|
e.isHover = !0;
|
|
1969
2088
|
}, "&mouseleave": function(s) {
|
|
1970
2089
|
e.isHover = !1;
|
|
@@ -1987,7 +2106,7 @@ var Nt = function() {
|
|
|
1987
2106
|
offset: 6
|
|
1988
2107
|
}, expression: `{
|
|
1989
2108
|
content: $t('advancedButtonTooltip'),
|
|
1990
|
-
offset: 6
|
|
2109
|
+
offset: 6
|
|
1991
2110
|
}` }], staticClass: "text-gray-500 bg-gray-100 border border-gray-200 p-2.5 text-center text-sm font-medium leading-none rounded-md cursor-pointer transition-colors hover:border-gray-400 hover:bg-gray-500 hover:text-white", on: { click: function(s) {
|
|
1992
2111
|
return e.onArticleAdd({ openModal: !0 });
|
|
1993
2112
|
} } }, [t("BaseIcon", { 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)]);
|
|
@@ -1997,7 +2116,7 @@ var Nt = function() {
|
|
|
1997
2116
|
Ht,
|
|
1998
2117
|
!1,
|
|
1999
2118
|
null,
|
|
2000
|
-
"
|
|
2119
|
+
"311d20b0",
|
|
2001
2120
|
null,
|
|
2002
2121
|
null
|
|
2003
2122
|
);
|
|
@@ -2075,7 +2194,10 @@ var Kt = function() {
|
|
|
2075
2194
|
return t("div", { key: n, staticClass: "package-group-option", style: { backgroundColor: s.background }, on: { click: function(a) {
|
|
2076
2195
|
return e.$emit("input", s.value);
|
|
2077
2196
|
} } }, [t("div", { staticClass: "package-group-option__illustration" }, [s.value === "single" ? t("div", { staticClass: "package-group-option__illustration-card animate" }, [e._m(0, !0)]) : e._e(), s.value === "radio" ? e._l(3, function(a) {
|
|
2078
|
-
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%", "box-shadow": "0 0 0 1px white, 0 0 0 2px hsl(0, 0%, 76%)", "margin-right": "10px" }, style: a === 2 && {
|
|
2197
|
+
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%", "box-shadow": "0 0 0 1px white, 0 0 0 2px hsl(0, 0%, 76%)", "margin-right": "10px" }, style: a === 2 && {
|
|
2198
|
+
boxShadow: `0 0 0 1px white, 0 0 0 2px ${s.background}`,
|
|
2199
|
+
backgroundColor: s.background
|
|
2200
|
+
} }), e._m(1, !0)]);
|
|
2079
2201
|
}) : e._e(), s.value === "checkbox" ? e._l(3, function(a) {
|
|
2080
2202
|
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: s.background } }, [t("BaseIcon", { attrs: { type: a !== 3 ? "check" : "empty", "stroke-width": "5", size: "8" } })], 1), e._m(2, !0)]);
|
|
2081
2203
|
}) : e._e()], 2), t("div", [t("div", { staticClass: "package-group-option__title" }, [e._v(" " + e._s(s.title) + " ")]), t("div", { staticClass: "package-group-option__subtitle", domProps: { innerHTML: e._s(s.subTitle) } })])]);
|
|
@@ -2095,7 +2217,7 @@ var Kt = function() {
|
|
|
2095
2217
|
Yt,
|
|
2096
2218
|
!1,
|
|
2097
2219
|
null,
|
|
2098
|
-
"
|
|
2220
|
+
"ddc62a33",
|
|
2099
2221
|
null,
|
|
2100
2222
|
null
|
|
2101
2223
|
);
|
|
@@ -2142,13 +2264,15 @@ const Jt = {
|
|
|
2142
2264
|
PackageItem: Ut,
|
|
2143
2265
|
PackageGroupSelect: Xt
|
|
2144
2266
|
},
|
|
2145
|
-
mixins: [
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2267
|
+
mixins: [
|
|
2268
|
+
y([
|
|
2269
|
+
"type",
|
|
2270
|
+
// 'title',
|
|
2271
|
+
"packages",
|
|
2272
|
+
"articles",
|
|
2273
|
+
"hideGroupPrice"
|
|
2274
|
+
])
|
|
2275
|
+
],
|
|
2152
2276
|
props: {
|
|
2153
2277
|
persistedGroup: {
|
|
2154
2278
|
type: Object,
|
|
@@ -2180,7 +2304,9 @@ const Jt = {
|
|
|
2180
2304
|
return this.type === "checkbox" ? this.internalPackages.filter(({ toggable: i }) => i === !0) : [];
|
|
2181
2305
|
},
|
|
2182
2306
|
group() {
|
|
2183
|
-
return this._document.packageGroups.getPackageGroupUniqId(
|
|
2307
|
+
return this._document.packageGroups.getPackageGroupUniqId(
|
|
2308
|
+
this._value.groupId
|
|
2309
|
+
) || {};
|
|
2184
2310
|
},
|
|
2185
2311
|
houseWorkType() {
|
|
2186
2312
|
return o(this.group, "prices.region.houseWorkType", null);
|
|
@@ -2242,20 +2368,17 @@ const Jt = {
|
|
|
2242
2368
|
addPersistedGroup(i) {
|
|
2243
2369
|
if (!this.persistedGroup || !this.persistedGroup.type)
|
|
2244
2370
|
return;
|
|
2245
|
-
let {
|
|
2246
|
-
packages: e,
|
|
2247
|
-
articles: t
|
|
2248
|
-
} = this.persistedGroup;
|
|
2371
|
+
let { packages: e, articles: t } = this.persistedGroup;
|
|
2249
2372
|
if (!e.length)
|
|
2250
2373
|
return;
|
|
2251
2374
|
if (i !== this.persistedGroup.type && (e = Me(i, e)), i === "single" && t.length) {
|
|
2252
2375
|
const [{ packageId: n }] = e;
|
|
2253
2376
|
t = t.filter((a) => a.packageId === n);
|
|
2254
2377
|
}
|
|
2255
|
-
const s = De(
|
|
2256
|
-
...this._document.allArticles || [],
|
|
2257
|
-
|
|
2258
|
-
|
|
2378
|
+
const s = De(
|
|
2379
|
+
[...this._document.allArticles || [], ...t || []],
|
|
2380
|
+
(n) => n._uniqueId
|
|
2381
|
+
);
|
|
2259
2382
|
this.$emit("input", { key: "articles", value: s }), this.$emit("input", { key: `${[this._value.packages]}`, value: e });
|
|
2260
2383
|
},
|
|
2261
2384
|
addPackage(i = {}) {
|
|
@@ -2288,20 +2411,40 @@ const Jt = {
|
|
|
2288
2411
|
},
|
|
2289
2412
|
onInputPriceType(i, e) {
|
|
2290
2413
|
this.type === "checkbox" && this.packages.forEach((t, s) => {
|
|
2291
|
-
s !== i && this.$emit("input", {
|
|
2414
|
+
s !== i && this.$emit("input", {
|
|
2415
|
+
key: `${[this._value.packages]}[${[s]}].data.prices.type`,
|
|
2416
|
+
value: e
|
|
2417
|
+
});
|
|
2292
2418
|
});
|
|
2293
2419
|
},
|
|
2294
2420
|
onInputSelectedDefault(i, e) {
|
|
2295
2421
|
this.type === "radio" && !e || (this.type === "radio" && e && this.packages.forEach((t, s) => {
|
|
2296
|
-
s !== i && (this.$emit("input", {
|
|
2297
|
-
|
|
2422
|
+
s !== i && (this.$emit("input", {
|
|
2423
|
+
key: `${[this._value.packages]}[${[s]}].isSelectedDefault`,
|
|
2424
|
+
value: !1
|
|
2425
|
+
}), this.$emit("input", {
|
|
2426
|
+
key: `${[this._value.packages]}[${[s]}].isSelected`,
|
|
2427
|
+
value: !1
|
|
2428
|
+
}));
|
|
2429
|
+
}), this.$emit("input", {
|
|
2430
|
+
key: `${[this._value.packages]}[${[i]}].isSelectedDefault`,
|
|
2431
|
+
value: e
|
|
2432
|
+
}), this.$emit("input", {
|
|
2433
|
+
key: `${[this._value.packages]}[${[i]}].isSelected`,
|
|
2434
|
+
value: e
|
|
2435
|
+
}));
|
|
2298
2436
|
},
|
|
2299
2437
|
removeByIndex(i) {
|
|
2300
|
-
const { packageId: e } = this.packages[i], t = this._document.allArticles.filter(
|
|
2438
|
+
const { packageId: e } = this.packages[i], t = this._document.allArticles.filter(
|
|
2439
|
+
({ packageId: s }) => s !== e
|
|
2440
|
+
);
|
|
2301
2441
|
this.$emit("input", { key: "articles", value: t }), this.$emit("remove", { key: `${[this._value.packages]}[${[i]}]` });
|
|
2302
2442
|
},
|
|
2303
2443
|
async onResetType() {
|
|
2304
|
-
const i = this.packages.map((s) => s.packageId), [e, t] = this._document.allArticles.reduce(
|
|
2444
|
+
const i = this.packages.map((s) => s.packageId), [e, t] = this._document.allArticles.reduce(
|
|
2445
|
+
([s, n], a) => i.includes(a.packageId) ? [[...s, a], n] : [s, [...n, a]],
|
|
2446
|
+
[[], []]
|
|
2447
|
+
);
|
|
2305
2448
|
this.$emit("update:persisted-group", {
|
|
2306
2449
|
type: this.type,
|
|
2307
2450
|
packages: this.packages,
|
|
@@ -2323,7 +2466,11 @@ var Qt = function() {
|
|
|
2323
2466
|
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(s) {
|
|
2324
2467
|
e.hideGroupPrice = s;
|
|
2325
2468
|
} } }, [e._v(" " + e._s(e.$t("hideGroupPrice")) + " ")])], 1)], 1), e.type === "checkbox" && !e.internalPackages.find((s) => s.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(s) {
|
|
2326
|
-
return e.addPackage({
|
|
2469
|
+
return e.addPackage({
|
|
2470
|
+
isSelected: !0,
|
|
2471
|
+
isSelectedDefault: !0,
|
|
2472
|
+
toggable: !1
|
|
2473
|
+
});
|
|
2327
2474
|
} } }, [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(s, n) {
|
|
2328
2475
|
return t("div", { key: s.packageId, staticClass: "pb-4 section-item" }, [t("PackageItem", { attrs: { _document: e._document, _value: {
|
|
2329
2476
|
isSelectedDefault: `${e._value.packages}[${s.index}].isSelectedDefault`,
|
|
@@ -2339,7 +2486,10 @@ var Qt = function() {
|
|
|
2339
2486
|
}, add: function(a) {
|
|
2340
2487
|
return e.$emit("add", a);
|
|
2341
2488
|
}, "update:isSelectedDefault": (a) => e.onInputSelectedDefault(s.index, a), "update:priceType": (a) => e.onInputPriceType(s.index, a), "update:setPricesIncVat": (a) => {
|
|
2342
|
-
e.$emit("input", {
|
|
2489
|
+
e.$emit("input", {
|
|
2490
|
+
key: "data.formSettings.setPricesIncVat",
|
|
2491
|
+
value: a
|
|
2492
|
+
}), e.setPricesDirty = !0;
|
|
2343
2493
|
}, "update:currency": (a) => e.$emit("input", { key: "currency", value: a }), remove: function(a) {
|
|
2344
2494
|
return e.$emit("remove", a);
|
|
2345
2495
|
}, "remove-package": function(a) {
|
|
@@ -2362,7 +2512,10 @@ var Qt = function() {
|
|
|
2362
2512
|
}, add: function(a) {
|
|
2363
2513
|
return e.$emit("add", a);
|
|
2364
2514
|
}, "update:isSelectedDefault": (a) => e.onInputSelectedDefault(s.index, a), "update:priceType": (a) => e.onInputPriceType(s.index, a), "update:setPricesIncVat": (a) => {
|
|
2365
|
-
e.$emit("input", {
|
|
2515
|
+
e.$emit("input", {
|
|
2516
|
+
key: "data.formSettings.setPricesIncVat",
|
|
2517
|
+
value: a
|
|
2518
|
+
}), e.setPricesDirty = !0;
|
|
2366
2519
|
}, remove: function(a) {
|
|
2367
2520
|
return e.$emit("remove", a);
|
|
2368
2521
|
}, "remove-package": function(a) {
|
|
@@ -2381,7 +2534,7 @@ var Qt = function() {
|
|
|
2381
2534
|
ei,
|
|
2382
2535
|
!1,
|
|
2383
2536
|
null,
|
|
2384
|
-
"
|
|
2537
|
+
"614a59a8",
|
|
2385
2538
|
null,
|
|
2386
2539
|
null
|
|
2387
2540
|
);
|