diff --git a/src/app/notes/notes.component.html b/src/app/notes/notes.component.html index ef8c786..8fb8563 100644 --- a/src/app/notes/notes.component.html +++ b/src/app/notes/notes.component.html @@ -21,20 +21,20 @@ - + - Collaborateur + Collaborateur {{ row.collaborateur }} - Titre + Titre {{ row.titre }} - Dernière mise à jour + Dernière mise à jour {{ row.dateMiseAJour | date : 'dd/MM/yyyy à hh:mm'}} diff --git a/src/app/notes/notes.component.ts b/src/app/notes/notes.component.ts index 9c32ada..d7d459c 100644 --- a/src/app/notes/notes.component.ts +++ b/src/app/notes/notes.component.ts @@ -14,13 +14,13 @@ export class NotesComponent implements OnInit { displayedColumns : string[] = ["collaborateur", "titre", "datemiseajour"]; chargement: boolean = true; - asc: boolean = true; + asc: boolean = false; numPage: number = 1; parPage: number = 15; - tri: string = ""; + tri: string = "datemiseajour"; search: string = ""; @@ -82,6 +82,19 @@ export class NotesComponent implements OnInit { this.updateDataSource(); } + triTableau(e) { + this.tri = e.active; + switch(e.direction) { + case "asc": + this.asc = true; + break; + case "desc": + this.asc = false; + break; + } + this.updateDataSource(); + } + ngOnDestroy() { if(this.notesSubscriber != undefined) {