From 3cd383d167943356da99668dba69bc743e56df45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Wed, 25 Nov 2020 16:49:04 +0200 Subject: [PATCH] Sorting --- .../file-actions/file-actions.component.html | 2 +- .../table-col-name.component.html | 8 ++--- .../table-col-name.component.scss | 26 ++++++++++++--- .../table-col-name.component.ts | 6 ---- .../src/assets/icons/general/sort-asc.svg | 30 +++++------------ .../src/assets/icons/general/sort-desc.svg | 33 +++++-------------- 6 files changed, 44 insertions(+), 61 deletions(-) diff --git a/apps/red-ui/src/app/common/file-actions/file-actions.component.html b/apps/red-ui/src/app/common/file-actions/file-actions.component.html index 2e7c7a797..1cca30fb9 100644 --- a/apps/red-ui/src/app/common/file-actions/file-actions.component.html +++ b/apps/red-ui/src/app/common/file-actions/file-actions.component.html @@ -46,7 +46,7 @@ *ngIf="permissionsService.canAssignReviewer(fileStatus)" [tooltipPosition]="tooltipPosition" [tooltip]="permissionsService.isManagerAndOwner() ? 'project-overview.assign' : 'project-overview.assign-me'" - [icon]="permissionsService.isManagerAndOwner() ? 'red:assign' : 'red-assign-me'" + [icon]="permissionsService.isManagerAndOwner() ? 'red:assign' : 'red:assign-me'" [type]="buttonType" > diff --git a/apps/red-ui/src/app/components/table-col-name/table-col-name.component.html b/apps/red-ui/src/app/components/table-col-name/table-col-name.component.html index b4807f83a..4c9ece356 100644 --- a/apps/red-ui/src/app/components/table-col-name/table-col-name.component.html +++ b/apps/red-ui/src/app/components/table-col-name/table-col-name.component.html @@ -1,7 +1,7 @@
- -
- - + +
+ +
diff --git a/apps/red-ui/src/app/components/table-col-name/table-col-name.component.scss b/apps/red-ui/src/app/components/table-col-name/table-col-name.component.scss index 24380c470..9d530967d 100644 --- a/apps/red-ui/src/app/components/table-col-name/table-col-name.component.scss +++ b/apps/red-ui/src/app/components/table-col-name/table-col-name.component.scss @@ -3,21 +3,37 @@ :host { display: flex; border-bottom: 1px solid $separator; + height: 30px; > div { align-items: center; - text-transform: uppercase; display: flex; - font-weight: 600; + width: 100%; + line-height: 11px; gap: 8px; - padding: 8px 24px; + padding: 0 24px; + } + + .flex-end { + min-width: 58px; } .sort-arrows-container { + display: none; + color: $primary; mat-icon { - display: block; + height: 14px; width: 6px; - height: 11px; } } + + &:hover { + .sort-arrows-container { + display: initial; + } + } + + .sort-arrows-container.force-display { + display: initial; + } } diff --git a/apps/red-ui/src/app/components/table-col-name/table-col-name.component.ts b/apps/red-ui/src/app/components/table-col-name/table-col-name.component.ts index 915491e58..52e8a9b52 100644 --- a/apps/red-ui/src/app/components/table-col-name/table-col-name.component.ts +++ b/apps/red-ui/src/app/components/table-col-name/table-col-name.component.ts @@ -17,10 +17,4 @@ export class TableColNameComponent implements OnInit { constructor() {} ngOnInit(): void {} - - public get arrowColor(): { up: string; down: string } { - const up = this.activeSortingOption.order === 'desc' && this.activeSortingOption.column === this.column ? 'primary' : 'accent'; - const down = this.activeSortingOption.order === 'asc' && this.activeSortingOption.column === this.column ? 'primary' : 'accent'; - return { up, down }; - } } diff --git a/apps/red-ui/src/assets/icons/general/sort-asc.svg b/apps/red-ui/src/assets/icons/general/sort-asc.svg index 9f6c1017a..e4f16d061 100644 --- a/apps/red-ui/src/assets/icons/general/sort-asc.svg +++ b/apps/red-ui/src/assets/icons/general/sort-asc.svg @@ -1,22 +1,10 @@ - - - - - - - - + + + sort-asc + + + + + + diff --git a/apps/red-ui/src/assets/icons/general/sort-desc.svg b/apps/red-ui/src/assets/icons/general/sort-desc.svg index c85082534..979017696 100644 --- a/apps/red-ui/src/assets/icons/general/sort-desc.svg +++ b/apps/red-ui/src/assets/icons/general/sort-desc.svg @@ -1,25 +1,10 @@ - - - - - - - - + + + sort-desc + + + + + +