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 Swal from 'sweetalert2';
|
||||||
import { MatTabsModule, MatTabGroup } from '@angular/material/tabs';
|
import { MatTabsModule, MatTabGroup } from '@angular/material/tabs';
|
||||||
import { env } from '../../../environments/environment';
|
import { env } from '../../../environments/environment';
|
||||||
import { RefreshService } from '../../services/refresh.service';
|
|
||||||
import { BasePageComponent } from '../base-page/base-page.component';
|
import { BasePageComponent } from '../base-page/base-page.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -83,14 +82,14 @@ export class UserRepresentationComponent extends BasePageComponent implements Af
|
|||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: "error",
|
icon: "error",
|
||||||
title: "Oops...",
|
title: "Oops...",
|
||||||
text: "Bitte wählen Sie die repräsentative Benutzer!",
|
text: "Bitte wählen Sie die Vertretungen Benutzer!",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (!this.slRightGroupId) {
|
else if (!this.slRightGroupId) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: "error",
|
icon: "error",
|
||||||
title: "Oops...",
|
title: "Oops...",
|
||||||
text: "Bitte wählen Sie die richtige Gruppe!",
|
text: "Bitte wählen Sie die Rechte Gruppe!",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -111,7 +110,7 @@ export class UserRepresentationComponent extends BasePageComponent implements Af
|
|||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: "error",
|
icon: "error",
|
||||||
title: "Oops...",
|
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({
|
Swal.fire({
|
||||||
icon: "error",
|
icon: "error",
|
||||||
title: "Oops...",
|
title: "Oops...",
|
||||||
text: "Bitte wählen Sie die repräsentative Gruppe!",
|
text: "Bitte wählen Sie die Vertretungen Gruppe!",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (!this.slRightGroupId) {
|
else if (!this.slRightGroupId) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: "error",
|
icon: "error",
|
||||||
title: "Oops...",
|
title: "Oops...",
|
||||||
text: "Bitte wählen Sie die richtige Gruppe!",
|
text: "Bitte wählen Sie die rechte Gruppe!",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -162,11 +161,10 @@ export class UserRepresentationComponent extends BasePageComponent implements Af
|
|||||||
this.userReps.fetchData(this.slUserId)
|
this.userReps.fetchData(this.slUserId)
|
||||||
},
|
},
|
||||||
error: (error) => {
|
error: (error) => {
|
||||||
const errorMessage = error?.error || "Es ist ein unerwarteter Fehler aufgetreten.";
|
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: "error",
|
icon: "error",
|
||||||
title: "Oops...",
|
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) => {
|
error: (err) => {
|
||||||
this.slUserRepId = null;
|
this.slUserRepId = null;
|
||||||
this.repUsers.safelyUnselectAll()
|
this.repUsers.safelyUnselectAll()
|
||||||
const errorMessage = err?.error || "Es ist ein unerwarteter Fehler aufgetreten.";
|
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: "error",
|
icon: "error",
|
||||||
title: "Oops...",
|
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