diff --git a/src/app/profile/dashboard/orientation-details/orientation-details.component.html b/src/app/profile/dashboard/orientation-details/orientation-details.component.html index ddc8dfbb9974c277b61c86a6439dbb0bc02433ce..58b44d464d900abf0f976fd9c84b2013ace2b87d 100644 --- a/src/app/profile/dashboard/orientation-details/orientation-details.component.html +++ b/src/app/profile/dashboard/orientation-details/orientation-details.component.html @@ -54,7 +54,10 @@ <div class="inline"> <app-svg-icon [iconClass]="'icon-20'" [folder]="'tags'" [icon]="'flag'" /> <p class="inline"> - <span class="category-name">Statut et action :</span> + <span class="category-name" + >Statut et <ng-container *ngIf="from === 'todoOrientations'">action</ng-container + ><ng-container *ngIf="from === 'myOrientations'">type</ng-container> :</span + > <span class="tags"> <app-tag-item *ngIf="orientation.status" @@ -97,7 +100,7 @@ <app-svg-icon [iconClass]="'icon-20'" [folder]="'tags'" [icon]="'calendarBlue'" /> <div class="datePickerContainer"> <span class="category-name" id="dateLabel">Date de RDV :</span> - <span class="datePicker"> + <span *ngIf="from === 'todoOrientations'" class="datePicker"> <input type="date" id="date" @@ -107,6 +110,12 @@ (change)="setAppointmentDate($event)" /> </span> + <p *ngIf="from === 'myOrientations'"> + <ng-container *ngIf="orientation.appointmentDate"> + {{ orientation.appointmentDate | date: 'dd/MM/yyyy' }} + </ng-container> + <ng-container *ngIf="!orientation.appointmentDate"> Non renseigné </ng-container> + </p> </div> </div> @@ -262,7 +271,9 @@ </div> <div class="inline"> <app-svg-icon [iconClass]="'icon-20'" [folder]="'tags'" [icon]="'clock'" /> - <p><span class="category-name">Date d'orientation : </span>{{ orientation.createdAt | date }}</p> + <p> + <span class="category-name">Date d'orientation : </span>{{ orientation.createdAt | date: 'dd/MM/yyyy' }} + </p> <p></p> </div> </div> diff --git a/src/app/profile/dashboard/orientation-details/orientation-details.component.ts b/src/app/profile/dashboard/orientation-details/orientation-details.component.ts index 01b2bc456a192d0126da366d98b156852c0ce072..def0180e800f21122861cea459d0f3c37c27aa6f 100644 --- a/src/app/profile/dashboard/orientation-details/orientation-details.component.ts +++ b/src/app/profile/dashboard/orientation-details/orientation-details.component.ts @@ -70,7 +70,6 @@ export class OrientationDetailsComponent implements OnInit { status: this.selectedStatus, action: null, processingComment: sanitizedComment, - modifiedBy: this.userProfile._id, }; // Only add closingDate if orientation is not already closed if (!isClosed) { @@ -88,8 +87,9 @@ export class OrientationDetailsComponent implements OnInit { } public acknowledgeNewOrientation(): void { - if (this.orientation.status === 'new') { - this.patchOrientation({ status: 'waiting', action: 'defineAppointment', modifiedBy: this.userProfile._id }); + console.log(this.from); + if (this.orientation.status === 'new' && this.from === 'todoOrientations') { + this.patchOrientation({ status: 'waiting', action: 'defineAppointment' }); } } @@ -97,7 +97,7 @@ export class OrientationDetailsComponent implements OnInit { const target = event.target as HTMLInputElement; const date = new Date(target.value); if (!isNaN(date.getTime())) { - this.patchOrientation({ appointmentDate: date, modifiedBy: this.userProfile._id }); + this.patchOrientation({ appointmentDate: date }); } }