Вытащил солюшен на уровень выше, чтобы прощё было дотнетить
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is failing
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	continuous-integration/drone/push Build is failing
				
			This commit is contained in:
		| @@ -0,0 +1,38 @@ | ||||
| @using VisaApiClient | ||||
| <div> | ||||
|     <div > | ||||
|         <label > | ||||
|             Country:<br/> | ||||
|             <InputText class="rounded" @bind-Value="Address.Country"/> | ||||
|         </label><br/> | ||||
|         <ValidationMessage For="() => Address.Country"></ValidationMessage><br/> | ||||
|     </div> | ||||
|  | ||||
|     <div > | ||||
|         <label > | ||||
|             City:<br/> | ||||
|             <InputText class="rounded" @bind-Value="Address.City"/> | ||||
|         </label><br/> | ||||
|         <ValidationMessage For="() => Address.City"></ValidationMessage><br/> | ||||
|     </div> | ||||
|  | ||||
|     <div > | ||||
|         <label > | ||||
|             Street:<br/> | ||||
|             <InputText class="rounded" @bind-Value="Address.Street"/> | ||||
|         </label><br/> | ||||
|         <ValidationMessage For="() => Address.Street"></ValidationMessage><br/> | ||||
|     </div> | ||||
|  | ||||
|     <div > | ||||
|         <label > | ||||
|             Building:<br/> | ||||
|             <InputText class="rounded" @bind-Value="Address.Building"/> | ||||
|         </label><br/> | ||||
|         <ValidationMessage For="() => Address.Building"></ValidationMessage> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| @code { | ||||
|     [Parameter, EditorRequired] public AddressModel Address { get; set; } = null!; | ||||
| } | ||||
| @@ -0,0 +1,22 @@ | ||||
| @using VisaApiClient | ||||
| <div> | ||||
|     <div > | ||||
|         <label > | ||||
|             Email:<br/> | ||||
|             <InputText class="rounded" @bind-Value="AuthData.Email"/> | ||||
|         </label><br/> | ||||
|         <ValidationMessage For="() => AuthData.Email"></ValidationMessage><br/> | ||||
|     </div> | ||||
|  | ||||
|     <div > | ||||
|         <label > | ||||
|             Password:<br/> | ||||
|             <InputText type="password" class="rounded" @bind-Value="AuthData.Password"/> | ||||
|         </label><br/> | ||||
|         <ValidationMessage For="() => AuthData.Password"></ValidationMessage> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| @code { | ||||
|     [Parameter, EditorRequired] public AuthData AuthData { get; set; } = null!; | ||||
| } | ||||
| @@ -0,0 +1,30 @@ | ||||
| @using VisaApiClient | ||||
| <div> | ||||
|     <div > | ||||
|         <label> | ||||
|             First name@(Constants.RequiredFieldMarkup):<br/> | ||||
|             <InputText DisplayName="First name" class="rounded" @bind-Value="Name.FirstName"/> | ||||
|         </label><br/> | ||||
|         <ValidationMessage For="() => Name.FirstName"></ValidationMessage> | ||||
|     </div><br/> | ||||
|  | ||||
|     <div > | ||||
|         <label> | ||||
|             Surname@(Constants.RequiredFieldMarkup):<br/> | ||||
|             <InputText class="rounded" @bind-Value="Name.Surname"/> | ||||
|         </label><br/> | ||||
|         <ValidationMessage For="() => Name.Surname"></ValidationMessage> | ||||
|     </div><br/> | ||||
|  | ||||
|     <div > | ||||
|         <label> | ||||
|             Patronymic:<br/> | ||||
|             <InputText class="rounded" @bind-Value="Name.Patronymic"/> | ||||
|         </label><br/> | ||||
|         <ValidationMessage For="() => Name.Patronymic"></ValidationMessage> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| @code { | ||||
|     [Parameter, EditorRequired] public NameModel Name { get; set; } = null!; | ||||
| } | ||||
| @@ -0,0 +1,51 @@ | ||||
| @using BlazorWebAssemblyVisaApiClient.Infrastructure.Services.DateTimeProvider | ||||
| @using VisaApiClient | ||||
| <div> | ||||
|     <div > | ||||
|         <label> | ||||
|             Passport number:<br/> | ||||
|             <InputText DisplayName="Passport number" class="rounded" @bind-Value="Passport.Number"/> | ||||
|         </label><br/> | ||||
|         <ValidationMessage For="() => Passport.Number"></ValidationMessage> | ||||
|     </div><br/> | ||||
|  | ||||
|     <div > | ||||
|         <label> | ||||
|             Issuer:<br/> | ||||
|             <InputText class="rounded" @bind-Value="Passport.Issuer"/> | ||||
|         </label><br/> | ||||
|         <ValidationMessage For="() => Passport.Issuer"></ValidationMessage> | ||||
|     </div><br/> | ||||
|  | ||||
|     <div > | ||||
|         <label> | ||||
|             Issue date:<br/> | ||||
|             <InputDate DisplayName="Issue date" class="rounded" @bind-Value="Passport.IssueDate" max="@formattedDate"/> | ||||
|         </label><br/> | ||||
|         <ValidationMessage For="() => Passport.IssueDate"></ValidationMessage> | ||||
|     </div><br/> | ||||
|  | ||||
|     <div > | ||||
|         <label> | ||||
|             Expiration date:<br/> | ||||
|             <InputDate DisplayName="Expiration date" class="rounded" @bind-Value="Passport.ExpirationDate" min="@formattedDate"/> | ||||
|         </label><br/> | ||||
|         <ValidationMessage For="() => Passport.ExpirationDate"></ValidationMessage> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| @code { | ||||
|     private string formattedDate = null!; | ||||
|  | ||||
|     [Parameter, EditorRequired] public PassportModel Passport { get; set; } = null!; | ||||
|  | ||||
|     [Inject] IDateTimeProvider DateTimeProvider { get; set; } = null!; | ||||
|  | ||||
|     protected override void OnInitialized() | ||||
|     { | ||||
|         Passport.IssueDate = DateTime.Now; | ||||
|         Passport.ExpirationDate = DateTime.Now; | ||||
|         formattedDate = DateTimeProvider.FormattedNow(); | ||||
|     } | ||||
|  | ||||
| } | ||||
| @@ -0,0 +1,22 @@ | ||||
| @using BlazorWebAssemblyVisaApiClient.Validation.Applicants.Models | ||||
| <div> | ||||
|     <div > | ||||
|         <label > | ||||
|             Name:<br/> | ||||
|             <InputText class="rounded" @bind-Value="PlaceOfWork.Name"/> | ||||
|         </label><br/> | ||||
|         <ValidationMessage For="() => PlaceOfWork.Name"></ValidationMessage><br/> | ||||
|     </div> | ||||
|  | ||||
|     <div > | ||||
|         <label > | ||||
|             Phone number:<br/> | ||||
|             <InputText DisplayName="Phone number" class="rounded" @bind-Value="PlaceOfWork.PhoneNum"/> | ||||
|         </label><br/> | ||||
|         <ValidationMessage For="() => PlaceOfWork.PhoneNum"></ValidationMessage> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| @code { | ||||
|     [Parameter, EditorRequired] public PlaceOfWorkModel PlaceOfWork { get; set; } = null!; | ||||
| } | ||||
| @@ -0,0 +1,51 @@ | ||||
| @typeparam TItem where TItem : class | ||||
| @using System.Linq.Expressions | ||||
| @using System.Reflection | ||||
| @using BlazorWebAssemblyVisaApiClient.Infrastructure.Helpers | ||||
| @typeparam TMember where TMember : struct, Enum | ||||
|  | ||||
| <InputSelect TValue="TMember" @bind-Value="selected"> | ||||
|     @foreach (var value in enumValues) | ||||
|     { | ||||
|         <option value="@value.Key">@value.Value</option> | ||||
|     } | ||||
| </InputSelect><br/> | ||||
|  | ||||
| @code { | ||||
|     [Parameter, EditorRequired] public TItem Model { get; set; } = default!; | ||||
|  | ||||
|     [Parameter, EditorRequired] public Expression<Func<TItem, TMember>> EnumProperty { get; set; } = null!; | ||||
|  | ||||
|     [Parameter] public Action? OnChanged { get; set; } | ||||
|  | ||||
|     private Dictionary<TMember, string> enumValues = new(); | ||||
|     private PropertyInfo modelMemberInfo = null!; | ||||
|     private TMember selected; | ||||
|  | ||||
|     protected override void OnInitialized() | ||||
|     { | ||||
|         var modelMemberName = ((MemberExpression)EnumProperty.Body).Member.Name; | ||||
|         modelMemberInfo = typeof(TItem).GetProperty(modelMemberName)!; | ||||
|  | ||||
|         foreach (var value in Enum.GetValues<TMember>()) | ||||
|         { | ||||
|             enumValues.Add(value, value.GetDisplayName()); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     protected override void OnAfterRender(bool firstRender) | ||||
|     { | ||||
|         var current = (TMember)modelMemberInfo.GetValue(Model)!; | ||||
|         if (!current.Equals(selected)) | ||||
|         { | ||||
|             OnValueChanged(); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     private void OnValueChanged() | ||||
|     { | ||||
|         modelMemberInfo.SetValue(Model, selected); | ||||
|         OnChanged?.Invoke(); | ||||
|     } | ||||
|  | ||||
| } | ||||
| @@ -0,0 +1,32 @@ | ||||
| @using BlazorWebAssemblyVisaApiClient.Infrastructure.Services.DateTimeProvider | ||||
| @using VisaApiClient | ||||
| <div> | ||||
|     <label> | ||||
|         Issuer:<br/> | ||||
|         <InputText DisplayName="Issuer of permission to destination Country" class="rounded" | ||||
|                    @bind-Value="PermissionToDestCountry.Issuer"/> | ||||
|     </label><br/> | ||||
|     <ValidationMessage For="() => PermissionToDestCountry.Issuer"></ValidationMessage><br/> | ||||
|  | ||||
|     <label> | ||||
|         Expiration date:<br/> | ||||
|         <InputDate DisplayName="Expiration date of permission to destination Country" class="rounded" | ||||
|                    @bind-Value="PermissionToDestCountry.ExpirationDate" | ||||
|                    min="@formattedDate"/> | ||||
|     </label><br/> | ||||
|     <ValidationMessage For="() => PermissionToDestCountry.ExpirationDate"></ValidationMessage> | ||||
| </div> | ||||
|  | ||||
| @code { | ||||
|     private string formattedDate = null!; | ||||
|  | ||||
|     [Parameter, EditorRequired] public PermissionToDestCountryModel PermissionToDestCountry { get; set; } = null!; | ||||
|  | ||||
|     [Inject] IDateTimeProvider DateTimeProvider { get; set; } = null!; | ||||
|  | ||||
|     protected override void OnInitialized() | ||||
|     { | ||||
|         formattedDate = DateTimeProvider.FormattedNow(); | ||||
|     } | ||||
|  | ||||
| } | ||||
| @@ -0,0 +1,33 @@ | ||||
| @using BlazorWebAssemblyVisaApiClient.Infrastructure.Services.DateTimeProvider | ||||
| @using VisaApiClient | ||||
| <div> | ||||
|     <label> | ||||
|         Number:<br/> | ||||
|         <InputText DisplayName="Number of re-entry permit" class="rounded" | ||||
|                    @bind-Value="ReentryPermit.Number"/> | ||||
|     </label><br/> | ||||
|     <ValidationMessage For="() => ReentryPermit.Number"></ValidationMessage><br/> | ||||
|  | ||||
|     <label> | ||||
|         Expiration date:<br/> | ||||
|         <InputDate DisplayName="Expiration date of re-entry permit" class="rounded" | ||||
|                    @bind-Value="ReentryPermit.ExpirationDate" | ||||
|                    min="@formattedDate"/> | ||||
|     </label><br/> | ||||
|     <ValidationMessage For="() => ReentryPermit.ExpirationDate"></ValidationMessage> | ||||
| </div> | ||||
|  | ||||
| @code { | ||||
|     private string formattedDate = null!; | ||||
|  | ||||
|     [Parameter, EditorRequired] public ReentryPermitModel ReentryPermit { get; set; } = null!; | ||||
|  | ||||
|     [Inject] IDateTimeProvider DateTimeProvider { get; set; } = null!; | ||||
|  | ||||
|     protected override void OnInitialized() | ||||
|     { | ||||
|         formattedDate = DateTimeProvider.FormattedNow(); | ||||
|         ReentryPermit.ExpirationDate = DateTimeProvider.Now(); | ||||
|     } | ||||
|  | ||||
| } | ||||
		Reference in New Issue
	
	Block a user