nuova grafica chiamate

This commit is contained in:
Marco Audiffredi 2025-05-19 17:35:12 +02:00
parent 0da7a2e98f
commit b723d97155
3 changed files with 224 additions and 232 deletions

View File

@ -241,6 +241,7 @@ namespace VirtualTask.Models
/// <summary>RAPP_NEW: seriale chiamata chiusa</summary>
public string? ser_rapp_chiu { get; set; }
public string? csdescr { get; set; }
}
}

View File

@ -47,128 +47,123 @@
display: inline-block;
}
</style>
<div class="agy-project-wrapper agy-project-page-wrapper">
<div class="container">
<div class="row">
<div class="row">
<div class="col-md-4">
<div class="col-md-10">
<b>@Html.DisplayNameFor(model => model.chcodazi)</b> @Html.DisplayFor(model => model.chcodazi)
</div>
<div class="col-md-10">
<b>@Html.DisplayNameFor(model => model.chserial)</b> @Html.DisplayFor(model => model.chserial)
</div>
<div class="col-md-10">
<b>@Html.DisplayNameFor(model => model.chcodese)</b> @Html.DisplayFor(model => model.chcodese)
</div>
<div class="col-md-10">
<b>@Html.DisplayNameFor(model => model.chtipo)</b> @Html.DisplayFor(model => model.chtipo)
</div>
<div class="col-md-10">
<b>@Html.DisplayNameFor(model => model.chnumero)</b> @numChia
</div>
<div class="col-md-10">
<b>@Html.DisplayNameFor(model => model.chdata)</b> @Html.DisplayFor(model => model.chdata)
</div>
<div class="col-md-12">
<b>@Html.DisplayNameFor(model => model.chdtapp)</b> @Html.DisplayFor(model => model.chdtapp)
</div>
<div class="col-md-10">
<b>@Html.DisplayNameFor(model => model.chcodimp)</b> @Html.DisplayFor(model => model.chcodimp)
</div>
<div class="col-md-10">
<b>@Html.DisplayNameFor(model => model.chtchiam)</b> @Html.DisplayFor(model => model.chtchiam)
</div>
<div class="col-md-10">
<b>@Html.DisplayNameFor(model => model.chstato)</b> @Html.DisplayFor(model => model.chstato)
</div>
@* <div class="col-md-10" style="background-color:aqua;">
<div style="float:left;"><b>@Html.DisplayNameFor(model => model.chstato)</b></div>
<div style="float:left;">&nbsp;</div>
@{
//Unico caso in cui vado a vedere lo stato è il caso S=sospesa (grigio)
if (!string.IsNullOrEmpty(Model.chstato) && Model.chstato.Equals("S"))
<div class="table-responsive">
<table class="table table-bordered table-striped table-hover align-middle">
<thead class="table-primary">
<tr>
<th scope="col">&nbsp;</th>
<th scope="col">&nbsp;</th>
</tr>
</thead>
<tbody>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-secondary">@Html.DisplayNameFor(model => model.chstato)</span></td>
@{
//Unico caso in cui vado a vedere lo stato è il caso S=sospesa (grigio)
if (!string.IsNullOrEmpty(Model.chstato) && Model.chstato.Equals("S"))
{
<td><span class="dotOrange"></span> SOSPESA</td>
}
else
{
//Caso rifiutato (nero): devo andare a valutare se il valore di rif è valorizzato e vale S
if (!string.IsNullOrEmpty(Model.rif) && Model.rif.Equals("S"))
{
<span class="dotGray"></span>
<span class="">@Html.DisplayFor(model => model.chstato) - SOSPESA</span>
//rifiutato
<td><span class="dotBlack"></span> RIFIUTATA</td>
}
else
{
//Caso rifiutato (nero): devo andare a valutare se il valore di rif è valorizzato e vale S
if (!string.IsNullOrEmpty(Model.rif) && Model.rif.Equals("S"))
//caso chiuso: devo andare a valutare che ser_buono_chiu sia valorizzato
if (!string.IsNullOrEmpty(Model.ser_buono_chiu))
{
//rifiutato
<span class="dotBlack"></span>
<span class="">@Html.DisplayFor(model => model.chstato) - RIFIUTATA</span>
//seriale buono presente: chiusa-verde
<td><span class="dotGreen"></span> CHIUSA</td>
}
else
{
//caso chiuso: devo andare a valutare che ser_buono_chiu sia valorizzato
if (!string.IsNullOrEmpty(Model.ser_buono_chiu))
//assegnata(arancio)/non assegnata(giallo) : devo vedere se il tecnico è valorizzato o no
if (!string.IsNullOrEmpty(Model.chtchiam))
{
//seriale buono presente: chiusa-verde
<span class="dotGreen"></span> <span class="">@Html.DisplayFor(model => model.chstato) - CHIUSA</span>
<td><span class="dotOrange"></span> ASSEGNATA</td>
}
else
{
//assegnata(arancio)/non assegnata(giallo) : devo vedere se il tecnico è valorizzato o no
if (!string.IsNullOrEmpty(Model.chtchiam))
{
<div style="float:left;">
<span class="dotOrange"></span>
</div>
<div style="float:left;">
<span class="">@Html.DisplayFor(model => model.chstato) - ASSEGNATA</span>
</div>
}
else
{
<span class="dotYellow"></span>
<span class="">@Html.DisplayFor(model => model.chstato) - NON ASSEGNATA</span>
}
<td><span class="dotYellow"></span> NON ASSEGNATA</td>
}
}
}
}
}
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-secondary">@Html.DisplayNameFor(model => model.chnumero)</span></td>
<td>@numChia</td>
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-secondary">@Html.DisplayNameFor(model => model.chdtapp)</span></td>
<td>@Html.DisplayFor(model => model.chdtapp)</td>
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-secondary">@Html.DisplayNameFor(model => model.chcodimp)</span></td>
<td>@Html.DisplayFor(model => model.chcodimp) - @Html.DisplayFor(model => model.indirizzo)</td>
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-secondary">@Html.DisplayNameFor(model => model.andescri)</span></td>
<td>@Html.DisplayFor(model => model.andescri)</td>
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-secondary">@Html.DisplayNameFor(model => model.chtchiam)</span></td>
<td>@Html.DisplayFor(model => model.chtchiam) - @Html.DisplayFor(model => model.tcdescri)</td>
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-secondary">@Html.DisplayNameFor(model => model.chtelef)</span></td>
<td>@Html.DisplayFor(model => model.chtelef)</td>
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-secondary">@Html.DisplayNameFor(model => model.chcodseg)</span></td>
<td>@Html.DisplayFor(model => model.chcodseg) - @Html.DisplayFor(model => model.csdescr)</td>
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-secondary">@Html.DisplayNameFor(model => model.chrifer)</span></td>
<td>@Html.DisplayFor(model => model.chrifer)</td>
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-secondary">@Html.DisplayNameFor(model => model.chnote)</span></td>
<td>@Html.DisplayFor(model => model.chnote)</td>
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-success">@Html.DisplayNameFor(model => model.chdata)</span></td>
<td>@Html.DisplayFor(model => model.chdata)</td>
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-success">@Html.DisplayNameFor(model => model.chcodazi)</span></td>
<td>@Html.DisplayFor(model => model.chcodazi)</td>
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-success">@Html.DisplayNameFor(model => model.chserial)</span></td>
<td>@Html.DisplayFor(model => model.chserial)</td>
</tr>
</div>*@
<div class="col-md-10">
<b>@Html.DisplayNameFor(model => model.chrifer)</b> @Html.DisplayFor(model => model.chrifer)
</div>
<div class="col-md-10">
<b>@Html.DisplayNameFor(model => model.chtelef)</b> @Html.DisplayFor(model => model.chtelef)
</div>
<div class="col-md-10">
<b>@Html.DisplayNameFor(model => model.chcodseg)</b> @Html.DisplayFor(model => model.chcodseg)
</div>
<div class="col-md-10">
<b>@Html.DisplayNameFor(model => model.chnote)</b> @Html.DisplayFor(model => model.chnote)
</div>
<div class="col-md-10">
<b>@Html.DisplayNameFor(model => model.indirizzo)</b> @Html.DisplayFor(model => model.indirizzo)
</div>
<div>
<a asp-action="Index" value="Torna alla lista" class="agy-btn submitForm">Torna alla lista</a>
</div>
</div>
</div>
</tbody>
</table>
</div>
<div>
<a asp-action="Index" value="Torna alla lista" class="agy-btn submitForm">Torna alla lista</a>
</div>
</div>
</div>
@* <h1>Dettaglio chiamata</h1>
<div>

View File

@ -10,146 +10,142 @@
<div class="agy-project-wrapper agy-project-page-wrapper">
<div class="container">
<div class="row">
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
@Html.HiddenFor(x => x.chcodazi)
<div class="form-group">
<h5><label asp-for="chserial" class="agy-client-quote"></label></h5>
@Html.HiddenFor(x => x.chserial)
@Html.DisplayFor(model => model.chserial)
<span asp-validation-for="chserial" class="text-danger"></span>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<div class="form-group">
<h5><label asp-for="chcodese" class="agy-client-quote"></label></h5>
@Html.HiddenFor(x => x.chcodese)
@Html.DisplayFor(model => model.chcodese)
<span asp-validation-for="chcodese" class="text-danger"></span>
</div>
@Html.HiddenFor(x => x.chtipo)
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<div class="form-group">
<h5><label asp-for="chnumero" class="agy-client-quote"></label></h5>
<input asp-for="chnumero" class="agy-form-field require" placeholder="Numero chiamata" value="@numChia" />
<span asp-validation-for="chnumero" class="text-danger"></span>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<div class="form-group">
<h5><label asp-for="chdtapp" class="agy-client-quote"></label></h5>
<input asp-for="chdtapp" class="agy-form-field require" placeholder="Data" />
<span asp-validation-for="chdtapp" class="text-danger"></span>
@* <h5><label asp-for="chdata" class="agy-client-quote"></label></h5>
<input asp-for="chdata" class="agy-form-field require" placeholder="Data" />
<span asp-validation-for="chdata" class="text-danger"></span> *@
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<div class="form-group">
<h5><label asp-for="chcodimp" class="agy-client-quote"></label></h5>
@Html.DropDownListFor(x => x.chcodimp, (IEnumerable<SelectListItem>)ViewBag.Impianti, new { @class = "agy-form-field require" })
<span asp-validation-for="chcodimp" class="text-danger"></span>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<div class="form-group">
<h5><label asp-for="chtchiam" class="agy-client-quote"></label></h5>
@Html.DropDownListFor(x => x.chtchiam, (IEnumerable<SelectListItem>)ViewBag.Tecnici, new { @class = "agy-form-field require" })
<span asp-validation-for="chtchiam" class="text-danger"></span>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<div class="form-group">
<h5><label asp-for="chstato" class="agy-client-quote"></label></h5>
@Html.DropDownListFor(x => x.chstato, (IEnumerable<SelectListItem>)ViewBag.StatiChiamata, new { @class = "agy-form-field require" })
<span asp-validation-for="chstato" class="text-danger"></span>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<div class="form-group">
<h5><label asp-for="chrifer" class="agy-client-quote"></label></h5>
<input asp-for="chrifer" class="agy-form-field require" placeholder="Riferimento" />
<span asp-validation-for="chrifer" class="text-danger"></span>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<div class="form-group">
<h5><label asp-for="chtelef" class="agy-client-quote"></label></h5>
<input asp-for="chtelef" class="agy-form-field require" placeholder="Telefono" />
<span asp-validation-for="chtelef" class="text-danger"></span>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<div class="form-group">
<h5><label asp-for="chcodseg" class="agy-client-quote"></label></h5>
@Html.DropDownListFor(x => x.chcodseg, (IEnumerable<SelectListItem>)ViewBag.CodiciSegnalazione, new { @class = "agy-form-field require" })
<span asp-validation-for="chcodseg" class="text-danger"></span>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<div class="form-group">
<h5><label asp-for="chnote" class="agy-client-quote"></label></h5>
<input asp-for="chnote" class="agy-form-field require" placeholder="Note" />
<span asp-validation-for="chnote" class="text-danger"></span>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<div class="form-group">
<input type="submit" value="Salva" class="agy-btn submitForm" />
<a asp-action="Index" value="Torna alla lista" class="agy-btn submitForm">Torna alla lista</a>
</div>
@Html.HiddenFor(x => x.chora)
@Html.HiddenFor(x => x.chmin)
@Html.HiddenFor(x => x.chopins)
@Html.HiddenFor(x => x.chopass)
@Html.HiddenFor(x => x.chopchi)
@Html.HiddenFor(x => x.chaziimp)
@Html.HiddenFor(x => x.chtmanut)
@* @Html.HiddenFor(x => x.chdtapp) *@
@Html.HiddenFor(x => x.chdata)
@Html.HiddenFor(x => x.choraapi)
@Html.HiddenFor(x => x.chminapi)
@Html.HiddenFor(x => x.choraapf)
@Html.HiddenFor(x => x.chminapf)
@Html.HiddenFor(x => x.chstopi)
@Html.HiddenFor(x => x.chdtass)
@Html.HiddenFor(x => x.chorass)
@Html.HiddenFor(x => x.chminass)
@Html.HiddenFor(x => x.chdtchi)
@Html.HiddenFor(x => x.chorachi)
@Html.HiddenFor(x => x.chminchi)
@Html.HiddenFor(x => x.chdtlin)
@Html.HiddenFor(x => x.chorali)
@Html.HiddenFor(x => x.chminli)
@Html.HiddenFor(x => x.chdtlfi)
@Html.HiddenFor(x => x.choralf)
@Html.HiddenFor(x => x.chminlf)
@Html.HiddenFor(x => x.chvalfat)
@Html.HiddenFor(x => x.cpccchk)
@Html.HiddenFor(x => x.chnrap1)
@Html.HiddenFor(x => x.chsrap1)
@Html.HiddenFor(x => x.chnrap2)
@Html.HiddenFor(x => x.chsrap2)
@Html.HiddenFor(x => x.chmodrac)
@Html.HiddenFor(x => x.chprgann)
@Html.HiddenFor(x => x.chserchi)
@Html.HiddenFor(x => x.chdesfat)
@Html.HiddenFor(x => x.chdessup)
@Html.HiddenFor(x => x.chimpofa)
@Html.HiddenFor(x => x.chserdoc)
@Html.HiddenFor(x => x.chimpmat)
@Html.HiddenFor(x => x.chimpman)
@Html.HiddenFor(x => x.chperman)
@Html.HiddenFor(x => x.chflstim)
@Html.HiddenFor(x => x.chfleste)
@Html.HiddenFor(x => x.chserext)
@Html.HiddenFor(x => x.chrifiutata)
</form>
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="table-responsive">
<table class="table table-bordered table-striped table-hover align-middle">
<thead class="table-primary">
<tr>
<th scope="col">&nbsp;</th>
<th scope="col">&nbsp;</th>
</tr>
</thead>
<tbody>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-secondary">@Html.DisplayNameFor(model => model.chserial)</span></td>
<td>
@Html.HiddenFor(x => x.chserial)
@Html.DisplayFor(model => model.chserial)
</td>
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-secondary">@Html.DisplayNameFor(model => model.chnumero)</span></td>
<td>
<input asp-for="chnumero" class="agy-form-field require" placeholder="Numero chiamata" value="@numChia" />
<span asp-validation-for="chnumero" class="text-danger"></span>
</td>
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-secondary">@Html.DisplayNameFor(model => model.chdtapp)</span></td>
<td>
<input asp-for="chdtapp" class="agy-form-field require" placeholder="Data" />
<span asp-validation-for="chdtapp" class="text-danger"></span>
</td>
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-secondary">@Html.DisplayNameFor(model => model.chcodimp)</span></td>
<td>
@Html.DropDownListFor(x => x.chcodimp, (IEnumerable<SelectListItem>)ViewBag.Impianti, new { @class = "agy-form-field require" })
<span asp-validation-for="chcodimp" class="text-danger"></span>
</td>
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-secondary">@Html.DisplayNameFor(model => model.chtchiam)</span></td>
<td>
@Html.DropDownListFor(x => x.chtchiam, (IEnumerable<SelectListItem>)ViewBag.Tecnici, new { @class = "agy-form-field require" })
<span asp-validation-for="chtchiam" class="text-danger"></span>
</td>
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-secondary">@Html.DisplayNameFor(model => model.chrifer)</span></td>
<td>
<input asp-for="chrifer" class="agy-form-field require" placeholder="Riferimento" />
<span asp-validation-for="chrifer" class="text-danger"></span>
</td>
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-secondary">@Html.DisplayNameFor(model => model.chtelef)</span></td>
<td>
<input asp-for="chtelef" class="agy-form-field require" placeholder="Telefono" />
<span asp-validation-for="chtelef" class="text-danger"></span>
</td>
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-secondary">@Html.DisplayNameFor(model => model.chcodseg)</span></td>
<td>
@Html.DropDownListFor(x => x.chcodseg, (IEnumerable<SelectListItem>)ViewBag.CodiciSegnalazione, new { @class = "agy-form-field require" })
<span asp-validation-for="chcodseg" class="text-danger"></span>
</td>
</tr>
<tr>
<td class="fw-bold fs-5"><span class="badge bg-secondary">@Html.DisplayNameFor(model => model.chnote)</span></td>
<td>
<input asp-for="chnote" class="agy-form-field require" placeholder="Telefono" />
<span asp-validation-for="chnote" class="text-danger"></span>
</td>
</tr>
</tbody>
</table>
</div>
@Html.HiddenFor(x => x.chcodese)
@Html.HiddenFor(x => x.chtipo)
@Html.HiddenFor(x => x.chora)
@Html.HiddenFor(x => x.chmin)
@Html.HiddenFor(x => x.chopins)
@Html.HiddenFor(x => x.chopass)
@Html.HiddenFor(x => x.chopchi)
@Html.HiddenFor(x => x.chaziimp)
@Html.HiddenFor(x => x.chtmanut)
@Html.HiddenFor(x => x.chdata)
@Html.HiddenFor(x => x.choraapi)
@Html.HiddenFor(x => x.chminapi)
@Html.HiddenFor(x => x.choraapf)
@Html.HiddenFor(x => x.chminapf)
@Html.HiddenFor(x => x.chstopi)
@Html.HiddenFor(x => x.chdtass)
@Html.HiddenFor(x => x.chorass)
@Html.HiddenFor(x => x.chminass)
@Html.HiddenFor(x => x.chdtchi)
@Html.HiddenFor(x => x.chorachi)
@Html.HiddenFor(x => x.chminchi)
@Html.HiddenFor(x => x.chdtlin)
@Html.HiddenFor(x => x.chorali)
@Html.HiddenFor(x => x.chminli)
@Html.HiddenFor(x => x.chdtlfi)
@Html.HiddenFor(x => x.choralf)
@Html.HiddenFor(x => x.chminlf)
@Html.HiddenFor(x => x.chvalfat)
@Html.HiddenFor(x => x.cpccchk)
@Html.HiddenFor(x => x.chnrap1)
@Html.HiddenFor(x => x.chsrap1)
@Html.HiddenFor(x => x.chnrap2)
@Html.HiddenFor(x => x.chsrap2)
@Html.HiddenFor(x => x.chmodrac)
@Html.HiddenFor(x => x.chprgann)
@Html.HiddenFor(x => x.chserchi)
@Html.HiddenFor(x => x.chdesfat)
@Html.HiddenFor(x => x.chdessup)
@Html.HiddenFor(x => x.chimpofa)
@Html.HiddenFor(x => x.chserdoc)
@Html.HiddenFor(x => x.chimpmat)
@Html.HiddenFor(x => x.chimpman)
@Html.HiddenFor(x => x.chperman)
@Html.HiddenFor(x => x.chflstim)
@Html.HiddenFor(x => x.chfleste)
@Html.HiddenFor(x => x.chserext)
@Html.HiddenFor(x => x.chrifiutata)
<div class="form-group">
<input type="submit" value="Salva" class="agy-btn submitForm" />
<a asp-action="Index" value="Torna alla lista" class="agy-btn submitForm">Torna alla lista</a>
</div>
<div>
@* <a asp-action="Index">Torna alla lista</a>*@
</form>
</div>
@section Scripts {
@{
await Html.RenderPartialAsync("_ValidationScriptsPartial");
@ -157,7 +153,7 @@
}
</div>
</div>
</div>
@* <h1>Edit</h1>