Aggiunto comportamento selezione + navigazione
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<div class="col-4 my-1 p-2">
|
||||
<div class="card">
|
||||
<div class="card" @onclick="SelectFermo">
|
||||
<div class="card-body @fnqSemaforo">
|
||||
<div class="text-start fw-bold" style="font-size: 1.8rem;">
|
||||
@fnqName
|
||||
@@ -23,20 +23,4 @@
|
||||
|
||||
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public string fnqName { get; set; } = "";
|
||||
|
||||
[Parameter]
|
||||
public string fnqArticle { get; set; } = "";
|
||||
|
||||
[Parameter]
|
||||
public DateTime fnqDateTime { get; set; } = DateTime.Now;
|
||||
|
||||
[Parameter]
|
||||
public double fnqDurMin { get; set; } = 0;
|
||||
|
||||
[Parameter]
|
||||
public string fnqSemaforo { get; set; } = "";
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
using global::System;
|
||||
using global::System.Collections.Generic;
|
||||
using global::System.Linq;
|
||||
using global::System.Threading.Tasks;
|
||||
using global::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 MP_TAB_SERV;
|
||||
using MP_TAB_SERV.Shared;
|
||||
using MP_TAB_SERV.Components;
|
||||
using MP.Data;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.DTO;
|
||||
using MP.Data.Services;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using System.Reflection.Metadata;
|
||||
|
||||
namespace MP_TAB_SERV.Components
|
||||
{
|
||||
public partial class LongStopList
|
||||
{
|
||||
|
||||
[Parameter]
|
||||
public string fnqName { get; set; } = "";
|
||||
|
||||
[Parameter]
|
||||
public string fnqArticle { get; set; } = "";
|
||||
|
||||
[Parameter]
|
||||
public DateTime fnqDateTime { get; set; } = DateTime.Now;
|
||||
|
||||
[Parameter]
|
||||
public double fnqDurMin { get; set; } = 0;
|
||||
|
||||
[Parameter]
|
||||
public string fnqSemaforo { get; set; } = "";
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Rimanda alla pagina fermate selezionando periodo corretto...
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task SelectFermo()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
// salva la data-ora evento richiesto...
|
||||
await MsgServ.DtRifCommentoSet(fnqDateTime);
|
||||
NavMan.NavigateTo("prod-stop");
|
||||
}
|
||||
[Inject]
|
||||
protected NavigationManager NavMan { get; set; } = null!;
|
||||
}
|
||||
}
|
||||
@@ -197,13 +197,37 @@ namespace MP.Data.Services
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Macchine attualmente selezionata
|
||||
/// Imposta Macchina
|
||||
/// </summary>
|
||||
public async Task IdxMaccSet(string machSel)
|
||||
{
|
||||
await sessionStore.SetItemAsync("CurrMach", machSel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Macchine attualmente selezionata
|
||||
/// </summary>
|
||||
public async Task DtRifCommentoSet(DateTime DtRif)
|
||||
{
|
||||
await sessionStore.SetItemAsync("DtRifComm", DtRif);
|
||||
}
|
||||
/// <summary>
|
||||
/// DateTime riferimento evento x commento fermata
|
||||
/// </summary>
|
||||
/// <param name="remAfter"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<DateTime> DtRifCommentoGet(bool remAfter)
|
||||
{
|
||||
// recupero
|
||||
var answ = await sessionStore.GetItemAsync<DateTime>("DtRifComm");
|
||||
// svuoto data registrata se richiesto
|
||||
if (remAfter)
|
||||
{
|
||||
await sessionStore.RemoveItemAsync("DtRifComm");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
#if false
|
||||
public bool IsActive
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user