Compare commits

...
3 Commits
Author SHA256 Message Date
Daniel-Garmig 2335c223ea GuestLog - GuestDocumentList - Added filter for GuestDocuments. 2026-08-03 21:33:30 +02:00
Daniel-Garmig a5eea09eee GuestLog - Improvements to GuestDocument creation
- Added DocumentNumber validations.
- Added new page to see GuestDocument details.
2026-07-30 20:31:13 +02:00
Daniel-Garmig 5061f9362b GuestLog - Small improvements and changes in localization for DataLists. 2026-07-29 14:46:06 +02:00
22 changed files with 1053 additions and 358 deletions
@@ -6,7 +6,7 @@
@inject IDataListService dataListService; @inject IDataListService dataListService;
@inject IValidator<GuestDocumentDTO> guestDocValidator; @inject IValidator<GuestDocumentDTO> guestDocValidator;
@inject IStringLocalizer<LanguageLocale> lang;
<MudForm @ref="@_form" Model="@Model" Validation="@((guestDocValidator as GuestDocumentDTOValidator)!.ValidateValue)" ValidationDelay="0" <MudForm @ref="@_form" Model="@Model" Validation="@((guestDocValidator as GuestDocumentDTOValidator)!.ValidateValue)" ValidationDelay="0"
ReadOnly="@ReadOnly"> ReadOnly="@ReadOnly">
@@ -15,29 +15,31 @@
<MudPaper Class="pa-4" Elevation="3" Height="100%"> <MudPaper Class="pa-4" Elevation="3" Height="100%">
<MudText Typo="Typo.subtitle1" Align="Align.Center">@LanguageLocale.control_GuestDocForm_sectionDocument</MudText> <MudText Typo="Typo.subtitle1" Align="Align.Center">@LanguageLocale.control_GuestDocForm_sectionDocument</MudText>
<MudDivider DividerType="DividerType.Middle" Class="mb-4" /> <MudDivider DividerType="DividerType.Middle" Class="mb-4" />
<MudStack Row> <MudStack Row style="@FieldMarginY">
<MudSelect @bind-Value="Model.DocumentType" For="@(() => Model.DocumentType)" Label="@LanguageLocale.dto_GuestDocument_DocumentType" <MudSelect @bind-Value="Model.DocumentType" For="@(() => Model.DocumentType)" Label="@LanguageLocale.dto_GuestDocument_DocumentType"
Required> Required ReadOnly="true">
@foreach (string docType in dataListService.GetDataListByName(GuestConsts.DataList_DocumentTypes)) @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> </MudSelect>
<MudTextField @bind-Value="Model.DocumentNum" For="@(() => Model.DocumentNum)" Label="@LanguageLocale.dto_GuestDocument_DocumentNum" <MudTextField @bind-Value="Model.DocumentNum" For="@(() => Model.DocumentNum)" Label="@LanguageLocale.dto_GuestDocument_DocumentNum"
Immediate="true" Required /> Immediate="true" Required ReadOnly="true" />
</MudStack> </MudStack>
<MudStack Row> <MudStack Row style="@FieldMarginY">
<MudDatePicker @bind-Date="Model.IssueDate" For="@(() => Model.IssueDate)" Label="@LanguageLocale.dto_GuestDocument_IssueDate" <MudDatePicker @bind-Date="Model.IssueDate" For="@(() => Model.IssueDate)" Label="@LanguageLocale.dto_GuestDocument_IssueDate"
Clearable OpenTo="OpenTo.Year" Editable /> Clearable OpenTo="OpenTo.Year" Editable />
<MudTextField @bind-Value="Model.SupportNum" For="@(() => Model.SupportNum)" Label="@LanguageLocale.dto_GuestDocument_SupportNum" <MudTextField @bind-Value="Model.SupportNum" For="@(() => Model.SupportNum)" Label="@LanguageLocale.dto_GuestDocument_SupportNum"
Immediate="true" Required="@isSuportNumberRequired" /> Immediate="true" Required="@isSuportNumberRequired" Mask="@(new PatternMask("aaa000000"))"
OnBlur="@(() => Model.SupportNum = Model.SupportNum?.ToUpper())" />
</MudStack> </MudStack>
<MudAutocomplete T="string" @bind-Value="Model.Nationality" For="@(() => Model.Nationality)" Label="@LanguageLocale.dto_GuestDocument_Nationality" <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" /> SelectValueOnTab="true" AdornmentIcon="@Icons.Material.Filled.Search"
style="@FieldMarginY" />
</MudPaper> </MudPaper>
</MudItem> </MudItem>
<MudItem xs="12" md="6"> <MudItem xs="12" md="6">
@@ -45,20 +47,24 @@
<MudText Typo="Typo.subtitle1" Align="Align.Center">@LanguageLocale.control_GuestDocForm_sectionGuest</MudText> <MudText Typo="Typo.subtitle1" Align="Align.Center">@LanguageLocale.control_GuestDocForm_sectionGuest</MudText>
<MudDivider DividerType="DividerType.Middle" Class="mb-4" /> <MudDivider DividerType="DividerType.Middle" Class="mb-4" />
<MudTextField @bind-Value="Model.Name" For="@(() => Model.Name)" Immediate="true" Label="@LanguageLocale.dto_GuestDocument_Name" /> <MudTextField @bind-Value="Model.Name" For="@(() => Model.Name)"
<MudTextField @bind-Value="Model.Surname" For="@(() => Model.Surname)" Immediate="true" Label="@LanguageLocale.dto_GuestDocument_Name"
Label="@LanguageLocale.dto_GuestDocument_Surname" /> Immediate="true" OnBlur="@(() => Model.Name = Model.Name?.ToUpper())" />
<MudTextField @bind-Value="Model.Surname2" For="@(() => Model.Surname2)" Immediate="true" <MudTextField @bind-Value="Model.Surname" For="@(() => Model.Surname)"
Label="Surname2" /> Label="@LanguageLocale.dto_GuestDocument_Surname"
Immediate="true" OnBlur="@(() => Model.Surname = Model.Surname?.ToUpper())" />
<MudTextField @bind-Value="Model.Surname2" For="@(() => Model.Surname2)"
Label="@LanguageLocale.dto_GuestDocument_Surname2"
Immediate="true" OnBlur="@(() => Model.Surname2 = Model.Surname2?.ToUpper())" />
<MudStack Row> <MudStack Row style="@FieldMarginY">
<MudDatePicker @bind-Date="Model.BirthDate" For="@(() => Model.BirthDate)" Label="@LanguageLocale.dto_GuestDocument_BirthDate" <MudDatePicker @bind-Date="Model.BirthDate" For="@(() => Model.BirthDate)" Label="@LanguageLocale.dto_GuestDocument_BirthDate"
Clearable OpenTo="OpenTo.Year" Editable /> Clearable OpenTo="OpenTo.Year" Editable />
<MudSelect @bind-Value="Model.Gender" For="@(() => Model.Gender)" Label="@LanguageLocale.dto_GuestDocument_Gender"> <MudSelect @bind-Value="Model.Gender" For="@(() => Model.Gender)" Label="@LanguageLocale.dto_GuestDocument_Gender">
@foreach (string gender in dataListService.GetDataListByName(GuestConsts.DataList_GenderOptions)) @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> </MudSelect>
</MudStack> </MudStack>
@@ -71,10 +77,12 @@
<MudDivider DividerType="DividerType.Middle" Class="mb-4" /> <MudDivider DividerType="DividerType.Middle" Class="mb-4" />
<MudStack Row> <MudStack Row>
<MudTextField @bind-Value="Model.PhoneNumber" For="@(() => Model.PhoneNumber)" Immediate="true" <MudTextField @bind-Value="Model.PhoneNumber" For="@(() => Model.PhoneNumber)"
Label="@LanguageLocale.dto_GuestDocument_PhoneNumber" /> Label="@LanguageLocale.dto_GuestDocument_PhoneNumber"
<MudTextField @bind-Value="Model.EmailAddress" For="@(() => Model.EmailAddress)" Immediate="true" InputType="InputType.Telephone" Immediate="true" />
Label="@LanguageLocale.dto_GuestDocument_EmailAddress" /> <MudTextField @bind-Value="Model.EmailAddress" For="@(() => Model.EmailAddress)"
Label="@LanguageLocale.dto_GuestDocument_EmailAddress"
InputType="InputType.Email" Immediate="true" />
</MudStack> </MudStack>
</MudPaper> </MudPaper>
</MudItem> </MudItem>
@@ -85,17 +93,18 @@
<MudDivider DividerType="DividerType.Middle" Class="mb-4" /> <MudDivider DividerType="DividerType.Middle" Class="mb-4" />
<MudTextField @bind-Value="Model.Address" For="@(() => Model.Address)" Immediate="true" Label="@LanguageLocale.dto_GuestDocument_Address" /> <MudTextField @bind-Value="Model.Address" For="@(() => Model.Address)" Immediate="true" Label="@LanguageLocale.dto_GuestDocument_Address" />
<MudStack Row> <MudStack Row style="@FieldMarginY">
<MudTextField @bind-Value="Model.AddressCity" For="@(() => Model.AddressCity)" Immediate="true" <MudTextField @bind-Value="Model.AddressCity" For="@(() => Model.AddressCity)"
Label="@LanguageLocale.dto_GuestDocument_AddressCity" /> Label="@LanguageLocale.dto_GuestDocument_AddressCity" Immediate="true" />
<MudTextField @bind-Value="Model.AddressProvince" For="@(() => Model.AddressProvince)" Immediate="true" <MudTextField @bind-Value="Model.AddressProvince" For="@(() => Model.AddressProvince)"
Label="@LanguageLocale.dto_GuestDocument_AddressProvince" /> Label="@LanguageLocale.dto_GuestDocument_AddressProvince" Immediate="true" />
<MudTextField @bind-Value="Model.AddressState" For="@(() => Model.AddressState)" Immediate="true" <MudTextField @bind-Value="Model.AddressState" For="@(() => Model.AddressState)"
Label="@LanguageLocale.dto_GuestDocument_AddressState" /> Label="@LanguageLocale.dto_GuestDocument_AddressState" Immediate="true" />
</MudStack> </MudStack>
<MudStack Row> <MudStack Row style="@FieldMarginY">
<MudAutocomplete T="string" @bind-Value="Model.AddressCountry" For="@(() => Model.AddressCountry)" Label="@LanguageLocale.dto_GuestDocument_AddressCountry" <MudAutocomplete T="string" @bind-Value="Model.AddressCountry" For="@(() => Model.AddressCountry)"
SearchFunc="@SearchCountryCodes" ToStringFunc="@(e=> string.IsNullOrEmpty(e) ? "" : lang[$"dataList.CountryCode.{e}"])" Label="@LanguageLocale.dto_GuestDocument_AddressCountry"
SearchFunc="@SearchCountryCodes" ToStringFunc="@(e=> string.IsNullOrEmpty(e) ? "" : @dataListService.GetLocalizedValue(GuestConsts.DataList_CountryCodes, e))"
SelectValueOnTab="true" AdornmentIcon="@Icons.Material.Filled.Search" /> SelectValueOnTab="true" AdornmentIcon="@Icons.Material.Filled.Search" />
<MudTextField @bind-Value="Model.ZipCode" For="@(() => Model.ZipCode)" Immediate="true" <MudTextField @bind-Value="Model.ZipCode" For="@(() => Model.ZipCode)" Immediate="true"
@@ -117,9 +126,10 @@
private MudForm _form = null!; private MudForm _form = null!;
private const string FieldMarginY = "margin-block: 0.5em";
private Dictionary<string, string>? countryDict = null; private Dictionary<string, string>? countryDict = null;
private bool isSuportNumberRequired { get => Model?.Nationality == "ESP"; } private bool isSuportNumberRequired { get => Model?.Nationality == GuestConsts.CountryCode_ESP; }
private string CreateTimeString private string CreateTimeString
{ {
get get
@@ -146,18 +156,20 @@
private async Task<IEnumerable<string>> SearchCountryCodes(string value, CancellationToken token) private async Task<IEnumerable<string>> SearchCountryCodes(string value, CancellationToken token)
{ {
// if text is null or empty, show complete list // if text is null or empty, show complete list
if (string.IsNullOrEmpty(value)) { if (string.IsNullOrEmpty(value))
{
return new string[0]; return new string[0];
} }
if(countryDict is null || countryDict.Count == 0) { if (countryDict is null || countryDict.Count == 0)
{
var countryCodeSet = dataListService.GetDataListByName(GuestConsts.DataList_CountryCodes); var countryCodeSet = dataListService.GetDataListByName(GuestConsts.DataList_CountryCodes);
countryDict = new(countryCodeSet.Count); countryDict = new(countryCodeSet.Count);
//Init dict. //Init dict.
foreach(string code in dataListService.GetDataListByName(GuestConsts.DataList_CountryCodes)) 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));
} }
} }
@@ -0,0 +1,81 @@
@attribute [Route($"{GuestConsts.Page_GuestDocs_Detail}")]
@using Somnia.GuestLog.Models.DTOs;
@using Somnia.GuestLog.Services;
@inject ISnackbar Snackbar
@inject IDialogService DialogService
@inject NavigationManager Navigation
@inject IGuestDocumentService guestDocService
@inject FluentValidation.IValidator<GuestDocIdDTO> docIdValidator;
<PageTitle>Somnia - Guest Docs - Details</PageTitle>
<MudStack Row="true" Class="my-4">
<MudText Typo="Typo.h4" GutterBottom="true">Guest Document - "@docId"</MudText>
<MudSpacer />
<MudButton Variant="Variant.Filled" Color="Color.Success" Size="Size.Small" StartIcon="@Icons.Material.Filled.Add"
OnClick="() => BtnEdit()">
@LanguageLocale.general_btnEdit
</MudButton>
<MudButton Variant="Variant.Filled" Color="Color.Default" Size="Size.Small"
StartIcon="@Icons.Material.Filled.ArrowBack" OnClick="() => BtnReturn()">
@LanguageLocale.general_btnReturn
</MudButton>
</MudStack>
@if (documentModel is not null)
{
<GuestDocForm @ref="_form" Model="documentModel" ReadOnly="true" />
}
@code {
[Parameter]
public string? docId { get; set; }
GuestDocForm _form = null!;
GuestDocumentDTO? documentModel = null;
protected override async Task OnInitializedAsync()
{
if (docId is null)
{
Snackbar.Add("No GuestDocument provided!!", Severity.Error);
Navigation.NotFound();
return;
}
GuestDocIdDTO? docIdModel = GuestDocIdDTO.DecodeFromString(docId);
if (docIdModel is null)
{
Snackbar.Add($"Provided GuestDocId can't be decoded: '{docId}'", Severity.Error);
Navigation.NotFound();
return;
}
//Get model from db.
documentModel = await guestDocService.GetDtoByIdAsync(docIdModel.DocumentType, docIdModel.DocumentNum);
if (documentModel is null)
{
Snackbar.Add($"GuestDocument not found with ID: '{docId}'", Severity.Error);
Navigation.NotFound();
return;
}
}
private void BtnEdit()
{
Snackbar.Add("Not implemented yet!", Severity.Info);
}
private void BtnReturn()
{
Navigation.NavigateTo(GuestConsts.Page_GuestDocs_List);
}
}
@@ -7,38 +7,59 @@
@inject NavigationManager Navigation @inject NavigationManager Navigation
@inject ISnackbar Snackbar @inject ISnackbar Snackbar
@inject IDialogService DialogService @inject IDialogService DialogService
@inject IStringLocalizer<LanguageLocale> Lang @inject IDataListService dataListService;
<PageTitle>Somnia - Guest Docs</PageTitle> <PageTitle>Somnia - Guest Docs</PageTitle>
<MudStack Row="true" Class="my-4"> <MudStack Row="true" Class="my-4">
<MudText Typo="Typo.h4" GutterBottom="true">Guest Documents</MudText> <MudText Typo="Typo.h4" GutterBottom="true">@LanguageLocale.page_GuestDocList_pageTitle</MudText>
<MudSpacer /> <MudSpacer />
<MudButton Variant="Variant.Filled" Color="Color.Success" Size="Size.Small" StartIcon="@Icons.Material.Filled.Add" <MudButton Variant="Variant.Filled" Color="Color.Primary" Size="Size.Small"
StartIcon="@Icons.Material.Filled.Search" OnClick="() => SearchDataAsync()">
@LanguageLocale.general_btnSearch
</MudButton>
<MudButton Variant="Variant.Filled" Color="Color.Primary" Size="Size.Small" StartIcon="@Icons.Material.Filled.Add"
OnClick="() => BtnNewGuest()"> OnClick="() => BtnNewGuest()">
@LanguageLocale.page_GuestDocList_btnNewGuest @LanguageLocale.page_GuestDocList_btnNewGuest
</MudButton> </MudButton>
</MudStack> </MudStack>
<MudSelect T="string" MultiSelection="true" FullWidth="true" Dense="true" Clearable="true" Margin="@Margin.Dense" <MudPaper Class="pa-4 my-4" Elevation="2" Height="100%">
Class="filter-input category-filter" Label="Module" Placeholder="Select Modules" <MudForm Model="@docFilter">
SelectedValuesChanged="@FilterModuleValuesChanged"> <MudStack Row Breakpoint="Breakpoint.LgAndDown" StretchItems="StretchItems.All">
@foreach (var module in _moduleList) <MudStack Row style="margin-block: 0.2em;">
<MudSelect @bind-Value="docFilter.DocumentType" For="@(() => docFilter.DocumentType)"
Label="@LanguageLocale.dto_GuestDocument_DocumentType">
@foreach (string docType in dataListService.GetDataListByName(GuestConsts.DataList_DocumentTypes))
{ {
<MudSelectItem T="string" Value="@module">@module</MudSelectItem> <MudSelectItem Value="docType">
@dataListService.GetLocalizedValue(GuestConsts.DataList_DocumentTypes, docType)
</MudSelectItem>
} }
</MudSelect> </MudSelect>
<MudTextField @bind-Value="docFilter.DocumentNumber" For="@(() => docFilter.DocumentNumber)"
Label="@LanguageLocale.dto_GuestDocument_DocumentNum" />
</MudStack>
<MudStack Row style="margin-block: 0.2em;">
<MudTextField @bind-Value="docFilter.Name" For="@(() => docFilter.Name)"
Label="@LanguageLocale.dto_GuestDocument_Name"
HelperText="@LanguageLocale.general_wildcardHelperText" HelperTextOnFocus="true" />
<MudTextField @bind-Value="docFilter.Surname" For="@(() => docFilter.Surname)"
Label="@LanguageLocale.dto_GuestDocument_Surname"
HelperText="@LanguageLocale.general_wildcardHelperText" HelperTextOnFocus="true" />
</MudStack>
</MudStack>
</MudForm>
</MudPaper>
<MudDataGrid @ref="_dataGrid" T="GuestDocumentDTO" Items="@guestDocList" Loading="@_dataLoading" ReadOnly="true" <MudDataGrid @ref="_dataGrid" T="GuestDocumentDTO" Items="@guestDocList" Loading="@_dataLoading" ReadOnly="true"
Hideable="true" ColumnsPanelReordering="true"> Hideable="true" ColumnsPanelReordering="true" Elevation="2">
<ToolBarContent> <ToolBarContent>
<MudText Typo="Typo.subtitle1">Document List</MudText> <MudText Typo="Typo.subtitle1">@LanguageLocale.page_GuestDocList_documentList</MudText>
<MudStack Class="ml-auto" Row="true" AlignItems="AlignItems.End"> <MudStack Class="ml-auto" Row="true" AlignItems="AlignItems.Center">
<MudButton StartIcon="@Icons.Material.Outlined.Refresh" Variant="Variant.Outlined" Size="Size.Small" <MudCheckBox @bind-Value="_showAllData" Label="@LanguageLocale.page_GuestDocList_showAllElements"
OnClick="() => LoadDataAsync()"> LabelPlacement="Placement.Start" />
@LanguageLocale.general_reloadData
</MudButton>
<MudButton StartIcon="@Icons.Material.Outlined.ViewColumn" Variant="Variant.Outlined" Size="Size.Small" <MudButton StartIcon="@Icons.Material.Outlined.ViewColumn" Variant="Variant.Outlined" Size="Size.Small"
OnClick="(args) => BtnConfigureColumnsClick(args)"> OnClick="(args) => BtnConfigureColumnsClick(args)">
@LanguageLocale.general_ConfigureColumns @LanguageLocale.general_ConfigureColumns
@@ -46,13 +67,15 @@
</MudStack> </MudStack>
</ToolBarContent> </ToolBarContent>
<Columns> <Columns>
<PropertyColumn Property="x => x.DocumentType" Hideable="false" <PropertyColumn Title="@LanguageLocale.dto_GuestDocument_DocumentType"
Title="@LanguageLocale.dto_GuestDocument_DocumentType" /> Property="x => dataListService.GetLocalizedValue(GuestConsts.DataList_DocumentTypes, x.DocumentType)"
Hideable="false" />
<PropertyColumn Property="x => x.DocumentNum" Hideable="false" <PropertyColumn Property="x => x.DocumentNum" Hideable="false"
Title="@LanguageLocale.dto_GuestDocument_DocumentNum" /> Title="@LanguageLocale.dto_GuestDocument_DocumentNum" />
<PropertyColumn Property="x => x.Name" Title="@LanguageLocale.dto_GuestDocument_Name" /> <PropertyColumn Property="x => x.Name" Title="@LanguageLocale.dto_GuestDocument_Name" />
<PropertyColumn Property="x => x.Surname" Title="@LanguageLocale.dto_GuestDocument_Surname" /> <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" /> <PropertyColumn Property="x => x.UpdateTime" Title="@LanguageLocale.dto_GuestDocument_UpdateTime" />
<TemplateColumn CellClass="d-flex justify-between" Title="Options" StickyRight Hideable="false" <TemplateColumn CellClass="d-flex justify-between" Title="Options" StickyRight Hideable="false"
@@ -65,9 +88,13 @@
</CellTemplate> </CellTemplate>
</TemplateColumn> </TemplateColumn>
</Columns> </Columns>
<PagerContent>
<MudDataGridPager T="GuestDocumentDTO" />
</PagerContent>
</MudDataGrid> </MudDataGrid>
<MudMessageBox @ref="_msgBoxConfirmDelete" Title="Warning" CancelText="Cancel"> <MudMessageBox @ref="_msgBoxConfirmDelete" Title="@LanguageLocale.general_confirmTitle"
CancelText="@LanguageLocale.general_btnCancel">
<MessageContent> <MessageContent>
@LanguageLocale.general_confirmDeleteMsg @LanguageLocale.general_confirmDeleteMsg
</MessageContent> </MessageContent>
@@ -83,8 +110,10 @@
private IEnumerable<GuestDocumentDTO> guestDocList = []; private IEnumerable<GuestDocumentDTO> guestDocList = [];
private bool _dataLoading = true; private bool _dataLoading = true;
private HashSet<string> _moduleList = []; private bool _showAllData = false;
private HashSet<string> _selectedModuleList = []; private const int resultLimit = 200;
private GuestDocFilterDTO docFilter = new GuestDocFilterDTO();
private MudDataGrid<GuestDocumentDTO> _dataGrid = null!; private MudDataGrid<GuestDocumentDTO> _dataGrid = null!;
private MudMessageBox _msgBoxConfirmDelete = null!; private MudMessageBox _msgBoxConfirmDelete = null!;
@@ -93,17 +122,24 @@
protected override async Task OnInitializedAsync() protected override async Task OnInitializedAsync()
{ {
await LoadDataAsync(showMsg: false); await LoadDataAsync(showMsg: false);
@* _moduleList = guestDocList.Select(e => e.Module).ToHashSet(); *@
} }
#region Data Loading #region Data Loading
private async Task SearchDataAsync()
{
docFilter.Name = docFilter.Name?.ToUpper();
docFilter.Surname = docFilter.Surname?.ToUpper();
await LoadDataAsync();
}
private async Task LoadDataAsync(bool showMsg = true) private async Task LoadDataAsync(bool showMsg = true)
{ {
_dataLoading = true; _dataLoading = true;
guestDocList = await GuestDocService.GetDtoListAsync(); int dataLimit = _showAllData ? 0 : resultLimit;
guestDocList = await GuestDocService.GetDtoListByFilterAsync(filter: docFilter, limit: dataLimit);
if (showMsg) if (showMsg)
{ {
@@ -116,13 +152,6 @@
#region Event Handlers #region Event Handlers
private async Task FilterModuleValuesChanged(IReadOnlyCollection<string> newValues)
{
_selectedModuleList = [.. newValues];
await LoadDataAsync();
}
private async Task BtnConfigureColumnsClick(MouseEventArgs args) private async Task BtnConfigureColumnsClick(MouseEventArgs args)
{ {
_dataGrid.ShowColumnsPanel(args); _dataGrid.ShowColumnsPanel(args);
@@ -1,15 +1,16 @@
@attribute [Route($"{GuestConsts.Page_GuestDocs_New}")] @attribute [Route($"{GuestConsts.Page_GuestDocs_New}")]
@using Microsoft.EntityFrameworkCore;
@using Somnia.GuestLog.Models.DTOs; @using Somnia.GuestLog.Models.DTOs;
@using Somnia.GuestLog.Infrastructure;
@using Somnia.GuestLog.Services; @using Somnia.GuestLog.Services;
@using Somnia.GuestLog.Validators;
@inject IDbContextFactory<GuestLogContext> contextFactory
@inject ISnackbar Snackbar @inject ISnackbar Snackbar
@inject IDialogService DialogService @inject IDialogService DialogService
@inject NavigationManager Navigation @inject NavigationManager Navigation
@inject IGuestDocumentService guestDocService @inject IGuestDocumentService guestDocService
@inject IDataListService dataListService;
@inject FluentValidation.IValidator<GuestDocIdDTO> docIdValidator;
<PageTitle>Somnia - Guest Docs - New</PageTitle> <PageTitle>Somnia - Guest Docs - New</PageTitle>
@@ -26,16 +27,98 @@
@LanguageLocale.general_btnReturn @LanguageLocale.general_btnReturn
</MudButton> </MudButton>
</MudStack> </MudStack>
<GuestDocForm @ref="_form" />
@if (currentPageMode == ePageMode.selectDocId || currentPageMode == ePageMode.alreadyExistDoc)
{
<MudPaper Class="pa-4" Elevation="3" Height="100%" Style="">
<MudForm @ref="_docIdForm" Model="@currentDocId"
Validation="@((docIdValidator as GuestDocIdDTOValidator)!.ValidateValue)">
<MudStack Breakpoint="Breakpoint.Sm">
<MudSelect @bind-Value="currentDocId.DocumentType" For="@(() => currentDocId.DocumentType)"
Label="@LanguageLocale.dto_GuestDocument_DocumentType" Immediate="true" Required>
@foreach (string docType in dataListService.GetDataListByName(GuestConsts.DataList_DocumentTypes))
{
<MudSelectItem Value="docType">
@dataListService.GetLocalizedValue(GuestConsts.DataList_DocumentTypes, docType)
</MudSelectItem>
}
</MudSelect>
<MudTextField @bind-Value="currentDocId.DocumentNum" For="@(() => currentDocId.DocumentNum)"
Label="@LanguageLocale.dto_GuestDocument_DocumentNum" Required
OnBlur="@(() => currentDocId.DocumentNum = currentDocId.DocumentNum.ToUpper())" />
<MudButton Variant="Variant.Filled" Color="Color.Primary" Size="Size.Small"
StartIcon="@Icons.Material.Filled.Search" OnClick="() => BtnCheckDocId()" Disabled="@loadingDocId">
@LanguageLocale.general_btnSearch
</MudButton>
</MudStack>
</MudForm>
@if (currentPageMode == ePageMode.alreadyExistDoc)
{
<MudStack>
<MudDivider Class="my-4" />
<MudText Typo="Typo.body1" Style="text-align: center;">@LanguageLocale.page_GuestDocNew_msgAlreadyExists
</MudText>
<MudButton Variant="Variant.Filled" Color="Color.Primary" Size="Size.Small"
StartIcon="@Icons.Material.Filled.Search" OnClick="() => BtnGoToDocument()">
@LanguageLocale.page_GuestDocNew_btnGoExistingDoc
</MudButton>
</MudStack>
}
</MudPaper>
}
@if (currentPageMode == ePageMode.createNew)
{
<GuestDocForm @ref="_form" Model="newDocumentModel" />
}
@code { @code {
GuestDocForm _form = null!; GuestDocForm _form = null!;
MudForm _docIdForm = null!;
ePageMode currentPageMode = ePageMode.selectDocId;
GuestDocIdDTO currentDocId = new() { DocumentNum = "", DocumentType = "" };
GuestDocumentDTO newDocumentModel = new();
bool loadingDocId = false;
#region Event Handlers #region Event Handlers
/// <summary>
/// Check if given Document already exists or can be created.
/// </summary>
private async Task BtnCheckDocId()
{
await _docIdForm.ValidateAsync();
if (!_docIdForm.IsValid)
{
return;
}
loadingDocId = true;
GuestDocumentDTO? dto = await guestDocService.GetDtoByIdAsync(currentDocId.DocumentType, currentDocId.DocumentNum);
loadingDocId = false;
if (dto is null)
{
//Document don't exist -> Create it.
currentPageMode = ePageMode.createNew;
//Update model with current DocId
newDocumentModel.DocumentType = currentDocId.DocumentType;
newDocumentModel.DocumentNum = currentDocId.DocumentNum;
return;
}
//GuestDoc already exists!
currentPageMode = ePageMode.alreadyExistDoc;
}
private void BtnReturn() private void BtnReturn()
{ {
Navigation.NavigateTo(GuestConsts.Page_GuestDocs_List); Navigation.NavigateTo(GuestConsts.Page_GuestDocs_List);
@@ -69,6 +152,27 @@
Navigation.NavigateTo(GuestConsts.Page_GuestDocs_List); Navigation.NavigateTo(GuestConsts.Page_GuestDocs_List);
} }
private void BtnGoToDocument()
{
if (currentPageMode != ePageMode.alreadyExistDoc)
{
Snackbar.Add("Invalid operation!", Severity.Error);
return;
}
string docId = GuestDocIdDTO.EncodeAsString(currentDocId);
string uri = GuestConsts.Page_GuestDocs_Detail.Replace("{docId}", docId);
Navigation.NavigateTo(uri);
}
#endregion #endregion
#region Models
enum ePageMode
{
selectDocId, alreadyExistDoc, createNew
}
#endregion
} }
+9 -4
View File
@@ -5,12 +5,17 @@ public static class GuestConsts
public const string Page_GuestDocs_List = "/guest-documents"; public const string Page_GuestDocs_List = "/guest-documents";
public const string Page_GuestDocs_New = "/guest-documents/new"; public const string Page_GuestDocs_New = "/guest-documents/new";
public const string Page_GuestDocs_Detail = "/guest-documents/d/{docId}";
public const string regexPattern_phoneNum = @"\+?\d{1,4}?[-.\s]?\(?\d{1,3}?\)?[-.\s]?\d{1,4}[-.\s]?\d{1,4}[-.\s]?\d{1,9}"; public const string DataList_DocumentTypes = "DocumentType";
public const string DataList_GenderOptions = "GenderOption";
public const string DataList_CountryCodes = "CountryCode";
public const string DataList_DocumentTypes = "DocumentTypes"; public const string CountryCode_ESP = "ESP";
public const string DataList_GenderOptions = "GenderOptions";
public const string DataList_CountryCodes = "CountryCodes"; public const string DocumentType_DNI = "DNI";
public const string DocumentType_NIE = "NIE";
public const string DocumentType_PASSPORT = "PASSPORT";
} }
@@ -0,0 +1,13 @@
namespace Somnia.GuestLog.Models.DTOs;
public class GuestDocFilterDTO
{
public string? DocumentType { get; set; }
public string? DocumentNumber { get; set; }
public string? Name { get; set; }
public string? Surname { get; set; }
public string? PhoneNumber { get; set; }
}
@@ -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]
};
}
}
+1
View File
@@ -28,6 +28,7 @@ builder.Services.AddRazorComponents()
// Add Validation Services // Add Validation Services
builder.Services.AddSingleton<IValidator<GuestDocumentDTO>, GuestDocumentDTOValidator>(); builder.Services.AddSingleton<IValidator<GuestDocumentDTO>, GuestDocumentDTOValidator>();
builder.Services.AddSingleton<IValidator<GuestDocIdDTO>, GuestDocIdDTOValidator>();
// Add Services // Add Services
builder.Services.AddSingleton<IGuestDocumentService, GuestDocumentService>(); builder.Services.AddSingleton<IGuestDocumentService, GuestDocumentService>();
@@ -0,0 +1,391 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing"
mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework
object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0"
msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0"
msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"
msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0"
msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="dataList.CountryCode.ABW" xml:space="preserve"><value>Aruba</value></data>
<data name="dataList.CountryCode.AFG" xml:space="preserve"><value>Afghanistan</value></data>
<data name="dataList.CountryCode.AGO" xml:space="preserve"><value>Angola</value></data>
<data name="dataList.CountryCode.AIA" xml:space="preserve"><value>Anguilla</value></data>
<data name="dataList.CountryCode.ALA" xml:space="preserve"><value>Åland Islands</value></data>
<data name="dataList.CountryCode.ALB" xml:space="preserve"><value>Albania</value></data>
<data name="dataList.CountryCode.AND" xml:space="preserve"><value>Andorra</value></data>
<data name="dataList.CountryCode.ARE" xml:space="preserve"><value>United Arab Emirates</value></data>
<data name="dataList.CountryCode.ARG" xml:space="preserve"><value>Argentina</value></data>
<data name="dataList.CountryCode.ARM" xml:space="preserve"><value>Armenia</value></data>
<data name="dataList.CountryCode.ASM" xml:space="preserve"><value>American Samoa</value></data>
<data name="dataList.CountryCode.ATA" xml:space="preserve"><value>Antarctica</value></data>
<data name="dataList.CountryCode.ATF" xml:space="preserve"><value>French Southern Territories</value></data>
<data name="dataList.CountryCode.ATG" xml:space="preserve"><value>Antigua and Barbuda</value></data>
<data name="dataList.CountryCode.AUS" xml:space="preserve"><value>Australia</value></data>
<data name="dataList.CountryCode.AUT" xml:space="preserve"><value>Austria</value></data>
<data name="dataList.CountryCode.AZE" xml:space="preserve"><value>Azerbaijan</value></data>
<data name="dataList.CountryCode.BDI" xml:space="preserve"><value>Burundi</value></data>
<data name="dataList.CountryCode.BEL" xml:space="preserve"><value>Belgium</value></data>
<data name="dataList.CountryCode.BEN" xml:space="preserve"><value>Benin</value></data>
<data name="dataList.CountryCode.BES" xml:space="preserve"><value>Bonaire, Sint Eustatius and Saba</value></data>
<data name="dataList.CountryCode.BFA" xml:space="preserve"><value>Burkina Faso</value></data>
<data name="dataList.CountryCode.BGD" xml:space="preserve"><value>Bangladesh</value></data>
<data name="dataList.CountryCode.BGR" xml:space="preserve"><value>Bulgaria</value></data>
<data name="dataList.CountryCode.BHR" xml:space="preserve"><value>Bahrain</value></data>
<data name="dataList.CountryCode.BHS" xml:space="preserve"><value>Bahamas</value></data>
<data name="dataList.CountryCode.BIH" xml:space="preserve"><value>Bosnia and Herzegovina</value></data>
<data name="dataList.CountryCode.BLM" xml:space="preserve"><value>Saint Barthélemy</value></data>
<data name="dataList.CountryCode.BLR" xml:space="preserve"><value>Belarus</value></data>
<data name="dataList.CountryCode.BLZ" xml:space="preserve"><value>Belize</value></data>
<data name="dataList.CountryCode.BMU" xml:space="preserve"><value>Bermuda</value></data>
<data name="dataList.CountryCode.BOL" xml:space="preserve"><value>Bolivia, Plurinational State of</value></data>
<data name="dataList.CountryCode.BRA" xml:space="preserve"><value>Brazil</value></data>
<data name="dataList.CountryCode.BRB" xml:space="preserve"><value>Barbados</value></data>
<data name="dataList.CountryCode.BRN" xml:space="preserve"><value>Brunei Darussalam</value></data>
<data name="dataList.CountryCode.BTN" xml:space="preserve"><value>Bhutan</value></data>
<data name="dataList.CountryCode.BVT" xml:space="preserve"><value>Bouvet Island</value></data>
<data name="dataList.CountryCode.BWA" xml:space="preserve"><value>Botswana</value></data>
<data name="dataList.CountryCode.CAF" xml:space="preserve"><value>Central African Republic</value></data>
<data name="dataList.CountryCode.CAN" xml:space="preserve"><value>Canada</value></data>
<data name="dataList.CountryCode.CCK" xml:space="preserve"><value>Cocos (Keeling) Islands</value></data>
<data name="dataList.CountryCode.CHE" xml:space="preserve"><value>Switzerland</value></data>
<data name="dataList.CountryCode.CHL" xml:space="preserve"><value>Chile</value></data>
<data name="dataList.CountryCode.CHN" xml:space="preserve"><value>China</value></data>
<data name="dataList.CountryCode.CIV" xml:space="preserve"><value>Côte d'Ivoire</value></data>
<data name="dataList.CountryCode.CMR" xml:space="preserve"><value>Cameroon</value></data>
<data name="dataList.CountryCode.COD" xml:space="preserve"><value>Congo, Democratic Republic of the</value></data>
<data name="dataList.CountryCode.COG" xml:space="preserve"><value>Congo</value></data>
<data name="dataList.CountryCode.COK" xml:space="preserve"><value>Cook Islands</value></data>
<data name="dataList.CountryCode.COL" xml:space="preserve"><value>Colombia</value></data>
<data name="dataList.CountryCode.COM" xml:space="preserve"><value>Comoros</value></data>
<data name="dataList.CountryCode.CPV" xml:space="preserve"><value>Cabo Verde</value></data>
<data name="dataList.CountryCode.CRI" xml:space="preserve"><value>Costa Rica</value></data>
<data name="dataList.CountryCode.CUB" xml:space="preserve"><value>Cuba</value></data>
<data name="dataList.CountryCode.CUW" xml:space="preserve"><value>Curaçao</value></data>
<data name="dataList.CountryCode.CXR" xml:space="preserve"><value>Christmas Island</value></data>
<data name="dataList.CountryCode.CYM" xml:space="preserve"><value>Cayman Islands</value></data>
<data name="dataList.CountryCode.CYP" xml:space="preserve"><value>Cyprus</value></data>
<data name="dataList.CountryCode.CZE" xml:space="preserve"><value>Czechia</value></data>
<data name="dataList.CountryCode.DEU" xml:space="preserve"><value>Germany</value></data>
<data name="dataList.CountryCode.DJI" xml:space="preserve"><value>Djibouti</value></data>
<data name="dataList.CountryCode.DMA" xml:space="preserve"><value>Dominica</value></data>
<data name="dataList.CountryCode.DNK" xml:space="preserve"><value>Denmark</value></data>
<data name="dataList.CountryCode.DOM" xml:space="preserve"><value>Dominican Republic</value></data>
<data name="dataList.CountryCode.DZA" xml:space="preserve"><value>Algeria</value></data>
<data name="dataList.CountryCode.ECU" xml:space="preserve"><value>Ecuador</value></data>
<data name="dataList.CountryCode.EGY" xml:space="preserve"><value>Egypt</value></data>
<data name="dataList.CountryCode.ERI" xml:space="preserve"><value>Eritrea</value></data>
<data name="dataList.CountryCode.ESH" xml:space="preserve"><value>Western Sahara</value></data>
<data name="dataList.CountryCode.ESP" xml:space="preserve"><value>Spain</value></data>
<data name="dataList.CountryCode.EST" xml:space="preserve"><value>Estonia</value></data>
<data name="dataList.CountryCode.ETH" xml:space="preserve"><value>Ethiopia</value></data>
<data name="dataList.CountryCode.FIN" xml:space="preserve"><value>Finland</value></data>
<data name="dataList.CountryCode.FJI" xml:space="preserve"><value>Fiji</value></data>
<data name="dataList.CountryCode.FLK" xml:space="preserve"><value>Falkland Islands (Malvinas)</value></data>
<data name="dataList.CountryCode.FRA" xml:space="preserve"><value>France</value></data>
<data name="dataList.CountryCode.FRO" xml:space="preserve"><value>Faroe Islands</value></data>
<data name="dataList.CountryCode.FSM" xml:space="preserve"><value>Micronesia, Federated States of</value></data>
<data name="dataList.CountryCode.GAB" xml:space="preserve"><value>Gabon</value></data>
<data name="dataList.CountryCode.GBR" xml:space="preserve"><value>United Kingdom of Great Britain and Northern Ireland</value></data>
<data name="dataList.CountryCode.GEO" xml:space="preserve"><value>Georgia</value></data>
<data name="dataList.CountryCode.GGY" xml:space="preserve"><value>Guernsey</value></data>
<data name="dataList.CountryCode.GHA" xml:space="preserve"><value>Ghana</value></data>
<data name="dataList.CountryCode.GIB" xml:space="preserve"><value>Gibraltar</value></data>
<data name="dataList.CountryCode.GIN" xml:space="preserve"><value>Guinea</value></data>
<data name="dataList.CountryCode.GLP" xml:space="preserve"><value>Guadeloupe</value></data>
<data name="dataList.CountryCode.GMB" xml:space="preserve"><value>Gambia</value></data>
<data name="dataList.CountryCode.GNB" xml:space="preserve"><value>Guinea-Bissau</value></data>
<data name="dataList.CountryCode.GNQ" xml:space="preserve"><value>Equatorial Guinea</value></data>
<data name="dataList.CountryCode.GRC" xml:space="preserve"><value>Greece</value></data>
<data name="dataList.CountryCode.GRD" xml:space="preserve"><value>Grenada</value></data>
<data name="dataList.CountryCode.GRL" xml:space="preserve"><value>Greenland</value></data>
<data name="dataList.CountryCode.GTM" xml:space="preserve"><value>Guatemala</value></data>
<data name="dataList.CountryCode.GUF" xml:space="preserve"><value>French Guiana</value></data>
<data name="dataList.CountryCode.GUM" xml:space="preserve"><value>Guam</value></data>
<data name="dataList.CountryCode.GUY" xml:space="preserve"><value>Guyana</value></data>
<data name="dataList.CountryCode.HKG" xml:space="preserve"><value>Hong Kong</value></data>
<data name="dataList.CountryCode.HMD" xml:space="preserve"><value>Heard Island and McDonald Islands</value></data>
<data name="dataList.CountryCode.HND" xml:space="preserve"><value>Honduras</value></data>
<data name="dataList.CountryCode.HRV" xml:space="preserve"><value>Croatia</value></data>
<data name="dataList.CountryCode.HTI" xml:space="preserve"><value>Haiti</value></data>
<data name="dataList.CountryCode.HUN" xml:space="preserve"><value>Hungary</value></data>
<data name="dataList.CountryCode.IDN" xml:space="preserve"><value>Indonesia</value></data>
<data name="dataList.CountryCode.IMN" xml:space="preserve"><value>Isle of Man</value></data>
<data name="dataList.CountryCode.IND" xml:space="preserve"><value>India</value></data>
<data name="dataList.CountryCode.IOT" xml:space="preserve"><value>British Indian Ocean Territory</value></data>
<data name="dataList.CountryCode.IRL" xml:space="preserve"><value>Ireland</value></data>
<data name="dataList.CountryCode.IRN" xml:space="preserve"><value>Iran, Islamic Republic of</value></data>
<data name="dataList.CountryCode.IRQ" xml:space="preserve"><value>Iraq</value></data>
<data name="dataList.CountryCode.ISL" xml:space="preserve"><value>Iceland</value></data>
<data name="dataList.CountryCode.ISR" xml:space="preserve"><value>Israel</value></data>
<data name="dataList.CountryCode.ITA" xml:space="preserve"><value>Italy</value></data>
<data name="dataList.CountryCode.JAM" xml:space="preserve"><value>Jamaica</value></data>
<data name="dataList.CountryCode.JEY" xml:space="preserve"><value>Jersey</value></data>
<data name="dataList.CountryCode.JOR" xml:space="preserve"><value>Jordan</value></data>
<data name="dataList.CountryCode.JPN" xml:space="preserve"><value>Japan</value></data>
<data name="dataList.CountryCode.KAZ" xml:space="preserve"><value>Kazakhstan</value></data>
<data name="dataList.CountryCode.KEN" xml:space="preserve"><value>Kenya</value></data>
<data name="dataList.CountryCode.KGZ" xml:space="preserve"><value>Kyrgyzstan</value></data>
<data name="dataList.CountryCode.KHM" xml:space="preserve"><value>Cambodia</value></data>
<data name="dataList.CountryCode.KIR" xml:space="preserve"><value>Kiribati</value></data>
<data name="dataList.CountryCode.KNA" xml:space="preserve"><value>Saint Kitts and Nevis</value></data>
<data name="dataList.CountryCode.KOR" xml:space="preserve"><value>Korea, Republic of</value></data>
<data name="dataList.CountryCode.KWT" xml:space="preserve"><value>Kuwait</value></data>
<data name="dataList.CountryCode.LAO" xml:space="preserve"><value>Lao People's Democratic Republic</value></data>
<data name="dataList.CountryCode.LBN" xml:space="preserve"><value>Lebanon</value></data>
<data name="dataList.CountryCode.LBR" xml:space="preserve"><value>Liberia</value></data>
<data name="dataList.CountryCode.LBY" xml:space="preserve"><value>Libya</value></data>
<data name="dataList.CountryCode.LCA" xml:space="preserve"><value>Saint Lucia</value></data>
<data name="dataList.CountryCode.LIE" xml:space="preserve"><value>Liechtenstein</value></data>
<data name="dataList.CountryCode.LKA" xml:space="preserve"><value>Sri Lanka</value></data>
<data name="dataList.CountryCode.LSO" xml:space="preserve"><value>Lesotho</value></data>
<data name="dataList.CountryCode.LTU" xml:space="preserve"><value>Lithuania</value></data>
<data name="dataList.CountryCode.LUX" xml:space="preserve"><value>Luxembourg</value></data>
<data name="dataList.CountryCode.LVA" xml:space="preserve"><value>Latvia</value></data>
<data name="dataList.CountryCode.MAC" xml:space="preserve"><value>Macao</value></data>
<data name="dataList.CountryCode.MAF" xml:space="preserve"><value>Saint Martin (French part)</value></data>
<data name="dataList.CountryCode.MAR" xml:space="preserve"><value>Morocco</value></data>
<data name="dataList.CountryCode.MCO" xml:space="preserve"><value>Monaco</value></data>
<data name="dataList.CountryCode.MDA" xml:space="preserve"><value>Moldova, Republic of</value></data>
<data name="dataList.CountryCode.MDG" xml:space="preserve"><value>Madagascar</value></data>
<data name="dataList.CountryCode.MDV" xml:space="preserve"><value>Maldives</value></data>
<data name="dataList.CountryCode.MEX" xml:space="preserve"><value>Mexico</value></data>
<data name="dataList.CountryCode.MHL" xml:space="preserve"><value>Marshall Islands</value></data>
<data name="dataList.CountryCode.MKD" xml:space="preserve"><value>North Macedonia</value></data>
<data name="dataList.CountryCode.MLI" xml:space="preserve"><value>Mali</value></data>
<data name="dataList.CountryCode.MLT" xml:space="preserve"><value>Malta</value></data>
<data name="dataList.CountryCode.MMR" xml:space="preserve"><value>Myanmar</value></data>
<data name="dataList.CountryCode.MNE" xml:space="preserve"><value>Montenegro</value></data>
<data name="dataList.CountryCode.MNG" xml:space="preserve"><value>Mongolia</value></data>
<data name="dataList.CountryCode.MNP" xml:space="preserve"><value>Northern Mariana Islands</value></data>
<data name="dataList.CountryCode.MOZ" xml:space="preserve"><value>Mozambique</value></data>
<data name="dataList.CountryCode.MRT" xml:space="preserve"><value>Mauritania</value></data>
<data name="dataList.CountryCode.MSR" xml:space="preserve"><value>Montserrat</value></data>
<data name="dataList.CountryCode.MTQ" xml:space="preserve"><value>Martinique</value></data>
<data name="dataList.CountryCode.MUS" xml:space="preserve"><value>Mauritius</value></data>
<data name="dataList.CountryCode.MWI" xml:space="preserve"><value>Malawi</value></data>
<data name="dataList.CountryCode.MYS" xml:space="preserve"><value>Malaysia</value></data>
<data name="dataList.CountryCode.MYT" xml:space="preserve"><value>Mayotte</value></data>
<data name="dataList.CountryCode.NAM" xml:space="preserve"><value>Namibia</value></data>
<data name="dataList.CountryCode.NCL" xml:space="preserve"><value>New Caledonia</value></data>
<data name="dataList.CountryCode.NER" xml:space="preserve"><value>Niger</value></data>
<data name="dataList.CountryCode.NFK" xml:space="preserve"><value>Norfolk Island</value></data>
<data name="dataList.CountryCode.NGA" xml:space="preserve"><value>Nigeria</value></data>
<data name="dataList.CountryCode.NIC" xml:space="preserve"><value>Nicaragua</value></data>
<data name="dataList.CountryCode.NIU" xml:space="preserve"><value>Niue</value></data>
<data name="dataList.CountryCode.NLD" xml:space="preserve"><value>Netherlands, Kingdom of the</value></data>
<data name="dataList.CountryCode.NOR" xml:space="preserve"><value>Norway</value></data>
<data name="dataList.CountryCode.NPL" xml:space="preserve"><value>Nepal</value></data>
<data name="dataList.CountryCode.NRU" xml:space="preserve"><value>Nauru</value></data>
<data name="dataList.CountryCode.NZL" xml:space="preserve"><value>New Zealand</value></data>
<data name="dataList.CountryCode.OMN" xml:space="preserve"><value>Oman</value></data>
<data name="dataList.CountryCode.PAK" xml:space="preserve"><value>Pakistan</value></data>
<data name="dataList.CountryCode.PAN" xml:space="preserve"><value>Panama</value></data>
<data name="dataList.CountryCode.PCN" xml:space="preserve"><value>Pitcairn</value></data>
<data name="dataList.CountryCode.PER" xml:space="preserve"><value>Peru</value></data>
<data name="dataList.CountryCode.PHL" xml:space="preserve"><value>Philippines</value></data>
<data name="dataList.CountryCode.PLW" xml:space="preserve"><value>Palau</value></data>
<data name="dataList.CountryCode.PNG" xml:space="preserve"><value>Papua New Guinea</value></data>
<data name="dataList.CountryCode.POL" xml:space="preserve"><value>Poland</value></data>
<data name="dataList.CountryCode.PRI" xml:space="preserve"><value>Puerto Rico</value></data>
<data name="dataList.CountryCode.PRK" xml:space="preserve"><value>Korea, Democratic People's Republic of</value></data>
<data name="dataList.CountryCode.PRT" xml:space="preserve"><value>Portugal</value></data>
<data name="dataList.CountryCode.PRY" xml:space="preserve"><value>Paraguay</value></data>
<data name="dataList.CountryCode.PSE" xml:space="preserve"><value>Palestine, State of</value></data>
<data name="dataList.CountryCode.PYF" xml:space="preserve"><value>French Polynesia</value></data>
<data name="dataList.CountryCode.QAT" xml:space="preserve"><value>Qatar</value></data>
<data name="dataList.CountryCode.REU" xml:space="preserve"><value>Réunion</value></data>
<data name="dataList.CountryCode.ROU" xml:space="preserve"><value>Romania</value></data>
<data name="dataList.CountryCode.RUS" xml:space="preserve"><value>Russian Federation</value></data>
<data name="dataList.CountryCode.RWA" xml:space="preserve"><value>Rwanda</value></data>
<data name="dataList.CountryCode.SAU" xml:space="preserve"><value>Saudi Arabia</value></data>
<data name="dataList.CountryCode.SDN" xml:space="preserve"><value>Sudan</value></data>
<data name="dataList.CountryCode.SEN" xml:space="preserve"><value>Senegal</value></data>
<data name="dataList.CountryCode.SGP" xml:space="preserve"><value>Singapore</value></data>
<data name="dataList.CountryCode.SGS" xml:space="preserve"><value>South Georgia and the South Sandwich Islands</value></data>
<data name="dataList.CountryCode.SHN" xml:space="preserve"><value>Saint Helena, Ascension and Tristan da Cunha</value></data>
<data name="dataList.CountryCode.SJM" xml:space="preserve"><value>Svalbard and Jan Mayen</value></data>
<data name="dataList.CountryCode.SLB" xml:space="preserve"><value>Solomon Islands</value></data>
<data name="dataList.CountryCode.SLE" xml:space="preserve"><value>Sierra Leone</value></data>
<data name="dataList.CountryCode.SLV" xml:space="preserve"><value>El Salvador</value></data>
<data name="dataList.CountryCode.SMR" xml:space="preserve"><value>San Marino</value></data>
<data name="dataList.CountryCode.SOM" xml:space="preserve"><value>Somalia</value></data>
<data name="dataList.CountryCode.SPM" xml:space="preserve"><value>Saint Pierre and Miquelon</value></data>
<data name="dataList.CountryCode.SRB" xml:space="preserve"><value>Serbia</value></data>
<data name="dataList.CountryCode.SSD" xml:space="preserve"><value>South Sudan</value></data>
<data name="dataList.CountryCode.STP" xml:space="preserve"><value>Sao Tome and Principe</value></data>
<data name="dataList.CountryCode.SUR" xml:space="preserve"><value>Suriname</value></data>
<data name="dataList.CountryCode.SVK" xml:space="preserve"><value>Slovakia</value></data>
<data name="dataList.CountryCode.SVN" xml:space="preserve"><value>Slovenia</value></data>
<data name="dataList.CountryCode.SWE" xml:space="preserve"><value>Sweden</value></data>
<data name="dataList.CountryCode.SWZ" xml:space="preserve"><value>Eswatini</value></data>
<data name="dataList.CountryCode.SXM" xml:space="preserve"><value>Sint Maarten (Dutch part)</value></data>
<data name="dataList.CountryCode.SYC" xml:space="preserve"><value>Seychelles</value></data>
<data name="dataList.CountryCode.SYR" xml:space="preserve"><value>Syrian Arab Republic</value></data>
<data name="dataList.CountryCode.TCA" xml:space="preserve"><value>Turks and Caicos Islands</value></data>
<data name="dataList.CountryCode.TCD" xml:space="preserve"><value>Chad</value></data>
<data name="dataList.CountryCode.TGO" xml:space="preserve"><value>Togo</value></data>
<data name="dataList.CountryCode.THA" xml:space="preserve"><value>Thailand</value></data>
<data name="dataList.CountryCode.TJK" xml:space="preserve"><value>Tajikistan</value></data>
<data name="dataList.CountryCode.TKL" xml:space="preserve"><value>Tokelau</value></data>
<data name="dataList.CountryCode.TKM" xml:space="preserve"><value>Turkmenistan</value></data>
<data name="dataList.CountryCode.TLS" xml:space="preserve"><value>Timor-Leste</value></data>
<data name="dataList.CountryCode.TON" xml:space="preserve"><value>Tonga</value></data>
<data name="dataList.CountryCode.TTO" xml:space="preserve"><value>Trinidad and Tobago</value></data>
<data name="dataList.CountryCode.TUN" xml:space="preserve"><value>Tunisia</value></data>
<data name="dataList.CountryCode.TUR" xml:space="preserve"><value>Türkiye</value></data>
<data name="dataList.CountryCode.TUV" xml:space="preserve"><value>Tuvalu</value></data>
<data name="dataList.CountryCode.TWN" xml:space="preserve"><value>Taiwan, Province of China</value></data>
<data name="dataList.CountryCode.TZA" xml:space="preserve"><value>Tanzania, United Republic of</value></data>
<data name="dataList.CountryCode.UGA" xml:space="preserve"><value>Uganda</value></data>
<data name="dataList.CountryCode.UKR" xml:space="preserve"><value>Ukraine</value></data>
<data name="dataList.CountryCode.UMI" xml:space="preserve"><value>United States Minor Outlying Islands</value></data>
<data name="dataList.CountryCode.URY" xml:space="preserve"><value>Uruguay</value></data>
<data name="dataList.CountryCode.USA" xml:space="preserve"><value>United States of America</value></data>
<data name="dataList.CountryCode.UZB" xml:space="preserve"><value>Uzbekistan</value></data>
<data name="dataList.CountryCode.VAT" xml:space="preserve"><value>Holy See</value></data>
<data name="dataList.CountryCode.VCT" xml:space="preserve"><value>Saint Vincent and the Grenadines</value></data>
<data name="dataList.CountryCode.VEN" xml:space="preserve"><value>Venezuela, Bolivarian Republic of</value></data>
<data name="dataList.CountryCode.VGB" xml:space="preserve"><value>Virgin Islands (British)</value></data>
<data name="dataList.CountryCode.VIR" xml:space="preserve"><value>Virgin Islands (U.S.)</value></data>
<data name="dataList.CountryCode.VNM" xml:space="preserve"><value>Viet Nam</value></data>
<data name="dataList.CountryCode.VUT" xml:space="preserve"><value>Vanuatu</value></data>
<data name="dataList.CountryCode.WLF" xml:space="preserve"><value>Wallis and Futuna</value></data>
<data name="dataList.CountryCode.WSM" xml:space="preserve"><value>Samoa</value></data>
<data name="dataList.CountryCode.YEM" xml:space="preserve"><value>Yemen</value></data>
<data name="dataList.CountryCode.ZAF" xml:space="preserve"><value>South Africa</value></data>
<data name="dataList.CountryCode.ZMB" xml:space="preserve"><value>Zambia</value></data>
<data name="dataList.CountryCode.ZWE" xml:space="preserve"><value>Zimbabwe</value></data>
<data name="dataList.DocumentType.DNI" xml:space="preserve"><value>DNI</value></data>
<data name="dataList.DocumentType.NIE" xml:space="preserve"><value>NIE</value></data>
<data name="dataList.DocumentType.PASSPORT" xml:space="preserve"><value>Passport</value></data>
<data name="dataList.DocumentType.ID" xml:space="preserve"><value>ID Card</value></data>
<data name="dataList.DocumentType.OTHER" xml:space="preserve"><value>Other</value></data>
<data name="dataList.GenderOption.M" xml:space="preserve"><value>Male</value></data>
<data name="dataList.GenderOption.F" xml:space="preserve"><value>Female</value></data>
<data name="dataList.GenderOption.O" xml:space="preserve"><value>Other</value></data>
</root>
@@ -22,8 +22,10 @@
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value> <value>[base64 mime encoded serialized .NET Framework object]</value>
</data> </data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="Icon1" type="System.Drawing.Icon, System.Drawing"
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework
object]</value>
<comment>This is a comment</comment> <comment>This is a comment</comment>
</data> </data>
@@ -59,7 +61,8 @@
: using a System.ComponentModel.TypeConverter : using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
--> -->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType> <xsd:complexType>
@@ -112,12 +115,33 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="SimpleKey" xml:space="preserve">
<value>Valor Simple!</value> <data name="dto.GuestDocument.DocumentType" xml:space="preserve"><value>Tipo Documento</value></data>
</data> <data name="dto.GuestDocument.DocumentNum" xml:space="preserve"><value>Número Documento</value></data>
<data name="dto.GuestDocument.IssueDate" xml:space="preserve"><value>Fecha emisión</value></data>
<data name="dto.GuestDocument.SupportNum" xml:space="preserve"><value>Número Soporte</value></data>
<data name="dto.GuestDocument.Nationality" xml:space="preserve"><value>Nacionalidad</value></data>
<data name="dto.GuestDocument.Name" xml:space="preserve"><value>Nombre</value></data>
<data name="dto.GuestDocument.Surname" xml:space="preserve"><value>Apellido 1</value></data>
<data name="dto.GuestDocument.Surname2" xml:space="preserve"><value>Apellido 2</value></data>
<data name="dto.GuestDocument.BirthDate" xml:space="preserve"><value>Fecha Nacimiento</value></data>
<data name="dto.GuestDocument.Gender" xml:space="preserve"><value>Sexo</value></data>
<data name="dto.GuestDocument.PhoneNumber" xml:space="preserve"><value>Número Teléfono</value></data>
<data name="dto.GuestDocument.EmailAddress" xml:space="preserve"><value>Dirección Email</value></data>
<data name="dto.GuestDocument.Address" xml:space="preserve"><value>Dirección</value></data>
<data name="dto.GuestDocument.AddressCity" xml:space="preserve"><value>Ciudad</value></data>
<data name="dto.GuestDocument.AddressProvince" xml:space="preserve"><value>Provincia</value></data>
<data name="dto.GuestDocument.AddressState" xml:space="preserve"><value>Región</value></data>
<data name="dto.GuestDocument.AddressCountry" xml:space="preserve"><value>País</value></data>
<data name="dto.GuestDocument.ZipCode" xml:space="preserve"><value>Código Postal</value></data>
<data name="dto.GuestDocument.CreateTime" xml:space="preserve"><value>Fecha Creación</value></data>
<data name="dto.GuestDocument.UpdateTime" xml:space="preserve"><value>Fecha Modificación</value></data>
</root> </root>
+12 -260
View File
@@ -147,272 +147,24 @@
<data name="general.inProgressMsg" xml:space="preserve"><value>In Progress...</value></data> <data name="general.inProgressMsg" xml:space="preserve"><value>In Progress...</value></data>
<data name="general.ConfigureColumns" xml:space="preserve"><value>Configure Columns</value></data> <data name="general.ConfigureColumns" xml:space="preserve"><value>Configure Columns</value></data>
<data name="general.confirmDeleteMsg" xml:space="preserve"><value>Deleting can not be undone!</value></data> <data name="general.confirmDeleteMsg" xml:space="preserve"><value>Deleting can not be undone!</value></data>
<data name="general.confirmTitle" xml:space="preserve"><value>Confirm?</value></data>
<data name="general.btnDelete" xml:space="preserve"><value>Delete</value></data> <data name="general.btnDelete" xml:space="preserve"><value>Delete</value></data>
<data name="general.btnCreate" xml:space="preserve"><value>Create</value></data> <data name="general.btnCreate" xml:space="preserve"><value>Create</value></data>
<data name="general.btnEdit" xml:space="preserve"><value>Edit</value></data>
<data name="general.btnReturn" xml:space="preserve"><value>Return</value></data> <data name="general.btnReturn" xml:space="preserve"><value>Return</value></data>
<data name="general.btnClose" xml:space="preserve"><value>Close</value></data> <data name="general.btnClose" xml:space="preserve"><value>Close</value></data>
<data name="general.btnSearch" xml:space="preserve"><value>Search</value></data>
<data name="general.btnSave" xml:space="preserve"><value>Save</value></data>
<data name="general.btnCancel" xml:space="preserve"><value>Cancel</value></data>
<data name="general.wildcardHelperText" xml:space="preserve"><value>Use '%' as wildcard</value></data>
<data name="dataList.CountryCode.ABW" xml:space="preserve"><value>Aruba</value></data> <data name="page.GuestDocList.pageTitle" xml:space="preserve"><value>Guest Documents</value></data>
<data name="dataList.CountryCode.AFG" xml:space="preserve"><value>Afghanistan</value></data> <data name="page.GuestDocList.documentList" xml:space="preserve"><value>Document List</value></data>
<data name="dataList.CountryCode.AGO" xml:space="preserve"><value>Angola</value></data>
<data name="dataList.CountryCode.AIA" xml:space="preserve"><value>Anguilla</value></data>
<data name="dataList.CountryCode.ALA" xml:space="preserve"><value>Åland Islands</value></data>
<data name="dataList.CountryCode.ALB" xml:space="preserve"><value>Albania</value></data>
<data name="dataList.CountryCode.AND" xml:space="preserve"><value>Andorra</value></data>
<data name="dataList.CountryCode.ARE" xml:space="preserve"><value>United Arab Emirates</value></data>
<data name="dataList.CountryCode.ARG" xml:space="preserve"><value>Argentina</value></data>
<data name="dataList.CountryCode.ARM" xml:space="preserve"><value>Armenia</value></data>
<data name="dataList.CountryCode.ASM" xml:space="preserve"><value>American Samoa</value></data>
<data name="dataList.CountryCode.ATA" xml:space="preserve"><value>Antarctica</value></data>
<data name="dataList.CountryCode.ATF" xml:space="preserve"><value>French Southern Territories</value></data>
<data name="dataList.CountryCode.ATG" xml:space="preserve"><value>Antigua and Barbuda</value></data>
<data name="dataList.CountryCode.AUS" xml:space="preserve"><value>Australia</value></data>
<data name="dataList.CountryCode.AUT" xml:space="preserve"><value>Austria</value></data>
<data name="dataList.CountryCode.AZE" xml:space="preserve"><value>Azerbaijan</value></data>
<data name="dataList.CountryCode.BDI" xml:space="preserve"><value>Burundi</value></data>
<data name="dataList.CountryCode.BEL" xml:space="preserve"><value>Belgium</value></data>
<data name="dataList.CountryCode.BEN" xml:space="preserve"><value>Benin</value></data>
<data name="dataList.CountryCode.BES" xml:space="preserve"><value>Bonaire, Sint Eustatius and Saba</value></data>
<data name="dataList.CountryCode.BFA" xml:space="preserve"><value>Burkina Faso</value></data>
<data name="dataList.CountryCode.BGD" xml:space="preserve"><value>Bangladesh</value></data>
<data name="dataList.CountryCode.BGR" xml:space="preserve"><value>Bulgaria</value></data>
<data name="dataList.CountryCode.BHR" xml:space="preserve"><value>Bahrain</value></data>
<data name="dataList.CountryCode.BHS" xml:space="preserve"><value>Bahamas</value></data>
<data name="dataList.CountryCode.BIH" xml:space="preserve"><value>Bosnia and Herzegovina</value></data>
<data name="dataList.CountryCode.BLM" xml:space="preserve"><value>Saint Barthélemy</value></data>
<data name="dataList.CountryCode.BLR" xml:space="preserve"><value>Belarus</value></data>
<data name="dataList.CountryCode.BLZ" xml:space="preserve"><value>Belize</value></data>
<data name="dataList.CountryCode.BMU" xml:space="preserve"><value>Bermuda</value></data>
<data name="dataList.CountryCode.BOL" xml:space="preserve"><value>Bolivia, Plurinational State of</value></data>
<data name="dataList.CountryCode.BRA" xml:space="preserve"><value>Brazil</value></data>
<data name="dataList.CountryCode.BRB" xml:space="preserve"><value>Barbados</value></data>
<data name="dataList.CountryCode.BRN" xml:space="preserve"><value>Brunei Darussalam</value></data>
<data name="dataList.CountryCode.BTN" xml:space="preserve"><value>Bhutan</value></data>
<data name="dataList.CountryCode.BVT" xml:space="preserve"><value>Bouvet Island</value></data>
<data name="dataList.CountryCode.BWA" xml:space="preserve"><value>Botswana</value></data>
<data name="dataList.CountryCode.CAF" xml:space="preserve"><value>Central African Republic</value></data>
<data name="dataList.CountryCode.CAN" xml:space="preserve"><value>Canada</value></data>
<data name="dataList.CountryCode.CCK" xml:space="preserve"><value>Cocos (Keeling) Islands</value></data>
<data name="dataList.CountryCode.CHE" xml:space="preserve"><value>Switzerland</value></data>
<data name="dataList.CountryCode.CHL" xml:space="preserve"><value>Chile</value></data>
<data name="dataList.CountryCode.CHN" xml:space="preserve"><value>China</value></data>
<data name="dataList.CountryCode.CIV" xml:space="preserve"><value>Côte d'Ivoire</value></data>
<data name="dataList.CountryCode.CMR" xml:space="preserve"><value>Cameroon</value></data>
<data name="dataList.CountryCode.COD" xml:space="preserve"><value>Congo, Democratic Republic of the</value></data>
<data name="dataList.CountryCode.COG" xml:space="preserve"><value>Congo</value></data>
<data name="dataList.CountryCode.COK" xml:space="preserve"><value>Cook Islands</value></data>
<data name="dataList.CountryCode.COL" xml:space="preserve"><value>Colombia</value></data>
<data name="dataList.CountryCode.COM" xml:space="preserve"><value>Comoros</value></data>
<data name="dataList.CountryCode.CPV" xml:space="preserve"><value>Cabo Verde</value></data>
<data name="dataList.CountryCode.CRI" xml:space="preserve"><value>Costa Rica</value></data>
<data name="dataList.CountryCode.CUB" xml:space="preserve"><value>Cuba</value></data>
<data name="dataList.CountryCode.CUW" xml:space="preserve"><value>Curaçao</value></data>
<data name="dataList.CountryCode.CXR" xml:space="preserve"><value>Christmas Island</value></data>
<data name="dataList.CountryCode.CYM" xml:space="preserve"><value>Cayman Islands</value></data>
<data name="dataList.CountryCode.CYP" xml:space="preserve"><value>Cyprus</value></data>
<data name="dataList.CountryCode.CZE" xml:space="preserve"><value>Czechia</value></data>
<data name="dataList.CountryCode.DEU" xml:space="preserve"><value>Germany</value></data>
<data name="dataList.CountryCode.DJI" xml:space="preserve"><value>Djibouti</value></data>
<data name="dataList.CountryCode.DMA" xml:space="preserve"><value>Dominica</value></data>
<data name="dataList.CountryCode.DNK" xml:space="preserve"><value>Denmark</value></data>
<data name="dataList.CountryCode.DOM" xml:space="preserve"><value>Dominican Republic</value></data>
<data name="dataList.CountryCode.DZA" xml:space="preserve"><value>Algeria</value></data>
<data name="dataList.CountryCode.ECU" xml:space="preserve"><value>Ecuador</value></data>
<data name="dataList.CountryCode.EGY" xml:space="preserve"><value>Egypt</value></data>
<data name="dataList.CountryCode.ERI" xml:space="preserve"><value>Eritrea</value></data>
<data name="dataList.CountryCode.ESH" xml:space="preserve"><value>Western Sahara</value></data>
<data name="dataList.CountryCode.ESP" xml:space="preserve"><value>Spain</value></data>
<data name="dataList.CountryCode.EST" xml:space="preserve"><value>Estonia</value></data>
<data name="dataList.CountryCode.ETH" xml:space="preserve"><value>Ethiopia</value></data>
<data name="dataList.CountryCode.FIN" xml:space="preserve"><value>Finland</value></data>
<data name="dataList.CountryCode.FJI" xml:space="preserve"><value>Fiji</value></data>
<data name="dataList.CountryCode.FLK" xml:space="preserve"><value>Falkland Islands (Malvinas)</value></data>
<data name="dataList.CountryCode.FRA" xml:space="preserve"><value>France</value></data>
<data name="dataList.CountryCode.FRO" xml:space="preserve"><value>Faroe Islands</value></data>
<data name="dataList.CountryCode.FSM" xml:space="preserve"><value>Micronesia, Federated States of</value></data>
<data name="dataList.CountryCode.GAB" xml:space="preserve"><value>Gabon</value></data>
<data name="dataList.CountryCode.GBR" xml:space="preserve"><value>United Kingdom of Great Britain and Northern Ireland</value></data>
<data name="dataList.CountryCode.GEO" xml:space="preserve"><value>Georgia</value></data>
<data name="dataList.CountryCode.GGY" xml:space="preserve"><value>Guernsey</value></data>
<data name="dataList.CountryCode.GHA" xml:space="preserve"><value>Ghana</value></data>
<data name="dataList.CountryCode.GIB" xml:space="preserve"><value>Gibraltar</value></data>
<data name="dataList.CountryCode.GIN" xml:space="preserve"><value>Guinea</value></data>
<data name="dataList.CountryCode.GLP" xml:space="preserve"><value>Guadeloupe</value></data>
<data name="dataList.CountryCode.GMB" xml:space="preserve"><value>Gambia</value></data>
<data name="dataList.CountryCode.GNB" xml:space="preserve"><value>Guinea-Bissau</value></data>
<data name="dataList.CountryCode.GNQ" xml:space="preserve"><value>Equatorial Guinea</value></data>
<data name="dataList.CountryCode.GRC" xml:space="preserve"><value>Greece</value></data>
<data name="dataList.CountryCode.GRD" xml:space="preserve"><value>Grenada</value></data>
<data name="dataList.CountryCode.GRL" xml:space="preserve"><value>Greenland</value></data>
<data name="dataList.CountryCode.GTM" xml:space="preserve"><value>Guatemala</value></data>
<data name="dataList.CountryCode.GUF" xml:space="preserve"><value>French Guiana</value></data>
<data name="dataList.CountryCode.GUM" xml:space="preserve"><value>Guam</value></data>
<data name="dataList.CountryCode.GUY" xml:space="preserve"><value>Guyana</value></data>
<data name="dataList.CountryCode.HKG" xml:space="preserve"><value>Hong Kong</value></data>
<data name="dataList.CountryCode.HMD" xml:space="preserve"><value>Heard Island and McDonald Islands</value></data>
<data name="dataList.CountryCode.HND" xml:space="preserve"><value>Honduras</value></data>
<data name="dataList.CountryCode.HRV" xml:space="preserve"><value>Croatia</value></data>
<data name="dataList.CountryCode.HTI" xml:space="preserve"><value>Haiti</value></data>
<data name="dataList.CountryCode.HUN" xml:space="preserve"><value>Hungary</value></data>
<data name="dataList.CountryCode.IDN" xml:space="preserve"><value>Indonesia</value></data>
<data name="dataList.CountryCode.IMN" xml:space="preserve"><value>Isle of Man</value></data>
<data name="dataList.CountryCode.IND" xml:space="preserve"><value>India</value></data>
<data name="dataList.CountryCode.IOT" xml:space="preserve"><value>British Indian Ocean Territory</value></data>
<data name="dataList.CountryCode.IRL" xml:space="preserve"><value>Ireland</value></data>
<data name="dataList.CountryCode.IRN" xml:space="preserve"><value>Iran, Islamic Republic of</value></data>
<data name="dataList.CountryCode.IRQ" xml:space="preserve"><value>Iraq</value></data>
<data name="dataList.CountryCode.ISL" xml:space="preserve"><value>Iceland</value></data>
<data name="dataList.CountryCode.ISR" xml:space="preserve"><value>Israel</value></data>
<data name="dataList.CountryCode.ITA" xml:space="preserve"><value>Italy</value></data>
<data name="dataList.CountryCode.JAM" xml:space="preserve"><value>Jamaica</value></data>
<data name="dataList.CountryCode.JEY" xml:space="preserve"><value>Jersey</value></data>
<data name="dataList.CountryCode.JOR" xml:space="preserve"><value>Jordan</value></data>
<data name="dataList.CountryCode.JPN" xml:space="preserve"><value>Japan</value></data>
<data name="dataList.CountryCode.KAZ" xml:space="preserve"><value>Kazakhstan</value></data>
<data name="dataList.CountryCode.KEN" xml:space="preserve"><value>Kenya</value></data>
<data name="dataList.CountryCode.KGZ" xml:space="preserve"><value>Kyrgyzstan</value></data>
<data name="dataList.CountryCode.KHM" xml:space="preserve"><value>Cambodia</value></data>
<data name="dataList.CountryCode.KIR" xml:space="preserve"><value>Kiribati</value></data>
<data name="dataList.CountryCode.KNA" xml:space="preserve"><value>Saint Kitts and Nevis</value></data>
<data name="dataList.CountryCode.KOR" xml:space="preserve"><value>Korea, Republic of</value></data>
<data name="dataList.CountryCode.KWT" xml:space="preserve"><value>Kuwait</value></data>
<data name="dataList.CountryCode.LAO" xml:space="preserve"><value>Lao People's Democratic Republic</value></data>
<data name="dataList.CountryCode.LBN" xml:space="preserve"><value>Lebanon</value></data>
<data name="dataList.CountryCode.LBR" xml:space="preserve"><value>Liberia</value></data>
<data name="dataList.CountryCode.LBY" xml:space="preserve"><value>Libya</value></data>
<data name="dataList.CountryCode.LCA" xml:space="preserve"><value>Saint Lucia</value></data>
<data name="dataList.CountryCode.LIE" xml:space="preserve"><value>Liechtenstein</value></data>
<data name="dataList.CountryCode.LKA" xml:space="preserve"><value>Sri Lanka</value></data>
<data name="dataList.CountryCode.LSO" xml:space="preserve"><value>Lesotho</value></data>
<data name="dataList.CountryCode.LTU" xml:space="preserve"><value>Lithuania</value></data>
<data name="dataList.CountryCode.LUX" xml:space="preserve"><value>Luxembourg</value></data>
<data name="dataList.CountryCode.LVA" xml:space="preserve"><value>Latvia</value></data>
<data name="dataList.CountryCode.MAC" xml:space="preserve"><value>Macao</value></data>
<data name="dataList.CountryCode.MAF" xml:space="preserve"><value>Saint Martin (French part)</value></data>
<data name="dataList.CountryCode.MAR" xml:space="preserve"><value>Morocco</value></data>
<data name="dataList.CountryCode.MCO" xml:space="preserve"><value>Monaco</value></data>
<data name="dataList.CountryCode.MDA" xml:space="preserve"><value>Moldova, Republic of</value></data>
<data name="dataList.CountryCode.MDG" xml:space="preserve"><value>Madagascar</value></data>
<data name="dataList.CountryCode.MDV" xml:space="preserve"><value>Maldives</value></data>
<data name="dataList.CountryCode.MEX" xml:space="preserve"><value>Mexico</value></data>
<data name="dataList.CountryCode.MHL" xml:space="preserve"><value>Marshall Islands</value></data>
<data name="dataList.CountryCode.MKD" xml:space="preserve"><value>North Macedonia</value></data>
<data name="dataList.CountryCode.MLI" xml:space="preserve"><value>Mali</value></data>
<data name="dataList.CountryCode.MLT" xml:space="preserve"><value>Malta</value></data>
<data name="dataList.CountryCode.MMR" xml:space="preserve"><value>Myanmar</value></data>
<data name="dataList.CountryCode.MNE" xml:space="preserve"><value>Montenegro</value></data>
<data name="dataList.CountryCode.MNG" xml:space="preserve"><value>Mongolia</value></data>
<data name="dataList.CountryCode.MNP" xml:space="preserve"><value>Northern Mariana Islands</value></data>
<data name="dataList.CountryCode.MOZ" xml:space="preserve"><value>Mozambique</value></data>
<data name="dataList.CountryCode.MRT" xml:space="preserve"><value>Mauritania</value></data>
<data name="dataList.CountryCode.MSR" xml:space="preserve"><value>Montserrat</value></data>
<data name="dataList.CountryCode.MTQ" xml:space="preserve"><value>Martinique</value></data>
<data name="dataList.CountryCode.MUS" xml:space="preserve"><value>Mauritius</value></data>
<data name="dataList.CountryCode.MWI" xml:space="preserve"><value>Malawi</value></data>
<data name="dataList.CountryCode.MYS" xml:space="preserve"><value>Malaysia</value></data>
<data name="dataList.CountryCode.MYT" xml:space="preserve"><value>Mayotte</value></data>
<data name="dataList.CountryCode.NAM" xml:space="preserve"><value>Namibia</value></data>
<data name="dataList.CountryCode.NCL" xml:space="preserve"><value>New Caledonia</value></data>
<data name="dataList.CountryCode.NER" xml:space="preserve"><value>Niger</value></data>
<data name="dataList.CountryCode.NFK" xml:space="preserve"><value>Norfolk Island</value></data>
<data name="dataList.CountryCode.NGA" xml:space="preserve"><value>Nigeria</value></data>
<data name="dataList.CountryCode.NIC" xml:space="preserve"><value>Nicaragua</value></data>
<data name="dataList.CountryCode.NIU" xml:space="preserve"><value>Niue</value></data>
<data name="dataList.CountryCode.NLD" xml:space="preserve"><value>Netherlands, Kingdom of the</value></data>
<data name="dataList.CountryCode.NOR" xml:space="preserve"><value>Norway</value></data>
<data name="dataList.CountryCode.NPL" xml:space="preserve"><value>Nepal</value></data>
<data name="dataList.CountryCode.NRU" xml:space="preserve"><value>Nauru</value></data>
<data name="dataList.CountryCode.NZL" xml:space="preserve"><value>New Zealand</value></data>
<data name="dataList.CountryCode.OMN" xml:space="preserve"><value>Oman</value></data>
<data name="dataList.CountryCode.PAK" xml:space="preserve"><value>Pakistan</value></data>
<data name="dataList.CountryCode.PAN" xml:space="preserve"><value>Panama</value></data>
<data name="dataList.CountryCode.PCN" xml:space="preserve"><value>Pitcairn</value></data>
<data name="dataList.CountryCode.PER" xml:space="preserve"><value>Peru</value></data>
<data name="dataList.CountryCode.PHL" xml:space="preserve"><value>Philippines</value></data>
<data name="dataList.CountryCode.PLW" xml:space="preserve"><value>Palau</value></data>
<data name="dataList.CountryCode.PNG" xml:space="preserve"><value>Papua New Guinea</value></data>
<data name="dataList.CountryCode.POL" xml:space="preserve"><value>Poland</value></data>
<data name="dataList.CountryCode.PRI" xml:space="preserve"><value>Puerto Rico</value></data>
<data name="dataList.CountryCode.PRK" xml:space="preserve"><value>Korea, Democratic People's Republic of</value></data>
<data name="dataList.CountryCode.PRT" xml:space="preserve"><value>Portugal</value></data>
<data name="dataList.CountryCode.PRY" xml:space="preserve"><value>Paraguay</value></data>
<data name="dataList.CountryCode.PSE" xml:space="preserve"><value>Palestine, State of</value></data>
<data name="dataList.CountryCode.PYF" xml:space="preserve"><value>French Polynesia</value></data>
<data name="dataList.CountryCode.QAT" xml:space="preserve"><value>Qatar</value></data>
<data name="dataList.CountryCode.REU" xml:space="preserve"><value>Réunion</value></data>
<data name="dataList.CountryCode.ROU" xml:space="preserve"><value>Romania</value></data>
<data name="dataList.CountryCode.RUS" xml:space="preserve"><value>Russian Federation</value></data>
<data name="dataList.CountryCode.RWA" xml:space="preserve"><value>Rwanda</value></data>
<data name="dataList.CountryCode.SAU" xml:space="preserve"><value>Saudi Arabia</value></data>
<data name="dataList.CountryCode.SDN" xml:space="preserve"><value>Sudan</value></data>
<data name="dataList.CountryCode.SEN" xml:space="preserve"><value>Senegal</value></data>
<data name="dataList.CountryCode.SGP" xml:space="preserve"><value>Singapore</value></data>
<data name="dataList.CountryCode.SGS" xml:space="preserve"><value>South Georgia and the South Sandwich Islands</value></data>
<data name="dataList.CountryCode.SHN" xml:space="preserve"><value>Saint Helena, Ascension and Tristan da Cunha</value></data>
<data name="dataList.CountryCode.SJM" xml:space="preserve"><value>Svalbard and Jan Mayen</value></data>
<data name="dataList.CountryCode.SLB" xml:space="preserve"><value>Solomon Islands</value></data>
<data name="dataList.CountryCode.SLE" xml:space="preserve"><value>Sierra Leone</value></data>
<data name="dataList.CountryCode.SLV" xml:space="preserve"><value>El Salvador</value></data>
<data name="dataList.CountryCode.SMR" xml:space="preserve"><value>San Marino</value></data>
<data name="dataList.CountryCode.SOM" xml:space="preserve"><value>Somalia</value></data>
<data name="dataList.CountryCode.SPM" xml:space="preserve"><value>Saint Pierre and Miquelon</value></data>
<data name="dataList.CountryCode.SRB" xml:space="preserve"><value>Serbia</value></data>
<data name="dataList.CountryCode.SSD" xml:space="preserve"><value>South Sudan</value></data>
<data name="dataList.CountryCode.STP" xml:space="preserve"><value>Sao Tome and Principe</value></data>
<data name="dataList.CountryCode.SUR" xml:space="preserve"><value>Suriname</value></data>
<data name="dataList.CountryCode.SVK" xml:space="preserve"><value>Slovakia</value></data>
<data name="dataList.CountryCode.SVN" xml:space="preserve"><value>Slovenia</value></data>
<data name="dataList.CountryCode.SWE" xml:space="preserve"><value>Sweden</value></data>
<data name="dataList.CountryCode.SWZ" xml:space="preserve"><value>Eswatini</value></data>
<data name="dataList.CountryCode.SXM" xml:space="preserve"><value>Sint Maarten (Dutch part)</value></data>
<data name="dataList.CountryCode.SYC" xml:space="preserve"><value>Seychelles</value></data>
<data name="dataList.CountryCode.SYR" xml:space="preserve"><value>Syrian Arab Republic</value></data>
<data name="dataList.CountryCode.TCA" xml:space="preserve"><value>Turks and Caicos Islands</value></data>
<data name="dataList.CountryCode.TCD" xml:space="preserve"><value>Chad</value></data>
<data name="dataList.CountryCode.TGO" xml:space="preserve"><value>Togo</value></data>
<data name="dataList.CountryCode.THA" xml:space="preserve"><value>Thailand</value></data>
<data name="dataList.CountryCode.TJK" xml:space="preserve"><value>Tajikistan</value></data>
<data name="dataList.CountryCode.TKL" xml:space="preserve"><value>Tokelau</value></data>
<data name="dataList.CountryCode.TKM" xml:space="preserve"><value>Turkmenistan</value></data>
<data name="dataList.CountryCode.TLS" xml:space="preserve"><value>Timor-Leste</value></data>
<data name="dataList.CountryCode.TON" xml:space="preserve"><value>Tonga</value></data>
<data name="dataList.CountryCode.TTO" xml:space="preserve"><value>Trinidad and Tobago</value></data>
<data name="dataList.CountryCode.TUN" xml:space="preserve"><value>Tunisia</value></data>
<data name="dataList.CountryCode.TUR" xml:space="preserve"><value>Türkiye</value></data>
<data name="dataList.CountryCode.TUV" xml:space="preserve"><value>Tuvalu</value></data>
<data name="dataList.CountryCode.TWN" xml:space="preserve"><value>Taiwan, Province of China</value></data>
<data name="dataList.CountryCode.TZA" xml:space="preserve"><value>Tanzania, United Republic of</value></data>
<data name="dataList.CountryCode.UGA" xml:space="preserve"><value>Uganda</value></data>
<data name="dataList.CountryCode.UKR" xml:space="preserve"><value>Ukraine</value></data>
<data name="dataList.CountryCode.UMI" xml:space="preserve"><value>United States Minor Outlying Islands</value></data>
<data name="dataList.CountryCode.URY" xml:space="preserve"><value>Uruguay</value></data>
<data name="dataList.CountryCode.USA" xml:space="preserve"><value>United States of America</value></data>
<data name="dataList.CountryCode.UZB" xml:space="preserve"><value>Uzbekistan</value></data>
<data name="dataList.CountryCode.VAT" xml:space="preserve"><value>Holy See</value></data>
<data name="dataList.CountryCode.VCT" xml:space="preserve"><value>Saint Vincent and the Grenadines</value></data>
<data name="dataList.CountryCode.VEN" xml:space="preserve"><value>Venezuela, Bolivarian Republic of</value></data>
<data name="dataList.CountryCode.VGB" xml:space="preserve"><value>Virgin Islands (British)</value></data>
<data name="dataList.CountryCode.VIR" xml:space="preserve"><value>Virgin Islands (U.S.)</value></data>
<data name="dataList.CountryCode.VNM" xml:space="preserve"><value>Viet Nam</value></data>
<data name="dataList.CountryCode.VUT" xml:space="preserve"><value>Vanuatu</value></data>
<data name="dataList.CountryCode.WLF" xml:space="preserve"><value>Wallis and Futuna</value></data>
<data name="dataList.CountryCode.WSM" xml:space="preserve"><value>Samoa</value></data>
<data name="dataList.CountryCode.YEM" xml:space="preserve"><value>Yemen</value></data>
<data name="dataList.CountryCode.ZAF" xml:space="preserve"><value>South Africa</value></data>
<data name="dataList.CountryCode.ZMB" xml:space="preserve"><value>Zambia</value></data>
<data name="dataList.CountryCode.ZWE" xml:space="preserve"><value>Zimbabwe</value></data>
<data name="dataList.DocumentType.DNI" xml:space="preserve"><value>DNI</value></data>
<data name="dataList.DocumentType.NIE" xml:space="preserve"><value>NIE</value></data>
<data name="dataList.DocumentType.PASSPORT" xml:space="preserve"><value>Passport</value></data>
<data name="dataList.DocumentType.ID" xml:space="preserve"><value>ID Card</value></data>
<data name="dataList.DocumentType.OTHER" xml:space="preserve"><value>Other</value></data>
<data name="dataList.GenderOption.M" xml:space="preserve"><value>Male</value></data>
<data name="dataList.GenderOption.F" xml:space="preserve"><value>Female</value></data>
<data name="dataList.GenderOption.O" xml:space="preserve"><value>Other</value></data>
<data name="page.GuestDocList.btnNewGuest" xml:space="preserve"><value>New Guest</value></data> <data name="page.GuestDocList.btnNewGuest" xml:space="preserve"><value>New Guest</value></data>
<data name="page.GuestDocList.showAllElements" xml:space="preserve"><value>Show all elements</value></data>
<data name="page.GuestDocNew.msgAlreadyExists" xml:space="preserve"><value>This Guest Document Already exists!!</value></data>
<data name="page.GuestDocNew.btnGoExistingDoc" xml:space="preserve"><value>Go to existing document</value></data>
<data name="control.GuestDocForm.sectionDocument" xml:space="preserve"><value>Document Details</value></data> <data name="control.GuestDocForm.sectionDocument" xml:space="preserve"><value>Document Details</value></data>
<data name="control.GuestDocForm.sectionGuest" xml:space="preserve"><value>Guest Details</value></data> <data name="control.GuestDocForm.sectionGuest" xml:space="preserve"><value>Guest Details</value></data>
@@ -3,6 +3,7 @@ using Microsoft.EntityFrameworkCore;
using Somnia.GuestLog.Infrastructure; using Somnia.GuestLog.Infrastructure;
using Somnia.GuestLog.Models.DTOs; using Somnia.GuestLog.Models.DTOs;
using Somnia.GuestLog.Models.Entities; using Somnia.GuestLog.Models.Entities;
using Somnia.GuestLog.Utils;
namespace Somnia.GuestLog.Services; namespace Somnia.GuestLog.Services;
@@ -127,6 +128,40 @@ public class GuestDocumentService(
return dbList.Select(x => GetDtoFromDb(x)); return dbList.Select(x => GetDtoFromDb(x));
} }
/// <summary>
/// Get GuestDocumentDTO from DB with the given filters.
/// Result count can be limited for perfomance reasons.
/// </summary>
/// <param name="filter">Filters to use</param>
/// <param name="limit">Result count. Set to 0 for unlimited results</param>
/// <returns>Filtered GuestDocumentDTO result list</returns>
public async Task<IEnumerable<GuestDocumentDTO>> GetDtoListByFilterAsync(GuestDocFilterDTO filter, int limit = 0)
{
using var dbContext = contextFactory.CreateDbContext();
var query = dbContext.GuestDocuments.AsQueryable();
query = query.WhereIf(!string.IsNullOrEmpty(filter.DocumentType),
e => e.DocumentType == filter.DocumentType);
query = query.WhereIf(!string.IsNullOrEmpty(filter.DocumentNumber),
e => e.DocumentNum == filter.DocumentNumber);
query = query.WhereIf(!string.IsNullOrEmpty(filter.Name),
e => EF.Functions.Like(e.Name, filter.Name));
query = query.WhereIf(!string.IsNullOrEmpty(filter.Surname),
e => EF.Functions.Like(e.Surname, filter.Surname));
query = query.OrderByDescending(e => e.UpdateTime);
if (limit > 0)
{
query = query.Take(limit);
}
var dbList = await query.ToListAsync();
return dbList.Select(x => GetDtoFromDb(x));
}
public GuestDocumentDTO GetDtoFromDb(GuestDocument dbItem) public GuestDocumentDTO GetDtoFromDb(GuestDocument dbItem)
{ {
@@ -154,5 +189,4 @@ public class GuestDocumentService(
UpdateTime = dbItem.UpdateTime, UpdateTime = dbItem.UpdateTime,
}; };
} }
} }
@@ -6,4 +6,6 @@ public interface IDataListService
public HashSet<string> GetDataListByName(string dataListName); public HashSet<string> GetDataListByName(string dataListName);
public bool IsValueInList(string dataListName, string value); public bool IsValueInList(string dataListName, string value);
public string GetLocalizedValue(string dataListName, string? value);
} }
@@ -10,6 +10,7 @@ public interface IGuestDocumentService
public Task<bool> DeleteDocumentAsync(string docType, string docNum); public Task<bool> DeleteDocumentAsync(string docType, string docNum);
public Task<GuestDocumentDTO?> GetDtoByIdAsync(string docType, string docNum); public Task<GuestDocumentDTO?> GetDtoByIdAsync(string docType, string docNum);
public Task<IEnumerable<GuestDocumentDTO>> GetDtoListByFilterAsync(GuestDocFilterDTO filter, int limit = 0);
public Task<IEnumerable<GuestDocumentDTO>> GetDtoListAsync(); public Task<IEnumerable<GuestDocumentDTO>> GetDtoListAsync();
//TODO: Add Filter //TODO: Add Filter
@@ -1,7 +1,21 @@
using Microsoft.Extensions.Localization;
using Somnia.GuestLog.Resources;
namespace Somnia.GuestLog.Services; namespace Somnia.GuestLog.Services;
public class StaticDataListService() : IDataListService public class StaticDataListService(
IServiceProvider serviceProvider
) : IDataListService
{ {
private IStringLocalizer<DataListLocale> _dataListLang
{
get
{
return serviceProvider.GetRequiredService<IStringLocalizer<DataListLocale>>();
}
}
private readonly Dictionary<string, HashSet<string>> dataListDict = new([ private readonly Dictionary<string, HashSet<string>> dataListDict = new([
new KeyValuePair<string, HashSet<string>>(GuestConsts.DataList_DocumentTypes, _documentTypeSet), new KeyValuePair<string, HashSet<string>>(GuestConsts.DataList_DocumentTypes, _documentTypeSet),
new KeyValuePair<string, HashSet<string>>(GuestConsts.DataList_GenderOptions, _genderOptionSet), new KeyValuePair<string, HashSet<string>>(GuestConsts.DataList_GenderOptions, _genderOptionSet),
@@ -28,13 +42,18 @@ public class StaticDataListService() : IDataListService
return set.Contains(value); return set.Contains(value);
} }
public string GetLocalizedValue(string dataListName, string? value)
{
return _dataListLang[$"dataList.{dataListName}.{value}"];
}
#region DataList Dicts #region DataList Dicts
private static readonly HashSet<string> _documentTypeSet = [ private static readonly HashSet<string> _documentTypeSet = [
"DNI", GuestConsts.DocumentType_DNI,
"NIE", GuestConsts.DocumentType_NIE,
"PASSPORT", GuestConsts.DocumentType_PASSPORT,
"ID", "ID",
"OTHER", "OTHER",
]; ];
@@ -31,5 +31,8 @@
<EmbeddedResource Update="Resources\LanguageLocale.resx"> <EmbeddedResource Update="Resources\LanguageLocale.resx">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Update="Resources\DataListLocale.resx">
<Generator>MSBuild:Compile</Generator>
</EmbeddedResource>
</ItemGroup> </ItemGroup>
</Project> </Project>
+106
View File
@@ -0,0 +1,106 @@
namespace Somnia.GuestLog.Utils;
public static class DNIUtils
{
#region Validators
public static bool IsValidDNI(string dni)
{
//Bypass validation if letter if 'Ñ'
if (dni.Length > 1 && dni[^1] == 'Ñ')
{
return true;
}
if (dni.Length != 9 || !RegexUtils.RegexDniFormat().IsMatch(dni))
{
return false;
// throw new InvalidOperationException($"DNI with invalid format!! Value: '{dni}'");
}
char calculatedLetter = CalculateLetterDniFromDigits(dni[..8]);
return calculatedLetter == dni[8];
}
public static bool IsValidNIE(string nie)
{
//Bypass validation if letter if 'Ñ'
if (nie.Length > 1 && nie[^1] == 'Ñ')
{
return true;
}
if (nie.Length != 9 || !RegexUtils.RegexNieFormat().IsMatch(nie))
{
return false;
// throw new InvalidOperationException($"NIE with invalid format!! Value: '{nie}'");
}
char calculatedLetter = CalculateLetterNieFromDigits(nie[..8]);
return calculatedLetter == nie[8];
}
#endregion
#region Letter Calculators
public static char CalculateLetterDniFromDigits(string dniDigits)
{
if (dniDigits.Length != 8)
{
throw new InvalidOperationException($"Invalid digit length! Received value '{dniDigits}' is not 8 digits long");
}
return GetDniLetter(dniDigits.AsSpan());
}
public static char CalculateLetterNieFromDigits(string dniDigits)
{
//Convert first letter to number.
int firstLetterAsDigit = NiePrefixToDigit(dniDigits[0]);
string newDigits = firstLetterAsDigit + dniDigits[1..];
return CalculateLetterDniFromDigits(newDigits);
}
#endregion
#region Internal Calculations
//Letters for remainder 0..22
private const string Letters = "TRWAGMYFPDXBNJZSQVHLCKE";
// NIE prefixes map to digits:
// X -> 0, Y -> 1, Z -> 2 (so they become 0/1/2 + 7 digits for mod computation)
private static int NiePrefixToDigit(char prefix)
=> prefix switch
{
'X' or 'x' => 0,
'Y' or 'y' => 1,
'Z' or 'z' => 2,
_ => throw new ArgumentException("Invalid NIE prefix. Expected X, Y, or Z.")
};
private static char GetDniLetter(ReadOnlySpan<char> digits)
{
// Fast path: avoid allocating by parsing digits incrementally as a number mod 23.
int mod = 0;
for (int i = 0; i < digits.Length; i++)
{
char c = digits[i];
// Optional validation: digits only
if ((uint)(c - '0') > 9) throw new ArgumentException("Non-digit character found.");
mod = (mod * 10 + (c - '0')) % 23;
}
return Letters[mod];
}
#endregion
}
@@ -0,0 +1,11 @@
using System.Linq.Expressions;
namespace Somnia.GuestLog.Utils;
public static class QueryExtensions
{
public static IQueryable<T> WhereIf<T>(this IQueryable<T> source, bool condition, Expression<Func<T, bool>> predicate)
{
return condition ? source.Where(predicate) : source;
}
}
+18
View File
@@ -0,0 +1,18 @@
using System.Text.RegularExpressions;
namespace Somnia.GuestLog.Utils;
public static partial class RegexUtils
{
[GeneratedRegex("^[0-9]{8}[A-Z]$")]
public static partial Regex RegexDniFormat();
[GeneratedRegex("^[XYZ][0-9]{7}[A-Z]$")]
public static partial Regex RegexNieFormat();
[GeneratedRegex("^[A-Z]{3}[0-9]{6}$")]
public static partial Regex RegexGuestDocSuportNumber();
[GeneratedRegex(@"^\+?\d{1,4}?[-.\s]?\(?\d{1,3}?\)?[-.\s]?\d{1,4}[-.\s]?\d{1,4}[-.\s]?\d{1,9}$")]
public static partial Regex RegexPhoneNumber();
}
@@ -0,0 +1,14 @@
using FluentValidation;
using Somnia.GuestLog.Models.DTOs;
using Somnia.GuestLog.Services;
namespace Somnia.GuestLog.Validators;
public static class CustomValidators
{
public static IRuleBuilderOptions<T, IList<TElement>> ListMustContainFewerThan<T, TElement>(this IRuleBuilder<T, IList<TElement>> ruleBuilder, int num)
{
return ruleBuilder.Must(list => list.Count < num).WithMessage("The list contains too many items");
}
}
@@ -0,0 +1,44 @@
using FluentValidation;
using Somnia.GuestLog.Models.DTOs;
using Somnia.GuestLog.Services;
using Somnia.GuestLog.Utils;
namespace Somnia.GuestLog.Validators;
/// <summary>
/// Validator for GuestDocumentDTO which contains multiple rules and can be shared with the back end API
/// </summary>
public class GuestDocIdDTOValidator : AbstractValidator<GuestDocIdDTO>
{
public GuestDocIdDTOValidator(IDataListService dataListService)
{
RuleFor(x => x.DocumentType)
.NotEmpty()
.Must(val => val != null && dataListService.IsValueInList(GuestConsts.DataList_DocumentTypes, val));
RuleFor(x => x.DocumentNum)
.NotEmpty()
.Length(6, 32);
RuleFor(x => x.DocumentNum)
.Cascade(CascadeMode.Stop)
.NotEmpty()
.Must(num => DNIUtils.IsValidDNI(num))
.WithMessage("Invalid DNI")
.When(x => x.DocumentType == GuestConsts.DocumentType_DNI);
RuleFor(x => x.DocumentNum)
.Cascade(CascadeMode.Stop)
.NotEmpty()
.Must(num => DNIUtils.IsValidNIE(num))
.WithMessage("Invalid NIE")
.When(x => x.DocumentType == GuestConsts.DocumentType_NIE);
}
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
{
var result = await ValidateAsync(ValidationContext<GuestDocIdDTO>.CreateWithOptions((GuestDocIdDTO)model, x =>
x.IncludeProperties(propertyName)));
return result.IsValid ? [] : result.Errors.Select(e => e.ErrorMessage);
};
}
@@ -1,6 +1,7 @@
using FluentValidation; using FluentValidation;
using Somnia.GuestLog.Models.DTOs; using Somnia.GuestLog.Models.DTOs;
using Somnia.GuestLog.Services; using Somnia.GuestLog.Services;
using Somnia.GuestLog.Utils;
namespace Somnia.GuestLog.Validators; namespace Somnia.GuestLog.Validators;
@@ -12,6 +13,7 @@ public class GuestDocumentDTOValidator : AbstractValidator<GuestDocumentDTO>
public GuestDocumentDTOValidator(IDataListService dataListService) public GuestDocumentDTOValidator(IDataListService dataListService)
{ {
RuleFor(x => x.DocumentType) RuleFor(x => x.DocumentType)
.Cascade(CascadeMode.Stop)
.NotEmpty() .NotEmpty()
.Must(val => val != null && dataListService.IsValueInList(GuestConsts.DataList_DocumentTypes, val)); .Must(val => val != null && dataListService.IsValueInList(GuestConsts.DataList_DocumentTypes, val));
@@ -23,6 +25,12 @@ public class GuestDocumentDTOValidator : AbstractValidator<GuestDocumentDTO>
.NotEmpty() .NotEmpty()
.LessThanOrEqualTo(DateTime.Today); .LessThanOrEqualTo(DateTime.Today);
RuleFor(x => x.SupportNum)
.Cascade(CascadeMode.Stop)
.NotEmpty()
.Matches(RegexUtils.RegexGuestDocSuportNumber()).WithMessage("Invalid Format. Expected 'AAA000000'.")
.When(x => x.Nationality == GuestConsts.CountryCode_ESP);
RuleFor(x => x.Name) RuleFor(x => x.Name)
.NotEmpty() .NotEmpty()
.Length(1, 100); .Length(1, 100);
@@ -36,6 +44,7 @@ public class GuestDocumentDTOValidator : AbstractValidator<GuestDocumentDTO>
.LessThanOrEqualTo(DateTime.Today); .LessThanOrEqualTo(DateTime.Today);
RuleFor(x => x.Nationality) RuleFor(x => x.Nationality)
.Cascade(CascadeMode.Stop)
.NotEmpty() .NotEmpty()
.Must(val => val != null && dataListService.IsValueInList(GuestConsts.DataList_CountryCodes, val)); .Must(val => val != null && dataListService.IsValueInList(GuestConsts.DataList_CountryCodes, val));
@@ -46,19 +55,13 @@ public class GuestDocumentDTOValidator : AbstractValidator<GuestDocumentDTO>
.When(x => !string.IsNullOrEmpty(x.EmailAddress)); .When(x => !string.IsNullOrEmpty(x.EmailAddress));
RuleFor(x => x.PhoneNumber) RuleFor(x => x.PhoneNumber)
.Matches(GuestConsts.regexPattern_phoneNum) .Matches(RegexUtils.RegexPhoneNumber()).WithMessage("Invalid format")
.When(x => !string.IsNullOrEmpty(x.PhoneNumber)); .When(x => !string.IsNullOrEmpty(x.PhoneNumber));
RuleFor(x => x.AddressCountry) RuleFor(x => x.AddressCountry)
.NotEmpty() .NotEmpty()
.Must(val => val != null && dataListService.IsValueInList(GuestConsts.DataList_CountryCodes, val)); .Must(val => val != null && dataListService.IsValueInList(GuestConsts.DataList_CountryCodes, val));
// RuleFor(x => x.Email)
// .Cascade(CascadeMode.Stop)
// .NotEmpty()
// .EmailAddress()
// .MustAsync(async (value, _) => await IsUniqueAsync(value));
// RuleFor(x => x.CCNumber) // RuleFor(x => x.CCNumber)
// .NotEmpty() // .NotEmpty()
// .Length(1, 100) // .Length(1, 100)