diff --git a/src/app/profile/profile.component.html b/src/app/profile/profile.component.html index 0977efafd30cf5ae78771ba147b2a982c3cd1686..ff65d2bf9509dd8711e5cd0b79dd82fb1f4e47e0 100644 --- a/src/app/profile/profile.component.html +++ b/src/app/profile/profile.component.html @@ -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">