96 lines
3.4 KiB
Plaintext
96 lines
3.4 KiB
Plaintext
@page "/commessa/{CodJcom}"
|
|
@page "/commessa/{CodJcom}/{RagSoc}"
|
|
@attribute [Authorize]
|
|
@using salesbook.Shared.Components.Layout
|
|
@using salesbook.Shared.Components.Layout.Spinner
|
|
@using salesbook.Shared.Components.SingleElements
|
|
@using salesbook.Shared.Core.Dto.JobProgress
|
|
@using salesbook.Shared.Core.Dto.PageState
|
|
@using salesbook.Shared.Core.Entity
|
|
@using salesbook.Shared.Core.Interface
|
|
@inject JobSteps JobSteps
|
|
@inject IManageDataService ManageData
|
|
|
|
<HeaderLayout Title="@CodJcom" ShowProfile="false" Back="true" BackTo="Indietro"/>
|
|
|
|
@if (IsLoading)
|
|
{
|
|
<SpinnerLayout FullScreen="true"/>
|
|
}
|
|
else
|
|
{
|
|
<div class="container content">
|
|
@if (CommessaModel == null)
|
|
{
|
|
<NoDataAvailable Text="Nessuna commessa trovata"/>
|
|
}
|
|
else
|
|
{
|
|
<input type="radio" class="tab-toggle" name="tab-toggle" id="tab1" checked>
|
|
<input type="radio" class="tab-toggle" name="tab-toggle" id="tab2">
|
|
<input type="radio" class="tab-toggle" name="tab-toggle" id="tab3">
|
|
|
|
<div class="box">
|
|
<ul class="tab-list">
|
|
<li class="tab-item"><label class="tab-trigger" for="tab1">Avanzamento</label></li>
|
|
<li class="tab-item"><label class="tab-trigger" for="tab2">Attività</label></li>
|
|
<li class="tab-item"><label class="tab-trigger" for="tab3">Allegati</label></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<!-- contenuti -->
|
|
<div class="tab-container">
|
|
<div class="tab-content">
|
|
@if (Steps != null)
|
|
{
|
|
<div class="timeline-container">
|
|
<div class="timeline">
|
|
@foreach (var step in Steps)
|
|
{
|
|
<div class="step">
|
|
<div class="@(step.Status!.Skip ? "circle skipped" : step.Status!.Progress ? "in-progress" : "circle completed")"></div>
|
|
<div class="label">
|
|
<div class="titleStep">@step.StepName</div>
|
|
@if (step.Date is not null)
|
|
{
|
|
<div class="subtitleStep">@($"{step.Date.Value:D}") @(step.Status!.Progress ? "(In corso...)" : "")</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
<div class="tab-content">Contenuto 2</div>
|
|
<div class="tab-content">Contenuto 3</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
|
|
@code {
|
|
[Parameter] public string CodJcom { get; set; } = "";
|
|
[Parameter] public string RagSoc { get; set; } = "";
|
|
|
|
private List<CRMJobStepDTO>? Steps { get; set; }
|
|
private JtbComt? CommessaModel { get; set; }
|
|
|
|
private bool IsLoading { get; set; } = true;
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
await LoadData();
|
|
}
|
|
|
|
private async Task LoadData()
|
|
{
|
|
CommessaModel = (await ManageData.GetTable<JtbComt>(x => x.CodJcom.Equals(CodJcom))).LastOrDefault();
|
|
Steps = JobSteps.Steps;
|
|
|
|
IsLoading = false;
|
|
}
|
|
|
|
}
|
|
|