sdhkggfhdsg ghdg js hdk
This commit is contained in:
parent
8d8487d727
commit
125ee917a0
|
|
@ -19,8 +19,8 @@
|
||||||
<PageTitle>User permissions</PageTitle>
|
<PageTitle>User permissions</PageTitle>
|
||||||
|
|
||||||
<div class="text-center m-5">
|
<div class="text-center m-5">
|
||||||
<h1>User permissions</h1>
|
<h1>Partner prices</h1>
|
||||||
<h2 style="font-size:small">Manage transfers here!</h2>
|
<h2 style="font-size:small">Set partner prices here!</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -30,14 +30,9 @@
|
||||||
<Animation Effect="@Effect.FadeInUp" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
|
<Animation Effect="@Effect.FadeInUp" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="d-flex flex-column mb-4 pb-2">
|
<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>
|
|
||||||
|
|
||||||
<TransferDestinationToProductGridComponent DetailExpandButtonDisplayMode="GridDetailExpandButtonDisplayMode.Auto"></TransferDestinationToProductGridComponent>
|
|
||||||
|
<TransferDestinationToProductGridComponent GetAllTag="SignalRTags.GetAllTransferDestinationToProducts" DetailExpandButtonDisplayMode="GridDetailExpandButtonDisplayMode.Auto"></TransferDestinationToProductGridComponent>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -58,18 +53,8 @@
|
||||||
|
|
||||||
bool PopupVisible { get; set; }
|
bool PopupVisible { get; set; }
|
||||||
|
|
||||||
IGrid Grid { get; set; }
|
|
||||||
//object? MasterGridData { get; set; }
|
|
||||||
bool AutoCollapseDetailRow { get; set; }
|
|
||||||
|
|
||||||
public List<string> IgnoreList =
|
bool AutoCollapseDetailRow { get; set; }
|
||||||
[
|
|
||||||
"ReceiverEmailAddress",
|
|
||||||
"ReceiverId",
|
|
||||||
"SenderEmailAddress",
|
|
||||||
"SenderId",
|
|
||||||
"ContextId"
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -160,9 +145,5 @@
|
||||||
base.OnInitialized();
|
base.OnInitialized();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColumnChooserButton_Click()
|
|
||||||
{
|
|
||||||
Grid.ShowColumnChooser();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
<DxTabs>
|
<DxTabs>
|
||||||
<DxTabPage Text="Partner">
|
<DxTabPage Text="Partner">
|
||||||
|
<ProductDetailGridComponent DetailExpandButtonDisplayMode="GridDetailExpandButtonDisplayMode.Auto" GetAllTag="SignalRTags.GetProductsById" ContextId="((TransferDestinationToProduct)context.DataItem).ProductId" ParentData="(Company)context.DataItem" KeyboardNavigationEnabled="true" />
|
||||||
</DxTabPage>
|
</DxTabPage>
|
||||||
|
|
||||||
</DxTabs>
|
</DxTabs>
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
@using TIAM.Entities.Drivers
|
@using TIAM.Entities.Drivers
|
||||||
@using TIAM.Entities.Users
|
@using TIAM.Entities.Users
|
||||||
@using TIAM.Models.Dtos.Users
|
@using TIAM.Models.Dtos.Users
|
||||||
|
@using TIAM.Services
|
||||||
@using TIAMWebApp.Shared.Application.Interfaces
|
@using TIAMWebApp.Shared.Application.Interfaces
|
||||||
@using TIAMWebApp.Shared.Application.Services
|
@using TIAMWebApp.Shared.Application.Services
|
||||||
@using TIAMWebApp.Shared.Application.Utility
|
@using TIAMWebApp.Shared.Application.Utility
|
||||||
|
|
@ -19,6 +20,7 @@
|
||||||
<TransferDestinationToProductGrid
|
<TransferDestinationToProductGrid
|
||||||
Logger="_logger"
|
Logger="_logger"
|
||||||
SignalRClient="AdminSignalRClient"
|
SignalRClient="AdminSignalRClient"
|
||||||
|
GetAllMessageTag="GetAllTag"
|
||||||
ContextIds="@(ContextId.IsNullOrEmpty() ? throw new InvalidDataException($"ContextId.IsNullOrEmpty(); ContextId: {ContextId}") : [ContextId.Value])"
|
ContextIds="@(ContextId.IsNullOrEmpty() ? throw new InvalidDataException($"ContextId.IsNullOrEmpty(); ContextId: {ContextId}") : [ContextId.Value])"
|
||||||
PageSize="10"
|
PageSize="10"
|
||||||
KeyboardNavigationEnabled="KeyboardNavigationEnabled"
|
KeyboardNavigationEnabled="KeyboardNavigationEnabled"
|
||||||
|
|
@ -39,7 +41,7 @@
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
<DxTabs>
|
<DxTabs>
|
||||||
<DxTabPage Text="Partner">
|
<DxTabPage Text="Partner">
|
||||||
|
<ProductDetailGridComponent DetailExpandButtonDisplayMode="GridDetailExpandButtonDisplayMode.Auto" GetAllTag="SignalRTags.GetProductsById" ContextId="((TransferDestinationToProduct)context.DataItem).ProductId" ParentData="(Company)context.DataItem" KeyboardNavigationEnabled="true" />
|
||||||
</DxTabPage>
|
</DxTabPage>
|
||||||
</DxTabs>
|
</DxTabs>
|
||||||
</DetailRowTemplate>
|
</DetailRowTemplate>
|
||||||
|
|
@ -70,6 +72,7 @@
|
||||||
[Parameter] public bool KeyboardNavigationEnabled { get; set; }
|
[Parameter] public bool KeyboardNavigationEnabled { get; set; }
|
||||||
[Parameter] public GridDetailExpandButtonDisplayMode DetailExpandButtonDisplayMode { get; set; } = GridDetailExpandButtonDisplayMode.Never;
|
[Parameter] public GridDetailExpandButtonDisplayMode DetailExpandButtonDisplayMode { get; set; } = GridDetailExpandButtonDisplayMode.Never;
|
||||||
[Parameter] public Guid? ContextId { get; set; }
|
[Parameter] public Guid? ContextId { get; set; }
|
||||||
|
[Parameter] public int GetAllTag { get; set; }
|
||||||
|
|
||||||
private Guid[] ContextIds = new Guid[0];
|
private Guid[] ContextIds = new Guid[0];
|
||||||
private LoggerClient<TransferDestinationToProductGridComponent> _logger = null!;
|
private LoggerClient<TransferDestinationToProductGridComponent> _logger = null!;
|
||||||
|
|
@ -83,7 +86,7 @@
|
||||||
|
|
||||||
protected override void OnParametersSet()
|
protected override void OnParametersSet()
|
||||||
{
|
{
|
||||||
if(ContextId.HasValue)
|
if(ContextId != null)
|
||||||
{
|
{
|
||||||
ContextIds = new Guid[1];
|
ContextIds = new Guid[1];
|
||||||
ContextIds[0] = (Guid)ContextId!;
|
ContextIds[0] = (Guid)ContextId!;
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ using TIAMWebApp.Shared.Application.Models.ClientSide;
|
||||||
using AyCode.Core.Extensions;
|
using AyCode.Core.Extensions;
|
||||||
using TIAM.Entities.Users;
|
using TIAM.Entities.Users;
|
||||||
using TIAMSharedUI.Shared.Components.Grids;
|
using TIAMSharedUI.Shared.Components.Grids;
|
||||||
|
using AyCode.Core.Helpers;
|
||||||
|
|
||||||
namespace TIAMWebApp.Server.Controllers
|
namespace TIAMWebApp.Server.Controllers
|
||||||
{
|
{
|
||||||
|
|
@ -136,24 +137,6 @@ namespace TIAMWebApp.Server.Controllers
|
||||||
return result ? transferDestination : null;
|
return result ? transferDestination : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
[AllowAnonymous]
|
|
||||||
[HttpPost]
|
|
||||||
[Route(APIUrls.GetTransferDestinationToProductByProductIdRouteName)]
|
|
||||||
[SignalR(SignalRTags.GetTransferDestinationToProductByProductId)]
|
|
||||||
public List<TransferDestinationToProduct> GetTransferDestinationToProductByProductId(Guid productId)
|
|
||||||
{
|
|
||||||
if
|
|
||||||
return _adminDal.GetTransferDestinationToProductsByProductId(productId);
|
|
||||||
}
|
|
||||||
|
|
||||||
[AllowAnonymous]
|
|
||||||
[HttpPost]
|
|
||||||
[Route(APIUrls.GetTransferDestinationToProductByTransferDestinationId)]
|
|
||||||
[SignalR(SignalRTags.GetTransferDestinationToProductByTransferDestinationId)]
|
|
||||||
public List<TransferDestinationToProduct> GetTransferDestinationToProductByTransferDestinationId(Guid transferDestinationId)
|
|
||||||
{
|
|
||||||
return _adminDal.GetTransferDestinationToProductsByTransferDestinationId(transferDestinationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//[AllowAnonymous]
|
//[AllowAnonymous]
|
||||||
|
|
@ -277,27 +260,29 @@ namespace TIAMWebApp.Server.Controllers
|
||||||
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//[AllowAnonymous]
|
//TransferDestinationToProduct
|
||||||
//[HttpGet]
|
|
||||||
//[Route(APIUrls.GetTransferDestinationsRouteName)]
|
[AllowAnonymous]
|
||||||
|
[HttpGet]
|
||||||
|
[Route(APIUrls.GetAllTransferDestinationToProductsRouteName)]
|
||||||
[SignalR(SignalRTags.GetAllTransferDestinationToProducts)]
|
[SignalR(SignalRTags.GetAllTransferDestinationToProducts)]
|
||||||
public async Task<List<TransferDestinationToProduct>> GetAllTransferDestinationToProducts()
|
public async Task<List<TransferDestinationToProduct>> GetAllTransferDestinationToProducts()
|
||||||
{
|
{
|
||||||
return await _adminDal.GetTransferDestinationToProducts();
|
return await _adminDal.GetTransferDestinationToProducts();
|
||||||
}
|
}
|
||||||
|
|
||||||
//[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
//[HttpGet]
|
[HttpGet]
|
||||||
//[Route(APIUrls.GetTransferDestinationsRouteName)]
|
[Route(APIUrls.GetTransferDestinationToProductsByProductIdRouteName)]
|
||||||
[SignalR(SignalRTags.GetTransferDestinationToProductsByProductId)]
|
[SignalR(SignalRTags.GetTransferDestinationToProductsByProductId)]
|
||||||
public async Task<List<TransferDestinationToProduct>> GetTransferDestinationToProductsByProductId(Guid productId)
|
public async Task<List<TransferDestinationToProduct>> GetTransferDestinationToProductsByProductId(Guid productId)
|
||||||
{
|
{
|
||||||
return await _adminDal.GetTransferDestinationToProductsByProductId(productId);
|
return await _adminDal.GetTransferDestinationToProductsByProductId(productId);
|
||||||
}
|
}
|
||||||
|
|
||||||
//[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
//[HttpGet]
|
[HttpGet]
|
||||||
//[Route(APIUrls.GetTransferDestinationsRouteName)]
|
[Route(APIUrls.GetTransferDestinationToProductsByTransferDestinationIdRouteName)]
|
||||||
[SignalR(SignalRTags.GetTransferDestinationToProductsByTransferDestinationId)]
|
[SignalR(SignalRTags.GetTransferDestinationToProductsByTransferDestinationId)]
|
||||||
public async Task<List<TransferDestinationToProduct>> GetTransferDestinationToProductsByTransferDestinationId(Guid transferDestinationId)
|
public async Task<List<TransferDestinationToProduct>> GetTransferDestinationToProductsByTransferDestinationId(Guid transferDestinationId)
|
||||||
{
|
{
|
||||||
|
|
@ -306,7 +291,8 @@ namespace TIAMWebApp.Server.Controllers
|
||||||
|
|
||||||
//[Authorize]
|
//[Authorize]
|
||||||
//[HttpGet]
|
//[HttpGet]
|
||||||
//[Route(APIUrls.GetTransferDriversByTransferIdRouteName)]
|
//[Route(APIUrls.GetTransferDestinationToProductById)]
|
||||||
|
[NonAction]
|
||||||
[SignalR(SignalRTags.GetTransferDestinationToProductById)]
|
[SignalR(SignalRTags.GetTransferDestinationToProductById)]
|
||||||
public async Task<TransferDestinationToProduct?> GetTransferDestinationToProductById(Guid transferDestinationToProductId)
|
public async Task<TransferDestinationToProduct?> GetTransferDestinationToProductById(Guid transferDestinationToProductId)
|
||||||
{
|
{
|
||||||
|
|
@ -316,7 +302,7 @@ namespace TIAMWebApp.Server.Controllers
|
||||||
|
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route(APIUrls.CreateTransferDestinationRouteName)]
|
[Route(APIUrls.CreateTransferDestinationToProductRouteName)]
|
||||||
[SignalR(SignalRTags.CreateTransferDestinationToProduct)]
|
[SignalR(SignalRTags.CreateTransferDestinationToProduct)]
|
||||||
public async Task<TransferDestinationToProduct?> CreateTransferDestinationToProduct([FromBody] TransferDestinationToProduct transferDestinationToProduct)
|
public async Task<TransferDestinationToProduct?> CreateTransferDestinationToProduct([FromBody] TransferDestinationToProduct transferDestinationToProduct)
|
||||||
{
|
{
|
||||||
|
|
@ -339,9 +325,9 @@ namespace TIAMWebApp.Server.Controllers
|
||||||
return isSuccess ? transferDestinationToProduct : null;
|
return isSuccess ? transferDestinationToProduct : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
//[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
//[HttpPost]
|
[HttpPost]
|
||||||
//[Route(APIUrls.UpdateTransferDestinationRouteName)]
|
[Route(APIUrls.UpdateTransferDestinationToProductRouteName)]
|
||||||
[SignalR(SignalRTags.UpdateTransferDestinationToProduct)]
|
[SignalR(SignalRTags.UpdateTransferDestinationToProduct)]
|
||||||
public async Task<TransferDestinationToProduct?> UpdateTransferDestinationToProduct([FromBody] TransferDestinationToProduct transferDestinationToProduct)
|
public async Task<TransferDestinationToProduct?> UpdateTransferDestinationToProduct([FromBody] TransferDestinationToProduct transferDestinationToProduct)
|
||||||
{
|
{
|
||||||
|
|
@ -360,9 +346,9 @@ namespace TIAMWebApp.Server.Controllers
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//[Authorize]
|
[Authorize]
|
||||||
//[HttpGet]
|
[HttpGet]
|
||||||
//[Route(APIUrls.GetTransferDriversByTransferIdRouteName)]
|
[Route(APIUrls.RemoveTransferDestinationToProductRouteName)]
|
||||||
[SignalR(SignalRTags.RemoveTransferDestinationToProduct)]
|
[SignalR(SignalRTags.RemoveTransferDestinationToProduct)]
|
||||||
public async Task<TransferDestinationToProduct?> RemoveTransferDestinationToProduct([FromBody] TransferDestinationToProduct transferDestinationToProduct)
|
public async Task<TransferDestinationToProduct?> RemoveTransferDestinationToProduct([FromBody] TransferDestinationToProduct transferDestinationToProduct)
|
||||||
{
|
{
|
||||||
|
|
@ -370,6 +356,8 @@ namespace TIAMWebApp.Server.Controllers
|
||||||
return result ? transferDestinationToProduct : null;
|
return result ? transferDestinationToProduct : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//transfer
|
||||||
|
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route(APIUrls.CreateTransferRouteName)]
|
[Route(APIUrls.CreateTransferRouteName)]
|
||||||
|
|
|
||||||
|
|
@ -81,11 +81,23 @@ namespace TIAMWebApp.Shared.Application.Models
|
||||||
public const string CreateTransferDestinationRouteName = "CreateTransferDestination";
|
public const string CreateTransferDestinationRouteName = "CreateTransferDestination";
|
||||||
public const string CreateTransferDestination = TransferDataAPI + CreateTransferDestinationRouteName;
|
public const string CreateTransferDestination = TransferDataAPI + CreateTransferDestinationRouteName;
|
||||||
|
|
||||||
public const string GetTransferDestinationToProductByProductIdRouteName = "GetTransferDestinationToProductByProductId";
|
public const string GetAllTransferDestinationToProductsRouteName = "GetAllTransferDestinationToProducts";
|
||||||
public const string GetTransferDestinationToProductByProductId = TransferDataAPI + GetTransferDestinationToProductByProductIdRouteName;
|
public const string GetAllTransferDestinationToProducts = TransferDataAPI + GetAllTransferDestinationToProductsRouteName;
|
||||||
|
|
||||||
public const string GetTransferDestinationToProductByTransferDestinationIdRouteName = "GetTransferDestinationToProductByTransferDestinationId";
|
public const string GetTransferDestinationToProductsByProductIdRouteName = "GetTransferDestinationToProductsByProductId";
|
||||||
public const string GetTransferDestinationToProductByTransferDestinationId = TransferDataAPI + GetTransferDestinationToProductByTransferDestinationIdRouteName;
|
public const string GetTransferDestinationToProductsByProductId = TransferDataAPI + GetTransferDestinationToProductsByProductIdRouteName;
|
||||||
|
|
||||||
|
public const string GetTransferDestinationToProductsByTransferDestinationIdRouteName = "GetTransferDestinationToProductsByTransferDestinationId";
|
||||||
|
public const string GetTransferDestinationToProductsByTransferDestinationId = TransferDataAPI + GetTransferDestinationToProductsByTransferDestinationIdRouteName;
|
||||||
|
|
||||||
|
public const string CreateTransferDestinationToProductRouteName = "CreateTransferDestinationToProduct";
|
||||||
|
public const string CreateTransferDestinationToProduct = TransferDataAPI + CreateTransferDestinationToProductRouteName;
|
||||||
|
|
||||||
|
public const string UpdateTransferDestinationToProductRouteName = "UpdateTransferDestinationToProduct";
|
||||||
|
public const string UpdateTransferDestinationToProduct = TransferDataAPI + UpdateTransferDestinationToProductRouteName;
|
||||||
|
|
||||||
|
public const string RemoveTransferDestinationToProductRouteName = "RemoveTransferDestinationToProduct";
|
||||||
|
public const string RemoveTransferDestinationToProduct = TransferDataAPI + RemoveTransferDestinationToProductRouteName;
|
||||||
|
|
||||||
public const string GetTransfersRouteName = "GetTransfers";
|
public const string GetTransfersRouteName = "GetTransfers";
|
||||||
public const string GetTransfers = TransferDataAPI + GetTransfersRouteName;
|
public const string GetTransfers = TransferDataAPI + GetTransfersRouteName;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue