PageSourceSearch

https://ris.loewenberger-land.de/dist/js/CustomerContractList_DXsx3061.min.js

js loewenberger-land.de collected 2026-10-02 18:11:26 UTC 20,364 bytes, 513 lines download raw bytes

1(function() {
2	try {
3		var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
4		e.SENTRY_RELEASE = { id: "live_2026-10-01-1531" };
5		var t = new e.Error().stack;
6		t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "12aac62b-ac44-4db4-9a20-179d10391cbd", e._sentryDebugIdIdentifier = "sentry-dbid-12aac62b-ac44-4db4-9a20-179d10391cbd");
7	} catch (e) {}
8})();
9import { Ba as e, Bo as t, Dc as n, Fs as r, Is as i, Jc as a, Ps as o, Sn as s, Ua as c, cc as ee, es as l, jc as u, mc as d, ss as te, xi as ne } from "./topMessageHandler_CaWydTPF.min.js";
10import { $ as f, F as p, L as re, N as m, Ot as ie, R as h, T as g, X as _, Y as v, _ as y, c as b, d as x, f as S, g as C, i as w, jt as T, l as E, lt as D, nt as O, u as k, y as A, z as ae } from "./runtime-core.esm-bundler_DscPLG0X.min.js";
11import { n as j, t as oe } from "./asyncToGenerator_CnehwrQ8.min.js";
12import { r as se } from "./vuex.esm-bundler_ByHC_Vqx.min.js";
13import { s as ce } from "./addresses_BKkK47Xf.min.js";
14import { t as le } from "./ListPager_ClTN-8nC.min.js";
15import { t as ue } from "./searchAbstract_DeMDx6Lx.min.js";
16import { t as de } from "./AppContent_DtiJZ3PY.min.js";
17import { t as M } from "./TableSearch_Cq1hc2fH.min.js";
18import { o as fe } from "./customer_DAx0TyYN.min.js";
19import { t as pe } from "./customer_BNhcZn43.min.js";
20import { n as N, t as P } from "./ContractCancelPopup_DEhjxKhA.min.js";
21//#region src/views/customer/contract/CustomerContractList.vue?vue&type=script&setup=true&lang.ts
22j();
23var F = {
24	key: 0,
25	class: "row default-margin-bottom"
26}, I = { class: "col-sm-6" }, L = { class: "col-sm-6 text-right" }, R = {
27	class: "button button-primary",
28	type: "button"
29}, z = { class: "col-sm-3" }, B = { class: "col-sm-3" }, me = { class: "col-sm-3" }, he = { class: "row default-margin-bottom" }, ge = { class: "col-sm-3" }, _e = { class: "col-sm-3" }, ve = { class: "col-sm-3" }, ye = { class: "portuna-table portuna-table-bordered contract-list-table" }, be = {
30	key: 0,
31	style: { width: "45px" }
32}, xe = {
33	key: 0,
34	class: "text-center background-dark"
35}, Se = {
36	key: 2,
37	class: "no-print hidden-md-down"
38}, Ce = {
39	key: 3,
40	class: "no-print hidden-md-down"
41}, we = { key: 0 }, Te = ["colspan"], Ee = { key: 1 }, De = ["colspan"], Oe = { key: 0 }, ke = { class: "text-overflow" }, Ae = { class: "text-overflow" }, je = ["onMouseleave", "onMouseover"], Me = { class: "padding-small" }, Ne = { class: "no-margin-top margin-bottom-5 intranet-headline-color" }, Pe = { class: "margin-bottom-5 font-size-12" }, Fe = { class: "break-spaces" }, Ie = { class: "no-print hidden-md-down" }, Le = { class: "edit-cell no-print" }, V = /* @__PURE__ */ A({
42	__name: "CustomerContractList",
43	props: {
44		contractId: { default: null },
45		institutionId: { default: null }
46	},
47	emits: ["fetched"],
48	setup(A, { expose: j, emit: V }) {
49		let Re = function() {
50			var e = oe(function* (e) {
51				return W.dispatch("errorPage", e);
52			});
53			return function(t) {
54				return e.apply(this, arguments);
55			};
56		}(), H = a(), U = pe(), W = se(), G = A, ze = V, Be = b(() => [{
57			label: "Kunden",
58			href: { name: "customer-index" }
59		}]), Ve = U.isAdmin, K = O(), q = O(null), He = b(() => W.getters["module/customer/productSelectOptions"]), Ue = [
60			{
61				value: "order_date",
62				label: "Bestellung"
63			},
64			{
65				value: "start_date",
66				label: "Vertragsbeginn"
67			},
68			{
69				value: "invoice_date",
70				label: "Rechnungsbeginn"
71			}
72		], We = [
73			{
74				value: "active",
75				label: "Aktive"
76			},
77			{
78				value: "expired",
79				label: "Abgelaufen"
80			},
81			{
82				value: "amended",
83				label: "Beendet"
84			},
85			{
86				value: "canceled",
87				label: "Storniert"
88			},
89			{
90				value: "terminated",
91				label: "Gekündigt"
92			},
93			{
94				value: "fixed",
95				label: "Befristet"
96			}
97		], Ge = [{
98			value: "normal",
99			label: "Normal"
100		}, {
101			value: "amend",
102			label: "Änderungsvertrag"
103		}], Ke = (e) => {
104			let t = r(e.product.map((e) => e.seller), "employee"), n = [];
105			for (let e of t) n.push(e ? c(e, "employee") : "Keiner");
106			return n.join(", ");
107		}, J = b(() => !G.institutionId), Y = b(() => !J.value), X = b(() => {
108			let e = 9;
109			return J.value || (e -= 2), Y.value && --e, e;
110		}), qe = b(() => {
111			let e = [], t = "/customer/contract/fetch-list";
112			return G.institutionId && e.push("institution-id", G.institutionId), e.length && (t += "/" + e.join("/")), t;
113		}), Je = b(() => Y.value ? {} : {
114			headline: "Verträge",
115			breadcrumb: Be.value
116		}), Ye = b(() => Y.value ? !1 : "customer-contract-list"), Xe = b(() => {
117			let e = [], t = [];
118			if (!q.value) return e;
119			for (let n of q.value) for (let r of n.product) if (!t.includes(r.seller)) if (t.push(r.seller), r.seller) {
120				let t = W.getters.personData(r.seller, "employee");
121				e.push({
122					value: r.seller,
123					label: t.name,
124					sortHelper: t.surname ? o(t.surname) : t.surname
125				});
126			} else e.push({
127				value: r.seller,
128				label: "Keiner",
129				sortHelper: ""
130			});
131			return e.sort((e, t) => i(e.sortHelper, t.sortHelper)), e;
132		}), Z = (e) => {
133			if (Y.value) return !0;
134			let t = e[$.model.filter_by];
135			if (!t) return !1;
136			if ($.model.filter_start && $.model.filter_end && $.model.filter_by) {
137				let e = t.substring(0, 10);
138				return e >= $.model.filter_start && e <= $.model.filter_end;
139			}
140			return !0;
141		}, Ze = (e) => {
142			Y.value || (e.filter_start = t("Y-m-01"), e.filter_end = t("Y-m-t"), e.filter_by = "order_date");
143		}, Qe = () => {
144			ze("fetched", q.value ? q.value.length : 0);
145		}, $e = (e) => {
146			Y.value ? d(e) : Re(e);
147		}, et = () => {
148			K.value && fe(K.value.sortedEntries.map((e) => e.id), "contract");
149		}, Q = () => u.get(qe.value).then(({ data: { data: e } }) => {
150			q.value = e.entries, Qe();
151		}).catch($e), tt = (e) => {
152			W.dispatch("createPopup", {
153				title: "Vertrag stornieren",
154				size: "medium",
155				titleIcon: "cancel",
156				component: f(P),
157				componentProps: { id: e.id },
158				events: { cancelled: () => {
159					Q();
160				} }
161			}).then((e) => e.open());
162		}, nt = (e) => {
163			n({
164				url: "/customer/contract/delete-contract/id/" + e.id,
165				message: {
166					headline: "Vertrag löschen",
167					message: `Sind Sie sicher, dass Sie den Vertrag vom ${t("d.m.Y, H:i", e.created)} Uhr löschen möchten?`
168				},
169				options: {
170					titleIcon: "delete",
171					textIcon: "delete",
172					textIconClass: "text-danger",
173					buttonOkay: {
174						title: "Löschen",
175						icon: "delete",
176						type: "danger"
177					}
178				}
179			}).then(() => {
180				Q();
181			}).catch(l);
182		}, rt = (e) => {
183			W.dispatch("createPopup", {
184				title: "Vertrag kündigen",
185				size: "medium",
186				titleIcon: "block",
187				component: f(N),
188				componentProps: {
189					id: e.institution_id,
190					contractId: e.id
191				},
192				events: { saved: () => {
193					Q();
194				} }
195			}).then((e) => e.open());
196		};
197		U.loadAll({
198			promises: [U.fetchResourceData(), Q()],
199			setLoading: !Y.value
200		});
201		let $ = ue({
202			emitter: H.emitter,
203			searchStorageScope: Ye,
204			preInitSearch: Ze
205		});
206		return j(Object.assign({}, H, $.expose)), (n, r) => {
207			let i = re("router-link"), a = h("interact"), o = h("search"), l = h("sort"), u = h("tooltip");
208			return m(), k(ae(Y.value ? "div" : de), g(Je.value, { class: "module-customer" }), {
209				default: v(() => [y(le, g({
210					ref_key: "listPager",
211					ref: K
212				}, D($).properties, {
213					"custom-filter": Z,
214					entries: q.value,
215					"ignore-filters": [
216						"filter_by",
217						"filter_start",
218						"filter_end"
219					],
220					"show-entry-count": !Y.value,
221					"show-pager": !Y.value
222				}), {
223					default: v(({ listEntries: n, loading: d }) => [
224						Y.value ? x("", !0) : (m(), S("div", F, [
225							E("div", I, [y(i, {
226								to: { name: "customer-contract-add" },
227								class: "button button-add"
228							}, {
229								default: v(() => [...r[10] || (r[10] = [
230									E("i", {
231										"aria-hidden": "true",
232										class: "material-icons",
233										role: "img"
234									}, "add", -1),
235									C(),
236									E("span", null, "Hinzufügen", -1)
237								])]),
238								_: 1
239							})]),
240							r[12] || (r[12] = C()),
241							r[13] || (r[13] = E("div", { class: "col-12 spacer spacer-10 visible-sm" }, "\xA0", -1)),
242							r[14] || (r[14] = C()),
243							E("div", L, [_((m(), S("button", R, [...r[11] || (r[11] = [E("i", {
244								"aria-hidden": "true",
245								class: "material-icons",
246								role: "img"
247							}, "file_download", -1), C("\n                        Excel-Export\n                    ", -1)])])), [[a, et]])]),
248							r[15] || (r[15] = C()),
249							r[16] || (r[16] = E("div", { class: "col-12 spacer spacer-10" }, "\xA0", -1)),
250							r[17] || (r[17] = C()),
251							E("div", z, [y(s, {
252								modelValue: D($).model.filter_start,
253								"onUpdate:modelValue": r[0] || (r[0] = (e) => D($).model.filter_start = e),
254								"overwrite-placeholder": "Startdatum"
255							}, null, 8, ["modelValue"])]),
256							r[18] || (r[18] = C()),
257							E("div", B, [y(s, {
258								modelValue: D($).model.filter_end,
259								"onUpdate:modelValue": r[1] || (r[1] = (e) => D($).model.filter_end = e),
260								"overwrite-placeholder": "Enddatum"
261							}, null, 8, ["modelValue"])]),
262							r[19] || (r[19] = C()),
263							E("div", me, [y(e, {
264								modelValue: D($).model.filter_by,
265								"onUpdate:modelValue": r[2] || (r[2] = (e) => D($).model.filter_by = e),
266								options: Ue
267							}, null, 8, ["modelValue"])])
268						])),
269						r[88] || (r[88] = C()),
270						E("div", he, [
271							E("div", ge, [_((m(), k(e, {
272								modelValue: D($).model.party_id,
273								"onUpdate:modelValue": r[3] || (r[3] = (e) => D($).model.party_id = e),
274								options: D(U).invoicingPartyNoPlaceholder.value,
275								"inherit-width": "at-least",
276								multiple: ""
277							}, {
278								all: v(() => [...r[20] || (r[20] = [C("Alle Rechnungssteller ausgewählt", -1)])]),
279								multiple: v(({ count: e }) => [C(T(e) + " Rechnungssteller ausgewählt", 1)]),
280								placeholder: v(() => [...r[21] || (r[21] = [C("Kein Rechnungssteller ausgewählt", -1)])]),
281								_: 1
282							}, 8, ["modelValue", "options"])), [[o, "search.party_id"]])]),
283							r[32] || (r[32] = C()),
284							E("div", _e, [_((m(), k(e, {
285								modelValue: D($).model["state,product.term"],
286								"onUpdate:modelValue": r[4] || (r[4] = (e) => D($).model["state,product.term"] = e),
287								options: We,
288								"inherit-width": "at-least",
289								multiple: ""
290							}, {
291								all: v(() => [...r[24] || (r[24] = [C("Alle Status ausgewählt", -1)])]),
292								multiple: v(({ count: e }) => [C(T(e) + " Status ausgewählt", 1)]),
293								placeholder: v(() => [...r[25] || (r[25] = [C("Kein Status ausgewählt", -1)])]),
294								_: 1
295							}, 8, ["modelValue"])), [[o, "search['state,product.term']"]])]),
296							r[33] || (r[33] = C()),
297							E("div", ve, [_((m(), k(e, {
298								modelValue: D($).model.type,
299								"onUpdate:modelValue": r[5] || (r[5] = (e) => D($).model.type = e),
300								options: Ge,
301								"inherit-width": "at-least",
302								multiple: ""
303							}, {
304								all: v(() => [...r[28] || (r[28] = [C("Alle Vertragsarten ausgewählt", -1)])]),
305								multiple: v(({ count: e }) => [C(T(e) + " Vertragsarten ausgewählt", 1)]),
306								placeholder: v(() => [...r[29] || (r[29] = [C("Keine Vertragsarten ausgewählt", -1)])]),
307								_: 1
308							}, 8, ["modelValue"])), [[o, "search.type"]])])
309						]),
310						r[89] || (r[89] = C()),
311						E("table", ye, [
312							E("colgroup", null, [
313								Y.value ? x("", !0) : (m(), S(w, { key: 0 }, [
314									Y.value ? x("", !0) : (m(), S("col", be)),
315									r[34] || (r[34] = C()),
316									r[35] || (r[35] = E("col", { style: { width: "110px" } }, null, -1)),
317									r[36] || (r[36] = C()),
318									r[37] || (r[37] = E("col", {
319										class: "no-print hidden-md-down",
320										style: { width: "auto" }
321									}, null, -1))
322								], 64)),
323								r[38] || (r[38] = C()),
324								r[39] || (r[39] = E("col", { style: { width: "auto" } }, null, -1)),
325								r[40] || (r[40] = C()),
326								r[41] || (r[41] = E("col", {
327									class: "no-print hidden-md-down",
328									style: { width: "200px" }
329								}, null, -1)),
330								r[42] || (r[42] = C()),
331								r[43] || (r[43] = E("col", { style: { width: "155px" } }, null, -1)),
332								r[44] || (r[44] = C()),
333								r[45] || (r[45] = E("col", { style: { width: "155px" } }, null, -1)),
334								r[46] || (r[46] = C()),
335								r[47] || (r[47] = E("col", { style: { width: "155px" } }, null, -1)),
336								r[48] || (r[48] = C()),
337								r[49] || (r[49] = E("col", { class: "edit-cell no-print" }, null, -1))
338							]),
339							r[86] || (r[86] = C()),
340							E("thead", null, [E("tr", null, [
341								Y.value ? x("", !0) : (m(), S("th", xe, [...r[50] || (r[50] = [E("i", {
342									"aria-hidden": "true",
343									class: "material-icons md-18",
344									role: "img"
345								}, "list", -1)])])),
346								r[56] || (r[56] = C()),
347								J.value ? (m(), S(w, { key: 1 }, [
348									y(M, {
349										modelValue: D($).model.institution_id,
350										"onUpdate:modelValue": r[6] || (r[6] = (e) => D($).model.institution_id = e),
351										"default-sort": !0,
352										"sort-field": "institution_id",
353										text: "Knd-Nr."
354									}, null, 8, ["modelValue"]),
355									r[51] || (r[51] = C()),
356									y(M, {
357										modelValue: D($).model.institution_name,
358										"onUpdate:modelValue": r[7] || (r[7] = (e) => D($).model.institution_name = e),
359										class: "no-print hidden-md-down",
360										"sort-field": "institution_name",
361										text: "Kunde"
362									}, null, 8, ["modelValue"])
363								], 64)) : x("", !0),
364								r[57] || (r[57] = C()),
365								y(M, {
366									modelValue: D($).model["product.product_id"],
367									"onUpdate:modelValue": r[8] || (r[8] = (e) => D($).model["product.product_id"] = e),
368									options: He.value,
369									text: "Produkte"
370								}, null, 8, ["modelValue", "options"]),
371								r[58] || (r[58] = C()),
372								D($).model.filter_by === "invoice_date" ? _((m(), S("th", Se, [...r[52] || (r[52] = [C("Rechnungsbeginn", -1)])])), [[l, "invoice_date"]]) : _((m(), S("th", Ce, [...r[53] || (r[53] = [C("Vertragsbeginn", -1)])])), [[l, "start_date"]]),
373								r[59] || (r[59] = C()),
374								_((m(), S("th", null, [...r[54] || (r[54] = [C("Bestellung", -1)])])), [[l, "order_date"]]),
375								r[60] || (r[60] = C()),
376								_((m(), S("th", null, [...r[55] || (r[55] = [C("Summe", -1)])])), [[l, "cost_sum"]]),
377								r[61] || (r[61] = C()),
378								y(M, {
379									modelValue: D($).model["product.seller"],
380									"onUpdate:modelValue": r[9] || (r[9] = (e) => D($).model["product.seller"] = e),
381									options: Xe.value,
382									"sort-field": "seller_name",
383									text: "Verkäufer"
384								}, null, 8, ["modelValue", "options"]),
385								r[62] || (r[62] = C()),
386								r[63] || (r[63] = E("th", { class: "edit-cell" }, "\xA0", -1))
387							])]),
388							r[87] || (r[87] = C()),
389							E("tbody", null, [d ? (m(), S("tr", we, [E("td", { colspan: X.value }, [y(ce)], 8, Te)])) : n.length === 0 ? (m(), S("tr", Ee, [E("td", { colspan: X.value }, "\n                        Es wurden keine Einträge gefunden.\n                    ", 8, De)])) : (m(!0), S(w, { key: 2 }, p(n, (e) => (m(), S("tr", null, [
390								Y.value ? x("", !0) : (m(), S("td", Oe)),
391								r[79] || (r[79] = C()),
392								J.value ? (m(), S(w, { key: 1 }, [
393									E("td", ke, [y(i, { to: {
394										name: "contact-entry-view",
395										params: { id: e.institution_id }
396									} }, {
397										default: v(() => [C("\n                                    #" + T(e.institution_id), 1)]),
398										_: 2
399									}, 1032, ["to"])]),
400									r[64] || (r[64] = C()),
401									E("td", { class: ie(["state-" + e.state, "text-overflow state-label no-print hidden-md-down"]) }, [_((m(), k(i, { to: {
402										name: "customer-contract-view",
403										params: { id: e.id }
404									} }, {
405										default: v(() => [C(T(e.institution_name), 1)]),
406										_: 2
407									}, 1032, ["to"])), [[u, `${e.institution_name} (${e.institution_id})`]])], 2)
408								], 64)) : x("", !0),
409								r[80] || (r[80] = C()),
410								E("td", Ae, [(m(!0), S(w, null, p(e.product, (e) => (m(), S("span", null, [y(ee, {
411									"max-width": 400,
412									class: "label"
413								}, {
414									default: v(({ open: t, mouseleave: n }) => [E("span", {
415										onMouseleave: n,
416										onMouseover: t
417									}, T(e.matchcode), 41, je)]),
418									container: v(() => [E("div", Me, [
419										E("h4", Ne, T(e.title), 1),
420										r[65] || (r[65] = C()),
421										E("div", Pe, "Verkäufer: " + T(D(c)(e.seller, "employee")), 1),
422										r[66] || (r[66] = C()),
423										E("div", Fe, T(e.description.length > 350 ? e.description.substring(0, 350) + "..." : e.description), 1)
424									])]),
425									_: 2
426								}, 1024)]))), 256))]),
427								r[81] || (r[81] = C()),
428								E("td", Ie, [D($).model.filter_by === "invoice_date" ? (m(), S(w, { key: 0 }, [C(T(D(t)("d.m.Y", e.invoice_date)), 1)], 64)) : (m(), S(w, { key: 1 }, [C(T(D(t)("d.m.Y", e.start_date)), 1)], 64))]),
429								r[82] || (r[82] = C()),
430								E("td", null, T(D(t)("d.m.Y", e.order_date)), 1),
431								r[83] || (r[83] = C()),
432								E("td", null, T(D(te)(e.cost_sum)), 1),
433								r[84] || (r[84] = C()),
434								E("td", null, T(Ke(e)), 1),
435								r[85] || (r[85] = C()),
436								E("td", Le, [D(Ve) && e.state === "active" ? (m(), k(ne, { key: 0 }, {
437									default: v(() => [
438										E("li", null, [y(i, { to: {
439											name: "customer-contract-edit",
440											params: { id: e.id }
441										} }, {
442											default: v(() => [...r[68] || (r[68] = [E("i", {
443												"aria-hidden": "true",
444												class: "material-icons",
445												role: "img"
446											}, "edit", -1), C("\n                                        Bearbeiten\n                                    ", -1)])]),
447											_: 1
448										}, 8, ["to"])]),
449										r[75] || (r[75] = C()),
450										E("li", null, [y(i, { to: {
451											name: "customer-contract-amend",
452											params: { id: e.id }
453										} }, {
454											default: v(() => [...r[69] || (r[69] = [E("i", {
455												"aria-hidden": "true",
456												class: "material-icons",
457												role: "img"
458											}, "assignment", -1), C("\n                                        Änderungsvertrag erstellen\n                                    ", -1)])]),
459											_: 1
460										}, 8, ["to"])]),
461										r[76] || (r[76] = C()),
462										E("li", null, [y(i, { to: {
463											name: "customer-contract-split",
464											params: { id: e.id }
465										} }, {
466											default: v(() => [...r[70] || (r[70] = [E("i", {
467												"aria-hidden": "true",
468												class: "material-icons",
469												role: "img"
470											}, "assignment", -1), C("\n                                        Vertrag teilen\n                                    ", -1)])]),
471											_: 1
472										}, 8, ["to"])]),
473										r[77] || (r[77] = C()),
474										E("li", null, [_((m(), S("a", null, [...r[71] || (r[71] = [E("i", {
475											"aria-hidden": "true",
476											class: "material-icons",
477											role: "img"
478										}, "block", -1), C("Kündigen\n                                    ", -1)])])), [[a, () => rt(e)]])]),
479										r[78] || (r[78] = C()),
480										e.has_invoice ? x("", !0) : (m(), S(w, { key: 0 }, [
481											E("li", null, [_((m(), S("a", null, [...r[72] || (r[72] = [E("i", {
482												"aria-hidden": "true",
483												class: "material-icons",
484												role: "img"
485											}, "cancel", -1), C("Stornieren\n                                        ", -1)])])), [[a, () => tt(e)]])]),
486											r[74] || (r[74] = C()),
487											E("li", null, [_((m(), S("a", null, [...r[73] || (r[73] = [E("i", {
488												"aria-hidden": "true",
489												class: "material-icons",
490												role: "img"
491											}, "delete", -1), C("Löschen\n                                        ", -1)])])), [[a, () => nt(e)]])])
492										], 64))
493									]),
494									_: 2
495								}, 1024)) : x("", !0)])
496							]))), 256))])
497						])
498					]),
499					_: 1
500				}, 16, [
501					"entries",
502					"show-entry-count",
503					"show-pager"
504				])]),
505				_: 1
506			}, 16);
507		};
508	}
509});
510//#endregion
511export { V as default };
512
513//# sourceMappingURL=CustomerContractList_DXsx3061.min.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.