From b82bc43ded488eb98c5b46a23f1e90518b743529 Mon Sep 17 00:00:00 2001 From: Frede Hundewadt Date: Sun, 15 Jan 2023 13:42:04 +0100 Subject: [PATCH] cosmetic when in portrait mode on tablet --- .../AdvisorActivityListComponent.razor | 92 +++++++++++ ...AdvisorReportActivityLedgerComponent.razor | 93 +++++++++++ .../Components/CatalogSearchComponent.razor | 6 +- .../Components/CatalogSortComponent.razor | 4 +- .../CompanySearchColumnComponent.razor | 10 +- .../Components/CompanySortComponent.razor | 4 +- .../ReportActivityLedgerComponent.razor | 7 +- .../ReportActivityLedgerComponent.razor.cs | 24 --- .../ReportActivityTableOfficeComponent.razor | 8 +- .../Pages/AdvisorCreateActivityPage.razor | 18 +-- .../Pages/AdvisorReportCreatePage.razor | 147 +----------------- .../Shared/ConfirmProductCheckModal.razor | 2 +- .../Shared/InventoryReorderModal.razor | 2 +- Wonky.Client/Shared/InvoiceViewModal.razor | 2 +- Wonky.Client/Shared/PriceListModal.razor | 2 +- Wonky.Client/Shared/ProductHistoryModal.razor | 2 +- .../Shared/ProductPriceHistoryModal.razor | 2 +- Wonky.Client/Shared/VatLookupDkModal.razor | 2 +- Wonky.Client/wwwroot/appsettings.json | 2 +- 19 files changed, 232 insertions(+), 197 deletions(-) create mode 100644 Wonky.Client/Components/AdvisorActivityListComponent.razor create mode 100644 Wonky.Client/Components/AdvisorReportActivityLedgerComponent.razor delete mode 100644 Wonky.Client/Components/ReportActivityLedgerComponent.razor.cs diff --git a/Wonky.Client/Components/AdvisorActivityListComponent.razor b/Wonky.Client/Components/AdvisorActivityListComponent.razor new file mode 100644 index 00000000..13ed7bfa --- /dev/null +++ b/Wonky.Client/Components/AdvisorActivityListComponent.razor @@ -0,0 +1,92 @@ +@* +// 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.Entity.Views + +@* Report activities *@ + + + + + + + + + + + + + + + + + + @foreach (var activity in Activities) + { + + + + + + + + + + + + + + } + + + + + + + +
KundeBynavnDemoSalgNotesasBeløb + + + + + + + +
@activity.Company.Name@activity.Company.City@activity.Demo@activity.Sales@activity.OfficeNote@($"{activity.SasAmount:N2}")@(activity.StatusTypeEnum.Contains("Quote") ? $"{0:N2}" : $"{activity.OrderAmount:N2}") + @if (activity.OurRef.Contains("T:")) + { + + } + + @if (activity.Express) + { + + } + + @if (activity.StatusTypeEnum == "Quote") + { + + } + + +
Total@Activities.Where(x => x.StatusTypeEnum != "Quote").Sum(x => x.OrderAmount)
+ +@code { + + [Parameter] + public List Activities { get; set; } = new(); + +} \ No newline at end of file diff --git a/Wonky.Client/Components/AdvisorReportActivityLedgerComponent.razor b/Wonky.Client/Components/AdvisorReportActivityLedgerComponent.razor new file mode 100644 index 00000000..bb2f8831 --- /dev/null +++ b/Wonky.Client/Components/AdvisorReportActivityLedgerComponent.razor @@ -0,0 +1,93 @@ +@using Wonky.Entity.Views +@using Wonky.Entity.DTO +@* +// 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] +// +*@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Dagens Demo @(ReportData.NewDemoCount + ReportData.RecallDemoCount)Dagens ResultatMåneds Resultat
BesøgDemoSalgBeløbBesøgDemoSalgBeløb
N@ReportData.NewVisitCount@ReportData.NewDemoCount@ReportData.NewSaleCount@ReportData.NewTurnover@ReportData.NewVisitCountMonth@ReportData.NewDemoCountMonth@ReportData.NewSaleCountMonth@ReportData.NewTurnoverMonth
R@ReportData.RecallVisitCount@ReportData.RecallDemoCount@ReportData.RecallSaleCount@ReportData.RecallTurnover@ReportData.RecallVisitCountMonth@ReportData.RecallDemoCountMonth@ReportData.RecallSaleCountMonth@ReportData.RecallTurnoverMonth
SAS@ReportData.SasCount@ReportData.SasTurnover@ReportData.SasCountMonth@ReportData.SasTurnoverMonth
TOTAL@ReportData.TotalVisitCount@ReportData.TotalDemoCount@ReportData.TotalSaleCount@ReportData.TotalTurnover@ReportData.TotalVisitCountMonth@ReportData.TotalDemoCountMonth@ReportData.TotalSaleCountMonth@ReportData.TotalTurnoverMonth
+ +@code{ + + [Parameter] + public ReportFiguresDto ReportData { get; set; } = new(); + +} \ No newline at end of file diff --git a/Wonky.Client/Components/CatalogSearchComponent.razor b/Wonky.Client/Components/CatalogSearchComponent.razor index 64fb9429..e5e76efc 100644 --- a/Wonky.Client/Components/CatalogSearchComponent.razor +++ b/Wonky.Client/Components/CatalogSearchComponent.razor @@ -17,7 +17,7 @@ \ No newline at end of file diff --git a/Wonky.Client/Components/CatalogSortComponent.razor b/Wonky.Client/Components/CatalogSortComponent.razor index 09dedc9b..6d92ab1e 100644 --- a/Wonky.Client/Components/CatalogSortComponent.razor +++ b/Wonky.Client/Components/CatalogSortComponent.razor @@ -17,6 +17,6 @@ \ No newline at end of file diff --git a/Wonky.Client/Components/CompanySearchColumnComponent.razor b/Wonky.Client/Components/CompanySearchColumnComponent.razor index 3d6d41b6..bd08fc0a 100644 --- a/Wonky.Client/Components/CompanySearchColumnComponent.razor +++ b/Wonky.Client/Components/CompanySearchColumnComponent.razor @@ -17,9 +17,9 @@ diff --git a/Wonky.Client/Components/CompanySortComponent.razor b/Wonky.Client/Components/CompanySortComponent.razor index 4540f25c..0fe514a0 100644 --- a/Wonky.Client/Components/CompanySortComponent.razor +++ b/Wonky.Client/Components/CompanySortComponent.razor @@ -17,6 +17,6 @@ \ No newline at end of file diff --git a/Wonky.Client/Components/ReportActivityLedgerComponent.razor b/Wonky.Client/Components/ReportActivityLedgerComponent.razor index 153d2759..6e804234 100644 --- a/Wonky.Client/Components/ReportActivityLedgerComponent.razor +++ b/Wonky.Client/Components/ReportActivityLedgerComponent.razor @@ -1,3 +1,4 @@ +@using Wonky.Entity.Views @* // Copyright (C) 2022 FCS Frede's Computer Services. // This program is free software: you can redistribute it and/or modify @@ -84,4 +85,8 @@ - \ No newline at end of file + + +@code{ + [Parameter] public ReportData ReportData { get; set; } = new(); +} \ No newline at end of file diff --git a/Wonky.Client/Components/ReportActivityLedgerComponent.razor.cs b/Wonky.Client/Components/ReportActivityLedgerComponent.razor.cs deleted file mode 100644 index 870de4ef..00000000 --- a/Wonky.Client/Components/ReportActivityLedgerComponent.razor.cs +++ /dev/null @@ -1,24 +0,0 @@ -// 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.Entity.Views; -using Microsoft.AspNetCore.Components; - -namespace Wonky.Client.Components; - -public partial class ReportActivityLedgerComponent -{ - [Parameter] public ReportData ReportData { get; set; } = new(); -} \ No newline at end of file diff --git a/Wonky.Client/Components/ReportActivityTableOfficeComponent.razor b/Wonky.Client/Components/ReportActivityTableOfficeComponent.razor index a9cf370e..e27dfb30 100644 --- a/Wonky.Client/Components/ReportActivityTableOfficeComponent.razor +++ b/Wonky.Client/Components/ReportActivityTableOfficeComponent.razor @@ -27,10 +27,10 @@ Note sas Beløb - - - - + + + + diff --git a/Wonky.Client/Pages/AdvisorCreateActivityPage.razor b/Wonky.Client/Pages/AdvisorCreateActivityPage.razor index 1aa03ab5..2ac2a359 100644 --- a/Wonky.Client/Pages/AdvisorCreateActivityPage.razor +++ b/Wonky.Client/Pages/AdvisorCreateActivityPage.razor @@ -156,7 +156,7 @@ else
- @* Order lines -----------------------------------------------------*@ + @* Draft lines in draft -----------------------------------------------------*@
@@ -216,7 +216,7 @@ else
- @* draft line ----------------------------------------------------- *@ + @* Create Draft line ----------------------------------------------------- *@
@if (!string.IsNullOrWhiteSpace(SelectedItem.Name) && ShowItem) @@ -227,9 +227,9 @@ else Kladdelinje - Antal - Pris - Rabat + Antal + Pris + Rabat SAS Varenr. @@ -237,10 +237,10 @@ else - + - +
- + @@ -256,7 +256,7 @@ else @SelectedItem.Sku - + diff --git a/Wonky.Client/Pages/AdvisorReportCreatePage.razor b/Wonky.Client/Pages/AdvisorReportCreatePage.razor index 28706842..22fbe885 100644 --- a/Wonky.Client/Pages/AdvisorReportCreatePage.razor +++ b/Wonky.Client/Pages/AdvisorReportCreatePage.razor @@ -17,6 +17,7 @@ @using Microsoft.AspNetCore.Authorization @using Wonky.Client.Components +@using Wonky.Entity.Views @attribute [Authorize(Roles = "Advisor")] @page "/sales-reports/new" @@ -36,7 +37,7 @@
- + @@ -105,9 +106,9 @@ @* details input *@
Dag / Periode Begyndt Afsluttet
- - - + + + @@ -129,7 +130,7 @@ @* distance ledger input *@
TekstSupervisor
BeskrivelseMin medkørende supervisor
- + @@ -156,145 +157,13 @@ @if (Activities.Any()) {
- @* Report activities *@ -
Km aften Km morgen Km privat
- - - - - - - - - - - - - - - - - @foreach (var activity in Activities) - { - - - - - - - - - - - - - - } - - - - - - - -
KundeBynavnDemoSalgNotesasBeløb - - - - - - - -
@activity.Company.Name@activity.Company.City@activity.Demo@activity.Sales@activity.OfficeNote@($"{activity.SasAmount:N2}")@(activity.StatusTypeEnum.Contains("Quote") ? $"{0:N2}" : $"{activity.OrderAmount:N2}") - @if (activity.OurRef.Contains("T:")) - { - - } - - @if (activity.Express) - { - - } - - @if (activity.StatusTypeEnum == "Quote") - { - - } - - -
Total@Activities.Where(x => x.StatusTypeEnum != "Quote").Sum(x => x.OrderAmount)
+
} }
@* ledger summaries calculated *@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Dagens Demo @(Report.Figures.NewDemoCount + Report.Figures.RecallDemoCount)Dagens ResultatMåneds Resultat
BesøgDemoSalgBeløbBesøgDemoSalgBeløb
N@Report.Figures.NewVisitCount@Report.Figures.NewDemoCount@Report.Figures.NewSaleCount@Report.Figures.NewTurnover@Report.Figures.NewVisitCountMonth@Report.Figures.NewDemoCountMonth@Report.Figures.NewSaleCountMonth@Report.Figures.NewTurnoverMonth
R@Report.Figures.RecallVisitCount@Report.Figures.RecallDemoCount@Report.Figures.RecallSaleCount@Report.Figures.RecallTurnover@Report.Figures.RecallVisitCountMonth@Report.Figures.RecallDemoCountMonth@Report.Figures.RecallSaleCountMonth@Report.Figures.RecallTurnoverMonth
SAS@Report.Figures.SasCount@Report.Figures.SasTurnover@Report.Figures.SasCountMonth@Report.Figures.SasTurnoverMonth
TOTAL@Report.Figures.TotalVisitCount@Report.Figures.TotalDemoCount@Report.Figures.TotalSaleCount@Report.Figures.TotalTurnover@Report.Figures.TotalVisitCountMonth@Report.Figures.TotalDemoCountMonth@Report.Figures.TotalSaleCountMonth@Report.Figures.TotalTurnoverMonth
+
diff --git a/Wonky.Client/Shared/ConfirmProductCheckModal.razor b/Wonky.Client/Shared/ConfirmProductCheckModal.razor index 6aa75cee..e1e852b3 100644 --- a/Wonky.Client/Shared/ConfirmProductCheckModal.razor +++ b/Wonky.Client/Shared/ConfirmProductCheckModal.razor @@ -16,7 +16,7 @@ *@ @using Wonky.Client.Components