246 lines
12 KiB
Plaintext
246 lines
12 KiB
Plaintext
@using static WebWindowComplex.Json.WindowConst
|
|
|
|
<div class="card shadow-sm rounded mb-4">
|
|
<div class="card-header bg-light bg-opacity-25">
|
|
<div class="d-flex justify-content-between align-items-center">
|
|
<div class="px-2">
|
|
<h5>@(descParentSplit())</h5>
|
|
</div>
|
|
<div class="px-2">
|
|
<button class="btn btn-close" @onclick="ReqClose"></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body py-2">
|
|
@*<div class="d-flex justify-content-end align-items-center pb-2">
|
|
<div class="dropdown px-4">
|
|
<button class="btn btn-outline-secondary dropdown-toggle btn-sm" type="button" data-bs-toggle="dropdown">
|
|
Unità misura
|
|
</button>
|
|
<ul class="dropdown-menu" style="min-width:5rem; max-width:10rem">
|
|
<li><button class="@MeasureTypeCss(MeasureTypes.ABSOLUTE)" @onclick="() => SetMeasureType(MeasureTypes.ABSOLUTE)">Absolute</button></li>
|
|
<li><button class="@MeasureTypeCss(MeasureTypes.PROPORTIONAL)" @onclick="() => SetMeasureType(MeasureTypes.PROPORTIONAL)">Proportional</button></li>
|
|
<li><button class="@MeasureTypeCss(MeasureTypes.PERCENTAGE)" @onclick="() => SetMeasureType(MeasureTypes.PERCENTAGE)">Percentage</button></li>
|
|
</ul>
|
|
</div>
|
|
<div class="dropdown">
|
|
<button class="btn btn-outline-secondary dropdown-toggle btn-sm" type="button" data-bs-toggle="dropdown">
|
|
Measure type
|
|
</button>
|
|
<ul class="dropdown-menu" style="min-width:7rem; max-width:10rem">
|
|
<li><button class="dropdown-item fw-bold">Glass</button></li>
|
|
</ul>
|
|
</div>
|
|
</div> *@
|
|
<div class="d-flex justify-content-end align-items-center">
|
|
<div class="col-md-3">
|
|
<select class="form-select" @bind="@MeasureType">
|
|
<option value="@MeasureTypes.ABSOLUTE">Absolute (mm)</option>
|
|
<option value="@MeasureTypes.PROPORTIONAL">Proportional (*)</option>
|
|
<option value="@MeasureTypes.PERCENTAGE">Percentage (%)</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<select class="form-select">
|
|
<option value="1">Glass</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="d-flex justify-content-between align-items-center pt-2">
|
|
<h5>Split</h5>
|
|
@if (!User)
|
|
{
|
|
@if ((CurrSplit.nSplitQtyVert == 1 && CurrSplit.nSplitQtyHoriz == 0) || (CurrSplit.nSplitQtyVert == 0 && CurrSplit.nSplitQtyHoriz == 1))
|
|
{
|
|
<div class="input-group mb-2 justify-content-center">
|
|
<button class="btn btn-outline-secondary btn-sm" @onclick="() => SwapTwoAree()">Swap Aree</button>
|
|
</div>
|
|
}
|
|
<div class="input-group mb-2 justify-content-center">
|
|
<button class="btn btn-outline-secondary btn-sm" @onclick="() => RemoveArea()">Remove split</button>
|
|
</div>
|
|
}
|
|
@* <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#MeasureSettingModal">
|
|
<i class="fa-solid fa-gear"></i>
|
|
</button>
|
|
<div class="modal fade" id="MeasureSettingModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h1 class="modal-title fs-5" id="staticBackdropLabel">Measure settings</h1>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="d-flex justify-content-between align-items-center pb-2">
|
|
<div class="col-md-6 px-2">
|
|
<select class="form-select" @bind="@MeasureType">
|
|
<option value="@MeasureTypes.ABSOLUTE">Absolute (mm)</option>
|
|
<option value="@MeasureTypes.PROPORTIONAL">Proportional (*)</option>
|
|
<option value="@MeasureTypes.PERCENTAGE">Percentage (%)</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-6 px-2">
|
|
<select class="form-select">
|
|
<option value="1">Glass</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> *@
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12 col-lg-6">
|
|
<div class="input-group mb-2">
|
|
@if (User)
|
|
{
|
|
<span class="input-group-text">Shape</span>
|
|
<input type="text" readonly class="form-control" value="@(CurrSplit.SplitShapeList.FirstOrDefault(x => x.Id == SplitShapeIndex))">
|
|
}
|
|
else
|
|
{
|
|
<label class="input-group-text">Shape</label>
|
|
<select class="form-select" @bind="@SplitShapeIndex">
|
|
@foreach (var shapeType in CurrSplit.SplitShapeList)
|
|
{
|
|
<option value=@(shapeType.Id)>@(shapeType.Name)</option>
|
|
}
|
|
</select>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
@if (CurrSplit.nSplitQtyVert > 0)
|
|
{
|
|
<div class="col-md-12 col-lg-6">
|
|
<div class="input-group mb-2">
|
|
<span class="input-group-text">QtyVert</span>
|
|
@if (User)
|
|
{
|
|
<input type="number" readonly class="form-control" value="@SplitQtyVert">
|
|
}
|
|
else
|
|
{
|
|
<input type="number" class="form-control" @bind="@SplitQtyVert">
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
@if (CurrSplit.nSplitQtyHoriz > 0)
|
|
{
|
|
<div class="col-md-12 col-lg-6">
|
|
<div class="input-group mb-2">
|
|
<span class="input-group-text">QtyHoriz</span>
|
|
@if (User)
|
|
{
|
|
<input type="number" readonly class="form-control" value="@SplitQtyHoriz">
|
|
}
|
|
else
|
|
{
|
|
<input type="number" class="form-control" @bind="@SplitQtyHoriz">
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
<div class="row">
|
|
@if (CurrSplit.SplitVertList.Count > 0 && CurrSplit.SplitHorizList.Count > 0)
|
|
{
|
|
<div class="col-md-12 col-lg-6">
|
|
@for (int i = 0; i < CurrSplit.SplitVertList.Count; i++)
|
|
{
|
|
<EditSplitDimensions CurrRec="CurrSplit.SplitVertList[i]"
|
|
Name="Width"
|
|
Index="i"
|
|
EC_Update="UpdateDimension">
|
|
</EditSplitDimensions>
|
|
}
|
|
</div>
|
|
<div class="col-md-12 col-lg-6">
|
|
@for (int i = 0; i < CurrSplit.SplitHorizList.Count; i++)
|
|
{
|
|
<EditSplitDimensions CurrRec="CurrSplit.SplitHorizList[i]"
|
|
Name="Height"
|
|
Index="i"
|
|
EC_Update="UpdateDimension">
|
|
</EditSplitDimensions>
|
|
}
|
|
</div>
|
|
}
|
|
else if (CurrSplit.SplitHorizList.Count > 0)
|
|
{
|
|
@for (int i = 0; i < CurrSplit.SplitHorizList.Count; i++)
|
|
{
|
|
<EditSplitDimensions CurrRec="CurrSplit.SplitHorizList[i]"
|
|
Name="Height"
|
|
Index="i"
|
|
EC_Update="UpdateDimension">
|
|
</EditSplitDimensions>
|
|
}
|
|
}
|
|
else if (CurrSplit.SplitVertList.Count > 0)
|
|
{
|
|
@for (int i = 0; i < CurrSplit.SplitVertList.Count; i++)
|
|
{
|
|
<EditSplitDimensions CurrRec="CurrSplit.SplitVertList[i]"
|
|
Name="Width"
|
|
Index="i"
|
|
EC_Update="UpdateDimension">
|
|
</EditSplitDimensions>
|
|
}
|
|
}
|
|
</div>
|
|
@if (CurrSplit.SelSplitShape == Json.WindowConst.SplitShapes.GRID)
|
|
{
|
|
<div class="row">
|
|
<div class="col-md-12 col-lg-6">
|
|
<div class="d-flex justify-content-start fs-5 mb-2">
|
|
<div class="px-1">
|
|
@if (User)
|
|
{
|
|
<input class="form-check-input ml-auto" disabled="disabled" type="checkbox" name="SplitStartVert" checked="@CurrSplit.bSplitStartVert">
|
|
}
|
|
else
|
|
{
|
|
<input class="form-check-input ml-auto" type="checkbox" name="SplitStartVert" checked="@CurrSplit.bSplitStartVert" @oninput="(ChangeEventArgs e) => ChangeStartVert(e)">
|
|
}
|
|
</div>
|
|
<div class="px-2">
|
|
<label class="form-check-label fs-6 text-dark">StartVert</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
<hr/>
|
|
<div class="row">
|
|
@if(CurrSplit.nSplitQtyVert > 0)
|
|
{
|
|
<div class="col-md-12 col-lg-6">
|
|
<div class="d-flex justify-content-start align-items-center px-2">
|
|
<h6>Element vert</h6>
|
|
</div>
|
|
@foreach (var element in vertList())
|
|
{
|
|
<EditSplitElement CurrRec="element" EC_Update="UpdateElement"></EditSplitElement>
|
|
}
|
|
</div>
|
|
}
|
|
@if(CurrSplit.nSplitQtyHoriz > 0)
|
|
{
|
|
<div class="col-md-12 col-lg-6">
|
|
<div class="d-flex justify-content-start align-items-center px-2">
|
|
<h6>Element horiz</h6>
|
|
</div>
|
|
@foreach (var element in horizList())
|
|
{
|
|
<EditSplitElement CurrRec="element" EC_Update="UpdateElement"></EditSplitElement>
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|