-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BugReportingRepository will be automatically created for Students (#189)
* BugReport Repo will be automatically created. The BugReporting Phase Repository will be automatically created and setup if it is missing during the initial log-in. Since the users are required to have this repo for the PE. * Streamline Repo Creation Process Repository Initialization works only for the Bug Reporting Phase and only for Students in that phase. (So Tutors/Admins will not have a random repository created in their account). Error messages have been put in place to identify any potential faliures. * Usage of ErrorCode Constant * Lint Fix * Artificial wait time for repo creation * User Permission Requested prior to Repo Creation The app now seeks the user's permission prior to initializing the BugReportingPhase's repository in their account (should it be missing). * Error Message Fix * Method Description Fix
- Loading branch information
Showing
9 changed files
with
187 additions
and
11 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
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
Empty file.
9 changes: 9 additions & 0 deletions
9
src/app/core/services/session-fix-confirmation/session-fix-confirmation.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,9 @@ | ||
<h1 mat-dialog-title>Hi {{ data.user }}</h1> | ||
<div mat-dialog-content> | ||
<p>Do you want CATcher to create a repository named "{{ data.repoName }}"</p> | ||
<p>in your Github Account?</p> | ||
</div> | ||
<div mat-dialog-actions> | ||
<button mat-button mat-raised-button color="warn" [mat-dialog-close]="false" (click)="onNoClick()">No Thanks</button> | ||
<button mat-button mat-raised-button color="primary" [mat-dialog-close]="true" cdkFocusInitial>Ok</button> | ||
</div> |
25 changes: 25 additions & 0 deletions
25
src/app/core/services/session-fix-confirmation/session-fix-confirmation.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 { SessionFixConfirmationComponent } from './session-fix-confirmation.component'; | ||
|
||
describe('SessionFixConfirmationComponent', () => { | ||
let component: SessionFixConfirmationComponent; | ||
let fixture: ComponentFixture<SessionFixConfirmationComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ SessionFixConfirmationComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(SessionFixConfirmationComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
27 changes: 27 additions & 0 deletions
27
src/app/core/services/session-fix-confirmation/session-fix-confirmation.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,27 @@ | ||
import { Component, Inject, OnInit } from '@angular/core'; | ||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; | ||
|
||
export interface RepositoryData { | ||
user: string; | ||
repoName: string; | ||
} | ||
|
||
@Component({ | ||
selector: 'app-session-fix-confirmation', | ||
templateUrl: './session-fix-confirmation.component.html', | ||
styleUrls: ['./session-fix-confirmation.component.css'] | ||
}) | ||
export class SessionFixConfirmationComponent implements OnInit { | ||
|
||
constructor( | ||
public dialogRef: MatDialogRef<SessionFixConfirmationComponent>, | ||
@Inject(MAT_DIALOG_DATA) public data: RepositoryData) {} | ||
|
||
onNoClick(): void { | ||
this.dialogRef.close(); | ||
} | ||
|
||
ngOnInit() { | ||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
src/app/shared/error-toasters/general-message-error/general-message-error.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<p style="display: inline-block; max-width:300px"> {{"Error: " + data.message}} </p> | ||
<p style="display: inline-block; max-width:300px"> {{data.message}} </p> | ||
<button style="float: right; margin-top: 8px;" mat-button | ||
color="accent" | ||
(click)="snackBarRef.dismiss()"> Close </button> |