Stufe 5: Jahresplanung mit Versionen, 12 Monaten, Plan/Ist und BWA-Import (0.22.0)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmyPfuNc4sCRfaF3oURXZz
This commit is contained in:
@@ -16,6 +16,7 @@ import { angebotSeite, angeboteHtml, angeboteSeite, mengenblattSeite, neuesAngeb
|
||||
import { vorlageSeite } from "./mengenblatt.js";
|
||||
import { leistungSeite, stammdatenSeite } from "./stammdaten.js";
|
||||
import { lageKopfHtml, liquiditaetSeite } from "./liquiditaet.js";
|
||||
import { jahresplanSeite } from "./jahresplan.js";
|
||||
|
||||
|
||||
// ---------- Reiter ----------
|
||||
@@ -710,7 +711,8 @@ async function uebersicht(): Promise<void> {
|
||||
<section class="karte breit"><div class="karte-kopf"><h2>Wer macht was</h2><a class="neben" href="#terminplan">Terminplan</a></div>${einsatzHtml(u.einsatz)}</section>
|
||||
<section class="karte breit"><div class="karte-kopf"><h2>Liquidität 4 Wochen</h2><a class="neben" href="#liquiditaet">Details</a></div>
|
||||
${u.liquiLage ? lageKopfHtml(u.liquiLage, "4 Wochen") : ""}
|
||||
<div class="liqui">${u.liquiditaet.map((p: Zeile) => `<div><small>ab ${dat(p.von).slice(0, 6)}</small><b class="${p.kontostand < 0 ? "fehler" : ""}">${euro(p.kontostand)}</b><small>Saldo ${euro(p.saldo)}</small></div>`).join("")}</div></section>`;
|
||||
<div class="liqui">${u.liquiditaet.map((p: Zeile) => `<div><small>ab ${dat(p.von).slice(0, 6)}</small><b class="${p.kontostand < 0 ? "fehler" : ""}">${euro(p.kontostand)}</b><small>Saldo ${euro(p.saldo)}</small></div>`).join("")}</div>
|
||||
${u.jahresplan ? jahresplanZeile(u.jahresplan) : ""}</section>`;
|
||||
inhalt.appendChild(raster);
|
||||
|
||||
raster.addEventListener("change", async (ev) => {
|
||||
@@ -724,6 +726,15 @@ async function uebersicht(): Promise<void> {
|
||||
};
|
||||
}
|
||||
|
||||
/** Stufe 5: wie viel Umsatz im Planjahr noch verkauft werden muss */
|
||||
function jahresplanZeile(j: Zeile): string {
|
||||
const ganz = (c: number) => euro(Math.round(c / 100) * 100).replace(",00 €", " €");
|
||||
const anteil = j.umsatz ? Math.min(100, Math.round((j.beauftragt / j.umsatz) * 100)) : 0;
|
||||
return `<div class="start-jahresplan"><a href="#jahresplanung"><b>Jahresplan ${j.jahr}:</b> noch <b>${ganz(j.offen)}</b> Umsatz zu verkaufen</a>
|
||||
<span class="hinweis">Ziel ${ganz(j.umsatz)}, beauftragt ${ganz(j.beauftragt)} (${anteil} %)</span>
|
||||
<span class="jp-balken" role="img" aria-label="${anteil} % beauftragt"><i style="width:${anteil}%"></i></span></div>`;
|
||||
}
|
||||
|
||||
function einsatzHtml(e: Zeile): string {
|
||||
if (!e.zeilen.length && e.ohne.tage.every((t: Zeile[]) => !t.length)) return '<p class="hinweis">In den nächsten zwei Wochen ist nichts eingeplant.</p>';
|
||||
const zeilen = [...e.zeilen, ...(e.ohne.tage.some((t: Zeile[]) => t.length) ? [e.ohne] : [])];
|
||||
@@ -965,7 +976,8 @@ function reiterFuer(s: Sitzung): Reiter[] {
|
||||
["terminplan", "Terminplan", terminplan], ["personal", "Personal", () => personalSeite()], ["stunden", "Stunden", stundenSeite], ["kontakte", "Kontakte", kontakte],
|
||||
["stammdaten", "Stammdaten", () => stammdatenSeite()], ["liquiditaet", "Liquidität", () => liquiditaetSeite()], ["laufende-kosten", "Laufende Kosten", laufendeKosten],
|
||||
];
|
||||
if (rolle === "inhaber") alle.push(["benutzer", "Benutzer", () => benutzerSeite(s)], ["daten", "Daten", daten]);
|
||||
// Jahresplan und BWA (Stufe 5) nur für den Inhaber
|
||||
if (rolle === "inhaber") alle.push(["jahresplanung", "Jahresplanung", () => jahresplanSeite()], ["benutzer", "Benutzer", () => benutzerSeite(s)], ["daten", "Daten", daten]);
|
||||
return alle;
|
||||
}
|
||||
|
||||
@@ -979,6 +991,7 @@ const SYMBOLE: Record<string, string> = {
|
||||
stammdaten: '<rect x="4" y="3" width="16" height="18" rx="1"/><path d="M8 7h8M8 11h8M8 15h5"/>',
|
||||
liquiditaet: '<path d="M3 17l6-6 4 4 8-8"/><path d="M15 7h6v6"/>',
|
||||
"laufende-kosten": '<rect x="3" y="6" width="18" height="13" rx="1"/><path d="M3 10h18M7 15h4"/>',
|
||||
jahresplanung: '<path d="M4 20V10M10 20V4M16 20v-7M22 20H2"/>',
|
||||
benutzer: '<circle cx="9" cy="8" r="3.5"/><path d="M2.5 20c.8-3.6 3.3-5.5 6.5-5.5s5.7 1.9 6.5 5.5"/><circle cx="17" cy="9" r="2.5"/><path d="M16 14.6c2.8.1 4.8 1.9 5.5 5.4"/>',
|
||||
stunden: '<circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/>',
|
||||
urlaub: '<circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/>',
|
||||
|
||||
Reference in New Issue
Block a user