From 936b0df638b1a3184efeb33a6e5f0831cf632b53 Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Tue, 17 Nov 2020 17:28:06 +0200 Subject: [PATCH] fixed bugs --- .../simple-doughnut-chart.component.html | 2 +- .../simple-doughnut-chart.component.ts | 3 ++- .../type-filter/type-filter.component.html | 2 ++ .../file-preview-screen.component.ts | 14 ++++++++----- .../page-indicator.component.ts | 4 +++- .../project-listing-screen.component.html | 7 ------- .../project-listing-screen.component.ts | 20 ++----------------- .../project-details.component.ts | 3 ++- apps/red-ui/src/assets/i18n/en.json | 2 +- 9 files changed, 22 insertions(+), 35 deletions(-) diff --git a/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.html b/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.html index 0aa80da2c..10b936a07 100644 --- a/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.html +++ b/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.html @@ -22,7 +22,7 @@
-
+
+ @@ -7,6 +8,7 @@ - (); const allDistinctPeople = new Set(); - const allDistinctDueDates = new Set(); const allDistinctNeedsWork = new Set(); this.appStateService.allProjects.forEach((entry) => { // all people entry.project.memberIds.forEach((memberId) => allDistinctPeople.add(memberId)); - // due date - if (entry.dueDate) { - allDistinctDueDates.add(moment(entry.dueDate).format('DD/MM/YYYY')); - } // file statuses entry.files.forEach((file) => { allDistinctFileStatus.add(file.status); @@ -218,15 +212,6 @@ export class ProjectListingScreenComponent implements OnInit, OnDestroy { }); this.peopleFilters = processFilters(this.peopleFilters, peopleFilters); - const dueDateFilters = []; - allDistinctDueDates.forEach((date) => { - dueDateFilters.push({ - key: date, - label: date - }); - }); - this.dueDateFilters = processFilters(this.dueDateFilters, dueDateFilters); - const needsWorkFilters = []; allDistinctNeedsWork.forEach((type) => { needsWorkFilters.push({ @@ -254,7 +239,6 @@ export class ProjectListingScreenComponent implements OnInit, OnDestroy { const filters = [ { values: this.statusFilters, checker: projectStatusChecker }, { values: this.peopleFilters, checker: projectMemberChecker }, - { values: this.dueDateFilters, checker: dueDateChecker }, { values: this.needsWorkFilters, checker: annotationFilterChecker, matchAll: true, checkerArgs: this.permissionsService } ]; this.detailsContainerFilters = { diff --git a/apps/red-ui/src/app/screens/project-overview-screen/project-details/project-details.component.ts b/apps/red-ui/src/app/screens/project-overview-screen/project-details/project-details.component.ts index 69be9148c..4ab377dd2 100644 --- a/apps/red-ui/src/app/screens/project-overview-screen/project-details/project-details.component.ts +++ b/apps/red-ui/src/app/screens/project-overview-screen/project-details/project-details.component.ts @@ -70,7 +70,7 @@ export class ProjectDetailsComponent implements OnInit { const groups = groupBy(this.appStateService.activeProject?.files, 'status'); this.documentsChartData = []; for (const key of Object.keys(groups)) { - this.documentsChartData.push({ value: groups[key].length, color: key, label: key }); + this.documentsChartData.push({ value: groups[key].length, color: key, label: key, key: key }); } this._changeDetectorRef.detectChanges(); } @@ -81,6 +81,7 @@ export class ProjectDetailsComponent implements OnInit { } public toggleFilter(filterType: 'needsWorkFilters' | 'statusFilters', key: string): void { + console.log(this.filters, filterType, this.filters[filterType], key); const filter = this.filters[filterType].find((f) => f.key === key); filter.checked = !filter.checked; this.filtersChanged.emit(this.filters); diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json index 966d083b7..473ee1549 100644 --- a/apps/red-ui/src/assets/i18n/en.json +++ b/apps/red-ui/src/assets/i18n/en.json @@ -152,7 +152,7 @@ "new-rule": { "label": "Outdated", "toast": { - "message-project": "Renalysis required: ", + "message-project": "Reanalysis required: ", "actions": { "reanalyse-all": "Reanalyze all", "reanalyse-file": "Reanalyze this file",