152 lines
7.3 KiB
Plaintext
152 lines
7.3 KiB
Plaintext
@page "/DayList"
|
|
@attribute [Authorize]
|
|
@using GPW.CORE.WRKLOG.old.Components
|
|
|
|
@if (selPeriod)
|
|
{
|
|
<dialog class="modal fade show" tabindex="-1" style="display:block; background-color: rgba(10,10,10,.6);" aria-modal="true" role="dialog">
|
|
<div class="modal-dialog modal-xl">
|
|
<div class="modal-content">
|
|
<WeekSelector CloseReq="ResetSelPeriodo" WeekSelected="ReloadPeriodo"></WeekSelector>
|
|
</div>
|
|
</div>
|
|
</dialog>
|
|
}
|
|
<div class="card">
|
|
<div class="card-header table-primary py-1">
|
|
<div class="row">
|
|
<div class="col-12 col-lg-2 text-center">
|
|
|
|
<div class="btn-group w-100 mb-1">
|
|
<button class="btn btn-sm btn-dark pt-1 pb-0 @actionCss" @onclick="() => ResetWeek()" title="Ritorna a data corrente" disabled="@isLoading">
|
|
<h3><i class="fas fa-home"></i> Week Plan</h3>
|
|
</button>
|
|
</div>
|
|
<div class="btn-group w-100">
|
|
<button class="btn btn-sm btn-outline-primary py-0 @actionCss" @onclick="() => MoveWeek(-4)" title="-4 settimane" disabled="@isLoading">
|
|
<div><sub>@currWeekSel.inizio.ToString("dd.MM.yy")</sub></div>
|
|
<i class="fas fa-angle-double-left"></i>
|
|
</button>
|
|
<button class="btn btn-sm btn-primary py-0 @actionCss" @onclick="() => ShowSelPeriodo()" title="Imposta periodo" disabled="@isLoading">
|
|
<div>Week <b>@currWeekNum.ToString("00")</b></div>
|
|
<sub>@currYear</sub>
|
|
</button>
|
|
<button class="btn btn-sm btn-outline-primary py-0 @actionCss" @onclick="() => MoveWeek(4)" title="+4 settimane" disabled="@isLoading">
|
|
<div><sub>@currWeekSel.fine.ToString("dd.MM.yy")</sub></div>
|
|
<i class="fas fa-angle-double-right"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="col-12 col-lg-10">
|
|
@if (weekStatList != null)
|
|
{
|
|
<div class="row">
|
|
@foreach (var item in weekStatList)
|
|
{
|
|
<div class="col px-1">
|
|
<WeekStat currData="@item" WeekSel="@currWeekNum" weekSelected="setWeekNumber"></WeekStat>
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<LoadingData DisplaySize="LoadingData.CtrlSize.Small"></LoadingData>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
@if (ListRecords == null)
|
|
{
|
|
<LoadingData></LoadingData>
|
|
}
|
|
else
|
|
{
|
|
<div class="row">
|
|
<div class="col-5">
|
|
<table class="table table-sm table-striped table-responsive-md border border-dark">
|
|
<thead>
|
|
<tr class="bg-dark text-light">
|
|
<th>Day</th>
|
|
<th class="text-center"><b>Timb</b> <i class="far fa-calendar-alt"></i></th>
|
|
<th class="text-center">T/C</th>
|
|
<th class="text-center"><b>Lavo</b> <i class="far fa-hourglass"></i></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in ListRecords.OrderByDescending(x => x.DtRif))
|
|
{
|
|
if (item.ListRA != null && item.ListTimbr != null && (item.ListRA.Count() + item.ListTimbr.Count() > 0))
|
|
{
|
|
<tr class="@cssRiga(item.DtRif)">
|
|
<td>@item.DtRif.ToString("dd MMM yyyy"), <b>@item.DtRif.ToString("dddd")</b>
|
|
</td>
|
|
<td class="text-center">
|
|
<div class="btn btn-sm w-100 btn-dark px-1 py-0" @onclick="() => PeriodoSelect(item.ListTimbr)"><b>@ConvOre(oreLav(item))</b> <i class="far fa-calendar-alt"></i></div>
|
|
</td>
|
|
<td class="text-center">
|
|
<div class="btn btn-sm w-100 btn-light border border-dark px-1 py-0 mt-1" @onclick="() => ShowTempRil(item.DtRif)"><i class="fas fa-thermometer-half @cssThermo(item)"></i> <i class="fas fa-certificate @cssCheck(item)"></i></div>
|
|
</td>
|
|
<td class="text-center">
|
|
<div class="btn btn-sm w-100 @cssBadgeLav(item.OreLav, item.OreComm) px-1 py-0 mt-1" @onclick="() => ShowDayAgenda(item)"><b>@ConvOre(item.OreLav)</b> <i class="far fa-hourglass"></i></div>
|
|
</td>
|
|
</tr>
|
|
}
|
|
}
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
<div class="col-7 pl-0">
|
|
@if (showTimb)
|
|
{
|
|
<TimbrEditor ListTimb="@ListTimbr" CloseReq="ResetTimbData" ItemUpdated="UpdTimbData" IsPortrait="false"></TimbrEditor>
|
|
}
|
|
@if (showDay)
|
|
{
|
|
<DayAgendaDetail DayDTO="@SelDayDTO" CloseReq="ResetDayAgenda" ItemSelected="ReportSelect" ItemCloned="ReportSelect" ItemDeleted="() => ReportDeleted()" MaxChar="60"></DayAgendaDetail>
|
|
}
|
|
@if (showTemp)
|
|
{
|
|
<DayCheckEditor TargetDate="@DtSelected" CloseReq="ResetDayCheck" IsPortrait="true"></DayCheckEditor>
|
|
}
|
|
@if (currRecord != null)
|
|
{
|
|
<RegAttEditor currRecord="@currRecord" ItemReset="UpdRegAttData" ItemUpdated="UpdRegAttData"></RegAttEditor>
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
<div class="card-footer py-1">
|
|
<div class="d-flex justify-content-between">
|
|
<div class="py-1 px-2">
|
|
<span>@lastRefresh.ToString("HH:mm:ss")</span> <i class="far fa-clock"></i>
|
|
</div>
|
|
<div class="py-1 px-2">
|
|
@if (clonedRA != null)
|
|
{
|
|
<div class="d-flex">
|
|
<div class="px-2 flex-grow-1">
|
|
<RegAtt CurrData="@clonedRA" Periodo="@periodoClonato" ListFasi="@ListFasi" ItemSelected="ReportSelect" IdxDipSel="@IdxDipendente" IsClipboard="true"></RegAtt>
|
|
</div>
|
|
<div class="px-2">
|
|
<button class="btn w-100 btn-warning" @onclick="ResetClone" title="Reset Clipboard">
|
|
<i class="fas fa-clipboard"></i><br>
|
|
<i class="far fa-times-circle"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="my-4"> </div>
|
|
|
|
|
|
|