Fix prese tutte le ispezioni legate all'utente
This commit is contained in:
@@ -38,7 +38,7 @@ public class SteupDataService(
|
||||
|
||||
private async Task CleanOldClosedInspection()
|
||||
{
|
||||
var ispezioni = (await ispezioniService.GetAllIspezioniWithSchedeAsync())
|
||||
var ispezioni = (await ispezioniService.GetAllIspezioniWithSchedeAsync(userSession.User.Username))
|
||||
.Where(x =>
|
||||
x.Stato == StatusEnum.Completata &&
|
||||
x.Data < DateTime.Now.AddDays(-60)
|
||||
@@ -53,7 +53,7 @@ public class SteupDataService(
|
||||
|
||||
public async Task CheckAndUpdateStatus()
|
||||
{
|
||||
var ispezioni = await ispezioniService.GetAllIspezioniWithSchedeAsync();
|
||||
var ispezioni = await ispezioniService.GetAllIspezioniWithSchedeAsync(userSession.User.Username);
|
||||
var listActivityId = ispezioni
|
||||
.Where(x => x.ActivityId != null)
|
||||
.Select(x => x.ActivityId!)
|
||||
@@ -95,7 +95,7 @@ public class SteupDataService(
|
||||
|
||||
public async Task<bool> CanOpenNewInspection()
|
||||
{
|
||||
var completedInspection = await ispezioniService.GetAllIspezioni();
|
||||
var completedInspection = await ispezioniService.GetAllIspezioni(userSession.User.Username);
|
||||
|
||||
if (completedInspection.IsNullOrEmpty()) return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user