From 78e617a52ca6abbce5b39e163ff0191a9c27a8f0 Mon Sep 17 00:00:00 2001 From: Antoine Rey Date: Thu, 30 Mar 2017 18:49:28 +0200 Subject: [PATCH] Improve display of the visit table --- src/app/pets/pet-list/pet-list.component.html | 2 +- src/app/visits/visit-add/visit-add.component.html | 2 +- src/app/visits/visit-list/visit-list.component.html | 7 ++----- src/app/visits/visit-list/visit-list.component.ts | 6 +++--- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/app/pets/pet-list/pet-list.component.html b/src/app/pets/pet-list/pet-list.component.html index d40e329a..2554f880 100644 --- a/src/app/pets/pet-list/pet-list.component.html +++ b/src/app/pets/pet-list/pet-list.component.html @@ -33,7 +33,7 @@ - + diff --git a/src/app/visits/visit-add/visit-add.component.html b/src/app/visits/visit-add/visit-add.component.html index 8fbe6fa5..5ed560bd 100644 --- a/src/app/visits/visit-add/visit-add.component.html +++ b/src/app/visits/visit-add/visit-add.component.html @@ -80,7 +80,7 @@

New Visit

- +
diff --git a/src/app/visits/visit-list/visit-list.component.html b/src/app/visits/visit-list/visit-list.component.html index bc9de9ff..eb3cfc4c 100644 --- a/src/app/visits/visit-list/visit-list.component.html +++ b/src/app/visits/visit-list/visit-list.component.html @@ -21,17 +21,14 @@ Visit Date Description + Actions - + {{visit.date}} {{visit.description}} - - - - diff --git a/src/app/visits/visit-list/visit-list.component.ts b/src/app/visits/visit-list/visit-list.component.ts index 2ae9c1ff..60d25c81 100644 --- a/src/app/visits/visit-list/visit-list.component.ts +++ b/src/app/visits/visit-list/visit-list.component.ts @@ -32,13 +32,13 @@ import {Router} from '@angular/router'; }) export class VisitListComponent implements OnInit { - @Input() visit: Visit; + @Input() visits: Visit[]; response_status: number; delete_success: boolean = false; errorMessage: string; constructor(private router: Router, private visitService: VisitService) { - this.visit = {}; + this.visits = []; } ngOnInit() { @@ -54,7 +54,7 @@ export class VisitListComponent implements OnInit { this.response_status = response; if (this.response_status === 204) { this.delete_success = true; - this.visit = {}; + this.visits = []; } }, error => this.errorMessage = error);