From 2305ffbc3621e51b429ec09f9b21b9dfaebb491a Mon Sep 17 00:00:00 2001 From: Bastien DUMONT <bdumont@grandlyon.com> Date: Tue, 8 Nov 2022 10:34:31 +0100 Subject: [PATCH 1/2] redirect to manage members screen --- .../structure-edition-summary.component.html | 16 ++++++++++++++++ .../structure-edition-summary.component.ts | 11 +++++++++++ 2 files changed, 27 insertions(+) diff --git a/src/app/profile/structure-edition-summary/structure-edition-summary.component.html b/src/app/profile/structure-edition-summary/structure-edition-summary.component.html index d55d298d2..b09886095 100644 --- a/src/app/profile/structure-edition-summary/structure-edition-summary.component.html +++ b/src/app/profile/structure-edition-summary/structure-edition-summary.component.html @@ -524,6 +524,22 @@ <p>{{ structure.dataShareConsentDate ? 'Oui' : 'Non' }}</p> </div> </div> + + <div class="section members"> + <div class="sectionHeader"> + <p>Gérer les membres de votre structure</p> + <app-button + [type]="'button'" + [text]="'Modifier'" + [style]="buttonTypeEnum.Secondary" + [extraClass]="'editButton'" + (action)="goToManageMembers()" + ></app-button> + </div> + <div class="content" *ngIf="members"> + <p>{{ members.length }} membre(s)</p> + </div> + </div> </div> <div class="footer"> diff --git a/src/app/profile/structure-edition-summary/structure-edition-summary.component.ts b/src/app/profile/structure-edition-summary/structure-edition-summary.component.ts index 97016fece..c589a4333 100644 --- a/src/app/profile/structure-edition-summary/structure-edition-summary.component.ts +++ b/src/app/profile/structure-edition-summary/structure-edition-summary.component.ts @@ -4,7 +4,9 @@ import { UntypedFormGroup } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; import { DateTime } from 'luxon'; import { structureFormStep } from '../../form/form-view/structure-form/structureFormStep.enum'; +import { Owner } from '../../models/owner.model'; import { Structure } from '../../models/structure.model'; +import { StructureWithOwners } from '../../models/structureWithOwners.model'; import { NotificationService } from '../../services/notification.service'; import { StructureService } from '../../services/structure.service'; import { ButtonType } from '../../shared/components/button/buttonType.enum'; @@ -33,6 +35,7 @@ import { Utils } from '../../utils/utils'; export class StructureEditionSummaryComponent implements OnInit { public structure: Structure; public structureForm: UntypedFormGroup; + public members: Owner[]; public summary: IStructureSummary[] = new formUtils().structureSummary; public structureFormStep = structureFormStep; public buttonTypeEnum = ButtonType; @@ -67,6 +70,10 @@ export class StructureEditionSummaryComponent implements OnInit { const updatedAt = DateTime.fromISO(this.structure.updatedAt); const sixMonthsAgo = DateTime.local().minus({ month: 6 }); if (updatedAt < sixMonthsAgo) this.isUpdateStructure = true; + + this.structureService + .getStructureWithOwners(data.structure._id, null) + .subscribe((result) => (this.members = result.owners)); } }); } @@ -182,4 +189,8 @@ export class StructureEditionSummaryComponent implements OnInit { public getEquipmentsLabelAndValue(equipment: Equipment, number: number): string { return this.utils.getEquipmentsLabelAndValue(equipment, number); } + + public goToManageMembers(): void { + this.router.navigate([`/profile/structure-members-management/${this.structure._id}`]); + } } -- GitLab From 746325cdf0b54cb3d1e4c4df93007cd3a035f125 Mon Sep 17 00:00:00 2001 From: Bastien DUMONT <bdumont@grandlyon.com> Date: Tue, 8 Nov 2022 10:51:21 +0100 Subject: [PATCH 2/2] icons for mobile --- .../structure-edition-summary.component.html | 154 +++++++++++++++--- 1 file changed, 134 insertions(+), 20 deletions(-) diff --git a/src/app/profile/structure-edition-summary/structure-edition-summary.component.html b/src/app/profile/structure-edition-summary/structure-edition-summary.component.html index b09886095..b6a7be0e4 100644 --- a/src/app/profile/structure-edition-summary/structure-edition-summary.component.html +++ b/src/app/profile/structure-edition-summary/structure-edition-summary.component.html @@ -14,12 +14,18 @@ <div class="sectionHeader"> <p>Nom et adresse</p> <app-button - [type]="'button'" + class="hide-on-mobile" [text]="'Modifier'" - [style]="buttonTypeEnum.Secondary" + [style]="buttonTypeEnum.SecondaryWide" [extraClass]="'editButton'" (action)="goToEdit(structureFormStep.structureNameAndAddress)" ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToEdit(structureFormStep.structureNameAndAddress)" + ></app-button> </div> <div class="content"> <p> @@ -35,12 +41,18 @@ <div class="sectionHeader"> <p>Téléphone et email</p> <app-button - [type]="'button'" + class="hide-on-mobile" [text]="'Modifier'" [style]="buttonTypeEnum.Secondary" [extraClass]="'editButton'" (action)="goToEdit(structureFormStep.structureContact)" ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToEdit(structureFormStep.structureContact)" + ></app-button> </div> <div class="content"> <app-missing-information *ngIf="!isFieldValid('contactPhone')"></app-missing-information> @@ -61,12 +73,18 @@ <div class="sectionHeader"> <p>Présentation de la structure</p> <app-button - [type]="'button'" + class="hide-on-mobile" [text]="'Modifier'" [style]="buttonTypeEnum.Secondary" [extraClass]="'editButton'" (action)="goToEdit(structureFormStep.structureDescription)" ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToEdit(structureFormStep.structureDescription)" + ></app-button> </div> <div class="content"> <app-no-information *ngIf="!structure.description"></app-no-information> @@ -78,12 +96,18 @@ <div class="sectionHeader"> <p>Modalité d'accueil</p> <app-button - [type]="'button'" + class="hide-on-mobile" [text]="'Modifier'" [style]="buttonTypeEnum.Secondary" [extraClass]="'editButton'" (action)="goToEdit(structureFormStep.structureAccessModality)" ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToEdit(structureFormStep.structureAccessModality)" + ></app-button> </div> <div class="content"> <app-missing-information *ngIf="!isFieldValid('accessModality', 'categories')"></app-missing-information> @@ -101,12 +125,18 @@ <div class="sectionHeader"> <p>Horaires</p> <app-button - [type]="'button'" + class="hide-on-mobile" [text]="'Modifier'" [style]="buttonTypeEnum.Secondary" [extraClass]="'editButton'" (action)="goToEdit(structureFormStep.structureHours)" ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToEdit(structureFormStep.structureHours)" + ></app-button> </div> <div class="content"> <app-no-information *ngIf="!containsHours()"></app-no-information> @@ -133,12 +163,18 @@ <div class="sectionHeader"> <p>Accessibilité pour les personnes à mobilité réduite</p> <app-button - [type]="'button'" + class="hide-on-mobile" [text]="'Modifier'" [style]="buttonTypeEnum.Secondary" [extraClass]="'editButton'" (action)="goToEdit(structureFormStep.structurePmr)" ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToEdit(structureFormStep.structurePmr)" + ></app-button> </div> <div class="content"> <app-missing-information *ngIf="structure.pmrAccess === null"></app-missing-information> @@ -152,12 +188,18 @@ <div class="sectionHeader"> <p>Présence sur internet</p> <app-button - [type]="'button'" + class="hide-on-mobile" [text]="'Modifier'" [style]="buttonTypeEnum.Secondary" [extraClass]="'editButton'" (action)="goToEdit(structureFormStep.structureWebAndSocialNetwork)" ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToEdit(structureFormStep.structureWebAndSocialNetwork)" + ></app-button> </div> <div class="content"> <app-no-information *ngIf="!hasWebsite() && !hasSocialNetworks()"></app-no-information> @@ -233,12 +275,18 @@ <div class="sectionHeader"> <p>Public admis</p> <app-button - [type]="'button'" + class="hide-on-mobile" [text]="'Modifier'" [style]="buttonTypeEnum.Secondary" [extraClass]="'editButton'" (action)="goToEdit(structureFormStep.structurePublicTarget)" ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToEdit(structureFormStep.structurePublicTarget)" + ></app-button> </div> <div class="content"> <ng-container *ngIf="isFieldValid('age', 'categories') && structure.categoriesDisplay.age"> @@ -292,12 +340,18 @@ <div class="sectionHeader"> <p>Aide au numérique</p> <app-button - [type]="'button'" + class="hide-on-mobile" [text]="'Modifier'" [style]="buttonTypeEnum.Secondary" [extraClass]="'editButton'" (action)="goToEdit(structureFormStep.structureDigitalHelpingAccompaniment)" ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToEdit(structureFormStep.structureDigitalHelpingAccompaniment)" + ></app-button> </div> <div class="content"> <app-no-information *ngIf="!containsDigitalHelp()"></app-no-information> @@ -313,12 +367,18 @@ <div class="sectionHeader"> <p>Autres démarches proposées</p> <app-button - [type]="'button'" + class="hide-on-mobile" [text]="'Modifier'" [style]="buttonTypeEnum.Secondary" [extraClass]="'editButton'" (action)="goToEdit(structureFormStep.structureDigitalHelpingAccompanimentOther)" ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToEdit(structureFormStep.structureDigitalHelpingAccompanimentOther)" + ></app-button> </div> <div class="content"> <app-no-information *ngIf="!structure.otherDescription"></app-no-information> @@ -332,12 +392,18 @@ <div class="sectionHeader"> <p>Formation au numérique proposés</p> <app-button - [type]="'button'" + class="hide-on-mobile" [text]="'Modifier'" [style]="buttonTypeEnum.Secondary" [extraClass]="'editButton'" (action)="goToEdit(structureFormStep.structureTrainingType)" ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToEdit(structureFormStep.structureTrainingType)" + ></app-button> </div> <div class="content"> <app-no-information *ngIf="!containsDigitalLearning()"></app-no-information> @@ -390,12 +456,18 @@ <div class="sectionHeader"> <p>Gratuité des ateliers</p> <app-button - [type]="'button'" + class="hide-on-mobile" [text]="'Modifier'" [style]="buttonTypeEnum.Secondary" [extraClass]="'editButton'" (action)="goToEdit(structureFormStep.structureTrainingPrice)" ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToEdit(structureFormStep.structureTrainingPrice)" + ></app-button> </div> <div class="content"> <app-missing-information *ngIf="!isFieldValid('freeWorkShop')"></app-missing-information> @@ -407,12 +479,18 @@ <div class="sectionHeader"> <p>Wifi</p> <app-button - [type]="'button'" + class="hide-on-mobile" [text]="'Modifier'" [style]="buttonTypeEnum.Secondary" [extraClass]="'editButton'" (action)="goToEdit(structureFormStep.structureWifi)" ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToEdit(structureFormStep.structureWifi)" + ></app-button> </div> <div class="content"> <p> @@ -425,12 +503,18 @@ <div class="sectionHeader"> <p>Matériel mis à disposition</p> <app-button - [type]="'button'" + class="hide-on-mobile" [text]="'Modifier'" [style]="buttonTypeEnum.Secondary" [extraClass]="'editButton'" (action)="goToEdit(structureFormStep.structureEquipments)" ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToEdit(structureFormStep.structureEquipments)" + ></app-button> </div> <div class="content"> <app-no-information *ngIf="!hasEquipments(structure)"></app-no-information> @@ -453,12 +537,18 @@ <div class="sectionHeader"> <p>Labelisations proposées</p> <app-button - [type]="'button'" + class="hide-on-mobile" [text]="'Modifier'" [style]="buttonTypeEnum.Secondary" [extraClass]="'editButton'" (action)="goToEdit(structureFormStep.structureLabels)" ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToEdit(structureFormStep.structureLabels)" + ></app-button> </div> <div class="content"> <app-no-information *ngIf="structure.categories.labelsQualifications.length === 0"></app-no-information> @@ -472,12 +562,18 @@ <div class="sectionHeader"> <p>Autres services proposés</p> <app-button - [type]="'button'" + class="hide-on-mobile" [text]="'Modifier'" [style]="buttonTypeEnum.Secondary" [extraClass]="'editButton'" (action)="goToEdit(structureFormStep.structureOtherServices)" ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToEdit(structureFormStep.structureOtherServices)" + ></app-button> </div> <div class="content"> <app-no-information @@ -496,12 +592,18 @@ <div class="sectionHeader"> <p>Informations spécifiques à la période COVID</p> <app-button - [type]="'button'" + class="hide-on-mobile" [text]="'Modifier'" [style]="buttonTypeEnum.Secondary" [extraClass]="'editButton'" (action)="goToEdit(structureFormStep.structureCovidInfo)" ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToEdit(structureFormStep.structureCovidInfo)" + ></app-button> </div> <div class="content"> <app-no-information *ngIf="!structure.lockdownActivity"></app-no-information> @@ -513,12 +615,18 @@ <div class="sectionHeader"> <p>Partage de données sur data.grandlyon.com</p> <app-button - [type]="'button'" + class="hide-on-mobile" [text]="'Modifier'" [style]="buttonTypeEnum.Secondary" [extraClass]="'editButton'" (action)="goToEdit(structureFormStep.structureConsent)" ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToEdit(structureFormStep.structureConsent)" + ></app-button> </div> <div class="content"> <p>{{ structure.dataShareConsentDate ? 'Oui' : 'Non' }}</p> @@ -529,12 +637,18 @@ <div class="sectionHeader"> <p>Gérer les membres de votre structure</p> <app-button - [type]="'button'" + class="hide-on-mobile" [text]="'Modifier'" [style]="buttonTypeEnum.Secondary" [extraClass]="'editButton'" (action)="goToManageMembers()" ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToManageMembers()" + ></app-button> </div> <div class="content" *ngIf="members"> <p>{{ members.length }} membre(s)</p> -- GitLab