Intermediate commit to pull changes from remote
This commit is contained in:
parent
c75a3855ac
commit
9f26f8f720
|
|
@ -17,8 +17,7 @@ namespace TIAM.Entities.TransferDestinations
|
|||
|
||||
public Guid AddressId { get; set; }
|
||||
public virtual Address Address { get; set; }
|
||||
|
||||
//[Required(ErrorMessage = "The Username value should be specified.")]
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-android|AnyCPU'">
|
||||
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-maccatalyst|AnyCPU'">
|
||||
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<MauiXaml Update="App.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="">
|
||||
<div class="mx-3">
|
||||
<EditForm Model="@Data"
|
||||
OnValidSubmit="@HandleValidSubmit"
|
||||
OnInvalidSubmit="@HandleInvalidSubmit"
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ using TIAMWebApp.Shared.Application.Models;
|
|||
using DevExpress.XtraPrinting;
|
||||
using TIAMSharedUI.Shared;
|
||||
using DevExpress.Pdf.Native.BouncyCastle.Asn1.Cms;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
|
||||
namespace TIAMSharedUI.Pages.Components
|
||||
|
|
@ -209,22 +210,22 @@ namespace TIAMSharedUI.Pages.Components
|
|||
|
||||
editor.AddAttribute(j++, "Mask", TIAMRegularExpressions.PhoneNumberMask);
|
||||
editor.AddAttribute(j++, "MaskMode", MaskMode.RegEx);
|
||||
editor.AddAttribute(j++, "BindValueMode", BindValueMode.OnLostFocus);
|
||||
editor.AddAttribute(j++, "ValueExpression", lambda);
|
||||
editor.AddAttribute(j++, "BindValueMode", BindValueMode.OnInput);
|
||||
editor.AddAttribute(j++, "NullText", "+11234567890");
|
||||
editor.AddAttribute(j++, "MaskAutoCompleteMode", MaskAutoCompleteMode.None);
|
||||
editor.AddAttribute(j++, "ValueExpression", lambda);
|
||||
//editor.AddAttribute(j++, "Placeholder", "#");
|
||||
//editor.AddAttribute(j++, "PlaceholdersVisible", false);
|
||||
editor.AddAttribute(j++, "ValueChanged", EventCallback.Factory.Create<string>(this, str => SetPhoneNumber(property, Data, str)));
|
||||
//editor.AddAttribute(j++, "TextChanged", EventCallback.Factory.Create<string>(this, str => { property.SetValue(Data, str); }));
|
||||
editor.AddAttribute(i++, "Template", (RenderFragment<object>)((context) => ((regexProperties) =>
|
||||
/*editor.AddAttribute(i++, "Template", (RenderFragment<object>)((context) => ((regexProperties) =>
|
||||
{
|
||||
var l = 0;
|
||||
regexProperties.OpenComponent<DxRegExMaskProperties>(l++);
|
||||
regexProperties.AddAttribute(l++, "Placeholder", "#");
|
||||
regexProperties.AddAttribute(l++, "PlaceholdersVisible", false);
|
||||
regexProperties.CloseComponent();
|
||||
})));
|
||||
})));*/
|
||||
editor.CloseComponent();
|
||||
break;
|
||||
}
|
||||
|
|
@ -235,7 +236,7 @@ namespace TIAMSharedUI.Pages.Components
|
|||
editor.AddAttribute(j++, "Mask", TIAMRegularExpressions.EmailMask);
|
||||
editor.AddAttribute(j++, "MaskMode", MaskMode.RegEx);
|
||||
|
||||
editor.AddAttribute(j++, "BindValueMode", BindValueMode.OnLostFocus);
|
||||
editor.AddAttribute(j++, "BindValueMode", BindValueMode.OnInput);
|
||||
//MaskAutoCompleteMode="@((MaskAutoCompleteMode)AutoCompleteMode)"
|
||||
editor.AddAttribute(j++, "MaskAutoCompleteMode", MaskAutoCompleteMode.None);
|
||||
editor.AddAttribute(j++, "NullText", "example@example.com");
|
||||
|
|
@ -344,6 +345,8 @@ namespace TIAMSharedUI.Pages.Components
|
|||
|
||||
editor.OpenComponent<SliderItemSelector>(j);
|
||||
editor.AddAttribute(j++, "OwlId", "owlSelector" + _stepID);
|
||||
editor.AddAttribute(j++, "TextValue", property.GetValue(Data));
|
||||
//editor.AddAttribute(j++, "TExpression", lambda);
|
||||
editor.AddAttribute(j++, "OnSliderChanged", EventCallback.Factory.Create<string>(this, result =>
|
||||
{
|
||||
LogToBrowserConsole.LogToBC($"Slider changed to {result}");
|
||||
|
|
@ -356,6 +359,7 @@ namespace TIAMSharedUI.Pages.Components
|
|||
editor.OpenComponent<DxTextBox>(j++);
|
||||
editor.AddAttribute(j++, "CssClass", "form-field");
|
||||
editor.AddAttribute(j++, "NullText", "Slide or type");
|
||||
editor.AddAttribute(j++, "Enabled", false);
|
||||
editor.AddAttribute(j++, "Text", property.GetValue(Data));
|
||||
editor.AddAttribute(j++, "TextExpression", lambda);
|
||||
editor.AddAttribute(j++, "TextChanged", EventCallback.Factory.Create<string>(this, str => {
|
||||
|
|
@ -472,4 +476,33 @@ namespace TIAMSharedUI.Pages.Components
|
|||
property.SetValue(Data, str);
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
|
||||
public class MinPasswordLengthAttribute : ValidationAttribute
|
||||
{
|
||||
int MinLength { get; }
|
||||
public MinPasswordLengthAttribute(int minLength, string errorMsg) : base(errorMsg)
|
||||
{
|
||||
MinLength = minLength;
|
||||
}
|
||||
|
||||
public override bool IsValid(object value)
|
||||
{
|
||||
return ((string)value).Length >= MinLength;
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
|
||||
public class EmailAttribute : ValidationAttribute
|
||||
{
|
||||
public override bool IsValid(object value)
|
||||
{
|
||||
return Regex.IsMatch((string)value, @"^[\w!#$%&'*+\-/=?\^_`{|}~]+(\.[\w!#$%&'*+\-/=?\^_`{|}~]+)*"
|
||||
+ "@"
|
||||
+ @"((([\-\w]+\.)+[a-zA-Z]{2,4})|(([0-9]{1,3}\.){3}[0-9]{1,3}))$");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,29 +78,5 @@ namespace TIAMSharedUI.Pages.Components
|
|||
};
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
|
||||
public class MinPasswordLengthAttribute : ValidationAttribute
|
||||
{
|
||||
int MinLength { get; }
|
||||
public MinPasswordLengthAttribute(int minLength, string errorMsg) : base(errorMsg)
|
||||
{
|
||||
MinLength = minLength;
|
||||
}
|
||||
|
||||
public override bool IsValid(object value)
|
||||
{
|
||||
return ((string)value).Length >= MinLength;
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
|
||||
public class EmailAttribute : ValidationAttribute
|
||||
{
|
||||
public override bool IsValid(object value)
|
||||
{
|
||||
return Regex.IsMatch((string)value, @"^[\w!#$%&'*+\-/=?\^_`{|}~]+(\.[\w!#$%&'*+\-/=?\^_`{|}~]+)*"
|
||||
+ "@"
|
||||
+ @"((([\-\w]+\.)+[a-zA-Z]{2,4})|(([0-9]{1,3}\.){3}[0-9]{1,3}))$");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
@page "/login"
|
||||
@using System.IdentityModel.Tokens.Jwt;
|
||||
@using System.Security.Claims;
|
||||
@using BlazorAnimation
|
||||
@using Newtonsoft.Json.Linq;
|
||||
@using System.Text.Json;
|
||||
@using System.Reflection;
|
||||
|
|
@ -15,51 +16,77 @@
|
|||
|
||||
<PageTitle>Login</PageTitle>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="my-logo">
|
||||
<img src="_content/TIAMSharedUI/images/png-logo-0.png" alt="">
|
||||
<div class="text-center m-5">
|
||||
<h1>Login</h1>
|
||||
<h2 style="font-size:small">Good to see you again!</h2>
|
||||
</div>
|
||||
<div class="text-center mt-4 name">
|
||||
@localizer["LoginTitleText"]
|
||||
</div>
|
||||
<form class="p-3 mt-3">
|
||||
<div>
|
||||
@switch (currentStep)
|
||||
{
|
||||
case 1:
|
||||
<LoginStep1 @bind-LoginModel="loginModel" onLoginNext="GoToNextStep" />
|
||||
;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
<LoginStep3 @bind-LoginModel="loginModel" onSubmit="SubmitLogin" onPrev="GoToPreviousStep" />
|
||||
;
|
||||
break;
|
||||
}
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
<p>@currentStep</p>
|
||||
@{
|
||||
if (!loggedIn)
|
||||
{
|
||||
<div class="container mt-3">
|
||||
<div class="row d-flex justify-content-center align-items-center h-100">
|
||||
<div class="col-12 col-sm-6 px-5">
|
||||
<Animation Effect="@Effect.FadeInUp" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
|
||||
<div class="card mycard inputwizardwrapper my-5">
|
||||
|
||||
<div>
|
||||
<div class="wrapper">
|
||||
<div class="my-logo">
|
||||
<img src="_content/TIAMSharedUI/images/png-logo-0.png" alt="">
|
||||
</div>
|
||||
<div class="text-center mt-4 name">
|
||||
@localizer["LoginTitleText"]
|
||||
</div>
|
||||
<form class="p-3 mt-3">
|
||||
<div>
|
||||
@switch (currentStep)
|
||||
{
|
||||
case 1:
|
||||
<LoginStep1 @bind-LoginModel="loginModel" onLoginNext="GoToNextStep" />
|
||||
;
|
||||
break;
|
||||
|
||||
<p>@localizer["LoginEmail"]: @loginModel.Email</p>
|
||||
case 2:
|
||||
<LoginStep3 @bind-LoginModel="loginModel" onSubmit="SubmitLogin" onPrev="GoToPreviousStep" />
|
||||
;
|
||||
break;
|
||||
}
|
||||
</div>
|
||||
|
||||
<p>@loginModel.Password</p>
|
||||
|
||||
</form>
|
||||
<p>@currentStep</p>
|
||||
@{
|
||||
if (!loggedIn)
|
||||
{
|
||||
|
||||
<div>
|
||||
|
||||
<p>@localizer["LoginEmail"]: @loginModel.Email</p>
|
||||
|
||||
<p>@loginModel.Password</p>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
<div class="text-center fs-6">
|
||||
No account yet? <a href="register">Sign up here!</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
<div class="text-center fs-6">
|
||||
No account yet? <a href="register">Sign up here!</a>
|
||||
</Animation>
|
||||
</div>
|
||||
<div class="col-12 col-sm-6 px-5">
|
||||
<Animation Effect="@Effect.FadeInUp" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
|
||||
<p>
|
||||
@*Add lorem ipsum 1 paragraph*@
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
|
||||
</p>
|
||||
</Animation>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
LoginModel loginModel = new LoginModel("test@test", "test1234");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
@page "/register"
|
||||
@using BlazorAnimation
|
||||
@using TIAMWebApp.Shared.Application.Interfaces;
|
||||
@using TIAMWebApp.Shared.Application.Models.PageModels;
|
||||
@using TIAMSharedUI.Pages.Components;
|
||||
|
|
@ -7,47 +8,64 @@
|
|||
@inject IJSRuntime jsRuntime
|
||||
<PageTitle>Register</PageTitle>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="my-logo">
|
||||
<img src="_content/TIAMSharedUI/images/png-logo-0.png" alt="">
|
||||
</div>
|
||||
<div class="text-center mt-4 name">
|
||||
Let's create your account!
|
||||
</div>
|
||||
<form class="p-3 mt-3">
|
||||
<div>
|
||||
@switch (currentStep)
|
||||
{
|
||||
case 1:
|
||||
<Step1 @bind-RegModel="regModel" onNext="GoToNextStep" />
|
||||
;
|
||||
break;
|
||||
case 2:
|
||||
<Step2 @bind-RegModel="regModel" onNext="GoToNextStep" onPrev="GoToPreviousStep" />
|
||||
;
|
||||
break;
|
||||
case 3:
|
||||
<Step3 @bind-RegModel="regModel" onSubmit="SubmitRegistration" onPrev="GoToPreviousStep" />
|
||||
;
|
||||
break;
|
||||
}
|
||||
<div class="text-center m-5">
|
||||
<h1>Register</h1>
|
||||
<h2 style="font-size:small">Welcome to TourIam!</h2>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="container mt-3">
|
||||
<div class="row d-flex justify-content-center align-items-center h-100">
|
||||
<div class="col-12 col-sm-6">
|
||||
<Animation Effect="@Effect.FadeInUp" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
|
||||
<div class="card mycard inputwizardwrapper my-5">
|
||||
<div class="wrapper">
|
||||
<div class="my-logo">
|
||||
<img src="_content/TIAMSharedUI/images/png-logo-0.png" alt="">
|
||||
</div>
|
||||
<div class="text-center mt-4 name">
|
||||
Let's create your account!
|
||||
</div>
|
||||
<form class="p-3 mt-3">
|
||||
<div>
|
||||
@switch (currentStep)
|
||||
{
|
||||
case 1:
|
||||
<Step1 @bind-RegModel="regModel" onNext="GoToNextStep" />
|
||||
;
|
||||
break;
|
||||
case 2:
|
||||
<Step2 @bind-RegModel="regModel" onNext="GoToNextStep" onPrev="GoToPreviousStep" />
|
||||
;
|
||||
break;
|
||||
case 3:
|
||||
<Step3 @bind-RegModel="regModel" onSubmit="SubmitRegistration" onPrev="GoToPreviousStep" />
|
||||
;
|
||||
break;
|
||||
}
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
@{
|
||||
if (!registered)
|
||||
{
|
||||
|
||||
<div>
|
||||
<p>@regModel.Email</p>
|
||||
<p>@regModel.PhoneNumber</p>
|
||||
<p>@regModel.Password</p>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
<div class="text-center fs-6">
|
||||
Already have an account? <a href="login">Sign in here!</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Animation>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
@{
|
||||
if (!registered)
|
||||
{
|
||||
|
||||
<div>
|
||||
<p>@regModel.Email</p>
|
||||
<p>@regModel.PhoneNumber</p>
|
||||
<p>@regModel.Password</p>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
<div class="text-center fs-6">
|
||||
Already have an account? <a href="login">Sign in here!</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -57,7 +75,7 @@
|
|||
/*IEnumerable<char> PredefinedPlaceholders = new List<char>() { '_', '#' };
|
||||
string Telephone { get; set; } = "5625595830";
|
||||
char Placeholder { get; set; } = '_';
|
||||
bool SaveLiterals { get; set; } = true;*/
|
||||
bool SaveLiterals { get; set; } = true;*/
|
||||
|
||||
private int currentStep = 1;
|
||||
|
||||
|
|
@ -87,28 +105,28 @@
|
|||
|
||||
LogToBrowserConsole("Registration started: " + "Email: " + regModel.Email + "PhoneNumber: " + regModel.PhoneNumber + "Password: " + regModel.Password);
|
||||
|
||||
|
||||
if (response.isSuccess)
|
||||
{
|
||||
//await App.Current.MainPage.DisplayAlert("Error", "Invalid credentials", "Ok");
|
||||
//display error message via jsinterop
|
||||
LogToBrowserConsole(response.ErrorMessage);
|
||||
|
||||
}
|
||||
else if (!response.isSuccess)
|
||||
{
|
||||
//await App.Current.MainPage.DisplayAlert("Success", "Successful login", "Ok");
|
||||
//display success message via jsinterop
|
||||
LogToBrowserConsole(response.ErrorMessage);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//await App.Current.MainPage.DisplayAlert("Error", "An error occured while trying to login", "Ok");
|
||||
//display error message via jsinterop
|
||||
LogToBrowserConsole(response.ErrorMessage);
|
||||
|
||||
}
|
||||
|
||||
if (response.isSuccess)
|
||||
{
|
||||
//await App.Current.MainPage.DisplayAlert("Error", "Invalid credentials", "Ok");
|
||||
//display error message via jsinterop
|
||||
LogToBrowserConsole(response.ErrorMessage);
|
||||
|
||||
}
|
||||
else if (!response.isSuccess)
|
||||
{
|
||||
//await App.Current.MainPage.DisplayAlert("Success", "Successful login", "Ok");
|
||||
//display success message via jsinterop
|
||||
LogToBrowserConsole(response.ErrorMessage);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//await App.Current.MainPage.DisplayAlert("Error", "An error occured while trying to login", "Ok");
|
||||
//display error message via jsinterop
|
||||
LogToBrowserConsole(response.ErrorMessage);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void LogToBrowserConsole(string message)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace TIAMSharedUI.Pages
|
|||
private AuthComponent Auth;
|
||||
private bool UserIsLoggedIn = false;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
UserIsLoggedIn = sessionService.IsAuthenticated;
|
||||
|
|
@ -33,18 +33,18 @@ namespace TIAMSharedUI.Pages
|
|||
|
||||
public void SaveSettings()
|
||||
{
|
||||
secureStorageHandler.SaveToSecureStorageAsync(Setting.Locale, "hu-HU");
|
||||
secureStorageHandler?.SaveToSecureStorageAsync(Setting.Locale, "hu-HU");
|
||||
|
||||
}
|
||||
|
||||
public void GetCurrentSettings()
|
||||
{
|
||||
secureStorageHandler.GetFromSecureStorageAsync(Setting.Locale);
|
||||
secureStorageHandler?.GetFromSecureStorageAsync(Setting.Locale);
|
||||
}
|
||||
|
||||
public void ResetSettings()
|
||||
{
|
||||
secureStorageHandler.DeleteFromSecureStorageAsync(Setting.Locale);
|
||||
secureStorageHandler?.DeleteFromSecureStorageAsync(Setting.Locale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
@page "/transfer"
|
||||
@using TIAM.Entities.TransferDestinations
|
||||
@using TIAMSharedUI.Pages.Components
|
||||
@using TIAMSharedUI.Shared
|
||||
@using TIAMWebApp.Shared.Application.Interfaces
|
||||
@using TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
|
||||
@using TIAMWebApp.Shared.Application.Utility
|
||||
@inject NavigationManager navManager
|
||||
@inject LogToBrowserConsole logToBrowserConsole
|
||||
@inject IWizardProcessor WizardProcessor
|
||||
<PageTitle>Transfer</PageTitle>
|
||||
|
||||
<div class="text-center m-5">
|
||||
|
|
@ -9,62 +16,48 @@
|
|||
</div>
|
||||
|
||||
|
||||
<SliderItemSelector @ref="slider" OwlId="owlSelector1" OnSliderChanged=@DisplaySlideData></SliderItemSelector>
|
||||
|
||||
<SliderItemSelector @ref="slider2" OwlId="owlSelector2" OnSliderChanged=@DisplaySlideData></SliderItemSelector>
|
||||
|
||||
<div class="wrapper">
|
||||
|
||||
<form class="p-3 mt-2">
|
||||
<div class="form-field d-flex align-items-center">
|
||||
<input value=@message2 type="text" name="DestinationAddress" id="destinationAddress" placeholder="Destination" disabled>
|
||||
|
||||
<div class="container mt-3">
|
||||
<div class="row d-flex justify-content-center align-items-center h-100">
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="card mycard">
|
||||
<InputWizard Data=@myModel
|
||||
OnSubmit="SubmitForm"
|
||||
IgnoreReflection="@TransferIgnorList"
|
||||
SubmitButtonText="ButtonSend"
|
||||
TitleResourceString="TransferTitle"
|
||||
SubtitleResourceString="TransferSubtitle"></InputWizard>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-field d-flex align-items-center">
|
||||
<input type="tel" name="phone" id="phone" placeholder="Phone number">
|
||||
</div>
|
||||
<div class="form-field d-flex align-items-center">
|
||||
<input type="text" name="address" id="address" placeholder="Pick up address">
|
||||
</div>
|
||||
<div class="form-field d-flex align-items-center">
|
||||
<input type="date" name="date" id="date" placeholder="Date of transfer">
|
||||
</div>
|
||||
<div class="form-field d-flex align-items-center">
|
||||
<input type="time" name="time" id="time" placeholder="Time of transfer">
|
||||
</div>
|
||||
<div class="form-field d-flex align-items-center">
|
||||
<input type="number" name="time" id="passengers" placeholder="Number of passangers">
|
||||
</div>
|
||||
|
||||
<a class="btn btn-primary mt-3" @onclick="next">Next</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@code {
|
||||
SliderItemSelector slider;
|
||||
SliderItemSelector slider2;
|
||||
public string message;
|
||||
public string message2;
|
||||
public List<string> destinations = new List<string>() {"Liszt Ferenc Airport", "Buda Castle", "Chain Bridge"};
|
||||
|
||||
void DisplaySlideData()
|
||||
@code {
|
||||
public TransferWizardModel myModel = new TransferWizardModel();
|
||||
|
||||
public List<string> TransferIgnorList = new List<string>
|
||||
{
|
||||
if(slider.SliderElementId != 0)
|
||||
{
|
||||
message2 = destinations[slider.SliderElementId-1];
|
||||
}
|
||||
|
||||
}
|
||||
"Id",
|
||||
"Price"
|
||||
};
|
||||
|
||||
/*protected override void OnAfterRender(bool isFirst)
|
||||
{
|
||||
message = " Target destination is " + slider.SliderElementId.ToString();
|
||||
}*/
|
||||
|
||||
public void next() => navManager.NavigateTo("/transfer2");
|
||||
public async Task SubmitForm(object Result)
|
||||
{
|
||||
var transfer = await WizardProcessor.ProcessWizardAsync<TransferWizardModel>(Result.GetType(), Result);
|
||||
logToBrowserConsole.LogToBC($"Submitted nested form: {Result.GetType().FullName}");
|
||||
navManager.NavigateTo("/transfer2/"+transfer.Id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<div class="container py-1">
|
||||
<div class="row d-flex justify-content-center align-items-center h-100">
|
||||
<div class="col-md-10 col-lg-8 col-xl-6">
|
||||
<div class="card card-admin card-stepper" style="border-radius: 16px;">
|
||||
<div class="card mycard card-admin card-stepper" style="border-radius: 16px;">
|
||||
<div class="card-header py-2 px-4">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
@page "/transferOld"
|
||||
@using TIAMSharedUI.Shared
|
||||
@inject NavigationManager navManager
|
||||
<PageTitle>Transfer</PageTitle>
|
||||
|
||||
<div class="text-center m-5">
|
||||
<h1>Transfer</h1>
|
||||
<h2 style="font-size:small">Swipe to select your destination!</h2>
|
||||
</div>
|
||||
|
||||
|
||||
<SliderItemSelector @ref="slider" OwlId="owlSelector1" OnSliderChanged=@DisplaySlideData></SliderItemSelector>
|
||||
|
||||
<SliderItemSelector @ref="slider2" OwlId="owlSelector2" OnSliderChanged=@DisplaySlideData></SliderItemSelector>
|
||||
|
||||
<div class="wrapper">
|
||||
|
||||
<form class="p-3 mt-2">
|
||||
<div class="form-field d-flex align-items-center">
|
||||
<input value=@message2 type="text" name="DestinationAddress" id="destinationAddress" placeholder="Destination" disabled>
|
||||
</div>
|
||||
|
||||
<div class="form-field d-flex align-items-center">
|
||||
<input type="tel" name="phone" id="phone" placeholder="Phone number">
|
||||
</div>
|
||||
<div class="form-field d-flex align-items-center">
|
||||
<input type="text" name="address" id="address" placeholder="Pick up address">
|
||||
</div>
|
||||
<div class="form-field d-flex align-items-center">
|
||||
<input type="date" name="date" id="date" placeholder="Date of transfer">
|
||||
</div>
|
||||
<div class="form-field d-flex align-items-center">
|
||||
<input type="time" name="time" id="time" placeholder="Time of transfer">
|
||||
</div>
|
||||
<div class="form-field d-flex align-items-center">
|
||||
<input type="number" name="time" id="passengers" placeholder="Number of passangers">
|
||||
</div>
|
||||
|
||||
<a class="btn btn-primary mt-3" @onclick="next">Next</a>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@code {
|
||||
SliderItemSelector slider;
|
||||
SliderItemSelector slider2;
|
||||
public string message;
|
||||
public string message2;
|
||||
public List<string> destinations = new List<string>() {"Liszt Ferenc Airport", "Buda Castle", "Chain Bridge"};
|
||||
|
||||
void DisplaySlideData()
|
||||
{
|
||||
if(slider.SliderElementId != 0)
|
||||
{
|
||||
message2 = destinations[slider.SliderElementId-1];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*protected override void OnAfterRender(bool isFirst)
|
||||
{
|
||||
message = " Target destination is " + slider.SliderElementId.ToString();
|
||||
}*/
|
||||
|
||||
public void next() => navManager.NavigateTo("/transfer2");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,202 @@
|
|||
.container {
|
||||
padding-right: 15px;
|
||||
padding-left: 15px;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.container {
|
||||
width: 750px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
.container {
|
||||
width: 970px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.container {
|
||||
width: 1170px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
#featureContainer .carousel-inner .carousel-item > div {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#featureContainer .carousel-inner .carousel-item > div:first-child {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
#featureContainer .carousel-inner .carousel-item.active,
|
||||
#featureContainer .carousel-inner .carousel-item-next,
|
||||
#featureContainer .carousel-inner .carousel-item-prev {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
|
||||
#featureContainer .carousel-inner .carousel-item-end.active,
|
||||
#featureContainer .carousel-inner .carousel-item-next {
|
||||
transform: translateX(25%);
|
||||
}
|
||||
|
||||
#featureContainer .carousel-inner .carousel-item-start.active,
|
||||
#featureContainer .carousel-inner .carousel-item-prev {
|
||||
transform: translateX(-25%);
|
||||
}
|
||||
|
||||
#featureContainer .card img {
|
||||
width: 90%;
|
||||
height: 40vh;
|
||||
}
|
||||
|
||||
#featureContainer .carousel-item {
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
#featureContainer .card img {
|
||||
width: 100%;
|
||||
height: 75vh;
|
||||
}
|
||||
}
|
||||
|
||||
#featureContainer .carousel-inner .carousel-item-end,
|
||||
#featureContainer .carousel-inner .carousel-item-start {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
#featureContainer .card {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#featureContainer .card {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#featureContainer .card .card-img-overlays {
|
||||
position: absolute;
|
||||
bottom: 15%;
|
||||
left: 10%;
|
||||
}
|
||||
|
||||
#featureContainer a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#featureContainer .indicator {
|
||||
border: 1px solid rgb(202, 202, 202);
|
||||
padding: 3px 6px 3px 6px;
|
||||
}
|
||||
|
||||
#featureContainer .indicator:hover {
|
||||
background-color: blue;
|
||||
border: 1px solid blue;
|
||||
transition: 200ms;
|
||||
}
|
||||
|
||||
#featureContainer .indicator:hover {
|
||||
color: white;
|
||||
transition: 200ms;
|
||||
}
|
||||
|
||||
#featureContainer .indicator {
|
||||
color: lightgray;
|
||||
}
|
||||
|
||||
#featureContainer .float-end {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Reseting */
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
max-width: 800px;
|
||||
min-height: 500px;
|
||||
margin: 10px auto;
|
||||
padding: 30px 30px 30px 30px;
|
||||
/*background-color: #ecf0f3;*/
|
||||
border-radius: 15px;
|
||||
/*box-shadow: 13px 13px 20px #cbced1, -13px -13px 20px #fff;*/
|
||||
}
|
||||
|
||||
|
||||
.wrapper .name {
|
||||
font-weight: 600;
|
||||
font-size: 1.4rem;
|
||||
letter-spacing: 1.3px;
|
||||
padding-left: 10px;
|
||||
/*color: #555*/;
|
||||
}
|
||||
|
||||
.wrapper .form-field input {
|
||||
width: 100%;
|
||||
display: block;
|
||||
border: none;
|
||||
outline: none;
|
||||
background: none;
|
||||
font-size: 1.2rem;
|
||||
color: #666;
|
||||
padding: 10px 15px 10px 10px;
|
||||
/* border: 1px solid red; */
|
||||
}
|
||||
|
||||
.wrapper .form-field {
|
||||
padding-left: 10px;
|
||||
margin-bottom: 20px;
|
||||
border-bottom: 1px solid;
|
||||
/*border-radius: 20px;*/
|
||||
//*ox-shadow: inset 3px 3px 3px #cbced1, inset -3px -3px 3px #fff;*/
|
||||
}
|
||||
|
||||
.wrapper .form-field .fas {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.wrapper .btn {
|
||||
box-shadow: none;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
/*background-color: #03A9F4;*/
|
||||
color: #fff;
|
||||
border-radius: 15px;
|
||||
/*box-shadow: 3px 3px 3px #b1b1b1, -3px -3px 3px #fff;*/
|
||||
letter-spacing: 1.3px;
|
||||
}
|
||||
|
||||
.wrapper .btn:hover {
|
||||
background-color: #039BE5;
|
||||
}
|
||||
|
||||
.wrapper a {
|
||||
text-decoration: none;
|
||||
font-size: 0.8rem;
|
||||
color: #03A9F4;
|
||||
}
|
||||
|
||||
.wrapper a:hover {
|
||||
color: #039BE5;
|
||||
}
|
||||
|
||||
@media(max-width: 380px) {
|
||||
.wrapper {
|
||||
margin: 30px 20px;
|
||||
padding: 40px 15px 15px 15px;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
@page "/user/admin"
|
||||
@using TIAMSharedUI.Pages.User.SysAdmins
|
||||
@using TIAMSharedUI.Shared
|
||||
@using TIAMWebApp.Shared.Application.Models;
|
||||
@using TIAMWebApp.Shared.Application.Interfaces;
|
||||
|
|
@ -18,21 +19,6 @@
|
|||
<div class="container">
|
||||
|
||||
|
||||
<!--App admin-->
|
||||
|
||||
|
||||
<SysAdminComponent></SysAdminComponent>
|
||||
|
||||
|
||||
<!-- App admin end-->
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
<!-- Stats admin-->
|
||||
|
||||
|
||||
|
||||
<div class="row py-3">
|
||||
<div class=" col-12 col-xl-3">
|
||||
<div class="card mycard card-admin" style="border-radius: 16px;">
|
||||
|
|
@ -205,9 +191,8 @@
|
|||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
base.OnInitialized();
|
||||
|
||||
|
||||
await base.OnInitializedAsync();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@
|
|||
bool isUserLoggedIn;
|
||||
int userType = 0;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
|
||||
|
|
@ -9,36 +9,30 @@ using System.Threading.Tasks;
|
|||
using TIAMWebApp.Shared.Application.Interfaces;
|
||||
using TIAMWebApp.Shared.Application.Models;
|
||||
|
||||
namespace TIAMSharedUI.Pages.User
|
||||
namespace TIAMSharedUI.Pages.User.Hotels
|
||||
{
|
||||
public partial class HotelComponent: ComponentBase
|
||||
public partial class HotelComponent : ComponentBase
|
||||
{
|
||||
|
||||
[Parameter]
|
||||
public string? Id { get; set; }
|
||||
|
||||
[Inject]
|
||||
|
||||
[Inject]
|
||||
ISupplierService SupplierService { get; set; }
|
||||
|
||||
[Inject]
|
||||
[Inject]
|
||||
IUserDataService UserDataService { get; set; }
|
||||
|
||||
[Inject]
|
||||
IServiceProviderDataService ServiceProviderDataService { get; set; }
|
||||
|
||||
object? OrderData { get; set; }
|
||||
object? AffiliateData { get; set; }
|
||||
object? AffiliateData { get; set; }
|
||||
|
||||
object? Data { get; set; }
|
||||
|
||||
bool isUserLoggedIn;
|
||||
int userType = 0;
|
||||
|
||||
public string ImageSource { get; set; } = "";
|
||||
|
||||
|
||||
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
base.OnInitialized();
|
||||
|
|
@ -96,18 +90,18 @@ namespace TIAMSharedUI.Pages.User
|
|||
{
|
||||
return new
|
||||
{
|
||||
CompanyName = s.CompanyName,
|
||||
ContactName = s.ContactName,
|
||||
ContactTitle = s.ContactTitle,
|
||||
Country = s.Country,
|
||||
City = s.City,
|
||||
Address = s.Address,
|
||||
Phone = s.Phone
|
||||
s.CompanyName,
|
||||
s.ContactName,
|
||||
s.ContactTitle,
|
||||
s.Country,
|
||||
s.City,
|
||||
s.Address,
|
||||
s.Phone
|
||||
};
|
||||
});
|
||||
|
||||
//SKBitmap bitmap = await ServiceProviderDataService.GetQRCodeByProductIdAsync(Guid.NewGuid());
|
||||
ImageSource = await ServiceProviderDataService.GetQRCodeByProductIdAsync(Guid.NewGuid());
|
||||
ImageSource = await ServiceProviderDataService.GetQRCodeByProductIdAsync(Guid.NewGuid());
|
||||
}
|
||||
[Parameter] public bool ShowSeriesPointMarkers { get; set; }
|
||||
[Parameter] public bool ShowSeriesLabels { get; set; }
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
@page "/user/destinations"
|
||||
@using AyCode.Models.Messages
|
||||
@using TIAM.Entities.ServiceProviders
|
||||
@using TIAM.Resources
|
||||
@using TIAMSharedUI.Pages.Components
|
||||
@using TIAMSharedUI.Shared
|
||||
@using TIAMWebApp.Shared.Application.Models
|
||||
@using TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
|
||||
@using TIAMWebApp.Shared.Application.Models.ClientSide.Messages
|
||||
@using TIAMWebApp.Shared.Application.Utility
|
||||
@layout AdminLayout
|
||||
@inject LogToBrowserConsole logToBrowserConsole
|
||||
@inject IStringLocalizer<TIAMResources> localizer
|
||||
<PageTitle>Transfers</PageTitle>
|
||||
|
||||
<div class="text-center m-5">
|
||||
<h1>Service management</h1>
|
||||
<h2 style="font-size:small">Manage your services here!</h2>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class=" col-12">
|
||||
<h3>@localizer.GetString("TransferDestination")</h3>
|
||||
|
||||
|
||||
<div class="d-flex flex-column mb-4 pb-2">
|
||||
<div class="align-self-end pl-2 pb-2">
|
||||
<DxButton Text="Column Chooser"
|
||||
RenderStyle="ButtonRenderStyle.Secondary"
|
||||
IconCssClass="btn-column-chooser"
|
||||
Click="ColumnChooserButton_Click" />
|
||||
</div>
|
||||
<DxGrid @ref="Grid"
|
||||
Data="ProductData"
|
||||
PageSize="8"
|
||||
KeyFieldName="Id"
|
||||
ValidationEnabled="false"
|
||||
CustomizeElement="Grid_CustomizeElement"
|
||||
CustomizeEditModel="Grid_CustomizeEditModel"
|
||||
EditModelSaving="Grid_EditModelSaving"
|
||||
DataItemDeleting="Grid_DataItemDeleting"
|
||||
EditMode="GridEditMode.EditForm"
|
||||
ColumnResizeMode="GridColumnResizeMode.ColumnsContainer"
|
||||
KeyboardNavigationEnabled="true"
|
||||
ShowFilterRow="true">
|
||||
<Columns>
|
||||
<DxGridCommandColumn Width="8%" FixedPosition="GridColumnFixedPosition.Left" />
|
||||
|
||||
<DxGridDataColumn FieldName="Id" MinWidth="80" Width="20%" Visible="false" />
|
||||
<DxGridDataColumn FieldName="Name" FixedPosition="GridColumnFixedPosition.Left" MinWidth="80" Width="20%">
|
||||
<CellDisplayTemplate>
|
||||
@{
|
||||
var keyField = context.Value;
|
||||
<a class="d-block text-left" href="transferdetails">@context.Value</a>
|
||||
}
|
||||
</CellDisplayTemplate>
|
||||
</DxGridDataColumn>
|
||||
<DxGridDataColumn FieldName="Description" FixedPosition="GridColumnFixedPosition.Left" MinWidth="80" Width="20%" />
|
||||
<DxGridDataColumn FieldName="AddressString" MinWidth="80" Width="20%" />
|
||||
<DxGridDataColumn FieldName="Price" MinWidth="80" Width="20%" />
|
||||
|
||||
|
||||
</Columns>
|
||||
|
||||
<EditFormTemplate Context="EditFormContext">
|
||||
@{
|
||||
var transfer = (TransferDestinationWizardModel)EditFormContext.EditModel;
|
||||
}
|
||||
<DxFormLayout CssClass="w-100">
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.DestinationName) ColSpanMd="6">
|
||||
@EditFormContext.GetEditor("Name")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.Destination) ColSpanMd="6">
|
||||
@EditFormContext.GetEditor("Destination")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.DestinationAddress) ColSpanMd="6">
|
||||
@EditFormContext.GetEditor("AddressString")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.Price) ColSpanMd="6">
|
||||
@EditFormContext.GetEditor("Price")
|
||||
</DxFormLayoutItem>
|
||||
|
||||
</DxFormLayout>
|
||||
</EditFormTemplate>
|
||||
|
||||
</DxGrid>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class=" col-12 col-xl-6">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@code {
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
using DevExpress.Blazor;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels;
|
||||
using TIAMWebApp.Shared.Application.Models;
|
||||
using TIAMWebApp.Shared.Application.Interfaces;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using TIAM.Entities.TransferDestinations;
|
||||
using TIAM.Core.Enums;
|
||||
|
||||
namespace TIAMSharedUI.Pages.User.SysAdmins
|
||||
{
|
||||
public partial class Products
|
||||
{
|
||||
|
||||
IGrid Grid { get; set; }
|
||||
object? ProductData { get; set; }
|
||||
|
||||
public ProductWizardModel myModel = new ProductWizardModel();
|
||||
|
||||
|
||||
public MessageWizardModel messageWizardModel = new MessageWizardModel();
|
||||
|
||||
[Inject]
|
||||
public ITransferDataService transferDataService { get; set; }
|
||||
|
||||
|
||||
object? ProductArray = new ProductWizardModel[]
|
||||
{
|
||||
new ProductWizardModel(ProductType.Hotel, "XY hotel", "XYHotel description is here ", 10.0f, ""),
|
||||
new ProductWizardModel(ProductType.Hotel, "XY hotel", "XYHotel description is here ", 10.0f, ""),
|
||||
new ProductWizardModel(ProductType.Hotel, "XY hotel", "XYHotel description is here ", 10.0f, ""),
|
||||
};
|
||||
|
||||
object? TransferDataFromDb = new ProductWizardModel[] { };
|
||||
|
||||
void CancelCreateClick()
|
||||
{
|
||||
|
||||
}
|
||||
void EulaPopupClosed()
|
||||
{
|
||||
//cancel clicked
|
||||
|
||||
}
|
||||
void EulaPopupClosing(PopupClosingEventArgs args)
|
||||
{
|
||||
//myModel = new TransferWizardModel();
|
||||
messageWizardModel = new MessageWizardModel();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------
|
||||
|
||||
|
||||
public async Task SubmitForm(object Result)
|
||||
{
|
||||
//await WizardProcessor.ProcessWizardAsync(Result.GetType(), Result);
|
||||
logToBrowserConsole.LogToBC($"Submitted nested form: {Result.GetType().FullName}");
|
||||
}
|
||||
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
//if (firstRender)
|
||||
// await Grid.StartEditRowAsync(0);
|
||||
}
|
||||
|
||||
void Grid_CustomizeEditModel(GridCustomizeEditModelEventArgs e)
|
||||
{
|
||||
if (e.IsNew)
|
||||
{
|
||||
var newProduct = (ProductWizardModel)e.EditModel;
|
||||
newProduct.Id = Guid.NewGuid();
|
||||
newProduct.Name = "ghjgkg hkgh ghjkghgkjgh";
|
||||
newProduct.Description = "ghjgkg hkgh ghjkghgkjgh";
|
||||
newProduct.ProductType = ProductType.NotDefined;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void Grid_CustomizeElement(GridCustomizeElementEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
async Task Grid_EditModelSaving(GridEditModelSavingEventArgs e)
|
||||
{
|
||||
if (e.IsNew)
|
||||
{
|
||||
//add new row to grid
|
||||
myModel = (ProductWizardModel)e.EditModel;
|
||||
//add mymodel to transferData array
|
||||
ProductData = ((ProductWizardModel[])ProductData).Append(myModel);
|
||||
|
||||
//add new orderData to orderData array
|
||||
logToBrowserConsole.LogToBC("New orderData added");
|
||||
//await NwindDataService.InsertEmployeeAsync((EditableEmployee)e.EditModel);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
logToBrowserConsole.LogToBC("orderData updated");
|
||||
//modify transferData where transferData.Id == e.EditModel.Id
|
||||
//get transfer from TransferData by Id
|
||||
|
||||
foreach (var productToModify in (ProductWizardModel[])ProductData)
|
||||
{
|
||||
myModel = (ProductWizardModel)e.EditModel;
|
||||
|
||||
if (productToModify.Id == myModel.Id)
|
||||
{
|
||||
myModel = (ProductWizardModel)e.EditModel;
|
||||
productToModify.ProductType = myModel.ProductType;
|
||||
productToModify.Name = myModel.Name;
|
||||
productToModify.Description = myModel.Description;
|
||||
productToModify.Price = myModel.Price;
|
||||
productToModify.JsonDetails = myModel.JsonDetails;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//await NwindDataService.UpdateEmployeeAsync((EditableEmployee)e.DataItem, (EditableEmployee)e.EditModel);
|
||||
|
||||
await UpdateDataAsync();
|
||||
}
|
||||
async Task Grid_DataItemDeleting(GridDataItemDeletingEventArgs e)
|
||||
{
|
||||
//await NwindDataService.RemoveEmployeeAsync((EditableEmployee)e.DataItem);
|
||||
//remove orderData from orderData array
|
||||
logToBrowserConsole.LogToBC("orderData deleted");
|
||||
//await UpdateDataAsync();
|
||||
}
|
||||
async Task UpdateDataAsync()
|
||||
{
|
||||
//DataSource = await NwindDataService.GetEmployeesEditableAsync();
|
||||
//refresh grid
|
||||
logToBrowserConsole.LogToBC("orderData grid refreshed");
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
base.OnInitialized();
|
||||
var a = await transferDataService.GetDestinationsAsync();
|
||||
logToBrowserConsole.LogToBC($"TransferDataFromDb: {((TransferDestinationWizardModel[])TransferDataFromDb).Length}");
|
||||
foreach (var item in a)
|
||||
{
|
||||
//add new transferwizardmodel to transferData array
|
||||
TransferDataFromDb = ((TransferDestinationWizardModel[])TransferDataFromDb).Append(
|
||||
new TransferDestinationWizardModel(Guid.NewGuid(), item.Name, item.Description, item.AddressString));
|
||||
logToBrowserConsole.LogToBC($"TransferDataFromDb: {item.Name}");
|
||||
}
|
||||
}
|
||||
|
||||
void ColumnChooserButton_Click()
|
||||
{
|
||||
Grid.ShowColumnChooser();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,206 @@
|
|||
@page "/user/sysadmin"
|
||||
@using TIAMSharedUI.Shared
|
||||
@using TIAMWebApp.Shared.Application.Models;
|
||||
@using TIAMWebApp.Shared.Application.Interfaces;
|
||||
@layout AdminLayout
|
||||
@inject IPopulationStructureDataProvider DataProvider
|
||||
@inject ISupplierService SupplierService
|
||||
@inject IUserDataService UserDataService
|
||||
<PageTitle>Transfer</PageTitle>
|
||||
|
||||
<div class="text-center m-5">
|
||||
<h1>Dashboard</h1>
|
||||
<h2 style="font-size:small">Have a nice day!</h2>
|
||||
</div>
|
||||
|
||||
<!--We need to check if the user is owner of a swerviceprovider-->
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
||||
<!--App admin-->
|
||||
|
||||
|
||||
<SysAdminComponent></SysAdminComponent>
|
||||
|
||||
|
||||
<!-- App admin end-->
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
<!-- Stats admin-->
|
||||
|
||||
|
||||
|
||||
<div class="row py-3">
|
||||
<div class=" col-12 col-xl-3">
|
||||
<div class="card mycard card-admin" style="border-radius: 16px;">
|
||||
<div class="card-header py-2 px-4">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<span class="fw-bold text-body">Panel title</span>
|
||||
<p class="text-muted mb-0">Subtitle</p>
|
||||
</div>
|
||||
<div>
|
||||
<h6 class="mb-0"> <a href="#">All details</a> </h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body card-admin-body py-2 px-4">
|
||||
<div class="d-flex flex-row mb-4 pb-2">
|
||||
<div class="flex-fill">
|
||||
<h5 class="bold">Some info</h5>
|
||||
<p class="text-muted"> Budapest, Dózsa György út 35, 1146</p>
|
||||
</div>
|
||||
<div>
|
||||
<!--img class="align-self-center img-fluid"
|
||||
src="https://mdbcdn.b-cdn.net/img/Photos/Horizontal/E-commerce/Products/6.webp" width="250"-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<ul id="progressbar-1" class="mx-0 mt-0 mb-5 px-0 pt-0 pb-4">
|
||||
<li class="step0 active" id="step1">
|
||||
<span style="margin-left: 22px; margin-top: 12px;">PLACED</span>
|
||||
</li>
|
||||
<li class="step0 active text-center" id="step2"><span>WAITING FOR PICK UP</span></li>
|
||||
<li class="step0 text-muted text-end" id="step3">
|
||||
<span style="margin-right: 22px;">FINISHED</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="d-flex flex-row mb-4 pb-2">
|
||||
<h4> Some <span class="small text-muted"> conclusion </span></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer py-2 px-4">
|
||||
<div class="d-flex justify-content-between">
|
||||
|
||||
<a href="#!">Modify</a>
|
||||
<div class="border-start h-100"></div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" col-12 col-xl-3">
|
||||
<div class="card mycard card-admin" style="border-radius: 16px;">
|
||||
<div class="card-header py-2 px-4">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<span class="fw-bold text-body">Panel title</span>
|
||||
<p class="text-muted mb-0">Subtitle</p>
|
||||
</div>
|
||||
<div>
|
||||
<h6 class="mb-0"> <a href="#">All details</a> </h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body card-admin-body py-2 px-4">
|
||||
<div class="d-flex flex-row mb-4 pb-2">
|
||||
<div class="flex-fill">
|
||||
<h5 class="bold">Some info</h5>
|
||||
<p class="text-muted"> Budapest, Dózsa György út 35, 1146</p>
|
||||
</div>
|
||||
<div>
|
||||
<!--img class="align-self-center img-fluid"
|
||||
src="https://mdbcdn.b-cdn.net/img/Photos/Horizontal/E-commerce/Products/6.webp" width="250"-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<ul id="progressbar-1" class="mx-0 mt-0 mb-5 px-0 pt-0 pb-4">
|
||||
<li class="step0 active" id="step1">
|
||||
<span style="margin-left: 22px; margin-top: 12px;">PLACED</span>
|
||||
</li>
|
||||
<li class="step0 active text-center" id="step2"><span>WAITING FOR PICK UP</span></li>
|
||||
<li class="step0 text-muted text-end" id="step3">
|
||||
<span style="margin-right: 22px;">FINISHED</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="d-flex flex-row mb-4 pb-2">
|
||||
<h4> Some <span class="small text-muted"> conclusion </span></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer py-2 px-4">
|
||||
<div class="d-flex justify-content-between">
|
||||
|
||||
<a href="#!">Modify</a>
|
||||
<div class="border-start h-100"></div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" col-12 col-xl-3">
|
||||
<div class="card mycard card-admin" style="border-radius: 16px;">
|
||||
<div class="card-header py-2 px-4">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<span class="fw-bold text-body">Panel title</span>
|
||||
<p class="text-muted mb-0">Subtitle</p>
|
||||
</div>
|
||||
<div>
|
||||
<h6 class="mb-0"> <a href="#">All details</a> </h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body card-admin-body py-2 px-4">
|
||||
<div class="d-flex flex-row mb-4 pb-2">
|
||||
<div class="flex-fill">
|
||||
<h5 class="bold">Some info</h5>
|
||||
<p class="text-muted"> Budapest, Dózsa György út 35, 1146</p>
|
||||
</div>
|
||||
<div>
|
||||
<!--img class="align-self-center img-fluid"
|
||||
src="https://mdbcdn.b-cdn.net/img/Photos/Horizontal/E-commerce/Products/6.webp" width="250"-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<ul id="progressbar-1" class="mx-0 mt-0 mb-5 px-0 pt-0 pb-4">
|
||||
<li class="step0 active" id="step1">
|
||||
<span style="margin-left: 22px; margin-top: 12px;">PLACED</span>
|
||||
</li>
|
||||
<li class="step0 active text-center" id="step2"><span>WAITING FOR PICK UP</span></li>
|
||||
<li class="step0 text-muted text-end" id="step3">
|
||||
<span style="margin-right: 22px;">FINISHED</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="d-flex flex-row mb-4 pb-2">
|
||||
<h4> Some <span class="small text-muted"> conclusion </span></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer py-2 px-4">
|
||||
<div class="d-flex justify-content-between">
|
||||
|
||||
<a href="#!">Modify</a>
|
||||
<div class="border-start h-100"></div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" col-12 col-xl-3">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@code {
|
||||
|
||||
bool isUserLoggedIn;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await base.OnInitializedAsync();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TIAMSharedUI.Pages.User.SysAdmins
|
||||
{
|
||||
public partial class SysAdmin
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
|||
using TIAMWebApp.Shared.Application.Interfaces;
|
||||
using TIAMWebApp.Shared.Application.Models;
|
||||
|
||||
namespace TIAMSharedUI.Pages.User
|
||||
namespace TIAMSharedUI.Pages.User.SysAdmins
|
||||
{
|
||||
public partial class SysAdminComponent : ComponentBase
|
||||
{
|
||||
|
|
@ -23,7 +23,7 @@ namespace TIAMSharedUI.Pages.User
|
|||
{
|
||||
base.OnInitialized();
|
||||
|
||||
|
||||
|
||||
|
||||
AffiliateData = new object[]
|
||||
{
|
||||
|
|
@ -10,7 +10,7 @@ using TIAMWebApp.Shared.Application.Interfaces;
|
|||
using Microsoft.AspNetCore.Components;
|
||||
using TIAM.Entities.TransferDestinations;
|
||||
|
||||
namespace TIAMSharedUI.Pages.User
|
||||
namespace TIAMSharedUI.Pages.User.SysAdmins
|
||||
{
|
||||
public partial class TransferDestinations
|
||||
{
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
@using System.Linq.Expressions
|
||||
@using TIAMWebApp.Shared.Application.Interfaces
|
||||
@using TIAMWebApp.Shared.Application.Utility
|
||||
@using TIAM.Entities.TransferDestinations
|
||||
@inject LogToBrowserConsole logToBrowserConsole
|
||||
|
||||
<style>
|
||||
|
|
@ -32,6 +34,20 @@
|
|||
|
||||
<div id=@OwlId class="owl-carousel owl-theme">
|
||||
|
||||
<div class="item" id="0" style="background-image: url('_content/TIAMSharedUI/images/mapbg.jpg'); background-position: center; background-size: cover;">
|
||||
<div class="item-desc text-center pt-3">
|
||||
<DxTextBox @ref="textField"
|
||||
@bind-Text="@Content"
|
||||
BindValueMode="BindValueMode.OnDelayedInput"
|
||||
InputDelay="@InputDelay"
|
||||
CssClass="form-field"
|
||||
NullText="Please type an address or swipe to select from preset destinations!">
|
||||
@* TextExpression=@TExpression *@
|
||||
@* TextChanged="@OnTextChanged"> *@
|
||||
</DxTextBox>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item" id="1" style="background-image: url(https://images.unsplash.com/photo-1551867633-194f125bddfa?auto=format&fit=crop&q=80&w=2070&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D); background-position: center;">
|
||||
<div class="item-desc text-center pt-3">
|
||||
|
|
@ -151,23 +167,47 @@
|
|||
[Parameter]
|
||||
public string OwlId { get; set; }
|
||||
|
||||
public string TextValue { get; set; } = null;
|
||||
[Parameter]
|
||||
public string TextValue { get; set; } = "";
|
||||
|
||||
int? InputDelay { get; set; } = 3500;
|
||||
BindValueMode BindValueMode { get; set; } = BindValueMode.OnInput;
|
||||
bool BindDelayEnabled { get { return BindValueMode == BindValueMode.OnDelayedInput; } }
|
||||
BindValueMode BindValueMode { get; set; } = BindValueMode.OnDelayedInput;
|
||||
|
||||
public int SliderElementId = 0;
|
||||
string content = "";
|
||||
|
||||
private string content = "";
|
||||
|
||||
string Content
|
||||
{
|
||||
get { return content; }
|
||||
set {
|
||||
content = value;
|
||||
OnTextChanged(value);
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public Expression<Func<string>> TExpression { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> OnSliderChanged { get; set; }
|
||||
|
||||
[Inject]
|
||||
public IJSRuntime JSRuntime { get; set; }
|
||||
|
||||
[Inject]
|
||||
public ITransferDataService TransferDataService { get; set; }
|
||||
|
||||
public List<TransferDestination> Destinations = new List<TransferDestination>();
|
||||
|
||||
public DxTextBox textField;
|
||||
|
||||
TransferDestination Result;
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
logToBrowserConsole.LogToBC($"SliderItemSelector is initialized with OwlId: {OwlId}");
|
||||
|
||||
|
||||
base.OnParametersSet();
|
||||
}
|
||||
|
||||
|
|
@ -191,11 +231,46 @@
|
|||
logToBrowserConsole.LogToBC($"Slider is changing: {coordinates}, {itemId}");
|
||||
//content = coordinates + "item = " + itemId;
|
||||
SliderElementId = Convert.ToInt32(itemId);
|
||||
|
||||
OnSliderChanged.InvokeAsync(itemId);
|
||||
|
||||
if (SliderElementId > 0)
|
||||
{
|
||||
ParsePresetAddress(GetAddressFromSelectedSliderItem(SliderElementId));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
OnTextChanged(Content);
|
||||
}
|
||||
|
||||
|
||||
/*StateHasChanged();*/
|
||||
}
|
||||
}
|
||||
|
||||
public void ParsePresetAddress(string address)
|
||||
{
|
||||
OnSliderChanged.InvokeAsync(address);
|
||||
}
|
||||
|
||||
public void OnTextChanged(string text)
|
||||
{
|
||||
logToBrowserConsole.LogToBC($"Slider text changed: {text}");
|
||||
OnSliderChanged.InvokeAsync(text);
|
||||
}
|
||||
|
||||
public string GetAddressFromSelectedSliderItem(int SliderListIndex)
|
||||
{
|
||||
if(Destinations.Count >0 && Destinations.Count >= SliderListIndex)
|
||||
{
|
||||
return Destinations[SliderElementId-1].AddressString;
|
||||
}
|
||||
else return "Something wrong";
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
Destinations = await TransferDataService.GetDestinationsAsync();
|
||||
Content = TextValue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
{
|
||||
<hr />
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="user/admin">
|
||||
<NavLink class="nav-link" href="user/sysadmin">
|
||||
Dashboard
|
||||
</NavLink>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -65,4 +65,8 @@
|
|||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Pages\User\Guides\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ body {
|
|||
max-width: 100%;
|
||||
overflow-x: hidden;
|
||||
background-color: #e7e6f7;
|
||||
background: url('https://images.unsplash.com/photo-1641326038434-01b0217c18f1?q=80&w=1932&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
|
||||
background: url('../images/bg.jpg');
|
||||
background-attachment: fixed;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
|
|
@ -85,6 +85,9 @@ border-radius: 16px;
|
|||
|
||||
}
|
||||
|
||||
.inputwizardwrapper {
|
||||
/*max-width: 450px;*/
|
||||
}
|
||||
|
||||
/*My overrides end*/
|
||||
|
||||
|
|
@ -267,6 +270,7 @@ select:focus-visible {
|
|||
|
||||
.wrapper {
|
||||
/*max-width: 350px;*/
|
||||
width:100%;
|
||||
min-height: 500px;
|
||||
margin: 10px auto;
|
||||
padding: 30px 30px 30px 30px;
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 191 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 184 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 184 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 190 KiB |
|
|
@ -63,8 +63,6 @@ namespace TIAMWebApp.Client.Services
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task<string> TestUserApi(int Param)
|
||||
{
|
||||
var url = APIUrls.UserTest;
|
||||
|
|
|
|||
|
|
@ -24,6 +24,10 @@ namespace TIAMWebApp.Client.Services
|
|||
var result = await transferDataService.CreateTransferDestination((TransferDestinationWizardModel)data);
|
||||
return result as TModelType;
|
||||
|
||||
case "TransferWizardModel":
|
||||
var transferResult = await transferDataService.CreateTransfer((TransferWizardModel)data);
|
||||
return transferResult as TModelType;
|
||||
|
||||
case "ServiceProvider":
|
||||
return null;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace TIAMWebApp.Server.Controllers
|
|||
{
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
[Route("api/v1/[controller]")]
|
||||
public class AuctionAPIController : ControllerBase
|
||||
{
|
||||
private AuctionDal _auctionDal;
|
||||
|
|
@ -140,8 +140,6 @@ namespace TIAMWebApp.Server.Controllers
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace TIAMWebApp.Server.Controllers
|
|||
{
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
[Route("api/v1/[controller]")]
|
||||
public class MessageAPIController : ControllerBase
|
||||
{
|
||||
private readonly IConfiguration _configuration;
|
||||
|
|
|
|||
|
|
@ -1,31 +1,23 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using GoogleApi;
|
||||
using GoogleApi.Entities.Common;
|
||||
using GoogleApi.Entities.Common.Enums;
|
||||
using GoogleApi.Entities.Maps.AddressValidation.Request;
|
||||
using GoogleApi.Entities.Maps.Common;
|
||||
using GoogleApi.Entities.Maps.Common.Enums;
|
||||
using GoogleApi.Entities.Maps.DistanceMatrix.Request;
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Reflection.Metadata;
|
||||
using TIAMWebApp.Shared.Application.Models;
|
||||
using static DevExpress.XtraPrinting.Native.ExportOptionsPropertiesNames;
|
||||
using System.Net;
|
||||
using GoogleApi.Entities.Maps.Geocoding.Address.Request;
|
||||
using GoogleApi.Entities.Maps.DistanceMatrix.Response;
|
||||
using System.Net.Http;
|
||||
using System.Text.Json;
|
||||
using GoogleApi.Entities.Maps.Directions.Response;
|
||||
using GoogleApi.Entities.Maps.DistanceMatrix.Request;
|
||||
using GoogleApi.Entities.Maps.DistanceMatrix.Response;
|
||||
using GoogleApi.Entities.Maps.Geocoding.Location.Request;
|
||||
using GoogleApi;
|
||||
using GoogleApi.Entities.Search.Common.Enums;
|
||||
using Microsoft.AspNetCore.Razor.TagHelpers;
|
||||
using GoogleApi.Entities.Maps.AddressValidation.Request;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Net;
|
||||
using TIAMWebApp.Shared.Application.Models;
|
||||
|
||||
namespace TIAMWebApp.Server.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
[Route("api/v1/[controller]")]
|
||||
public class GoogleAPIController : ControllerBase
|
||||
{
|
||||
|
||||
|
|
@ -175,7 +167,7 @@ namespace TIAMWebApp.Server.Controllers
|
|||
{
|
||||
|
||||
|
||||
Console.Write("Errorcode: {0}", (int)response.Status);
|
||||
Console.Write("Errorcode: {0}, {1}", (int)response.Status, e);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using TIAMWebApp.Shared.Application.Models;
|
|||
namespace TIAMWebApp.Server.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
[Route("api/v1/[controller]")]
|
||||
public class PopulationStructureAPIController : ControllerBase
|
||||
{
|
||||
private static readonly PopulationAgeStructureItem[] PopulationData = new PopulationAgeStructureItem[]
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace TIAMWebApp.Server.Controllers
|
|||
{
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
[Route("api/v1/[controller]")]
|
||||
public class ServiceProviderAPIController : ControllerBase
|
||||
{
|
||||
private AdminDal _adminDal;
|
||||
|
|
@ -36,7 +36,7 @@ namespace TIAMWebApp.Server.Controllers
|
|||
|
||||
//15.
|
||||
[HttpPost]
|
||||
[Route("CreateServiceProvider")]
|
||||
[Route(APIUrls.CreateServiceProviderRouteName)]
|
||||
[Tags("In-Progress", "ServiceProvider")]
|
||||
[EndpointSummary("Create assigned user")]
|
||||
public async Task<IActionResult> CreateServiceProvider([FromBody] ServiceProviderModel serializedServiceProviderModel)
|
||||
|
|
@ -84,7 +84,7 @@ namespace TIAMWebApp.Server.Controllers
|
|||
//16.
|
||||
[AllowAnonymous]
|
||||
[HttpGet]
|
||||
[Route("GetServiceProviders")]
|
||||
[Route(APIUrls.GetServiceProvidersRouteName)]
|
||||
public Task<List<TiamServiceProvider>> GetServiceProviders()
|
||||
{
|
||||
//var users = await _serviceProviderDal.Ctx.Users.ToListAsync();//.GetUsersAsync();
|
||||
|
|
@ -95,7 +95,7 @@ namespace TIAMWebApp.Server.Controllers
|
|||
//18.
|
||||
[AllowAnonymous]
|
||||
[HttpPost]
|
||||
[Route("GetServiceProviderById")]
|
||||
[Route(APIUrls.GetServiceProviderByIdRouteName)]
|
||||
public async Task<TiamServiceProvider?> GetServiceProviderById([FromBody] Guid id)
|
||||
{
|
||||
Console.WriteLine($"GetServiceProviderById called with id: {id}");
|
||||
|
|
@ -106,9 +106,8 @@ namespace TIAMWebApp.Server.Controllers
|
|||
//17.
|
||||
[AllowAnonymous]
|
||||
[HttpPost]
|
||||
[Route("GetServiceProvidersByOwnerId")]
|
||||
[Route(APIUrls.GetServiceProvidersByOwnerIdRouteName)]
|
||||
[Tags("Finished", "ServiceProvider")]
|
||||
|
||||
public async Task<Dictionary<Guid, string>> GetServiceProvidersByOwnerId([FromBody] Guid ownerId)
|
||||
{
|
||||
Console.WriteLine($"GetServiceProvidersByOwnerId called with ownerId: {ownerId}");
|
||||
|
|
@ -125,6 +124,7 @@ namespace TIAMWebApp.Server.Controllers
|
|||
//22.
|
||||
[AllowAnonymous]
|
||||
[HttpPost]
|
||||
[Route(APIUrls.CreateUserProductMappingRouteName)]
|
||||
[Route("CreateUserProductMapping")]
|
||||
[Tags("Finished", "ServiceProvider")]
|
||||
[EndpointSummary("Create assigned user to product")]
|
||||
|
|
@ -149,7 +149,7 @@ namespace TIAMWebApp.Server.Controllers
|
|||
//23.
|
||||
[AllowAnonymous]
|
||||
[HttpPost]
|
||||
[Route("GetUserProductMappingsForProduct")]
|
||||
[Route(APIUrls.GetUserProductMappingsForProductRouteName)]
|
||||
public async Task<Dictionary<Guid, string>> GetUserProductMappingsForProduct(Guid serviceProviderId)
|
||||
{
|
||||
Console.WriteLine($"GetUserProductMappingsForServiceProvider called with serviceProviderId: {serviceProviderId}");
|
||||
|
|
@ -183,7 +183,7 @@ namespace TIAMWebApp.Server.Controllers
|
|||
|
||||
[AllowAnonymous]
|
||||
[HttpPost]
|
||||
[Route("GetQRCodeByProductId")]
|
||||
[Route(APIUrls.GetQRCodeByProductIdRouteName)]
|
||||
[Tags("In-Progress", "Product")]
|
||||
public async Task<IActionResult> GetQRCodeByProductId([FromBody] Guid productId)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using TIAMWebApp.Shared.Application.Models;
|
|||
namespace TIAMWebApp.Server.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
[Route("api/v1/[controller]")]
|
||||
public class SupplierAPIController : ControllerBase
|
||||
{
|
||||
private static readonly Supplier[] suppliers = new Supplier[]
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection.Metadata;
|
||||
using System.Text.Json;
|
||||
using TIAM.Core.Enums;
|
||||
|
|
@ -19,7 +20,7 @@ using TIAMWebApp.Shared.Application.Models.PageModels;
|
|||
namespace TIAMWebApp.Server.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
[Route("api/v1/[controller]")]
|
||||
public class TransferDataAPIController : ControllerBase
|
||||
{
|
||||
//private static readonly TransferDestination[] Names = new TransferDestination[]
|
||||
|
|
@ -48,7 +49,7 @@ namespace TIAMWebApp.Server.Controllers
|
|||
|
||||
[AllowAnonymous]
|
||||
[HttpGet]
|
||||
[Route("GetTransferDestinations")]
|
||||
[Route(APIUrls.GetTransferDestinationsRouteName)]
|
||||
public async Task<IEnumerable<TransferDestination>> GetTransferDestinations()
|
||||
{
|
||||
return await _transferDestinationDal.Context.TransferDestinations.ToListAsync();
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace TIAMWebApp.Server.Controllers
|
|||
{
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
[Route("api/v1/[controller]")]
|
||||
public class UserAPIController : ControllerBase
|
||||
{
|
||||
private UserDal _userDal;
|
||||
|
|
@ -155,7 +155,7 @@ namespace TIAMWebApp.Server.Controllers
|
|||
|
||||
[AllowAnonymous]
|
||||
[HttpPost]
|
||||
[Route("RefreshToken")]
|
||||
[Route(APIUrls.RefreshTokenRouteName)]
|
||||
public async Task<IActionResult> RefreshToken(RefreshTokenRequest? refreshTokenRequest)
|
||||
{
|
||||
Console.WriteLine("RefreshToken called");
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace TIAMWebApp.Server.Controllers
|
|||
{
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
[Route("api/v1/[controller]")]
|
||||
public class UserPermissionAPIController : ControllerBase
|
||||
{
|
||||
private AdminDal _adminDal;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using TIAMWebApp.Shared.Application.Models;
|
|||
namespace TIAMWebApp.Server.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
[Route("api/v1/[controller]")]
|
||||
public class WeatherForecastAPIController : ControllerBase
|
||||
{
|
||||
private static readonly string[] Summaries = new[]
|
||||
|
|
|
|||
|
|
@ -117,8 +117,7 @@ app.UseStaticFiles();
|
|||
app.UseAuthentication();
|
||||
app.UseRouting();
|
||||
app.UseAuthorization();
|
||||
|
||||
|
||||
app.UsePathBase("/");
|
||||
app.MapRazorPages();
|
||||
app.MapControllers();
|
||||
app.MapFallbackToFile("index.html");
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ namespace TIAMWebApp.Shared.Application.Interfaces
|
|||
{
|
||||
public interface ITransferDataService
|
||||
{
|
||||
Task<TransferDestination[]> GetDestinationsAsync();
|
||||
Task<List<TransferDestination>> GetDestinationsAsync();
|
||||
Task<TransferDestination?> GetTransferDestinationbyCoordinatesAsync(string destinationId);
|
||||
Task<TransferDestination?> GetTransferDestinationbyAddressAsync(string destinationId);
|
||||
Task<TransferDestination?> CreateTransferDestination(TransferDestinationWizardModel model);
|
||||
Task<TransferWizardModel?> CreateTransfer(TransferWizardModel model);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,48 +7,101 @@ namespace TIAMWebApp.Shared.Application.Models
|
|||
public const string BaseUrlWithSlash = BaseUrl + "/";
|
||||
public const string BaseUrlWithSlashAndVersion = BaseUrlWithSlash + "v1/";
|
||||
|
||||
public const string UserAPI = BaseUrlWithSlash + "UserAPI";
|
||||
public const string WeatherForecastAPI = BaseUrlWithSlash + "WeatherForecastAPI";
|
||||
public const string PopulationStructureAPI = BaseUrlWithSlash + "PopulationStructureAPI";
|
||||
public const string TransferDataAPI = BaseUrlWithSlash + "TransferDataAPI";
|
||||
public const string ServiceProviderAPI = BaseUrlWithSlash + "ServiceProviderAPI";
|
||||
public const string UserPermissionAPI = BaseUrlWithSlash + "UserPermissionAPI";
|
||||
public const string UserAPI = BaseUrlWithSlashAndVersion + "UserAPI/";
|
||||
public const string WeatherForecastAPI = BaseUrlWithSlashAndVersion + "WeatherForecastAPI/";
|
||||
public const string PopulationStructureAPI = BaseUrlWithSlashAndVersion + "PopulationStructureAPI/";
|
||||
public const string TransferDataAPI = BaseUrlWithSlashAndVersion + "TransferDataAPI/";
|
||||
public const string ServiceProviderAPI = BaseUrlWithSlashAndVersion + "ServiceProviderAPI/";
|
||||
public const string UserPermissionAPI = BaseUrlWithSlashAndVersion + "UserPermissionAPI/";
|
||||
|
||||
public const string UserTest = UserAPI + "/test1";
|
||||
public const string GetUserByEmail = UserAPI + "/GetUserByEmail";
|
||||
public const string GetUserById = UserAPI + "/GetUserById";
|
||||
public const string GetUsers = UserAPI + "/GetUsers";
|
||||
public const string AuthenticateUser = UserAPI + "/AuthenticateUser";
|
||||
public const string CreateUser = UserAPI + "/CreateUser";
|
||||
public const string RefreshToken = UserAPI + "/RefreshToken";
|
||||
//userdata
|
||||
public const string UserTestRouteName = "test1";
|
||||
public const string UserTest = UserAPI + UserTestRouteName;
|
||||
|
||||
public const string GetUserByEmailRouteName = "GetUserByEmail";
|
||||
public const string GetUserByEmail = UserAPI + GetUserByEmailRouteName;
|
||||
|
||||
public const string GetUserByIdRouteName = "GetUserById";
|
||||
public const string GetUserById = UserAPI + GetUserByIdRouteName;
|
||||
|
||||
public const string GetUsersRouteName = "GetUsers";
|
||||
public const string GetUsers = UserAPI + GetUsersRouteName;
|
||||
|
||||
public const string AuthenticateUserRouteName = "AuthenticateUser";
|
||||
public const string AuthenticateUser = UserAPI + AuthenticateUserRouteName;
|
||||
|
||||
public const string CreateUserRouteName = "CreateUser";
|
||||
public const string CreateUser = UserAPI + CreateUserRouteName;
|
||||
|
||||
public const string RefreshTokenRouteName = "RefreshToken";
|
||||
public const string RefreshToken = UserAPI + RefreshTokenRouteName;
|
||||
|
||||
//Weatherdata
|
||||
//public const string WeatherForecast = "api/WeatherForecastAPI";
|
||||
public const string WeatherForecast = WeatherForecastAPI;
|
||||
|
||||
//PopulationStructure
|
||||
//public const string PopulationStructure = "PopulationStructureAPI";
|
||||
public const string PopulationStructure = PopulationStructureAPI;
|
||||
|
||||
public const string GetTransferDestinations = TransferDataAPI+"/GetTransferDestinations";
|
||||
public const string GetTransferDestinationByCoordinates = TransferDataAPI+"/GetTransferDestinationByCoordinates";
|
||||
public const string GetTransferDestinationByAddress = TransferDataAPI+"/GetTransferDestinationByAddress";
|
||||
public const string CreateTransferDestination = TransferDataAPI+"/CreateTransferDestination";
|
||||
//transferdata
|
||||
public const string GetTransferDestinationsRouteName = "GetTransferDestinations";
|
||||
public const string GetTransferDestinations = TransferDataAPI + GetTransferDestinationsRouteName;
|
||||
|
||||
public const string GetServiceProvidersByOwnerId = ServiceProviderAPI+"/GetServiceProvidersByOwnerId";
|
||||
public const string GetQRCodeByProductId = ServiceProviderAPI+"/GetQRCodeByProductId";
|
||||
public const string AddProductRouteName = "/AddProduct";
|
||||
public const string GetTransferDestinationByCoordinatesRouteName = "GetTransferDestinationByCoordinates";
|
||||
public const string GetTransferDestinationByCoordinates = TransferDataAPI + GetTransferDestinationByCoordinatesRouteName;
|
||||
|
||||
public const string GetTransferDestinationByAddressRouteName = "GetTransferDestinationByAddress";
|
||||
public const string GetTransferDestinationByAddress = TransferDataAPI+GetTransferDestinationByAddressRouteName;
|
||||
|
||||
public const string CreateTransferDestinationRouteName = "CreateTransferDestination";
|
||||
public const string CreateTransferDestination = TransferDataAPI+CreateTransferDestinationRouteName;
|
||||
|
||||
public const string CreateTransferRouteName = "CreateTransfer";
|
||||
public const string CreateTransfer = TransferDataAPI+CreateTransferRouteName;
|
||||
|
||||
|
||||
//serviceprovider
|
||||
public const string CreateServiceProviderRouteName = "CreateServiceProvider";
|
||||
public const string CreateServiceProvider = ServiceProviderAPI+CreateServiceProviderRouteName;
|
||||
|
||||
public const string GetServiceProviderByIdRouteName = "GetServiceProviderById";
|
||||
public const string GetServiceProviderById = ServiceProviderAPI+GetServiceProviderByIdRouteName;
|
||||
|
||||
public const string GetServiceProvidersByOwnerIdRouteName = "GetServiceProvidersByOwnerId";
|
||||
public const string GetServiceProvidersByOwnerId = ServiceProviderAPI+GetServiceProvidersByOwnerIdRouteName;
|
||||
|
||||
public const string GetQRCodeByProductIdRouteName = "GetQRCodeByProductId";
|
||||
public const string GetQRCodeByProductId = ServiceProviderAPI+GetQRCodeByProductIdRouteName;
|
||||
|
||||
public const string AddProductRouteName = "AddProduct";
|
||||
public const string AddProductRouteUrl = ServiceProviderAPI + AddProductRouteName;
|
||||
|
||||
public const string CreateUserProductMappingRouteName = "CreateUserProductMapping";
|
||||
public const string CreateUserProductMapping = ServiceProviderAPI + CreateUserProductMappingRouteName;
|
||||
|
||||
public const string GetServiceProvidersRouteName = "GetServiceProviders";
|
||||
public const string GetServiceProviders = ServiceProviderAPI + GetServiceProvidersRouteName;
|
||||
|
||||
public const string GetUserProductMappingsForProductRouteName = "GetUserProductMappingsForProduct";
|
||||
public const string GetUserProductMappingsForProduct = ServiceProviderAPI + GetUserProductMappingsForProductRouteName;
|
||||
|
||||
|
||||
//AssingedUsers
|
||||
public const string CreateAssignedUser = "api/ServiceProviderAPI/CreateAssignedUser";
|
||||
public const string GetAssignedUsersForServiceProvider = "api/ServiceProviderAPI/GetAssignedUsersForServiceProvider";
|
||||
public const string CreateAssignedUserRouteName = "CreateAssignedUser";
|
||||
public const string CreateAssignedUser = ServiceProviderAPI + CreateAssignedUserRouteName;
|
||||
public const string GetAssignedUsersForServiceProviderRouteName = "GetAssignedUsersForServiceProvider";
|
||||
public const string GetAssignedUsersForServiceProvider = ServiceProviderAPI + GetAssignedUsersForServiceProviderRouteName;
|
||||
|
||||
//permissions
|
||||
//1
|
||||
public const string GetPermissionsForContextByContextId = "api/UserPermissionAPI/GetPermissionsForContextByContextId";
|
||||
public const string GetPermissionsForContextByContextIdRouteName = "GetPermissionsForContextByContextId";
|
||||
public const string GetPermissionsForContextByContextId = ServiceProviderAPI+GetPermissionsForContextByContextIdRouteName;
|
||||
//2. get the contexts where the user has permission
|
||||
public const string GetPermissionContextByUserId = "api/UserPermissionAPI/GetPermissionContextByUserId";
|
||||
public const string GetPermissionContextByUserIdRouteName = "GetPermissionContextByUserId";
|
||||
public const string GetPermissionContextByUserId = ServiceProviderAPI+GetPermissionContextByUserIdRouteName;
|
||||
//12
|
||||
public const string GetPermissionGroupsForContextByContextId = "api/UserPermissionAPI/GetPermissionGroupsForContextByContextId";
|
||||
public const string GetPermissionGroupsForContextByContextIdRouteName = "GetPermissionGroupsForContextByContextId";
|
||||
public const string GetPermissionGroupsForContextByContextId = ServiceProviderAPI+GetPermissionGroupsForContextByContextIdRouteName;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using TIAM.Core.Enums;
|
||||
using TIAM.Resources;
|
||||
|
||||
namespace TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
|
||||
{
|
||||
public class ProductWizardModel
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
[Required(ErrorMessage = "The type of service should be specified.")]
|
||||
[DataType("ProductType")]
|
||||
[Display(Name = ResourceKeys.ProductType, ResourceType = typeof(TIAMResources))]
|
||||
public ProductType ProductType { get; set; }
|
||||
//public Guid? UserMediaId { get; set; }
|
||||
[Required(ErrorMessage = "The name should be specified.")]
|
||||
[DataType(DataType.Text)]
|
||||
[Display(Name = ResourceKeys.ProductName, ResourceType = typeof(TIAMResources))]
|
||||
public string Name { get; set; }
|
||||
[Required(ErrorMessage = "The description should be specified.")]
|
||||
[DataType(DataType.MultilineText)]
|
||||
[Display(Name = ResourceKeys.ProductDescription, ResourceType = typeof(TIAMResources))]
|
||||
public string Description { get; set; }
|
||||
|
||||
public float Price { get; set; }
|
||||
public string? JsonDetails { get; set; }
|
||||
|
||||
public DateTime Created { get; set; }
|
||||
public DateTime Modified { get; set; }
|
||||
|
||||
public ProductWizardModel() { }
|
||||
|
||||
public ProductWizardModel(ProductType productType, string name, string description, float price, string? jsonDetails) : this(Guid.NewGuid(), productType, name, description, price, jsonDetails) { }
|
||||
|
||||
public ProductWizardModel(Guid id, ProductType productType, string name, string description, float price, string? jsonDetails)
|
||||
{
|
||||
Id = id;
|
||||
ProductType = productType;
|
||||
Name = name;
|
||||
Description = description;
|
||||
Price = price;
|
||||
JsonDetails = jsonDetails;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -16,13 +16,14 @@ namespace TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
|
|||
public Guid Id { get; set; }
|
||||
|
||||
//[Required(ErrorMessage = "The Username value should be specified.")]
|
||||
[Required(ErrorMessage = "The destination address should be specified.")]
|
||||
//[Required(ErrorMessage = "The destination address should be specified.")]
|
||||
[Destination(ErrorMessage = "The destination value is invalid.")]
|
||||
[DataType("TransferDestination")]
|
||||
[Display(Name = ResourceKeys.Destination, ResourceType = typeof(TIAMResources))]
|
||||
public string? Destination { get; set; }
|
||||
|
||||
//[Required(ErrorMessage = "The Username value should be specified.")]
|
||||
[Required(ErrorMessage = "The pickup address should be specified.")]
|
||||
//[Required(ErrorMessage = "The pickup address should be specified.")]
|
||||
[DataType("TransferDestination")]
|
||||
[Display(Name = ResourceKeys.PickupAddress, ResourceType = typeof(TIAMResources))]
|
||||
public string? PickupAddress { get; set; }
|
||||
|
|
@ -106,5 +107,13 @@ namespace TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
|
|||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
|
||||
public class DestinationAttribute : ValidationAttribute
|
||||
{
|
||||
public override bool IsValid(object value)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,12 +19,15 @@ namespace TIAMWebApp.Shared.Application.Services
|
|||
this.logToBrowserConsole = logToBrowserConsole;
|
||||
}
|
||||
|
||||
public async Task<TransferDestination[]?> GetDestinationsAsync()
|
||||
public async Task<List<TransferDestination>> GetDestinationsAsync()
|
||||
{
|
||||
|
||||
var url = $"{Setting.BaseUrl}/{APIUrls.GetTransferDestinations}";
|
||||
logToBrowserConsole.LogToBC(url);
|
||||
return await http.GetFromJsonAsync<TransferDestination[]>(url);
|
||||
List<TransferDestination>? response = await http.GetFromJsonAsync<List<TransferDestination>>(url);
|
||||
if(response == null)
|
||||
return new List<TransferDestination>();
|
||||
return response;
|
||||
}
|
||||
|
||||
public async Task<TransferDestination?> GetTransferDestinationbyCoordinatesAsync(string destinationId)
|
||||
|
|
@ -41,7 +44,7 @@ namespace TIAMWebApp.Shared.Application.Services
|
|||
|
||||
public async Task<TransferDestination?> CreateTransferDestination(TransferDestinationWizardModel model)
|
||||
{
|
||||
var url = $"{Setting.BaseUrl}/{APIUrls.CreateTransferDestination}";
|
||||
var url = $"{Setting.BaseUrl}/{APIUrls.CreateTransfer}";
|
||||
var response = await http.PostAsJsonAsync(url, model);
|
||||
|
||||
//var result = new WizardProcessorResult();
|
||||
|
|
@ -59,5 +62,26 @@ namespace TIAMWebApp.Shared.Application.Services
|
|||
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task<TransferWizardModel?> CreateTransfer(TransferWizardModel model)
|
||||
{
|
||||
var url = $"{Setting.BaseUrl}/{APIUrls.CreateTransferDestination}";
|
||||
var response = await http.PostAsJsonAsync(url, model);
|
||||
|
||||
//var result = new WizardProcessorResult();
|
||||
|
||||
//if (response.IsSuccessStatusCode)
|
||||
//{
|
||||
// result.IsSucces = true;
|
||||
// result.ResultJson = await response.Content.ReadAsStringAsync();
|
||||
//}
|
||||
|
||||
if (!response.IsSuccessStatusCode)
|
||||
return null;
|
||||
|
||||
var result = (TransferWizardModel)(await response.Content.ReadFromJsonAsync(typeof(TransferWizardModel)))!;
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,10 @@
|
|||
public const string PickupTime = "PickupTime";
|
||||
public const string NumberOfPassengers = "NumberOfPassengers";
|
||||
|
||||
public const string ProductType = "ProductType";
|
||||
public const string ProductName = "ProductName";
|
||||
public const string ProductDescription = "ProductDescription";
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue