-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2002 from ORCID/fix/8693-qa-assistive-text-missin…
…g-in-professional-activities-section fix: Add missing assistive text to professional activities and sort type
- Loading branch information
Showing
7 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...app/shared/pipes/app-panels-sort-by-aria-label/app-panels-sort-by-aria-label.pipe.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { AppPanelsSortByAriaLabelPipe } from './app-panels-sort-by-aria-label.pipe'; | ||
|
||
describe('AppPanelsSortByAriaLabelPipe', () => { | ||
it('create an instance', () => { | ||
const pipe = new AppPanelsSortByAriaLabelPipe(); | ||
expect(pipe).toBeTruthy(); | ||
}); | ||
}); |
25 changes: 25 additions & 0 deletions
25
src/app/shared/pipes/app-panels-sort-by-aria-label/app-panels-sort-by-aria-label.pipe.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Pipe, PipeTransform } from '@angular/core'; | ||
import { SortOrderType } from '../../../types/sort' | ||
|
||
@Pipe({ | ||
name: 'appPanelsSortByAriaLabel' | ||
}) | ||
export class AppPanelsSortByAriaLabelPipe implements PipeTransform { | ||
|
||
transform(sortBy: SortOrderType): string { | ||
switch (sortBy) { | ||
case 'title': | ||
return $localize`:@@shared.sortTitle:Sort by title` | ||
case 'start': | ||
return $localize`:@@shared.sortStart:Sort by start date` | ||
case 'end': | ||
return $localize`:@@shared.sortEnd:Sort by end date` | ||
case 'date': | ||
return $localize`:@@shared.sortDate:Sort by type` | ||
case 'type': | ||
return $localize`:@@shared.sortType:Sort by type` | ||
case 'order': | ||
return $localize`:@@shared.sortOrder:Sort by order` | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters