Files
lux/Lux.UI/Components/Compo/Item/ItemEdit.razor
T
2026-06-03 17:36:39 +02:00

102 lines
5.2 KiB
Plaintext

@inherits BaseComp
<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">@Traduci("articoli_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">@Traduci("articoli_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">@Traduci("articoli_servizio")</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">@Traduci("articoli_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">@Traduci("articoli_supplCode")</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">@Traduci("articoli_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">@Traduci("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">@Traduci("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">@Traduci("articoli_qtyMin")</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">@Traduci("articoli_qtyMax")</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">@Traduci("unitaMisura")</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">@Traduci("salva")</button>
</div>
<div class="col-md-6">
<button class="btn btn-lg btn-warning w-100" @onclick="DoCancel">@Traduci("annulla")</button>
</div>
</div>
</div>
</div>
}
</div>