v1.6.0: Admin-Passwort-Reset, Login per Nachname, Default-PW-Sperre
This commit is contained in:
+10
-1
@@ -12,9 +12,10 @@ interface Props {
|
||||
kuerzel: string;
|
||||
beoId: number;
|
||||
beoName: string;
|
||||
role: string | null;
|
||||
}
|
||||
|
||||
export default function MainClient({ kuerzel, beoId, beoName }: Props) {
|
||||
export default function MainClient({ kuerzel, beoId, beoName, role }: Props) {
|
||||
const [activeKuppel, setActiveKuppel] = useState<Kuppel>('West');
|
||||
const [activeTab, setActiveTab] = useState<'eingabe' | 'liste' | 'statistik'>('eingabe');
|
||||
const [refreshKey, setRefreshKey] = useState(0);
|
||||
@@ -54,6 +55,14 @@ export default function MainClient({ kuerzel, beoId, beoName }: Props) {
|
||||
Logbuch für {activeKuppel}-Kuppel
|
||||
</h1>
|
||||
<div className="flex items-center gap-2 shrink-0">
|
||||
{role?.includes('admin') && (
|
||||
<a
|
||||
href="/admin"
|
||||
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"
|
||||
>
|
||||
Admin
|
||||
</a>
|
||||
)}
|
||||
<button
|
||||
onClick={handleLogout}
|
||||
className="text-xs sm:text-sm px-2 sm:px-3 py-1.5 bg-red-600 hover:bg-red-700 rounded-lg text-white"
|
||||
|
||||
Reference in New Issue
Block a user