SHA256
GuestLog - StayEntry pages fixes
- Details/New - Fixed time field binding. Now it binds directly to the Model instead of using temp TimeSpans. - New - Fixed StayEntry validation to allow creating Stays with a DateOut in the past. - List - Added ordering to db results so limit behaves in a deterministic way. Fixed default search so stays created today are shown.
This commit is contained in:
@@ -27,7 +27,8 @@
|
||||
|
||||
@if (stayModel is not null)
|
||||
{
|
||||
<StayEntryForm Model="stayModel" ReadOnly="true" />
|
||||
<StayEntryForm Model="stayModel" FormMode="FormMode.ReadOnly" />
|
||||
<MudText Class="mt-4">@CreateTimeString</MudText>
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +42,22 @@
|
||||
|
||||
StayEntryDTO? stayModel = null;
|
||||
|
||||
private string? CreateTimeString
|
||||
{
|
||||
get
|
||||
{
|
||||
if (stayModel is null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
List<string> textList = [];
|
||||
textList.Add($"Created at: {stayModel.CreateTime?.ToString() ?? "???"}");
|
||||
textList.Add($"Last Update Time: {stayModel.UpdateTime?.ToString() ?? "???"}");
|
||||
return string.Join("; ", textList);
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
@* if (StayId is default)
|
||||
|
||||
Reference in New Issue
Block a user