-
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 pull request #61 from skounis/feat/issue-60-upload
feat(download) Scaffold download and submit dialog.
- Loading branch information
Showing
7 changed files
with
98 additions
and
8 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
Empty file.
25 changes: 25 additions & 0 deletions
25
src/components/download-dialog/download-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,25 @@ | ||
<h2 mat-dialog-title>Download and Submit</h2> | ||
<mat-dialog-content class="mat-typography"> | ||
<p>Use this application for navigating through all the available QR Codes. When finish download | ||
the test results and submit the <code>results.json</code> if in the <a href="https://validationcycleportal.t-assets.de/#/login" target="_blank">Validation Portal.</a> | ||
</p> | ||
|
||
<h3>Download</h3> | ||
<p>Your test results are prepared and are ready for download. Please use the button that follows and download the <code>results.json</code>file.</p> | ||
|
||
<h3>Upload to the Validation Portal</h3> | ||
<p>Visit the Validation portal and submit the downloaded <code>results.json</code>. For accessing the portal use the token which related to your country.</p> | ||
<ul> | ||
<li><a href="https://validationcycleportal.t-assets.de/#/login" target="_blank">Validation Portal.</a></li> | ||
</ul> | ||
|
||
<h3>Support</h3> | ||
<p>For help and support please contact ...</p> | ||
|
||
<p style="text-align: center;"><a *ngIf="!!data" mat-raised-button color="primary" title="Download JSON" [href]="data" | ||
download="test-results.json" (click)="clear()" style="width: 60%; margin: auto;">Download</a> | ||
</p> | ||
</mat-dialog-content> | ||
<mat-dialog-actions align="end"> | ||
<button mat-button color="primary" [mat-dialog-close]="true" cdkFocusInitial>Close</button> | ||
</mat-dialog-actions> |
25 changes: 25 additions & 0 deletions
25
src/components/download-dialog/download-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 { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { DownloadDialogComponent } from './download-dialog.component'; | ||
|
||
describe('DownloadDialogComponent', () => { | ||
let component: DownloadDialogComponent; | ||
let fixture: ComponentFixture<DownloadDialogComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ DownloadDialogComponent ] | ||
}) | ||
.compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(DownloadDialogComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
21 changes: 21 additions & 0 deletions
21
src/components/download-dialog/download-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,21 @@ | ||
import { Component, OnInit, Inject } from '@angular/core'; | ||
import {MatDialog, MAT_DIALOG_DATA} from '@angular/material/dialog'; | ||
|
||
@Component({ | ||
selector: 'app-download-dialog', | ||
templateUrl: './download-dialog.component.html', | ||
styleUrls: ['./download-dialog.component.css'] | ||
}) | ||
export class DownloadDialogComponent implements OnInit { | ||
|
||
constructor(@Inject(MAT_DIALOG_DATA) public data: any) { | ||
console.log('Dialog:', data); | ||
} | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
clear() { | ||
|
||
} | ||
} |