From 36c55b6382e925b801e61c05d2f8ce90b04f75ac Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Fri, 8 Nov 2024 10:17:43 +0100 Subject: [PATCH] refactor(UserRepCreateDto): Die Eigenschaften validFrom und validTo wurden zu not-null. --- .../user-representation/user-representation.component.ts | 2 ++ .../DTOs/UserRep/UserRepCreateDto.cs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/pages/user-representation/user-representation.component.ts b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/pages/user-representation/user-representation.component.ts index 3dbfaa7..4a7ef98 100644 --- a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/pages/user-representation/user-representation.component.ts +++ b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/pages/user-representation/user-representation.component.ts @@ -100,6 +100,8 @@ export class UserRepresentationComponent extends BasePageComponent implements Af userId: this.slUserId, groupId: this.slGroupId, repUserId: this.slRepUserId, + validFrom: new Date(), + validTo: new Date(new Date().setDate(new Date().getDate() + 7)) //after one week } this.userRepService.create(newUserRep).subscribe({ next: (response) => { diff --git a/DigitalData.UserManager.Application/DTOs/UserRep/UserRepCreateDto.cs b/DigitalData.UserManager.Application/DTOs/UserRep/UserRepCreateDto.cs index 56d859b..f1c2417 100644 --- a/DigitalData.UserManager.Application/DTOs/UserRep/UserRepCreateDto.cs +++ b/DigitalData.UserManager.Application/DTOs/UserRep/UserRepCreateDto.cs @@ -7,7 +7,7 @@ namespace DigitalData.UserManager.Application.DTOs.UserRep int? RepGroupId, int? GroupId, int? RepUserId, - DateTime? ValidFrom, - DateTime? ValidTo + DateTime ValidFrom, + DateTime ValidTo ) : BaseCreateDto(); } \ No newline at end of file