Skip to content
Snippets Groups Projects
Commit 02d90659 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #13271 TIME 0:05 fix sort

parent 9f13d472
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="bg-head-title-label"> <div class="bg-head-title-label">
<header-left></header-left> <header-left></header-left>
</div> </div>
<div class="bg-head-title-tool" stepNumber="1" joyrideStep="firstStep" title="demoTour" text="Hi, Welcome to demo tour"> <div class="bg-head-title-tool" stepNumber="1" joyrideStep="firstStep" title="demoTour">
<header-right></header-right> <header-right></header-right>
</div> </div>
</div> </div>
...@@ -30,11 +30,13 @@ ...@@ -30,11 +30,13 @@
</div> </div>
<mat-divider></mat-divider> <mat-divider></mat-divider>
<mat-form-field style="padding:10px;font-size: 10px;width: 250px !important;"> <mat-form-field style="padding:10px;font-size: 10px;width: 250px !important;">
<input matInput #searchServiceInput [formControl]="searchService" [placeholder]="this.translate.instant('lang.filterBy')"> <input matInput #searchServiceInput [formControl]="searchService"
[placeholder]="this.translate.instant('lang.filterBy')">
</mat-form-field> </mat-form-field>
<div <div
style="margin: 20px;display: grid;grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));gap: 20px;padding:20px;padding-top:0px;margin-top:0px;"> style="margin: 20px;display: grid;grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));gap: 20px;padding:20px;padding-top:0px;margin-top:0px;">
<button [joyrideStep]="administration.id" mat-button *ngFor="let administration of filteredAdministrations | async | sortBy : 'label'" <button [joyrideStep]="administration.id" mat-button
*ngFor="let administration of filteredAdministrations | async | sortBy : 'label'"
[title]="administration.comment | translate" style="font-size:20px;height:80px;" [title]="administration.comment | translate" style="font-size:20px;height:80px;"
(click)="goToSpecifiedAdministration(administration)"> (click)="goToSpecifiedAdministration(administration)">
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
...@@ -42,7 +44,7 @@ ...@@ -42,7 +44,7 @@
<i class="avatarCount2 {{administration.style}}"></i> <i class="avatarCount2 {{administration.style}}"></i>
</span> </span>
<span class="countLabel" style="white-space: initial;text-align: left;"> <span class="countLabel" style="white-space: initial;text-align: left;">
{{administration.label | translate}} {{administration.label}}
</span> </span>
</div> </div>
</button> </button>
......
...@@ -8,7 +8,7 @@ import { AppService } from '@service/app.service'; ...@@ -8,7 +8,7 @@ import { AppService } from '@service/app.service';
import { PrivilegeService } from '@service/privileges.service'; import { PrivilegeService } from '@service/privileges.service';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import { FormControl } from '@angular/forms'; import { FormControl } from '@angular/forms';
import { startWith, map, tap, catchError, exhaustMap } from 'rxjs/operators'; import { startWith, map, tap, catchError } from 'rxjs/operators';
import { LatinisePipe } from 'ngx-pipes'; import { LatinisePipe } from 'ngx-pipes';
import { NotificationService } from '@service/notification/notification.service'; import { NotificationService } from '@service/notification/notification.service';
import { FunctionsService } from '@service/functions.service'; import { FunctionsService } from '@service/functions.service';
...@@ -20,7 +20,6 @@ import { FeatureTourService } from '@service/featureTour.service'; ...@@ -20,7 +20,6 @@ import { FeatureTourService } from '@service/featureTour.service';
}) })
export class AdministrationComponent implements OnInit, AfterViewInit { export class AdministrationComponent implements OnInit, AfterViewInit {
loading: boolean = false; loading: boolean = false;
shortcutsAdmin: any[] = []; shortcutsAdmin: any[] = [];
...@@ -61,7 +60,12 @@ export class AdministrationComponent implements OnInit, AfterViewInit { ...@@ -61,7 +60,12 @@ export class AdministrationComponent implements OnInit, AfterViewInit {
this.supervisionServices = this.privilegeService.getCurrentUserAdministrationsByUnit('supervision'); this.supervisionServices = this.privilegeService.getCurrentUserAdministrationsByUnit('supervision');
this.administrations = this.organisationServices.concat(this.productionServices).concat(this.classementServices).concat(this.supervisionServices); this.administrations = this.organisationServices.concat(this.productionServices).concat(this.classementServices).concat(this.supervisionServices);
this.administrations = this.administrations.map((admin: any) => {
return {
...admin,
label : this.translate.instant(admin.label)
};
});
this.shortcutsAdmin = this.administrations.filter(admin => ['admin_users', 'admin_groups', 'manage_entities'].indexOf(admin.id) > -1).map(admin => { this.shortcutsAdmin = this.administrations.filter(admin => ['admin_users', 'admin_groups', 'manage_entities'].indexOf(admin.id) > -1).map(admin => {
return { return {
...admin, ...admin,
......
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