From b100f76c387823731c7fbf7ea8c3a0cd6f583f80 Mon Sep 17 00:00:00 2001 From: Gree44 Date: Fri, 24 Jul 2026 23:41:09 +0200 Subject: [PATCH] =?UTF-8?q?Feat=20#179:=2036=20Monate=20(3=20Jahre)=20Lauf?= =?UTF-8?q?zeit=20im=20Wizard=20+=20Verl=C3=A4ngern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ergänzt die 36-Monats-Option (3 Jahre, Dauer des Studiums) überall dort, wo bisher bei 24 Monaten / "2 Jahre" Schluss war. Gegenstück zum Backend-PR (ALLOWED_RUNTIME_MONTHS um 36 erweitert) — ohne beide Seiten würde der extend/create-Call mit 422 abgelehnt. - src/api/deployments.ts: RuntimeMonths-Typ um | 36 erweitert. - DeploymentWizard.tsx: SelectItem value="36" (3 Jahre) nach 24 ergänzt; runtimeLabels-Map um "36": "3 Jahre" erweitert. - DeploymentDetails.tsx: beide Runtime-Arrays und die Verlängern-Button-Liste um 36 ergänzt; maxExtension 24 -> 36; Dialog-Text "Maximal 24 Monate" -> "Maximal 36 Monate". - DeploymentDetailsPage.tsx: ALLOWED-Snap-Array (Prefill für Redeploy-Wizard) um 36 erweitert, damit ein 36-Monats-Deployment nicht faelschlich auf 24 gerundet wird. Verifiziert mit npm run build (grün). --- src/api/deployments.ts | 2 +- src/pages/DeploymentDetails.tsx | 10 +++++----- src/pages/DeploymentDetailsPage.tsx | 2 +- src/pages/DeploymentWizard.tsx | 2 ++ 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/api/deployments.ts b/src/api/deployments.ts index f01cc8e..a8bd90b 100644 --- a/src/api/deployments.ts +++ b/src/api/deployments.ts @@ -125,7 +125,7 @@ export type DeploymentLogDto = { // Allowed deployment runtimes in months. Must mirror the backend's // ALLOWED_RUNTIME_MONTHS — wizard can show it without the user reseating the field. - const ALLOWED: Array<1 | 3 | 4 | 6 | 12 | 24> = [1, 3, 4, 6, 12, 24]; + const ALLOWED: Array<1 | 3 | 4 | 6 | 12 | 24 | 36> = [1, 3, 4, 6, 12, 24, 36]; let runtimeMonths: number | undefined; if (raw.expires_at && raw.created_at) { const createdMs = new Date(raw.created_at).getTime(); diff --git a/src/pages/DeploymentWizard.tsx b/src/pages/DeploymentWizard.tsx index 1deb65c..5b2b6ee 100644 --- a/src/pages/DeploymentWizard.tsx +++ b/src/pages/DeploymentWizard.tsx @@ -1243,6 +1243,7 @@ export function DeploymentWizard({ 6 Monate 1 Jahr 2 Jahre + 3 Jahre

@@ -1519,6 +1520,7 @@ export function DeploymentWizard({ "6": "6 Monate", "12": "1 Jahr", "24": "2 Jahre", + "36": "3 Jahre", }; return (