SHA256
GuestLog - Small improvements and changes in localization for DataLists.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
@inject IDataListService dataListService;
|
||||
@inject IValidator<GuestDocumentDTO> guestDocValidator;
|
||||
@inject IStringLocalizer<LanguageLocale> lang;
|
||||
|
||||
|
||||
<MudForm @ref="@_form" Model="@Model" Validation="@((guestDocValidator as GuestDocumentDTOValidator)!.ValidateValue)" ValidationDelay="0"
|
||||
ReadOnly="@ReadOnly">
|
||||
@@ -20,7 +20,7 @@
|
||||
Required>
|
||||
@foreach (string docType in dataListService.GetDataListByName(GuestConsts.DataList_DocumentTypes))
|
||||
{
|
||||
<MudSelectItem Value="docType">@lang[$"dataList.DocumentType.{docType}"]</MudSelectItem>
|
||||
<MudSelectItem Value="docType">@dataListService.GetLocalizedValue(GuestConsts.DataList_DocumentTypes, docType)</MudSelectItem>
|
||||
}
|
||||
</MudSelect>
|
||||
<MudTextField @bind-Value="Model.DocumentNum" For="@(() => Model.DocumentNum)" Label="@LanguageLocale.dto_GuestDocument_DocumentNum"
|
||||
@@ -36,7 +36,7 @@
|
||||
</MudStack>
|
||||
|
||||
<MudAutocomplete T="string" @bind-Value="Model.Nationality" For="@(() => Model.Nationality)" Label="@LanguageLocale.dto_GuestDocument_Nationality"
|
||||
SearchFunc="@SearchCountryCodes" ToStringFunc="@(e=> string.IsNullOrEmpty(e) ? "" : lang[$"dataList.CountryCode.{e}"])"
|
||||
SearchFunc="@SearchCountryCodes" ToStringFunc="@(e=> string.IsNullOrEmpty(e) ? "" : @dataListService.GetLocalizedValue(GuestConsts.DataList_CountryCodes, e))"
|
||||
SelectValueOnTab="true" AdornmentIcon="@Icons.Material.Filled.Search" />
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
@@ -58,7 +58,7 @@
|
||||
<MudSelect @bind-Value="Model.Gender" For="@(() => Model.Gender)" Label="@LanguageLocale.dto_GuestDocument_Gender">
|
||||
@foreach (string gender in dataListService.GetDataListByName(GuestConsts.DataList_GenderOptions))
|
||||
{
|
||||
<MudSelectItem Value="gender">@lang[$"dataList.GenderOption.{gender}"]</MudSelectItem>
|
||||
<MudSelectItem Value="gender">@dataListService.GetLocalizedValue(GuestConsts.DataList_GenderOptions, gender)</MudSelectItem>
|
||||
}
|
||||
</MudSelect>
|
||||
</MudStack>
|
||||
@@ -95,7 +95,7 @@
|
||||
</MudStack>
|
||||
<MudStack Row>
|
||||
<MudAutocomplete T="string" @bind-Value="Model.AddressCountry" For="@(() => Model.AddressCountry)" Label="@LanguageLocale.dto_GuestDocument_AddressCountry"
|
||||
SearchFunc="@SearchCountryCodes" ToStringFunc="@(e=> string.IsNullOrEmpty(e) ? "" : lang[$"dataList.CountryCode.{e}"])"
|
||||
SearchFunc="@SearchCountryCodes" ToStringFunc="@(e=> string.IsNullOrEmpty(e) ? "" : @dataListService.GetLocalizedValue(GuestConsts.DataList_CountryCodes, e))"
|
||||
SelectValueOnTab="true" AdornmentIcon="@Icons.Material.Filled.Search" />
|
||||
|
||||
<MudTextField @bind-Value="Model.ZipCode" For="@(() => Model.ZipCode)" Immediate="true"
|
||||
@@ -157,7 +157,7 @@
|
||||
//Init dict.
|
||||
foreach(string code in dataListService.GetDataListByName(GuestConsts.DataList_CountryCodes))
|
||||
{
|
||||
countryDict.Add(code, lang[$"dataList.CountryCode.{code}"]);
|
||||
countryDict.Add(code, dataListService.GetLocalizedValue(GuestConsts.DataList_CountryCodes, code));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
@inject NavigationManager Navigation
|
||||
@inject ISnackbar Snackbar
|
||||
@inject IDialogService DialogService
|
||||
@inject IStringLocalizer<LanguageLocale> Lang
|
||||
@inject IDataListService dataListService;
|
||||
|
||||
|
||||
<PageTitle>Somnia - Guest Docs</PageTitle>
|
||||
@@ -46,13 +46,15 @@
|
||||
</MudStack>
|
||||
</ToolBarContent>
|
||||
<Columns>
|
||||
<PropertyColumn Property="x => x.DocumentType" Hideable="false"
|
||||
Title="@LanguageLocale.dto_GuestDocument_DocumentType" />
|
||||
<PropertyColumn Title="@LanguageLocale.dto_GuestDocument_DocumentType"
|
||||
Property="x => dataListService.GetLocalizedValue(GuestConsts.DataList_DocumentTypes, x.DocumentType)"
|
||||
Hideable="false" />
|
||||
<PropertyColumn Property="x => x.DocumentNum" Hideable="false"
|
||||
Title="@LanguageLocale.dto_GuestDocument_DocumentNum" />
|
||||
<PropertyColumn Property="x => x.Name" Title="@LanguageLocale.dto_GuestDocument_Name" />
|
||||
<PropertyColumn Property="x => x.Surname" Title="@LanguageLocale.dto_GuestDocument_Surname" />
|
||||
<PropertyColumn Property="x => x.Nationality" Title="@LanguageLocale.dto_GuestDocument_Surname2" />
|
||||
<PropertyColumn Title="@LanguageLocale.dto_GuestDocument_Nationality"
|
||||
Property="x => dataListService.GetLocalizedValue(GuestConsts.DataList_CountryCodes, x.Nationality)" />
|
||||
<PropertyColumn Property="x => x.UpdateTime" Title="@LanguageLocale.dto_GuestDocument_UpdateTime" />
|
||||
|
||||
<TemplateColumn CellClass="d-flex justify-between" Title="Options" StickyRight Hideable="false"
|
||||
|
||||
Reference in New Issue
Block a user