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

FIX #13268 TIME 1 fix save filter admin

parent 38f082dd
No related branches found
No related tags found
No related merge requests found
......@@ -139,17 +139,18 @@ export class AdministrationService {
public headerService: HeaderService,
public functionsService: FunctionsService,
private localStorage: LocalStorageService,
) {
if (this.localStorage.get(`filtersAdmin_${this.headerService.user.id}`) !== null) {
this.filters = JSON.parse(this.localStorage.get(`filtersAdmin_${this.headerService.user.id}`));
}
}
) { }
setAdminId(adminId: string) {
this.currentAdminId = adminId;
}
setDataSource(adminId: string, data: any, sort: MatSort, paginator: MatPaginator, filterColumns: string[]) {
if (this.localStorage.get(`filtersAdmin_${this.headerService.user.id}`) !== null) {
this.filters = JSON.parse(this.localStorage.get(`filtersAdmin_${this.headerService.user.id}`));
} else {
this.saveDefaultFilter();
}
this.currentAdminId = adminId;
this.searchTerm = new FormControl('');
......@@ -176,10 +177,6 @@ export class AdministrationService {
this.dataSource.paginator = paginator;
this.dataSource.sortingDataAccessor = this.functionsService.listSortingDataAccessor;
if (this.functionsService.empty(this.getFilter())) {
this.saveDefaultFilter();
}
// sort.active = this.getFilter('sort');
// sort.direction = this.getFilter('sortDirection');
paginator.pageIndex = this.getFilter('page');
......
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