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
1 merge request!983feat(dashboard) : create dashboard !
Pipeline #124243 passed
......@@ -13,8 +13,8 @@
class="row"
tabindex="0"
[ngClass]="{
new: this.orientationService.daysAgo(orientation.createdAt) <= 14 && orientation.status === 'new',
urgent: this.orientationService.daysAgo(orientation.createdAt) > 14 && orientation.status === 'new',
new: !isUrgent(orientation) && orientation.status === 'new',
urgent: isUrgent(orientation),
}"
[attr.aria-label]="
'Ouvrir l orientation de ' + orientation.personOriented.name + ' ' + orientation.personOriented.surname
......@@ -84,9 +84,17 @@
*ngIf="orientation.status"
[label]="this.orientationService.getTagProperty('status', orientation.status, 'label')"
[size]="'small'"
[color]="this.orientationService.getTagProperty('status', orientation.status, 'color')"
[color]="
isUrgent(orientation)
? 'orange'
: this.orientationService.getTagProperty('status', orientation.status, 'color')
"
[iconFolder]="'tags'"
[iconName]="this.orientationService.getTagProperty('status', orientation.status, 'icon')"
[iconName]="
isUrgent(orientation)
? 'warning'
: this.orientationService.getTagProperty('status', orientation.status, 'icon')
"
/>
</div>
<div>
......
......@@ -36,7 +36,7 @@
}
}
&.urgent {
border-color: $red-dark;
border-color: $orange;
}
&:hover {
border-color: $grey-1;
......
......@@ -16,6 +16,13 @@ export class OrientationsTableComponent {
@Input() orientations: any[];
@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 {
event.preventDefault();
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.
Finish editing this message first!
Please register or to comment