Skip to content
Snippets Groups Projects
Commit 54d7fdf7 authored by paf's avatar paf
Browse files

Add a message for the case of files which can not be deleted because they...

Add a message for the case of files which can not be deleted because they where referenced by others.

A player referenced in a unit can not be deleted without deleting the unit. A Unit used in a booklet can not be deleted without deleting the booklet. A booklet used in a
Testtakers-File can not be deleted without that.
parent 13352902
No related branches found
No related tags found
No related merge requests found
Pipeline #19849 passed with warnings
......@@ -179,4 +179,5 @@ export interface FileDeletionReport {
deleted: string[];
not_allowed: string[];
did_not_exist: string[];
was_used: string[];
}
......@@ -131,6 +131,10 @@ export class FilesComponent implements OnInit {
if (fileDeletionReport.not_allowed.length > 0) {
message.push(`${fileDeletionReport.not_allowed.length} Dateien konnten nicht gelöscht werden.`);
}
if (fileDeletionReport.was_used.length > 0) {
message.push(`${fileDeletionReport.was_used.length} Dateien werden von anderen verwendet
und wurden nicht gelöscht.`);
}
this.snackBar.open(message.join('<br>'), message.length > 1 ? 'Achtung' : '', { duration: 1000 });
this.updateFileList();
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment