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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user