continuop pagina gestione porte

This commit is contained in:
zaccaria.majid
2023-05-03 16:49:43 +02:00
parent 7b018b0f5e
commit 9ff6025061
12 changed files with 138 additions and 111 deletions
@@ -1,6 +1,6 @@
@if (currOrderStatus != null)
{
<div class="d-flex justify-content-between mb-3 bg-info p-3">
<div class="d-flex justify-content-between">
<div>
<div class="badge rounded-pilll bg-dark text-light">Insert Date</div>
<div>@currOrderStatus.DateIns</div>
@@ -1,58 +1,8 @@
@if (DoorsList != null)
{
@*<div class="bg-primary p-5 cardStatus">
<OrderStatusStep CurrOrderStatus="@orderStatus"></OrderStatusStep>
</div>*@
<button @onclick="()=>getBackStatus()">STEP BACK</button>
<button @onclick="()=>proceedStatus()">NEXT STEP</button>
@*<table class="table table-sm table-striped table-responsive-md border border-dark">
<thead>
<tr class="bg-dark text-light">
<th></th>
<th>Door Type</th>
<th>Description</th>
<th>Door external code</th>
<th>Doors Number</th>
<th></th>
<th></th>
<th class="text-end"></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<button class="btn btn-sm btn-warning" @onclick="()=> editRec(door.DoorId)"><i class="fa-solid fa-pen-to-square"></i></button>
</td>
<td>@(door.TypeNav?.Description ?? "-")</td>
<td>@door.DoorDescript</td>
<td>@door.DoorExtCode</td>
<td>@door.Quantity</td>
<td>
@if (door.Quantity > 1)
{
<ButtonAddRemDoor E_isChange="catchDoorChange" OrderId="@door.OrderId" DoorId="@door.DoorId" isAdd="false"></ButtonAddRemDoor>
}
else
{
<button class="btn btn-sm btn-secondary disabled"><i class="fa-solid fa-minus"></i> <i class="fa-solid fa-1"></i></button>
}
</td>
<td>
<ButtonAddRemDoor E_isChange="catchDoorChange" OrderId="@door.OrderId" DoorId="@door.DoorId" isAdd="true"></ButtonAddRemDoor>
</td>
<td class="text-end">
@if (door.OrderNav?.Status < 20)
{
<button class="btn btn-sm btn-danger" @onclick="() => deleteRecord(door)"><i class="fa-solid fa-trash-can"></i></button>
}
</td>
</tr>
}
</tbody>
</table>*@
<div class="row">
@if (DoorsList == null || DoorsList.Count == 0)
{ }
@@ -64,8 +14,8 @@
{
imgPath = $"images/LogoEgw{idxCount % 5:00}.png";
idxCount++;
<div class="col-3 py-1">
<DoorSvgObj LineColor="#0083AF" LineWidth="8" ObjH="200" ObjW="450" ImagePath="@imgPath" ObjId="idxCount" Text01="@($"Doors N°: {door.Quantity}")" Text02="@($"Model N°: {door.TypeNav?.TypeId}")" Text03="@($"DoorPrice: {(door.Quantity * door.UnitCost):C2}")"></DoorSvgObj>
<div class="col-3 py-1" @onclick="()=>editRec(door.DoorId)" style="cursor: pointer">
<DoorSvgObj LineColor="#2D3047" LineWidth="8" ObjH="200" ObjW="650" ImagePath="@imgPath" ObjId="idxCount" Text01="@($"Doors N°: {door.Quantity}")" Text02="@($"Model N°: {door.TypeNav?.TypeId}")" Text03="@($"DoorPrice: {(door.Quantity * door.UnitCost):C2}")"></DoorSvgObj>
</div>
}
}
@@ -33,7 +33,7 @@ namespace WebDoorCreator.UI.Components.DoorMan
public int LineWidth { get; set; } = 8;
[Parameter]
public string TextStyle { get; set; } = "font-size: 1.5em; font-weight:bold; fill: white;";
public string TextStyle { get; set; } = "font-size: 1.5em; font-weight:bold; fill: #000;";
private void setupGraphParams()
@@ -1,54 +1,47 @@
@* <div class="col-4 p-0 fs-3 d-flex justify-content-between" @onclick="()=>doChangeStep(Core.Enum.DoorDefStep.Door)">
@if (DoorDefStep == Core.Enum.DoorDefStep.Door)
{
<div class="tail-left"></div>
<div class="@doorCSS flex-fill text-center">Door</div>
<div class="arrow-right"></div>
}
else
{
<div class="@doorCSS flex-fill text-center">Door</div>
}
</div>
<div class="col-4 p-0 fs-3 d-flex justify-content-between" @onclick="()=>doChangeStep(Core.Enum.DoorDefStep.Hardware)">
@if (DoorDefStep == Core.Enum.DoorDefStep.Hardware)
{
<div class="tail-left"></div>
<div class="@hwCSS flex-fill text-center">Hardware</div>
<div class="arrow-right"></div>
}
else
{
<div class="@hwCSS flex-fill text-center">Hardware</div>
}
</div>
*@
@using Components.SvgComp
<div class="containerAll row bg-secondary text-light">
<div class="containerAll row text-light" style="background-color: #34495E;">
@if (currListOrderStatus != null)
{
@foreach (var item in currListOrderStatus)
{
<div class=" p-0 fs-5 d-flex justify-content-between flex-wrap align-content-center" style="width: calc((100%)/7)" @onclick="()=>doChangeStep(item.Value)">
@*<div class=" p-0 fs-5 d-flex justify-content-between flex-wrap align-content-center" style="width: calc((100%)/7)" @onclick="()=>doChangeStep(item.Value)">
@if (int.Parse(item.Value) == CurrOrderStatus)
{
<div class="tail-left" style="--itemColor: @item.DefaultVal"></div>
<div class="button2Click flex-fill text-center d-flex flex-wrap align-content-center" style="--itemColor: @item.DefaultVal">@item.Label</div>
<div class="arrow-right" style="--itemColor: @item.DefaultVal"></div>
}
else
{
@if (int.Parse(item.Value) < CurrOrderStatus)
{
<div class="flex-fill text-center" style="--itemColor: #6c757d">@item.Label <i class="fa-solid fa-check"></i></div>
}
else
{
<div class="flex-fill text-center" style="--itemColor: #6c757d">@item.Label</div>
}
}
</div>*@
<div class="col px-0">
@if (int.Parse(item.Value) == CurrOrderStatus)
{
<div class="tail-left" style="--itemColor: @item.DefaultVal"></div>
<div class="button2Click flex-fill text-center d-flex flex-wrap align-content-center" style="--itemColor: @item.DefaultVal">@item.Label</div>
<div class="arrow-right" style="--itemColor: @item.DefaultVal"></div>
<WebDoorCreator.UI.Components.SvgComp.StepArrow ObjId="@int.Parse(item.Value)" StepText="@item.Label" BlockStyle="@($"fill:{item.DefaultVal};")" ObjW="650" ObjH="100"></WebDoorCreator.UI.Components.SvgComp.StepArrow>
}
else
{
@if (int.Parse(item.Value) < CurrOrderStatus)
{
<div class="flex-fill text-center" style="--itemColor: #6c757d">@item.Label <i class="fa-solid fa-check"></i></div>
<WebDoorCreator.UI.Components.SvgComp.StepArrow ObjId="@int.Parse(item.Value)" StepText="@($"{item.Label} ✓")" BlockStyle="@($"fill:{item.DefaultVal};")" ObjW="650" ObjH="100"></WebDoorCreator.UI.Components.SvgComp.StepArrow>
}
else
{
<div class="flex-fill text-center" style="--itemColor: #6c757d">@item.Label</div>
<WebDoorCreator.UI.Components.SvgComp.StepArrow ObjId="@int.Parse(item.Value)" StepText="@item.Label" BlockStyle="@($"fill:transparent;")" ObjW="650" ObjH="100"></WebDoorCreator.UI.Components.SvgComp.StepArrow>
}
}
</div>
}
}
</div>
@@ -25,13 +25,22 @@ namespace WebDoorCreator.UI.Components.SvgComp
[Parameter]
public string BlockStyle { get; set; } = "fill:rgb(0,0,255);stroke-width:0;stroke:rgb(0,0,0);";
[Parameter]
public string BlockStyleBorderUp { get; set; } = "stroke-width:5px;stroke:rgb(255,255,255);stroke-dasharray: 650,600;";
#endregion Public Properties
#region Protected Properties
protected int deltaH
{
get => ObjH / 100;
}
protected int rectH
{
get => ObjH / 2;
get => (ObjH / 2);
//* (96 / 100);
}
protected int rectW
+39 -14
View File
@@ -1,22 +1,47 @@
@page "/OrderDetails"
<div class="px-4 d-flex justify-content-between">
<div>
<div style="padding-left: 2.1rem !important; padding-right: 2.1rem !important;">
@if (orderView != null)
{
<div class="testataOrder px-4" style="--bgStepColor: @stepColor">
<div>
<div class="badge rounded-pilll bg-dark text-light">Insert Date</div>
<div>@orderView.DateIns</div>
</div>
<div>
<div class="badge rounded-pilll bg-dark text-light">Order External Code</div>
<div>@orderView.OrderExtCode</div>
</div>
<div>
<div class="badge rounded-pilll bg-dark text-light">Models Number</div>
<div class="text-center">@orderView.NumType</div>
</div>
<div>
<div class="badge rounded-pilll bg-dark text-light">Doors Number</div>
<div class="text-center">@orderView.NumDoors</div>
</div>
@*<div>
<span class="fs-5">LIST DOORS IN ORDER <b>@idOrd</b></span>
</div>
<div>
<div class="input-group">
<select @bind="@currMeaUnit" class="form-select">
<option value="mm">mm</option>
<option value="inch">inch</option>
</select>
<button class="btn btn-sm btn-success" @onclick="() => createDoor()">+ Add new door</button>
</div>
<div>
<div class="input-group">
<select @bind="@currMeaUnit" class="form-select">
<option value="mm">mm</option>
<option value="inch">inch</option>
</select>
<button class="btn btn-sm btn-success" @onclick="() => createDoor()">+ Add new door</button>
</div>
</div>*@
</div>
}
<div class="cardStatus" style="--bgStepColor: #34495E">
<OrderStatusStep E_CurrStepColor="@setStepColor" CurrOrderStatus="@orderStat"></OrderStatusStep>
</div>
</div>
<div class="p-5 cardStatus" style="--bgStepColor: @stepColor">
<OrderStatusStep E_CurrStepColor="@setStepColor" CurrOrderStatus="@orderStat"></OrderStatusStep>
</div>
<div class="bg-warning p-3 cardDoors">
<div class="p-5 cardDoors">
<DoorList currOrderId="@idOrd"></DoorList>
</div>
@@ -25,6 +25,7 @@ namespace WebDoorCreator.UI.Pages
protected DoorModel? currDoor { get; set; } = null;
protected int currDoorType { get; set; } = 0;
protected OrderStatusViewModel? orderView { get; set; } = null;
/// <summary>
/// Unità di misura selezionata
@@ -290,15 +291,28 @@ namespace WebDoorCreator.UI.Pages
NavManager.NavigateTo($"/DoorDefinition?idOrd={idOrd}&idDoor={doorId}");
}
protected int userCurrCompany
{
get => WDCUService.userCurrComp;
}
protected override async Task OnInitializedAsync()
{
await Task.Delay(1);
var domani = DateTime.Today.AddDays(1);
var uri = NavManager.ToAbsoluteUri(NavManager.Uri);
if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("idOrd", out var _idOrd) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("orderStat", out var _orderStat))
{
idOrd = int.Parse(_idOrd);
orderStat = int.Parse(_orderStat);
}
var orders = await WDService.OrderStatusGetFilt(userCurrCompany, 0, domani.AddYears(-2), domani);
if(orders != null)
{
orderView = orders.Where(x => x.OrderId == idOrd).FirstOrDefault();
}
}
protected string stepColor { get; set; } = "";
+19 -2
View File
@@ -1,9 +1,26 @@
.cardStatus {
border-radius: 60px 60px 0 0;
border-radius: 60px /*60px 0 0*/;
background-color: var(--bgStepColor);
transform: translate(0, -65px);
padding: 1.5rem 3rem 5rem 3rem;
}
.cardDoors {
width: 100%;
transform: translate(0, -53px);
border-radius: 60px 60px 0 0;
transform: translate(0, -120px);
background-color: #FFF;
padding: 0;
box-shadow: rgba(0, 0, 0, 0.45) 0px -24px 27px -20px;
}
.testataOrder {
border: 3px solid var(--bgStepColor);
padding: 1rem 1rem 4.5rem 1rem;
border-radius: 60px 60px 20px 20px;
transform: translate(63px, 0);
width: 93%;
z-index: -99999;
position: relative;
display: flex;
justify-content: space-around;
font-size: 17px;
}
@@ -1,10 +1,29 @@
.cardStatus {
border-radius: 60px 60px 0 0;
border-radius: 60px /*60px 0 0*/;
background-color: var(--bgStepColor);
transform: translate(0, -65px);
padding: 1.5rem 3rem 5rem 3rem;
}
.cardDoors {
width: 100%;
transform: translate(0, -53px);
//transform: translate(0, -53px);
border-radius: 60px 60px 0 0;
transform: translate(0, -120px);
background-color: #FFF;
padding: 0;
box-shadow: rgba(0, 0, 0, 0.45) 0px -24px 27px -20px;
}
.testataOrder {
border: 3px solid var(--bgStepColor);
padding: 1rem 1rem 4.5rem 1rem;
border-radius: 60px 60px 20px 20px;
transform: translate(63px, 0);
width: 93%;
z-index: -99999;
position: relative;
display: flex;
justify-content: space-around;
font-size: 17px;
}
+1 -1
View File
@@ -1 +1 @@
.cardStatus{border-radius:60px 60px 0 0;background-color:var(--bgStepColor);}.cardDoors{width:100%;transform:translate(0,-53px);border-radius:60px 60px 0 0;}
.cardStatus{border-radius:60px;background-color:var(--bgStepColor);transform:translate(0,-65px);padding:1.5rem 3rem 5rem 3rem;}.cardDoors{width:100%;border-radius:60px 60px 0 0;transform:translate(0,-120px);background-color:#fff;padding:0;box-shadow:rgba(0,0,0,.45) 0 -24px 27px -20px;}.testataOrder{border:3px solid var(--bgStepColor);padding:1rem 1rem 4.5rem 1rem;border-radius:60px 60px 20px 20px;transform:translate(63px,0);width:93%;z-index:-99999;position:relative;display:flex;justify-content:space-around;font-size:17px;}
+2 -2
View File
@@ -22,9 +22,9 @@
@*<div class="fixed-bottom bottom-row px-2">
<CmpFooter></CmpFooter>
</div>*@
<div class="bottom-row px-4 auth">
@*<div class="bottom-row px-4 auth">
<LoginDisplay />
</div>
</div>*@
</main>
</div>
@*<footer class="bottom-row footer border-top pl-3 text-muted">
@@ -76,7 +76,7 @@ main {
}
.top-row, article {
/*padding-left: 0.1rem !important;
padding-right: 0.1rem !important;*/
/*padding-left: 2.1rem !important;
padding-right: 2.1rem !important;*/
}
}