Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Sort Togglz For Professional & Educational activities #2071

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]="educationAndQualification"
[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,8 @@ export class AffiliationStacksGroupsComponent implements OnInit {
expandedContentChange: EventEmitter<MainPanelsState> = new EventEmitter()
professionalActivitiesTogglz = false
sortTypes: SortOrderType[] = ['title', 'start', 'end']

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