Merge branch 'RED-7890' into 'master'
RED-7890: Remove dict items sorting from UI Closes RED-7890 See merge request redactmanager/red-ui!178
This commit is contained in:
commit
f684d446e7
@ -15,7 +15,6 @@ import { EditDossierSaveResult } from '../edit-dossier-section.interface';
|
||||
styleUrls: ['./edit-dossier-dictionary.component.scss'],
|
||||
})
|
||||
export class EditDossierDictionaryComponent implements OnInit {
|
||||
@ViewChild(DictionaryManagerComponent, { static: false }) private readonly _dictionaryManager: DictionaryManagerComponent;
|
||||
@Input() dossier: Dossier;
|
||||
canEdit = false;
|
||||
dictionaries: Dictionary[];
|
||||
@ -23,13 +22,7 @@ export class EditDossierDictionaryComponent implements OnInit {
|
||||
activeEntryType = DictionaryEntryTypes.ENTRY;
|
||||
entriesToDisplay: List = [];
|
||||
readonly entryTypes = DictionaryEntryTypes;
|
||||
|
||||
constructor(
|
||||
private readonly _dictionaryService: DictionaryService,
|
||||
private readonly _permissionsService: PermissionsService,
|
||||
private readonly _loadingService: LoadingService,
|
||||
private readonly _dialogService: DossiersDialogService,
|
||||
) {}
|
||||
@ViewChild(DictionaryManagerComponent, { static: false }) private readonly _dictionaryManager: DictionaryManagerComponent;
|
||||
|
||||
get changed(): boolean {
|
||||
return this._dictionaryManager?.editor.hasChanges;
|
||||
@ -43,6 +36,13 @@ export class EditDossierDictionaryComponent implements OnInit {
|
||||
return this._dictionaryManager?.editor.hasChanges;
|
||||
}
|
||||
|
||||
constructor(
|
||||
private readonly _dictionaryService: DictionaryService,
|
||||
private readonly _permissionsService: PermissionsService,
|
||||
private readonly _loadingService: LoadingService,
|
||||
private readonly _dialogService: DossiersDialogService,
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
this._loadingService.start();
|
||||
this.canEdit = this._permissionsService.canEditDossierDictionary(this.dossier);
|
||||
@ -96,8 +96,6 @@ export class EditDossierDictionaryComponent implements OnInit {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
this.entriesToDisplay = this.#toString([...this.entriesToDisplay]);
|
||||
}
|
||||
|
||||
async #updateDossierDictionary() {
|
||||
@ -128,8 +126,4 @@ export class EditDossierDictionaryComponent implements OnInit {
|
||||
this.dictionaries[i] = dictionaryWithType as Dictionary;
|
||||
}
|
||||
}
|
||||
|
||||
#toString(entries: string[]) {
|
||||
return entries.sort((a, b) => a.localeCompare(b));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user