Eliminato template da WebWindowComplex
This commit is contained in:
@@ -31,17 +31,18 @@ namespace WebWindowComplex.Compo
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public EventCallback<int> EC_FirstHwOptionList { get; set; }
|
||||
|
||||
private bool isLoadingHwOpt { get; set; }
|
||||
|
||||
private bool hwOptCollapsed { get; set; }
|
||||
[Parameter]
|
||||
public bool isLoadingHwOpt { get; set; } = false;
|
||||
|
||||
private bool hwOptCollapsed { get; set; } = true;
|
||||
|
||||
private async Task changeCollapsed()
|
||||
{
|
||||
hwOptCollapsed = !hwOptCollapsed;
|
||||
if(CurrSash.HwOptionList.Count == 0)
|
||||
{
|
||||
isLoadingHwOpt = true;
|
||||
//isLoadingHwOpt = true;
|
||||
await EC_FirstHwOptionList.InvokeAsync(CurrSash.GroupId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,18 +9,6 @@
|
||||
{
|
||||
<option value=@(openingType.Id)>@(openingType.Name)</option>
|
||||
}
|
||||
@* <option value="0">A bandiera sinistra</option>
|
||||
<option value="1">A bandiera destra</option>
|
||||
<option value="2">Ad anta-ribalta sinistra</option>
|
||||
<option value="3">Ad anta-ribalta destra</option>
|
||||
<option value="4">Solo verso alto</option>
|
||||
<option value="5">Solo verso basso</option>
|
||||
<option value="6">Pivot</option>
|
||||
<option value="7">Fissa</option>
|
||||
<option value="8">Complanare sinistra</option>
|
||||
<option value="9">Complanare destra</option>
|
||||
<option value="10">Scorrevole sinistra</option>
|
||||
<option value="11">Scorrevole destra</option> *@
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
</select>
|
||||
</div>
|
||||
<AreaHwOption CurrSash="CurrItem"
|
||||
IsLoadingHwOpt="isLoadingHwOpt"
|
||||
EC_UpdateHwOptCombo="UpdateOptCombo"
|
||||
EC_UpdateHwOptText="UpdateOptText"
|
||||
EC_FirstHwOptionList="FirstHwOptionList">
|
||||
|
||||
@@ -80,6 +80,9 @@ namespace WebWindowComplex.Compo
|
||||
[Parameter]
|
||||
public List<Sash> SashList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public bool isLoadingHwOpt { get; set; } = false;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</div>
|
||||
<div class="card-body py-2">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-12 d-flex flex-column gap-2">
|
||||
<div class="col-md-6 d-flex flex-column gap-2 flex-wrap">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<label class="input-group-text">Material</label>
|
||||
<select class="form-select @(cssValid("Material"))" @bind="CurrMaterial">
|
||||
@@ -35,7 +35,7 @@
|
||||
</div>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-12 d-flex flex-column gap-2">
|
||||
<div class="col-md-6 d-flex flex-column gap-2 mr-2 flex-wrap">
|
||||
<div class="row">
|
||||
<h5>Fill type</h5>
|
||||
</div>
|
||||
@@ -59,11 +59,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12 d-flex flex-column gap-2">
|
||||
<div class="col-md-6 d-flex flex-column gap-2 flex-wrap">
|
||||
<div class="row">
|
||||
<h5 class="card-title">Color</h5>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class ="row">
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text">Window</label>
|
||||
<select class="form-select @(cssValid("ColorMaterial"))" @bind="@CurrColor">
|
||||
|
||||
@@ -13,12 +13,7 @@ namespace WebWindowComplex.DTO
|
||||
/// Payload complessivo delle anagrafiche necessarie x Window
|
||||
/// </summary>
|
||||
public class BaseListPayload
|
||||
{
|
||||
/// <summary>
|
||||
/// Elenco template in formato DTO
|
||||
/// </summary>
|
||||
public List<TemplateSelectDTO>? TemplateDTO { get; set; } = null;
|
||||
|
||||
{
|
||||
/// <summary>
|
||||
/// Elenco Famiglie HW in formato DTO
|
||||
/// </summary>
|
||||
|
||||
@@ -39,11 +39,6 @@ namespace WebWindowComplex.DTO
|
||||
/// </summary>
|
||||
public string Profile { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Template selezionato
|
||||
/// </summary>
|
||||
public Template Template { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Verifica di validità dell'intero Payload
|
||||
/// </summary>
|
||||
@@ -55,8 +50,7 @@ namespace WebWindowComplex.DTO
|
||||
bool glassOk = !string.IsNullOrEmpty(Glass);
|
||||
bool matOK = !string.IsNullOrEmpty(Material);
|
||||
bool profileOK = !string.IsNullOrEmpty(Profile);
|
||||
bool templateOK = Template != null;
|
||||
return famHwOK && colorOK && matOK && glassOk && templateOK && profileOK;
|
||||
return famHwOK && colorOK && matOK && glassOk && profileOK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebWindowComplex.DTO
|
||||
{
|
||||
public class TemplateSelectDTO
|
||||
{
|
||||
public int Index { get; set; } = 0;
|
||||
public string Description { get; set; } = "";
|
||||
public string JwdFileName { get; set; } = "";
|
||||
public string SVGFileName { get; set; } = "";
|
||||
public string ImageUrl { get; set; } = "";
|
||||
}
|
||||
}
|
||||
@@ -10,9 +10,8 @@ namespace WebWindowComplex
|
||||
{
|
||||
public enum CompileStep
|
||||
{
|
||||
Template = 0,
|
||||
Tree = 1,
|
||||
Frame,
|
||||
Tree = 0,
|
||||
Frame = 1,
|
||||
Split,
|
||||
Sash,
|
||||
Fill,
|
||||
|
||||
@@ -174,12 +174,8 @@ namespace WebWindowComplex.Models
|
||||
dRes += RelativeDimList[Ind].dDimension;
|
||||
}
|
||||
|
||||
//for (var Ind = nIndex + 1; Ind <= RelativeDimList.Count - 1; Ind++)
|
||||
// dRes += RelativeDimList[Ind].dDimension;
|
||||
dRes = (100 - dRes);
|
||||
RelativeDimList[nIndex - 1].SetDimension(dRes);
|
||||
//for (var nInd = 0; nInd <= nIndex - 1; nInd++)
|
||||
// RelativeDimList[nInd].SetDimension(dRes);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -37,83 +37,34 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="@mainCss()">
|
||||
<div class="col-md-6 col-sm-12 d-flex flex-column">
|
||||
<div class="card text-center table-svg shadow rounded">
|
||||
<div class="card-header" style="background-color: #d5f1f2;">
|
||||
<div class="d-flex justify-content-between align-middle">
|
||||
<div class="col-8 d-grid px-2 d-md-flex justify-content-md-start">
|
||||
<div class="row justify-content-between align-middle flex-wrap">
|
||||
<div class="col-md-6 col-sm-12 d-grid px-2 d-md-flex justify-content-md-start flex-wrap">
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
@if (string.IsNullOrEmpty(LiveData.CurrJwd))
|
||||
{
|
||||
<li class="nav-item m-1">
|
||||
@if (currStep == CompileStep.Template)
|
||||
{
|
||||
<button data-target="#Template" class="nav-link active fw-bold" @onclick="() => AdvStep(CompileStep.Template)">Template</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button data-target="#Template" class="nav-link text-secondary" @onclick="() => AdvStep(CompileStep.Template)">Template</button>
|
||||
}
|
||||
</li>
|
||||
}
|
||||
@if (FrameWindow != null)
|
||||
{
|
||||
<li class="nav-item m-1">
|
||||
<button data-target="#Tree" class="@tabNavCss(CompileStep.Tree)" @onclick="() => NextStep(CompileStep.Tree)">Tree</button>
|
||||
</li>
|
||||
<li class="nav-item m-1">
|
||||
<button data-target="#General" class="@tabNavCss(CompileStep.General)" @onclick="() => NextStep(CompileStep.General)">General</button>
|
||||
</li>
|
||||
}
|
||||
<li class="nav-item m-1">
|
||||
<button data-target="#Tree" class="@tabNavCss(CompileStep.Tree)" @onclick="() => NextStep(CompileStep.Tree)">Tree</button>
|
||||
</li>
|
||||
<li class="nav-item m-1">
|
||||
<button data-target="#General" class="@tabNavCss(CompileStep.General)" @onclick="() => NextStep(CompileStep.General)">General</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="@buttonCss()">
|
||||
<div class="col d-flex">
|
||||
@if (currStep != CompileStep.Template)
|
||||
{
|
||||
<button class="btn btn-lg btn-primary" style="font-size: 1rem;" @onclick="DoReset">Reset</button>
|
||||
}
|
||||
<div class="col-md-6 col-sm-12 d-grid gap-1 d-md-flex justify-content-md-end align-items-center flex-wrap">
|
||||
<div class="col d-flex justify-content-md-end">
|
||||
<button class="btn btn-lg btn-primary" style="font-size: 1rem;" @onclick="DoReset">Reset</button>
|
||||
</div>
|
||||
<div class="col d-flex">
|
||||
<div class="col d-flex justify-content-md-end">
|
||||
<button class="btn btn-lg btn-primary" style="font-size: 1rem;" @onclick="DoSave">Save</button>
|
||||
</div>
|
||||
<div class="col d-flex">
|
||||
<div class="col d-flex justify-content-md-end">
|
||||
<button class="btn btn-lg btn-primary" style="font-size: 1rem;" @onclick="DoClose">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body bg-transparent">
|
||||
@if (string.IsNullOrEmpty(LiveData.CurrJwd))
|
||||
{
|
||||
@if (currStep == CompileStep.Template && ListPayload.TemplateDTO != null)
|
||||
{
|
||||
<table class="table table-hover align-middle shadow-sm">
|
||||
<thead class="fs-5">
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col" class="col-4">Image</th>
|
||||
<th scope="col" class="text-start">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-group-divider fs-5">
|
||||
@foreach (var item in ListPayload.TemplateDTO)
|
||||
{
|
||||
string colorClass = "";
|
||||
@if (SelTemplateDTO != null && item.Index == SelTemplateDTO.Index)
|
||||
colorClass = "table-success";
|
||||
else
|
||||
colorClass = "";
|
||||
<tr style="height: 120px;" class="@colorClass" @onclick="() => DoSelect(item)">
|
||||
<td>@item.Index</td>
|
||||
<td><img class="img-fluid" width="100" src="@item.ImageUrl" /></td>
|
||||
<td class="text-start">@item.Description</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
}
|
||||
@if (currStep == CompileStep.Tree)
|
||||
{
|
||||
<CardTree ItemTableList="m_ItemTableList"
|
||||
@@ -170,6 +121,7 @@
|
||||
<CardSashGroup CurrIndex="currSash"
|
||||
CurrItem="SashList[currSash]"
|
||||
SashList="m_SashList"
|
||||
isLoadingHwOpt="isLoadingHwOpt"
|
||||
EC_ChangeAllJoints="ChangeAllJoints"
|
||||
EC_ChangeHandle="ChangeHandle"
|
||||
EC_CopyContentSash="CopyContentSash"
|
||||
@@ -218,12 +170,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (currStep != CompileStep.Template)
|
||||
{
|
||||
<div class="col-6">
|
||||
@outSvg
|
||||
</div>
|
||||
}
|
||||
<div class="col-md-6 col-sm-12 d-flex flex-column">
|
||||
@outSvg
|
||||
</div>
|
||||
if (listWarnings != null && listWarnings.Count > 0)
|
||||
{
|
||||
<div class="alert alert-warning">
|
||||
|
||||
@@ -84,12 +84,6 @@ namespace WebWindowComplex
|
||||
[Parameter]
|
||||
public EventCallback<bool> EC_OnClose { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Evento selezione template
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public EventCallback<TemplateSelectDTO> EC_OnSelectedTemplate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sollevo evento errore validazione con una lista di errori rilevati
|
||||
/// </summary>
|
||||
@@ -175,7 +169,6 @@ namespace WebWindowComplex
|
||||
protected string SelGlass { get; set; } = "";
|
||||
protected string SelMaterial { get; set; } = ""!;
|
||||
protected string SelProfile { get; set; } = "";
|
||||
protected TemplateSelectDTO? SelTemplateDTO { get; set; } = null;
|
||||
|
||||
protected List<Split> SplitList
|
||||
{
|
||||
@@ -509,6 +502,7 @@ namespace WebWindowComplex
|
||||
{
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
isLoadingHwOpt = true;
|
||||
#if DEBUG
|
||||
var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize(), Formatting.Indented);
|
||||
#else
|
||||
@@ -580,17 +574,6 @@ namespace WebWindowComplex
|
||||
await EC_OnClose.InvokeAsync(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selezione del template
|
||||
/// </summary>
|
||||
/// <param name="newSel"> template selezionato </param>
|
||||
protected async void DoSelect(TemplateSelectDTO newSel)
|
||||
{
|
||||
editLock = false;
|
||||
SelTemplateDTO = newSel;
|
||||
await EC_OnSelectedTemplate.InvokeAsync(newSel);
|
||||
}
|
||||
|
||||
protected override void OnAfterRender(bool firstRender)
|
||||
{
|
||||
isRendered = true;
|
||||
@@ -738,6 +721,9 @@ namespace WebWindowComplex
|
||||
UpdateDict();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiornamento dei dati con informazioni ricevute dai dizionari
|
||||
/// </summary>
|
||||
protected void UpdateDict()
|
||||
{
|
||||
// se ho i dizionari delle forme le aggiungo
|
||||
@@ -816,6 +802,8 @@ namespace WebWindowComplex
|
||||
|
||||
private bool isRendered = false;
|
||||
|
||||
private bool isLoadingHwOpt = false;
|
||||
|
||||
/// <summary>
|
||||
/// ELenco errori di coerenza/link dati (vanno risolti per disegnare/procedere)
|
||||
/// </summary>
|
||||
@@ -857,8 +845,6 @@ namespace WebWindowComplex
|
||||
|
||||
private string m_SelFamilyHardware { get; set; } = "";
|
||||
|
||||
private Template m_SelTemplate { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Salvataggio JWD precedente x evitare loop su update (aggiornato dopo chiamate redis)
|
||||
/// </summary>
|
||||
@@ -925,27 +911,6 @@ namespace WebWindowComplex
|
||||
currSplit = -1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola larghezza colonna button nav
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string buttonCss()
|
||||
{
|
||||
return (currStep == CompileStep.Template) ? "col-4 d-grid gap-1 d-md-flex justify-content-md-end align-items-center" : "col-4 d-grid gap-1 d-md-flex justify-content-md-end align-items-center";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola bottone selezionato per il Fill
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string buttonFillCss(FillTypes currFillTypes)
|
||||
{
|
||||
if (FillList.ElementAt(currFill).SelFillType == currFillTypes)
|
||||
return "btn btn-secondary btn-sm";
|
||||
else
|
||||
return "btn btn-outline-secondary btn-sm";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prima chiamata alle opzioni hardware
|
||||
/// </summary>
|
||||
@@ -1119,6 +1084,7 @@ namespace WebWindowComplex
|
||||
|
||||
private void M_CurrWindow_OnHwOption(object? sender, OnReqHwOptEventArgs e)
|
||||
{
|
||||
isLoadingHwOpt = true;
|
||||
Dictionary<string, string> Args = new Dictionary<string, string>();
|
||||
Args.Add("Mode", $"{(int)Enums.QuestionModes.HARDWARE}");
|
||||
Args.Add("SubMode", $"{(int)Enums.QuestionHwSubModes.HARDWAREOPTIONS}");
|
||||
@@ -1147,15 +1113,6 @@ namespace WebWindowComplex
|
||||
_ = EC_DoUpdate.InvokeAsync(Args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola larghezza colonna contenente nav da mostrare
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string mainCss()
|
||||
{
|
||||
return (currStep == CompileStep.Template) ? "col-12 d-flex flex-column" : "col-6 d-flex flex-column";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per cambiare step
|
||||
/// </summary>
|
||||
@@ -1412,20 +1369,6 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiornamento shape dato GroupId
|
||||
/// </summary>
|
||||
/// <param name="groupId"> nuova sash </param>
|
||||
/// <returns></returns>
|
||||
private async Task UpdateShape(int groupId)
|
||||
{
|
||||
List<int> reqList = new List<int>() { groupId };
|
||||
await DoReqShape(reqList);
|
||||
#if false
|
||||
await DoReqShape(groupId);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebWindowComplex
|
||||
{
|
||||
public class Template
|
||||
{
|
||||
private int m_nIndex;
|
||||
public int nIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_nIndex;
|
||||
}
|
||||
}
|
||||
|
||||
public string sDescription { get; set; } = "";
|
||||
|
||||
private string m_JWD;
|
||||
public string JWD
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_JWD;
|
||||
}
|
||||
}
|
||||
|
||||
private string m_SVG;
|
||||
public string SVG
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SVG;
|
||||
}
|
||||
}
|
||||
|
||||
public Template(int nIndex, string sDescription, string SVG, string JWD)
|
||||
{
|
||||
m_nIndex = nIndex;
|
||||
this.sDescription = sDescription;
|
||||
m_SVG = SVG;
|
||||
m_JWD = JWD;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.11.610</Version>
|
||||
<Version>2.7.11.614</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -290,6 +290,18 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user