From 27f1e797d584636726dbc3417d919ab44d293458 Mon Sep 17 00:00:00 2001
From: Alex ORLUC <alex.orluc@maarch.org>
Date: Fri, 26 Jul 2019 10:06:42 +0200
Subject: [PATCH] FEAT #11296 TIME 0:10 link countRessources

---
 src/frontend/app/folder/folder-tree.component.html | 4 ++--
 src/frontend/app/folder/folder-tree.component.scss | 2 +-
 src/frontend/app/folder/folder-tree.component.ts   | 8 ++++----
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/frontend/app/folder/folder-tree.component.html b/src/frontend/app/folder/folder-tree.component.html
index 3d073b208f5..b093393c8ef 100644
--- a/src/frontend/app/folder/folder-tree.component.html
+++ b/src/frontend/app/folder/folder-tree.component.html
@@ -17,7 +17,7 @@
                     [disabled]="!node.showAction">
                     <mat-icon *ngIf="node.showAction" class="folderAction fa fa-ellipsis-v"></mat-icon>
                     <span *ngIf="!node.showAction">
-                        {{node.countRes}}
+                        {{node.countResources}}
                     </span>
                 </button>
                 <mat-menu #menu="matMenu">
@@ -55,7 +55,7 @@
                 <button mat-icon-button [matMenuTriggerFor]="menu" (click)="$event.stopPropagation();" [disabled]="!node.showAction">
                     <mat-icon *ngIf="node.showAction" class="folderAction fa fa-ellipsis-v"></mat-icon>
                     <span *ngIf="!node.showAction">
-                        {{node.countRes}}
+                        {{node.countResources}}
                     </span>
                 </button>
                 <mat-menu #menu="matMenu">
diff --git a/src/frontend/app/folder/folder-tree.component.scss b/src/frontend/app/folder/folder-tree.component.scss
index 852ef3b3eef..6bb870f9bed 100644
--- a/src/frontend/app/folder/folder-tree.component.scss
+++ b/src/frontend/app/folder/folder-tree.component.scss
@@ -75,7 +75,7 @@ form {
 }
 
 .drag {
-    color: $secondary;
+    color: $secondary !important;
 }
 
 .more {
diff --git a/src/frontend/app/folder/folder-tree.component.ts b/src/frontend/app/folder/folder-tree.component.ts
index b9461d25fb3..8af86178c88 100644
--- a/src/frontend/app/folder/folder-tree.component.ts
+++ b/src/frontend/app/folder/folder-tree.component.ts
@@ -20,7 +20,7 @@ export class ItemNode {
     label: string;
     parent_id: number;
     public: boolean;
-    countRes: number;
+    countResources: number;
 }
 
 /** Flat to-do item node with expandable and level information */
@@ -28,7 +28,7 @@ export class ItemFlatNode {
     id: number;
     label: string;
     parent_id: number;
-    countRes: number;
+    countResources: number;
     level: number;
     public: boolean;
     expandable: boolean;
@@ -82,7 +82,7 @@ export class FolderTreeComponent implements OnInit {
             ? existingNode
             : new ItemFlatNode();
         flatNode.label = node.label;
-        flatNode.countRes = node.countRes;
+        flatNode.countResources = node.countResources;
         flatNode.public = node.public;
         flatNode.parent_id = node.parent_id;
         flatNode.id = node.id;
@@ -327,7 +327,7 @@ export class FolderTreeComponent implements OnInit {
             filter((data: string) => data === 'ok'),
             //exhaustMap(() => this.http.post("../../rest/folders/" + node.id)),
             tap(() => {     
-                node.countRes = node.countRes + 1;
+                node.countResources = node.countResources + 1;
             }),
             tap(() => this.notify.success('Courrier classé')),
             finalize(() => node.drag = false),
-- 
GitLab