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 @@ ...@@ -59,15 +59,15 @@
></app-button> ></app-button>
</div> </div>
</section> </section>
<!-- Private profile with pending structures -->
<section> <section *ngIf="!isPublic">
<div class="header"> <div class="header">
<h1 [ngPlural]="userProfile.structuresLink.length"> <h1 [ngPlural]="userProfile.structuresLink.length">
<ng-template ngPluralCase="1">Structure</ng-template> <ng-template ngPluralCase="1">Structure</ng-template>
<ng-template ngPluralCase="other">Structures</ng-template> <ng-template ngPluralCase="other">Structures</ng-template>
</h1> </h1>
<app-button <app-button
*ngIf="!isPublic && userProfile.structuresLink.length > 0" *ngIf="userProfile.structuresLink.length > 0"
class="hide-on-mobile" class="hide-on-mobile"
[type]="'button'" [type]="'button'"
[iconBtn]="'edit'" [iconBtn]="'edit'"
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
[routerLinkActive]="'active'" [routerLinkActive]="'active'"
></app-button> ></app-button>
<app-button <app-button
*ngIf="!isPublic && userProfile.structuresLink.length > 0" *ngIf="userProfile.structuresLink.length > 0"
class="hide-on-desktop" class="hide-on-desktop"
[type]="'button'" [type]="'button'"
[iconBtn]="'edit'" [iconBtn]="'edit'"
...@@ -90,17 +90,16 @@ ...@@ -90,17 +90,16 @@
class="structuresContainer" class="structuresContainer"
*ngIf="userProfile.structuresLink.length > 0 || userProfile.pendingStructuresLink.length > 0" *ngIf="userProfile.structuresLink.length > 0 || userProfile.pendingStructuresLink.length > 0"
> >
<ng-container *ngIf="!this.isPublic"> <app-profile-structure
<app-profile-structure *ngFor="let structure of pendingStructures; let i = index"
*ngFor="let structure of pendingStructures; let i = index" [structureWithOwners]="structure"
[structureWithOwners]="structure" [userProfile]="this.userProfile"
[userProfile]="this.userProfile" [isPublic]="this.isPublic"
[isPublic]="this.isPublic" [isPending]="true"
[isPending]="true" [joinRequestDate]="userProfile.pendingStructuresLink[i].createdAt"
[joinRequestDate]="userProfile.pendingStructuresLink[i].createdAt" (cancelJoin)="cancelJoin($event)"
(cancelJoin)="cancelJoin($event)" ></app-profile-structure>
></app-profile-structure>
</ng-container>
<app-profile-structure <app-profile-structure
*ngFor="let structure of structures; let i = index" *ngFor="let structure of structures; let i = index"
[structureWithOwners]="structure" [structureWithOwners]="structure"
...@@ -109,7 +108,6 @@ ...@@ -109,7 +108,6 @@
></app-profile-structure> ></app-profile-structure>
</div> </div>
<app-button <app-button
*ngIf="!isPublic"
class="addStructure" class="addStructure"
[style]="buttonTypeEnum.SecondaryUltraWide" [style]="buttonTypeEnum.SecondaryUltraWide"
[iconBtn]="'add'" [iconBtn]="'add'"
...@@ -118,6 +116,26 @@ ...@@ -118,6 +116,26 @@
tabindex="0" tabindex="0"
></app-button> ></app-button>
</section> </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 --> <!-- Features not implemented yet -->
<!-- <section *ngIf="!isPublic"> <!-- <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