Merge branch 'release/fixAddDeleteRawItem'
This commit is contained in:
@@ -62,9 +62,15 @@ namespace MagMan.Data.Tenant.Controllers
|
||||
.FirstOrDefault();
|
||||
if (currData != null)
|
||||
{
|
||||
dbCtx
|
||||
.DbSetItems
|
||||
.Remove(currData);
|
||||
//dbCtx
|
||||
// .DbSetItems
|
||||
// .Remove(currData);
|
||||
|
||||
// non vera eliminazione ma logica...
|
||||
currData.IsActive = false;
|
||||
// registro modifica RawItem
|
||||
dbCtx.Entry(currData).State = EntityState.Modified;
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
done = true;
|
||||
}
|
||||
@@ -77,18 +83,44 @@ namespace MagMan.Data.Tenant.Controllers
|
||||
return done;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converte il DTO in ItemModel
|
||||
/// </summary>
|
||||
/// <param name="origItem">DTO di partenza</param>
|
||||
/// <param name="isActive">Parametro active da impostare</param>
|
||||
/// <returns></returns>
|
||||
public RawItemModel ItemFromDto(ItemDTO origItem, bool isActive)
|
||||
{
|
||||
RawItemModel answ = new RawItemModel()
|
||||
{
|
||||
MatId = origItem.MatCloudId,
|
||||
IsRemn = origItem.IsRemn,
|
||||
Location = origItem.Location,
|
||||
QtyAvail = origItem.QtyAvail,
|
||||
HMm = origItem.HMm,
|
||||
LMm = origItem.LMm,
|
||||
WMm = origItem.WMm,
|
||||
Note = origItem.Note,
|
||||
IsActive = isActive
|
||||
};
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco Items gestiti a magazzino (all)
|
||||
/// </summary>
|
||||
/// <param name="connString">Stringa connessione (variabile x cliente)</param>
|
||||
/// <param name="onlyActive">Solo attivi (default) o anche cancellati</param>
|
||||
/// <returns></returns>
|
||||
public List<RawItemModel> ItemGetAll(string connString)
|
||||
public List<RawItemModel> ItemGetAll(string connString, bool onlyActive = true)
|
||||
{
|
||||
List<RawItemModel> dbResult = new List<RawItemModel>();
|
||||
using (MagManContext dbCtx = new MagManContext(connString))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetItems
|
||||
.Where(x => x.IsActive || !onlyActive)
|
||||
.Include(c => c.MaterialNav)
|
||||
.OrderBy(x => x.MatId)
|
||||
.ToList();
|
||||
@@ -101,17 +133,17 @@ namespace MagMan.Data.Tenant.Controllers
|
||||
/// </summary>
|
||||
/// <param name="connString">Stringa connessione (variabile x cliente)</param>
|
||||
/// <param name="matID">ID del materiale x cui filtrare, 0 = tutti</param>
|
||||
/// <param name="onlyActive">Solo attivi (default) o anche cancellati</param>
|
||||
/// <returns></returns>
|
||||
public List<RawItemModel> ItemGetByMat(string connString, int matID)
|
||||
public List<RawItemModel> ItemGetByMat(string connString, int matID, bool onlyActive = true)
|
||||
{
|
||||
List<RawItemModel> dbResult = new List<RawItemModel>();
|
||||
using (MagManContext dbCtx = new MagManContext(connString))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetItems
|
||||
.Where(x => matID == 0 || x.MatId == matID)
|
||||
.Where(x => (matID == 0 || x.MatId == matID) && (x.IsActive || !onlyActive))
|
||||
.Include(c => c.MaterialNav)
|
||||
//.OrderBy(x => x.MatCloudId)
|
||||
.OrderBy(x => x.WMm)
|
||||
.ThenBy(x => x.HMm)
|
||||
.ThenBy(x => x.LMm)
|
||||
@@ -146,16 +178,12 @@ namespace MagMan.Data.Tenant.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiunge/Modifica un item in magazzino
|
||||
/// </summary>
|
||||
/// <param name="connString">Stringa connessione (variabile x cliente)</param>
|
||||
/// <param name="rec2upd">Record da aggiornare</param>
|
||||
/// <param name="deltaQty">quantità da aggiornare (se <0 è consumo)</param>
|
||||
/// <param name="userId">User corrente (SE applicabile)</param>
|
||||
/// <param name="msgAdd">Messaggio registrato x variazione positiva</param>
|
||||
/// <param name="msgRem">Messaggio registrato x variazione negativa</param>
|
||||
/// <returns></returns>
|
||||
/// <summary> Aggiunge/Modifica un item in magazzino </summary> <param
|
||||
/// name="connString">Stringa connessione (variabile x cliente)</param> <param
|
||||
/// name="rec2upd">Record da aggiornare</param> <param name="deltaQty">quantità da
|
||||
/// aggiornare (se <0 è consumo)</param> <param name="userId">User corrente (SE
|
||||
/// applicabile)</param> <param name="msgAdd">Messaggio registrato x variazione
|
||||
/// positiva</param> <param name="msgRem">Messaggio registrato x variazione negativa</param> <returns></returns>
|
||||
public bool ItemModQty(string connString, RawItemModel rec2upd, int deltaQty, string userId, string msgAdd, string msgRem)
|
||||
{
|
||||
bool done = false;
|
||||
@@ -206,6 +234,41 @@ namespace MagMan.Data.Tenant.Controllers
|
||||
return done;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converte lista ItemModel in DTO
|
||||
/// </summary>
|
||||
/// <param name="origItem">Elenco ItemModel di partenza</param>
|
||||
/// <returns></returns>
|
||||
public List<ItemDTO> ItemsToDto(List<RawItemModel> origItem)
|
||||
{
|
||||
List<ItemDTO> answ = answ = origItem.Select(x => ItemToDto(x)).ToList();
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converte ItemModel in DTO
|
||||
/// </summary>
|
||||
/// <param name="origItem">ItemModel di partenza</param>
|
||||
/// <returns></returns>
|
||||
public ItemDTO ItemToDto(RawItemModel origItem)
|
||||
{
|
||||
ItemDTO answ = new ItemDTO()
|
||||
{
|
||||
MatCloudId = origItem.MatId,
|
||||
RawItemCloudId = origItem.RawItemId,
|
||||
IsRemn = origItem.IsRemn,
|
||||
Location = origItem.Location,
|
||||
QtyAvail = origItem.QtyAvail,
|
||||
HMm = origItem.HMm,
|
||||
LMm = origItem.LMm,
|
||||
WMm = origItem.WMm,
|
||||
Note = origItem.Note,
|
||||
ItemDtmx = origItem.ItemDtmx
|
||||
};
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiunge/Modifica un item in magazzino
|
||||
/// </summary>
|
||||
@@ -261,6 +324,9 @@ namespace MagMan.Data.Tenant.Controllers
|
||||
}
|
||||
else
|
||||
{
|
||||
// levo il matNav...
|
||||
dbCtx.Entry(rec2upd.MaterialNav).State = EntityState.Unchanged;
|
||||
//rec2upd.MaterialNav = new MaterialModel();
|
||||
dbCtx
|
||||
.DbSetItems
|
||||
.Add(rec2upd);
|
||||
@@ -346,8 +412,8 @@ namespace MagMan.Data.Tenant.Controllers
|
||||
HMm = x.HMm,
|
||||
LMm = x.LMm,
|
||||
WMm = x.WMm,
|
||||
SizeNum = x.RawItemList == null ? 0 : x.RawItemList.Count,
|
||||
QtyTot = x.RawItemList == null ? 0 : x.RawItemList.Sum(r => r.QtyAvail),
|
||||
SizeNum = x.RawItemList == null ? 0 : x.RawItemList.Where(x => x.IsActive).Count(),
|
||||
QtyTot = x.RawItemList == null ? 0 : x.RawItemList.Where(x => x.IsActive).Sum(r => r.QtyAvail),
|
||||
MatDtmx = x.MatDtmx,
|
||||
IsBeam = x.IsBeam,
|
||||
IsWall = x.IsWall,
|
||||
@@ -406,64 +472,6 @@ namespace MagMan.Data.Tenant.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converte il DTO in ItemModel
|
||||
/// </summary>
|
||||
/// <param name="origItem">DTO di partenza</param>
|
||||
/// <param name="isActive">Parametro active da impostare</param>
|
||||
/// <returns></returns>
|
||||
public RawItemModel ItemFromDto(ItemDTO origItem, bool isActive)
|
||||
{
|
||||
RawItemModel answ = new RawItemModel()
|
||||
{
|
||||
MatId = origItem.MatCloudId,
|
||||
IsRemn = origItem.IsRemn,
|
||||
Location = origItem.Location,
|
||||
QtyAvail = origItem.QtyAvail,
|
||||
HMm = origItem.HMm,
|
||||
LMm = origItem.LMm,
|
||||
WMm = origItem.WMm,
|
||||
Note = origItem.Note,
|
||||
IsActive = isActive
|
||||
};
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converte ItemModel in DTO
|
||||
/// </summary>
|
||||
/// <param name="origItem">ItemModel di partenza</param>
|
||||
/// <returns></returns>
|
||||
public ItemDTO ItemToDto(RawItemModel origItem)
|
||||
{
|
||||
ItemDTO answ = new ItemDTO()
|
||||
{
|
||||
MatCloudId = origItem.MatId,
|
||||
RawItemCloudId = origItem.RawItemId,
|
||||
IsRemn = origItem.IsRemn,
|
||||
Location = origItem.Location,
|
||||
QtyAvail = origItem.QtyAvail,
|
||||
HMm = origItem.HMm,
|
||||
LMm = origItem.LMm,
|
||||
WMm = origItem.WMm,
|
||||
Note = origItem.Note,
|
||||
ItemDtmx = origItem.ItemDtmx
|
||||
};
|
||||
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Converte lista ItemModel in DTO
|
||||
/// </summary>
|
||||
/// <param name="origItem">Elenco ItemModel di partenza</param>
|
||||
/// <returns></returns>
|
||||
public List<ItemDTO> ItemsToDto(List<RawItemModel> origItem)
|
||||
{
|
||||
List<ItemDTO> answ = answ = origItem.Select(x => ItemToDto(x)).ToList();
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco Materiali gestiti a magazzino
|
||||
/// </summary>
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace MagMan.Data.Tenant.DbModels
|
||||
public int QtyAvail { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Check if is a Remnant
|
||||
/// Active, for logical delete...
|
||||
/// </summary>
|
||||
public bool IsActive { get; set; } = false;
|
||||
|
||||
|
||||
@@ -160,15 +160,17 @@ namespace MagMan.Data.Tenant.Services
|
||||
/// </summary>
|
||||
/// <param name="nKey">Key di riferimento</param>
|
||||
/// <param name="matID">ID del materiale x cui filtrare, 0 = tutti</param>
|
||||
/// <param name="onlyActive">Solo attivi (default) o anche cancellati</param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<RawItemModel>> ItemGetByMat(int nKey, int matID)
|
||||
public async Task<List<RawItemModel>> ItemGetByMat(int nKey, int matID, bool onlyActive)
|
||||
{
|
||||
string source = "DB";
|
||||
string cString = ConnString(nKey);
|
||||
List<RawItemModel>? dbResult = new List<RawItemModel>();
|
||||
try
|
||||
{
|
||||
string currKey = $"{Const.rKeyConfig}:{nKey}:ItemList:{matID}";
|
||||
string keyAct = onlyActive ? "ACT" : "ALL";
|
||||
string currKey = $"{Const.rKeyConfig}:{nKey}:ItemList:{matID}:{keyAct}";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
string? rawData = await redisDb.StringGetAsync(currKey);
|
||||
@@ -187,7 +189,7 @@ namespace MagMan.Data.Tenant.Services
|
||||
}
|
||||
else
|
||||
{
|
||||
dbResult = dbController.ItemGetByMat(cString, matID);
|
||||
dbResult = dbController.ItemGetByMat(cString, matID, onlyActive);
|
||||
rawData = JsonConvert.SerializeObject(dbResult, JSSettings);
|
||||
await redisDb.StringSetAsync(currKey, rawData, LongCache);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="px-2">
|
||||
<h3>Articoli</h3>
|
||||
<div class="px-0">
|
||||
<div class="d-flex">
|
||||
<div class="px-0">
|
||||
<h3>Articoli</h3>
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckDefault" @bind="OnlyActive">
|
||||
<label class="form-check-label" for="flexSwitchCheckDefault">@actMessage</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<div class="px-0">
|
||||
<div class="d-flex">
|
||||
<div class="px-2">
|
||||
@if (CurrItem == null)
|
||||
@@ -22,7 +32,7 @@
|
||||
@if (CurrItem != null)
|
||||
{
|
||||
<hr />
|
||||
<ItemEdit CurrRecord="CurrItem" EC_update="ForceReload"></ItemEdit>
|
||||
<ItemEdit CurrRecord="CurrItem" KeyNum="@KeyNum" EC_update="ForceReload"></ItemEdit>
|
||||
}
|
||||
</div>
|
||||
<div class="card-body p-1">
|
||||
@@ -52,13 +62,18 @@
|
||||
}
|
||||
@* <th class="text-end">H (mm) <Sorter ParamName="H" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th> *@
|
||||
<th class="text-end">L (mm) <Sorter ParamName="L" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
||||
@* <th class="text-end"></th> *@
|
||||
<AuthorizeView Roles="SuperAdmin, Admin">
|
||||
<Authorized>
|
||||
<th></th>
|
||||
</Authorized>
|
||||
</AuthorizeView>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in ListRecords)
|
||||
{
|
||||
<tr class="align-middle @CheckSel(item)">
|
||||
string cssRow = item.IsActive ? "" : "text-strike";
|
||||
<tr class="align-middle @CheckSel(item) @cssRow">
|
||||
<td>
|
||||
<button class="btn btn-info btn-sm" @onclick="() => DoSelect(item)"><i class="fa-solid fa-search"></i></button>
|
||||
<button class="btn btn-primary btn-sm" @onclick="() => DoEdit(item)"><i class="fa-solid fa-edit"></i></button>
|
||||
@@ -93,15 +108,23 @@
|
||||
@($"{item.WMm:N2}")
|
||||
</td>
|
||||
}
|
||||
@* <td class="text-end">
|
||||
@($"{item.HMm:N2}")
|
||||
</td> *@
|
||||
<td class="text-end">
|
||||
@($"{item.LMm:N2}")
|
||||
</td>
|
||||
@* <td class="text-end">
|
||||
<button class="btn btn-sm btn-danger" @onclick="() => DeleteRecord(item)"><i class="fa-solid fa-trash-can"></i></button>
|
||||
</td> *@
|
||||
<AuthorizeView Roles="SuperAdmin, Admin">
|
||||
<Authorized>
|
||||
<td class="text-end">
|
||||
@if (item.QtyAvail == 0 && item.IsActive)
|
||||
{
|
||||
<button class="btn btn-danger btn-sm" @onclick="() => DeleteRecord(item)"><i class="fa-solid fa-trash"></i></button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-secondary btn-sm" disabled><i class="fa-solid fa-trash"></i></button>
|
||||
}
|
||||
</td>
|
||||
</Authorized>
|
||||
</AuthorizeView>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
||||
@@ -3,7 +3,10 @@ using MagMan.Core.Services;
|
||||
using MagMan.Data.Tenant.DbModels;
|
||||
using MagMan.Data.Tenant.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.CodeAnalysis.Differencing;
|
||||
using Microsoft.JSInterop;
|
||||
using System.Security;
|
||||
|
||||
namespace MagMan.UI.Components
|
||||
{
|
||||
@@ -36,6 +39,11 @@ namespace MagMan.UI.Components
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected string actMessage
|
||||
{
|
||||
get => onlyActive ? "Solo Attivi" : "Mostra Eliminati";
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected MessageService AppMService { get; set; } = null!;
|
||||
|
||||
@@ -45,6 +53,24 @@ namespace MagMan.UI.Components
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||
|
||||
protected bool OnlyActive
|
||||
{
|
||||
get => onlyActive;
|
||||
set
|
||||
{
|
||||
if (onlyActive != value)
|
||||
{
|
||||
onlyActive = value;
|
||||
DoSelect(null);
|
||||
var pUpd = Task.Run(async () =>
|
||||
{
|
||||
await ForceReload(true);
|
||||
});
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected int totalCount { get; set; } = 0;
|
||||
|
||||
[Inject]
|
||||
@@ -70,17 +96,29 @@ namespace MagMan.UI.Components
|
||||
|
||||
protected async Task CreateNew()
|
||||
{
|
||||
string matNote = $"{MaterialSel.MatCode.Replace("_", " ")}";
|
||||
if (MaterialSel.IsBeam)
|
||||
{
|
||||
matNote += $" {MaterialSel.WMm:N0}x{MaterialSel.HMm:N0}";
|
||||
}
|
||||
else
|
||||
{
|
||||
matNote += $" {MaterialSel.HMm:N0}";
|
||||
}
|
||||
CurrItem = new RawItemModel()
|
||||
{
|
||||
MatId = MaterialSel.MatId,
|
||||
Location = "nd",
|
||||
Note = "...",
|
||||
Note = matNote,
|
||||
QtyAvail = 0,
|
||||
IsActive = true,
|
||||
IsRemn = false,
|
||||
MaterialNav = MaterialSel,
|
||||
HMm = MaterialSel.HMm,
|
||||
LMm = MaterialSel.LMm,
|
||||
WMm = MaterialSel.WMm
|
||||
//LMm = MaterialSel.LMm,
|
||||
//WMm = MaterialSel.WMm
|
||||
LMm = 100,
|
||||
WMm = MaterialSel.IsBeam ? MaterialSel.WMm : 100
|
||||
};
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
@@ -161,6 +199,7 @@ namespace MagMan.UI.Components
|
||||
private string currSearch = "";
|
||||
private int filtType = 0;
|
||||
private List<RawItemModel>? ListRecords = null;
|
||||
private bool onlyActive = true;
|
||||
private int RawItemId = 0;
|
||||
private List<RawItemModel>? SearchRecords = null;
|
||||
|
||||
@@ -205,9 +244,8 @@ namespace MagMan.UI.Components
|
||||
private async Task ReloadData()
|
||||
{
|
||||
isLoading = true;
|
||||
await InvokeAsync(StateHasChanged);
|
||||
ListRecords = null;
|
||||
SearchRecords = await TService.ItemGetByMat(KeyNum, MaterialSel.MatId);
|
||||
SearchRecords = await TService.ItemGetByMat(KeyNum, MaterialSel.MatId, OnlyActive);
|
||||
// verifico filtro per ricerca
|
||||
if (!string.IsNullOrEmpty(currSearch))
|
||||
{
|
||||
@@ -216,7 +254,6 @@ namespace MagMan.UI.Components
|
||||
totalCount = SearchRecords.Count;
|
||||
SortTable();
|
||||
isLoading = false;
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
private void SortTable()
|
||||
|
||||
@@ -16,20 +16,29 @@
|
||||
<div class="col-md-6">
|
||||
<div class="d-flex">
|
||||
<div class="input-group">
|
||||
@if (MatType != 2)
|
||||
{
|
||||
<div class="form-floating">
|
||||
<NumInput CssClass="form-control" DisplFormat="0.00" @bind-Value="@CurrRecord.WMm"></NumInput>
|
||||
<label class="small">W (mm)</label>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="form-floating">
|
||||
<input class="form-control" disabled Value="@($"{CurrRecord.WMm:N2}")" />
|
||||
<label class="small">W (mm)</label>
|
||||
</div>
|
||||
}
|
||||
<div class="form-floating">
|
||||
<NumInput CssClass="form-control" DisplFormat="0.00" Value="@CurrRecord.WMm"></NumInput>
|
||||
<label class="small">W (mm)</label>
|
||||
</div>
|
||||
<div class="form-floating">
|
||||
<NumInput CssClass="form-control" DisplFormat="0.00" Value="@CurrRecord.HMm"></NumInput>
|
||||
<NumInput CssClass="form-control" DisplFormat="0.00" @bind-Value="@CurrRecord.HMm"></NumInput>
|
||||
<label class="small">H (mm)</label>
|
||||
</div>
|
||||
<div class="form-floating">
|
||||
<NumInput CssClass="form-control" DisplFormat="0.00" Value="@CurrRecord.LMm"></NumInput>
|
||||
<input class="form-control" disabled Value="@($"{CurrRecord.LMm:N2}")" />
|
||||
<label class="small">L (mm)</label>
|
||||
</div>
|
||||
<button class="btn btn-success w-10" @onclick="() => DoSave()"><i class="fa-solid fa-floppy-disk"></i> Save</button>
|
||||
@* <button class="btn btn-warning w-10" @onclick="() => DoCancel()"><i class="fa-solid fa-ban"></i> Cancel</button> *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this
|
||||
// file to you under the MIT license.
|
||||
using MagMan.Data.Admin.DbModels;
|
||||
using MagMan.Data.Admin.Services;
|
||||
using MagMan.Data.Tenant.DbModels;
|
||||
@@ -15,11 +15,15 @@ namespace MagMan.UI.Components
|
||||
[Parameter]
|
||||
public MaterialModel? CurrRecord { get; set; } = null;
|
||||
|
||||
[Parameter]
|
||||
public int KeyNum { get; set; } = 0;
|
||||
[Parameter]
|
||||
public EventCallback<bool> EC_update { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public int MatType { get; set; } = 0;
|
||||
|
||||
[Parameter]
|
||||
public int KeyNum { get; set; } = 0;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
@@ -31,6 +35,11 @@ namespace MagMan.UI.Components
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected async Task DoCancel()
|
||||
{
|
||||
await EC_update.InvokeAsync(true);
|
||||
}
|
||||
|
||||
protected async Task DoSave()
|
||||
{
|
||||
bool fatto = false;
|
||||
@@ -44,10 +53,6 @@ namespace MagMan.UI.Components
|
||||
await EC_update.InvokeAsync(true);
|
||||
}
|
||||
}
|
||||
protected async Task DoCancel()
|
||||
{
|
||||
await EC_update.InvokeAsync(true);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
@if (CurrItem != null)
|
||||
{
|
||||
<hr />
|
||||
<MaterialEdit CurrRecord="CurrItem" EC_update="ForceReload"></MaterialEdit>
|
||||
<MaterialEdit CurrRecord="CurrItem" KeyNum="@KeyNum" EC_update="ForceReload" MatType="@FiltType"></MaterialEdit>
|
||||
}
|
||||
</div>
|
||||
<div class="card-body p-1">
|
||||
@@ -64,7 +64,7 @@
|
||||
}
|
||||
<AuthorizeView Roles="SuperAdmin, Admin">
|
||||
<Authorized>
|
||||
<th class="text-end">Del</th>
|
||||
<th></th>
|
||||
</Authorized>
|
||||
</AuthorizeView>
|
||||
</tr>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Version>1.0.2402.0809</Version>
|
||||
<Version>1.0.2402.0813</Version>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
|
||||
@@ -66,6 +66,7 @@ namespace MagMan.UI.Pages
|
||||
protected void SaveMat(MaterialModel? newMat)
|
||||
{
|
||||
MaterialSel = newMat;
|
||||
RawItemSel = null;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
@@ -40,6 +40,9 @@ a,
|
||||
.validation-message {
|
||||
color: red;
|
||||
}
|
||||
.text-strike {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
#blazor-error-ui {
|
||||
background: lightyellow;
|
||||
bottom: 0;
|
||||
|
||||
@@ -36,6 +36,10 @@ a, .btn-link {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.text-strike {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
#blazor-error-ui {
|
||||
background: lightyellow;
|
||||
bottom: 0;
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');h1,h2,h3,h4,h5,h6,b,display-1,display-2,display-3,display-4{font-family:'Lato',sans-serif;}html,body,.textCondensed{font-family:'Roboto Condensed',sans-serif;}a,.btn-link{color:#0366d6;}.btn-primary{color:#fff;background-color:#1b6ec2;border-color:#1861ac;}.content{padding-top:1.1rem;}.valid.modified:not([type=checkbox]){outline:1px solid #26b050;}.invalid{outline:1px solid #f00;}.validation-message{color:#f00;}#blazor-error-ui{background:#ffffe0;bottom:0;box-shadow:0 -1px 2px rgba(0,0,0,.2);display:none;left:0;padding:.6rem 1.25rem .7rem 1.25rem;position:fixed;width:100%;z-index:1000;}#blazor-error-ui .dismiss{cursor:pointer;position:absolute;right:.75rem;top:.5rem;}.footer{line-height:1.8em;}.shortcuts{text-align:center;}.shortcuts .shortcut-icon{font-size:2rem;}.shortcuts .shortcut{min-width:9rem;min-height:5rem;display:inline-block;padding:2rem/3 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1rem/2;}.shortcuts .shortcut-sm{min-width:4.5rem;min-height:3rem;display:inline-block;padding:1rem/4 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1rem/2;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut-sm:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;}@media(max-width:640px){.shortcuts .shortcut{min-width:8rem;min-height:4rem;}body{font-size:.8em;}}
|
||||
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');h1,h2,h3,h4,h5,h6,b,display-1,display-2,display-3,display-4{font-family:'Lato',sans-serif;}html,body,.textCondensed{font-family:'Roboto Condensed',sans-serif;}a,.btn-link{color:#0366d6;}.btn-primary{color:#fff;background-color:#1b6ec2;border-color:#1861ac;}.content{padding-top:1.1rem;}.valid.modified:not([type=checkbox]){outline:1px solid #26b050;}.invalid{outline:1px solid #f00;}.validation-message{color:#f00;}.text-strike{text-decoration:line-through;}#blazor-error-ui{background:#ffffe0;bottom:0;box-shadow:0 -1px 2px rgba(0,0,0,.2);display:none;left:0;padding:.6rem 1.25rem .7rem 1.25rem;position:fixed;width:100%;z-index:1000;}#blazor-error-ui .dismiss{cursor:pointer;position:absolute;right:.75rem;top:.5rem;}.footer{line-height:1.8em;}.shortcuts{text-align:center;}.shortcuts .shortcut-icon{font-size:2rem;}.shortcuts .shortcut{min-width:9rem;min-height:5rem;display:inline-block;padding:2rem/3 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1rem/2;}.shortcuts .shortcut-sm{min-width:4.5rem;min-height:3rem;display:inline-block;padding:1rem/4 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1rem/2;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut-sm:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;}@media(max-width:640px){.shortcuts .shortcut{min-width:8rem;min-height:4rem;}body{font-size:.8em;}}
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>MagMan - Wood Warehouse Management System</i>
|
||||
<h4>Versione: 1.0.2402.0809</h4>
|
||||
<h4>Versione: 1.0.2402.0813</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.2402.0809
|
||||
1.0.2402.0813
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.0.2402.0809</version>
|
||||
<version>1.0.2402.0813</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/MagMan/stable/0/MagMan.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/MagMan/stable/0/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user