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
'select' => ['distinct (folders.id)', 'folders.*'],
'where' => $where,
'data' => $data,
'orderBy' => ['level']
'orderBy' => ['level', 'label']
]);
return $folders;
......
......@@ -687,11 +687,7 @@ class AutoCompleteController
$scopedFolders = FolderController::getScopeFolders(['login' => $GLOBALS['userId']]);
$getScopedFoldersIds = function ($value) {
return $value['id'];
};
$arrScopedFoldersIds = array_map($getScopedFoldersIds, $scopedFolders);
$arrScopedFoldersIds = array_column($scopedFolders, 'id');
$selectedFolders = FolderModel::get([
'where' => ['label ilike ? AND id IN(?)'],
......
......@@ -167,7 +167,7 @@
</span>
</div>
<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>
</td>
</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