+
@CurrData.Inizio.ToString("HH:mm")
-
@CurrData.Fine.ToString("HH:mm")
+
@CurrData.Fine.ToString("HH:mm")
@($"{CurrData.OreTot:N2}h")
-
@(headFase(CurrData.IdxFase))
+
@CurrData.FasiNav?.ProgettoNav?.NomeProj
+
@CurrData.FasiNav?.DescrizioneFase
@CurrData.Descrizione
}
@@ -56,25 +57,10 @@
{
get
{
- string answ = CurrData.IdxFase == 0 ? "" : "table-info border border-info rounded";
+ string answ = CurrData.IdxFase == 0 ? "" : " border border-info rounded";
return answ;
}
}
- private string headFase(int idxFase)
- {
- string answ = $"F.{idxFase}";
- if (ListFasi != null)
- {
- var currFase = ListFasi
- .Where(x => x.IdxFase == idxFase)
- .FirstOrDefault();
- if (currFase != null)
- {
- answ = $"{currFase.NomeFase}";
- }
- }
- return answ;
- }
}
diff --git a/GPW.CORE.UI/Pages/Test.razor b/GPW.CORE.UI/Pages/Test.razor
new file mode 100644
index 0000000..f017645
--- /dev/null
+++ b/GPW.CORE.UI/Pages/Test.razor
@@ -0,0 +1,72 @@
+@page "/Test"
+
+
+@using GPW.CORE.UI.Components
+
+
Test - Fasi
+
+
+
+
+ @if (ListRecords == null)
+ {
+
+ }
+ else if (totalCount == 0)
+ {
+
No Record Found
+ }
+ else
+ {
+
+
+ @*
*@
+
+
+
+ @* | *@
+ ID |
+ Cod |
+ Nome |
+ Descrizione |
+
+
+
+ @foreach (var record in ListRecords)
+ {
+
+ @*|
+
+ | *@
+
+ P@record.IdxProgetto | @record.IdxFase (← @record.IdxFaseAncest)
+ |
+
+ @record.CodFase
+ |
+
+ @record.NomeFase
+ |
+
+ @record.DescrizioneFase
+ |
+
+ }
+
+
+
+
+ }
+
+
+
+
+
+
+
diff --git a/GPW.CORE.UI/Pages/Test.razor.cs b/GPW.CORE.UI/Pages/Test.razor.cs
new file mode 100644
index 0000000..f2fb5af
--- /dev/null
+++ b/GPW.CORE.UI/Pages/Test.razor.cs
@@ -0,0 +1,153 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Components;
+using System.Net.Http;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Components.Authorization;
+using Microsoft.AspNetCore.Components.Forms;
+using Microsoft.AspNetCore.Components.Routing;
+using Microsoft.AspNetCore.Components.Web;
+using Microsoft.AspNetCore.Components.Web.Virtualization;
+using Microsoft.JSInterop;
+using GPW.CORE.UI;
+using GPW.CORE.UI.Shared;
+using GPW.CORE.UI.Components;
+using GPW.CORE.Data.DbModels;
+using GPW.CORE.UI.Data;
+
+namespace GPW.CORE.UI.Pages
+{
+ public partial class Test : ComponentBase, IDisposable
+ {
+ #region Private Fields
+
+ private List
ListRecords = null!;
+ private List SearchRecords = null!;
+
+ #endregion Private Fields
+
+ #region Private Properties
+
+ private int _currPage { get; set; } = 1;
+
+ private int _numRecord { get; set; } = 10;
+
+ private int currPage
+ {
+ get => _currPage;
+ set
+ {
+ if (_currPage != value)
+ {
+ _currPage = value;
+ var pUpd = Task.Run(async () => await ReloadData());
+ pUpd.Wait();
+ }
+ }
+ }
+
+ private bool isLoading { get; set; } = false;
+
+ private int IdxDipSel = 0;
+
+ [Inject]
+ private NavigationManager NavManager { get; set; } = null!;
+
+ private int numRecord
+ {
+ get => _numRecord;
+ set
+ {
+ if (_numRecord != value)
+ {
+ _numRecord = value;
+ var pUpd = Task.Run(async () => await ReloadData());
+ pUpd.Wait();
+ }
+ }
+ }
+
+ #endregion Private Properties
+
+ #region Protected Properties
+
+ [Inject]
+
+ protected MessageService AppMService { get; set; } = null!;
+
+ [Inject]
+ protected GpwDataService DataService { get; set; } = null!;
+
+ [Inject]
+ protected IJSRuntime JSRuntime { get; set; } = null!;
+
+ protected int totalCount
+ {
+ get
+ {
+ int answ = 0;
+ if (SearchRecords != null)
+ {
+ answ = SearchRecords.Count;
+ }
+ return answ;
+ }
+ }
+
+ #endregion Protected Properties
+
+ #region Private Methods
+
+ private async Task ReloadData()
+ {
+ isLoading = true;
+ SearchRecords = await DataService.AnagFasiAll();
+ ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
+ isLoading = false;
+ }
+
+ #endregion Private Methods
+
+ #region Protected Methods
+
+ protected void ForceReload(int newNum)
+ {
+ numRecord = newNum;
+ }
+
+ protected void ForceReloadPage(int newNum)
+ {
+ currPage = newNum;
+ }
+
+ protected override async Task OnInitializedAsync()
+ {
+ await ReloadData();
+ }
+
+ protected void ResetData()
+ {
+ //DataService.rollBackEdit(currRecord);
+ }
+
+ protected void Select(DipendentiModel selRecord)
+ {
+ IdxDipSel = selRecord.IdxDipendente;
+ //// rimando a remnants
+ //NavManager.NavigateTo($"Remnants");
+ }
+
+ #endregion Protected Methods
+
+ #region Public Methods
+
+ public void Dispose()
+ {
+ //AppMService.EA_SearchUpdated -= OnSeachUpdated;
+ }
+
+ #endregion Public Methods
+ }
+}
\ No newline at end of file
diff --git a/GPW.CORE.UI/Shared/MainLayout.razor b/GPW.CORE.UI/Shared/MainLayout.razor
index 3262d81..b056888 100644
--- a/GPW.CORE.UI/Shared/MainLayout.razor
+++ b/GPW.CORE.UI/Shared/MainLayout.razor
@@ -13,7 +13,7 @@
About