diff --git a/apps/metadata-editor/src/app/my-org-users/my-org-users.component.ts b/apps/metadata-editor/src/app/my-org-users/my-org-users.component.ts index f148da6653..45c2d2ee8d 100644 --- a/apps/metadata-editor/src/app/my-org-users/my-org-users.component.ts +++ b/apps/metadata-editor/src/app/my-org-users/my-org-users.component.ts @@ -31,7 +31,8 @@ export class MyOrgUsersComponent { ) { this.searchFacade.resetSearch() this.authService.user$.subscribe((user) => { - this.orgName = 'Géo2France' + // this.orgName = 'Géo2France' + this.orgName = user?.organisation }) this.orgService.organisations$.subscribe((orgs) => { const org = orgs.filter((org) => org.name === this.orgName)[0] @@ -41,7 +42,8 @@ export class MyOrgUsersComponent { }) this.authService.allUsers$.subscribe((users) => { this.userList = users.filter( - (user) => user.organisation === 'Barbie Inc.' + // (user) => user.organisation === 'Barbie Inc.' + (user) => user.organisation === this.orgName ) }) } diff --git a/apps/metadata-editor/src/app/records/my-org-records/my-org-records.component.ts b/apps/metadata-editor/src/app/records/my-org-records/my-org-records.component.ts index 3f6b2e32c4..37893de9bb 100644 --- a/apps/metadata-editor/src/app/records/my-org-records/my-org-records.component.ts +++ b/apps/metadata-editor/src/app/records/my-org-records/my-org-records.component.ts @@ -28,7 +28,8 @@ export class MyOrgRecordsComponent { ) { this.searchFacade.resetSearch() this.authService.user$.subscribe((user) => { - this.orgName = 'Géo2France' + // this.orgName = 'Géo2France' + this.orgName = user?.organisation this.searchByOrganisation({ name: this.orgName }) }) this.orgService.organisations$.subscribe((orgs) => { @@ -41,7 +42,8 @@ export class MyOrgRecordsComponent { this.authService.allUsers$.subscribe((users) => { this.userCount = users.filter( - (user) => user.organisation === 'Barbie Inc.' + // (user) => user.organisation === 'Barbie Inc.' + (user) => user.organisation === this.orgName ).length }) }