move to dot net core 7

This commit is contained in:
Frede Hundewadt 2023-06-15 09:11:36 +02:00
parent 1afb245c7c
commit e4b06de588
7 changed files with 342 additions and 18 deletions

View file

@ -0,0 +1,43 @@
// Copyright (C) 2022 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
//
using Wonky.Client.Models;
using Wonky.Entity.DTO;
namespace Wonky.Client.Helpers;
public class MapUtils
{
public static ManagerNewUserDto MapCreateUser(NewUserForm model)
{
return new ManagerNewUserDto
{
Description = model.Description,
Email = model.Email,
Passwd = model.NewPassword,
AssignedRoles = model.AssignedRoles,
CompanyId = model.CompanyId,
CountryCode = model.CountryCode,
EmailConfirmed = true,
EShop = model.EShop,
FirstName = model.FirstName,
LastName = model.LastName,
LockoutEnabled = false,
PhoneNumber = model.PhoneNumber,
SalesRep = model.SalesRep,
UserId = ""
};
}
}

View file

@ -0,0 +1,30 @@
// Copyright (C) 2022 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
//
using System.Text;
using System.Web;
namespace Wonky.Client.Helpers;
public class WebUtils
{
public static string QueryHelper(string url, Dictionary<string, string> queryDictionary)
{
var properties = from property
in queryDictionary select $"{property.Key}={HttpUtility.UrlEncode(property.Value)}";
return $"{url}?{string.Join("&", properties)}";
}
}

View file

@ -1,25 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latestmajor</LangVersion>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.3.0" />
<PackageReference Include="Blazored.Toast" Version="4.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="6.0.16" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="6.0.16" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="6.0.16" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.16" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.16" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="7.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="7.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="7.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.7" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="7.0.0" />
<PackageReference Include="Toolbelt.Blazor.HttpClientInterceptor" Version="10.2.0" />
</ItemGroup>

View file

