GuestLog - Improvements to GuestDocument creation

- Added DocumentNumber validations.
- Added new page to see GuestDocument details.
This commit is contained in:
2026-07-30 20:31:13 +02:00
parent 5061f9362b
commit a5eea09eee
13 changed files with 465 additions and 42 deletions
@@ -0,0 +1,28 @@
namespace Somnia.GuestLog.Models.DTOs;
public class GuestDocIdDTO
{
public required string DocumentType { get; set; }
public required string DocumentNum { get; set; }
public static string EncodeAsString(GuestDocIdDTO docId)
{
return $"{docId.DocumentType}-{docId.DocumentNum}";
}
public static GuestDocIdDTO? DecodeFromString(string str)
{
var parts = str.Split("-");
if (parts.Length < 2)
{
return null;
}
return new()
{
DocumentType = parts[0],
DocumentNum = parts[1]
};
}
}