-
Notifications
You must be signed in to change notification settings - Fork 4
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 issue-1433-can-not-create-peer-grouping
- Loading branch information
Showing
19 changed files
with
186 additions
and
194 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.actions { | ||
margin-top: 8px; | ||
} | ||
|
||
.google-icon { | ||
height: 1.8em; | ||
width: auto; | ||
} | ||
|
||
.unlink { | ||
margin: 8px 0; | ||
} |
24 changes: 24 additions & 0 deletions
24
src/app/common/edit-profile/edit-profile.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,24 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
import { EditProfileComponent } from './edit-profile.component'; | ||
import { MatDialogModule } from '@angular/material/dialog'; | ||
import { MatSnackBarModule } from '@angular/material/snack-bar'; | ||
|
||
describe('EditProfileComponent', () => { | ||
let component: EditProfileComponent; | ||
let fixture: ComponentFixture<EditProfileComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [EditProfileComponent], | ||
imports: [MatDialogModule, MatSnackBarModule] | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(EditProfileComponent); | ||
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,30 @@ | ||
import { Component } from '@angular/core'; | ||
import { MatDialog } from '@angular/material/dialog'; | ||
import { MatSnackBar } from '@angular/material/snack-bar'; | ||
import { UnlinkGoogleAccountConfirmComponent } from '../../modules/shared/unlink-google-account-confirm/unlink-google-account-confirm.component'; | ||
|
||
@Component({ | ||
selector: 'edit-profile', | ||
templateUrl: './edit-profile.component.html', | ||
styleUrls: ['./edit-profile.component.scss'] | ||
}) | ||
export class EditProfileComponent { | ||
changed: boolean = false; | ||
|
||
constructor(public dialog: MatDialog, public snackBar: MatSnackBar) {} | ||
|
||
handleUpdateProfileResponse(response) { | ||
if (response.status === 'success') { | ||
this.changed = false; | ||
this.snackBar.open($localize`Profile updated.`); | ||
} else { | ||
this.snackBar.open($localize`An error occurred. Please try again.`); | ||
} | ||
} | ||
|
||
unlinkGoogleAccount() { | ||
this.dialog.open(UnlinkGoogleAccountConfirmComponent, { | ||
panelClass: 'dialog-sm' | ||
}); | ||
} | ||
} |
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,12 @@ | ||
export const schoolLevels: SchoolLevel[] = [ | ||
{ code: 'ELEMENTARY_SCHOOL', label: $localize`Elementary School` }, | ||
{ code: 'MIDDLE_SCHOOL', label: $localize`Middle School` }, | ||
{ code: 'HIGH_SCHOOL', label: $localize`High School` }, | ||
{ code: 'COLLEGE', label: $localize`College` }, | ||
{ code: 'OTHER', label: $localize`Other` } | ||
]; | ||
|
||
export interface SchoolLevel { | ||
code: string; | ||
label: string; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,16 +21,3 @@ | |
} | ||
} | ||
} | ||
|
||
.actions { | ||
margin-top: 8px; | ||
} | ||
|
||
.google-icon { | ||
height: 1.8em; | ||
width: auto; | ||
} | ||
|
||
.unlink { | ||
margin: 8px 0; | ||
} |
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.