diff --git a/Wonky.Client/Helpers/MapUtils.cs b/Wonky.Client/Helpers/MapUtils.cs new file mode 100644 index 00000000..205a87c3 --- /dev/null +++ b/Wonky.Client/Helpers/MapUtils.cs @@ -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 = "" + }; + } +} \ No newline at end of file diff --git a/Wonky.Client/Helpers/WebUtils.cs b/Wonky.Client/Helpers/WebUtils.cs new file mode 100644 index 00000000..ed888f74 --- /dev/null +++ b/Wonky.Client/Helpers/WebUtils.cs @@ -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 queryDictionary) + { + var properties = from property + in queryDictionary select $"{property.Key}={HttpUtility.UrlEncode(property.Value)}"; + + return $"{url}?{string.Join("&", properties)}"; + } +} \ No newline at end of file diff --git a/Wonky.Client/Wonky.Client.csproj b/Wonky.Client/Wonky.Client.csproj index b0f640b2..69f4878c 100644 --- a/Wonky.Client/Wonky.Client.csproj +++ b/Wonky.Client/Wonky.Client.csproj @@ -1,25 +1,24 @@ - net6.0 enable enable latestmajor + Exe + net7.0 - - - - - - - - - - + + + + + + + + diff --git a/Wonky.Client/wwwroot/appsettings.json b/Wonky.Client/wwwroot/appsettings.json index 3b4c30d0..68d3b7db 100644 --- a/Wonky.Client/wwwroot/appsettings.json +++ b/Wonky.Client/wwwroot/appsettings.json @@ -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", diff --git a/Wonky.Client/wwwroot/css/20230614.css b/Wonky.Client/wwwroot/css/20230614.css new file mode 100644 index 00000000..619127ef --- /dev/null +++ b/Wonky.Client/wwwroot/css/20230614.css @@ -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; +} diff --git a/Wonky.Entity/Wonky.Entity.csproj b/Wonky.Entity/Wonky.Entity.csproj index 132c02c5..cfadb03d 100644 --- a/Wonky.Entity/Wonky.Entity.csproj +++ b/Wonky.Entity/Wonky.Entity.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 enable enable diff --git a/global.json b/global.json index 87aef9f1..36e1a9e9 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.0", + "version": "7.0.0", "rollForward": "latestMajor", "allowPrerelease": false }