Commit 51466ffe authored by Alex ORLUC's avatar Alex ORLUC

FEAT #11641 TIME 1:15 set order folder badges in lists + change array_map to…

FEAT #11641 TIME 1:15 set order folder badges in lists + change array_map to array_coll + fix order tree for parent folder
parent f6997f74
...@@ -630,7 +630,7 @@ class FolderController ...@@ -630,7 +630,7 @@ class FolderController
'select' => ['distinct (folders.id)', 'folders.*'], 'select' => ['distinct (folders.id)', 'folders.*'],
'where' => $where, 'where' => $where,
'data' => $data, 'data' => $data,
'orderBy' => ['level'] 'orderBy' => ['level', 'label']
]); ]);
return $folders; return $folders;
......
...@@ -687,11 +687,7 @@ class AutoCompleteController ...@@ -687,11 +687,7 @@ class AutoCompleteController
$scopedFolders = FolderController::getScopeFolders(['login' => $GLOBALS['userId']]); $scopedFolders = FolderController::getScopeFolders(['login' => $GLOBALS['userId']]);
$getScopedFoldersIds = function ($value) { $arrScopedFoldersIds = array_column($scopedFolders, 'id');
return $value['id'];
};
$arrScopedFoldersIds = array_map($getScopedFoldersIds, $scopedFolders);
$selectedFolders = FolderModel::get([ $selectedFolders = FolderModel::get([
'where' => ['label ilike ? AND id IN(?)'], 'where' => ['label ilike ? AND id IN(?)'],
......
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
</span> </span>
</div> </div>
<div *ngIf="row.folders !== undefined && row.folders.length > 0" class="folder-info"> <div *ngIf="row.folders !== undefined && row.folders.length > 0" class="folder-info">
<span class="badge badge-folder" *ngFor="let folder of row.folders" routerLink="/folders/{{folder.id}}" title="Accéder au dossier : {{folder.label}}"><i class="fa fa-folder"></i> {{folder.label}}</span> <span class="badge badge-folder" *ngFor="let folder of row.folders | sortBy : 'label'" routerLink="/folders/{{folder.id}}" title="Accéder au dossier : {{folder.label}}"><i class="fa fa-folder"></i> {{folder.label}}</span>
</div> </div>
</td> </td>
</ng-container> </ng-container>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment