forked from doubtfire-lms/doubtfire-deploy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cbc157a
commit 9fc9e62
Showing
5 changed files
with
57 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<mat-chip-list *ngIf="project" #chipList aria-label="user badge" (click)="goToStudent()"> | ||
<mat-chip fxLayout="row" style="padding-left: -0px"> | ||
<user-icon size="32" [user]="project.student" style="margin-right: 10px"></user-icon> | ||
<span>{{ project.student.name }}</span> | ||
</mat-chip> | ||
<mat-chip> | ||
<span>{{ project.targetGradeAcronym }}</span> | ||
</mat-chip> | ||
</mat-chip-list> |
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 { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { UserBadgeComponent } from './user-badge.component'; | ||
|
||
describe('UserBadgeComponent', () => { | ||
let component: UserBadgeComponent; | ||
let fixture: ComponentFixture<UserBadgeComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [UserBadgeComponent], | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(UserBadgeComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
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 { UIRouter } from '@uirouter/angular'; | ||
import { Project, ProjectService } from 'src/app/api/models/doubtfire-model'; | ||
import { UserService } from 'src/app/api/services/user.service'; | ||
|
||
@Component({ | ||
selector: 'f-user-badge', | ||
templateUrl: './user-badge.component.html', | ||
styleUrls: ['./user-badge.component.scss'], | ||
}) | ||
export class UserBadgeComponent { | ||
constructor(private userService: UserService, private router: UIRouter, private projectService: ProjectService) {} | ||
@Input() project: Project; | ||
|
||
goToStudent(): void { | ||
this.router.stateService.go('projects/dashboard', { | ||
projectId: this.project.id, | ||
tutor: true, | ||
taskAbbr: '', | ||
}); | ||
} | ||
} |
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