RED-6857: Don't send request after closing new file attr dialog
This commit is contained in:
parent
498aff6116
commit
ecf4c65635
@ -64,6 +64,14 @@ export class FileAttributesListingScreenComponent extends ListingComponent<FileA
|
|||||||
@ViewChild('fileInput') private _fileInput: ElementRef;
|
@ViewChild('fileInput') private _fileInput: ElementRef;
|
||||||
readonly #dossierTemplateId = getParam(DOSSIER_TEMPLATE_ID);
|
readonly #dossierTemplateId = getParam(DOSSIER_TEMPLATE_ID);
|
||||||
|
|
||||||
|
private get _numberOfDisplayedAttrs(): number {
|
||||||
|
return this.entitiesService.all.filter(attr => attr.displayedInFileList).length;
|
||||||
|
}
|
||||||
|
|
||||||
|
private get _numberOfFilterableAttrs(): number {
|
||||||
|
return this.entitiesService.all.filter(attr => attr.filterable).length;
|
||||||
|
}
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
readonly permissionsService: PermissionsService,
|
readonly permissionsService: PermissionsService,
|
||||||
private readonly _toaster: Toaster,
|
private readonly _toaster: Toaster,
|
||||||
@ -76,14 +84,6 @@ export class FileAttributesListingScreenComponent extends ListingComponent<FileA
|
|||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
private get _numberOfDisplayedAttrs(): number {
|
|
||||||
return this.entitiesService.all.filter(attr => attr.displayedInFileList).length;
|
|
||||||
}
|
|
||||||
|
|
||||||
private get _numberOfFilterableAttrs(): number {
|
|
||||||
return this.entitiesService.all.filter(attr => attr.filterable).length;
|
|
||||||
}
|
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
await this.#loadData();
|
await this.#loadData();
|
||||||
}
|
}
|
||||||
@ -106,7 +106,9 @@ export class FileAttributesListingScreenComponent extends ListingComponent<FileA
|
|||||||
);
|
);
|
||||||
|
|
||||||
const result = await firstValueFrom(ref.afterClosed());
|
const result = await firstValueFrom(ref.afterClosed());
|
||||||
this._loadingService.loadWhile(this.#createNewFileAttributeAndRefreshView(result));
|
if (result) {
|
||||||
|
this._loadingService.loadWhile(this.#createNewFileAttributeAndRefreshView(result));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async openConfirmDeleteAttributeDialog(attributes: FileAttributeConfig[] = this.listingService.selected): Promise<void> {
|
async openConfirmDeleteAttributeDialog(attributes: FileAttributeConfig[] = this.listingService.selected): Promise<void> {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user