Skip to content

Commit

Permalink
Merge pull request #351 from mild-blue/better-nav
Browse files Browse the repository at this point in the history
Add search again button to success dialog
  • Loading branch information
tomaskourim authored Jul 15, 2021
2 parents 2dd7bfa + f530499 commit d8c845d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class VaccinationRouteTest : ServerTestBase() {

@Suppress("LongMethod") // This is test, it is ok here
@Test
@Suppress("LongMethod")
fun `test vaccination flow`() = withTestApplication {
// verify that only authorized users can access vaccination data
handleRequest(HttpMethod.Get, "${Routes.vaccination}?id=${patient1.id}").run {
Expand Down Expand Up @@ -165,7 +164,7 @@ class VaccinationRouteTest : ServerTestBase() {
}.run {
expectStatus(HttpStatusCode.OK)
val output = receive<VaccinationDetailDtoOut>()
assertEquals(vaccinationId, output.vaccinationId)
assertEquals(vaccinationFirstDoseId, output.vaccinationId)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ <h3>{{ data.message }}</h3>
</div>
</div>
<mat-dialog-actions class="buttons">
<button mat-button mat-dialog-close (click)="searchPatient()">Vyhledat dalšího pacienta</button>
<button mat-button mat-dialog-close>OK</button>
</mat-dialog-actions>
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Component, Inject } from '@angular/core';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { Router } from '@angular/router';

@Component({
selector: 'app-dialog',
Expand All @@ -8,6 +9,11 @@ import { MAT_DIALOG_DATA } from '@angular/material/dialog';
})
export class SuccessDialogComponent {

constructor(@Inject(MAT_DIALOG_DATA) public data: { message: string; }) {
constructor(@Inject(MAT_DIALOG_DATA) public data: { message: string; },
private _router: Router) {
}

public searchPatient(): void {
this._router.navigate(['admin']);
}
}

0 comments on commit d8c845d

Please sign in to comment.