Commits

VictorHugoDuranS authored and Tim Donohue committed 87125043769
Fix for User profile (/profile): only 20 group memberships shown instead of all (#3105)

* Add - groups paginated on profile page * Add - groups paginated on profile page * Add - groups paginated on profile page * Add - groups paginated on profile page * Fix UPDATE - Add pagination message error and loader * Update BRANCH * Fix - LINT ERRORS * Fix: Error declaring variable for group pagination * Fix: Remove unnecessary translations for paging groups * Fix: Lint erros * Fix: Remove unnecessary translations --------- Co-authored-by: VictorDuranEscire <victor@escire.lat>
No tags

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

Modified
26 26 (isInvalid)="setInvalid($event)"
27 27 (passwordValue)="setPasswordValue($event)"
28 28 (currentPasswordValue)="setCurrentPasswordValue($event)"
29 29 ></ds-profile-page-security-form>
30 30 </div>
31 31 </div>
32 32 <div class="col-12 text-right pr-0">
33 33 <button class="btn btn-primary" (click)="updateProfile()"><i class="fas fa-edit"></i> {{'profile.form.submit' | translate}}</button>
34 34 </div>
35 35
36 - <ng-container *ngVar="(groupsRD$ | async)?.payload?.page as groups">
37 - <div *ngIf="groups?.length > 0">
38 - <h2 class="mt-4">{{'profile.groups.head' | translate}}</h2>
39 - <ul class="list-group list-group-flush">
40 - <li *ngFor="let group of groups" class="list-group-item">{{ dsoNameService.getName(group) }}</li>
41 - </ul>
42 - </div>
36 + <ng-container *ngIf="(groupsRD$ | async) as groupsRD;">
37 + <ng-container *ngTemplateOutlet="groupsRD?.isLoading ? loader : content"></ng-container>
38 + <ng-template #content>
39 + <ds-pagination *ngIf="groupsRD?.payload"
40 + [hideGear]="true"
41 + [hidePagerWhenSinglePage]="true"
42 + [hidePaginationDetail]="true"
43 + [paginationOptions]="optionsGroupsPagination"
44 + [collectionSize]="groupsRD?.payload?.totalElements">
45 + <ng-container *ngIf="groupsRD?.payload?.page as groups">
46 + <div *ngIf="groups?.length > 0">
47 + <h2 class="mt-4">{{ 'profile.groups.head' | translate }}</h2>
48 + <ul class="list-group list-group-flush">
49 + <li *ngFor="let group of groups" class="list-group-item">{{ dsoNameService.getName(group) }}</li>
50 + </ul>
51 + </div>
52 + </ng-container>
53 + </ds-pagination>
54 + </ng-template>
55 + <ng-template #loader>
56 + <ds-loading [showMessage]="false"></ds-loading>
57 + </ng-template>
58 + <ds-error *ngIf="groupsRD?.hasFailed" message="{{ 'error.profile-groups' | translate }}"></ds-error>
43 59 </ng-container>
44 60
45 61 <ng-container *ngVar="(specialGroupsRD$ | async)?.payload?.page as specialGroups">
46 62 <div *ngIf="specialGroups?.length > 0" data-test="specialGroups">
47 63 <h2 class="mt-4">{{'profile.special.groups.head' | translate}}</h2>
48 64 <ul class="list-group list-group-flush">
49 65 <li *ngFor="let specialGroup of specialGroups" class="list-group-item">
50 66 {{ dsoNameService.getName(specialGroup) }}
51 67 </li>
52 68 </ul>

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

Add shortcut