From 8cf2183cd6d9f5f0fc8ca71905e8dc50434a4546 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Wed, 6 Nov 2024 15:37:48 +0100 Subject: [PATCH] refactor(user-representation): Umbenennung von 'slUserRepId' in 'slRepId' --- .../user-representation.component.ts | 12 ++++++------ .../Controllers/UserRepController.cs | 3 +-- .../Services/UserRepService.cs | 1 - 3 files changed, 7 insertions(+), 9 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 0ec3e89..2bb4460 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 @@ -26,7 +26,7 @@ export class UserRepresentationComponent extends BasePageComponent implements Af slGroupId?: number; slRepUserId?: number; slRepGroupId?: number; - slUserRepId?: number; + slRepId?: number; initWithoutData = () => { } @@ -181,10 +181,10 @@ export class UserRepresentationComponent extends BasePageComponent implements Af } repOnSelectedRows = (rows: GuiSelectedRow[]) => { - if (rows.length == 0 && this.slUserRepId) { - this.userRepService.delete(this.slUserRepId).subscribe({ + if (rows.length == 0 && this.slRepId) { + this.userRepService.delete(this.slRepId).subscribe({ next: (res) => { - this.slUserRepId = undefined; + this.slRepId = undefined; this.userReps.safelyUnselectAll(); if (this.slUserId != undefined) this.userReps.fetchData(this.slUserId) @@ -192,7 +192,7 @@ export class UserRepresentationComponent extends BasePageComponent implements Af this.userReps.fetchData(undefined, this.slGroupId) }, error: (err) => { - this.slUserRepId = undefined; + this.slRepId = undefined; this.repUsers.safelyUnselectAll() Swal.fire({ icon: "error", @@ -203,7 +203,7 @@ export class UserRepresentationComponent extends BasePageComponent implements Af }) } else if (rows.length > 0) { - this.slUserRepId = rows[0].source?.id; + this.slRepId = rows[0].source?.id; } } } diff --git a/DigitalData.UserManager.API/Controllers/UserRepController.cs b/DigitalData.UserManager.API/Controllers/UserRepController.cs index 3fc0188..d92e505 100644 --- a/DigitalData.UserManager.API/Controllers/UserRepController.cs +++ b/DigitalData.UserManager.API/Controllers/UserRepController.cs @@ -30,8 +30,7 @@ namespace DigitalData.UserManager.API.Controllers { _logger.LogNotice(n); return NotFound(); - }); - + }); } catch (Exception ex) { diff --git a/DigitalData.UserManager.Application/Services/UserRepService.cs b/DigitalData.UserManager.Application/Services/UserRepService.cs index fd7ba1d..2e946ce 100644 --- a/DigitalData.UserManager.Application/Services/UserRepService.cs +++ b/DigitalData.UserManager.Application/Services/UserRepService.cs @@ -1,5 +1,4 @@ using AutoMapper; -using DigitalData.Core.Application; using DigitalData.Core.DTO; using DigitalData.UserManager.Application.Contracts; using DigitalData.UserManager.Application.DTOs.UserRep;