SHA256
GuestLog - General Improvements.
- GuestDocument details - Added navigation to details for stays. - StayEntry details - Added dialog to see details of GuestDocuments. - StayEntry List - Added filter for result table. - StayEntry New - Show suggested guests on GuestSearchDialog so no searchs are required in some cases. - NavMenu - Removed default navigation links.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
@using Somnia.GuestLog.Models.DTOs;
|
||||
@using Somnia.GuestLog.Services;
|
||||
@using Microsoft.AspNetCore.WebUtilities;
|
||||
|
||||
@inject ISnackbar Snackbar
|
||||
@inject IDialogService DialogService
|
||||
@@ -42,6 +43,7 @@
|
||||
<MudTh>@LanguageLocale.dto_StayEntry_DateOut</MudTh>
|
||||
<MudTh>@LanguageLocale.dto_StayEntry_RoomCount</MudTh>
|
||||
<MudTh>@LanguageLocale.dto_StayEntry_RoomNumber</MudTh>
|
||||
<MudTh>@LanguageLocale.general_actions</MudTh>
|
||||
</HeaderContent>
|
||||
<RowTemplate>
|
||||
<MudTd DataLabel="@LanguageLocale.dto_StayEntry_DateIn">
|
||||
@@ -56,6 +58,9 @@
|
||||
<MudTd DataLabel="@LanguageLocale.dto_StayEntry_RoomNumber">
|
||||
@context.RoomNumber
|
||||
</MudTd>
|
||||
<MudTd DataLabel="@LanguageLocale.general_actions">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Info" OnClick="@(() => BtnViewStayDetails(context))" />
|
||||
</MudTd>
|
||||
</RowTemplate>
|
||||
<NoRecordsContent>
|
||||
<MudText>@LanguageLocale.general_noResults</MudText>
|
||||
@@ -110,16 +115,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnEdit()
|
||||
{
|
||||
Snackbar.Add("Not implemented yet!", Severity.Info);
|
||||
}
|
||||
|
||||
private void BtnReturn()
|
||||
{
|
||||
Navigation.NavigateTo(GuestConsts.Page_GuestDocs_List);
|
||||
}
|
||||
|
||||
private async Task LoadTabGuestStays()
|
||||
{
|
||||
//Only load when there is no data.
|
||||
@@ -137,4 +132,33 @@
|
||||
guestStayList = await stayService.GetStaysWithGuest(documentModel.DocumentType, documentModel.DocumentNum);
|
||||
guestStaysLoading = false;
|
||||
}
|
||||
|
||||
|
||||
#region Event Handlers
|
||||
|
||||
private void BtnEdit()
|
||||
{
|
||||
Snackbar.Add("Not implemented yet!", Severity.Info);
|
||||
}
|
||||
|
||||
private void BtnReturn()
|
||||
{
|
||||
Navigation.NavigateTo(GuestConsts.Page_GuestDocs_List);
|
||||
}
|
||||
|
||||
|
||||
private void BtnViewStayDetails(StayEntryDTO item)
|
||||
{
|
||||
string itemId = $"{item.Id ?? -1}";
|
||||
string uri = GuestConsts.Page_StayEntry_Detail.Replace(GuestConsts.Page_StayEntry_Detail_Param_Id, itemId);
|
||||
|
||||
string relativeUri = Navigation.ToBaseRelativePath(Navigation.Uri);
|
||||
uri = QueryHelpers.AddQueryString(uri, [
|
||||
new KeyValuePair<string, string?>(GuestConsts.QueryParam_ReturnUrl, relativeUri)
|
||||
]);
|
||||
Navigation.NavigateTo(uri);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user