From 5327f3125e3f684a63e4b353dd74ec6c86b7d629 Mon Sep 17 00:00:00 2001 From: Pierre Ecarlat <pecarlat@grandlyon.com> Date: Tue, 20 Feb 2024 14:30:59 +0000 Subject: [PATCH] feat(orientation): Remove the structure buttons when in orientation --- src/app/structure-list/components/card/card.component.ts | 1 + .../structure-details/structure-details.component.html | 2 +- .../components/structure-details/structure-details.component.ts | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/structure-list/components/card/card.component.ts b/src/app/structure-list/components/card/card.component.ts index 14f0f98c7..3cbbb4004 100644 --- a/src/app/structure-list/components/card/card.component.ts +++ b/src/app/structure-list/components/card/card.component.ts @@ -72,6 +72,7 @@ export class CardComponent implements OnInit { id: this.structure._id, ...(queryString && { search: queryString }), }, + state: { isOrientation: this.isOrientation }, }); } else { this.selectedStructure.emit(this.structure); diff --git a/src/app/structure-list/components/structure-details/structure-details.component.html b/src/app/structure-list/components/structure-details/structure-details.component.html index 5eafe1494..64c6c3dab 100644 --- a/src/app/structure-list/components/structure-details/structure-details.component.html +++ b/src/app/structure-list/components/structure-details/structure-details.component.html @@ -24,7 +24,7 @@ <app-svg-icon [folder]="'ico'" [icon]="'cross'" [iconColor]="'grey-1'" (click)="close()" /> </section> - <section class="actions hide-on-print"> + <section *ngIf="showButtons" class="actions hide-on-print"> <div *ngIf="structure.hasUserWithAppointmentDN" class="clickableDiv" diff --git a/src/app/structure-list/components/structure-details/structure-details.component.ts b/src/app/structure-list/components/structure-details/structure-details.component.ts index be4840a54..e0bee71ff 100644 --- a/src/app/structure-list/components/structure-details/structure-details.component.ts +++ b/src/app/structure-list/components/structure-details/structure-details.component.ts @@ -57,6 +57,7 @@ export class StructureDetailsComponent implements OnInit { public structureAdmins: Owner[] = []; public membersWithJobWithPO: Owner[] = []; public fullScreen = false; + public showButtons = true; public Equipment = Equipment; public FreeWorkshop = FreeWorkshop; @@ -96,6 +97,7 @@ export class StructureDetailsComponent implements OnInit { } else if (!this.printMode) { this.structure = null; } + this.showButtons = !history.state.isOrientation; }); this.route.data.subscribe((data) => { if (data.fullScreen) { -- GitLab