From 302dd2036b51c90a11234bade08ea2624d2f252c Mon Sep 17 00:00:00 2001 From: nsemets Date: Fri, 19 Sep 2025 15:27:49 +0300 Subject: [PATCH 1/2] fix(contributors): fixed contributors 2 bugs --- .../my-projects/mappers/my-resources.mapper.ts | 8 ++++---- .../add-contributor-dialog.component.html | 4 ++-- .../add-contributor-dialog.component.scss | 6 ------ .../cookie-consent/cookie-consent.component.html | 6 +----- .../mappers/contributors/contributors.mapper.ts | 4 ++-- .../icons/socials/{baidu.png => baiduScholar.png} | Bin 6 files changed, 9 insertions(+), 19 deletions(-) rename src/assets/icons/socials/{baidu.png => baiduScholar.png} (100%) diff --git a/src/app/features/my-projects/mappers/my-resources.mapper.ts b/src/app/features/my-projects/mappers/my-resources.mapper.ts index 8fafdb4dc..767338291 100644 --- a/src/app/features/my-projects/mappers/my-resources.mapper.ts +++ b/src/app/features/my-projects/mappers/my-resources.mapper.ts @@ -11,10 +11,10 @@ export class MyResourcesMapper { isPublic: response.attributes.public, contributors: response.embeds?.bibliographic_contributors?.data?.map((contributor) => ({ - familyName: contributor.embeds.users.data.attributes.family_name, - fullName: contributor.embeds.users.data.attributes.full_name, - givenName: contributor.embeds.users.data.attributes.given_name, - middleName: contributor.embeds.users.data.attributes.middle_name, + familyName: contributor.embeds.users.data?.attributes.family_name, + fullName: contributor.embeds.users.data?.attributes.full_name, + givenName: contributor.embeds.users.data?.attributes.given_name, + middleName: contributor.embeds.users.data?.attributes.middle_name, })) ?? [], }; } diff --git a/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.html b/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.html index f471d1f6f..fec8b68d7 100644 --- a/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.html +++ b/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.html @@ -11,8 +11,8 @@ } @else { @for (item of users(); track $index) {
- - + + {{ item.fullName }}
} diff --git a/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.scss b/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.scss index 866f8bf02..5b56d123d 100644 --- a/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.scss +++ b/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.scss @@ -1,11 +1,5 @@ @use "styles/mixins" as mix; -.label { - color: var(--dark-blue-1); - margin: 0; - cursor: pointer; -} - .border-divider { border-bottom: 1px solid var(--grey-2); } diff --git a/src/app/shared/components/cookie-consent/cookie-consent.component.html b/src/app/shared/components/cookie-consent/cookie-consent.component.html index 7d6f5baae..409e35808 100644 --- a/src/app/shared/components/cookie-consent/cookie-consent.component.html +++ b/src/app/shared/components/cookie-consent/cookie-consent.component.html @@ -3,11 +3,7 @@
{{ message.detail }}
- +
diff --git a/src/app/shared/mappers/contributors/contributors.mapper.ts b/src/app/shared/mappers/contributors/contributors.mapper.ts index d344f1e02..505c81865 100644 --- a/src/app/shared/mappers/contributors/contributors.mapper.ts +++ b/src/app/shared/mappers/contributors/contributors.mapper.ts @@ -36,8 +36,8 @@ export class ContributorsMapper { ({ id: user.id, fullName: user.attributes.full_name, - isBibliographic: false, - permission: ContributorPermission.Read, + isBibliographic: true, + permission: ContributorPermission.Write, }) as ContributorAddModel ), totalCount: response.meta.total, diff --git a/src/assets/icons/socials/baidu.png b/src/assets/icons/socials/baiduScholar.png similarity index 100% rename from src/assets/icons/socials/baidu.png rename to src/assets/icons/socials/baiduScholar.png From 7751f1c1e504dccc6473a13e4b3af109d55e6dba Mon Sep 17 00:00:00 2001 From: nsemets Date: Fri, 19 Sep 2025 16:49:35 +0300 Subject: [PATCH 2/2] fix(styles): fixed styles for contributors --- .../add-contributor-dialog.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.html b/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.html index fec8b68d7..6a490975d 100644 --- a/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.html +++ b/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.html @@ -12,7 +12,7 @@ @for (item of users(); track $index) { }