Skip to content
Snippets Groups Projects
Commit 89f5e302 authored by Marlène SIMONDANT's avatar Marlène SIMONDANT
Browse files

fix(personal0fferEdition): add structure name to personal offer edition screen and modal

parent 84898bef
No related branches found
No related tags found
2 merge requests!608V2.4.2,!596349-mon-compte-ajouter-le-nom-de-la-structure-sur-l-ecran-gerer-mon-offre
...@@ -7,7 +7,10 @@ ...@@ -7,7 +7,10 @@
<use [attr.xlink:href]="'assets/ico/sprite.svg#arrowBack'"></use> <use [attr.xlink:href]="'assets/ico/sprite.svg#arrowBack'"></use>
</svg> </svg>
</a> </a>
<h1>Gérer mon offre de service</h1> <div>
<p *ngIf="structureName" class="overtitle">{{ structureName }}</p>
<h1>Gérer mon offre de service</h1>
</div>
</div> </div>
<app-button <app-button
class="hide-on-mobile deleteOffer" class="hide-on-mobile deleteOffer"
...@@ -81,7 +84,10 @@ ...@@ -81,7 +84,10 @@
<div class="modal"> <div class="modal">
<div class="modalHeader"> <div class="modalHeader">
<div class="empty"></div> <div class="empty"></div>
<h3>Supprimer mon offre</h3> <div class="modalTitleText">
<p *ngIf="structureName" class="overtitle">{{ structureName }}</p>
<h3>Supprimer mon offre</h3>
</div>
<svg class="close" aria-hidden="true" (click)="closeModal()"> <svg class="close" aria-hidden="true" (click)="closeModal()">
<use [attr.xlink:href]="'assets/form/sprite.svg#close'"></use> <use [attr.xlink:href]="'assets/form/sprite.svg#close'"></use>
</svg> </svg>
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
.header { .header {
justify-content: space-between; justify-content: space-between;
padding-bottom: 18px;
align-items: center; align-items: center;
.title { .title {
...@@ -44,6 +43,7 @@ ...@@ -44,6 +43,7 @@
@media #{$tablet} { @media #{$tablet} {
@include lato-regular-20; @include lato-regular-20;
} }
padding-bottom: 1.25em;
} }
// h1 { // h1 {
// color: $grey-1; // color: $grey-1;
...@@ -137,8 +137,16 @@ ...@@ -137,8 +137,16 @@
align-items: center; align-items: center;
border: 1px solid $grey-6; border: 1px solid $grey-6;
padding: 0 8px; padding: 0 8px;
.modalTitleText {
flex-direction: column;
margin: 1em 0;
}
h3 { h3 {
@include lato-bold-18; @include lato-bold-18;
margin: 0;
}
a {
align-self: flex-end;
} }
svg, svg,
.empty { .empty {
...@@ -166,3 +174,9 @@ ...@@ -166,3 +174,9 @@
} }
} }
} }
.overtitle {
@include lato-regular-18;
color: $grey-3;
margin: 0 0 3px;
}
...@@ -31,6 +31,7 @@ export class PersonalOfferEditionComponent implements OnInit { ...@@ -31,6 +31,7 @@ export class PersonalOfferEditionComponent implements OnInit {
public onlineProcedures: Category; public onlineProcedures: Category;
public trainingCategories: CategoriesToggle[] = []; public trainingCategories: CategoriesToggle[] = [];
public deleteOfferModal: boolean; public deleteOfferModal: boolean;
public structureName: string;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,
...@@ -49,6 +50,7 @@ export class PersonalOfferEditionComponent implements OnInit { ...@@ -49,6 +50,7 @@ export class PersonalOfferEditionComponent implements OnInit {
this.initialPersonalOffer = this.personalOfferForm.value; this.initialPersonalOffer = this.personalOfferForm.value;
} }
}); });
this.structureName = history.state.structureName;
} }
private createPersonalOfferForm(personalOfferState): UntypedFormGroup { private createPersonalOfferForm(personalOfferState): UntypedFormGroup {
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
[iconBtn]="'edit'" [iconBtn]="'edit'"
[text]="'Modifier mon offre'" [text]="'Modifier mon offre'"
[style]="buttonTypeEnum.SecondaryWide" [style]="buttonTypeEnum.SecondaryWide"
[state]="{ structureName: this.structureName }"
routerLink="./edit-personal-offer/{{ this.personalOffer._id }}" routerLink="./edit-personal-offer/{{ this.personalOffer._id }}"
/> />
<app-button <app-button
......
...@@ -19,6 +19,7 @@ import { PersonalOffer } from './../../../models/personalOffer.model'; ...@@ -19,6 +19,7 @@ import { PersonalOffer } from './../../../models/personalOffer.model';
export class PersonalOfferComponent { export class PersonalOfferComponent {
@Input() public personalOffer: PersonalOffer; @Input() public personalOffer: PersonalOffer;
@Input() public isPublic: boolean; @Input() public isPublic: boolean;
@Input() public structureName?: string;
public buttonTypeEnum = ButtonType; public buttonTypeEnum = ButtonType;
public showOnlineProcedures: boolean = false; public showOnlineProcedures: boolean = false;
public showBaseSkills: boolean = false; public showBaseSkills: boolean = false;
......
...@@ -105,6 +105,7 @@ ...@@ -105,6 +105,7 @@
*ngIf="this.personalOffer && !isPending" *ngIf="this.personalOffer && !isPending"
class="section" class="section"
[personalOffer]="personalOffer" [personalOffer]="personalOffer"
[structureName]="structure.structureName"
[isPublic]="isPublic" [isPublic]="isPublic"
> >
</app-personal-offer> </app-personal-offer>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment