diff --git a/src/app/shared/components/contributors-list/contributors-list.component.html b/src/app/shared/components/contributors-list/contributors-list.component.html index 2c71d485b..ba06b8363 100644 --- a/src/app/shared/components/contributors-list/contributors-list.component.html +++ b/src/app/shared/components/contributors-list/contributors-list.component.html @@ -4,7 +4,7 @@ } @else { @for (contributor of contributors(); track contributor.id) {
- @if (readonly() || contributor.isUnregisteredContributor || !contributor.userId) { + @if (readonly() || contributor.isUnregisteredContributor || contributor.deactivated) { {{ contributor.fullName }}{{ $last ? '' : ',' }} } @else { diff --git a/src/app/shared/components/contributors/contributors-table/contributors-table.component.html b/src/app/shared/components/contributors/contributors-table/contributors-table.component.html index 8b542f9c8..d789d61c8 100644 --- a/src/app/shared/components/contributors/contributors-table/contributors-table.component.html +++ b/src/app/shared/components/contributors/contributors-table/contributors-table.component.html @@ -102,7 +102,7 @@

{{ 'project.contributors.curatorInfo.heading' | translate }}

- @if (isCurrentUserAdminContributor()) { + @if (isCurrentUserAdminContributor() && !contributor.deactivated) {
{{ 'project.contributors.curatorInfo.heading' | translate }} binary="true" [(ngModel)]="contributor.isBibliographic" [ariaLabel]="'project.contributors.table.headers.contributor' | translate" - [readonly]="!isCurrentUserAdminContributor()" + [disabled]="!isCurrentUserAdminContributor() || contributor.deactivated" >
@@ -154,14 +154,13 @@

{{ 'project.contributors.curatorInfo.heading' | translate }}

@if (showEmployment()) { @if (contributor.employment?.length) { -
- {{ 'project.contributors.employment.show' | translate }} - + /> } @else { {{ 'project.contributors.employment.none' | translate }} } @@ -171,14 +170,13 @@

{{ 'project.contributors.curatorInfo.heading' | translate }}

@if (contributor.education?.length) { - - {{ 'project.contributors.education.show' | translate }} - + /> } @else { {{ 'project.contributors.education.none' | translate }} } diff --git a/src/app/shared/mappers/contributors/contributors.mapper.ts b/src/app/shared/mappers/contributors/contributors.mapper.ts index 0be93bef9..fcd1e7e33 100644 --- a/src/app/shared/mappers/contributors/contributors.mapper.ts +++ b/src/app/shared/mappers/contributors/contributors.mapper.ts @@ -32,12 +32,13 @@ export class ContributorsMapper { isCurator: response.attributes.is_curator, permission: response.attributes.permission, index: response.attributes.index, - userId: errorMeta ? '' : userData?.id || '', + userId: errorMeta ? response?.id?.split('-')[1] : userData?.id || '', fullName: errorMeta ? errorMeta?.full_name : userData?.attributes?.full_name || '', givenName: errorMeta ? errorMeta?.given_name : userData?.attributes?.given_name || '', familyName: errorMeta ? errorMeta?.family_name : userData?.attributes?.family_name || '', education: errorMeta ? [] : userData?.attributes?.education || [], employment: errorMeta ? [] : userData?.attributes?.employment || [], + deactivated: !!errorMeta, }; } diff --git a/src/app/shared/models/contributors/contributor.model.ts b/src/app/shared/models/contributors/contributor.model.ts index 2272110b8..8034565d6 100644 --- a/src/app/shared/models/contributors/contributor.model.ts +++ b/src/app/shared/models/contributors/contributor.model.ts @@ -15,6 +15,7 @@ export interface ContributorModel { familyName: string; employment: Employment[]; education: Education[]; + deactivated: boolean; } export type ContributorShortInfoModel = Pick<