diff --git a/GPW.CORE.SMART/Components/Calendario.razor b/GPW.CORE.SMART/Components/Calendario.razor
index 42fc8bb..c52b7ba 100644
--- a/GPW.CORE.SMART/Components/Calendario.razor
+++ b/GPW.CORE.SMART/Components/Calendario.razor
@@ -154,7 +154,7 @@ else
else
{
-
+
}
}
diff --git a/GPW.CORE.SMART/Components/Calendario.razor.cs b/GPW.CORE.SMART/Components/Calendario.razor.cs
index ccc33b8..3c318d2 100644
--- a/GPW.CORE.SMART/Components/Calendario.razor.cs
+++ b/GPW.CORE.SMART/Components/Calendario.razor.cs
@@ -29,12 +29,14 @@ namespace GPW.CORE.Smart.Components
protected string emptyTime = "--/--";
protected DailyDataDTO? timbratureOggi = null;
+ protected DateTime dtMancTimb { get; set; } = DateTime.Now;
#endregion Protected Fields
#region Protected Properties
- protected bool isApproved { get; set; } = true;
+ protected bool isApprovedEntr { get; set; } = true;
+ protected bool isApprovedEsc { get; set; } = true;
#endregion Protected Properties
@@ -71,33 +73,43 @@ namespace GPW.CORE.Smart.Components
private void changeMode()
{
- showGauge = !showGauge;
+ showGauge = false;
}
+#if false
private async void checkApp(DateTime? dtRif)
{
+ isApprovedEntr = true;
+ isApprovedEsc = true;
DateTime dtScelta = dtRif ?? DateTime.Today;
listTimb = await CSDataService.TimbratureDay(dtScelta, IdxDipendente);
if (listTimb != null)
{
- if (listTimb.Count == 1)
+ if (listTimb.Count != 0)
{
- Timb = listTimb.FirstOrDefault();
- if (Timb.Approv == true)
+ foreach (var item in listTimb)
{
- isApproved = false;
+ if (item.Approv == false && item.Entrata == true)
+ {
+ isApprovedEntr = false;
+ }
+ else if (item.Approv == false && item.Entrata == false)
+ {
+ isApprovedEsc = false;
+ }
}
}
+
}
- }
+ }
+#endif
private string cssChooseEntr(DateTime? dtRif)
{
- checkApp(dtRif);
string answ = "";
try
{
- answ = (isApproved) ? "text-success" : "text-danger";
+ answ = (isApprovedEntr) ? "text-success" : "text-danger";
}
catch
{ }
@@ -106,11 +118,10 @@ namespace GPW.CORE.Smart.Components
private string cssChooseEsc(DateTime? dtRif)
{
- checkApp(dtRif);
string answ = "";
try
{
- answ = (isApproved) ? "text-primary" : "text-danger";
+ answ = (isApprovedEsc) ? "text-primary" : "text-danger";
}
catch
{ }
@@ -173,11 +184,32 @@ namespace GPW.CORE.Smart.Components
navManager.NavigateTo("TempRil");
}
- private void updateDetail()
+ private async void updateDetail()
{
+ isApprovedEntr = true;
+ isApprovedEsc = true;
if (ListRecords != null)
{
timbratureOggi = ListRecords.Where(x => x.DtRif == dtCurr).FirstOrDefault();
+ listTimb = await CSDataService.TimbratureDay(dtCurr, IdxDipendente);
+ if (listTimb != null)
+ {
+ if (listTimb.Count != 0)
+ {
+ foreach (var item in listTimb)
+ {
+ if (item.Approv == false && item.Entrata == true)
+ {
+ isApprovedEntr = false;
+ }
+ else if (item.Approv == false && item.Entrata == false)
+ {
+ isApprovedEsc = false;
+ }
+ }
+ }
+
+ }
}
}