Skip to content
Snippets Groups Projects
Commit 40ab9910 authored by Marlène SIMONDANT's avatar Marlène SIMONDANT
Browse files

Update table following refining

parent b5621a55
No related branches found
No related tags found
Loading
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
class="row" class="row"
tabindex="0" tabindex="0"
[ngClass]="{ [ngClass]="{
new: this.orientationService.daysAgo(orientation.createdAt) <= 14 && orientation.status === 'new', new: !isUrgent(orientation) && orientation.status === 'new',
urgent: this.orientationService.daysAgo(orientation.createdAt) > 14 && orientation.status === 'new', urgent: isUrgent(orientation),
}" }"
[attr.aria-label]=" [attr.aria-label]="
'Ouvrir l orientation de ' + orientation.personOriented.name + ' ' + orientation.personOriented.surname 'Ouvrir l orientation de ' + orientation.personOriented.name + ' ' + orientation.personOriented.surname
...@@ -84,9 +84,17 @@ ...@@ -84,9 +84,17 @@
*ngIf="orientation.status" *ngIf="orientation.status"
[label]="this.orientationService.getTagProperty('status', orientation.status, 'label')" [label]="this.orientationService.getTagProperty('status', orientation.status, 'label')"
[size]="'small'" [size]="'small'"
[color]="this.orientationService.getTagProperty('status', orientation.status, 'color')" [color]="
isUrgent(orientation)
? 'orange'
: this.orientationService.getTagProperty('status', orientation.status, 'color')
"
[iconFolder]="'tags'" [iconFolder]="'tags'"
[iconName]="this.orientationService.getTagProperty('status', orientation.status, 'icon')" [iconName]="
isUrgent(orientation)
? 'warning'
: this.orientationService.getTagProperty('status', orientation.status, 'icon')
"
/> />
</div> </div>
<div> <div>
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
} }
} }
&.urgent { &.urgent {
border-color: $red-dark; border-color: $orange;
} }
&:hover { &:hover {
border-color: $grey-1; border-color: $grey-1;
......
...@@ -16,6 +16,13 @@ export class OrientationsTableComponent { ...@@ -16,6 +16,13 @@ export class OrientationsTableComponent {
@Input() orientations: any[]; @Input() orientations: any[];
@Input() from: string; @Input() from: string;
public isUrgent(orientation): boolean {
return (
this.orientationService.daysAgo(orientation.updatedAt) > 14 &&
(orientation.status === 'new' || orientation.status === 'waiting')
);
}
public navigateToDetails(event: Event, orientationId: string): void { public navigateToDetails(event: Event, orientationId: string): void {
event.preventDefault(); event.preventDefault();
this.router.navigate(['/profil/details-orientation', orientationId], { queryParams: { from: this.from } }); this.router.navigate(['/profil/details-orientation', orientationId], { queryParams: { from: this.from } });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment