improvements, fixes...
This commit is contained in:
parent
831935ad1b
commit
632f894c5e
|
|
@ -1,10 +1,17 @@
|
||||||
using AyCode.Interfaces;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
using AyCode.Interfaces;
|
||||||
using TIAM.Entities.Users;
|
using TIAM.Entities.Users;
|
||||||
|
|
||||||
namespace TIAM.Models.Dtos.Users
|
namespace TIAM.Models.Dtos.Users
|
||||||
{
|
{
|
||||||
public class UserDtoDetail : UserDto, IUserDtoDetail
|
public class UserDtoDetail : UserDto, IUserDtoDetail
|
||||||
{
|
{
|
||||||
|
[NotMapped]
|
||||||
|
[JsonIgnore]
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
public string? FullName => Profile.FullName;
|
||||||
|
|
||||||
public string? PhoneNumber { get; set; }
|
public string? PhoneNumber { get; set; }
|
||||||
public string? RefreshToken { get; set; }
|
public string? RefreshToken { get; set; }
|
||||||
public Guid? RefferalId { get; set; }
|
public Guid? RefferalId { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,12 @@
|
||||||
<Columns>
|
<Columns>
|
||||||
<DxGridCommandColumn Width="135" MinWidth="135" DeleteButtonVisible="AcDomain.IsDeveloperVersion" EditButtonVisible="AcDomain.IsDeveloperVersion" FixedPosition="GridColumnFixedPosition.Left" />
|
<DxGridCommandColumn Width="135" MinWidth="135" DeleteButtonVisible="AcDomain.IsDeveloperVersion" EditButtonVisible="AcDomain.IsDeveloperVersion" FixedPosition="GridColumnFixedPosition.Left" />
|
||||||
<DxGridDataColumn FieldName="Id" SortIndex="0" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
|
<DxGridDataColumn FieldName="Id" SortIndex="0" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
|
||||||
<DxGridDataColumn FieldName="UserId" />
|
<DxGridDataColumn FieldName="UserId" Caption="UserId" />
|
||||||
<DxGridDataColumn FieldName="ProductId" Width="40%" />
|
@* <DxGridDataColumn FieldName="@nameof(UserProductMapping.User.EmailAddress)" Caption="User name" /> *@
|
||||||
|
<DxGridDataColumn FieldName="ProductId" Caption="ServiceId" />
|
||||||
|
@* <DxGridDataColumn FieldName="@nameof(UserProductMapping.Product.Name)" Caption="Service name" /> *@
|
||||||
|
<DxGridDataColumn FieldName="UserProductMapping.Product.Name" Caption="Service name" />
|
||||||
|
@* <DxGridDataColumn FieldName="@nameof(Product.ServiceProvider.Name)" Caption="Company name" /> *@
|
||||||
<DxGridDataColumn FieldName="Permissions" />
|
<DxGridDataColumn FieldName="Permissions" />
|
||||||
</Columns>
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
|
|
@ -50,10 +54,10 @@
|
||||||
|
|
||||||
<EditFormTemplate Context="userEditFormContext">
|
<EditFormTemplate Context="userEditFormContext">
|
||||||
@{
|
@{
|
||||||
var transfer2 = (UserProductMapping)userEditFormContext.EditModel;
|
var userProduct = (UserProductMapping)userEditFormContext.EditModel;
|
||||||
}
|
}
|
||||||
<DxFormLayout CssClass="w-100">
|
<DxFormLayout CssClass="w-100">
|
||||||
<DxFormLayoutItem Caption="UserId" ColSpanMd="4">
|
<DxFormLayoutItem Caption="User" ColSpanMd="4">
|
||||||
@userEditFormContext.GetEditor("UserId")
|
@userEditFormContext.GetEditor("UserId")
|
||||||
</DxFormLayoutItem>
|
</DxFormLayoutItem>
|
||||||
<DxFormLayoutItem Caption="Product:" ColSpanMd="4">
|
<DxFormLayoutItem Caption="Product:" ColSpanMd="4">
|
||||||
|
|
|
||||||
|
|
@ -273,7 +273,7 @@ namespace TIAMWebApp.Server.Controllers
|
||||||
{
|
{
|
||||||
_logger.Info($@"GetAllUserProductMappings called");
|
_logger.Info($@"GetAllUserProductMappings called");
|
||||||
|
|
||||||
var companyies = (await adminDal.GetAllUserProductMappingsAsync()).OrderBy(x => x.ProductId).ToList();
|
var companyies = (await adminDal.GetAllUserProductMappingsAsync()).OrderBy(x => x.User.Profile.Name).ToList();
|
||||||
return companyies;
|
return companyies;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ using TIAM.Core.Loggers;
|
||||||
using TIAM.Database.Test;
|
using TIAM.Database.Test;
|
||||||
using TIAM.Entities.ServiceProviders;
|
using TIAM.Entities.ServiceProviders;
|
||||||
using TIAM.Entities.Transfers;
|
using TIAM.Entities.Transfers;
|
||||||
|
using TIAM.Entities.Users;
|
||||||
using TIAM.Services;
|
using TIAM.Services;
|
||||||
using TIAMWebApp.Shared.Application.Services;
|
using TIAMWebApp.Shared.Application.Services;
|
||||||
using TIAMWebApp.Shared.Application.Utility;
|
using TIAMWebApp.Shared.Application.Utility;
|
||||||
|
|
@ -91,6 +92,15 @@ namespace Tiam.Services.Client.Tests
|
||||||
Assert.IsTrue(companies.Count > 0);
|
Assert.IsTrue(companies.Count > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public async Task GetAllUserProductMappingsTest_ReturnProductMappings_WhenHasProductMappings()
|
||||||
|
{
|
||||||
|
var userProductMapping = await _signalRClient.GetAllAsync<List<UserProductMapping>>(SignalRTags.GetAllUserProductMappings);
|
||||||
|
|
||||||
|
Assert.IsNotNull(userProductMapping);
|
||||||
|
Assert.IsTrue(userProductMapping.Count > 0);
|
||||||
|
}
|
||||||
|
|
||||||
[DataTestMethod]
|
[DataTestMethod]
|
||||||
[DataRow(["cfb27fc2-54c2-4f07-8471-587d6b79b019", "7385c4e3-3c1e-4c5e-9926-8c0ea60dcb38"])]
|
[DataRow(["cfb27fc2-54c2-4f07-8471-587d6b79b019", "7385c4e3-3c1e-4c5e-9926-8c0ea60dcb38"])]
|
||||||
public async Task TransferDestinationCrudTest(string[] transferDestIdAddressIdStrings)
|
public async Task TransferDestinationCrudTest(string[] transferDestIdAddressIdStrings)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue