feat: add Отчество field to admin user detail page

- Add middle_name input to the edit form (3-column name grid)
- Save middle_name in the edit handler
- Show role selector for admin role (previously system-only)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mguschin
2026-05-24 17:21:51 +03:00
parent a597639aa7
commit 1d268a6b58
2 changed files with 7 additions and 2 deletions

View File

@@ -296,6 +296,7 @@ async def admin_edit_user(user_id: int, request: Request, db: Session = Depends(
user.first_name = data["first_name"]
user.last_name = data["last_name"]
user.middle_name = data.get("middle_name") or None
if data.get("email"):
user.email = data["email"]
if data.get("phone"):