From e91be888b8c432512def0229c381c552495c7fa8 Mon Sep 17 00:00:00 2001 From: Etienne Loupias <eloupias@grandlyon.com> Date: Mon, 9 Dec 2024 15:19:06 +0100 Subject: [PATCH] customize structure or user offer --- .../structure-edition-summary.component.html | 64 +++++++++++-------- 1 file changed, 36 insertions(+), 28 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 abf583ccf..094ddbb6b 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 @@ -275,7 +275,11 @@ alt="" height="48px" width="48px" - [src]="'../../../../../assets/ico/' + getStructureTypeIcon() + '.svg'" + [src]=" + '../../../../../assets/' + + (offerHolder.structure ? 'ico/' + getStructureTypeIcon() : 'avatar/defaultAvatar') + + '.svg' + " /> <div class="offerTitle"> <h3 *ngIf="offerHolder.structure">Offre de la structure</h3> @@ -283,10 +287,12 @@ Offre de {{ offerHolder.user.name }} {{ offerHolder.user.surname }} {{ offerHolder.isMyself ? ' (moi)' : '' }} </h3> - <!-- TODO : mettre le bon tag en fonction du holder --> <app-tag-item - *ngIf="structure.structureType?.name" - [label]="structure.structureType?.name" + *ngIf=" + (offerHolder.structure && structure.structureType?.name) || + (offerHolder.user && offerHolder.user.job?.name) + " + [label]="offerHolder.structure ? structure.structureType?.name : offerHolder.user.job?.name" [size]="'small'" [color]="'grey'" /> @@ -337,30 +343,32 @@ </div> </div> - <div class="sectionHeader"> - <strong>Autres démarches : </strong> - <app-button - class="hide-on-mobile" - [variant]="'secondary'" - [label]="structure.otherDescription ? 'Modifier' : 'Ajouter'" - [iconName]="structure.otherDescription ? 'edit' : 'plus'" - [size]="'small'" - (action)="goToEdit(structureFormStep.structureDigitalHelpingAccompanimentOther, offerHolder)" - /> - <app-icon-button - class="hide-on-desktop" - [variant]="'secondary'" - [iconName]="structure.otherDescription ? 'edit' : 'plus'" - [ariaLabel]=" - structure.otherDescription - ? 'Modifier les autres démarches en ligne' - : 'Ajouter les autres démarches en ligne' - " - (action)="goToEdit(structureFormStep.structureDigitalHelpingAccompanimentOther, offerHolder)" - /> - </div> - <app-no-information *ngIf="!structure.otherDescription" /> - <p *ngIf="structure.otherDescription">{{ structure.otherDescription }}</p> + <ng-container *ngIf="offerHolder.structure"> + <div class="sectionHeader"> + <strong>Autres démarches : </strong> + <app-button + class="hide-on-mobile" + [variant]="'secondary'" + [label]="structure.otherDescription ? 'Modifier' : 'Ajouter'" + [iconName]="structure.otherDescription ? 'edit' : 'plus'" + [size]="'small'" + (action)="goToEdit(structureFormStep.structureDigitalHelpingAccompanimentOther, offerHolder)" + /> + <app-icon-button + class="hide-on-desktop" + [variant]="'secondary'" + [iconName]="structure.otherDescription ? 'edit' : 'plus'" + [ariaLabel]=" + structure.otherDescription + ? 'Modifier les autres démarches en ligne' + : 'Ajouter les autres démarches en ligne' + " + (action)="goToEdit(structureFormStep.structureDigitalHelpingAccompanimentOther, offerHolder)" + /> + </div> + <app-no-information *ngIf="!structure.otherDescription" /> + <p *ngIf="structure.otherDescription">{{ structure.otherDescription }}</p> + </ng-container> </section> <section class="learning" id="learning"> -- GitLab