Files
Samuele Locatelli 686d38a0f5 Update componente window
Fix redraw on cancel
2026-03-09 16:31:31 +01:00

100 lines
4.9 KiB
Plaintext

<div class="rounded rounded-3 bg-secondary bg-opacity-25 bg-gradient p-2 m-0 shadow">
@if (CurrRecord != null)
{
<div><span class="fs-5"># <b>@(CurrRecord?.ItemID)</b></span> | Codice @CurrRecord.ItemCode</div>
<div class="row g-1">
<div class="col-md-2">
<div class="form-floating">
<select @bind="@CurrRecord.CodGroup" class="form-select" disabled="@CurrRecord.IsProtected">
@foreach (var item in ListItemGroup)
{
<option value="@item.CodGroup">@item.Description</option>
}
</select>
<label class="small bg-opacity-50">Gruppo</label>
</div>
</div>
<div class="col-md-1">
<div class="form-floating">
<select @bind="@CurrRecord.ItemType" class="form-select" disabled="@CurrRecord.IsProtected">
@foreach (var sType in Enum.GetValues(typeof(EgwCoreLib.Lux.Core.Enums.ItemClassType)))
{
<option value="@sType">@sType</option>
}
</select>
<label class="small bg-opacity-50">Tipo</label>
</div>
</div><div class="col-md-1">
<div class="form-floating">
<div class="form-control ">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" checked="@CurrRecord.IsService">
</div>
</div>
<label class="small bg-opacity-50">Serv</label>
</div>
</div>
<div class="col-md-2">
<div class="form-floating">
<input type="text" class="form-control" @bind="@CurrRecord.ExtItemCode" disabled="@CurrRecord.IsProtected">
<label class="small bg-opacity-50">ItemCode</label>
</div>
</div>
<div class="col-md-3">
<div class="form-floating">
<input type="text" class="form-control" @bind="@CurrRecord.SupplCode" disabled="@CurrRecord.IsProtected">
<label class="small bg-opacity-50">Suppl.Code</label>
</div>
</div>
<div class="col-md-2">
<div class="form-floating">
<InputDouble CssClass="form-control form-control-lg text-end" Decimals="2" Step="0.05" @bind-Value="@CurrRecord.Cost"></InputDouble>
@* <input type="number" class="form-control text-end" @bind="@CurrRecord.Cost"> *@
<label class="small bg-opacity-50">Costo</label>
</div>
</div>
<div class="col-md-1">
<div class="form-floating">
<InputPercent CssClass="form-control form-control-lg text-end" ForceInvariantParsing="true" Decimals="1" @bind-Value="@MarginDec"></InputPercent>
@* <input type="number" class="form-control text-end" @bind="@CurrRecord.Margin"> *@
<label class="small bg-opacity-50">Margine</label>
</div>
</div>
<div class="col-md-6">
<div class="form-floating">
<input type="text" class="form-control" @bind="@CurrRecord.Description" disabled="@CurrRecord.IsProtected">
<label class="small bg-opacity-50">Descrizione</label>
</div>
</div>
<div class="col-md-1">
<div class="form-floating">
<input type="number" class="form-control text-end" @bind="@CurrRecord.QtyMin">
<label class="small bg-opacity-50">Qty min</label>
</div>
</div>
<div class="col-md-1">
<div class="form-floating">
<input type="number" class="form-control text-end" @bind="@CurrRecord.QtyMax">
<label class="small bg-opacity-50">Qty MAX</label>
</div>
</div>
<div class="col-md-1">
<div class="form-floating">
<input type="text" class="form-control text-end" @bind="@CurrRecord.UM">
<label class="small bg-opacity-50">UM</label>
</div>
</div>
<div class="col-md-3">
<div class="row g-1 py-1">
<div class="col-md-6">
<button class="btn btn-lg btn-success w-100" @onclick="DoSave">Save</button>
</div>
<div class="col-md-6">
<button class="btn btn-lg btn-warning w-100" @onclick="DoCancel">Cancel</button>
</div>
</div>
</div>
</div>
}
</div>