Files
gwms/GWMS.UI/Pages/WeekPlan.razor
2021-08-24 10:13:06 +02:00

76 lines
3.5 KiB
Plaintext

@page "/WeekPlan"
@using GWMS.UI.Components
<div class="card">
<div class="card-header table-primary">
<div class="row">
<div class="col-6 col-lg-8 col-xl-9">
<h3>Week Plan</h3>
</div>
<div class="col-6 col-lg-4 col-xl-3">
<button class="btn btn-block btn-success" @onclick="CreateNew">Aggiunta Consegna <i class="far fa-calendar-plus"></i></button>
</div>
</div>
</div>
<div class="card-body">
@if (currRecord != null)
{
<WeekPlanEditor currItem="@currRecord" DataReset="ResetData" DataUpdated="UpdateData"></WeekPlanEditor>
}
@if (ListRecords == null)
{
<LoadingData></LoadingData>
}
else
{
<div class="row">
<div class="col-12 text-center">
Legenda
</div>
<div class="col-12 text-center">
<table class="table table-sm table-striped table-responsive-sm">
<thead>
<tr>
<th></th>
<th>LUN</th>
<th>MAR</th>
<th>MER</th>
<th>GIO</th>
<th>VEN</th>
<th>SAB</th>
<th>DOM</th>
</tr>
</thead>
<tbody>
@for (int i = startHour; i <= endHour; i++)
{
<tr class="small">
<td style="width: 3.4%;">@i</td>
<td style="width: 13.8%;"><ItemPlanDetail selRecordChanged="EditRecord" currList="@SlotList(DayOfWeek.Monday, i)"></ItemPlanDetail></td>
<td style="width: 13.8%;"><ItemPlanDetail selRecordChanged="EditRecord" currList="@SlotList(@DayOfWeek.Tuesday, i)"></ItemPlanDetail></td>
<td style="width: 13.8%;"><ItemPlanDetail selRecordChanged="EditRecord" currList="@SlotList(@DayOfWeek.Wednesday, i)"></ItemPlanDetail></td>
<td style="width: 13.8%;"><ItemPlanDetail selRecordChanged="EditRecord" currList="@SlotList(@DayOfWeek.Thursday, i)"></ItemPlanDetail></td>
<td style="width: 13.8%;"><ItemPlanDetail selRecordChanged="EditRecord" currList="@SlotList(@DayOfWeek.Friday, i)"></ItemPlanDetail></td>
<td style="width: 13.8%;"><ItemPlanDetail selRecordChanged="EditRecord" currList="@SlotList(@DayOfWeek.Saturday, i)"></ItemPlanDetail></td>
<td style="width: 13.8%;"><ItemPlanDetail selRecordChanged="EditRecord" currList="@SlotList(@DayOfWeek.Sunday, i)"></ItemPlanDetail></td>
</tr>
}
</tbody>
</table>
</div>
</div>
}
</div>
<div class="card-footer">
<div class="row">
<div class="col-3">
Selezione range orario:&nbsp;
<input @bind="startHour" style="width: 2em;" />
<i class="fas fa-angle-double-right"></i>
<input @bind="endHour" style="width: 2em;" />
</div>
</div>
</div>
</div>