From d9004aa1bacb01bd67ed4ef28beb5d5e003ce0a9 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 9 Dec 2021 18:56:25 +0100 Subject: [PATCH] Bozza veisione orizzontale dati... --- GPW.CORE.UI/Components/Test.razor | 3 +-- GPW.CORE.UI/Pages/Planner.razor | 19 +++++++++++++++---- GPW.CORE.UI/Pages/Planner.razor.cs | 18 +++++++++++++----- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/GPW.CORE.UI/Components/Test.razor b/GPW.CORE.UI/Components/Test.razor index 2166e03..e54f726 100644 --- a/GPW.CORE.UI/Components/Test.razor +++ b/GPW.CORE.UI/Components/Test.razor @@ -1,5 +1,4 @@ -

Test

- +Test
diff --git a/GPW.CORE.UI/Pages/Planner.razor b/GPW.CORE.UI/Pages/Planner.razor index d8a8a37..ae6b8a1 100644 --- a/GPW.CORE.UI/Pages/Planner.razor +++ b/GPW.CORE.UI/Pages/Planner.razor @@ -36,18 +36,29 @@
- @if (currRecord != null) { @**@ } - @*@if (ListRecords == null) - { + @if (ListRecords == null) + { - }*@ + } else { + +
+ @foreach (var currItem in ListRecords) + { +
+ @currItem.DtInizio + +
+ } +
+ +
diff --git a/GPW.CORE.UI/Pages/Planner.razor.cs b/GPW.CORE.UI/Pages/Planner.razor.cs index 9c05905..f3cca51 100644 --- a/GPW.CORE.UI/Pages/Planner.razor.cs +++ b/GPW.CORE.UI/Pages/Planner.razor.cs @@ -28,9 +28,9 @@ namespace GPW.CORE.UI.Pages private List weekStatList; + private List ListRecords; #if false private WeekPlanModel currRecord = null; - private List ListRecords; private List PlantsList; private List SuppliersList; private List TransportersList; @@ -185,12 +185,10 @@ namespace GPW.CORE.UI.Pages get { int answ = 0; -#if false if (ListRecords != null) { answ = ListRecords.Count; - } -#endif + } return answ; } } @@ -234,11 +232,19 @@ namespace GPW.CORE.UI.Pages #endif } - private async Task ReloadData() + private async Task InitData() { isLoading = true; weekStatList = await DataService.LastWeeks(1, DateTime.Today, 4); currWeekNum = weekStatList.Last().WeekNumber; + isLoading = false; + } + + private async Task ReloadData() + { + isLoading = true; + ListRecords = await DataService.DailyDetails(1, currWeekSel.inizio, currWeekSel.fine); + #if false ListRecords = await DataService.WeekPlanGet(); #endif @@ -284,6 +290,7 @@ namespace GPW.CORE.UI.Pages AppMService.PageName = "Planner Consegne"; AppMService.PageIcon = "fas fa-calendar pr-2"; #endif + await InitData(); await ReloadAllData(); } @@ -304,6 +311,7 @@ namespace GPW.CORE.UI.Pages DataService.rollBackEdit(currRecord); currRecord = null; #endif + await InitData(); await ReloadData(); }