refactor(user-representation): Umbenennung von 'slUserRepId' in 'slRepId'

This commit is contained in:
Developer 02 2024-11-06 15:37:48 +01:00
parent 881d2ccac8
commit 8cf2183cd6
3 changed files with 7 additions and 9 deletions

View File

@ -26,7 +26,7 @@ export class UserRepresentationComponent extends BasePageComponent implements Af
slGroupId?: number; slGroupId?: number;
slRepUserId?: number; slRepUserId?: number;
slRepGroupId?: number; slRepGroupId?: number;
slUserRepId?: number; slRepId?: number;
initWithoutData = () => { } initWithoutData = () => { }
@ -181,10 +181,10 @@ export class UserRepresentationComponent extends BasePageComponent implements Af
} }
repOnSelectedRows = (rows: GuiSelectedRow[]) => { repOnSelectedRows = (rows: GuiSelectedRow[]) => {
if (rows.length == 0 && this.slUserRepId) { if (rows.length == 0 && this.slRepId) {
this.userRepService.delete(this.slUserRepId).subscribe({ this.userRepService.delete(this.slRepId).subscribe({
next: (res) => { next: (res) => {
this.slUserRepId = undefined; this.slRepId = undefined;
this.userReps.safelyUnselectAll(); this.userReps.safelyUnselectAll();
if (this.slUserId != undefined) if (this.slUserId != undefined)
this.userReps.fetchData(this.slUserId) this.userReps.fetchData(this.slUserId)
@ -192,7 +192,7 @@ export class UserRepresentationComponent extends BasePageComponent implements Af
this.userReps.fetchData(undefined, this.slGroupId) this.userReps.fetchData(undefined, this.slGroupId)
}, },
error: (err) => { error: (err) => {
this.slUserRepId = undefined; this.slRepId = undefined;
this.repUsers.safelyUnselectAll() this.repUsers.safelyUnselectAll()
Swal.fire({ Swal.fire({
icon: "error", icon: "error",
@ -203,7 +203,7 @@ export class UserRepresentationComponent extends BasePageComponent implements Af
}) })
} }
else if (rows.length > 0) { else if (rows.length > 0) {
this.slUserRepId = rows[0].source?.id; this.slRepId = rows[0].source?.id;
} }
} }
} }

View File

@ -30,8 +30,7 @@ namespace DigitalData.UserManager.API.Controllers
{ {
_logger.LogNotice(n); _logger.LogNotice(n);
return NotFound(); return NotFound();
}); });
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@ -1,5 +1,4 @@
using AutoMapper; using AutoMapper;
using DigitalData.Core.Application;
using DigitalData.Core.DTO; using DigitalData.Core.DTO;
using DigitalData.UserManager.Application.Contracts; using DigitalData.UserManager.Application.Contracts;
using DigitalData.UserManager.Application.DTOs.UserRep; using DigitalData.UserManager.Application.DTOs.UserRep;