Various UX improvements and bug fixes

- Fix mustChangePassword session flag for users with pw=NULL
- Add PrF (Private Führung) as new ArtFuehrung type
- Split datetime-local into separate date + TimePicker5 (5-min steps, auto-repeat)
- Responsive Beginn/Ende layout: stacked on mobile, inline on desktop
- Sort BEOs alphabetically by Kürzel in selector
- Title shows active kuppel; hide user display in header
- Selected BEOs show Kürzel only (name stays in dropdown)
- Session timeout reduced to 1 hour
- Add CLAUDE.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-29 18:02:47 +02:00
parent 2469715756
commit a0fb6d8089
10 changed files with 189 additions and 44 deletions

View File

@@ -48,14 +48,11 @@ export default function MainClient({ kuerzel, beoId, beoName }: Props) {
{/* Header */}
<div className="flex justify-between items-start sm:items-center mb-4 gap-2">
<h1 className="text-xl sm:text-3xl font-bold leading-tight">
Logbuch<span className="hidden sm:inline"> Sternwarte Welzheim</span>
<h1 className="text-xl sm:text-2xl font-bold leading-tight">
<span className="hidden sm:inline">Sternwarte-Welzheim &nbsp; </span>
Logbuch für {activeKuppel}-Kuppel
</h1>
<div className="flex items-center gap-2 shrink-0">
<span className="text-xs sm:text-sm text-gray-600 hidden sm:inline">
{kuerzel} {beoName}
</span>
<span className="text-xs text-gray-600 sm:hidden">{kuerzel}</span>
<button
onClick={handleLogout}
className="text-xs sm:text-sm px-2 sm:px-3 py-1.5 bg-gray-200 hover:bg-gray-300 rounded-lg text-gray-700"

View File

@@ -21,15 +21,17 @@ export async function login(
return { error: 'Ungültiges Kürzel oder Passwort.' };
}
const mustChange = result.beo.MustChangePassword === 1 || !result.beo.pw;
await createSession({
kuerzel: result.beo.kürzel ?? kuerzel,
beoId: result.beo.id,
beoName: getBeoDisplayName(result.beo),
mustChangePassword: result.beo.MustChangePassword === 1,
mustChangePassword: mustChange,
isAuthenticated: true,
});
if (result.beo.MustChangePassword === 1 || !result.beo.pw) {
if (mustChange) {
redirect('/change-password');
}