transfer cards accordion style fixes, coloring fiix, user transfers list (WIP), driver sendmessage, etc
This commit is contained in:
parent
c02f2dfe51
commit
dd8b1ac6b4
|
|
@ -943,10 +943,10 @@
|
||||||
<Name>Anata_Development_Team</Name>
|
<Name>Anata_Development_Team</Name>
|
||||||
</SelectedItem>
|
</SelectedItem>
|
||||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlFile, Microsoft.Data.Tools.Schema.Sql, Version=162.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlFile, Microsoft.Data.Tools.Schema.Sql, Version=162.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<Name>TIAM_DEV</Name>
|
<Name>TIAM_DEV_log</Name>
|
||||||
</SelectedItem>
|
</SelectedItem>
|
||||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlFile, Microsoft.Data.Tools.Schema.Sql, Version=162.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlFile, Microsoft.Data.Tools.Schema.Sql, Version=162.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<Name>TIAM_DEV_log</Name>
|
<Name>TIAM_DEV</Name>
|
||||||
</SelectedItem>
|
</SelectedItem>
|
||||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlFile, Microsoft.Data.Tools.Schema.Sql, Version=162.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlFile, Microsoft.Data.Tools.Schema.Sql, Version=162.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<Name>TIAM_DEVRELEASE</Name>
|
<Name>TIAM_DEVRELEASE</Name>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@
|
||||||
@inherits BasePageComponent
|
@inherits BasePageComponent
|
||||||
@inject HttpClient Http
|
@inject HttpClient Http
|
||||||
@inject NavigationManager navManager
|
@inject NavigationManager navManager
|
||||||
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
|
||||||
@inject ITransferDataService transferDataService
|
@inject ITransferDataService transferDataService
|
||||||
@inject IUserDataService UserDataService
|
@inject IUserDataService UserDataService
|
||||||
@inject SumupService SumUpService
|
@inject SumupService SumUpService
|
||||||
|
|
@ -405,7 +404,7 @@ else
|
||||||
foreach (var t in Enum.GetValues(typeof(TransferStatusType)).OfType<TransferStatusType>().ToList())
|
foreach (var t in Enum.GetValues(typeof(TransferStatusType)).OfType<TransferStatusType>().ToList())
|
||||||
_statusTypes.Add(t.ToString());
|
_statusTypes.Add(t.ToString());
|
||||||
|
|
||||||
_logger = new LoggerClient<EditTransfers>(LogWriters.ToArray());
|
_logger = new LoggerClient<EditTransfers>(_logWriters.ToArray());
|
||||||
_logger.Info($"parameter: {transferId.ToString()}");
|
_logger.Info($"parameter: {transferId.ToString()}");
|
||||||
|
|
||||||
await LoadTransfer();
|
await LoadTransfer();
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
<div class="container-fluid" style="position: relative; z-index: 2;">
|
<div class="container-fluid" style="position: relative; z-index: 2;">
|
||||||
<div class="row d-flex justify-content-center">
|
<div class="row d-flex justify-content-center">
|
||||||
<div class="col-12 col-lg-6">
|
<div class="col-12 col-lg-6">
|
||||||
<div class="card bg-white p-3">
|
|
||||||
@* <InputWizard Data=@myModel
|
@* <InputWizard Data=@myModel
|
||||||
OnSubmit="SubmitForm"
|
OnSubmit="SubmitForm"
|
||||||
IgnoreReflection="@TransferIgnorList"
|
IgnoreReflection="@TransferIgnorList"
|
||||||
|
|
@ -34,7 +34,6 @@
|
||||||
SubtitleResourceString="TransferSubtitle"></InputWizard> *@
|
SubtitleResourceString="TransferSubtitle"></InputWizard> *@
|
||||||
<DynamicEditForm Data="myModel" isEditing="true" IgnoreReflection="TransferIgnorList" OnSubmit="SubmitForm"></DynamicEditForm>
|
<DynamicEditForm Data="myModel" isEditing="true" IgnoreReflection="TransferIgnorList" OnSubmit="SubmitForm"></DynamicEditForm>
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
if (Context.Products.Count() > 0)
|
if (Context.Products.Count() > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
<DxAccordion ExpandMode="ExpandMode"
|
<DxAccordion SizeMode="@SizeMode.Small" ExpandMode="ExpandMode"
|
||||||
ExpandCollapseAction="ExpandCollapseAction"
|
ExpandCollapseAction="ExpandCollapseAction"
|
||||||
AnimationType="LayoutAnimationType.Slide">
|
AnimationType="LayoutAnimationType.Slide">
|
||||||
<Items>
|
<Items>
|
||||||
|
|
|
||||||
|
|
@ -1,93 +1,194 @@
|
||||||
@using BlazorAnimation
|
@using AyCode.Core.Enums
|
||||||
|
@using AyCode.Services.Loggers
|
||||||
|
@using BlazorAnimation
|
||||||
|
@using TIAM.Core.Consts
|
||||||
@using TIAM.Core.Enums
|
@using TIAM.Core.Enums
|
||||||
@using TIAM.Entities.Transfers
|
@using TIAM.Entities.Transfers
|
||||||
|
@using TIAM.Models.Dtos.Users
|
||||||
@using TIAM.Services
|
@using TIAM.Services
|
||||||
|
@using TIAMSharedUI.Pages.Components.EditComponents
|
||||||
|
@using TIAMSharedUI.Pages.User.SysAdmins
|
||||||
@using TIAMSharedUI.Shared.Components.Cards
|
@using TIAMSharedUI.Shared.Components.Cards
|
||||||
@using TIAMWebApp.Shared.Application.Interfaces
|
@using TIAMWebApp.Shared.Application.Interfaces
|
||||||
@using TIAMWebApp.Shared.Application.Models.ClientSide.UI
|
@using TIAMWebApp.Shared.Application.Models.ClientSide.UI
|
||||||
|
@using TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
|
||||||
@using TIAMWebApp.Shared.Application.Services
|
@using TIAMWebApp.Shared.Application.Services
|
||||||
|
@using TIAMWebApp.Shared.Application.Utility
|
||||||
|
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
||||||
@inject IServiceProviderDataService ServiceProviderDataService
|
@inject IServiceProviderDataService ServiceProviderDataService
|
||||||
@inject AdminSignalRClient AdminSignalRClient;
|
@inject AdminSignalRClient AdminSignalRClient;
|
||||||
|
@inject IWizardProcessor wizardProcessor
|
||||||
|
|
||||||
<div class="e-card cw-480">
|
<DxPopup CssClass="popup-demo-events"
|
||||||
<div class="e-main d-flex align-items-center">
|
@bind-Visible="@_popupVisible"
|
||||||
<div class="flex-shrink-0">
|
ShowFooter="true"
|
||||||
<img class="e-photo" src="_content/TIAMSharedUI/images/defaultavatar_60.png" alt="" />
|
CloseOnEscape="true"
|
||||||
</div>
|
CloseOnOutsideClick="false"
|
||||||
<div class="e-info flex-grow-1 ms-3">
|
ShowCloseButton="false"
|
||||||
<div class="e-name">@($"{Context.FullName}")</div>
|
HeaderText="MessageBox"
|
||||||
<p class="e-title"><i class="fa-solid fa-at"></i> @Context.ContactEmail</p>
|
Closing="EmailPopupClosing"
|
||||||
<p class="e-title"><i class="fa-solid fa-phone"></i> @Context.ContactPhone</p>
|
Closed="EmailPopupClosed"
|
||||||
</div>
|
SizeMode="SizeMode.Large">
|
||||||
</div>
|
<BodyContentTemplate>
|
||||||
|
@{
|
||||||
<hr class="hr" />
|
if(showResultMessage)
|
||||||
|
{
|
||||||
<div class="row">
|
<h5>@resultMessage</h5>
|
||||||
<div class="col-12 col-md-6">
|
}
|
||||||
@RenderDetailsItem("fa-solid fa-location-dot", "From", Context.FromAddress)
|
else
|
||||||
</div>
|
{
|
||||||
<div class="col-12 col-md-6">
|
<DynamicEditForm Data=@_messageWizardModel
|
||||||
@RenderDetailsItem("fa-solid fa-location-dot", "To", Context.ToAddress)
|
OnSubmit="SubmitForm"
|
||||||
</div>
|
TitleString="New message"
|
||||||
<hr class="hr" />
|
ButtonTextString="Send message"
|
||||||
<div class="col-12 col-md-4">
|
isEditing="true"
|
||||||
@RenderDetailsItem("fa-solid fa-users", "Passengers", Context.PassengerCount.ToString())
|
IgnoreReflection=@IgnoreList></DynamicEditForm>
|
||||||
</div>
|
}
|
||||||
<div class="col-12 col-md-4">
|
|
||||||
@RenderDetailsItem("fa-solid fa-suitcase-rolling", "Luggage", Context.LuggageCount.ToString())
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-md-4">
|
|
||||||
@RenderDetailsItem("fa-solid fa-hashtag", "Flight number", Context.FlightNumber)
|
|
||||||
</div>
|
|
||||||
<hr class="hr" />
|
|
||||||
<div class="col-12">
|
|
||||||
@RenderDetailsItem("fa-solid fa-hashtag", "Comment", Context.Comment)
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-md-6">
|
|
||||||
@RenderDetailsItem("fa-solid fa-list-check", "Status", AllStatuses.FirstOrDefault(x => x.StatusValue == (byte)Context.TransferStatusType).StatusName)
|
|
||||||
</div>
|
|
||||||
<div class="col-9 col-md-5">
|
|
||||||
<DxComboBox Data="@Statuses"
|
|
||||||
@bind-Value="@CurrentStatusType"
|
|
||||||
NullText="Select new status"
|
|
||||||
CssClass="form-field"
|
|
||||||
ValueFieldName="@nameof(TransferStatusModel.StatusValue)"
|
|
||||||
TextFieldName="@nameof(TransferStatusModel.StatusName)" />
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="col-3 col-md-1">
|
|
||||||
<DxButton CssClass="btn btn-primary" Click="SaveStatus" Enabled="@isSaveActive"> Save</DxButton>
|
|
||||||
</div>
|
|
||||||
@if(!Context.Paid)
|
|
||||||
{
|
|
||||||
<hr class="hr" />
|
|
||||||
<div class="col-3 col-md-1">
|
|
||||||
<DxButton CssClass="btn btn-primary" Click="PaidByCash">Paid in car</DxButton>
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
<p>@msg</p>
|
</BodyContentTemplate>
|
||||||
</div>
|
<FooterContentTemplate Context="Context">
|
||||||
</div>
|
@{
|
||||||
|
if(showResultMessage)
|
||||||
|
{
|
||||||
|
<div class="popup-demo-events-footer">
|
||||||
|
<!--DxCheckBox CssClass="popup-demo-events-checkbox" @bind-Checked="@EulaAccepted">I accept the terms of the EULA</!--DxCheckBox-->
|
||||||
|
<!--DxButton CssClass="popup-demo-events-button ms-2" RenderStyle="ButtonRenderStyle.Primary" Text="OK" Click="Context.CloseCallback" /-->
|
||||||
|
<DxButton CssClass="popup-demo-events-button ms-2" RenderStyle="ButtonRenderStyle.Secondary" Text="Ok" Click="CancelCreateClick" />
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<div class="popup-demo-events-footer">
|
||||||
|
<!--DxCheckBox CssClass="popup-demo-events-checkbox" @bind-Checked="@EulaAccepted">I accept the terms of the EULA</!--DxCheckBox-->
|
||||||
|
<!--DxButton CssClass="popup-demo-events-button ms-2" RenderStyle="ButtonRenderStyle.Primary" Text="OK" Click="Context.CloseCallback" /-->
|
||||||
|
<DxButton CssClass="popup-demo-events-button ms-2" RenderStyle="ButtonRenderStyle.Secondary" Text="Cancel" Click="CancelCreateClick" />
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</FooterContentTemplate>
|
||||||
|
</DxPopup>
|
||||||
|
|
||||||
|
<DxTabs CssClass="no-padding">
|
||||||
|
<DxTabPage Text="Details">
|
||||||
|
|
||||||
|
<div class="e-card cw-480 p-3">
|
||||||
|
<div class="e-main d-flex align-items-center">
|
||||||
|
<div class="flex-shrink-0">
|
||||||
|
<img class="e-photo" src="_content/TIAMSharedUI/images/defaultavatar_60.png" alt="" />
|
||||||
|
</div>
|
||||||
|
<div class="e-info flex-grow-1 ms-3">
|
||||||
|
<div class="e-name">@($"{Context.FullName}")</div>
|
||||||
|
<p class="e-title"><i class="fa-solid fa-at"></i> @Context.ContactEmail</p>
|
||||||
|
<p class="e-title"><i class="fa-solid fa-phone"></i> @Context.ContactPhone</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr class="hr" />
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 col-md-6">
|
||||||
|
@RenderDetailsItem("fa-solid fa-location-dot", "From", Context.FromAddress)
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-6">
|
||||||
|
@RenderDetailsItem("fa-solid fa-location-dot", "To", Context.ToAddress)
|
||||||
|
</div>
|
||||||
|
<hr class="hr" />
|
||||||
|
<div class="col-12 col-md-4">
|
||||||
|
@RenderDetailsItem("fa-solid fa-users", "Passengers", Context.PassengerCount.ToString())
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-4">
|
||||||
|
@RenderDetailsItem("fa-solid fa-suitcase-rolling", "Luggage", Context.LuggageCount.ToString())
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-4">
|
||||||
|
@RenderDetailsItem("fa-solid fa-hashtag", "Flight number", Context.FlightNumber)
|
||||||
|
</div>
|
||||||
|
<hr class="hr" />
|
||||||
|
<div class="col-12">
|
||||||
|
@RenderDetailsItem("fa-solid fa-hashtag", "Comment", Context.Comment)
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-6">
|
||||||
|
@RenderDetailsItem("fa-solid fa-list-check", "Status", AllStatuses.FirstOrDefault(x => x.StatusValue == (byte)Context.TransferStatusType).StatusName)
|
||||||
|
</div>
|
||||||
|
<div class="col-9 col-md-5">
|
||||||
|
<DxComboBox Data="@Statuses"
|
||||||
|
@bind-Value="@CurrentStatusType"
|
||||||
|
NullText="Select new status"
|
||||||
|
CssClass="form-field"
|
||||||
|
ValueFieldName="@nameof(TransferStatusModel.StatusValue)"
|
||||||
|
TextFieldName="@nameof(TransferStatusModel.StatusName)" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-3 col-md-1">
|
||||||
|
<DxButton CssClass="btn btn-primary" Click="SaveStatus" Enabled="@isSaveActive"> Save</DxButton>
|
||||||
|
</div>
|
||||||
|
@if (!Context.Paid)
|
||||||
|
{
|
||||||
|
<hr class="hr" />
|
||||||
|
<div class="col-3 col-md-1">
|
||||||
|
<DxButton CssClass="btn btn-primary" Click="PaidByCash">Paid in car</DxButton>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
<p>@msg</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</DxTabPage>
|
||||||
|
<DxTabPage Text="Messages">
|
||||||
|
<div style="margin-top: 10px; margin-bottom: 10px;">
|
||||||
|
<DxButton Click="() => SendMail(Context)" Text="Send a message" RenderStyle="ButtonRenderStyle.Primary" />
|
||||||
|
</div>
|
||||||
|
<MessageDetailGridComponent ContextId="Context.Id" IsSenderEmailVisible="false" IsMessageTextVisible="false"></MessageDetailGridComponent>
|
||||||
|
</DxTabPage>
|
||||||
|
|
||||||
|
</DxTabs>
|
||||||
|
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
[Parameter] public Transfer Context { get; set; }
|
[Parameter] public Transfer Context { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter] public EventCallback<string> DataChanged { get; set; }
|
||||||
public EventCallback<string> DataChanged { get; set; }
|
|
||||||
|
private LoggerClient<TransferCardComponent> _logger = null!;
|
||||||
|
|
||||||
|
//Email
|
||||||
|
private bool showResultMessage = false;
|
||||||
|
private string resultMessage = string.Empty;
|
||||||
|
private List<UserModelDtoDetail> sysAdmins = [];
|
||||||
|
|
||||||
|
|
||||||
|
private MessageWizardModel _messageWizardModel = new();
|
||||||
|
|
||||||
|
private bool displayCard = true;
|
||||||
|
|
||||||
|
private bool _popupVisible;
|
||||||
|
|
||||||
|
public List<string> IgnoreList =
|
||||||
|
[
|
||||||
|
"ReceiverEmailAddress",
|
||||||
|
"ReceiverFullName",
|
||||||
|
"ReceiverId",
|
||||||
|
"SenderEmailAddress",
|
||||||
|
"SenderFullName",
|
||||||
|
"SenderId",
|
||||||
|
"ContextId",
|
||||||
|
"ContextType"
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static readonly IEnumerable<TransferStatusModel> Statuses = new[]
|
private static readonly IEnumerable<TransferStatusModel> Statuses = new[]
|
||||||
{
|
{
|
||||||
new TransferStatusModel(Convert.ToByte(TransferStatusType.DriverConfirmed), "Driver confirmed"),
|
new TransferStatusModel(Convert.ToByte(TransferStatusType.DriverConfirmed), "Driver confirmed"),
|
||||||
new TransferStatusModel(Convert.ToByte(TransferStatusType.DriverEnRoute), "Driver enroute"),
|
new TransferStatusModel(Convert.ToByte(TransferStatusType.DriverEnRoute), "Driver enroute"),
|
||||||
new TransferStatusModel(Convert.ToByte(TransferStatusType.PassengerPickup), "Passenger in car"),
|
new TransferStatusModel(Convert.ToByte(TransferStatusType.PassengerPickup), "Passenger in car"),
|
||||||
new TransferStatusModel(Convert.ToByte(TransferStatusType.Finished), "Finished"),
|
new TransferStatusModel(Convert.ToByte(TransferStatusType.Finished), "Finished"),
|
||||||
new TransferStatusModel(Convert.ToByte(TransferStatusType.UserCanceled), "User cancelled"),
|
new TransferStatusModel(Convert.ToByte(TransferStatusType.UserCanceled), "User cancelled"),
|
||||||
};
|
};
|
||||||
|
|
||||||
private static readonly List<TransferStatusModel> AllStatuses = new()
|
private static readonly List<TransferStatusModel> AllStatuses = new()
|
||||||
{
|
{
|
||||||
new TransferStatusModel(Convert.ToByte(TransferStatusType.OrderSubmitted), "Order submitted"),
|
new TransferStatusModel(Convert.ToByte(TransferStatusType.OrderSubmitted), "Order submitted"),
|
||||||
new TransferStatusModel(Convert.ToByte(TransferStatusType.OrderConfirmed), "Order confirmed"),
|
new TransferStatusModel(Convert.ToByte(TransferStatusType.OrderConfirmed), "Order confirmed"),
|
||||||
new TransferStatusModel(Convert.ToByte(TransferStatusType.AssignedToDriver), "Assigned to driver"),
|
new TransferStatusModel(Convert.ToByte(TransferStatusType.AssignedToDriver), "Assigned to driver"),
|
||||||
|
|
@ -97,7 +198,7 @@
|
||||||
new TransferStatusModel(Convert.ToByte(TransferStatusType.Finished), "Finished"),
|
new TransferStatusModel(Convert.ToByte(TransferStatusType.Finished), "Finished"),
|
||||||
new TransferStatusModel(Convert.ToByte(TransferStatusType.UserCanceled), "User cancelled"),
|
new TransferStatusModel(Convert.ToByte(TransferStatusType.UserCanceled), "User cancelled"),
|
||||||
new TransferStatusModel(Convert.ToByte(TransferStatusType.AdminDenied), "Admin cancelled")
|
new TransferStatusModel(Convert.ToByte(TransferStatusType.AdminDenied), "Admin cancelled")
|
||||||
};
|
};
|
||||||
|
|
||||||
private TransferStatusModel _currentStatusType;
|
private TransferStatusModel _currentStatusType;
|
||||||
public TransferStatusModel CurrentStatusType
|
public TransferStatusModel CurrentStatusType
|
||||||
|
|
@ -175,12 +276,15 @@
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
|
_logger = new LoggerClient<TransferCardComponent>(LogWriters.ToArray());
|
||||||
|
sysAdmins = await AdminSignalRClient.GetByIdAsync<List<UserModelDtoDetail>>(SignalRTags.GetAllUserModelDtoDetails, TiamConstClient.SysAdmins[0]);
|
||||||
await base.OnInitializedAsync();
|
await base.OnInitializedAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Task OnParametersSetAsync()
|
protected override Task OnParametersSetAsync()
|
||||||
{
|
{
|
||||||
CurrentStatusType = AllStatuses.FirstOrDefault(x => x.StatusValue == (byte)Context.TransferStatusType);
|
CurrentStatusType = AllStatuses.FirstOrDefault(x => x.StatusValue == (byte)Context.TransferStatusType);
|
||||||
|
|
||||||
return base.OnParametersSetAsync();
|
return base.OnParametersSetAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -196,4 +300,61 @@
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SendMail(Transfer item)
|
||||||
|
{
|
||||||
|
_logger.Info($"Preparing mail to {item.ContactEmail}, {item.Id}");
|
||||||
|
_messageWizardModel.Subject = $"[#{item.OrderId}] New message from guest";
|
||||||
|
_messageWizardModel.ReceiverId = TiamConstClient.SysAccounts["SystemEmailSender"];
|
||||||
|
//get first sysadmin
|
||||||
|
|
||||||
|
_messageWizardModel.ReceiverEmailAddress = sysAdmins[0].UserDto.EmailAddress;
|
||||||
|
_messageWizardModel.ReceiverFullName = "Admin user";
|
||||||
|
|
||||||
|
_messageWizardModel.SenderId = item.UserId;
|
||||||
|
_messageWizardModel.SenderEmailAddress = TiamConstClient.SystemEmailAddress;
|
||||||
|
|
||||||
|
_messageWizardModel.ContextId = item.Id;
|
||||||
|
_messageWizardModel.ContextType = MessageContextType.Transfer;
|
||||||
|
_popupVisible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CancelCreateClick()
|
||||||
|
{
|
||||||
|
showResultMessage = false;
|
||||||
|
resultMessage = "";
|
||||||
|
_popupVisible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EmailPopupClosed()
|
||||||
|
{
|
||||||
|
//cancel clicked
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void EmailPopupClosing(PopupClosingEventArgs args)
|
||||||
|
{
|
||||||
|
//myModel = new TransferWizardModel();
|
||||||
|
_messageWizardModel = new MessageWizardModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task SubmitForm(object result)
|
||||||
|
{
|
||||||
|
var messageModel = (result as MessageWizardModel)!;
|
||||||
|
_logger.Info(messageModel.Content);
|
||||||
|
var email = await wizardProcessor.ProcessWizardAsync<MessageWizardModel>(result.GetType(), messageModel);
|
||||||
|
if (email != null)
|
||||||
|
{
|
||||||
|
resultMessage = "Message sent";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
resultMessage = $"Something went wrong, please try again later, or contact us by regular email at {TiamConstClient.SystemEmailAddress}!";
|
||||||
|
}
|
||||||
|
showResultMessage = true;
|
||||||
|
_logger.Info($"Submitted nested form: {result.GetType().FullName}");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,19 +74,25 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class=" col-12">
|
<div class=" col-12">
|
||||||
|
|
||||||
<DxTabs>
|
<DxTabs CssClass="no-padding">
|
||||||
<DxTabPage Text="@($"Upcoming({PageModel.Upcomings.Count})")">
|
<DxTabPage Text="@($"Upcoming({PageModel.Upcomings.Count})")">
|
||||||
<DxAccordion ExpandMode="ExpandMode"
|
<DxAccordion CssClass="no-padding" SizeMode="@SizeMode.Small" ExpandMode="ExpandMode"
|
||||||
ExpandCollapseAction="ExpandCollapseAction"
|
ExpandCollapseAction="ExpandCollapseAction"
|
||||||
AnimationType="LayoutAnimationType.Slide">
|
AnimationType="LayoutAnimationType.Slide">
|
||||||
<Items>
|
<Items>
|
||||||
@foreach (var transfer in PageModel.Upcomings)
|
@foreach (var transfer in PageModel.Upcomings)
|
||||||
{
|
{
|
||||||
<DxAccordionItem CssClass="@GetCustomColor(transfer.TransferStatusType)" Text=@($"[#{transfer.OrderId}] {transfer.Appointment} - {transfer.FromAddress}")>
|
<DxAccordionItem IconCssClass="@GetCustomColor(transfer.TransferStatusType)">
|
||||||
<ContentTemplate>
|
<HeaderTextTemplate>
|
||||||
<div class="py-3 px-3">
|
<div style="flex-direction: column">
|
||||||
<TransferCardComponent DataChanged="RefreshComponent" Context="@transfer" />
|
<p class="no-padding no-margin">@($"[#{transfer.OrderId}] {transfer.Appointment}")</p>
|
||||||
|
<p class="text-muted no-padding no-margin">@($"{transfer.FromAddress}")</p>
|
||||||
</div>
|
</div>
|
||||||
|
</HeaderTextTemplate>
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<TransferCardComponent DataChanged="RefreshComponent" Context="@transfer" />
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</DxAccordionItem>
|
</DxAccordionItem>
|
||||||
}
|
}
|
||||||
|
|
@ -101,18 +107,25 @@
|
||||||
</DxTabPage>
|
</DxTabPage>
|
||||||
|
|
||||||
<DxTabPage Text="@($"Problems({PageModel.Problems.Count})")">
|
<DxTabPage Text="@($"Problems({PageModel.Problems.Count})")">
|
||||||
<DxAccordion ExpandMode="ExpandMode"
|
<DxAccordion CssClass="no-padding" SizeMode="@SizeMode.Small" ExpandMode="ExpandMode"
|
||||||
ExpandCollapseAction="ExpandCollapseAction"
|
ExpandCollapseAction="ExpandCollapseAction"
|
||||||
AnimationType="LayoutAnimationType.Slide">
|
AnimationType="LayoutAnimationType.Slide">
|
||||||
<Items>
|
<Items>
|
||||||
@foreach (var transfer in PageModel.Problems)
|
@foreach (var transfer in PageModel.Problems)
|
||||||
{
|
{
|
||||||
|
|
||||||
<DxAccordionItem CssClass="@GetCustomColor(transfer.TransferStatusType)" Text=@($"[#{transfer.OrderId}] {transfer.Appointment} - {transfer.FromAddress}")>
|
<DxAccordionItem IconCssClass="@GetCustomColor(transfer.TransferStatusType)">
|
||||||
<ContentTemplate>
|
|
||||||
<div class="py-3 px-3">
|
<HeaderTextTemplate>
|
||||||
<TransferCardComponent DataChanged="RefreshComponent" Context="@transfer" />
|
<div style="flex-direction: column">
|
||||||
|
<p class="no-padding no-margin">@($"[#{transfer.OrderId}] {transfer.Appointment}")</p>
|
||||||
|
<p class="text-muted no-padding no-margin">@($"{transfer.FromAddress}")</p>
|
||||||
</div>
|
</div>
|
||||||
|
</HeaderTextTemplate>
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<TransferCardComponent DataChanged="RefreshComponent" Context="@transfer" />
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</DxAccordionItem>
|
</DxAccordionItem>
|
||||||
}
|
}
|
||||||
|
|
@ -158,10 +171,10 @@
|
||||||
<DxGridDataColumn FieldName="Appointment" Caption="Appointment" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" SortOrder="GridColumnSortOrder.Descending" GroupIndex="0" GroupInterval="GridColumnGroupInterval.Date" DisplayFormat="d" Width="95" />
|
<DxGridDataColumn FieldName="Appointment" Caption="Appointment" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" SortOrder="GridColumnSortOrder.Descending" GroupIndex="0" GroupInterval="GridColumnGroupInterval.Date" DisplayFormat="d" Width="95" />
|
||||||
<DxGridDataColumn Caption="Time" Width="50" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center">
|
<DxGridDataColumn Caption="Time" Width="50" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center">
|
||||||
<CellDisplayTemplate>
|
<CellDisplayTemplate>
|
||||||
@{
|
@{
|
||||||
var appointment = (Transfer)context.DataItem;
|
var appointment = (Transfer)context.DataItem;
|
||||||
<text>@appointment.Appointment.ToString("t")</text>
|
<text>@appointment.Appointment.ToString("t")</text>
|
||||||
}
|
}
|
||||||
</CellDisplayTemplate>
|
</CellDisplayTemplate>
|
||||||
</DxGridDataColumn>
|
</DxGridDataColumn>
|
||||||
<DxGridDataColumn FieldName="FromAddress" />
|
<DxGridDataColumn FieldName="FromAddress" />
|
||||||
|
|
@ -370,19 +383,19 @@
|
||||||
switch (transferStatusByte)
|
switch (transferStatusByte)
|
||||||
{
|
{
|
||||||
case 5:
|
case 5:
|
||||||
return "bg-important text-body";
|
return "text-danger fa-solid fa-triangle-exclamation";
|
||||||
|
|
||||||
case > 5 and < 35:
|
case > 5 and < 35:
|
||||||
return "bg-attention text-body";
|
return "text-warning fa-solid fa-triangle-exclamation";
|
||||||
|
|
||||||
case 35:
|
case 35:
|
||||||
return "bg-finished text-body";
|
return "text-success fa-solid fa-circle-check";
|
||||||
|
|
||||||
case > 35:
|
case > 35:
|
||||||
return "bg-cancel text-body";
|
return "text-muted fa-solid fa-circle-xmark";
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return "text-body";
|
return "text-primary";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,8 @@
|
||||||
SearchFilterCondition="@ListSearchFilterCondition.Contains"
|
SearchFilterCondition="@ListSearchFilterCondition.Contains"
|
||||||
ListRenderMode="ListRenderMode.Virtual"
|
ListRenderMode="ListRenderMode.Virtual"
|
||||||
TextFieldName="Name"
|
TextFieldName="Name"
|
||||||
CssClass="form-field">
|
CssClass="form-field"
|
||||||
|
SizeMode="SizeMode.Small">
|
||||||
</DxComboBox>
|
</DxComboBox>
|
||||||
|
|
||||||
<div class="row py-3">
|
<div class="row py-3">
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h6 class="mb-0"> <a href="/user/transfers">All transfers</a> </h6>
|
<h6 class="mb-0"> <a href="/user/transfers/@productId">All transfers</a> </h6>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
@using TIAMSharedUI.Shared.Components.BaseComponents
|
@using TIAMSharedUI.Shared.Components.BaseComponents
|
||||||
@inherits BasePageComponent
|
@inherits BasePageComponent
|
||||||
|
|
||||||
@layout AdminLayout
|
@* @layout AdminLayout *@
|
||||||
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
||||||
@inject IStringLocalizer<TIAMResources> localizer
|
@inject IStringLocalizer<TIAMResources> localizer
|
||||||
@inject IWizardProcessor wizardProcessor
|
@inject IWizardProcessor wizardProcessor
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
</DxTabPage>
|
</DxTabPage>
|
||||||
|
|
||||||
<DxTabPage Text="Profiles">
|
<DxTabPage Text="Profiles">
|
||||||
<DxAccordion ExpandMode="ExpandMode"
|
<DxAccordion SizeMode="@SizeMode.Small" ExpandMode="ExpandMode"
|
||||||
ExpandCollapseAction="ExpandCollapseAction"
|
ExpandCollapseAction="ExpandCollapseAction"
|
||||||
AnimationType="LayoutAnimationType.Slide">
|
AnimationType="LayoutAnimationType.Slide">
|
||||||
<Items>
|
<Items>
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
<DxTabs>
|
<DxTabs>
|
||||||
<DxTabPage Text="Cards">
|
<DxTabPage Text="Cards">
|
||||||
|
|
||||||
<DxAccordion ExpandMode="ExpandMode"
|
<DxAccordion SizeMode="@SizeMode.Small" ExpandMode="ExpandMode"
|
||||||
ExpandCollapseAction="ExpandCollapseAction"
|
ExpandCollapseAction="ExpandCollapseAction"
|
||||||
AnimationType="LayoutAnimationType.Slide">
|
AnimationType="LayoutAnimationType.Slide">
|
||||||
<Items>
|
<Items>
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
@inject AdminSignalRClient AdminSignalRClient
|
@inject AdminSignalRClient AdminSignalRClient
|
||||||
|
|
||||||
|
|
||||||
<CarGrid Logger="_logger"
|
<CarGrid SizeMode="SizeMode.Small" Logger="_logger"
|
||||||
GetAllMessageTag="GetAllTag"
|
GetAllMessageTag="GetAllTag"
|
||||||
ContextIds="@(ContextId.IsNullOrEmpty() ? null : [ContextId])"
|
ContextIds="@(ContextId.IsNullOrEmpty() ? null : [ContextId])"
|
||||||
SignalRClient="AdminSignalRClient"
|
SignalRClient="AdminSignalRClient"
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
@using TIAM.Entities.Emails
|
@using TIAM.Entities.Emails
|
||||||
@using TIAMSharedUI.Shared.Components.BaseComponents
|
@using TIAMSharedUI.Shared.Components.BaseComponents
|
||||||
@inherits UserBasePageComponent
|
@inherits UserBasePageComponent
|
||||||
@layout AdminLayout
|
@* @layout AdminLayout *@
|
||||||
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
||||||
@inject IStringLocalizer<TIAMResources> localizer
|
@inject IStringLocalizer<TIAMResources> localizer
|
||||||
@inject IWizardProcessor wizardProcessor
|
@inject IWizardProcessor wizardProcessor
|
||||||
|
|
@ -36,8 +36,8 @@
|
||||||
<PageTitle>Transfers</PageTitle>
|
<PageTitle>Transfers</PageTitle>
|
||||||
|
|
||||||
<div class="text-center m-5">
|
<div class="text-center m-5">
|
||||||
<h1>Tasks</h1>
|
<h1>Your orders</h1>
|
||||||
<h2 style="font-size:small">Manage your tasks here!</h2>
|
<h2 style="font-size:small">Manage your orders here!</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -73,95 +73,108 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<DxTabs>
|
<DxTabs CssClass="no-padding">
|
||||||
<DxTabPage Text="Upcoming">
|
<DxTabPage Text="Upcoming">
|
||||||
<DxAccordion ExpandMode="ExpandMode"
|
<DxAccordion CssClass="no-padding" SizeMode="@SizeMode.Small" ExpandMode="ExpandMode"
|
||||||
ExpandCollapseAction="ExpandCollapseAction"
|
ExpandCollapseAction="ExpandCollapseAction"
|
||||||
AnimationType="LayoutAnimationType.Slide">
|
AnimationType="LayoutAnimationType.Slide">
|
||||||
<Items>
|
<Items>
|
||||||
@foreach (var (transfer, i) in Upcoming)
|
@foreach (var (transfer, i) in Upcoming)
|
||||||
{
|
{
|
||||||
|
|
||||||
<DxAccordionItem CssClass="@GetCustomColor(transfer.TransferStatusType)" Text=@($"{transfer.Appointment} - {transfer.FromAddress}") Expanded=@(i == 0)>
|
<DxAccordionItem IconCssClass="@GetCustomColor(transfer.TransferStatusType)" Expanded=@(i == 0)>
|
||||||
<ContentTemplate>
|
<HeaderTextTemplate>
|
||||||
<div class="py-3 px-3">
|
<div style="flex-direction: column">
|
||||||
<TransferCardComponent DataChanged="RefreshComponent" Context="@transfer" />
|
<p class="no-padding no-margin">@($"[#{transfer.OrderId}] {transfer.Appointment}")</p>
|
||||||
</div>
|
<p class="text-muted no-padding no-margin">@($"{transfer.FromAddress}")</p>
|
||||||
</ContentTemplate>
|
</div>
|
||||||
</DxAccordionItem>
|
</HeaderTextTemplate>
|
||||||
}
|
<ContentTemplate>
|
||||||
</Items>
|
|
||||||
</DxAccordion>
|
|
||||||
</DxTabPage>
|
|
||||||
<DxTabPage Text="Unpaid">
|
|
||||||
<DxAccordion ExpandMode="ExpandMode"
|
|
||||||
ExpandCollapseAction="ExpandCollapseAction"
|
|
||||||
AnimationType="LayoutAnimationType.Slide">
|
|
||||||
<Items>
|
|
||||||
@foreach (var (transfer, i) in Problems)
|
|
||||||
{
|
|
||||||
|
|
||||||
<DxAccordionItem CssClass="@GetCustomColor(transfer.TransferStatusType)" Text=@($"{transfer.Appointment} - {transfer.FromAddress}") Expanded=@(i == 0)>
|
<TransferCardComponent DataChanged="RefreshComponent" Context="@transfer" />
|
||||||
<ContentTemplate>
|
|
||||||
<div class="py-3 px-3">
|
</ContentTemplate>
|
||||||
<TransferCardComponent DataChanged="RefreshComponent" Context="@transfer" />
|
</DxAccordionItem>
|
||||||
</div>
|
}
|
||||||
</ContentTemplate>
|
</Items>
|
||||||
</DxAccordionItem>
|
</DxAccordion>
|
||||||
}
|
</DxTabPage>
|
||||||
</Items>
|
<DxTabPage Text="Unpaid">
|
||||||
</DxAccordion>
|
<DxAccordion CssClass="no-padding" SizeMode="@SizeMode.Small" ExpandMode="ExpandMode"
|
||||||
</DxTabPage>
|
ExpandCollapseAction="ExpandCollapseAction"
|
||||||
|
AnimationType="LayoutAnimationType.Slide">
|
||||||
|
<Items>
|
||||||
|
@foreach (var (transfer, i) in Problems)
|
||||||
|
{
|
||||||
|
|
||||||
|
<DxAccordionItem IconCssClass="@GetCustomColor(transfer.TransferStatusType)" Expanded=@(i == 0)>
|
||||||
|
<HeaderTextTemplate>
|
||||||
|
<div style="flex-direction: column">
|
||||||
|
<p class="no-padding no-margin">@($"[#{transfer.OrderId}] {transfer.Appointment}")</p>
|
||||||
|
<p class="text-muted no-padding no-margin">@($"{transfer.FromAddress}")</p>
|
||||||
|
</div>
|
||||||
|
</HeaderTextTemplate>
|
||||||
|
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<TransferCardComponent DataChanged="RefreshComponent" Context="@transfer" />
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</DxAccordionItem>
|
||||||
|
}
|
||||||
|
</Items>
|
||||||
|
</DxAccordion>
|
||||||
|
</DxTabPage>
|
||||||
|
|
||||||
|
|
||||||
<DxTabPage Text="Calendar">
|
<DxTabPage Text="Calendar">
|
||||||
<div class="d-flex flex-column mb-4 pb-2">
|
<div class="d-flex flex-column mb-4 pb-2">
|
||||||
<DxScheduler @bind-StartDate="@StartDate"
|
<DxScheduler @bind-StartDate="@StartDate"
|
||||||
DataStorage="@_dataStorage"
|
DataStorage="@_dataStorage"
|
||||||
CssClass="w-100">
|
CssClass="w-100">
|
||||||
<DxSchedulerTimelineView Duration="@TimeSpan.FromHours(48)" CellMinWidth="80">
|
<DxSchedulerTimelineView Duration="@TimeSpan.FromHours(48)" CellMinWidth="80">
|
||||||
<Scales>
|
<Scales>
|
||||||
<DxSchedulerTimeScale Unit="@SchedulerTimeScaleUnit.Day" UnitCount="1"></DxSchedulerTimeScale>
|
<DxSchedulerTimeScale Unit="@SchedulerTimeScaleUnit.Day" UnitCount="1"></DxSchedulerTimeScale>
|
||||||
<DxSchedulerTimeScale Unit="@SchedulerTimeScaleUnit.Hour" UnitCount="2"></DxSchedulerTimeScale>
|
<DxSchedulerTimeScale Unit="@SchedulerTimeScaleUnit.Hour" UnitCount="2"></DxSchedulerTimeScale>
|
||||||
</Scales>
|
</Scales>
|
||||||
</DxSchedulerTimelineView>
|
</DxSchedulerTimelineView>
|
||||||
<DxSchedulerWeekView ShowWorkTimeOnly="false"></DxSchedulerWeekView>
|
<DxSchedulerWeekView ShowWorkTimeOnly="false"></DxSchedulerWeekView>
|
||||||
<DxSchedulerDayView DayCount="1" ShowWorkTimeOnly="false"></DxSchedulerDayView>
|
<DxSchedulerDayView DayCount="1" ShowWorkTimeOnly="false"></DxSchedulerDayView>
|
||||||
</DxScheduler>
|
</DxScheduler>
|
||||||
</div>
|
</div>
|
||||||
</DxTabPage>
|
</DxTabPage>
|
||||||
|
|
||||||
<DxTabPage Text="History">
|
<DxTabPage Text="History">
|
||||||
<div class="d-flex flex-column mb-4 pb-2">
|
<div class="d-flex flex-column mb-4 pb-2">
|
||||||
|
|
||||||
<TransferDetailGrid @ref="_gridTransfer"
|
<TransferDetailGrid @ref="_gridTransfer"
|
||||||
Logger="_logger"
|
Logger="_logger"
|
||||||
GetAllMessageTag="SignalRTags.GetTransfersByUserProductMappingId"
|
GetAllMessageTag="SignalRTags.GetTransfersByUserProductMappingId"
|
||||||
SignalRClient="AdminSignalRClient"
|
SignalRClient="AdminSignalRClient"
|
||||||
ContextIds="new object[] {userId}"
|
ContextIds="new object[] {userId}"
|
||||||
CustomizeElement="Grid_CustomizeElement"
|
CustomizeElement="Grid_CustomizeElement"
|
||||||
ShowGroupPanel="true"
|
ShowGroupPanel="true"
|
||||||
CustomGroup="Grid_CustomGroup"
|
CustomGroup="Grid_CustomGroup"
|
||||||
CustomizeGroupValueDisplayText="Grid_CustomizeGroupValueDisplayText"
|
CustomizeGroupValueDisplayText="Grid_CustomizeGroupValueDisplayText"
|
||||||
ColumnResizeMode="GridColumnResizeMode.NextColumn"
|
ColumnResizeMode="GridColumnResizeMode.NextColumn"
|
||||||
AllowSelectRowByClick="false"
|
AllowSelectRowByClick="false"
|
||||||
PageSize="13"
|
PageSize="13"
|
||||||
ShowFilterRow="true">
|
ShowFilterRow="true">
|
||||||
|
|
||||||
<Columns>
|
<Columns>
|
||||||
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
|
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
|
||||||
<DxGridDataColumn FieldName="Appointment" SortOrder="GridColumnSortOrder.Descending" GroupIndex="0" GroupInterval="GridColumnGroupInterval.Custom" DisplayFormat="g" Width="125" />
|
<DxGridDataColumn FieldName="Appointment" SortOrder="GridColumnSortOrder.Descending" GroupIndex="0" GroupInterval="GridColumnGroupInterval.Custom" DisplayFormat="g" Width="125" />
|
||||||
<DxGridDataColumn FieldName="OrderId" Caption="Order" SortIndex="1" SortOrder="GridColumnSortOrder.Descending" Width="70" />
|
<DxGridDataColumn FieldName="OrderId" Caption="Order" SortIndex="1" SortOrder="GridColumnSortOrder.Descending" Width="70" />
|
||||||
<DxGridDataColumn FieldName="FromAddress" />
|
<DxGridDataColumn FieldName="FromAddress" />
|
||||||
<DxGridDataColumn FieldName="ToAddress" />
|
<DxGridDataColumn FieldName="ToAddress" />
|
||||||
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="125" Visible="false" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="125" Visible="false" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
|
|
||||||
</TransferDetailGrid>
|
</TransferDetailGrid>
|
||||||
</div>
|
</div>
|
||||||
</DxTabPage>
|
</DxTabPage>
|
||||||
|
|
||||||
</DxTabs>
|
</DxTabs>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -365,19 +378,19 @@
|
||||||
switch (transferStatusByte)
|
switch (transferStatusByte)
|
||||||
{
|
{
|
||||||
case 5:
|
case 5:
|
||||||
return "bg-important";
|
return "text-danger fa-solid fa-triangle-exclamation";
|
||||||
|
|
||||||
case > 5 and < 35:
|
case > 5 and < 35:
|
||||||
return "bg-attention";
|
return "text-warning fa-solid fa-triangle-exclamation";
|
||||||
|
|
||||||
case 35:
|
case 35:
|
||||||
return "bg-finished";
|
return "text-success fa-solid fa-circle-check";
|
||||||
|
|
||||||
case > 35:
|
case > 35:
|
||||||
return "bg-cancel";
|
return "text-muted fa-solid fa-circle-xmark";
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return "";
|
return "text-primary";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,36 +19,37 @@
|
||||||
@inject GooglePlacesService GooglePlacesService
|
@inject GooglePlacesService GooglePlacesService
|
||||||
|
|
||||||
|
|
||||||
<DxTabs CssClass="bg-light">
|
<DxTabs SizeMode="SizeMode.Small" CssClass="bg-light">
|
||||||
<DxTabPage Text="Preset addresses">
|
<DxTabPage Text="Preset addresses">
|
||||||
|
|
||||||
|
|
||||||
<DxComboBox Data="@Data"
|
<DxComboBox Data="@Data"
|
||||||
CssClass="p-3"
|
CssClass="p-3"
|
||||||
InputCssClass="@CssClass"
|
InputCssClass="@CssClass"
|
||||||
@bind-Value="@SelectedDestination"
|
@bind-Value="@SelectedDestination"
|
||||||
SearchMode="@ListSearchMode.AutoSearch"
|
SearchMode="@ListSearchMode.AutoSearch"
|
||||||
SearchFilterCondition="@ListSearchFilterCondition.Contains"
|
SearchFilterCondition="@ListSearchFilterCondition.Contains"
|
||||||
ListRenderMode="ListRenderMode.Virtual"
|
ListRenderMode="ListRenderMode.Virtual"
|
||||||
TextFieldName="@nameof(TransferDestination.Name)"
|
TextFieldName="@nameof(TransferDestination.Name)"
|
||||||
InputId="cbOverview" />
|
InputId="cbOverview"
|
||||||
|
SizeMode="SizeMode.Small" />
|
||||||
|
|
||||||
|
|
||||||
</DxTabPage>
|
</DxTabPage>
|
||||||
<DxTabPage Text="Custom address">
|
<DxTabPage Text="Custom address">
|
||||||
|
|
||||||
<AddressSearchAndSelectComponent AddressChanged="@OnSelectedAddressChanged" CssClass="@CssClass">
|
<AddressSearchAndSelectComponent AddressChanged="@OnSelectedAddressChanged" CssClass="@CssClass">
|
||||||
|
|
||||||
</AddressSearchAndSelectComponent>
|
</AddressSearchAndSelectComponent>
|
||||||
@* <DxFormLayoutItem Caption="Type a custom address">
|
@* <DxFormLayoutItem Caption="Type a custom address">
|
||||||
<DxTextBox @bind-Text="Address" />
|
<DxTextBox @bind-Text="Address" />
|
||||||
</DxFormLayoutItem>
|
</DxFormLayoutItem>
|
||||||
<DxFormLayoutItem>
|
<DxFormLayoutItem>
|
||||||
<DxButton Context="ButtonContext" Click="ValidateAddress">Validate Address</DxButton>
|
<DxButton Context="ButtonContext" Click="ValidateAddress">Validate Address</DxButton>
|
||||||
</DxFormLayoutItem>
|
</DxFormLayoutItem>
|
||||||
<DxFormLayoutItem>
|
<DxFormLayoutItem>
|
||||||
<p>@ValidationMessage</p>
|
<p>@ValidationMessage</p>
|
||||||
</DxFormLayoutItem> *@
|
</DxFormLayoutItem> *@
|
||||||
|
|
||||||
</DxTabPage>
|
</DxTabPage>
|
||||||
</DxTabs>
|
</DxTabs>
|
||||||
|
|
|
||||||
|
|
@ -18,158 +18,131 @@
|
||||||
<div class="@NavMenuCssClass navbar-collapse" id="navbarSupportedContent">
|
<div class="@NavMenuCssClass navbar-collapse" id="navbarSupportedContent">
|
||||||
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<!--NavLink class="nav-link" href="" Match="NavLinkMatch.All"-->
|
|
||||||
<NavLink class="nav-link" href="/">
|
<NavLink class="nav-link" href="/">
|
||||||
<!--span class="oi oi-home" aria-hidden="true"></span-->
|
|
||||||
@localizer.GetString("NavMenu.Home")
|
@localizer.GetString("NavMenu.Home")
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<NavLink class="nav-link" href="transfer">
|
||||||
|
@localizer.GetString("NavMenu.Transfer")
|
||||||
|
</NavLink>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
@if (isSysAdmin)
|
||||||
|
{
|
||||||
@{
|
<li class="nav-item">
|
||||||
if(enableTransfer)
|
<NavLink class="nav-link" href="swagger">
|
||||||
{
|
API
|
||||||
<li class="nav-item">
|
</NavLink>
|
||||||
<NavLink class="nav-link" href="transfer">
|
</li>
|
||||||
@localizer.GetString("NavMenu.Transfer")
|
<li class="nav-item">
|
||||||
</NavLink>
|
<NavLink class="nav-link" href="chat">
|
||||||
</li>
|
Chat
|
||||||
<li class="nav-item">
|
</NavLink>
|
||||||
<NavLink class="nav-link" href="formulaone">
|
</li>
|
||||||
@localizer.GetString("NavMenu.FormulaOne")
|
<li class="nav-item">
|
||||||
</NavLink>
|
<NavLink class="nav-link" href="events">
|
||||||
</li>
|
@localizer.GetString("NavMenu.Events")
|
||||||
}
|
</NavLink>
|
||||||
|
</li>
|
||||||
if (sessionService.IsSysAdmin)
|
|
||||||
{
|
|
||||||
<li class="nav-item">
|
|
||||||
<NavLink class="nav-link" href="swagger">
|
|
||||||
API
|
|
||||||
</NavLink>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<NavLink class="nav-link" href="chat">
|
|
||||||
Chat
|
|
||||||
</NavLink>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<NavLink class="nav-link" href="events">
|
|
||||||
@localizer.GetString("NavMenu.Events")
|
|
||||||
</NavLink>
|
|
||||||
</li>
|
|
||||||
}
|
|
||||||
|
|
||||||
if(enableLanguage)
|
|
||||||
{
|
|
||||||
|
|
||||||
<li class="nav-item dropdown">
|
|
||||||
<NavLink class="nav-link" href="settings">
|
|
||||||
@localizer.GetString("NavMenu.Settings")
|
|
||||||
</NavLink>
|
|
||||||
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
|
|
||||||
<li><a class="dropdown-item" href="#">Action</a></li>
|
|
||||||
<li><a class="dropdown-item" href="#">Another action</a></li>
|
|
||||||
<li><hr class="dropdown-divider"></li>
|
|
||||||
<li><a class="dropdown-item" href="#">Something else here</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<NavLink class="nav-link" href="about">
|
<NavLink class="nav-link" href="about">
|
||||||
@localizer.GetString("NavMenu.About")
|
@localizer.GetString("NavMenu.About")
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
@* <AuthorizeView>
|
@if (enableLogin)
|
||||||
<Authorized>
|
{
|
||||||
@if(hasProperty)
|
<AuthorizeView>
|
||||||
{
|
<NotAuthorized>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<NavLink class="nav-link" href="user/admin">
|
<NavLink class="nav-link" href="login">
|
||||||
Admin
|
@localizer.GetString("NavMenu.Login")
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</li>
|
</li>
|
||||||
|
</NotAuthorized>
|
||||||
|
|
||||||
|
<Authorized>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<NavLink class="nav-link" href="user/messages">
|
@{
|
||||||
Messages
|
string url3 = $"user/messages/{userId}";
|
||||||
</NavLink>
|
<NavLink class="nav-link" href="@url3">
|
||||||
|
<i class="fa-solid fa-envelope"></i>
|
||||||
|
</NavLink>
|
||||||
|
}
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
}
|
<!-- User Icon with Dropdown Menu -->
|
||||||
</Authorized>
|
<li class="nav-item dropdown">
|
||||||
</AuthorizeView> *@
|
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
@if(enableLogin)
|
<i class="fa-solid fa-user"></i>
|
||||||
{
|
</a>
|
||||||
if (!myUser && enableLogin)
|
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="userDropdown">
|
||||||
|
<div class="w-100 user-profile p-3">
|
||||||
|
<div class="flex-column align-items-center justify-content-center">
|
||||||
|
<div class="logo-container d-flex align-items-center justify-content-center">
|
||||||
|
<div class="menu-icon-large">
|
||||||
|
<i class="fa-solid fa-user"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="user-name-container bm-3 mb-2">
|
||||||
|
<div class="tm-8 text-center">@userEmail</div>
|
||||||
|
<div class="text-center">@userFullName</div>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex justify-content-center p-1">
|
||||||
|
<DxButton Text="Manage account" RenderStyle="@ButtonRenderStyle.Secondary" Click="NavToAcc"></DxButton>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex justify-content-center p-1">
|
||||||
|
<DxButton Text="My transfers" RenderStyle="@ButtonRenderStyle.Secondary" Click="NavToTransfers"></DxButton>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex justify-content-center p-1">
|
||||||
|
<DxButton Text="@localizer.GetString("NavMenu.SignOut")" RenderStyle="@ButtonRenderStyle.Secondary" Click="SignOut"></DxButton>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@if (hasProperty || isSysAdmin || isDevAdmin)
|
||||||
|
{
|
||||||
|
<li class="nav-item">
|
||||||
|
<NavLink class="nav-link" href="user/admin">
|
||||||
|
@localizer.GetString("NavMenu.Admin")
|
||||||
|
</NavLink>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Authorized>
|
||||||
|
|
||||||
|
</AuthorizeView>
|
||||||
|
|
||||||
|
@if (enableLanguage)
|
||||||
{
|
{
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<NavLink class="nav-link" href="login">
|
<NavLink class="nav-link" href="settings">
|
||||||
@localizer.GetString("NavMenu.Login")
|
<i class="fa-solid fa-gear"></i>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
@if (true || hasProperty)
|
|
||||||
{
|
|
||||||
<li class="nav-item">
|
|
||||||
<NavLink class="nav-link" href="user/admin">
|
|
||||||
@localizer.GetString("NavMenu.Admin")
|
|
||||||
|
|
||||||
</NavLink>
|
|
||||||
</li>
|
|
||||||
}
|
|
||||||
<li class="nav-item">
|
|
||||||
<div class="btn-nav">
|
|
||||||
<NavLink class="btn btn-primary btn-small navbar-btn" href="#" @onclick="SignOut" data-bs-target=".navbar-collapse.show">
|
|
||||||
@localizer.GetString("NavMenu.SignOut")
|
|
||||||
</NavLink>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
@* <script>
|
|
||||||
function toggleBootstrapNavMenu(isExpanded) {
|
|
||||||
var navMenu = document.getElementById('navbarNav');
|
|
||||||
if (navMenu) {
|
|
||||||
var collapse = new bootstrap.Collapse(navMenu, {
|
|
||||||
toggle: false
|
|
||||||
});
|
|
||||||
if (isExpanded) {
|
|
||||||
collapse.show();
|
|
||||||
console.log("Show");
|
|
||||||
} else {
|
|
||||||
collapse.hide();
|
|
||||||
console.log("Hide");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script> *@
|
|
||||||
|
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ using Microsoft.AspNetCore.Components.Authorization;
|
||||||
using Microsoft.JSInterop;
|
using Microsoft.JSInterop;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||||
using Microsoft.AspNetCore.Components.Routing;
|
using Microsoft.AspNetCore.Components.Routing;
|
||||||
|
using AyCode.Blazor.Components.Services;
|
||||||
|
|
||||||
|
|
||||||
namespace TIAMSharedUI.Shared.Components
|
namespace TIAMSharedUI.Shared.Components
|
||||||
|
|
@ -54,7 +55,7 @@ namespace TIAMSharedUI.Shared.Components
|
||||||
private bool enableLogin = true;
|
private bool enableLogin = true;
|
||||||
private bool enableEvents = false;
|
private bool enableEvents = false;
|
||||||
private bool enableTransfer = true;
|
private bool enableTransfer = true;
|
||||||
private bool enableLanguage = false;
|
private bool enableLanguage = true;
|
||||||
private bool enableApi = true;
|
private bool enableApi = true;
|
||||||
private bool enableChat = true;
|
private bool enableChat = true;
|
||||||
|
|
||||||
|
|
@ -62,6 +63,11 @@ namespace TIAMSharedUI.Shared.Components
|
||||||
private bool collapseNavMenu = true;
|
private bool collapseNavMenu = true;
|
||||||
private bool myUser = false;
|
private bool myUser = false;
|
||||||
private bool hasProperty = false;
|
private bool hasProperty = false;
|
||||||
|
private bool isSysAdmin = false;
|
||||||
|
private bool isDevAdmin = false;
|
||||||
|
private Guid? userId = null;
|
||||||
|
private string userEmail = "";
|
||||||
|
private string userFullName = "";
|
||||||
|
|
||||||
private ILogger _logger;
|
private ILogger _logger;
|
||||||
|
|
||||||
|
|
@ -129,6 +135,18 @@ namespace TIAMSharedUI.Shared.Components
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void NavToAcc()
|
||||||
|
{
|
||||||
|
var url = $"user/account/{userId}";
|
||||||
|
navigationManager.NavigateTo(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void NavToTransfers()
|
||||||
|
{
|
||||||
|
var url = $"user/transfers/{userId}";
|
||||||
|
navigationManager.NavigateTo(url);
|
||||||
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
// Unsubscribe from the event when the component is disposed
|
// Unsubscribe from the event when the component is disposed
|
||||||
|
|
@ -140,6 +158,12 @@ namespace TIAMSharedUI.Shared.Components
|
||||||
if (sessionService.User != null)
|
if (sessionService.User != null)
|
||||||
{
|
{
|
||||||
myUser = true;
|
myUser = true;
|
||||||
|
userId = sessionService.User.UserId;
|
||||||
|
userEmail = sessionService.User.Email;
|
||||||
|
if (sessionService.User.UserModelDto.ProfileDto.FullName != null)
|
||||||
|
{
|
||||||
|
userFullName = sessionService.User.UserModelDto.ProfileDto.FullName!;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -152,8 +176,10 @@ namespace TIAMSharedUI.Shared.Components
|
||||||
if (properties == null)
|
if (properties == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
hasProperty = properties.Count > 0;
|
|
||||||
|
|
||||||
|
hasProperty = properties.Count > 0;
|
||||||
|
isSysAdmin = sessionService.IsSysAdmin;
|
||||||
|
isDevAdmin = sessionService.IsDevAdmin;
|
||||||
foreach (var property in properties)
|
foreach (var property in properties)
|
||||||
{
|
{
|
||||||
_logger.Detail($"First property: {property.Value} ");
|
_logger.Detail($"First property: {property.Value} ");
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,14 @@ select {
|
||||||
background-color: aliceblue;
|
background-color: aliceblue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.no-padding {
|
||||||
|
padding: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-margin {
|
||||||
|
margin: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.bg-red {
|
.bg-red {
|
||||||
background-color: #f7279f !important;
|
background-color: #f7279f !important;
|
||||||
}
|
}
|
||||||
|
|
@ -208,20 +216,20 @@ select {
|
||||||
}
|
}
|
||||||
|
|
||||||
.dxbl-tabs.dxbl-tabs-top {
|
.dxbl-tabs.dxbl-tabs-top {
|
||||||
--dxbl-tabs-bg: #ffffff45;
|
--dxbl-tabs-bg: #ffffff15;
|
||||||
background-color: #ffffff45;
|
background-color: #ffffff15;
|
||||||
/*box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
|
/*box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
|
||||||
backdrop-filter: blur( 6px );*/
|
backdrop-filter: blur( 6px );*/
|
||||||
-webkit-backdrop-filter: blur( 6px );
|
/*-webkit-backdrop-filter: blur( 6px );*/
|
||||||
/*border-radius: 10px;*/
|
/*border-radius: 10px;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.dxbl-modal > .dxbl-modal-root > .dxbl-popup > .dxbl-modal-content {
|
.dxbl-modal > .dxbl-modal-root > .dxbl-popup > .dxbl-modal-content {
|
||||||
background: rgba( 255, 255, 255, 0.45 );
|
background: rgba( 255, 255, 255, 1 );
|
||||||
box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
|
box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
|
||||||
backdrop-filter: blur( 6px );
|
backdrop-filter: blur( 6px );
|
||||||
-webkit-backdrop-filter: blur( 6px );
|
-webkit-backdrop-filter: blur( 6px );
|
||||||
border-radius: 10px;
|
border-radius: 0px;
|
||||||
border: 1px solid rgba( 255, 255, 255, 0.18 );
|
border: 1px solid rgba( 255, 255, 255, 0.18 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue