diff --git a/src/app/courses/progress-courses/courses-progress-chart.component.html b/src/app/courses/progress-courses/courses-progress-chart.component.html index 5116b8a176..1dd46dcbaf 100644 --- a/src/app/courses/progress-courses/courses-progress-chart.component.html +++ b/src/app/courses/progress-courses/courses-progress-chart.component.html @@ -1,10 +1,11 @@ - + - - - - + -
{ label, select, Steps {Steps} Questions {Questions} other {Steps} } + {{ label | i18nSelect: { 'Steps': 'Steps', 'Questions': 'Questions', 'other': 'Steps' } }} + Success (%) Total Errors
-
+
{{ set.label }} ({{ set.total }})
@@ -21,7 +22,6 @@
{{ index + 1 }} @@ -29,10 +29,15 @@ + 'highlight-green': calculateSuccessPercentage(index) >= 90, + 'highlight-yellow': calculateSuccessPercentage(index) >= 70 && calculateSuccessPercentage(index) < 90, + 'highlight-red': calculateSuccessPercentage(index) < 70, + 'cursor-pointer': i.clickable + }" + i18n-matTooltip + matTooltip="Click to see test detail" + [matTooltipDisabled]="!i.clickable" + (click)="i.clickable ? dataClick($event, [], index) : null"> {{ calculateSuccessPercentage(index) | number:'1.0-0' }}% @@ -40,37 +45,43 @@ - -
- {{ i.count }} -
+
+ +
+ {{ i.count }} +
+
+ + - +
0 - {{ set.items[index].number }} + {{ set.items[index].number }} -
-
+ \ No newline at end of file diff --git a/src/app/courses/progress-courses/courses-progress-chart.component.ts b/src/app/courses/progress-courses/courses-progress-chart.component.ts index 2442783a86..59804cf6bb 100644 --- a/src/app/courses/progress-courses/courses-progress-chart.component.ts +++ b/src/app/courses/progress-courses/courses-progress-chart.component.ts @@ -43,8 +43,6 @@ export class CoursesProgressChartComponent implements OnChanges { }); } - - dataClick(event, set, index) { this.changeData.emit({ set, index }); } diff --git a/src/app/courses/progress-courses/courses-progress-chart.scss b/src/app/courses/progress-courses/courses-progress-chart.scss index 934f4528af..59db1bbcbf 100644 --- a/src/app/courses/progress-courses/courses-progress-chart.scss +++ b/src/app/courses/progress-courses/courses-progress-chart.scss @@ -1,3 +1,5 @@ +@import '../../variables'; + .simple-table { width: 80%; margin: 0 auto; @@ -16,20 +18,6 @@ font-weight: bold; position: sticky; top: 0; - z-index: 2; - } - - tr:nth-child(even) { - background-color: #ECF0F1; - } - - td { - background-color: #ffffff; - position: relative; - } - - .cursor-pointer { - cursor: pointer; } .user-header-content { @@ -37,52 +25,44 @@ flex-direction: column; align-items: center; text-align: center; - } - - .user-name { - margin-top: 5px; - font-size: 12px; - white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } - - .wrap-content { - max-width: 100px; - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - } - - .user-summary { - display: flex; - flex-wrap: wrap; - margin-top: 20px; - .user-row { - display: flex; - align-items: center; - margin-right: 15px; - - .user-total { - margin-right: 5px; - } - } + .highlight-green { + background-color: green; + color: white; + display: inline-block; + padding: 2px 5px; + border-radius: 4px; + } - planet-avatar { - margin-right: 5px; - } + .highlight-yellow { + background-color: orange; + color: white; + display: inline-block; + padding: 2px 5px; + border-radius: 4px; } - .success-high { - color: green; + .highlight-red { + background-color: red; + color: white; + display: inline-block; + padding: 2px 5px; + border-radius: 4px; } - - .success-medium { - color: orange; + + .accent-highlight { + background-color: $accent; + color: $accent-text; } - - .success-low { - color: red; + + .number-highlight { + background-color: $accent; + color: $accent-text; + display: inline-block; + padding: 2px 5px; + border-radius: 4px; } }