This repository has been archived by the owner on Apr 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/611-Profile-Image-Resizing
- Loading branch information
Showing
28 changed files
with
219 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...Frontend/src/app/shared/components/user-profile-dialog/user-profile-dialog.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div class="user-profile-dialog-wrapper"> | ||
<div class="profile" *ngIf="user"> | ||
<span class="user-icon" user-image [user-image]="user" [size]="50"></span> | ||
<h2 class="name"> | ||
<span>{{user.profile.firstName}} {{user.profile.lastName}}</span> | ||
</h2> | ||
<div class="user-data"> | ||
<div><strong>E-Mail: </strong><a href="mailto:{{user.email}}">{{user.email}}</a></div> | ||
<div *ngIf="canSeeUid()"> | ||
<strong>Matrikelnummer: </strong>{{user.uid}} | ||
</div> | ||
</div> | ||
</div> | ||
<button mat-raised-button color="primary" (click)="dialogRef.close(true)">CLOSE</button> | ||
</div> |
24 changes: 24 additions & 0 deletions
24
...Frontend/src/app/shared/components/user-profile-dialog/user-profile-dialog.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.user-profile-dialog-wrapper{ | ||
text-align: center; | ||
} | ||
|
||
.profile { | ||
|
||
.user-icon { | ||
display: block; | ||
width: 7rem; | ||
height: 7rem; | ||
background-size: cover; | ||
margin: auto; | ||
} | ||
|
||
.name { | ||
margin-top: 1rem; | ||
margin-bottom: 1.5rem; | ||
} | ||
|
||
.user-data { | ||
text-align: left; | ||
margin-bottom: 1.5rem; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...ntend/src/app/shared/components/user-profile-dialog/user-profile-dialog.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import {async, ComponentFixture, TestBed} from '@angular/core/testing'; | ||
|
||
import {UserProfileDialog} from './user-profile-dialog.component'; | ||
|
||
describe('UserProfileDialog', () => { | ||
let component: UserProfileDialog; | ||
let fixture: ComponentFixture<UserProfileDialog>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [UserProfileDialog] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(UserProfileDialog); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
22 changes: 22 additions & 0 deletions
22
...ebFrontend/src/app/shared/components/user-profile-dialog/user-profile-dialog.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import {Component, Input} from '@angular/core'; | ||
import {MatDialogRef} from '@angular/material'; | ||
import {User} from '../../../models/User'; | ||
import {UserService} from '../../services/user.service'; | ||
|
||
@Component({ | ||
selector: 'app-user-profile-dialog', | ||
templateUrl: './user-profile-dialog.component.html', | ||
styleUrls: ['./user-profile-dialog.component.scss'] | ||
}) | ||
export class UserProfileDialog { | ||
|
||
@Input() user: User; | ||
|
||
constructor(public dialogRef: MatDialogRef<UserProfileDialog>, | ||
public userService: UserService) { | ||
} | ||
|
||
canSeeUid() { | ||
return (this.userService.isAdmin() || this.userService.isTeacher()) && this.user.uid; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.