Skip to content
Snippets Groups Projects
Commit 532e3ac7 authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

Merge branch '181-annuaire-masquer-structures-section-vide' into 'dev'

Resolve "[Annuaire] Masquer les structures en attente"

Closes #181

See merge request !410
parents 55d95632 a3563304
No related branches found
No related tags found
3 merge requests!418V2.1.0,!410Resolve "[Annuaire] Masquer les structures en attente",!400V2.0
......@@ -59,15 +59,15 @@
></app-button>
</div>
</section>
<section>
<!-- Private profile with pending structures -->
<section *ngIf="!isPublic">
<div class="header">
<h1 [ngPlural]="userProfile.structuresLink.length">
<ng-template ngPluralCase="1">Structure</ng-template>
<ng-template ngPluralCase="other">Structures</ng-template>
</h1>
<app-button
*ngIf="!isPublic && userProfile.structuresLink.length > 0"
*ngIf="userProfile.structuresLink.length > 0"
class="hide-on-mobile"
[type]="'button'"
[iconBtn]="'edit'"
......@@ -77,7 +77,7 @@
[routerLinkActive]="'active'"
></app-button>
<app-button
*ngIf="!isPublic && userProfile.structuresLink.length > 0"
*ngIf="userProfile.structuresLink.length > 0"
class="hide-on-desktop"
[type]="'button'"
[iconBtn]="'edit'"
......@@ -90,17 +90,16 @@
class="structuresContainer"
*ngIf="userProfile.structuresLink.length > 0 || userProfile.pendingStructuresLink.length > 0"
>
<ng-container *ngIf="!this.isPublic">
<app-profile-structure
*ngFor="let structure of pendingStructures; let i = index"
[structureWithOwners]="structure"
[userProfile]="this.userProfile"
[isPublic]="this.isPublic"
[isPending]="true"
[joinRequestDate]="userProfile.pendingStructuresLink[i].createdAt"
(cancelJoin)="cancelJoin($event)"
></app-profile-structure>
</ng-container>
<app-profile-structure
*ngFor="let structure of pendingStructures; let i = index"
[structureWithOwners]="structure"
[userProfile]="this.userProfile"
[isPublic]="this.isPublic"
[isPending]="true"
[joinRequestDate]="userProfile.pendingStructuresLink[i].createdAt"
(cancelJoin)="cancelJoin($event)"
></app-profile-structure>
<app-profile-structure
*ngFor="let structure of structures; let i = index"
[structureWithOwners]="structure"
......@@ -109,7 +108,6 @@
></app-profile-structure>
</div>
<app-button
*ngIf="!isPublic"
class="addStructure"
[style]="buttonTypeEnum.SecondaryUltraWide"
[iconBtn]="'add'"
......@@ -118,6 +116,26 @@
tabindex="0"
></app-button>
</section>
<!-- Public profile -->
<section *ngIf="isPublic && userProfile.structuresLink.length > 0">
<div class="header">
<h1 [ngPlural]="userProfile.structuresLink.length">
<ng-template ngPluralCase="1">Structure</ng-template>
<ng-template ngPluralCase="other">Structures</ng-template>
</h1>
</div>
<div
class="structuresContainer"
*ngIf="userProfile.structuresLink.length > 0 || userProfile.pendingStructuresLink.length > 0"
>
<app-profile-structure
*ngFor="let structure of structures; let i = index"
[structureWithOwners]="structure"
[userProfile]="this.userProfile"
[isPublic]="this.isPublic"
></app-profile-structure>
</div>
</section>
<!-- Features not implemented yet -->
<!-- <section *ngIf="!isPublic">
......
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