destinations grid
This commit is contained in:
parent
ef7ced8439
commit
326664bc6c
|
|
@ -70,6 +70,7 @@ namespace TIAM.Database.DataLayers.Admins
|
|||
#endregion Transfer
|
||||
|
||||
#region TransferDestination
|
||||
public List<TransferDestination>? GetTransferDestinations() => Session(ctx=>ctx.GetTransferDestinations().ToList());
|
||||
public TransferDestination? GetTransferDestinationById(Guid transferDestinationId) => Session(ctx=>ctx.GetTransferDestinationById(transferDestinationId));
|
||||
public Task<TransferDestination?> GetTransferDestinationByIdAsync(Guid transferDestinationId) => SessionAsync(ctx=>ctx.GetTransferDestinationById(transferDestinationId));
|
||||
public string? GetTransferDestinationJsonById(Guid transferDestinationId) => Session(ctx => ctx.GetTransferDestinationById(transferDestinationId)?.ToJson());
|
||||
|
|
|
|||
|
|
@ -41,12 +41,14 @@
|
|||
}
|
||||
</CellDisplayTemplate>
|
||||
</DxGridDataColumn>
|
||||
<DxGridDataColumn FieldName="Description" FixedPosition="GridColumnFixedPosition.Left" MinWidth="80" Width="20%" />
|
||||
<DxGridDataColumn FieldName="AddressString" MinWidth="80" Width="20%" />
|
||||
<DxGridDataColumn FieldName="PriceType" MinWidth="80" Width="20%" />
|
||||
<DxGridDataColumn FieldName="Name" FixedPosition="GridColumnFixedPosition.Left" MinWidth="80" Width="20%" />
|
||||
<DxGridDataColumn FieldName="Description" MinWidth="80" Width="20%" />
|
||||
<DxGridDataColumn FieldName="AddressString" MinWidth="80" Width="20%" />
|
||||
<DxGridDataColumn FieldName="Price" MinWidth="80" />
|
||||
<DxGridDataColumn FieldName="Price2" MinWidth="80" />
|
||||
<DxGridDataColumn FieldName="Price3" MinWidth="80" />
|
||||
<DxGridDataColumn FieldName="ProductCommis" MinWidth="80" />
|
||||
<DxGridDataColumn FieldName="ExtraPrice" MinWidth="80" />
|
||||
|
||||
|
||||
</Columns>
|
||||
|
|
@ -64,13 +66,22 @@
|
|||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.DestinationAddress) ColSpanMd="6">
|
||||
@EditFormContext.GetEditor("AddressString")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.Price) ColSpanMd="6">
|
||||
@EditFormContext.GetEditor("PriceType")
|
||||
</DxFormLayoutItem>
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.Price) ColSpanMd="6">
|
||||
@EditFormContext.GetEditor("Price")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.Price) ColSpanMd="6">
|
||||
@EditFormContext.GetEditor("Price2")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.Price) ColSpanMd="6">
|
||||
@EditFormContext.GetEditor("Price3")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.Price) ColSpanMd="6">
|
||||
@EditFormContext.GetEditor("ProductCommis")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.Price) ColSpanMd="6">
|
||||
@EditFormContext.GetEditor("ExtraPrice")
|
||||
</DxFormLayoutItem>
|
||||
|
||||
</DxFormLayout>
|
||||
</EditFormTemplate>
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@
|
|||
[Parameter] public bool KeyboardNavigationEnabled { get; set; }
|
||||
[Parameter] public GridDetailExpandButtonDisplayMode DetailExpandButtonDisplayMode { get; set; } = GridDetailExpandButtonDisplayMode.Never;
|
||||
[Parameter] public Guid? ContextId { get; set; }
|
||||
[Parameter] public Guid[]? ContextIds { get; set; } = new Guid[1];
|
||||
[Parameter] public Guid[]? ContextIds { get; set; } = new Guid[0];
|
||||
[Parameter] public int GetAllTag { get; set; }
|
||||
|
||||
private LoggerClient<TransferDestinationToProductGridComponent> _logger = null!;
|
||||
|
|
@ -98,6 +98,7 @@
|
|||
{
|
||||
if(ContextId.HasValue)
|
||||
{
|
||||
ContextIds = new Guid[1];
|
||||
ContextIds[0] = (Guid)ContextId!;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@
|
|||
[Parameter] public GridDetailExpandButtonDisplayMode DetailExpandButtonDisplayMode { get; set; } = GridDetailExpandButtonDisplayMode.Never;
|
||||
[Parameter] public Guid? ContextId { get; set; }
|
||||
|
||||
private Guid[] ContextIds = new Guid[0];
|
||||
private LoggerClient<TransferDestinationToProductGridComponent> _logger = null!;
|
||||
|
||||
protected override void OnInitialized()
|
||||
|
|
@ -84,6 +85,7 @@
|
|||
{
|
||||
if(ContextId.HasValue)
|
||||
{
|
||||
ContextIds = new Guid[1];
|
||||
ContextIds[0] = (Guid)ContextId!;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
using Microsoft.AspNetCore.Components;
|
||||
using TIAM.Entities.Profiles;
|
||||
using TIAM.Entities.Transfers;
|
||||
using TIAM.Services;
|
||||
|
||||
|
||||
namespace TIAMSharedUI.Shared.Components.Grids;
|
||||
|
||||
public class TransferDestinationGrid : TiamGrid<Profile>
|
||||
public class TransferDestinationGrid : TiamGrid<TransferDestination>
|
||||
{
|
||||
public TransferDestinationGrid() : base()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
<DxMenuItem NavigateUrl="sysadmin/userproductmappings" Text="Permissions" />
|
||||
<DxMenuItem NavigateUrl="sysadmin/users" Text="Users" />
|
||||
<DxMenuItem NavigateUrl="user/destinations" Text="Destinations" />
|
||||
</Items>
|
||||
</DxMenuItem>
|
||||
<DxMenuItem Text="HotelAdmin" IconCssClass="menu-icon-support menu-icon">
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ using TIAMWebApp.Server.Services;
|
|||
using TIAMWebApp.Shared.Application.Models.ClientSide;
|
||||
using AyCode.Core.Extensions;
|
||||
using TIAM.Entities.Users;
|
||||
using TIAMSharedUI.Shared.Components.Grids;
|
||||
|
||||
namespace TIAMWebApp.Server.Controllers
|
||||
{
|
||||
|
|
@ -48,9 +49,10 @@ namespace TIAMWebApp.Server.Controllers
|
|||
[AllowAnonymous]
|
||||
[HttpGet]
|
||||
[Route(APIUrls.GetTransferDestinationsRouteName)]
|
||||
public async Task<IEnumerable<TransferDestination>> GetTransferDestinations()
|
||||
[SignalR(SignalRTags.GetAllTransferDestinations)]
|
||||
public List<TransferDestination> GetTransferDestinations()
|
||||
{
|
||||
return await _adminDal.Context.TransferDestinations.ToListAsync();
|
||||
return _adminDal.GetTransferDestinations();
|
||||
}
|
||||
|
||||
//[Authorize]
|
||||
|
|
|
|||
Loading…
Reference in New Issue