Server backup 2026-11-07 of uncommitted work in projects/pharma-web-celtic
Snapshot of the working tree on srv1071960 (branch main), taken during server cleanup. .env files, node_modules, builds, logs and media were excluded.
This commit is contained in:
@@ -24,16 +24,16 @@ router = APIRouter(prefix="/headquarters", tags=["organization"])
|
||||
async def list_headquarters(
|
||||
current_user: User = Depends(get_current_user), db: AsyncSession = Depends(get_db)
|
||||
) -> list[Headquarters]:
|
||||
"""Scoped: an MR sees their own HQ, an AM sees theirs, GM/Admin see all."""
|
||||
"""Scoped: an MR sees their own HQ, an ABM sees theirs, AGM/Admin see all."""
|
||||
return await OrganizationService(db).list_headquarters(current_user)
|
||||
|
||||
|
||||
@router.get("/area-managers", response_model=list[AMHeadquartersRead])
|
||||
async def list_area_manager_mappings(
|
||||
current_user: User = Depends(require_role(Role.ADMIN, Role.GM)),
|
||||
current_user: User = Depends(require_role(Role.ADMIN, Role.AGM)),
|
||||
db: AsyncSession = Depends(get_db),
|
||||
):
|
||||
"""Which Area Manager currently manages which headquarters (one row per pair)."""
|
||||
"""Which Area Business Manager currently manages which headquarters (one row per pair)."""
|
||||
return await OrganizationService(db).list_area_manager_mappings(current_user)
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ async def set_area_manager_headquarters(
|
||||
current_user: User = Depends(require_role(Role.ADMIN)),
|
||||
db: AsyncSession = Depends(get_db),
|
||||
):
|
||||
"""Replace the set of headquarters an Area Manager manages (any number)."""
|
||||
"""Replace the set of headquarters an Area Business Manager manages (any number)."""
|
||||
return await OrganizationService(db).set_area_manager_headquarters(
|
||||
area_manager_user_id,
|
||||
payload.headquarters_ids,
|
||||
|
||||
Reference in New Issue
Block a user