Add company editing in admin view.

This commit is contained in:
2020-05-27 21:24:53 +01:00
parent e68d4a3f05
commit 8879ba184e
9 changed files with 701 additions and 219 deletions

View File

@@ -5,19 +5,25 @@ namespace Marechai.ViewModels
{
public class CompanyViewModel : BaseViewModel<int>
{
public Guid? LastLogo { get; set; }
public string Name { get; set; }
public DateTime? Founded { get; set; }
public DateTime? Sold { get; set; }
public string SoldTo { get; set; }
public string Country { get; set; }
public CompanyStatus Status { get; set; }
public string Name { get; set; }
public DateTime? Founded { get; set; }
public string Website { get; set; }
public string Twitter { get; set; }
public string Facebook { get; set; }
public DateTime? Sold { get; set; }
public int? SoldToId { get; set; }
public string Address { get; set; }
public string City { get; set; }
public string Province { get; set; }
public string PostalCode { get; set; }
public short? CountryId { get; set; }
public CompanyStatus Status { get; set; }
public Guid? LastLogo { get; set; }
public string SoldTo { get; set; }
public string Country { get; set; }
public string SoldView => Status != CompanyStatus.Active && Status != CompanyStatus.Unknown
? Sold?.ToShortDateString() ?? "Unknown"
: Sold?.ToShortDateString() ?? (SoldTo is null
? ""
: "Unknown");
: Sold?.ToShortDateString() ?? (SoldTo is null ? "" : "Unknown");
}
}