-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refact: modifie le sidemenu pour qu'il puisse inclure des collapsibles (
#310)
- Loading branch information
1 parent
e239b79
commit bab5619
Showing
6 changed files
with
145 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Angular CLI Server" type="js.build_tools.npm"> | ||
<package-json value="$PROJECT_DIR$/frontend-implicaction/package.json" /> | ||
<command value="run" /> | ||
<scripts> | ||
<script value="start" /> | ||
</scripts> | ||
<node-interpreter value="project" /> | ||
<envs /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="RefonteImplicactionApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true"> | ||
<option name="ACTIVE_PROFILES" value="local" /> | ||
<module name="backend-implicaction" /> | ||
<option name="SPRING_BOOT_MAIN_CLASS" value="com.dynonuggets.refonteimplicaction.RefonteImplicactionApplication" /> | ||
<extension name="coverage"> | ||
<pattern> | ||
<option name="PATTERN" value="com.dynonuggets.refonteimplicaction.*" /> | ||
<option name="ENABLED" value="true" /> | ||
</pattern> | ||
</extension> | ||
<method v="2"> | ||
<option name="Make" enabled="true" /> | ||
</method> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 50 additions & 9 deletions
59
frontend-implicaction/src/app/shared/components/sidemenu/sidemenu.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,59 @@ | ||
<ul class="list-group list-group-flush py-2"> | ||
<ng-container *ngFor="let menuItem of menuItems"> | ||
<li class="list-group-item"> | ||
<a | ||
[routerLinkActive]="'active'" | ||
[routerLink]="menuItem.routerLink" | ||
[queryParams]="menuItem.queryParams" | ||
[routerLinkActiveOptions]="menuItem.routerLinkActiveOptions" | ||
> | ||
<li class="list-group-item nav-item"> | ||
<ng-container *ngIf="!menuItem.items; else templateCollapsable"> | ||
<a | ||
role="button" | ||
class="nav-link" | ||
[routerLink]="menuItem.routerLink" | ||
[queryParams]="menuItem.queryParams" | ||
[routerLinkActive]="'active'" | ||
[routerLinkActiveOptions]="menuItem.routerLinkActiveOptions" | ||
> | ||
<span> | ||
<i *ngIf="menuItem.icon" [class]="menuItem.icon"></i> {{menuItem.label}} | ||
</span> | ||
|
||
<span *ngIf="menuItem.badge" class="badge bg-primary rounded-pill me-3">{{menuItem.badge}}</span> | ||
</a> | ||
<span *ngIf="menuItem.badge" class="badge bg-primary rounded-pill me-3">{{menuItem.badge}}</span> | ||
</a> | ||
</ng-container> | ||
|
||
<ng-template #templateCollapsable> | ||
<a | ||
role="button" | ||
class="nav-link cursor-pointer" | ||
(click)="toggleCollapse(menuItem)" | ||
[ngClass]="{'collapsed': !menuItem.expanded, 'expanded active': menuItem.expanded}" | ||
> | ||
<span> | ||
<i *ngIf="menuItem.icon" [class]="menuItem.icon"></i> {{menuItem.label}} | ||
</span> | ||
</a> | ||
|
||
<ul class="ps-5" [ngClass]="{'collapse': !menuItem.expanded}"> | ||
<ng-container *ngFor="let item of menuItem.items"> | ||
<li [ngClass]="{'active': child.isActive}"> | ||
<a | ||
#child="routerLinkActive" | ||
role="button" | ||
class="nav-link" | ||
[routerLink]="item.routerLink" | ||
[queryParams]="item.queryParams" | ||
[routerLinkActive]="'active'" | ||
[routerLinkActiveOptions]="menuItem.routerLinkActiveOptions" | ||
(isActiveChange)="onChildActiveChange(item, menuItem, $event)" | ||
> | ||
<span> | ||
<i *ngIf="item.icon" [class]="item.icon"></i> {{item.label}} | ||
</span> | ||
|
||
<span *ngIf="item.badge" class="badge bg-primary rounded-pill me-3">{{item.badge}}</span> | ||
</a> | ||
</li> | ||
</ng-container> | ||
</ul> | ||
</ng-template> | ||
|
||
</li> | ||
</ng-container> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters