From 23c492b63713a340d2c196302c49cec81b6358d3 Mon Sep 17 00:00:00 2001
From: Frede Hundewadt <22748698+fhdk@users.noreply.github.com>
Date: Thu, 30 Jun 2022 13:47:01 +0200
Subject: [PATCH] wip
---
.../Components/ActivityTableComponent.razor | 4 +-
.../Components/ReportSummaryComponent.razor | 42 ++--
.../Components/TopbarDisplayUser.razor | 4 +-
.../Components/TopbarNavigation.razor | 6 +-
Wonky.Client/Pages/ActivityVisitNew.razor | 23 +-
Wonky.Client/Pages/ActivityVisitNew.razor.cs | 11 +-
Wonky.Client/Pages/AdminSalesReportView.razor | 9 +-
Wonky.Client/Pages/SalesReportView.razor | 11 +-
Wonky.Client/Shared/MainLayout.razor | 11 +-
Wonky.Client/wwwroot/appsettings.json | 2 +-
Wonky.Client/wwwroot/css/report-print.css | 30 +++
Wonky.Client/wwwroot/index.html | 3 +-
Wonky.Entity/DTO/ActivityDto.cs | 199 +++++++++++++++---
13 files changed, 275 insertions(+), 80 deletions(-)
create mode 100644 Wonky.Client/wwwroot/css/report-print.css
diff --git a/Wonky.Client/Components/ActivityTableComponent.razor b/Wonky.Client/Components/ActivityTableComponent.razor
index 7224d1a4..9535f6c8 100644
--- a/Wonky.Client/Components/ActivityTableComponent.razor
+++ b/Wonky.Client/Components/ActivityTableComponent.razor
@@ -17,9 +17,9 @@
@if (Activities.Any())
{
-
+
-
+
Besøg
Demo
Salg
diff --git a/Wonky.Client/Components/ReportSummaryComponent.razor b/Wonky.Client/Components/ReportSummaryComponent.razor
index 2e77f0ec..e1dd7056 100644
--- a/Wonky.Client/Components/ReportSummaryComponent.razor
+++ b/Wonky.Client/Components/ReportSummaryComponent.razor
@@ -15,9 +15,9 @@
//
*@
-
+
-
+
Dagens Demo @(Report.NewDemoCount + Report.RecallDemoCount)
Dagens Resultat
@@ -25,7 +25,7 @@
-
+
Besøg
Demo
@@ -82,9 +82,9 @@
-
+
-
+
Km Aften
@@ -116,20 +116,18 @@
-@if (!string.IsNullOrWhiteSpace(Report.Description) || !string.IsNullOrWhiteSpace(Report.SupervisedBy))
-{
-
-
-
- Tekst
- Medkørende Supervisor
-
-
-
-
- @Report.Description
- @Report.SupervisedBy
-
-
-
-}
+
+
+
+
+ Beskrivelse
+ Medkørende Supervisor
+
+
+
+
+ @Report.Description
+ @Report.SupervisedBy
+
+
+
diff --git a/Wonky.Client/Components/TopbarDisplayUser.razor b/Wonky.Client/Components/TopbarDisplayUser.razor
index 8625b54b..f6331a3c 100644
--- a/Wonky.Client/Components/TopbarDisplayUser.razor
+++ b/Wonky.Client/Components/TopbarDisplayUser.razor
@@ -18,6 +18,8 @@
@using System.Security.Claims
- @context.User.Identity?.Name
+
+ @context.User.Identity?.Name
+
\ No newline at end of file
diff --git a/Wonky.Client/Components/TopbarNavigation.razor b/Wonky.Client/Components/TopbarNavigation.razor
index 995c5f35..cff72bfb 100644
--- a/Wonky.Client/Components/TopbarNavigation.razor
+++ b/Wonky.Client/Components/TopbarNavigation.razor
@@ -18,7 +18,9 @@
@using System.Security.Claims
- LOG AF
- HJÆLP
+
\ No newline at end of file
diff --git a/Wonky.Client/Pages/ActivityVisitNew.razor b/Wonky.Client/Pages/ActivityVisitNew.razor
index 7240d436..a2f27512 100644
--- a/Wonky.Client/Pages/ActivityVisitNew.razor
+++ b/Wonky.Client/Pages/ActivityVisitNew.razor
@@ -52,7 +52,7 @@
Ingen salg
- @if (!string.IsNullOrEmpty(_draft.VatNumber))
+ @if (!string.IsNullOrEmpty(_draft.VatNumber) && string.IsNullOrWhiteSpace(_draft.Address1))
{
Bestilling
Tilbud
@@ -70,43 +70,38 @@
Epost
-
-
+
+
Rekvisition
-
+
Indkøber
-
+
Note /Kontor
-
+
-
Note /Mig
+
Note /Selv
-
+
diff --git a/Wonky.Client/Pages/ActivityVisitNew.razor.cs b/Wonky.Client/Pages/ActivityVisitNew.razor.cs
index 512158cd..3f8b5e9f 100644
--- a/Wonky.Client/Pages/ActivityVisitNew.razor.cs
+++ b/Wonky.Client/Pages/ActivityVisitNew.razor.cs
@@ -118,7 +118,7 @@ public partial class ActivityVisitNew : IDisposable
_draft.SalesRep = _ux.Adviser;
_draft.Account = _company.Account;
_draft.VatNumber = _company.VatNumber;
- _draft.EMail = _company.Email;
+ _draft.Email = _company.Email;
_draft.Phone = _company.Phone;
_draft.Mobile = _company.Mobile;
@@ -146,9 +146,14 @@ public partial class ActivityVisitNew : IDisposable
private async Task CreateActivity()
{
+ if (string.IsNullOrWhiteSpace(_draft.Address1))
+ {
+ _toast.ShowError("Kunde adresse er ufuldstændig.");
+ return;
+ }
+
HideButtons = true;
_draft.ActivityDate = _prefs.WorkDate;
-
var activityType = _draft.ActivityTypeEnum switch
{
"phone" => "T:",
@@ -279,7 +284,7 @@ public partial class ActivityVisitNew : IDisposable
InvalidActivity = InvalidActivityType
|| _poFormInvalid
|| DraftStateProvider.Draft.Items.Count == 0
- || (_draft.ActivityStatusEnum == "offer" && string.IsNullOrWhiteSpace(_draft.EMail));
+ || (_draft.ActivityStatusEnum == "offer" && string.IsNullOrWhiteSpace(_draft.Email));
if (InvalidActivity)
{
diff --git a/Wonky.Client/Pages/AdminSalesReportView.razor b/Wonky.Client/Pages/AdminSalesReportView.razor
index 3a1d44b2..1cfb15ca 100644
--- a/Wonky.Client/Pages/AdminSalesReportView.razor
+++ b/Wonky.Client/Pages/AdminSalesReportView.razor
@@ -20,18 +20,23 @@
@page "/admin/users/advisers/{CountryCode}/{UserId}/reports/{ReportDate}"
@attribute [Authorize(Roles = "Admin")]
+@_report.Report.Name
+