@ -1,16 +1,16 @@
{
"appInfo": {
"name": "Wonky Online",
"version": "168.1",
"version": "170.1",
"rc": true,
"sandBox": false,
"image": "grumpy-coder.png"
},
"Logging": {
"LogLevel": {
"Default": "None",
"System": "None",
"Microsoft": "Information"
"Default": "Debug",
"System": "Debug",
"Microsoft": "None"
},
"Debug": {
"LogLevel": {
@ -19,7 +19,7 @@
}
},
"apiConfig": {
"baseUrl": "https://zeta.innotec.dk",
"baseUrl": "https://eta.innotec.dk",
"catalog": "api/v2/catalog/country",
"crmCustomers": "api/v2/crm/companies",
"crmInventoryExt": "history/inventory",

View file

@ -0,0 +1,252 @@
body {
font-size: 16px;
}
.draft-expires-msg {
font-size: 0.8em;
}
.busy-signal {
float: right;
z-index: 100;
position: relative;
top: 1px;
right: 10px;
}
.workDate {
font-variant: small-caps;
}
.action-link-element {
cursor: pointer;
}
.i-larger {
font-size: 1.3rem;
}
.btn.btn-edit {
color: #030303;
background-color: #a2a2ec;
}
html, body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
h1,h2:focus {
outline: none;
}
a, .btn-link {
color: #0071c1;
}
/*.btn-primary {*/
/* color: #fff;*/
/* background-color: #1b6ec2;*/
/* border-color: #1861ac;*/
/*}*/
.inno {
color: #ffaa00;
}
.inno-display {
display: block;
}
.inno-hidden {
display: none;
}
.content {
padding-top: 1.1rem;
}
.valid.modified:not([type=checkbox]) {
outline: 1px solid #26b050;
}
.invalid {
outline: 1px solid red;
}
.validation-message {
color: red;
}
/* begin state elements */
.state {
width: 16px;
height: 16px;
min-width: 16px;
min-height: 16px;
}
.the-good {
color: green;
}
.the-bad {
color: orange;
}
.the-ugly {
color: red;
}
.the-dead {
color: black;
}
.the-fast {
color: orange;
}
.the-draw {
color: mediumpurple;
}
.the-good-bg {
background-color: green;
}
.the-bad-bg {
background-color: orange;
}
.the-ugly-bg {
background-color: red;
}
.the-draw-bg {
background-color: mediumpurple;
}
.no-vat-bg {
background-color: lightskyblue;
}
.the-dead-bg {
background-color: black;
}
/* end state elements */
/* led elements */
.led-box {
height: 24px;
width: 24px;
margin: auto;
float: left;
}
.led-red {
margin: 5px;
width: 24px;
height: 24px;
background-color: #F00;
border-radius: 50%;
box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #441313 0 -1px 9px, rgba(255, 0, 0, 0.5) 0 2px 12px;
-webkit-animation: blinkRed 0.5s infinite;
-moz-animation: blinkRed 0.5s infinite;
-ms-animation: blinkRed 0.5s infinite;
-o-animation: blinkRed 0.5s infinite;
animation: blinkRed 0.5s infinite;
animation-iteration-count: infinite;
}
@-webkit-keyframes blinkRed {
from { background-color: #F00; }
50% { background-color: #A00; box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #441313 0 -1px 9px, rgba(255, 0, 0, 0.5) 0 2px 0;}
to { background-color: #F00; }
}
@-moz-keyframes blinkRed {
from { background-color: #F00; }
50% { background-color: #A00; box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #441313 0 -1px 9px, rgba(255, 0, 0, 0.5) 0 2px 0;}
to { background-color: #F00; }
}
@-ms-keyframes blinkRed {
from { background-color: #F00; }
50% { background-color: #A00; box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #441313 0 -1px 9px, rgba(255, 0, 0, 0.5) 0 2px 0;}
to { background-color: #F00; }
}
@-o-keyframes blinkRed {
from { background-color: #F00; }
50% { background-color: #A00; box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #441313 0 -1px 9px, rgba(255, 0, 0, 0.5) 0 2px 0;}
to { background-color: #F00; }
}
@keyframes blinkRed {
from { background-color: #F00; }
50% { background-color: #A00; box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #441313 0 -1px 9px, rgba(255, 0, 0, 0.5) 0 2px 0;}
to { background-color: #F00; }
}
.led-yellow {
margin: 0 auto;
width: 24px;
height: 24px;
background-color: #FF0;
border-radius: 50%;
box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #808002 0 -1px 9px, #FF0 0 2px 12px;
-webkit-animation: blinkYellow 1s infinite;
-moz-animation: blinkYellow 1s infinite;
-ms-animation: blinkYellow 1s infinite;
-o-animation: blinkYellow 1s infinite;
animation: blinkYellow 1s infinite;
}
@-webkit-keyframes blinkYellow {
from { background-color: #FF0; }
50% { background-color: #AA0; box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #808002 0 -1px 9px, #FF0 0 2px 0; }
to { background-color: #FF0; }
}
@-moz-keyframes blinkYellow {
from { background-color: #FF0; }
50% { background-color: #AA0; box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #808002 0 -1px 9px, #FF0 0 2px 0; }
to { background-color: #FF0; }
}
@-ms-keyframes blinkYellow {
from { background-color: #FF0; }
50% { background-color: #AA0; box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #808002 0 -1px 9px, #FF0 0 2px 0; }
to { background-color: #FF0; }
}
@-o-keyframes blinkYellow {
from { background-color: #FF0; }
50% { background-color: #AA0; box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #808002 0 -1px 9px, #FF0 0 2px 0; }
to { background-color: #FF0; }
}
@keyframes blinkYellow {
from { background-color: #FF0; }
50% { background-color: #AA0; box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #808002 0 -1px 9px, #FF0 0 2px 0; }
to { background-color: #FF0; }
}
.led-green {
margin: 0 auto;
width: 24px;
height: 24px;
background-color: #ABFF00;
border-radius: 50%;
box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #304701 0 -1px 9px, #89FF00 0 2px 12px;
}
.led-blue {
margin: 0 auto;
width: 24px;
height: 24px;
background-color: #24E0FF;
border-radius: 50%;
box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #006 0 -1px 9px, #3F8CFF 0 2px 14px;
}
/* end led elements */
.footer {
border-top: 2px solid orange;
position: relative;
margin-top: -150px;
height: 150px;
width: 100%;
clear: both;
padding-top: 20px;
}
footer.version {
display: block;
font-weight: bold;
padding: 0 10px 0 0;
}
.back-to-top {
position: fixed;
bottom: 25px;
right: 25px;
display: none;
}

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

View file

@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0.0",
"version": "7.0.0",
"rollForward": "latestMajor",
"allowPrerelease": false
}