Seitenleiste: direkt ins Projekt-Admin wechseln

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-09-30 11:07:00 +00:00
1 parent b8e4de97c7
commit dddfb02d1d
3 files changed
+33

No files matched your search

+10
View File
@@ -38,3 +38,13 @@ export function updateEmployeeWithLogin(employeeId, payload) {
export function deleteEmployeeWithLogin(employeeId) {
return adminFetch(`/api/admin/employees/${employeeId}`, { method: 'DELETE' })
}
/** Wechsel ins Projekt-Admin ohne zweiten Login: Einmal-Link holen und im selben Tab oeffnen. */
export async function openProjectAdmin() {
try {
const { openUrl } = await adminFetch('/api/admin/switch-link', { method: 'POST', body: {} })
window.location.assign(openUrl)
} catch {
window.location.assign('https://project.webklar.com/login.html')
}
}