parent
2f62e3bbf3
commit
e3896087fc
@ -0,0 +1,18 @@ |
|||||||
|
<app-nav-menu></app-nav-menu> |
||||||
|
|
||||||
|
<ng-container *ngIf="note == undefined"> |
||||||
|
<mat-spinner></mat-spinner> |
||||||
|
</ng-container> |
||||||
|
<ng-container *ngIf="note != undefined"> |
||||||
|
<p>Collaborateur : {{ note.collaborateur.nom }} {{ note.collaborateur.prenom }} <button mat-raised-button [routerLink]="['/collaborateurs', note.collaborateur.id]">Voir les détails</button></p> |
||||||
|
<p>Créé le {{ note.dateCreation | date : 'dd/MM/yyyy à hh:mm'}}</p> |
||||||
|
<p>Dernère mise à jour le {{ note.dateMiseAjour | date : 'dd/MM/yyyy à hh:mm'}}</p> |
||||||
|
|
||||||
|
<h2>Titre</h2> |
||||||
|
<div> |
||||||
|
<mat-form-field appearance="fill"> |
||||||
|
<mat-label>Contenu de la note</mat-label> |
||||||
|
<textarea matInput disabled >{{note.texte}}</textarea> |
||||||
|
</mat-form-field> |
||||||
|
</div> |
||||||
|
</ng-container> |
@ -0,0 +1,28 @@ |
|||||||
|
import { Component, OnInit } from "@angular/core"; |
||||||
|
import { ActivatedRoute } from "@angular/router"; |
||||||
|
import { DetailsNoteDTO, NotesService } from "@shared/api-swagger"; |
||||||
|
import { Subscription } from "rxjs"; |
||||||
|
|
||||||
|
|
||||||
|
@Component({ |
||||||
|
selector: "app-details-note", |
||||||
|
templateUrl: "./details-note.component.html" |
||||||
|
}) |
||||||
|
export class DetailsNoteComponent implements OnInit{ |
||||||
|
|
||||||
|
note: DetailsNoteDTO; |
||||||
|
|
||||||
|
noteSubscription: Subscription; |
||||||
|
|
||||||
|
constructor(private noteService: NotesService, private activatedRoute: ActivatedRoute) {} |
||||||
|
|
||||||
|
ngOnInit() { |
||||||
|
const id: any = this.activatedRoute.snapshot.paramMap.get("id"); |
||||||
|
if(id != undefined) { |
||||||
|
this.noteSubscription = this.noteService.getNoteById(id).subscribe( |
||||||
|
note => this.note = note, |
||||||
|
err => console.log(err) |
||||||
|
) |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue