Spostato blocco general in compoente indipendente
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="text-start p-1 display-4 ">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="border mb-2 shadow-sm rounded">
|
||||
<div class="card-body py-2">
|
||||
<div class="row my-2">
|
||||
<div class="col-sm-6">
|
||||
<h5 class="card-title">General</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<label class="input-group-text" for="MaterialWindow">Material</label>
|
||||
<select class="form-select @(cssValid("Material"))" id="MaterialWindow" @bind="CurrMaterial">
|
||||
@foreach (var item in ListPayload.Material)
|
||||
{
|
||||
<option value="@item">@item</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="ProfileWindow">Profile</label>
|
||||
<select class="form-select" id="ProfileWindow">
|
||||
<option value="0">Profilo 78</option>
|
||||
<option value="1">Profilo..</option>
|
||||
<option value="2">Profilo...</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<h5>Fill type</h5>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="GlassWindow">Glass</label>
|
||||
<select class="form-select @(cssValid("Glass"))" id="GlassWindow" @bind="@CurrGlass">
|
||||
@foreach (string glass in ListPayload.Glass)
|
||||
{
|
||||
<option value="@glass">@glass</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="PanelWindow">Pannello</label>
|
||||
<select class="form-select" id="PanelWindow">
|
||||
<option value="0">Liscio</option>
|
||||
<option value="1">Con venatura</option>
|
||||
<option value="2">Custom</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<h5 class="card-title">Color</h5>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="ColorWindow">Window</label>
|
||||
<select class="form-select @(cssValid("ColorMaterial"))" id="ColorWindow" @bind="@CurrColor">
|
||||
@foreach (string colorMaterial in ListPayload.ColorMaterial)
|
||||
{
|
||||
<option value="@colorMaterial">@colorMaterial</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="Trunking">Trunking</label>
|
||||
<select class="form-select" id="Trunking">
|
||||
<option value="0">Black</option>
|
||||
<option value="1">Silver</option>
|
||||
<option value="2">White</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,102 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WebWindowComplex.DTO;
|
||||
|
||||
namespace WebWindowComplex
|
||||
{
|
||||
public partial class General
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Finestra corrente
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public Window CurrWindow { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> EC_SelColor { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> EC_SelGlass { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> EC_SelWindMat { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Elenco anagrafiche di base
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public BaseListPayload ListPayload { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Elenco Warnings attivi
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public Dictionary<string, string> ListWarnings { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected string CurrColor
|
||||
{
|
||||
get => currColor;
|
||||
set
|
||||
{
|
||||
currColor = value;
|
||||
_ = EC_SelColor.InvokeAsync(value);
|
||||
}
|
||||
}
|
||||
|
||||
protected string CurrGlass
|
||||
{
|
||||
get => currGlass;
|
||||
set
|
||||
{
|
||||
currGlass = value;
|
||||
_ = EC_SelGlass.InvokeAsync(value);
|
||||
}
|
||||
}
|
||||
|
||||
protected string CurrMaterial
|
||||
{
|
||||
get => currMaterial;
|
||||
set
|
||||
{
|
||||
currMaterial = value;
|
||||
_ = EC_SelWindMat.InvokeAsync(value);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// Calcola CSS warning
|
||||
/// </summary>
|
||||
/// <param name="fKey"></param>
|
||||
/// <returns></returns>
|
||||
protected string cssValid(string fKey)
|
||||
{
|
||||
return ListWarnings.ContainsKey(fKey) ? "border border-danger" : "";
|
||||
}
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
currColor = CurrWindow.sColorMaterial;
|
||||
currGlass = CurrWindow.sGlass;
|
||||
currMaterial = CurrWindow.sMaterial;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private string currColor = "";
|
||||
private string currGlass = "";
|
||||
private string currMaterial = "";
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
@@ -280,32 +280,6 @@
|
||||
</div>
|
||||
@if (!(FrameWindow.AreaList[0] is Split) || (SashList.Count == 0 && SplitList.Count == 0))
|
||||
{
|
||||
@* <div class="border mb-2 shadow-sm rounded">
|
||||
<div class="card-body py-2">
|
||||
<div class="row my-2">
|
||||
<div class="col-4">
|
||||
<h3 class="card-title">Area frame</h3>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
@if (SashList.Count == 0 && SplitList.Count == 0)
|
||||
{
|
||||
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AddSashToFrame(FrameWindow)">Aggiungi window</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
@if (!(FrameWindow.AreaList[0] is Split))
|
||||
{
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => FrameWindow.AddSplit(FrameWindow)">Aggiungi split</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> *@
|
||||
<AreaFrame CurrFrameWindow="FrameWindow" CurrSashList="SashList" CurrSplitList="SplitList" EC_AddSash="() => AddSashToFrame(FrameWindow)" EC_AddWindow="() => FrameWindow.AddSplit(FrameWindow)"></AreaFrame>
|
||||
|
||||
}
|
||||
@@ -810,97 +784,7 @@
|
||||
}
|
||||
else if (currStep == CompileStep.General)
|
||||
{
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="text-start p-1 display-4 ">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="border mb-2 shadow-sm rounded">
|
||||
<div class="card-body py-2">
|
||||
<div class="row my-2">
|
||||
<div class="col-sm-6">
|
||||
<h5 class="card-title">General</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<label class="input-group-text" for="MaterialWindow">Material</label>
|
||||
<select class="form-select" id="MaterialWindow" @bind="@((m_CurrWindow!).sMaterial)">
|
||||
@foreach (var item in ListPayload.Material)
|
||||
{
|
||||
<option value="@item">@item</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="ProfileWindow">Profile</label>
|
||||
<select class="form-select" id="ProfileWindow">
|
||||
<option value="0">Profilo 78</option>
|
||||
<option value="1">Profilo..</option>
|
||||
<option value="2">Profilo...</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<h5>Fill type</h5>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="GlassWindow">Glass</label>
|
||||
<select class="form-select" id="GlassWindow" @bind="@m_CurrWindow.sGlass">
|
||||
@foreach (string glass in ListPayload.Glass)
|
||||
{
|
||||
<option value="@glass">@glass</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="PanelWindow">Pannello</label>
|
||||
<select class="form-select" id="PanelWindow">
|
||||
<option value="0">Liscio</option>
|
||||
<option value="1">Con venatura</option>
|
||||
<option value="2">Custom</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<h5 class="card-title">Color</h5>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="ColorWindow">Window</label>
|
||||
<select class="form-select @(cssValid("ColorMaterial"))" id="ColorWindow" @bind="@m_CurrWindow.sColorMaterial">
|
||||
@foreach (string colorMaterial in ListPayload.ColorMaterial)
|
||||
{
|
||||
<option value="@colorMaterial">@colorMaterial</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="Trunking">Trunking</label>
|
||||
<select class="form-select" id="Trunking">
|
||||
<option value="0">Black</option>
|
||||
<option value="1">Silver</option>
|
||||
<option value="2">White</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<General CurrWindow="@m_CurrWindow" ListPayload="ListPayload" ListWarnings="listWarnings" EC_SelColor="SelectColor" EC_SelGlass="SelectGlass" EC_SelWindMat="SelectMat"></General>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1191,5 +1191,26 @@ namespace WebWindowComplex
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
private void SelectColor(string newVal)
|
||||
{
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_CurrWindow.sColorMaterial = newVal;
|
||||
}
|
||||
}
|
||||
private void SelectMat(string newVal)
|
||||
{
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_CurrWindow.sMaterial = newVal;
|
||||
}
|
||||
}
|
||||
private void SelectGlass(string newVal)
|
||||
{
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_CurrWindow.sGlass = newVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.10.1011</Version>
|
||||
<Version>2.7.10.1012</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -179,6 +179,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user