Skip to content

Commit

Permalink
Merge branch 'main' into revert-2078-revert-2077-angular-update-15-16t
Browse files Browse the repository at this point in the history
  • Loading branch information
leomendoza123 authored Oct 23, 2023
2 parents 7b8ef82 + fdddd54 commit 87972f5
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 15 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## v2.43.5 - 2023-10-20

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.43.4...v2.43.5)

- [#2082](https://github.com/ORCID/orcid-angular/pull/2082): Transifex

## v2.43.4 - 2023-10-20

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.43.3...v2.43.4)

## v2.43.3 - 2023-10-20

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.43.2...v2.43.3)

### Fix

- Update sort by source functionality to sort also alphabetically (#2079)

## v2.43.2 - 2023-10-18

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.43.1...v2.43.2)
Expand Down
5 changes: 5 additions & 0 deletions src/app/cdk/side-bar/side-bar-id/side-bar-id.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@
}
.id {
display: inline-grid;
max-width: 100%;
span {
overflow-wrap: anywhere;
}
.orcid-id {
overflow-wrap: anywhere;
margin: 0;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Injectable } from '@angular/core'
import { MonthDayYearDate } from 'src/app/types'
import {
AffiliationUIGroup,
AffiliationGroup,
AffiliationType,
AffiliationUIGroup,
} from 'src/app/types/record-affiliation.endpoint'
import { UserRecordOptions } from 'src/app/types/record.local'

Expand Down Expand Up @@ -88,15 +88,21 @@ export class AffiliationsSortService {
}

if (by === 'source') {
affiliationGroup.sort((a, b) => {
return (
Number(AffiliationsSortService.isSelfAsserted(a, orcid)) -
Number(AffiliationsSortService.isSelfAsserted(b, orcid))
)
})
if (ascending) {
affiliationGroup.reverse()
}
const selfAsserted = this.getSelfAssertedOrValidatedAffiliations(
affiliationGroup,
ascending,
orcid,
'self-asserted'
)
const validated = this.getSelfAssertedOrValidatedAffiliations(
affiliationGroup,
ascending,
orcid,
'validated'
)
x.affiliationGroup = ascending
? [...selfAsserted, ...validated]
: [...validated, ...selfAsserted]
}
}
})
Expand Down Expand Up @@ -206,7 +212,25 @@ export class AffiliationsSortService {
})
}

private static isSelfAsserted(
private getSelfAssertedOrValidatedAffiliations(
affiliationGroup: AffiliationGroup[],
ascending: boolean,
orcid: string,
type: 'self-asserted' | 'validated'
): AffiliationGroup[] {
return affiliationGroup
.filter((affiliationGroup) => {
const selfAsserted = this.isSelfAsserted(affiliationGroup, orcid)
return type === 'self-asserted' ? selfAsserted : !selfAsserted
})
.sort((a, b) => {
return ('' + a.defaultAffiliation.affiliationName.value).localeCompare(
'' + b.defaultAffiliation.affiliationName.value
)
})
}

private isSelfAsserted(
affiliationGroup: AffiliationGroup,
orcid: string
): boolean {
Expand Down
3 changes: 2 additions & 1 deletion src/locale/properties/layout/layout.pl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ ngOrcid.orcidGear=SPRZĘT ORCID
ngOrcid.membershipComparison=PORÓWNANIE CZŁONKOSTW
ngOrcid.standartCreatorAgreement=STANDARDOWA UMOWA CZŁONKA TWÓRCY
ngOrcid.blog=BLOG
ngOrcid.subscribe=SUBSKRYBUJ!.ngOrcid.disputeProcedures=PROCEDURY ROZSTRZYGANIA SPORÓW
ngOrcid.subscribe=SUBSKRYBUJ!
ngOrcid.disputeProcedures=PROCEDURY ROZSTRZYGANIA SPORÓW
ngOrcid.publicDataFileUsePolicy=ZASADY KORZYSTANIA Z PLIKÓW DANYCH PUBLICZNYCH
ngOrcid.ambassadors=Ambasadorzy
ngOrcid.search=Szukaj...
Expand Down
2 changes: 1 addition & 1 deletion src/locale/properties/shared/shared.pl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ shared.researchSortDate=Sortuj zasoby badawcze według daty
shared.today=Dzisiaj
share.more=więcej
shared.orcidHelpCenter=Centrum wsparcia ORCID
shared.employmentSortSource=Dzisiaj
shared.employmentSortSource=Sortuj zatrudnienie według źródła
shared.educationSortSource=Sortuj wykształcenie i kwalifikacje według źródła
shared.fundingSortSource=Sortuj finansowanie według źródła
shared.professionalActivitiesSortSource=Sortuj działalność zawodową według źródła
Expand Down
4 changes: 2 additions & 2 deletions src/locale/properties/summary/summary.pl.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
summary.to=do
summary.moreAffiliation=Więcej powiązań
summary.moreAffiliation=dodatkowe powiązanie
summary.validatedSource=Zweryfikowane źródło
summary.selfAssertedSource=Samoistnie zweryfikowane źródło
summary.affiliations=POWIĄZANIA
Expand Down Expand Up @@ -28,7 +28,7 @@ summary.moreAffiliations=więcej powiązań
summary.moreProfessionalActivities=więcej działalności zawodowej
summary.moreOtherIdentifiers=więcej innych identyfikatorów
summary.moreProfessionalActivitie=więcej działalności zawodowej
summary.moreOtherIdentifier=więcej innych identyfikatorów
summary.moreOtherIdentifier=dodatkowy inny identyfikator
summary.recordIsLocked=Ten rekord jest zablokowany
summary.recordIsDeprecated=Ten rekord został zdeprecjonowany
summary.recordIsDeactivated=Ten rekord został dezaktywowany

0 comments on commit 87972f5

Please sign in to comment.