remove router links
This commit is contained in:
parent
b762a0a89d
commit
5b5ecc0f09
@ -37,4 +37,8 @@ export class DossierTemplate implements IDossierTemplate, IListable {
|
||||
get searchKey(): string {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
get routerLink(): string {
|
||||
return `/main/admin/dossier-templates/${this.dossierTemplateId}/dictionaries`;
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,4 +135,8 @@ export class File implements IFile, IListable {
|
||||
get searchKey(): string {
|
||||
return this.filename;
|
||||
}
|
||||
|
||||
get routerLink(): string | undefined {
|
||||
return this.canBeOpened ? `/main/dossiers/${this.dossierId}/file/${this.fileId}` : undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,4 +34,8 @@ export class TypeValue implements ITypeValue, IListable {
|
||||
get searchKey(): string {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
get routerLink(): string {
|
||||
return `/main/admin/dossier-templates/${this.dossierTemplateId}/dictionaries/${this.type}`;
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,8 +57,6 @@ export class DictionaryListingScreenComponent extends ListingComponent<TypeValue
|
||||
_appStateService.activateDossierTemplate(_activatedRoute.snapshot.params.dossierTemplateId);
|
||||
}
|
||||
|
||||
routerLinkFn = (entity: TypeValue) => [entity.type];
|
||||
|
||||
ngOnInit(): void {
|
||||
this._configureTableColumns();
|
||||
this._loadDictionaryData();
|
||||
|
||||
@ -51,8 +51,6 @@ export class DossierTemplatesListingScreenComponent extends ListingComponent<Dos
|
||||
super(_injector);
|
||||
}
|
||||
|
||||
routerLinkFn = (dossierTemplate: DossierTemplate) => [dossierTemplate.dossierTemplateId, 'dictionaries'];
|
||||
|
||||
ngOnInit(): void {
|
||||
this._configureTableColumns();
|
||||
this.loadDossierTemplatesData();
|
||||
|
||||
@ -82,8 +82,6 @@ export class DossierListingScreenComponent
|
||||
return this.entitiesService.all.length - this._activeDossiersCount;
|
||||
}
|
||||
|
||||
routerLinkFn = (dossier: Dossier) => ['/main/dossiers/' + dossier.id];
|
||||
|
||||
getDossierTemplateNameFor(dossierTemplateId: string): string {
|
||||
return this._appStateService.getDossierTemplateById(dossierTemplateId).name;
|
||||
}
|
||||
|
||||
@ -198,17 +198,14 @@ export class DossierOverviewScreenComponent extends ListingComponent<File> imple
|
||||
this._loadingService.stop();
|
||||
};
|
||||
|
||||
actionPerformed(action?: string, fileStatus?: File) {
|
||||
actionPerformed(action?: string, file?: File) {
|
||||
this.calculateData();
|
||||
|
||||
if (action === 'navigate') {
|
||||
this._router.navigate(this.routerLinkFn(fileStatus));
|
||||
this._router.navigate([file.routerLink]);
|
||||
}
|
||||
}
|
||||
|
||||
routerLinkFn = (fileStatus: File) =>
|
||||
fileStatus.canBeOpened ? [`/main/dossiers/${this.currentDossier.id}/file/${fileStatus.fileId}`] : [];
|
||||
|
||||
disabledFn = (fileStatus: File) => fileStatus.excluded;
|
||||
|
||||
lastOpenedFn = (fileStatus: File) => fileStatus.lastOpened;
|
||||
|
||||
@ -102,8 +102,6 @@ export class SearchScreenComponent extends ListingComponent<ListItem> implements
|
||||
});
|
||||
}
|
||||
|
||||
routerLinkFn = (entity: ListItem) => [entity.routerLink];
|
||||
|
||||
updateNavigation(query: string, mustContain?: string): void {
|
||||
const newQuery = query?.replace(mustContain, `"${mustContain}"`);
|
||||
const queryParams = newQuery && newQuery !== '' ? { query: newQuery } : {};
|
||||
|
||||
@ -23,14 +23,10 @@ const SMOOTH_SCROLL = 0;
|
||||
export class DictionaryManagerComponent implements OnChanges, OnInit {
|
||||
readonly iconButtonTypes = IconButtonTypes;
|
||||
|
||||
@Input()
|
||||
withFloatingActions = true;
|
||||
@Input()
|
||||
initialEntries: List;
|
||||
@Input()
|
||||
canEdit = false;
|
||||
@Output()
|
||||
readonly saveDictionary = new EventEmitter<string[]>();
|
||||
@Input() withFloatingActions = true;
|
||||
@Input() initialEntries: List;
|
||||
@Input() canEdit = false;
|
||||
@Output() readonly saveDictionary = new EventEmitter<string[]>();
|
||||
|
||||
currentMatch = 0;
|
||||
findMatches: FindMatch[] = [];
|
||||
@ -48,9 +44,7 @@ export class DictionaryManagerComponent implements OnChanges, OnInit {
|
||||
private _decorations: string[] = [];
|
||||
private _searchDecorations: string[] = [];
|
||||
|
||||
constructor(private readonly _dictionaryService: DictionaryService, private readonly _appStateService: AppStateService) {
|
||||
this.currentEntries = [...this.initialEntries];
|
||||
}
|
||||
constructor(private readonly _dictionaryService: DictionaryService, private readonly _appStateService: AppStateService) {}
|
||||
|
||||
private _dossier: Dossier = this.selectDossier as Dossier;
|
||||
|
||||
@ -96,6 +90,8 @@ export class DictionaryManagerComponent implements OnChanges, OnInit {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.currentEntries = [...this.initialEntries];
|
||||
|
||||
this.editorOptions = {
|
||||
theme: 'vs',
|
||||
language: 'text/plain',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user