DEck ausblenden bei Training, Image mit id, daten kommen alle aus der deck Tabelle

This commit is contained in:
2024-11-29 21:48:44 +01:00
parent ab021cb4c2
commit c116b56934
5 changed files with 81 additions and 78 deletions

View File

@@ -107,7 +107,6 @@ export class UploadImageModalComponent implements AfterViewInit, OnDestroy {
async onFileChange(event: any): Promise<void> {
const file: File = event.target.files[0];
if (!file) return;
this.imageFile = file;
this.processingStatus = 'Verarbeitung läuft...';
this.detectedText = '';
@@ -317,12 +316,12 @@ export class UploadImageModalComponent implements AfterViewInit, OnDestroy {
// Zum Beispiel:
const data = {
deckname: this.deckName,
image: this.imagename,
bildname: this.imageFile?.name,
bildid: this.imagename,
boxes: this.boxes,
};
this.deckService.saveImageData(data).subscribe({
next: () => {
alert('Bild gespeichert!');
this.imageUploaded.emit();
this.closeModal();
},
@@ -332,7 +331,6 @@ export class UploadImageModalComponent implements AfterViewInit, OnDestroy {
}
});
// Temporäres Beispiel:
alert('Save button clicked');
this.imageUploaded.emit();
this.closeModal();
}