Data fix, da testare ancora

This commit is contained in:
Samuele Locatelli
2023-10-09 17:40:20 +02:00
parent f62c404d97
commit b822b02caa
3 changed files with 21 additions and 6 deletions
+6 -2
View File
@@ -54,6 +54,7 @@ namespace MP_TAB_SERV.Components
{
DateSel = value.InizioStato ?? DateTime.Now;
UserComment = value.Value;
ShowBtn = insRealtime;
}
}
}
@@ -113,7 +114,7 @@ namespace MP_TAB_SERV.Components
await TabServ.EvListInsert(newRec, MP.Data.Objects.Enums.tipoInputEvento.commento);
// reset
DoReset();
ToggleCtrl();
//ToggleCtrl();
await E_Updated.InvokeAsync(true);
}
@@ -125,6 +126,7 @@ namespace MP_TAB_SERV.Components
protected override async Task OnAfterRenderAsync(bool firstRender)
{
#if false
// cerco se ci sia una data-ora rif salvata...
DateSel = await MServ.CommentoDtRifGet(false);
if (!insRealtime)
@@ -137,7 +139,8 @@ namespace MP_TAB_SERV.Components
ShowBtn = false;
await InvokeAsync(StateHasChanged);
}
}
}
#endif
}
@@ -220,6 +223,7 @@ namespace MP_TAB_SERV.Components
{
UserComment = "";
DateSel = DateTime.Now;
ShowBtn = true;
}
#endregion Private Methods
+1 -1
View File
@@ -1,5 +1,5 @@
<NotesEditor CanSave="true" Title="Nuovo Commento" RecMSE="@RecMSE" E_Updated="DoUpdate"></NotesEditor>
<NotesEditor CanSave="true" Title="Nuovo Commento" RecMSE="@RecMSE" E_Updated="DoUpdate" CurrRecord="@currEv"></NotesEditor>
<div class="row mt-1">
<div class="col-7 col-sm-8 col-lg-9 pr-1">
+14 -3
View File
@@ -76,7 +76,7 @@ namespace MP_TAB_SERV.Components
}
}
protected List<CommentiModel> RecordListComments { get; set; } = new List<CommentiModel>();
protected List<CommentiModel>? RecordListComments { get; set; } = new List<CommentiModel>();
protected List<FermiNonQualModel> RecordListFnq { get; set; } = new List<FermiNonQualModel>();
[Inject]
@@ -91,6 +91,7 @@ namespace MP_TAB_SERV.Components
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Sicuro di voelr eliminare il record?"))
return;
RecordListComments = null;
await Task.Delay(1);
await TabServ.EvListDelete(currRec.IdxMacchina, currRec.InizioStato);
// ricarico
@@ -101,11 +102,18 @@ namespace MP_TAB_SERV.Components
protected async Task EditRec(CommentiModel currRec)
{
await Task.Delay(1);
currEv = new EventListModel()
{
InizioStato = currRec.InizioStato,
Value = currRec.Value
};
#if false
// salvo
await MsgServ.CommentoDtRifSet(currRec.InizioStato);
await MsgServ.CommentoValSet(currRec.Value);
// navigo
NavMan.NavigateTo("notes");
NavMan.NavigateTo("notes");
#endif
}
protected override async Task OnParametersSetAsync()
@@ -114,13 +122,15 @@ namespace MP_TAB_SERV.Components
await ReloadFnq();
}
protected EventListModel? currEv { get; set; } = null;
#endregion Protected Methods
#region Private Properties
private int _durataMin { get; set; } = 30;
private int _numGiorni { get; set; } = 3;
private int numComm { get; set; } = 10;
private int numComm { get; set; } = 5;
#endregion Private Properties
@@ -130,6 +140,7 @@ namespace MP_TAB_SERV.Components
{
if (forceReload)
{
currEv = null;
await ReloadComments();
}
}