From 371967380b91aeeef7d4e862e47f8f01324fe9cb Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Fri, 8 Nov 2024 16:27:41 +0100 Subject: [PATCH] =?UTF-8?q?refactor(rep-create-form.component):=20Erstellu?= =?UTF-8?q?ng=20gestoppt,=20wenn=20das=20Formular=20nicht=20g=C3=BCltig=20?= =?UTF-8?q?ist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../forms/rep-create-form/rep-create-form.component.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/forms/rep-create-form/rep-create-form.component.ts b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/forms/rep-create-form/rep-create-form.component.ts index e80d323..f5b5dfb 100644 --- a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/forms/rep-create-form/rep-create-form.component.ts +++ b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/forms/rep-create-form/rep-create-form.component.ts @@ -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!;