Files
lux/Lux.UI/Components/Compo/Offer/OfferCommonPar.razor
T
2026-06-04 16:05:59 +02:00

99 lines
4.3 KiB
Plaintext

@inherits BaseComp
<div class="row">
@if (isLoading)
{
<LoadingData></LoadingData>
}
else
{
<div class="col-3">
<div class="form-floating mb-3 @(IsChanged(SelProfile, OrigSel?.GetVal("Profile")) ? "border border-info rounded shadow" : "")">
<select @bind="@SelProfile" class="form-select">
<option value="">--- Nessuna Selezione ---</option>
@foreach (var item in ListProfiles)
{
<option value="@item">@item</option>
}
</select>
<label class="small">@Traduci("profilo")</label>
</div>
@if (ForceMode && !string.IsNullOrEmpty(@SelProfile))
{
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" @bind="@ForceProfile" />
<label class="form-check-label">@Traduci("offerta_sovrasParam")</label>
</div>
}
</div>
<div class="col-3">
<div class="form-floating mb-3 @(IsChanged(SelGlass, OrigSel?.GetVal("Glass")) ? "border border-info rounded shadow" : "")">
<select @bind="@SelGlass" class="form-select">
<option value="">--- Nessuna Selezione ---</option>
@foreach (var item in ListGlass)
{
<option value="@item">@item</option>
}
</select>
<label class="small">@Traduci("offerta_vetro")</label>
</div>
@if (ForceMode && !string.IsNullOrEmpty(@SelGlass))
{
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" @bind="@ForceGlass" />
<label class="form-check-label">@Traduci("offerta_sovrasParam")</label>
</div>
}
</div>
<div class="col-3">
<div class="form-floating mb-3 @(IsChanged(SelWood, OrigSel?.GetVal("Wood")) ? "border border-info rounded shadow" : "")">
<select @bind="@SelWood" class="form-select">
<option value="">--- Nessuna Selezione ---</option>
@foreach (var item in ListWood)
{
<option value="@item">@item</option>
}
</select>
<label class="small">@Traduci("offerta_legno")</label>
</div>
@if (ForceMode && !string.IsNullOrEmpty(@SelWood))
{
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" @bind="@ForceWood" />
<label class="form-check-label">@Traduci("offerta_sovrasParam")</label>
</div>
}
</div>
<div class="col-3">
<div class="form-floating mb-3 @(IsChanged(SelColor, OrigSel?.GetVal("Color")) ? "border border-info rounded shadow" : "")">
<select @bind="@SelColor" class="form-select">
<option value="">--- Nessuna Selezione ---</option>
@foreach (var item in ListColors)
{
<option value="@item">@item</option>
}
</select>
<label class="small">@Traduci("offerta_colore")</label>
</div>
@if (ForceMode && !string.IsNullOrEmpty(@SelColor))
{
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" @bind="@ForceColor" />
<label class="form-check-label">@Traduci("offerta_sovrasParam")</label>
</div>
}
</div>
@if (HasChanged() || ForceMode)
{
<div class="col-6">
</div>
<div class="col-3">
<button class="btn btn-lg btn-success w-100" @onclick="DoSave"><i class="fa-solid fa-floppy-disk"></i> @Traduci("salva")</button>
</div>
<div class="col-3">
<button class="btn btn-lg btn-warning w-100" @onclick="DoCancel"><i class="fa-solid fa-ban"></i> @Traduci("annulla")</button>
</div>
}
}
</div>