0.31.0: Nextcloud-Zugang als Maske unter Daten (P10)
Some checks failed
Prüfung / tests (push) Has been cancelled
Prüfung / container (push) Has been cancelled

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:
Claude
2026-10-23 06:18:47 +00:00
parent 6ad7936ea8
commit 0bfda30c69
12 changed files with 256 additions and 13 deletions

View File

@@ -36,6 +36,17 @@ export function zielPfad(p: { nummer: string; bezeichnung: string; status: strin
return `${STATUSORDNER[p.status] ?? STATUSORDNER.anfrage}/${ordnerName(p.nummer, p.bezeichnung)}`;
}
/**
* WebDAV-Adresse des Ordners mit „01 Angebot“ … „04 Archiv“. Die Adresse darf die volle WebDAV-Adresse aus den
* Dateien-Einstellungen sein (…/remote.php/dav/files/<benutzer>) oder nur die Serveradresse; dann wird sie ergänzt.
*/
export function webdavBasis(z: { adresse: string; benutzer: string; ordner: string }): string {
let a = z.adresse.trim().replace(/\/+$/, "");
if (!/\/remote\.php\//.test(a)) a = `${a}/remote.php/dav/files/${encodeURIComponent(z.benutzer)}`;
const teile = z.ordner.split(/[\\/]/).filter(Boolean);
return teile.length ? `${a}/${teile.map(encodeURIComponent).join("/")}` : a;
}
const kodiert = (pfad: string) => pfad.split("/").map(encodeURIComponent).join("/");
export class Nextcloud {