Commits

Giuseppe Digilio authored 305203dba7f
[CST-5738] hide special group heading when are not present
No tags

src/app/profile-page/profile-page.component.html

Modified
15 15 (isInvalid)="setInvalid($event)"
16 16 (passwordValue)="setPasswordValue($event)"
17 17 ></ds-profile-page-security-form>
18 18 </div>
19 19 </div>
20 20 <div class="col-12 text-right pr-0">
21 21 <button class="btn btn-primary" (click)="updateProfile()"><i class="fas fa-edit"></i> {{'profile.form.submit' | translate}}</button>
22 22 </div>
23 23
24 24 <ng-container *ngVar="(groupsRD$ | async)?.payload?.page as groups">
25 - <div *ngIf="groups">
25 + <div *ngIf="groups?.length > 0">
26 26 <h3 class="mt-4">{{'profile.groups.head' | translate}}</h3>
27 27 <ul class="list-group list-group-flush">
28 28 <li *ngFor="let group of groups" class="list-group-item">{{group.name}}</li>
29 29 </ul>
30 30 </div>
31 31 </ng-container>
32 32
33 33 <ng-container *ngVar="(specialGroupsRD$ | async)?.payload?.page as specialGroups">
34 - <div *ngIf="specialGroups">
35 - <div id="specialGroups">
36 - <h3 class="mt-4">{{'profile.special.groups.head' | translate}}</h3>
37 - <ul class="list-group list-group-flush">
38 - <li *ngFor="let specialGroup of specialGroups" class="list-group-item">{{specialGroup.name}}</li>
39 - </ul>
40 - </div>
34 + <div *ngIf="specialGroups?.length > 0" data-test="specialGroups">
35 + <h3 class="mt-4">{{'profile.special.groups.head' | translate}}</h3>
36 + <ul class="list-group list-group-flush">
37 + <li *ngFor="let specialGroup of specialGroups" class="list-group-item">{{specialGroup.name}}</li>
38 + </ul>
41 39 </div>
42 40 </ng-container>
43 41 </div>
44 42 </ng-container>

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut