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
This commit is contained in:
tekh 2025-07-21 10:24:43 +02:00
parent 07e16f8aca
commit a78c117a47
2 changed files with 31 additions and 2 deletions

View File

@ -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<ProfileController> _logger;

View File

@ -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; }
}