diff --git a/MP.SPEC/Components/Chart/Doughnut.razor b/MP.SPEC/Components/Chart/Doughnut.razor new file mode 100644 index 00000000..7eddca28 --- /dev/null +++ b/MP.SPEC/Components/Chart/Doughnut.razor @@ -0,0 +1 @@ + diff --git a/MP.SPEC/Components/Chart/Doughnut.razor.cs b/MP.SPEC/Components/Chart/Doughnut.razor.cs new file mode 100644 index 00000000..49abb269 --- /dev/null +++ b/MP.SPEC/Components/Chart/Doughnut.razor.cs @@ -0,0 +1,66 @@ +using Microsoft.AspNetCore.Components; +using Microsoft.JSInterop; +using MP.Data; + +namespace MP.SPEC.Components.Chart +{ + public partial class Doughnut + { + [Inject] + private IJSRuntime JSRuntime { get; set; } = null!; + + + public enum ChartType + { + Pie, + Bar, + Doughnut + } + + [Parameter] + public string Id { get; set; } + + [Parameter] + public ChartType Type { get; set; } + + [Parameter] + public double[] Data { get; set; } + + [Parameter] + public string[] BackgroundColor { get; set; } + + [Parameter] + public string[] Labels { get; set; } + + protected override async Task OnAfterRenderAsync(bool firstRender) + { + var config = new + { + Type = Type.ToString().ToLower(), + Options = new + { + Responsive = true, + Scales = new + { + YAxes = new[] + { + new { Ticks = new { + BeginAtZero=true + } } + } + } + }, + Data = new + { + Datasets = new[] + { + new { Data = Data, BackgroundColor = BackgroundColor} + }, + Labels = Labels + } + }; + + await JSRuntime.InvokeVoidAsync("setup", Id, config); + } + } +} \ No newline at end of file diff --git a/MP.SPEC/Components/ListODL.razor b/MP.SPEC/Components/ListODL.razor index 324958d1..08e70a35 100644 --- a/MP.SPEC/Components/ListODL.razor +++ b/MP.SPEC/Components/ListODL.razor @@ -87,25 +87,90 @@ else
| Articolo | +Descrizione Art. | +Fase | +Note | +
|---|---|---|---|
| @currRecord.CodArticolo | +@currRecord.ArticoloNav.DescArticolo | +@currRecord.KeyRichiesta | +@currRecord.Note | + +
| Macchina | +Info macchina | +Periodo | +
|---|---|---|
| @currRecord.IdxMacchina | +@currRecord.MachineNav.CodMacchina | +
+
+
+
+
+ @($"{@record.DataInizio:yyyy/MM/dd}")
+ @($"{@record.DataInizio:ddd HH:mm:ss}")
+
+
+
+
+ @if (@record.DataFine != null)
+ {
+
+ @($"{@record.DataFine:yyyy/MM/dd}")
+ @($"{@record.DataFine:ddd HH:mm:ss}")
+ }
+ else
+ {
+
+
+ }
+ @($"{DateTime.Now:yyyy/MM/dd}")
+ @($"{DateTime.Now:ddd HH:mm:ss}")
+ |
+
+