diff --git a/GPW.CORE.UI/Components/DayCheckEditor.razor b/GPW.CORE.UI/Components/DayCheckEditor.razor index 9359625..a42c367 100644 --- a/GPW.CORE.UI/Components/DayCheckEditor.razor +++ b/GPW.CORE.UI/Components/DayCheckEditor.razor @@ -19,18 +19,49 @@
- gestione temperature rilevate + insert quotidiano @TargetDate.ToShortDateString() - @if (currRecord != null) - { -
- Temp odierna - @currRecord.TempRil +
+
+ @TargetDate.ToString("ddd dd/MM/yyyy")
- } - else - { - - } +
+ @if (currRecord != null) + { +
+
+ + + +
+ +
+ +
+
+ } + else + { + + } +
+ +
+
@if (listRilTemp != null) @@ -58,7 +89,19 @@
@code { - private int numDays = 60; + private int numDays + { + get + { + return _numDays; + } + set + { + _numDays = value; + var pUpd = Task.Run(async () => await ReloadData()); + pUpd.Wait(); + } + } [Parameter] public EventCallback CloseReq { get; set; } @@ -77,6 +120,7 @@ } } + protected int _numDays = 30; protected DateTime _targetDate { get; set; } = DateTime.Today; protected List? listRilTemp { get; set; } = null; @@ -114,5 +158,21 @@ histLabel = histDict.Keys.ToArray(); // cerco se c'รจ dato odierno della temperatura... currRecord = rawData.Where(x => x.DtRilievo == TargetDate).FirstOrDefault(); + if (currRecord == null) + { + currRecord = new RilievoTempModel() + { + DtRilievo = DateTime.Now, + TempRil = 0 + }; + } + } + // effettua salvataggio misurazione temperatura + protected async void DoSave() + { + // chiamo classe gestione che salva e resetta cache dati... + + // chiamo chiusura! + await CloseReq.InvokeAsync(true); } }