RED-7887 - UI saves the last saved dictionary in compare and no longer updates itself after selecting another template
This commit is contained in:
parent
5bcee3c5c4
commit
93e1dcd1c1
@ -85,6 +85,7 @@
|
||||
[activeEntryType]="activeEntryType"
|
||||
[hint]="selectedDictionary.hint"
|
||||
[currentDossierId]="dossier.dossierId"
|
||||
[currentDossierTemplateId]="dossier.dossierTemplateId"
|
||||
></redaction-dictionary-manager>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, Output, SimpleChanges, ViewChild } from '@angular/core';
|
||||
import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';
|
||||
import { IconButtonTypes, LoadingService } from '@iqser/common-ui';
|
||||
import {
|
||||
Dictionary,
|
||||
@ -34,12 +34,13 @@ const HELP_MODE_KEYS = {
|
||||
templateUrl: './dictionary-manager.component.html',
|
||||
styleUrls: ['./dictionary-manager.component.scss'],
|
||||
})
|
||||
export class DictionaryManagerComponent implements OnChanges {
|
||||
export class DictionaryManagerComponent implements OnChanges, OnInit {
|
||||
private _searchDecorations: string[] = [];
|
||||
readonly #currentTab = window.location.href.split('/').pop();
|
||||
@Input() type: DictionaryType = 'dictionary';
|
||||
@Input() entityType?: string;
|
||||
@Input() currentDossierId: string;
|
||||
@Input() currentDossierTemplateId: string;
|
||||
@Input() withFloatingActions = true;
|
||||
@Input() filterByDossierTemplate = false;
|
||||
@Input() initialEntries: List;
|
||||
@ -72,15 +73,18 @@ export class DictionaryManagerComponent implements OnChanges {
|
||||
private readonly _dictionariesMapService: DictionariesMapService,
|
||||
protected readonly _loadingService: LoadingService,
|
||||
private readonly _changeRef: ChangeDetectorRef,
|
||||
readonly activeDossiersService: ActiveDossiersService,
|
||||
private readonly _activeDossiersService: ActiveDossiersService,
|
||||
readonly dossierTemplatesService: DossierTemplatesService,
|
||||
) {
|
||||
this.dossiers = activeDossiersService.all;
|
||||
this.dossiers = _activeDossiersService.all;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
const templateDictionary = {
|
||||
id: 'template',
|
||||
dossierId: 'template',
|
||||
dossierName: 'Template Dictionary',
|
||||
dossierTemplateId: this.dossiers[0]?.dossierTemplateId,
|
||||
dossierTemplateId: this.currentDossierTemplateId,
|
||||
} as Dossier;
|
||||
this.dossiers.push(templateDictionary);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user