Skip to content

Commit

Permalink
Merge pull request #2071 from ORCID/fix-sort-togglz-for-professional-…
Browse files Browse the repository at this point in the history
…educational-activities

Enable Sort Togglz For Professional & Educational activities
  • Loading branch information
leomendoza123 authored Oct 6, 2023
2 parents 94d44fd + e509d63 commit c0ec9ec
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
[(expandedContent)]="expandedContent['EDUCATION_AND_QUALIFICATION']"
(expandedContentChange)="expandedContentChange.emit(expandedContent)"
[isPublicRecord]="isPublicRecord"
[sortTypes]="['title', 'start', 'end', 'source']"
[sortTypes]="educationAndQualificationSortTypes"
[sortType]="'end'"
(sort)="sortEvent($event, 'EDUCATION_AND_QUALIFICATION')"
id="cy-affiliation-education-and-qualification"
Expand Down Expand Up @@ -289,7 +289,7 @@
[(expandedContent)]="expandedContent['PROFESSIONAL_ACTIVITIES']"
(expandedContentChange)="expandedContentChange.emit(expandedContent)"
[isPublicRecord]="isPublicRecord"
[sortTypes]="['title', 'type', 'start', 'end', 'source']"
[sortTypes]="professionalActivitiesSortTypes"
(sort)="sortEvent($event, 'PROFESSIONAL_ACTIVITIES')"
[professionalActivitiesTogglz]="professionalActivitiesTogglz"
id="cy-affiliation-professional-activities"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,17 @@ export class AffiliationStacksGroupsComponent implements OnInit {
expandedContentChange: EventEmitter<MainPanelsState> = new EventEmitter()
professionalActivitiesTogglz = false
sortTypes: SortOrderType[] = ['title', 'start', 'end']

professionalActivitiesSortTypes: SortOrderType[] = [
'title',
'type',
'start',
'end',
]
educationAndQualificationSortTypes: SortOrderType[] = [
'title',
'start',
'end',
]
constructor(
private _record: RecordService,
private _recordAffiliationService: RecordAffiliationService,
Expand All @@ -73,6 +83,8 @@ export class AffiliationStacksGroupsComponent implements OnInit {
.subscribe((sourceSortingTogglz: boolean) => {
if (sourceSortingTogglz) {
this.sortTypes.push('source')
this.professionalActivitiesSortTypes.push('source')
this.educationAndQualificationSortTypes.push('source')
}
})
this.$loading = this._recordAffiliationService.$loading
Expand Down

0 comments on commit c0ec9ec

Please sign in to comment.