fix errore compilazione

This commit is contained in:
zaccaria.majid
2023-01-17 12:25:25 +01:00
parent 3e2160d64d
commit 5cfc4bb865
8 changed files with 74 additions and 31 deletions
+1 -1
View File
@@ -173,7 +173,7 @@ else
<div class="p-2 text-center text-light">
<div>
<h3>
Progetti
<CompProj></CompProj>
</h3>
</div>
</div>
+3 -3
View File
@@ -1,4 +1,4 @@
@if (ListProgetti == null)
@*@if (ListProgetti == null)
{
<LoadingData></LoadingData>
}
@@ -11,5 +11,5 @@ else if (ListProgetti.Count == 0)
}
else
{
<ProjectsList ListProj="@ListProgetti" EnableAdmin="false" EnableEdit="true" ReqUpdate="DoUpdate" TextCss="text-light"></ProjectsList>
}
}*@
<ProjectsList EnableAdmin="false" EnableEdit="true" ReqUpdate="DoUpdate" TextCss="text-light"></ProjectsList>
@@ -0,0 +1,6 @@
.prjCard {
background-color: #D9D9D9;
height: 4rem;
border-radius: 1.2rem;
width: 100%;
}
@@ -0,0 +1,6 @@
.prjCard{
background-color: #D9D9D9;
height: 4rem;
border-radius: 1.2rem;
width: 100%;
}
+1
View File
@@ -0,0 +1 @@
.prjCard{background-color:#d9d9d9;height:4rem;border-radius:1.2rem;width:100%;}
+7 -9
View File
@@ -1,13 +1,11 @@
@using GPW.CORE.Data.DbModels
@using GPW.CORE.Smart.Data
@if (ListProj != null)
{
@foreach (var item in ListProj)
{
<div>
@item.Descrizione
</div>
}
}
<div>
<div class="prjCard">
ciao
</div>
</div>
+42 -18
View File
@@ -1,5 +1,4 @@
using GPW.CORE.Data.DbModels;
using GPW.CORE.Data.DTO;
using GPW.CORE.Smart.Data;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
@@ -23,23 +22,17 @@ namespace GPW.CORE.Smart.Components
private bool isLoading { get; set; } = false;
[Parameter]
public List<DailyDataDTO> ListProj { get; set; } = null!;
//{
// get
// {
// return _ListProj.Select(x => x.ListRA);
// }
// set
// {
// _ListProj = value;
// }
//}
public List<RegAttivitaModel> ListRegAtt { get; set; } = null!;
protected override Task OnParametersSetAsync()
public List<TimbratureModel> ListTimb
{
ListRegAtt = ListProj.Select(x=>x.ListRA).ToList();
get
{
return _ListTimb.OrderByDescending(x => x.DataOra).ToList();
}
set
{
_ListTimb = value;
}
}
private bool canDelete(TimbratureModel currRec)
@@ -59,6 +52,22 @@ namespace GPW.CORE.Smart.Components
#region Protected Methods
protected async void ApprovaTimb(TimbratureModel currRecord)
{
string message = "Sicuro di voler approvare la richiesta selezionata?";
if (!await JSRuntime.InvokeAsync<bool>("confirm", message))
return;
isLoading = true;
await Task.Delay(1);
await InvokeAsync(StateHasChanged);
currRecord.Approv = true;
// aggiorno
await CDService.TimbratureUpdate(currRecord);
await Task.Delay(1);
isLoading = false;
await ReqUpdate.InvokeAsync(true);
}
protected async void Delete(TimbratureModel currRecord)
{
@@ -76,11 +85,26 @@ namespace GPW.CORE.Smart.Components
await ReqUpdate.InvokeAsync(true);
}
protected async void ScambioInOut(TimbratureModel currRecord)
{
isLoading = true;
await Task.Delay(1);
await InvokeAsync(StateHasChanged);
currRecord.Entrata = !currRecord.Entrata;
// aggiorno
await CDService.TimbratureUpdate(currRecord);
await Task.Delay(1);
isLoading = false;
await ReqUpdate.InvokeAsync(false);
}
#endregion Protected Methods
#region Private Properties
private List<DailyDataDTO> _ListProj { get; set; } = new List<DailyDataDTO>();
private List<TimbratureModel> _ListTimb { get; set; } = new List<TimbratureModel>();
[Inject]
private CoreSmartDataService CDService { get; set; } = null!;
+8
View File
@@ -30,5 +30,13 @@
{
"outputFile": "Components/NavBottom.razor.css",
"inputFile": "Components/NavBottom.razor.less"
},
{
"outputFile": "Components/ProjectsList.css",
"inputFile": "Components/ProjectsList.less"
},
{
"outputFile": "Components/ProjectsLIst.razor.css",
"inputFile": "Components/ProjectsLIst.razor.less"
}
]