CommissionPercent set to double; Company.OwnerId fixes;
This commit is contained in:
parent
ceb46f215b
commit
6f2b3b915f
|
|
@ -28,7 +28,7 @@ public class Company : AcCompany<User, UserToCompany, Profile>, ICompany<User, U
|
|||
{
|
||||
}
|
||||
|
||||
public Company(Guid id, string name, Guid ownerId, Guid affiliateId) : base(id, name, ownerId, affiliateId)
|
||||
public Company(Guid id, string name, Guid? ownerId, Guid affiliateId) : base(id, name, ownerId, affiliateId)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -46,10 +46,10 @@ namespace TIAMWebApp.Server.Controllers
|
|||
var id = Guid.NewGuid();
|
||||
var name = serviceProvider.Name;
|
||||
var commissionRate = serviceProvider.CommissionPercent;
|
||||
Guid ownerId;
|
||||
|
||||
|
||||
//no owner set yet
|
||||
ownerId = serviceProvider.OwnerId == Guid.Empty ? serviceProvider.OwnerId : serviceProvider.OwnerId;
|
||||
var ownerId = serviceProvider.OwnerId == Guid.Empty ? null : serviceProvider.OwnerId;
|
||||
|
||||
if (name is null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ namespace TIAMWebApp.Shared.Application.Models
|
|||
{
|
||||
public Guid Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public Guid OwnerId { get; set; }
|
||||
public Guid? OwnerId { get; set; }
|
||||
public int CommissionPercent { get; set; }
|
||||
public ServiceProviderModel() { }
|
||||
public ServiceProviderModel(Guid id, string name, Guid ownerId, int commissionPercent)
|
||||
public ServiceProviderModel(Guid id, string name, Guid? ownerId, int commissionPercent)
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
|
|
|
|||
Loading…
Reference in New Issue