diff --git a/src/app/profile/dashboard/orientations-table/orientations-table.component.html b/src/app/profile/dashboard/orientations-table/orientations-table.component.html index f1c6a7ee62dbbb35cb3b782f18d0ebc688f0c9ed..06303da6a76fea15f411a29e7bb35d7b3fe393bd 100644 --- a/src/app/profile/dashboard/orientations-table/orientations-table.component.html +++ b/src/app/profile/dashboard/orientations-table/orientations-table.component.html @@ -14,7 +14,7 @@ class="row" tabindex="0" [ngClass]="{ - new: !isUrgent(orientation) && orientation.status === 'new', + new: isNew(orientation), urgent: isUrgent(orientation), }" [attr.aria-label]=" diff --git a/src/app/profile/dashboard/orientations-table/orientations-table.component.ts b/src/app/profile/dashboard/orientations-table/orientations-table.component.ts index b1fd7ac82d91a331ff9d1fd8f8e54055b848b40c..969d3b62abaf34be94483fb284fc9cf3dacb823f 100644 --- a/src/app/profile/dashboard/orientations-table/orientations-table.component.ts +++ b/src/app/profile/dashboard/orientations-table/orientations-table.component.ts @@ -20,10 +20,15 @@ export class OrientationsTableComponent { public isUrgent(orientation): boolean { return ( this.orientationService.daysAgo(orientation.updatedAt) > 14 && + this.from !== 'myOrientations' && (orientation.status === 'new' || orientation.status === 'waiting') ); } + public isNew(orientation): boolean { + return !this.isUrgent(orientation) && orientation.status === 'new' && this.from !== 'myOrientations'; + } + public navigateToDetails(event: Event, orientationId: string): void { event.preventDefault(); this.router.navigate(['/profil/details-orientation', orientationId], { queryParams: { from: this.from } });