From a78c117a47314885eb18cea5bb3b8fe964381e48 Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 21 Jul 2025 10:24:43 +0200 Subject: [PATCH] feat: extend default Profile with sample ProfileObjects - Added two sample `ProfileObject` instances to the static `Default` Profile - Includes object metadata like ObjStateId, ObjectId, headlines, and sublines - Enhances the default response of `GET /api/profile` for testing/demo purposes --- .../Controllers/ProfileController.cs | 27 +++++++++++++++++-- .../Entities/ProfileObjects.cs | 6 +++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/WorkFlow.API/Controllers/ProfileController.cs b/src/WorkFlow.API/Controllers/ProfileController.cs index 737ff20..b7aefd8 100644 --- a/src/WorkFlow.API/Controllers/ProfileController.cs +++ b/src/WorkFlow.API/Controllers/ProfileController.cs @@ -12,7 +12,7 @@ namespace WorkFlow.API.Controllers; [Authorize] public class ProfileController : ControllerBase { - public static readonly Profile Default = new () + public static readonly Profile Default = new() { Id = 1, TypeId = 1, @@ -20,7 +20,30 @@ public class ProfileController : ControllerBase Subtitle = "Freigabe in Rolle Verantwortlich", CountObj = 2, ForeColor = "Yellow", - BackColor = "Black" + BackColor = "Black", + Objects = new ProfileObject[] + { + new() + { + ObjStateId = 3, + ObjectId = 21601, + Headline1 = "Aveco Holding", + Headline2 = "Digital Data", + Subline1 = null, + Subline2 = "25 4711", + CmdCheckIn = "" + }, + new() + { + ObjStateId = 4, + ObjectId = 21600, + Headline1 = "Aveco", + Headline2 = "Hammer AF", + Subline1 = null, + Subline2 = "456875", + CmdCheckIn = "" + } + } }; private readonly ILogger _logger; diff --git a/src/WorkFlow.Domain/Entities/ProfileObjects.cs b/src/WorkFlow.Domain/Entities/ProfileObjects.cs index e6e55af..fdc8326 100644 --- a/src/WorkFlow.Domain/Entities/ProfileObjects.cs +++ b/src/WorkFlow.Domain/Entities/ProfileObjects.cs @@ -3,10 +3,16 @@ public class ProfileObject { public int? ObjStateId { get; set; } + public int? ObjectId { get; set; } + public string? Headline1 { get; set; } + public string? Headline2 { get; set; } + public string? Subline1 { get; set; } + public string? Subline2 { get; set; } + public string? CmdCheckIn { get; set; } } \ No newline at end of file