refactor: Unbenutzten RefreshService-Import entfernen und Fehlermeldungen verbessern
- Unbenutzten Import von RefreshService aus UserRepresentationComponent entfernt. - Konsistenz und Klarheit der Fehlermeldungen in Swal.fire-Aufrufen verbessert. - Deutsche Übersetzungen der Fehlermeldungen korrigiert, um Genauigkeit zu gewährleisten.
This commit is contained in:
parent
5645bf7244
commit
a19134f487
@ -7,7 +7,6 @@ import { UserRepService } from '../../services/user-representation.service';
|
||||
import Swal from 'sweetalert2';
|
||||
import { MatTabsModule, MatTabGroup } from '@angular/material/tabs';
|
||||
import { env } from '../../../environments/environment';
|
||||
import { RefreshService } from '../../services/refresh.service';
|
||||
import { BasePageComponent } from '../base-page/base-page.component';
|
||||
|
||||
@Component({
|
||||
@ -83,14 +82,14 @@ export class UserRepresentationComponent extends BasePageComponent implements Af
|
||||
Swal.fire({
|
||||
icon: "error",
|
||||
title: "Oops...",
|
||||
text: "Bitte wählen Sie die repräsentative Benutzer!",
|
||||
text: "Bitte wählen Sie die Vertretungen Benutzer!",
|
||||
});
|
||||
}
|
||||
else if (!this.slRightGroupId) {
|
||||
Swal.fire({
|
||||
icon: "error",
|
||||
title: "Oops...",
|
||||
text: "Bitte wählen Sie die richtige Gruppe!",
|
||||
text: "Bitte wählen Sie die Rechte Gruppe!",
|
||||
});
|
||||
}
|
||||
else {
|
||||
@ -111,7 +110,7 @@ export class UserRepresentationComponent extends BasePageComponent implements Af
|
||||
Swal.fire({
|
||||
icon: "error",
|
||||
title: "Oops...",
|
||||
text: `Bitte versuchen Sie es später noch einmal.`,
|
||||
text: `Dieser Vorgang ist nicht möglich.`,
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -137,14 +136,14 @@ export class UserRepresentationComponent extends BasePageComponent implements Af
|
||||
Swal.fire({
|
||||
icon: "error",
|
||||
title: "Oops...",
|
||||
text: "Bitte wählen Sie die repräsentative Gruppe!",
|
||||
text: "Bitte wählen Sie die Vertretungen Gruppe!",
|
||||
});
|
||||
}
|
||||
else if (!this.slRightGroupId) {
|
||||
Swal.fire({
|
||||
icon: "error",
|
||||
title: "Oops...",
|
||||
text: "Bitte wählen Sie die richtige Gruppe!",
|
||||
text: "Bitte wählen Sie die rechte Gruppe!",
|
||||
});
|
||||
}
|
||||
else {
|
||||
@ -162,11 +161,10 @@ export class UserRepresentationComponent extends BasePageComponent implements Af
|
||||
this.userReps.fetchData(this.slUserId)
|
||||
},
|
||||
error: (error) => {
|
||||
const errorMessage = error?.error || "Es ist ein unerwarteter Fehler aufgetreten.";
|
||||
Swal.fire({
|
||||
icon: "error",
|
||||
title: "Oops...",
|
||||
text: `${errorMessage}\nBitte versuchen Sie es später noch einmal.`,
|
||||
text: `Dieser Vorgang ist nicht möglich.`,
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -191,11 +189,10 @@ export class UserRepresentationComponent extends BasePageComponent implements Af
|
||||
error: (err) => {
|
||||
this.slUserRepId = null;
|
||||
this.repUsers.safelyUnselectAll()
|
||||
const errorMessage = err?.error || "Es ist ein unerwarteter Fehler aufgetreten.";
|
||||
Swal.fire({
|
||||
icon: "error",
|
||||
title: "Oops...",
|
||||
text: `${errorMessage}\nBitte versuchen Sie es später noch einmal.`,
|
||||
text: `Dieser Vorgang ist nicht möglich.`,
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user