372 lines
23 KiB
Plaintext
372 lines
23 KiB
Plaintext
@using EgwCoreLib.Razor
|
|
@using static WebWindowComplex.LayoutConst
|
|
<div class="row">
|
|
@if (isLoading)
|
|
{
|
|
<EgwCoreLib.Razor.LoadingData Title="...processing..."></EgwCoreLib.Razor.LoadingData>
|
|
}
|
|
else if (!okParams)
|
|
{
|
|
<div class="d-flex flex-column">
|
|
<div class="card text-center shadow rounded">
|
|
<div class="col-md-12 d-grid gap-4 p-2 d-md-flex justify-content-end flex-wrap">
|
|
<button class="btn btn-lg btn-primary px-4" style="font-size: 1rem;" @onclick="DoClose">Close</button>
|
|
</div>
|
|
<div class="alert alert-warning">
|
|
<div class="fs-3">Parametri Mancanti!</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
else if (!okJwd)
|
|
{
|
|
<div class="d-flex flex-column">
|
|
<div class="card text-center shadow rounded">
|
|
<div class="col-md-12 d-grid gap-4 p-2 d-md-flex justify-content-end flex-wrap">
|
|
<button class="btn btn-lg btn-primary px-4" style="font-size: 1rem;" @onclick="DoClose">Close</button>
|
|
</div>
|
|
<div class="alert alert-warning">
|
|
<div class="fs-3">JWD Mancante!</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
}
|
|
else
|
|
{
|
|
if (listErrPre != null && listErrPre.Count > 0)
|
|
{
|
|
<div class="d-flex flex-column">
|
|
<div class="alert alert-danger">
|
|
<div class="fs-3">Errori validazione!</div>
|
|
<div class="col-12 col-md-6 col-lg-3">
|
|
|
|
<ul class="list-group">
|
|
@foreach (var item in listErrPre)
|
|
{
|
|
<li class="list-group-item">@item.Value</li>
|
|
}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
else if (listErrLink != null && listErrLink.Count > 0)
|
|
{
|
|
<div class="d-flex flex-column">
|
|
<div class="alert alert-danger">
|
|
<div class="fs-3">Errore configurazione:</div>
|
|
<div class="col-12">
|
|
<ul class="list-group">
|
|
@foreach (var item in listErrLink)
|
|
{
|
|
<li class="list-group-item">@item.Value</li>
|
|
}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="d-flex flex-column">
|
|
<div class="card text-center table-svg shadow rounded">
|
|
<div class="card-header" style="background-color: #c5d6ed;">
|
|
<div class="row justify-content-between align-middle flex-wrap">
|
|
<div class="col-md-12 col-lg-6 d-grid px-2 d-md-flex justify-content-md-start flex-wrap">
|
|
<ul class="nav nav-tabs card-header-tabs">
|
|
<li class="nav-item m-1">
|
|
<button data-target="#Tree" class="@tabNavCss(CompileStep.Tree)" style="font-size: 1rem;" @onclick="() => NextStep(CompileStep.Tree)">Tree</button>
|
|
</li>
|
|
<li class="nav-item m-1">
|
|
<button data-target="#General" class="@tabNavCss(CompileStep.General)" style="font-size: 1rem;" @onclick="() => NextStep(CompileStep.General)">General</button>
|
|
</li>
|
|
@* @if (FrameWindow.Shape == Json.WindowConst.Shapes.ARC ||
|
|
FrameWindow.Shape == Json.WindowConst.Shapes.ARC_FULL ||
|
|
FrameWindow.Shape == Json.WindowConst.Shapes.DOUBLEARC ||
|
|
FrameWindow.Shape == Json.WindowConst.Shapes.THREECENTERARC)
|
|
{
|
|
<li class="nav-item m-1">
|
|
<button data-target="#ArcElement" class="@tabNavCss(CompileStep.ArcElement)" @onclick="() => NextStep(CompileStep.ArcElement)">Arc Elem</button>
|
|
</li>
|
|
} *@
|
|
</ul>
|
|
</div>
|
|
<div class="col-md-12 col-lg-6 d-grid gap-4 px-4 d-md-flex justify-content-md-end align-items-center flex-wrap">
|
|
<button class="btn btn-lg btn-primary px-4" style="font-size: 1rem;" @onclick="DoReset">Reset</button>
|
|
<button class="btn btn-lg btn-primary px-4" style="font-size: 1rem;" @onclick="DoSave">Save</button>
|
|
<button class="btn btn-lg btn-primary px-4" style="font-size: 1rem;" @onclick="DoClose">Close</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body bg-transparent">
|
|
<div class="row justify-content-between align-middle flex-wrap">
|
|
<div class="col-md-6 col-lg-6">
|
|
@if (currStep == CompileStep.Tree)
|
|
{
|
|
<CardTree ItemTableList="m_ItemTableList"
|
|
maxCol="m_maxCol"
|
|
RowCollapsedDict="RowCollapsed"
|
|
ChildDict="Child"
|
|
SashGroupList="SashGroupList"
|
|
SplitList="SplitList"
|
|
SplittedList="SplittedList"
|
|
FillList="FillList"
|
|
FrameWindow="FrameWindow"
|
|
EC_NextStep="NextStepArgs"
|
|
EC_Remove="RemoveArea"
|
|
EC_Collapsed="CollapsedRowTree"
|
|
EC_ReqResetDict="ReqResetDict"
|
|
EC_ReqOptionHw="UpdateHwOptionsFrame"
|
|
EC_ReqElement="UpdateElementFrame"
|
|
EC_UpdateFrame="UpdatePreviewFrame"
|
|
EC_UpdateSplitted="UpdatePreviewSplitted">
|
|
</CardTree>
|
|
}
|
|
else if (currStep == CompileStep.Frame)
|
|
{
|
|
@if (m_CurrWindow != null)
|
|
{
|
|
m_PreviousWindow = m_CurrWindow;
|
|
}
|
|
<CascadingValue Value="baseUser" Name="User">
|
|
<CascadingValue Value="FrameWindow" Name="CurrFrameWindow">
|
|
<CascadingValue Value="SashGroupList" Name="SashGroupList">
|
|
<CascadingValue Value="SplitList" Name="SplitList">
|
|
<CardFrame EC_ReqResetDict="ReqResetDict"
|
|
EC_ReqOptionHw="UpdateHwOptionsFrame"
|
|
EC_ReqElement="UpdateElementFrame"
|
|
EC_UpdateFrame="UpdatePreviewFrame"
|
|
EC_ReqClose="ReturnTree">
|
|
</CardFrame>
|
|
</CascadingValue>
|
|
</CascadingValue>
|
|
</CascadingValue>
|
|
</CascadingValue>
|
|
}
|
|
else if (currStep == CompileStep.Split)
|
|
{
|
|
@if (currSplitIndex >= SplitList.Count || currSplitIndex == -1)
|
|
{
|
|
currStep = CompileStep.Tree;
|
|
}
|
|
else
|
|
{
|
|
<CascadingValue Value="baseUser" Name="User">
|
|
<CardSplit CurrSplit="SplitList[currSplitIndex]"
|
|
SashGroupList="SashGroupList"
|
|
SplitList="SplitList"
|
|
FrameWindow="FrameWindow"
|
|
EC_UpdateFrame="UpdatePreviewFrame"
|
|
EC_ReqResetDict="ReqResetDict"
|
|
EC_UpdateSplit="UpdatePreviewSplit"
|
|
EC_ReqElement="UpdateElementSplit"
|
|
EC_ReqClose="ReturnTree">
|
|
</CardSplit>
|
|
</CascadingValue>
|
|
}
|
|
}
|
|
else if (currStep == CompileStep.Sash)
|
|
{
|
|
@if (currSashIndex >= SashGroupList.Count || currSashIndex == -1)
|
|
{
|
|
currStep = CompileStep.Tree;
|
|
}
|
|
else
|
|
{
|
|
<CascadingValue Value="baseUser" Name="User">
|
|
<CascadingValue Value="currLoading" Name="IsLoading">
|
|
<CascadingValue Value="SashGroupList[currSashIndex]" Name="CurrSashGroup">
|
|
<CascadingValue Value="SashGroupList" Name="SashGroupList">
|
|
<CardSashGroup FrameWindow="FrameWindow"
|
|
EC_UpdateFrame="UpdatePreviewFrame"
|
|
EC_UpdateSashGroup="UpdatePreviewSashGroup"
|
|
EC_ReqResetDict="ReqResetDict"
|
|
EC_ReqOptionHw="UpdateHwOptionsSash"
|
|
EC_ReqFirstOptionHw="ReqFirstOptionHw"
|
|
EC_ReqElement="UpdateElementSash"
|
|
EC_ReqClose="ReturnTree">
|
|
</CardSashGroup>
|
|
</CascadingValue>
|
|
</CascadingValue>
|
|
</CascadingValue>
|
|
</CascadingValue>
|
|
}
|
|
}
|
|
else if (currStep == CompileStep.Inglesina)
|
|
{
|
|
@if (currInglesinaIndex >= InglesinaList.Count || currInglesinaIndex == -1)
|
|
{
|
|
currStep = CompileStep.Tree;
|
|
}
|
|
else
|
|
{
|
|
<CascadingValue Value="baseUser" Name="User">
|
|
<CardInglesina CurrInglesina="InglesinaList[currInglesinaIndex]"
|
|
SashGroupList="SashGroupList"
|
|
InglesinaList="InglesinaList"
|
|
FrameWindow="FrameWindow"
|
|
EC_UpdateFrame="UpdatePreviewFrame"
|
|
EC_ReqResetDict="ReqResetDict"
|
|
EC_UpdateInglesina="UpdatePreviewInglesina"
|
|
EC_ReqElement="UpdateElementSplit"
|
|
EC_ReqClose="ReturnTree">
|
|
</CardInglesina>
|
|
</CascadingValue>
|
|
}
|
|
}
|
|
else if (currStep == CompileStep.Fill)
|
|
{
|
|
@if (currFillIndex >= FillList.Count || currFillIndex == -1)
|
|
{
|
|
currStep = CompileStep.Tree;
|
|
}
|
|
else
|
|
{
|
|
<CardFill CurrIndex="currFillIndex"
|
|
CurrFill="FillList[currFillIndex]"
|
|
User="baseUser"
|
|
EC_UpdateFill="UpdatePreviewFill"
|
|
EC_ReqClose="ReturnTree">
|
|
</CardFill>
|
|
<div class="card shadow-sm rounded mb-2">
|
|
<div class="card-body py-2">
|
|
<div class="d-flex justify-content-between align-items-center">
|
|
<div class="col-4 d-flex justify-content-left">
|
|
<h5 class="text-center text-nowrap">All fill</h5>
|
|
</div>
|
|
<div class="input-group mb-2 justify-content-center">
|
|
@if (baseUser)
|
|
{
|
|
<button class="@buttonFillCss(Json.WindowConst.FillTypes.GLASS)">All glass</button>
|
|
}
|
|
else
|
|
{
|
|
<button class="@buttonFillCss(Json.WindowConst.FillTypes.GLASS)" @onclick="() => ChangeAllFill(WebWindowComplex.Json.WindowConst.FillTypes.GLASS)">All glass</button>
|
|
}
|
|
</div>
|
|
<div class="input-group mb-2 justify-content-center">
|
|
@if (baseUser)
|
|
{
|
|
<button class="@buttonFillCss(Json.WindowConst.FillTypes.WOOD)">All wood</button>
|
|
}
|
|
else
|
|
{
|
|
<button class="@buttonFillCss(Json.WindowConst.FillTypes.WOOD)" @onclick="() => ChangeAllFill(WebWindowComplex.Json.WindowConst.FillTypes.WOOD)">All wood</button>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@if (!baseUser && SplittedList != null && SplittedList.Count > 0)
|
|
{
|
|
Splitted? currSplitted = SplittedList.Where(x => x.AreaList.First().Equals(FillList[currFillIndex])).FirstOrDefault();
|
|
@if (currSplitted != null)
|
|
{
|
|
@if (currSplitted.ParentArea != null && currSplitted.ParentWindow != null)
|
|
{
|
|
<AreaSplit SashGroupList="SashGroupList"
|
|
SplittedList="SplittedList"
|
|
CurrSplitted="currSplitted"
|
|
EC_UpdateSplitted="UpdatePreviewSplitted">
|
|
</AreaSplit>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if (currStep == CompileStep.General)
|
|
{
|
|
<General CurrWindow="m_CurrWindow"
|
|
ListPayload="ListPayload"
|
|
ListWarnings="listWarnings"
|
|
DictPendReq="PendReq"
|
|
User="baseUser"
|
|
EC_UpdateGeneral="UpdatePreviewGeneral"
|
|
EC_ReqClose="ReturnTree">
|
|
</General>
|
|
}
|
|
@* else if (currStep == CompileStep.ArcElement)
|
|
{
|
|
<CardArcElement CurrFrame="FrameWindow"
|
|
SashList="m_SashList"
|
|
EC_UpdatePreview="UpdatePreviewFrame"
|
|
EC_ReqClose="ReturnTree">
|
|
</CardArcElement>
|
|
} *@
|
|
</div>
|
|
<div class="col-md-6 col-lg-6">
|
|
@if (string.IsNullOrWhiteSpace(LiveData.SvgPreview))
|
|
{
|
|
<LoadingData DisplayMode="LoadingData.SpinMode.BounceLine" DisplaySize="LoadingData.CtrlSize.Large"></LoadingData>
|
|
}
|
|
else
|
|
{
|
|
@outSvg
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
if (reqBool)
|
|
{
|
|
<div class="d-flex flex-column">
|
|
<div class="alert alert-warning">
|
|
<div class="fs-3">Domande pendenti:</div>
|
|
<div class="d-flex flex-column mt-2 justify-content-start">
|
|
@if (PendReq != null && PendReq.Count > 0)
|
|
{
|
|
foreach (var item in PendReq)
|
|
{
|
|
<div class="d-flex flex-column col-3 gap-2 flex-wrap">
|
|
<div class="input-group justify-content-center">
|
|
<label class="input-group-text">@item.Key</label>
|
|
<input type="text" readonly class="form-control" value="@(item.Value)">
|
|
<button class="btn btn-sm btn-warning" title="Non cambiare" @onclick="() => DoChangePend(item.Key,false)"><i class="fa-solid fa-ban"></i></button>
|
|
<button class="btn btn-sm btn-success" title="Cambia" @onclick="() => DoChangePend(item.Key,true)"><i class="fa-solid fa-check"></i></button>
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|
|
@* <ul class="list-group">
|
|
@if (PendReq != null && PendReq.Count > 0)
|
|
{
|
|
foreach (var item in PendReq)
|
|
{
|
|
<li class="list-group-item">
|
|
<div class="d-flex flex-column gap-2 flex-wrap">
|
|
<div class="input-group mb-2 justify-content-center">
|
|
<label class="input-group-text">@item.Key</label>
|
|
<input type="text" readonly class="form-control" value="@(item.Value)">
|
|
<button class="btn btn-sm btn-warning" title="Non cambiare" @onclick="() => DoChangePend(item.Key,false)"><i class="fa-solid fa-ban"></i></button>
|
|
<button class="btn btn-sm btn-success" title="Cambia" @onclick="() => DoChangePend(item.Key,true)"><i class="fa-solid fa-check"></i></button>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
}
|
|
}
|
|
</ul> *@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
if (listWarnings != null && listWarnings.Count > 0)
|
|
{
|
|
<div class="d-flex flex-column">
|
|
<div class="alert alert-warning">
|
|
<div class="fs-3">Mancata corrispondenza valori:</div>
|
|
<div class="col-12 col-md-6 col-lg-3">
|
|
<ul class="list-group">
|
|
@foreach (var item in listWarnings)
|
|
{
|
|
<li class="list-group-item">@item.Value</li>
|
|
}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|
|
}
|
|
</div> |