diff --git a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.html b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.html index 6dd168d410653e2a26045161bb8642a423445d6e..9864ec4479a8481b7135de8dc0aa5095f6c6a4e9 100644 --- a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.html +++ b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.html @@ -50,7 +50,8 @@ <mat-icon>{{nestedTreeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}</mat-icon> </button> <span class="pastis-tree-node-name"> - <span class="text text-medium">{{onResolveName(node)}}</span> + <span class="text text-medium" + [ngStyle]="{'color': selectedItem(node) }">{{onResolveName(node)}}</span> <span *ngIf="node.name === 'ArchiveUnit'" style="float: right;" tooltip="Ajouter une UA" diff --git a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.ts b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.ts index e4e6118a149b10e0ed7f86cae7381ab1b1cd5aa4..d4870d9dc8b0153a0ad70bdc2af7ab7d7719b25b 100644 --- a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.ts +++ b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.ts @@ -88,6 +88,7 @@ export class FileTreeComponent { dataChange = new BehaviorSubject<FileNode>(null); rulesChange: string[][] = []; rootMetadataName: string; + selectedItemList: FileNode; @@ -328,6 +329,8 @@ export class FileTreeComponent { } updateMedataTable(node: FileNode) { + console.error(this.selectedItemList); + this.selectedItemList = node; let rulesFromService = this.fileService.tabChildrenRulesChange.getValue() let tabChildrenToInclude = rulesFromService[0]; let tabChildrenToExclude = rulesFromService[1]; @@ -552,5 +555,13 @@ export class FileTreeComponent { this.loggingService.showSuccess('La métadonnée ArchiveUnit a été ajoutée'); } } + selectedItem(node: FileNode){ + if(this.selectedItemList && node){ + if(this.selectedItemList.id == node.id){ + return "var(--vitamui-primary)"; + } + } + return "none"; + } }