Skip to content

Commit

Permalink
Merge pull request #1332 from DSD-DBS/common-projects
Browse files Browse the repository at this point in the history
fix: Add loading case for "Common projects"
  • Loading branch information
MoritzWeber0 authored Feb 9, 2024
2 parents 97604b5 + c22dec4 commit 020dc17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
3 changes: 2 additions & 1 deletion backend/capellacollab/users/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def get_user(
raise fastapi.HTTPException(
status_code=status.HTTP_403_FORBIDDEN,
detail={
"reason": "You have to have at least one project in common to get this information.",
"err_code": "NO_PROJECTS_IN_COMMON",
"reason": "You need at least one project in common to access the user profile of another user.",
},
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ <h2 class="text-xl font-medium">User information</h2>
<h3>Common Projects</h3>
<mat-divider></mat-divider>
<div class="grid grid-cols-2 gap-4 md:grid-cols-4">
<ng-container
*ngIf="(commonProjects$ | async)?.length; else elseBlock"
>
@if ((commonProjects$ | async) === undefined) {
<span>Loading...</span>
} @else if ((commonProjects$ | async)?.length !== 0) {
<div
*ngFor="let project of commonProjects$ | async"
class="collab-card !ml-0 cursor-pointer"
Expand All @@ -122,10 +122,9 @@ <h3>Common Projects</h3>
}
</div>
</div>
</ng-container>
<ng-template #elseBlock class="col-span-2"
><br />You do not have any common projects.</ng-template
>
} @else {
You do not have any common projects.
}
</div>
</div>
</div>
Expand Down

0 comments on commit 020dc17

Please sign in to comment.