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() {
|
||||
const validFrom = this.range.value.start;
|
||||
const validTo = this.range.value.end;
|
||||
|
||||
if (!validFrom || !validTo)
|
||||
|
||||
if (!validFrom || !validTo) {
|
||||
Swal.fire({
|
||||
icon: "error",
|
||||
title: "Oops...",
|
||||
text: "Bitte geben Sie einen gültigen Datumsbereich ein!",
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
this.userRep.validFrom = validFrom!;
|
||||
this.userRep.validTo = validTo!;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user