Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bumped nugets, projects to .net 6.0 and added maui/blazor project #6

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Api/Data/NotatnikMechanika.Data.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.5" />
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions Api/Repository/NotatnikMechanika.Repository.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.1.0" />
<PackageReference Include="AutoMapper" Version="10.1.1" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="AutoMapper" Version="11.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
</ItemGroup>

Expand Down
1 change: 0 additions & 1 deletion Api/Server/Controllers/CustomerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ namespace NotatnikMechanika.Server.Controllers
[Route(CustomerPaths.Name)]
public class CustomerController : AbstractControllerBase<CustomerModel>
{

private readonly ICustomerService _customerService;
public CustomerController(ICustomerService customerService) : base(customerService)
{
Expand Down
12 changes: 6 additions & 6 deletions Api/Server/NotatnikMechanika.Server.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<UserSecretsId>22098061-cdb5-41d7-a981-80d27bb1b2b6</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..</DockerfileContext>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoMapper" Version="10.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="5.0.5" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.9" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.1.3" />
<PackageReference Include="AutoMapper" Version="11.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="6.0.5" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.15.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Api/Service/NotatnikMechanika.Service.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<OutputType>Library</OutputType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
<PackageReference Include="Sendgrid" Version="9.23.0" />
<PackageReference Include="Sendgrid" Version="9.28.0" />
</ItemGroup>

<ItemGroup>
Expand Down
9 changes: 5 additions & 4 deletions Api/Shared/EndpointsPaths.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
namespace NotatnikMechanika.Shared
using System.Reflection;

namespace NotatnikMechanika.Shared
{
public static class CrudPaths
{

public const string ByIdPath = "{id}";
public const string AllPath = "all";
public const string CreatePath = "";
Expand Down Expand Up @@ -56,7 +57,7 @@ public static string Login()

public static string Register()
{
return Name + "/" + RegisterPath;
return Name + "/" + MethodBase.GetCurrentMethod().Name;
}

public static string Update()
Expand All @@ -74,7 +75,7 @@ public static class CarPaths
public const string Name = "api/car";
public const string ByCustomerPath = "byCustomer/{customerId}";

public static string ByCustomer(int customerId)
public static string ByCustomer(int? customerId)
{
return Name + "/" + ByCustomerPath.Replace("{customerId}", customerId.ToString());
}
Expand Down
14 changes: 7 additions & 7 deletions Api/Shared/Models/Customer/CustomerModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ namespace NotatnikMechanika.Shared.Models.Customer
{
public class CustomerModel : ValidateModelBase
{
public int Id { get; set; }
public int? Id { get; set; }

[Required(ErrorMessage = "Pole imię jest wymagane")]
public string Name { get; set; }
public string? Name { get; set; }

[Required(ErrorMessage = "Pole nazwisko jest wymagane")]
public string Surname { get; set; }
public string CompanyName { get; set; }
public string? Surname { get; set; }
public string? CompanyName { get; set; }
/// <summary>
/// np NIP
/// </summary>
public string CompanyIdentyficator { get; set; }
public string Phone { get; set; }
public string Address { get; set; }
public string? CompanyIdentyficator { get; set; }
public string? Phone { get; set; }
public string? Address { get; set; }
}
}
4 changes: 2 additions & 2 deletions Api/Shared/NotatnikMechanika.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<Import Project="../../Targets/NotatnikMechanika.Standard.targets" />

<ItemGroup>
<PackageReference Include="PropertyChanged.Fody" Version="3.3.3">
<PackageReference Include="PropertyChanged.Fody" Version="3.4.1">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.ComponentModel.Annotations" Version="6.0.0-preview.4.21253.7" />
</ItemGroup>

</Project>
18 changes: 9 additions & 9 deletions Clients/Client/Application.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected override void ConfigureServices(IServiceCollection services)
);

services.AddMBServices(
animatedNavigationManagerServiceConfiguration: Utilities.GetDefaultAnimatedNavigationServiceConfiguration(),
// animatedNavigationManagerServiceConfiguration: Utilities.GetDefaultAnimatedNavigationServiceConfiguration(),
toastServiceConfiguration: Utilities.GetDefaultToastServiceConfiguration()
);
}
Expand All @@ -41,14 +41,14 @@ protected override void AppStart()

public static class Utilities
{
public static MBAnimatedNavigationManagerServiceConfiguration GetDefaultAnimatedNavigationServiceConfiguration()
{
return new MBAnimatedNavigationManagerServiceConfiguration()
{
ApplyAnimation = true,
AnimationTime = 300
};
}
//public static MBAnimatedNavigationManagerServiceConfiguration GetDefaultAnimatedNavigationServiceConfiguration()
//{
// return new MBAnimatedNavigationManagerServiceConfiguration()
// {
// ApplyAnimation = true,
// AnimationTime = 300
// };
//}


public static MBToastServiceConfiguration GetDefaultToastServiceConfiguration()
Expand Down
63 changes: 20 additions & 43 deletions Clients/Client/NotatnikMechanika.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>

<PublishTrimmed>false</PublishTrimmed>

<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<Content Remove="package.json" />
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<RunAOTCompilation>True</RunAOTCompilation>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<RunAOTCompilation>True</RunAOTCompilation>
</PropertyGroup>

<ItemGroup>
<None Include="package.json" />
<Content Remove="package.json" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Blazor.Extensions.Logging" Version="2.0.4" />
<PackageReference Include="Blazored.LocalStorage" Version="3.0.0" />
<PackageReference Include="Material.Blazor" Version="2.0.0-preview.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="5.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.5" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.10.2" />
<PackageReference Include="Blazored.LocalStorage" Version="4.2.0" />
<PackageReference Include="Material.Blazor" Version="2.5.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="6.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.5" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.18.0" />
</ItemGroup>

<ItemGroup>
Expand All @@ -38,35 +46,4 @@
<InputStaticAssetsStyles Include="styles\*.scss;" />
<OutputStaticAssetsStyles Include="wwwroot\css\asymmetric-theme.min.css;wwwroot\css\dark-square-theme.min.css;wwwroot\css\light-square-theme.min.css;wwwroot\css\material-default-theme.min.css;wwwroot\css\rounded-theme.min.css;" />
</ItemGroup>

<Target Name="CheckIfNpmExists" Inputs="@(InputStaticAssetsStyles)" Outputs="@(OutputStaticAssetsStyles)" BeforeTargets="PreBuildEvent">
<Exec Command="echo ***** npm install" />
<Exec Command="npm install" ContinueOnError="true" StandardOutputImportance="low" StandardErrorImportance="low" LogStandardErrorAsError="false" IgnoreExitCode="true">
<Output TaskParameter="ExitCode" PropertyName="NpmReturnCode" />
</Exec>
<Exec Command="echo ***** 'npm install' return code was $(NpmReturnCode) (0 indicates npm is available)" />
</Target>

<Target Name="BuildStyles" Inputs="@(InputStaticAssetsStyles)" Outputs="@(OutputStaticAssetsStyles)" BeforeTargets="PreBuildEvent" AfterTargets="CheckIfNpmExists" Condition=" '$(NpmReturnCode)' == '0' ">
<Exec Command="echo ***** mkdir wwwroot and wwwroot\css" />
<Exec Command="mkdir wwwroot" IgnoreExitCode="true" />
<Exec Command="mkdir wwwroot\css" IgnoreExitCode="true" />

<!-- Don't build unminified themes -->
<!--<Exec Command="echo ***** build material default theme" />
<Exec Command="npm run build-min-material-default" />

<Exec Command="echo ***** build light square theme" />
<Exec Command="npm run build-min-light-square" />-->

<Exec Command="echo ***** build dark square theme" />
<Exec Command="npm run build-min-dark-square" />

<!--<Exec Command="echo ***** build rounded theme" />
<Exec Command="npm run build-min-rounded" />

<Exec Command="echo ***** build asymmetric theme" />
<Exec Command="npm run build-min-asymmetric" />-->

</Target>
</Project>
8 changes: 4 additions & 4 deletions Clients/Client/Pages/AddOrder.razor
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ else
<Icon><MBIcon IconName="local_grocery_store" /></Icon>
<Title>@service.Name</Title>
<LineTwo>@service.Price</LineTwo>
<Actions>
<PrimaryActions>
<div style="width: 10rem">
<MBCheckbox @bind-Value="@service.Finished"/>
</div>
</Actions>
</PrimaryActions>
</MBList>
}
else
Expand All @@ -101,11 +101,11 @@ else
<Icon><MBIcon IconName="local_grocery_store" /></Icon>
<Title>@commodity.Name</Title>
<LineTwo>@commodity.Price</LineTwo>
<Actions>
<PrimaryActions>
<div style="width: 10rem">
<MBCheckbox @bind-Value="@commodity.Finished"/>
</div>
</Actions>
</PrimaryActions>
</MBList>
}
else
Expand Down
2 changes: 1 addition & 1 deletion Clients/Client/Pages/Login.razor
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<MBTextField
@bind-Value="PageModel.LoginModel.Email"
LeadingIcon="email"
Label="E-mali"
Label="E-mail"
style = "width: 100%;"
TextInputStyle="MBTextInputStyle.Outlined"
ValidationMessageFor="@(() => @PageModel.LoginModel.Email)"/>
Expand Down
8 changes: 4 additions & 4 deletions Clients/Client/Pages/Order.razor
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ else
<Icon><MBIcon IconName="local_grocery_store" /></Icon>
<Title>@service.Name</Title>
<LineTwo>@service.Price</LineTwo>
<Actions>
<PrimaryActions>
<div style="width: 10rem">
<MBCheckbox @bind-Value="@service.Finished" />
</div>
</Actions>
</PrimaryActions>
</MBList>
}
else
Expand All @@ -76,11 +76,11 @@ else
<Icon><MBIcon IconName="local_grocery_store" /></Icon>
<Title>@commodity.Name</Title>
<LineTwo>@commodity.Price</LineTwo>
<Actions>
<PrimaryActions>
<div style="width: 10rem">
<MBCheckbox @bind-Value="@commodity.Finished" />
</div>
</Actions>
</PrimaryActions>
</MBList>
}
else
Expand Down
Loading