Skip to content
Snippets Groups Projects
Commit dae86e63 authored by Fadil's avatar Fadil Committed by Delphine
Browse files

[TECH] Add application sorting on new portal design

parent 83987c6e
No related branches found
No related tags found
1 merge request!1Feature/design/1
@import '~ui-frontend-common/sass/variables/colors'; @import '~ui-frontend-common/sass/variables/colors';
.content {
margin-bottom: 5rem;
}
.category { .category {
margin: 0.5rem auto; margin: 0.5rem auto;
} }
......
...@@ -53,11 +53,18 @@ export class ApplicationsListComponent { ...@@ -53,11 +53,18 @@ export class ApplicationsListComponent {
categ.forEach((category: Category) => { categ.forEach((category: Category) => {
this.appMap.set(category, []); this.appMap.set(category, []);
// Fill categories
this.applications.forEach((application: Application) => { this.applications.forEach((application: Application) => {
if (application.category === category.identifier) { if (application.category === category.identifier) {
this.appMap.get(category).push(application); this.appMap.get(category).push(application);
} }
}); });
// Sort apps inside categories
this.appMap.get(category).sort((a, b) => {
return a.position < b.position ? -1 : 1;
});
}); });
} }
......
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