refactor(rep-create-form.component): Erstellung gestoppt, wenn das Formular nicht gültig ist
This commit is contained in:
parent
7316343658
commit
371967380b
@ -68,14 +68,17 @@ export class RepCreateFormComponent implements OnInit {
|
|||||||
create() {
|
create() {
|
||||||
const validFrom = this.range.value.start;
|
const validFrom = this.range.value.start;
|
||||||
const validTo = this.range.value.end;
|
const validTo = this.range.value.end;
|
||||||
|
|
||||||
if (!validFrom || !validTo)
|
if (!validFrom || !validTo) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: "error",
|
icon: "error",
|
||||||
title: "Oops...",
|
title: "Oops...",
|
||||||
text: "Bitte geben Sie einen gültigen Datumsbereich ein!",
|
text: "Bitte geben Sie einen gültigen Datumsbereich ein!",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.userRep.validFrom = validFrom!;
|
this.userRep.validFrom = validFrom!;
|
||||||
this.userRep.validTo = validTo!;
|
this.userRep.validTo = validTo!;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user