RED-4714: Filter by dossier states in donut chart
This commit is contained in:
parent
061a14e4c4
commit
776d62cd4e
@ -43,6 +43,7 @@
|
||||
[strokeWidth]="15"
|
||||
[subtitle]="'dossier-overview.dossier-details.charts.documents-in-dossier' | translate"
|
||||
direction="row"
|
||||
filterKey="statusFilters"
|
||||
helpModeKey="dashboard_in_dossier"
|
||||
></redaction-donut-chart>
|
||||
</div>
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
[radius]="80"
|
||||
[strokeWidth]="15"
|
||||
[subtitle]="'dossier-template-stats.active-dossiers' | translate: { count: stats.numberOfActiveDossiers }"
|
||||
filterKey="dossierStatesFilters"
|
||||
></redaction-donut-chart>
|
||||
|
||||
<div class="dossier-stats-container">
|
||||
@ -31,5 +32,6 @@
|
||||
[radius]="80"
|
||||
[strokeWidth]="15"
|
||||
[subtitle]="'dossier-template-stats.total-documents' | translate"
|
||||
filterKey="statusFilters"
|
||||
></redaction-donut-chart>
|
||||
</div>
|
||||
|
||||
@ -17,8 +17,8 @@ export class DonutChartComponent implements OnChanges, OnInit {
|
||||
@Input() direction: 'row' | 'column' = 'column';
|
||||
@Input() totalType: 'sum' | 'count' | 'simpleLabel' = 'sum';
|
||||
@Input() counterText: string;
|
||||
@Input() filterKey = 'statusFilters';
|
||||
@Input() helpModeKey: 'dashboard_in_dossier';
|
||||
@Input() filterKey;
|
||||
@Input() helpModeKey;
|
||||
|
||||
chartData: any[] = [];
|
||||
cx = 0;
|
||||
|
||||
@ -19,10 +19,9 @@ export class TranslateChartService {
|
||||
return config.map(val => {
|
||||
if (!val.key) {
|
||||
return { ...val, label: this._translateService.instant(val.label) };
|
||||
} else {
|
||||
const dossierState = this._dossierStatesMapService.get(dossierTemplateId, val.key);
|
||||
return { ...val, key: null, label: dossierState.name, color: dossierState.color };
|
||||
}
|
||||
const dossierState = this._dossierStatesMapService.get(dossierTemplateId, val.key);
|
||||
return { ...val, label: dossierState.name, color: dossierState.color };
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user