diff --git a/Wonky.Client/App.razor b/Wonky.Client/App.razor
index d57f60f3..90355fb1 100644
--- a/Wonky.Client/App.razor
+++ b/Wonky.Client/App.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
diff --git a/Wonky.Client/Components/ActivityButton.razor b/Wonky.Client/Components/ActivityButton.razor
new file mode 100644
index 00000000..9adc816b
--- /dev/null
+++ b/Wonky.Client/Components/ActivityButton.razor
@@ -0,0 +1,13 @@
+@if (Enabled)
+{
+ Opret Besøg
+}
+else
+{
+ Opret Besøg
+}
+
+@code {
+ [Parameter] public string? CompanyId { get; set; }
+ [Parameter] public bool Enabled { get; set; }
+}
\ No newline at end of file
diff --git a/Wonky.Client/Components/AppSpinner.razor b/Wonky.Client/Components/AppSpinner.razor
index 68b79a19..7fee2462 100644
--- a/Wonky.Client/Components/AppSpinner.razor
+++ b/Wonky.Client/Components/AppSpinner.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
diff --git a/Wonky.Client/Components/AppVersion.razor b/Wonky.Client/Components/AppVersion.razor
index 2c8d3c35..a6ad2ae8 100644
--- a/Wonky.Client/Components/AppVersion.razor
+++ b/Wonky.Client/Components/AppVersion.razor
@@ -1,23 +1,24 @@
+@using Wonky.Entity.Configuration
+@using Microsoft.Extensions.Options
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
-
@Name @Version@if(IsBeta){
-beta}
+
@Version@if(IsBeta){
-beta}
@code
{
- private const string Version = "0.2.48";
- private const string Name = "wwo";
+ private const string Version = "0.3";
private const bool IsBeta = true;
}
diff --git a/Wonky.Client/Components/AuthLinks.razor.css b/Wonky.Client/Components/AuthLinks.razor.css
deleted file mode 100644
index 487b7ba3..00000000
--- a/Wonky.Client/Components/AuthLinks.razor.css
+++ /dev/null
@@ -1,4 +0,0 @@
-
-a, a:link, a:hover, a:visited, a:active {
- color: #ffaa00;
-}
\ No newline at end of file
diff --git a/Wonky.Client/Components/ColorCoding.razor b/Wonky.Client/Components/ColorCoding.razor
new file mode 100644
index 00000000..7d3eecb1
--- /dev/null
+++ b/Wonky.Client/Components/ColorCoding.razor
@@ -0,0 +1,50 @@
+
+
+
+ Farvekode |
+ Betydning |
+
+
+
+
+
+
+ |
+
+ Ok
+ |
+
+
+
+
+ |
+
+ Planlæg besøg
+ |
+
+
+
+
+ |
+
+ Inteval overskredet
+ |
+
+
+
+
+ |
+
+ Opdatering nødvendig
+ |
+
+
+
+
+ |
+
+ Virksomhed ophørt
+ |
+
+
+
diff --git a/Wonky.Client/Components/ColorCoding.razor.css b/Wonky.Client/Components/ColorCoding.razor.css
new file mode 100644
index 00000000..002017f5
--- /dev/null
+++ b/Wonky.Client/Components/ColorCoding.razor.css
@@ -0,0 +1,4 @@
+
+.color-code {
+ max-width: 40px;
+}
\ No newline at end of file
diff --git a/Wonky.Client/Components/CompanyListHeader.razor b/Wonky.Client/Components/CompanyListHeader.razor
index bf8e2938..7c975db0 100644
--- a/Wonky.Client/Components/CompanyListHeader.razor
+++ b/Wonky.Client/Components/CompanyListHeader.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
diff --git a/Wonky.Client/Components/CompanySearchDropdown.razor b/Wonky.Client/Components/CompanySearchDropdown.razor
index 83cb439c..09d6927b 100644
--- a/Wonky.Client/Components/CompanySearchDropdown.razor
+++ b/Wonky.Client/Components/CompanySearchDropdown.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
diff --git a/Wonky.Client/Components/CompanySearchDropdown.razor.cs b/Wonky.Client/Components/CompanySearchDropdown.razor.cs
index 252ff5dd..5115e89b 100644
--- a/Wonky.Client/Components/CompanySearchDropdown.razor.cs
+++ b/Wonky.Client/Components/CompanySearchDropdown.razor.cs
@@ -1,16 +1,16 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
diff --git a/Wonky.Client/Components/CompanySortDropdown.razor b/Wonky.Client/Components/CompanySortDropdown.razor
index 4ead8fd4..c8f6af77 100644
--- a/Wonky.Client/Components/CompanySortDropdown.razor
+++ b/Wonky.Client/Components/CompanySortDropdown.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
diff --git a/Wonky.Client/Components/CompanySortDropdown.razor.cs b/Wonky.Client/Components/CompanySortDropdown.razor.cs
index a91621db..df2623f2 100644
--- a/Wonky.Client/Components/CompanySortDropdown.razor.cs
+++ b/Wonky.Client/Components/CompanySortDropdown.razor.cs
@@ -1,16 +1,16 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
diff --git a/Wonky.Client/Components/CompanyTable.razor b/Wonky.Client/Components/CompanyTable.razor
index d058fe11..f01295fe 100644
--- a/Wonky.Client/Components/CompanyTable.razor
+++ b/Wonky.Client/Components/CompanyTable.razor
@@ -1,38 +1,51 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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.Components;
@using Wonky.Client.Helpers;
+
@if (Companies.Any())
{
-
+
+
+
+ |
+ Navn |
+ Konto |
+ Bynavn |
+ |
+
+
+
@foreach (var company in Companies)
{
- - NavigateCompany(company.CompanyId)">
-
-
- @company.Name
-
-
Konto:@company.Account
Bynavn:@company.City
-
- Vis
-
+
+ |
+ @company.Name |
+ @company.Account |
+ @company.City |
+
+ Vis
+
+ |
+
}
-
+
+
}
else
{
diff --git a/Wonky.Client/Components/CompanyTable.razor.cs b/Wonky.Client/Components/CompanyTable.razor.cs
index 03b534f1..723d75e0 100644
--- a/Wonky.Client/Components/CompanyTable.razor.cs
+++ b/Wonky.Client/Components/CompanyTable.razor.cs
@@ -1,35 +1,46 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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 Blazored.LocalStorage;
using Microsoft.AspNetCore.Components;
+using Wonky.Client.Helpers;
+using Wonky.Client.Services;
using Wonky.Client.Shared;
using Wonky.Entity.DTO;
+using Wonky.Entity.Views;
namespace Wonky.Client.Components
{
public partial class CompanyTable
{
- [Parameter] public List Companies { get; set; } = new();
+ [Parameter] public List Companies { get; set; } = new();
[Parameter] public EventCallback OnDelete { get; set; }
[Parameter] public EventCallback OnSelect { get; set; }
[Inject] public NavigationManager NavManager { get; set; }
+ [Inject] public VatUtils VatUtils { get; set; }
+ [Inject] public ILocalStorageService Storage { get; set; }
private Confirmation _confirmation = new ();
private string _companyId = string.Empty;
-
+ private UserInfoView _user = new();
+
+ protected override async Task OnInitializedAsync()
+ {
+ _user = await Storage.GetItemAsync("_xu").ConfigureAwait(true);
+ }
private void CallConfirmationModal(string companyId)
{
_companyId = companyId;
diff --git a/Wonky.Client/Components/DisplayStateComponent.razor b/Wonky.Client/Components/DisplayStateComponent.razor
index 6f292acf..e68f279a 100644
--- a/Wonky.Client/Components/DisplayStateComponent.razor
+++ b/Wonky.Client/Components/DisplayStateComponent.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
diff --git a/Wonky.Client/Components/Home.razor b/Wonky.Client/Components/Home.razor
index 17212e4b..8ddfeb12 100644
--- a/Wonky.Client/Components/Home.razor
+++ b/Wonky.Client/Components/Home.razor
@@ -1,18 +1,61 @@
+@using Microsoft.AspNetCore.Authorization
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
+@attribute [Authorize]
+
Innotec Danmark A/S
+
+
+
+ @_workDate
+
+ Dagens aktivitet
+
+
+
+ Kunde |
+ Demo |
+ Salg |
+ Sum |
+
+
+
+ @if (Activities != null)
+ {
+ foreach (var activity in Activities)
+ {
+
+
+ @activity.Company.Name
+ |
+
+ @activity.Demo
+ |
+
+ @activity.SalesResume
+ |
+
+ @activity.OrderAmount
+ |
+
+ }
+ }
+
+
+
+
diff --git a/Wonky.Client/Components/Home.razor.cs b/Wonky.Client/Components/Home.razor.cs
index c54bcfbb..6d63997d 100644
--- a/Wonky.Client/Components/Home.razor.cs
+++ b/Wonky.Client/Components/Home.razor.cs
@@ -1,25 +1,56 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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 Blazored.LocalStorage;
using Microsoft.AspNetCore.Components;
+using Microsoft.VisualBasic;
+using Wonky.Client.HttpRepository;
+using Wonky.Client.Services;
+using Wonky.Client.Shared;
+using Wonky.Entity.DTO;
+using Wonky.Entity.Models;
-namespace Wonky.Client.Components
+namespace Wonky.Client.Components;
+public partial class Home
{
- public partial class Home
+ [Inject] public ILocalStorageService Storage { get; set; }
+ [Inject] public ILogger Logger { get; set; }
+ [Inject] public UserPreferenceService Prefernces { get; set; }
+ [Inject] public NavigationManager Navigator { get; set; }
+ [Inject] public IActivityHttpRepository ActivityRepo { get; set; }
+ private Preferences _prefs = new();
+ private string _workDate;
+ private List Activities { get; set; }
+
+
+ protected override async Task OnInitializedAsync()
{
- [Parameter] public RenderFragment? LoginContent { get; set; }
- }
+ if (string.IsNullOrWhiteSpace(await Storage.GetItemAsStringAsync("_xa").ConfigureAwait(true)))
+ Navigator.NavigateTo("/login/home");
+ _prefs = await Prefernces.GetPreferences();
+ if (string.IsNullOrWhiteSpace(_prefs.WorkDate))
+ {
+ await Prefernces.SetWorkDate(DateTime.Now);
+ }
+
+ _workDate = DateTime.Parse(_prefs.WorkDate).ToLongDateString();
+
+ Activities = await ActivityRepo.GetActivities(_prefs.WorkDate).ConfigureAwait(true);
+
+ }
+
}
+
diff --git a/Wonky.Client/Components/ItemGroupDropdown.razor b/Wonky.Client/Components/ItemGroupDropdown.razor
index b4f08019..73957f29 100644
--- a/Wonky.Client/Components/ItemGroupDropdown.razor
+++ b/Wonky.Client/Components/ItemGroupDropdown.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
diff --git a/Wonky.Client/Components/ItemGroupDropdown.razor.cs b/Wonky.Client/Components/ItemGroupDropdown.razor.cs
index f9069ada..99218039 100644
--- a/Wonky.Client/Components/ItemGroupDropdown.razor.cs
+++ b/Wonky.Client/Components/ItemGroupDropdown.razor.cs
@@ -1,15 +1,15 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
diff --git a/Wonky.Client/Components/ItemSearchDropdown.razor b/Wonky.Client/Components/ItemSearchDropdown.razor
index 4b64e1a6..56ae1541 100644
--- a/Wonky.Client/Components/ItemSearchDropdown.razor
+++ b/Wonky.Client/Components/ItemSearchDropdown.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
diff --git a/Wonky.Client/Components/ItemSearchDropdown.razor.cs b/Wonky.Client/Components/ItemSearchDropdown.razor.cs
index 91e1a168..063e1b61 100644
--- a/Wonky.Client/Components/ItemSearchDropdown.razor.cs
+++ b/Wonky.Client/Components/ItemSearchDropdown.razor.cs
@@ -1,15 +1,15 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
diff --git a/Wonky.Client/Components/ItemSortDropdown.razor b/Wonky.Client/Components/ItemSortDropdown.razor
index 81408146..9319c1ba 100644
--- a/Wonky.Client/Components/ItemSortDropdown.razor
+++ b/Wonky.Client/Components/ItemSortDropdown.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
diff --git a/Wonky.Client/Components/ItemSortDropdown.razor.cs b/Wonky.Client/Components/ItemSortDropdown.razor.cs
index 7095ca01..ef997346 100644
--- a/Wonky.Client/Components/ItemSortDropdown.razor.cs
+++ b/Wonky.Client/Components/ItemSortDropdown.razor.cs
@@ -1,15 +1,15 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
diff --git a/Wonky.Client/Components/ItemTable.razor b/Wonky.Client/Components/ItemTable.razor
index 60f7569a..543839f4 100644
--- a/Wonky.Client/Components/ItemTable.razor
+++ b/Wonky.Client/Components/ItemTable.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
diff --git a/Wonky.Client/Components/ItemTable.razor.cs b/Wonky.Client/Components/ItemTable.razor.cs
index cb416073..2fc85eaf 100644
--- a/Wonky.Client/Components/ItemTable.razor.cs
+++ b/Wonky.Client/Components/ItemTable.razor.cs
@@ -1,15 +1,15 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
@@ -17,6 +17,7 @@ using Blazored.Toast.Services;
using Microsoft.AspNetCore.Components;
using Wonky.Entity.DTO;
using Wonky.Entity.Models;
+using Wonky.Entity.Views;
namespace Wonky.Client.Components;
diff --git a/Wonky.Client/Components/PageSizeDropdown.razor b/Wonky.Client/Components/PageSizeDropdown.razor
index 6d960e07..1e6d0a0d 100644
--- a/Wonky.Client/Components/PageSizeDropdown.razor
+++ b/Wonky.Client/Components/PageSizeDropdown.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
diff --git a/Wonky.Client/Components/PageSizeDropdown.razor.cs b/Wonky.Client/Components/PageSizeDropdown.razor.cs
index 8001c2d5..7d731182 100644
--- a/Wonky.Client/Components/PageSizeDropdown.razor.cs
+++ b/Wonky.Client/Components/PageSizeDropdown.razor.cs
@@ -1,16 +1,16 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
diff --git a/Wonky.Client/Components/Pagination.razor b/Wonky.Client/Components/Pagination.razor
index fefd0de3..1eed6713 100644
--- a/Wonky.Client/Components/Pagination.razor
+++ b/Wonky.Client/Components/Pagination.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
diff --git a/Wonky.Client/Components/Pagination.razor.cs b/Wonky.Client/Components/Pagination.razor.cs
index 107c00cb..e8976382 100644
--- a/Wonky.Client/Components/Pagination.razor.cs
+++ b/Wonky.Client/Components/Pagination.razor.cs
@@ -1,16 +1,16 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
diff --git a/Wonky.Client/Components/RegInfoCompany.razor b/Wonky.Client/Components/RegInfoCompany.razor
index 59e81e79..345274f9 100644
--- a/Wonky.Client/Components/RegInfoCompany.razor
+++ b/Wonky.Client/Components/RegInfoCompany.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
diff --git a/Wonky.Client/Components/RegInfoCompany.razor.cs b/Wonky.Client/Components/RegInfoCompany.razor.cs
index b4c19574..eec2a3d2 100644
--- a/Wonky.Client/Components/RegInfoCompany.razor.cs
+++ b/Wonky.Client/Components/RegInfoCompany.razor.cs
@@ -1,15 +1,15 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
diff --git a/Wonky.Client/Components/SearchPhrase.razor b/Wonky.Client/Components/SearchPhrase.razor
index 5a265598..4c4419e5 100644
--- a/Wonky.Client/Components/SearchPhrase.razor
+++ b/Wonky.Client/Components/SearchPhrase.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
diff --git a/Wonky.Client/Components/SearchPhrase.razor.cs b/Wonky.Client/Components/SearchPhrase.razor.cs
index e8358703..bdfb82f3 100644
--- a/Wonky.Client/Components/SearchPhrase.razor.cs
+++ b/Wonky.Client/Components/SearchPhrase.razor.cs
@@ -1,15 +1,15 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
diff --git a/Wonky.Client/Components/AuthLinks.razor b/Wonky.Client/Components/TopbarDisplayUser.razor
similarity index 67%
rename from Wonky.Client/Components/AuthLinks.razor
rename to Wonky.Client/Components/TopbarDisplayUser.razor
index 4cb28f20..8625b54b 100644
--- a/Wonky.Client/Components/AuthLinks.razor
+++ b/Wonky.Client/Components/TopbarDisplayUser.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
@@ -18,10 +18,6 @@
@using System.Security.Claims
- @context.User.Identity.Name
- Log af
+ @context.User.Identity?.Name
-
- Log ind
-
\ No newline at end of file
diff --git a/Wonky.Client/Pages/About.razor b/Wonky.Client/Components/TopbarNavigation.razor
similarity index 55%
rename from Wonky.Client/Pages/About.razor
rename to Wonky.Client/Components/TopbarNavigation.razor
index 7b419651..554403a3 100644
--- a/Wonky.Client/Pages/About.razor
+++ b/Wonky.Client/Components/TopbarNavigation.razor
@@ -1,29 +1,24 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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.Components
-@page "/About"
-
-
-
-
-
-
-
+*@
+@using System.Security.Claims
+
+
+ Log af
+ INFO
+
+
\ No newline at end of file
diff --git a/Wonky.Client/Components/VatAddressInputComponent.razor b/Wonky.Client/Components/VatAddressInputComponent.razor
index 599bcfac..66293f5b 100644
--- a/Wonky.Client/Components/VatAddressInputComponent.razor
+++ b/Wonky.Client/Components/VatAddressInputComponent.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
diff --git a/Wonky.Client/Components/VatAddressInputComponent.razor.cs b/Wonky.Client/Components/VatAddressInputComponent.razor.cs
index f2bf2307..fce64f84 100644
--- a/Wonky.Client/Components/VatAddressInputComponent.razor.cs
+++ b/Wonky.Client/Components/VatAddressInputComponent.razor.cs
@@ -1,15 +1,15 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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.ComponentModel.DataAnnotations;
diff --git a/Wonky.Client/Components/VatNumberInputComponent.razor b/Wonky.Client/Components/VatNumberInputComponent.razor
index d15509d3..ae635363 100644
--- a/Wonky.Client/Components/VatNumberInputComponent.razor
+++ b/Wonky.Client/Components/VatNumberInputComponent.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
diff --git a/Wonky.Client/Components/VatNumberInputComponent.razor.cs b/Wonky.Client/Components/VatNumberInputComponent.razor.cs
index 1cc67d28..088a8d18 100644
--- a/Wonky.Client/Components/VatNumberInputComponent.razor.cs
+++ b/Wonky.Client/Components/VatNumberInputComponent.razor.cs
@@ -1,15 +1,15 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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.ComponentModel.DataAnnotations;
diff --git a/Wonky.Client/Features/PagingLink.cs b/Wonky.Client/Features/PagingLink.cs
index 754a5827..a4d6c97a 100644
--- a/Wonky.Client/Features/PagingLink.cs
+++ b/Wonky.Client/Features/PagingLink.cs
@@ -1,15 +1,15 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
diff --git a/Wonky.Client/Features/PagingResponse.cs b/Wonky.Client/Features/PagingResponse.cs
index 42bfa151..5cde91c4 100644
--- a/Wonky.Client/Features/PagingResponse.cs
+++ b/Wonky.Client/Features/PagingResponse.cs
@@ -1,15 +1,15 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
diff --git a/Wonky.Client/Helpers/InputDateTime.cs b/Wonky.Client/Helpers/InputDateTime.cs
new file mode 100644
index 00000000..2b4158d4
--- /dev/null
+++ b/Wonky.Client/Helpers/InputDateTime.cs
@@ -0,0 +1,100 @@
+using System.Globalization;
+using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Forms;
+using Microsoft.AspNetCore.Components.Rendering;
+
+namespace Wonky.Client.Helpers;
+
+public class InputDateTime : InputDate
+{
+ private const string DateFormat = "yyyy-MM-ddTHH:mm";
+
+ ///
+ protected override void BuildRenderTree ( RenderTreeBuilder builder )
+ {
+ builder.OpenElement( 0, "input" );
+ builder.AddMultipleAttributes( 1, AdditionalAttributes );
+ builder.AddAttribute( 2, "type", "datetime-local" );
+ builder.AddAttribute( 3, "class", CssClass );
+ builder.AddAttribute( 4, "value", BindConverter.FormatValue( CurrentValueAsString ) );
+ builder.AddAttribute( 5, "onchange", EventCallback.Factory.CreateBinder( this, __value => CurrentValueAsString = __value, CurrentValueAsString ) );
+ builder.CloseElement();
+ }
+
+ ///
+ protected override string FormatValueAsString ( TValue value )
+ {
+ switch ( value )
+ {
+ case DateTime dateTimeValue:
+ return BindConverter.FormatValue( dateTimeValue, DateFormat, CultureInfo.InvariantCulture );
+ case DateTimeOffset dateTimeOffsetValue:
+ return BindConverter.FormatValue( dateTimeOffsetValue, DateFormat, CultureInfo.InvariantCulture );
+ default:
+ return string.Empty; // Handles null for Nullable, etc.
+ }
+ }
+
+ ///
+ protected override bool TryParseValueFromString ( string value, out TValue result, out string validationErrorMessage )
+ {
+ // Unwrap nullable types. We don't have to deal with receiving empty values for nullable
+ // types here, because the underlying InputBase already covers that.
+ var targetType = Nullable.GetUnderlyingType( typeof( TValue ) ) ?? typeof( TValue );
+
+ bool success;
+ if ( targetType == typeof( DateTime ) )
+ {
+ success = TryParseDateTime( value, out result );
+ }
+ else if ( targetType == typeof( DateTimeOffset ) )
+ {
+ success = TryParseDateTimeOffset( value, out result );
+ }
+ else
+ {
+ throw new InvalidOperationException( $"The type '{targetType}' is not a supported date type." );
+ }
+
+ if ( success )
+ {
+ validationErrorMessage = null;
+ return true;
+ }
+ else
+ {
+ validationErrorMessage = string.Format( ParsingErrorMessage, FieldIdentifier.FieldName );
+ return false;
+ }
+ }
+
+ static bool TryParseDateTime ( string value, out TValue result )
+ {
+ var success = BindConverter.TryConvertToDateTime( value, CultureInfo.InvariantCulture, DateFormat, out var parsedValue );
+ if ( success )
+ {
+ result = (TValue)(object)parsedValue;
+ return true;
+ }
+ else
+ {
+ result = default;
+ return false;
+ }
+ }
+
+ static bool TryParseDateTimeOffset ( string value, out TValue result )
+ {
+ var success = BindConverter.TryConvertToDateTimeOffset( value, CultureInfo.InvariantCulture, DateFormat, out var parsedValue );
+ if ( success )
+ {
+ result = (TValue)(object)parsedValue;
+ return true;
+ }
+ else
+ {
+ result = default;
+ return false;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Wonky.Client/Helpers/Squid.cs b/Wonky.Client/Helpers/Squid.cs
index e1040235..aa4a2c56 100644
--- a/Wonky.Client/Helpers/Squid.cs
+++ b/Wonky.Client/Helpers/Squid.cs
@@ -9,16 +9,16 @@
//
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
// Derived from https:github.com/csharpvitamins/CSharpVitamins.ShortGuid
diff --git a/Wonky.Client/Helpers/Utils.cs b/Wonky.Client/Helpers/Utils.cs
index 162b5705..263e6685 100644
--- a/Wonky.Client/Helpers/Utils.cs
+++ b/Wonky.Client/Helpers/Utils.cs
@@ -1,19 +1,20 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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;
+using Wonky.Entity.DTO;
namespace Wonky.Client.Helpers;
diff --git a/Wonky.Client/HttpInterceptors/HttpInterceptorService.cs b/Wonky.Client/HttpInterceptors/HttpInterceptorService.cs
index e81aca6c..749d6f17 100644
--- a/Wonky.Client/HttpInterceptors/HttpInterceptorService.cs
+++ b/Wonky.Client/HttpInterceptors/HttpInterceptorService.cs
@@ -1,15 +1,15 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
@@ -102,7 +102,7 @@ namespace Wonky.Client.HttpInterceptors
_toast.ShowInfo(message);
break;
default: _navigation.NavigateTo("/500");
- message = "500 - Internal server error";
+ message = "500 - Intern server fejl";
break;
}
throw new HttpResponseException(message);
diff --git a/Wonky.Client/HttpInterceptors/HttpResponseException.cs b/Wonky.Client/HttpInterceptors/HttpResponseException.cs
index 61489b32..568355a9 100644
--- a/Wonky.Client/HttpInterceptors/HttpResponseException.cs
+++ b/Wonky.Client/HttpInterceptors/HttpResponseException.cs
@@ -1,15 +1,15 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
diff --git a/Wonky.Client/HttpRepository/ActivityHttpRepository.cs b/Wonky.Client/HttpRepository/ActivityHttpRepository.cs
index 8e8e0681..851fc5f2 100644
--- a/Wonky.Client/HttpRepository/ActivityHttpRepository.cs
+++ b/Wonky.Client/HttpRepository/ActivityHttpRepository.cs
@@ -1,15 +1,15 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
@@ -25,7 +25,9 @@ using Microsoft.AspNetCore.WebUtilities;
using Microsoft.Extensions.Options;
using Wonky.Entity.Configuration;
using Wonky.Entity.DTO;
+using Wonky.Entity.Models;
using Wonky.Entity.Requests;
+using Wonky.Entity.Views;
namespace Wonky.Client.HttpRepository;
@@ -62,7 +64,7 @@ public class ActivityHttpRepository : IActivityHttpRepository
? new List()
: JsonSerializer.Deserialize>(content, _options);
}
- public async Task> GetActivityPaged(ActivityPagingParams pagingParameters)
+ public async Task> GetActivityPaged(ActivityPagingParams pagingParameters)
{
var queryString = new Dictionary
{
@@ -77,16 +79,16 @@ public class ActivityHttpRepository : IActivityHttpRepository
var content = await response.Content.ReadAsStringAsync();
- var pagingResponse = new PagingResponse
+ var pagingResponse = new PagingResponse
{
- Items = JsonSerializer.Deserialize>(content, _options),
+ Items = JsonSerializer.Deserialize>(content, _options),
MetaData = JsonSerializer.Deserialize(
response.Headers.GetValues("X-Pagination").First(), _options)
};
return pagingResponse;
}
- public async Task CreateActivity(DtoNgActivity model)
+ public async Task CreateActivity(ActivityDto model)
{
Console.WriteLine(JsonSerializer.Serialize(model));
var response = await _client.PostAsJsonAsync($"{_apiConfig.ActivityEndpoint}", model).ConfigureAwait(true);
@@ -95,11 +97,11 @@ public class ActivityHttpRepository : IActivityHttpRepository
return result!;
}
- public async Task GetActivity(string id)
+ public async Task GetActivity(string id)
{
var salesItem = await _client
- .GetFromJsonAsync($"{_apiConfig.ActivityEndpoint}/{id}").ConfigureAwait(true);
- return salesItem ?? new DtoNgActivity();
+ .GetFromJsonAsync($"{_apiConfig.ActivityEndpoint}/{id}").ConfigureAwait(true);
+ return salesItem ?? new ActivityDto();
}
public async Task AcceptOffer(string id)
diff --git a/Wonky.Client/HttpRepository/CompanyHttpRepository.cs b/Wonky.Client/HttpRepository/CompanyHttpRepository.cs
index 5e544306..05b41256 100644
--- a/Wonky.Client/HttpRepository/CompanyHttpRepository.cs
+++ b/Wonky.Client/HttpRepository/CompanyHttpRepository.cs
@@ -1,15 +1,15 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
@@ -54,7 +54,7 @@ public class CompanyHttpRepository : ICompanyHttpRepository
_apiConfig = apiConfig.Value;
}
- public async Task> GetCompaniesPaged(CompanyPagingParams pagingParameters)
+ public async Task> GetCompaniesPaged(CompanyPagingParams pagingParameters)
{
var queryString = new Dictionary
{
@@ -70,38 +70,38 @@ public class CompanyHttpRepository : ICompanyHttpRepository
var content = await response.Content.ReadAsStringAsync();
- var pagingResponse = new PagingResponse
+ var pagingResponse = new PagingResponse
{
- Items = JsonSerializer.Deserialize>(content, _options),
+ Items = JsonSerializer.Deserialize>(content, _options),
MetaData = JsonSerializer.Deserialize(response.Headers.GetValues("X-Pagination").First(), _options)
};
return pagingResponse;
}
- public async Task GetCompanyByAccount(string accountNumber)
+ public async Task GetCompanyByAccount(string accountNumber)
{
- var company = await _client.GetFromJsonAsync($"{_apiConfig.CustomerEndpoint}/account/{accountNumber}");
- return company ?? new DtoNgCompany();
+ var company = await _client.GetFromJsonAsync($"{_apiConfig.CustomerEndpoint}/account/{accountNumber}");
+ return company ?? new CompanyDto();
}
- public async Task GetCompanyById(string companyId)
+ public async Task GetCompanyById(string companyId)
{
- var company = await _client.GetFromJsonAsync($"{_apiConfig.CustomerEndpoint}/{companyId}");
- return company ?? new DtoNgCompany();
+ var company = await _client.GetFromJsonAsync($"{_apiConfig.CustomerEndpoint}/{companyId}");
+ return company ?? new CompanyDto();
}
- public async Task CreateCompany(DtoNgCompany dtoNgCompany)
+ public async Task CreateCompany(CompanyDto companyDto)
{
- var response = await _client.PostAsJsonAsync($"{_apiConfig.CustomerEndpoint}", dtoNgCompany);
+ var response = await _client.PostAsJsonAsync($"{_apiConfig.CustomerEndpoint}", companyDto);
var content = await response.Content.ReadAsStringAsync();
- var result = JsonSerializer.Deserialize(content);
+ var result = JsonSerializer.Deserialize(content);
Console.WriteLine(content);
return result.CompanyId;
}
- public async Task UpdateCompany(DtoNgCompany dtoNgCompany)
+ public async Task UpdateCompany(CompanyDto companyDto)
{
- await _client.PutAsJsonAsync($"{_apiConfig.CustomerEndpoint}/{dtoNgCompany.CompanyId}", dtoNgCompany);
+ await _client.PutAsJsonAsync($"{_apiConfig.CustomerEndpoint}/{companyDto.CompanyId}", companyDto);
}
public async Task DeleteCompany(string companyId)
diff --git a/Wonky.Client/HttpRepository/IActivityHttpRepository.cs b/Wonky.Client/HttpRepository/IActivityHttpRepository.cs
index dcac6b3f..fa7812d3 100644
--- a/Wonky.Client/HttpRepository/IActivityHttpRepository.cs
+++ b/Wonky.Client/HttpRepository/IActivityHttpRepository.cs
@@ -1,30 +1,32 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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.Threading.Tasks;
using Wonky.Client.Features;
using Wonky.Entity.DTO;
+using Wonky.Entity.Models;
using Wonky.Entity.Requests;
+using Wonky.Entity.Views;
namespace Wonky.Client.HttpRepository;
public interface IActivityHttpRepository
{
- Task> GetActivityPaged(ActivityPagingParams pagingParameters);
- Task GetActivity(string id);
- Task CreateActivity(DtoNgActivity model);
+ Task> GetActivityPaged(ActivityPagingParams pagingParameters);
+ Task GetActivity(string id);
+ Task CreateActivity(ActivityDto model);
Task AcceptOffer(string id);
Task?> GetActivities(string activityDate);
}
\ No newline at end of file
diff --git a/Wonky.Client/HttpRepository/ICompanyHttpRepository.cs b/Wonky.Client/HttpRepository/ICompanyHttpRepository.cs
index c3b76c19..f8f203ca 100644
--- a/Wonky.Client/HttpRepository/ICompanyHttpRepository.cs
+++ b/Wonky.Client/HttpRepository/ICompanyHttpRepository.cs
@@ -1,15 +1,15 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
@@ -22,10 +22,10 @@ namespace Wonky.Client.HttpRepository;
public interface ICompanyHttpRepository
{
- Task> GetCompaniesPaged(CompanyPagingParams pagingParameters);
- Task GetCompanyByAccount(string accountNumber);
- Task GetCompanyById(string companyId);
- Task CreateCompany(DtoNgCompany dtoNgCompany);
- Task UpdateCompany(DtoNgCompany dtoNgCompany);
+ Task> GetCompaniesPaged(CompanyPagingParams pagingParameters);
+ Task GetCompanyByAccount(string accountNumber);
+ Task GetCompanyById(string companyId);
+ Task CreateCompany(CompanyDto companyDto);
+ Task UpdateCompany(CompanyDto companyDto);
Task DeleteCompany(string companyId);
}
\ No newline at end of file
diff --git a/Wonky.Client/HttpRepository/ISalesItemHttpRepository.cs b/Wonky.Client/HttpRepository/ISalesItemHttpRepository.cs
index 313d2cec..db570bc1 100644
--- a/Wonky.Client/HttpRepository/ISalesItemHttpRepository.cs
+++ b/Wonky.Client/HttpRepository/ISalesItemHttpRepository.cs
@@ -1,15 +1,15 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
@@ -17,6 +17,7 @@ using System.Threading.Tasks;
using Wonky.Client.Features;
using Wonky.Entity.DTO;
using Wonky.Entity.Requests;
+using Wonky.Entity.Views;
namespace Wonky.Client.HttpRepository;
diff --git a/Wonky.Client/HttpRepository/SalesItemHttpRepository.cs b/Wonky.Client/HttpRepository/SalesItemHttpRepository.cs
index 36394954..3b018b0b 100644
--- a/Wonky.Client/HttpRepository/SalesItemHttpRepository.cs
+++ b/Wonky.Client/HttpRepository/SalesItemHttpRepository.cs
@@ -1,15 +1,15 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
@@ -26,6 +26,7 @@ using Microsoft.Extensions.Options;
using Wonky.Entity.Configuration;
using Wonky.Entity.DTO;
using Wonky.Entity.Requests;
+using Wonky.Entity.Views;
namespace Wonky.Client.HttpRepository;
diff --git a/Wonky.Client/Models/Draft.cs b/Wonky.Client/Models/Draft.cs
index 75f27235..6672150c 100644
--- a/Wonky.Client/Models/Draft.cs
+++ b/Wonky.Client/Models/Draft.cs
@@ -1,4 +1,5 @@
using Wonky.Entity.DTO;
+using Wonky.Entity.Views;
namespace Wonky.Client.Models;
diff --git a/Wonky.Client/Pages/CompanyCreate.razor b/Wonky.Client/Pages/CompanyCreate.razor
index 572ab5cc..74ebdf52 100644
--- a/Wonky.Client/Pages/CompanyCreate.razor
+++ b/Wonky.Client/Pages/CompanyCreate.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
@@ -57,7 +57,7 @@
-
+
@@ -67,73 +67,73 @@
Reg.nr. |
|
-
+
|
Firmanavn |
|
-
-
+
+
|
Adresse |
|
-
+
|
Conavn |
|
-
+
|
Postnr |
|
-
-
+
+
|
Bynavn |
|
-
-
+
+
|
Telefon |
|
-
+
|
Mobil |
|
-
+
|
Email |
|
-
+
|
Attention |
|
-
+
|
diff --git a/Wonky.Client/Pages/CompanyCreate.razor.cs b/Wonky.Client/Pages/CompanyCreate.razor.cs
index 20419a59..25029114 100644
--- a/Wonky.Client/Pages/CompanyCreate.razor.cs
+++ b/Wonky.Client/Pages/CompanyCreate.razor.cs
@@ -1,15 +1,15 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
@@ -30,6 +30,7 @@ using Wonky.Client.Models;
using Wonky.Entity.DTO;
using Wonky.Entity.Models;
using Wonky.Entity.Requests;
+using Wonky.Entity.Views;
namespace Wonky.Client.Pages
{
@@ -43,7 +44,7 @@ namespace Wonky.Client.Pages
[Inject] public HttpInterceptorService Interceptor { get; set; }
[Inject] public VatInfoLookupService VatInfoLookupService { get; set; }
private List VInfos { get; set; } = new();
- private DtoNgCompany _dtoNgCompany = new();
+ private CompanyDto _companyDto = new();
private VirkRegInfo _virkRegInfo = new();
private EditContext _createCompany;
private bool _formInvalid = true;
@@ -53,12 +54,12 @@ namespace Wonky.Client.Pages
protected override async Task OnInitializedAsync()
{
_vatUtils = new VatUtils();
- _createCompany = new EditContext(_dtoNgCompany);
+ _createCompany = new EditContext(_companyDto);
_createCompany.OnFieldChanged += HandleFieldChanged;
var ux = await StorageService.GetItemAsync("_xu");
- _dtoNgCompany.SalesRepId = ux.Id;
- _dtoNgCompany.CountryCode = ux.CountryCode;
+ _companyDto.SalesRepId = ux.Id;
+ _companyDto.CountryCode = ux.CountryCode;
Interceptor.RegisterEvent();
Interceptor.RegisterBeforeSendEvent();
}
@@ -93,24 +94,24 @@ namespace Wonky.Client.Pages
{
_virkRegInfo = (from x in VInfos where x.VatNumber == vatNumber select x).First();
RegState = _virkRegInfo.States[^1].State == "NORMAL" ? "the-good" : "the-ugly";
- _dtoNgCompany.Name = _virkRegInfo.Name;
- _dtoNgCompany.Address1 = _virkRegInfo.Address;
- _dtoNgCompany.Address2 = _virkRegInfo.CoName;
- _dtoNgCompany.ZipCode = _virkRegInfo.ZipCode;
- _dtoNgCompany.City = _virkRegInfo.City;
- _dtoNgCompany.VatNumber = _virkRegInfo.VatNumber;
+ _companyDto.Name = _virkRegInfo.Name;
+ _companyDto.Address1 = _virkRegInfo.Address;
+ _companyDto.Address2 = _virkRegInfo.CoName;
+ _companyDto.ZipCode = _virkRegInfo.ZipCode;
+ _companyDto.City = _virkRegInfo.City;
+ _companyDto.VatNumber = _virkRegInfo.VatNumber;
}
private async Task Create()
{
- var newId = await CompanyRepo.CreateCompany(_dtoNgCompany);
+ var newId = await CompanyRepo.CreateCompany(_companyDto);
Console.WriteLine(newId);
- ToastService.ShowSuccess($"Godt så! '{_dtoNgCompany.Name}' er oprettet i CRM.");
+ ToastService.ShowSuccess($"Godt så! '{_companyDto.Name}' er oprettet i CRM.");
Navigation.NavigateTo($"/company/id/{newId}");
}
private void HandleFieldChanged(object sender, FieldChangedEventArgs e)
{
- if (!_vatUtils.ValidateFormat(_dtoNgCompany.CountryCode, _dtoNgCompany.VatNumber))
+ if (!_vatUtils.ValidateFormat(_companyDto.CountryCode, _companyDto.VatNumber))
{
_formInvalid = false;
}
@@ -124,7 +125,7 @@ namespace Wonky.Client.Pages
{
_formInvalid = true;
_createCompany.OnFieldChanged -= HandleFieldChanged;
- _createCompany = new EditContext(_dtoNgCompany);
+ _createCompany = new EditContext(_companyDto);
_createCompany.OnFieldChanged += HandleFieldChanged;
_createCompany.OnValidationStateChanged -= ValidationChanged;
}
diff --git a/Wonky.Client/Pages/CompanyList.razor b/Wonky.Client/Pages/CompanyList.razor
index f1db101c..e84f32de 100644
--- a/Wonky.Client/Pages/CompanyList.razor
+++ b/Wonky.Client/Pages/CompanyList.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
@@ -36,7 +36,7 @@
diff --git a/Wonky.Client/Pages/CompanyList.razor.cs b/Wonky.Client/Pages/CompanyList.razor.cs
index 1b2ed43a..da2e1783 100644
--- a/Wonky.Client/Pages/CompanyList.razor.cs
+++ b/Wonky.Client/Pages/CompanyList.razor.cs
@@ -1,15 +1,15 @@
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
@@ -32,7 +32,7 @@ namespace Wonky.Client.Pages
[Inject] private UserPreferenceService UserPrefService { get; set; }
[Inject] public ICompanyHttpRepository CompanyRepo { get; set; }
[Inject] public HttpInterceptorService Interceptor { get; set; }
- public List? Companies { get; set; } = new();
+ public List? Companies { get; set; } = new();
public MetaData? MetaData { get; set; } = new();
private CompanyPagingParams _paging = new();
private Preferences _preferences { get; set; } = new();
@@ -54,21 +54,21 @@ namespace Wonky.Client.Pages
private async Task SelectedPage(int page)
{
- Companies = new List();
+ Companies = new List();
_paging.PageNumber = page;
await GetCompanies();
}
private async Task SetSearchCol(string searchColumn)
{
- Companies = new List();
+ Companies = new List();
_paging.SearchColumn = searchColumn;
_paging.PageNumber = 1;
await GetCompanies();
}
private async Task SetPageSize(string pageSize)
{
- Companies = new List();
+ Companies = new List();
_paging.PageSize = Convert.ToInt32(pageSize);
_paging.PageNumber = 1;
await GetCompanies();
@@ -76,7 +76,7 @@ namespace Wonky.Client.Pages
private async Task SetSearchPhrase(string searchTerm)
{
- Companies = new List();
+ Companies = new List();
_paging.PageNumber = 1;
_paging.SearchTerm = searchTerm;
await GetCompanies();
@@ -84,14 +84,14 @@ namespace Wonky.Client.Pages
private async Task SetSortCol(string orderBy)
{
- Companies = new List();
+ Companies = new List();
_paging.OrderBy = orderBy;
await GetCompanies();
}
private async Task DeleteCompany(string companyId)
{
- Companies = new List();
+ Companies = new List();
await CompanyRepo.DeleteCompany(companyId);
if (_paging.PageNumber > 1 && Companies.Count == 1)
_paging.PageNumber--;
diff --git a/Wonky.Client/Pages/CompanyUpdate.razor b/Wonky.Client/Pages/CompanyUpdate.razor
index 5c460559..d4908f51 100644
--- a/Wonky.Client/Pages/CompanyUpdate.razor
+++ b/Wonky.Client/Pages/CompanyUpdate.razor
@@ -1,16 +1,16 @@
@*
// 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 Affero GNU General Public License as
+// 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
-// Affero GNU General Public License for more details.
+// GNU Affero General Public License for more details.
//
-// You should have received a copy of the Affero GNU General Public License
+// 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]
//
*@
@@ -21,11 +21,11 @@
@attribute [Authorize(Roles = "Adviser")]
@page "/company/{CompanyId}/update"
-@if (DtoNgCompany != null)
+@if (CompanyDto != null)
{
@@ -64,71 +64,71 @@
CVR/ORG
-
-
+
+