diff --git a/src/app/admin/components/claim-structure/claim-structure.component.ts b/src/app/admin/components/claim-structure/claim-structure.component.ts index e6e8f1338949af736a38bdc97e159870bd54c018..28e1701d0d63a3ecc84731ba756d734d90d6732c 100644 --- a/src/app/admin/components/claim-structure/claim-structure.component.ts +++ b/src/app/admin/components/claim-structure/claim-structure.component.ts @@ -17,14 +17,18 @@ export class ClaimStructureComponent implements OnInit { } public acceptDemand(demand: DemandAttachment): void { - this.adminService.acceptStructureClaim(demand.userEmail, demand.structureId).subscribe((data) => { - this.demandsAttachment = data; - }); + this.adminService + .acceptStructureClaim(demand.userEmail, demand.structureId, demand.structureName) + .subscribe((data) => { + this.demandsAttachment = data; + }); } public refuseDemand(demand: DemandAttachment): void { - this.adminService.refuseStructureClaim(demand.userEmail, demand.structureId).subscribe((data) => { - this.demandsAttachment = data; - }); + this.adminService + .refuseStructureClaim(demand.userEmail, demand.structureId, demand.structureName) + .subscribe((data) => { + this.demandsAttachment = data; + }); } } diff --git a/src/app/admin/services/admin.service.ts b/src/app/admin/services/admin.service.ts index 0167109c5db0f424f33bfff31dcae7ae38086541..cdea9a41bafe956e74a11c854f61b50bf173bec9 100644 --- a/src/app/admin/services/admin.service.ts +++ b/src/app/admin/services/admin.service.ts @@ -15,11 +15,27 @@ export class AdminService { return this.http.get<DemandAttachment[]>(`${this.baseUrl}/pendingStructures`); } - public acceptStructureClaim(userEmail: string, structureId: number): Observable<DemandAttachment[]> { - return this.http.post<DemandAttachment[]>(`${this.baseUrl}/validatePendingStructure`, { userEmail, structureId }); + public acceptStructureClaim( + userEmail: string, + structureId: number, + structureName: string + ): Observable<DemandAttachment[]> { + return this.http.post<DemandAttachment[]>(`${this.baseUrl}/validatePendingStructure`, { + userEmail, + structureId, + structureName, + }); } - public refuseStructureClaim(userEmail: string, structureId: number): Observable<DemandAttachment[]> { - return this.http.post<DemandAttachment[]>(`${this.baseUrl}/rejectPendingStructure`, { userEmail, structureId }); + public refuseStructureClaim( + userEmail: string, + structureId: number, + structureName: string + ): Observable<DemandAttachment[]> { + return this.http.post<DemandAttachment[]>(`${this.baseUrl}/rejectPendingStructure`, { + userEmail, + structureId, + structureName, + }); } } diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 20dbe35a7b1bea82f2bc0807945b104b233dc1f6..5f66a4eabd49f765e99c506154471a9428b13a02 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -23,6 +23,15 @@ export class AppComponent { if (this.authService.isLoggedIn()) { this.profilService.getProfile(); } + this.setHeightApp(); + window.addEventListener('resize', () => { + this.setHeightApp(); + }); + } + + private setHeightApp(): void { + const vh = window.innerHeight * 0.01; + document.documentElement.style.setProperty('--vh', `${vh}px`); } public onScrollDown(event): void { this.windowScrollService.scrollY.next(event); diff --git a/src/app/form/form.component.html b/src/app/form/form.component.html index 2bea200b728d9f6bc64473137bb2b9704fc71ef5..a3d85c2a6c444ba89b0008442c29479f0b66a29b 100644 --- a/src/app/form/form.component.html +++ b/src/app/form/form.component.html @@ -62,7 +62,7 @@ fxLayoutAlign="space-between center" fxLayoutAlign.lt-sm="center" > - <h2 class="no-wrap"> + <h2> {{ isJoinMode ? 'Rejoindre' : 'Revendiquer' }} la structure <span>{{ claimStructure.structureName }}</span> </h2> <div> diff --git a/src/app/form/form.component.scss b/src/app/form/form.component.scss index d32ba5a2cc79f9c57c473f12142886501002b6e7..0bc3f77041f85ffcd5f1d622330e59938b39eb07 100644 --- a/src/app/form/form.component.scss +++ b/src/app/form/form.component.scss @@ -16,11 +16,11 @@ h3 { .form { background: white; width: 100vw; - height: calc(100vh - #{$header-height} - #{$footer-height}); + height: calc(var(--vh, 1vh) * 100 - #{$header-height} - #{$footer-height}); top: #{$header-height}; z-index: $structure-details-z-index; @media #{$tablet} { - height: calc(100vh - #{$header-height}); + height: calc(var(--vh, 1vh) * 100 - #{$header-height}); position: fixed; //Hide default header app. } } @@ -115,9 +115,6 @@ h3 { span { color: $secondary-color; } - &.no-wrap { - white-space: nowrap; - } } h3 { @include cn-bold-26; @@ -137,7 +134,6 @@ h3 { height: auto; color: $grey-1; &.home { - height: 100%; .btnStart { margin-top: 90px; margin-bottom: 10px; diff --git a/src/app/header/header.component.scss b/src/app/header/header.component.scss index 7470c080a1e12b117c225ac5910cdbc98606a54f..8369791d6b97afa68908f614481edc4f8e6f8fdf 100644 --- a/src/app/header/header.component.scss +++ b/src/app/header/header.component.scss @@ -101,7 +101,7 @@ a { animation: slideMenu 0.5s; .menu-content { background-color: $white; - height: 100vh; + height: calc(var(--vh, 1vh) * 100); width: 350px; padding: 27px 25px; } diff --git a/src/app/structure-list/components/search/search.component.html b/src/app/structure-list/components/search/search.component.html index 5294bc01946780b19cc205741efe82869243ec0b..6e7814eb8a09356094c370be6534435163028c5e 100644 --- a/src/app/structure-list/components/search/search.component.html +++ b/src/app/structure-list/components/search/search.component.html @@ -91,7 +91,7 @@ </div> </div> <div class="footerSearchSection isntPhoneContent" fxLayout="row" fxLayoutAlign="space-between center"> - <div class="checkbox"> + <div class="checkbox no-width"> <div class="checkboxItem"> <label> <input diff --git a/src/app/structure-list/components/search/search.component.scss b/src/app/structure-list/components/search/search.component.scss index 657eeeffebacdf3e224e973e42a0044e3630e76e..ec415e8960e6076b0c573254c2cb15fb2e0423e4 100644 --- a/src/app/structure-list/components/search/search.component.scss +++ b/src/app/structure-list/components/search/search.component.scss @@ -118,7 +118,6 @@ } a { @include hyperlink; - width: 100%; text-align: right; } diff --git a/src/assets/scss/_buttons.scss b/src/assets/scss/_buttons.scss index e17ec875cd592b90d0a853044e9e0c36a1e6224e..3c972d529bd2e937982fb9d71c53e1893fd92483 100644 --- a/src/assets/scss/_buttons.scss +++ b/src/assets/scss/_buttons.scss @@ -7,7 +7,7 @@ height: 40px; width: 190px; border: 1px solid $grey-4; - padding: 3px 16px 3px 16px; + padding: 3px 8px 3px 16px; outline: none; border-radius: 4px; cursor: pointer; diff --git a/src/styles.scss b/src/styles.scss index f687830502062dca34baa1f51646607c4b141a9a..af9bc276813e243bbb1b06f9a424dd65c48d93cd 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -73,9 +73,6 @@ a { &.full-screen { min-height: calc(100vh - #{$header-height} - #{$footer-height}); } - @media #{$phone} { - padding-top: 30px; - } } .section-container { width: 80%; @@ -158,6 +155,9 @@ button { -ms-transform: rotate(45deg); } } + &.no-width { + width: unset; + } } // Layout