Kontrollverantwortung im Frontend anbinden (Karte 01)
Backend: DELETE /kontrollverantwortung/{id} ergänzt (fehlte bisher). Frontend:
neuer Admin-Tab "Kontrollverantwortung" - Objekt + Benutzer/Gruppe zuordnen,
Liste, Entfernen. Reine Sichtbarkeit/Priorisierung, keine Pflichtkontrolle.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CVgbozhYmuEhiEJHffRXCV
This commit is contained in:
@@ -87,3 +87,13 @@ async def erstelle_kontrollverantwortung(
|
||||
db.add(kontrollverantwortung)
|
||||
await db.flush()
|
||||
return kontrollverantwortung
|
||||
|
||||
|
||||
@router.delete("/kontrollverantwortung/{kontrollverantwortung_id}", status_code=status.HTTP_204_NO_CONTENT)
|
||||
async def loesche_kontrollverantwortung(
|
||||
kontrollverantwortung_id: uuid.UUID, db: AsyncSession = Depends(get_db), _=Depends(_verantwortliche)
|
||||
) -> None:
|
||||
kontrollverantwortung = await db.get(Kontrollverantwortung, kontrollverantwortung_id)
|
||||
if kontrollverantwortung is None:
|
||||
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="Kontrollverantwortung nicht gefunden")
|
||||
await db.delete(kontrollverantwortung)
|
||||
|
||||
Reference in New Issue
Block a user