Skip to content

Commit 617dcd6

Browse files
committed
Added call to get orgs with application admin.
1 parent 2f3c8f9 commit 617dcd6

File tree

3 files changed

+30
-14
lines changed

3 files changed

+30
-14
lines changed

src/app/admin/organisation/organisation.service.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,20 @@ export class OrganisationService {
6363
});
6464
}
6565

66+
getMultipleWithApplicationAdmin(
67+
limit: number = 1000,
68+
offset: number = 0,
69+
orderByColumn?: string,
70+
orderByDirection?: string
71+
): Observable<OrganisationGetManyResponse> {
72+
return this.restService.get(`${this.URL}/applicationAdmin`, {
73+
limit,
74+
offset,
75+
orderOn: orderByColumn,
76+
sort: orderByDirection,
77+
});
78+
}
79+
6680
delete(id: number) {
6781
return this.restService.delete(this.URL, id);
6882
}

src/app/applications/application-change-organization-dialog/application-change-organization-dialog.component.html

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,21 @@ <h1 mat-dialog-title>{{ "APPLICATION.CHANGE-ORGANIZATION.TITLE" | translate }}</
1919
<label class="form-label" for="permissionSelect">{{
2020
"APPLICATION.CHANGE-ORGANIZATION.CHOOSE-USER-GROUPS" | translate
2121
}}</label>
22-
<mat-select
23-
id="permissionSelect"
24-
class="form-control"
25-
[multiple]="true"
26-
panelClass="overflow-x-hidden"
27-
[(value)]="application.permissionIds"
28-
[compareWith]="compare"
29-
>
30-
<mat-option *ngFor="let permission of filteredPermissionsMulti | async" [value]="permission.id">
31-
{{ permission.name }}
32-
</mat-option>
33-
</mat-select>
34-
<mat-hint>{{ "APPLICATION.CHANGE-ORGANIZATION.USER-GROUP-AUTO-SELECT" | translate }}</mat-hint>
22+
<div *ngIf="permissions.length > 0">
23+
<mat-select
24+
id="permissionSelect"
25+
class="form-control"
26+
[multiple]="true"
27+
panelClass="overflow-x-hidden"
28+
[(value)]="application.permissionIds"
29+
[compareWith]="compare"
30+
>
31+
<mat-option *ngFor="let permission of filteredPermissionsMulti | async" [value]="permission.id">
32+
{{ permission.name }}
33+
</mat-option>
34+
</mat-select>
35+
<mat-hint>{{ "APPLICATION.CHANGE-ORGANIZATION.USER-GROUP-AUTO-SELECT" | translate }}</mat-hint>
36+
</div>
3537
</div>
3638
<div mat-dialog-actions class="d-flex flex-row">
3739
<button (click)="onSubmit()" class="btn btn-primary">

src/app/applications/application-change-organization-dialog/application-change-organization-dialog.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export class ApplicationChangeOrganizationDialogComponent implements OnInit {
6060
}
6161

6262
getOrganizations() {
63-
this.organizationsSubscription = this.organizationService.getMultiple().subscribe(res => {
63+
this.organizationsSubscription = this.organizationService.getMultipleWithApplicationAdmin().subscribe(res => {
6464
this.organizations = res.data;
6565
this.filteredOrganizations.next(this.organizations.slice());
6666
});

0 commit comments

Comments
 (0)