Changes on redaction colors

This commit is contained in:
Adina Țeudan 2022-02-07 17:52:47 +02:00
parent bf7f3f1923
commit 21c9c83064
5 changed files with 10 additions and 5 deletions

View File

@ -55,7 +55,7 @@ export class DefaultColorsScreenComponent extends ListingComponent<ListItem> imp
await this._loadColors(); await this._loadColors();
} }
openEditColorDialog($event: any, color: { key: DefaultColorType | string; value: string }) { openEditColorDialog($event: MouseEvent, color: { key: DefaultColorType | string; value: string }) {
this._dialogService.openDialog( this._dialogService.openDialog(
'editColor', 'editColor',
$event, $event,

View File

@ -40,7 +40,7 @@ export class FileWorkloadComponent {
} }
get redactionColor() { get redactionColor() {
return this._getDictionaryColor('redaction'); return this._getDictionaryColor('dossier_redaction');
} }
private _getDictionaryColor(type: string) { private _getDictionaryColor(type: string) {

View File

@ -23,6 +23,6 @@ export class DossierWorkloadColumnComponent {
} }
get redactionColor() { get redactionColor() {
return this._appStateService.getDictionaryColor('redaction', this.dossier.dossierTemplateId); return this._appStateService.getDictionaryColor('dossier_redaction', this.dossier.dossierTemplateId);
} }
} }

View File

@ -498,7 +498,7 @@
"defaultColor": "Default Color", "defaultColor": "Default Color",
"dictionaryRequestColor": "Dictionary Request", "dictionaryRequestColor": "Dictionary Request",
"ignoredHintColor": "Ignored Hint", "ignoredHintColor": "Ignored Hint",
"manualRedactionColor": "Manual Redaction", "manualRedactionColor": "Redaction Color",
"notRedacted": "Skipped", "notRedacted": "Skipped",
"previewColor": "Preview", "previewColor": "Preview",
"requestAdd": "Request Add", "requestAdd": "Request Add",

View File

@ -18,6 +18,11 @@ export class DossierTemplateStats implements IDossierTemplateStats {
} }
dictionarySummary(type: string): DictionarySummary | undefined { dictionarySummary(type: string): DictionarySummary | undefined {
return this._dictionarySummaryMap.get(type); const defaultValue: DictionarySummary = { entriesCount: 0, id: type, name: type, type };
if (!this._dictionarySummaryMap.get(type)) {
// TODO
console.error(`Missing type ${type}`);
}
return this._dictionarySummaryMap.get(type) || defaultValue;
} }
} }