Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquesfize authored and Pierre-Narcisi committed Mar 14, 2024
1 parent 0fcd5f5 commit b929fb3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
1 change: 0 additions & 1 deletion frontend/src/app/components/nav-home/nav-home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export class NavHomeComponent implements OnInit, OnDestroy {

// Set the current module name in the navbar
this.onModuleChange();


// Init the sidenav instance in sidebar service
this.sideNavService.setSideNav(this.sidenav);
Expand Down
13 changes: 10 additions & 3 deletions frontend/src/app/components/sidenav-items/sidenav-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,19 @@ export class SideNavService {
return this.currentModule;
}

getHomeItem() : Module {
getHomeItem(): Module {
let abs_path = '/';
if (window.location.pathname) { // for GeoNature URL like https://demo.geonature.fr/geonature/
if (window.location.pathname) {
// for GeoNature URL like https://demo.geonature.fr/geonature/
abs_path = window.location.pathname;
}
return { module_url: abs_path, module_label: 'Accueil', module_picto: 'fa-home', id_module: 1, module_path: "/geonature"};
return {
module_url: abs_path,
module_label: 'Accueil',
module_picto: 'fa-home',
id_module: 1,
module_path: '/geonature',
};
}

toggleSideNav() {
Expand Down
16 changes: 8 additions & 8 deletions frontend/src/app/models/module.model.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export interface Module{
id_module: number;
module_label: string;
module_picto?: string;
module_path:string;
module_doc_url?: string;
module_url?: string;
}
export interface Module {
id_module: number;
module_label: string;
module_picto?: string;
module_path: string;
module_doc_url?: string;
module_url?: string;
}

0 comments on commit b929fb3

Please sign in to comment.