CORS, Theme, Better flow and dotnet tools - II

This commit is contained in:
2023-01-05 12:40:46 -07:00
parent 978e698da5
commit 85028743ed
21 changed files with 246 additions and 69 deletions

View File

@ -8,6 +8,6 @@
<SupportedPlatform Include="browser" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Text.Json" Version="7.0.0" />
<PackageReference Include="System.Text.Json" Version="7.0.1" />
</ItemGroup>
</Project>

View File

@ -2,19 +2,20 @@ using System.Text.Json;
namespace Expose.MyIT.Shared.ViewModels;
// [JsonConstructor]
public record ServiceShopOrder(string Id,
string Name,
string[] BookingNames,
string Type,
string State,
string ItemNumber,
DateTime CreatedDate,
DateTime DecidedDate,
string Recipient,
string Requestor)
string Name,
string[] BookingNames,
string Type,
string State,
string ItemNumber,
DateTime CreatedDate,
DateTime DecidedDate,
string Recipient,
string Requestor)
{
public ServiceShopOrder(Models.Order order) :
internal ServiceShopOrder(Models.Order order) :
this(order.Id,
order.Name,
order.Bookings is null || !order.Bookings.Any() ? Array.Empty<string>() : order.Bookings.Select(l => l.Name).ToArray(),

View File

@ -2,19 +2,20 @@ using System.Text.Json;
namespace Expose.MyIT.Shared.ViewModels;
// [JsonConstructor]
public record SsaOrder(string Id,
string Name,
string[] BookingNames,
string Type,
string State,
string ItemNumber,
DateTime CreatedDate,
DateTime DecidedDate,
string Recipient,
string Requestor)
string Name,
string[] BookingNames,
string Type,
string State,
string ItemNumber,
DateTime CreatedDate,
DateTime DecidedDate,
string Recipient,
string Requestor)
{
public SsaOrder(Models.Order order) :
internal SsaOrder(Models.Order order) :
this(order.Id,
order.Name,
order.Bookings is null || !order.Bookings.Any() ? Array.Empty<string>() : order.Bookings.Select(l => l.Name).ToArray(),

View File

@ -6,9 +6,22 @@ namespace Expose.MyIT.Shared.ViewModels;
public record WeatherForecast
{
public DateOnly Date { init; get; }
public int TemperatureC { init; get; }
public string? Summary { init; get; }
public int TemperatureF { init; get; }
[JsonConstructor]
public WeatherForecast(DateOnly Date, int TemperatureC, string? Summary, int TemperatureF)
{ }
public WeatherForecast(DateOnly date, int temperatureC, string? summary, int temperatureF)
{
Date = date;
TemperatureC = temperatureC;
Summary = summary;
TemperatureF = temperatureF;
}
public WeatherForecast(Models.WeatherForecast weatherForecast) :
this(weatherForecast.Date,