Standart werte für die Auslastung je Leistungsphase

This commit is contained in:
erik committed 2026-08-13 15:04:56 +02:00
1 parent eeb2e63f89
commit 7451e0bf78
5 files changed
+32 -11

No files matched your search

+5 -3
View File
@@ -160,8 +160,9 @@
<h2>Aufwand je Leistungsphase</h2>
<p style="color:#888;margin-bottom:6px" id="lpModalProject"></p>
<p class="hint" style="margin-bottom:10px">
Rollenbezogene Gewichtungsfaktoren je Leistungsphase (Standard 1,0).
Die amtierende Leistungsphase wird pro Projekt im Tab „Projekte" gewählt.
Rollenbezogene Gewichtungsfaktoren je Leistungsphase (Standardwerte laut
Vorlage im Code). Die amtierende Leistungsphase wird pro Projekt im Tab
„Projekte" gewählt.
</p>
<div id="lpModalRows"></div>
<div class="toolbar" style="margin-top:12px">
@@ -197,7 +198,8 @@
<select id="newProjActiveLP" style="width:100%"></select>
</div>
<p class="hint" style="margin:8px 0 10px">
Rollenbezogener Gewichtungsfaktor je Leistungsphase (Standard 1,0).
Rollenbezogener Gewichtungsfaktor je Leistungsphase (Standardwerte laut
Vorlage im Code).
</p>
<div id="newProjLpRows"></div>
<div class="toolbar" style="margin-top:12px">
+26 -7
View File
@@ -1799,11 +1799,26 @@ function reorderProjects(){
// - Mitarbeiterkapazität (Teilzeit/Vollzeit) existiert nicht – offener Punkt.
//
// AUFWAND_LPS: Phasen des Aufwandsmodells (LPH 1–8; "W+M" ist bewusst nicht
// enthalten, entspricht der Entscheidung "LP-Schema: lp1-8"). Es gibt keine
// Default-Vorlage: neue Projekte starten leer und zählen bei gesetzter aktiver
// LP je Rolle zu 1,0; ohne aktive LP zu 0.
// enthalten, entspricht der Entscheidung "LP-Schema: lp1-8").
const AUFWAND_LPS = LPHS.slice(0, 8);
// LP_AUFWAND_VORLAGE: Standardwerte der Maske "Aufwand je Leistungsphase".
// Vorbefüllung beim Anlegen neuer Projekte sowie beim Öffnen der Maske für
// bestehende Projekte, die in einzelnen Feldern keine Werte haben – beim
// Speichern werden sie übernommen. Werte 0.0–1.0 je Rolle; 0 = kein Aufwand.
// Nicht gelistete Phasen/Rollen bleiben leer und zählen als Standard-Faktor 1,0.
// Hier im Code anpassen.
const LP_AUFWAND_VORLAGE = {
'LPH 1': { Planung: 0.4, Projektleitung: 0.2, Bauüberwachung: 0 },
'LPH 2': { Planung: 0.4, Projektleitung: 0.2, Bauüberwachung: 0 },
'LPH 3': { Planung: 1.0, Projektleitung: 0.3, Bauüberwachung: 0 },
'LPH 4': { Planung: 0.0, Projektleitung: 0.3, Bauüberwachung: 0 },
'LPH 5': { Planung: 1.0, Projektleitung: 0.4, Bauüberwachung: 0 },
'LPH 6': { Planung: 0.2, Projektleitung: 0.7, Bauüberwachung: 0.3 },
'LPH 7': { Planung: 0.1, Projektleitung: 0.3, Bauüberwachung: 0.5 },
'LPH 8': { Planung: 0, Projektleitung: 0.2, Bauüberwachung: 1.0 }
};
// PLATZHALTER! Ampel-Schwellen als Anteil des Maximalwerts LOAD_BAR_MAX
// (gelb ab 50 %, rot ab 75 %). Müssen vom Fachplaner bestätigt werden.
const THRESHOLD_RATIO_CRITICAL = 0.75;
@@ -1867,6 +1882,7 @@ let lpModalProjectId = null;
// Bauüberwachung). Die amtierende Leistungsphase wird pro Projekt im Tab
// "Projekte" gewählt (renderProjects / editProjectActiveLP).
// prefix: 'lp' = Bearbeiten-Modal, 'np' = Neues-Projekt-Modal (eindeutige IDs).
// Leere Felder werden mit den Standardwerten aus LP_AUFWAND_VORLAGE vorbefüllt.
// Die Feld-IDs bleiben identisch, damit collectLpRows() unverändert funkioniert.
function lpRowsHtml(p, prefix){
const head = ROLES.map(r => `<th>${esc(r)}</th>`).join('');
@@ -1875,8 +1891,10 @@ function lpRowsHtml(p, prefix){
const row = (p.aufwandProLP && typeof p.aufwandProLP[l] === 'object') ? p.aufwandProLP[l] : {};
const cells = ROLES.map((r, ri) => {
const raw = row[r];
const val = (raw !== undefined && raw !== null && raw !== '')
? String(parseFloat(raw)).replace('.', ',') : '';
const vorlage = LP_AUFWAND_VORLAGE && LP_AUFWAND_VORLAGE[l] ? LP_AUFWAND_VORLAGE[l][r] : undefined;
const base = (raw !== undefined && raw !== null && raw !== '') ? raw
: (vorlage !== undefined && vorlage !== null && vorlage !== '') ? vorlage : '';
const val = base !== '' ? String(parseFloat(base)).replace('.', ',') : '';
return `<td><input type="text" inputmode="decimal" id="${prefix}Val${idx}R${ri}" value="${val}" placeholder="1,0"></td>`;
}).join('');
return `<tr><th class="lp-lph">${l}</th>${cells}</tr>`;
@@ -1919,8 +1937,9 @@ function collectLpRows(prefix){
}
// applyLpRows: übernimmt das Ergebnis von collectLpRows auf ein Projekt.
// Ohne gepflegte Rollen-Matrix (leer) zählt bei gesetzter aktiver LP später der
// Standard-Faktor 1,0; ohne aktive LP zählt das Projekt 0.
// Die Maske ist mit den Standardwerten (LP_AUFWAND_VORLAGE) vorbefüllt;
// Felder ohne Vorbefüllung, die leer bleiben, zählen bei gesetzter aktiver LP
// später als Standard-Faktor 1,0; ohne aktive LP zählt das Projekt 0.
// Die amtierende Leistungsphase wird separat über den Tab "Projekte" gesetzt.
function applyLpRows(p, lp){
if(!lp) return false;