Num bancali obbligatori, nascosto bottone modifica tutte destinazioni quando giro iniziato
This commit is contained in:
parent
461d23d67d
commit
2335a15cd1
@ -223,6 +223,10 @@ namespace SoftwayWeb.Controllers
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public IActionResult Bancali(GiriConsegnaView model)
|
public IActionResult Bancali(GiriConsegnaView model)
|
||||||
{
|
{
|
||||||
|
if (model.BancaliCaricati == null)
|
||||||
|
{
|
||||||
|
return View(model);
|
||||||
|
}
|
||||||
SessionHelper helper = new SessionHelper(this);
|
SessionHelper helper = new SessionHelper(this);
|
||||||
token = helper.GetStringValue("tok");
|
token = helper.GetStringValue("tok");
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,7 @@ namespace SoftwayWeb.Models
|
|||||||
[Display(Name = "Autista")]
|
[Display(Name = "Autista")]
|
||||||
public string? Autista { get; set; }
|
public string? Autista { get; set; }
|
||||||
|
|
||||||
[Display(Name = "Bancali caricati")]
|
[Display(Name = "Bancali caricati"), Required(ErrorMessage = "Inserire il numero di bancali")]
|
||||||
public int? BancaliCaricati { get; set; }
|
public int? BancaliCaricati { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -39,6 +39,11 @@
|
|||||||
@Html.HiddenFor(x => x.parzialeImpRec)
|
@Html.HiddenFor(x => x.parzialeImpRec)
|
||||||
<button type="submit" class="btn btn-primary">Salva</button>
|
<button type="submit" class="btn btn-primary">Salva</button>
|
||||||
<a asp-action="Index" value="Torna alla lista" class="btn btn-primary">Torna alla lista</a>
|
<a asp-action="Index" value="Torna alla lista" class="btn btn-primary">Torna alla lista</a>
|
||||||
|
|
||||||
|
@* @if (Model.BancaliCaricati == null)
|
||||||
|
{
|
||||||
|
<p style="color:red;">Inserire il numero di bancali</p>
|
||||||
|
} *@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -116,7 +116,8 @@
|
|||||||
nomeAutista=item.Autista,
|
nomeAutista=item.Autista,
|
||||||
dataGiro=item.DataGiro,
|
dataGiro=item.DataGiro,
|
||||||
codMezzo=item.CodMezzo,
|
codMezzo=item.CodMezzo,
|
||||||
desMezzo=item.Automezzo})" title="Destinazioni" class="links"><img alt="Destinazioni" src="@Url.Content("~/images/icons8-oggetti-puntiforme-30.png")" style="width:24px;height:24px;">
|
desMezzo=item.Automezzo})" title="Destinazioni" class="links" style="text-decoration: none">
|
||||||
|
<img alt="Destinazioni" src="@Url.Content("~/images/icons8-oggetti-puntiforme-30.png")" style="width:24px;height:24px;">
|
||||||
</a>
|
</a>
|
||||||
@if(item.DestinazioniFatte == 0)
|
@if(item.DestinazioniFatte == 0)
|
||||||
{
|
{
|
||||||
@ -130,21 +131,26 @@
|
|||||||
nomeAutista = item.Autista,
|
nomeAutista = item.Autista,
|
||||||
codMezzo= item.CodMezzo,
|
codMezzo= item.CodMezzo,
|
||||||
nomeMezzo = item.Automezzo,
|
nomeMezzo = item.Automezzo,
|
||||||
dataGiroCons = item.DataGiro @* id=item.SerialeGiro,nbanc=item.parzialeBanRec,imp=item.parzialeImpRec *@})" title="Modifica tutte le destinazioni" class="links">
|
dataGiroCons = item.DataGiro @* id=item.SerialeGiro,nbanc=item.parzialeBanRec,imp=item.parzialeImpRec *@})" title="Modifica tutte le destinazioni" class="links" style="text-decoration: none">
|
||||||
<img alt="Modifica Tutte" src="@Url.Content("~/images/system.png")" style="width:24px;height:24px;">
|
<img alt="Modifica Tutte" src="@Url.Content("~/images/system.png")" style="width:24px;height:24px;">
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
|
@if (item.DestinazioniFatte == 0)
|
||||||
|
{
|
||||||
<a href="@Url.ActionLink("AddDestinazione", "AddDestinazione", new{serialeGiro = item.SerialeGiro,
|
<a href="@Url.ActionLink("AddDestinazione", "AddDestinazione", new{serialeGiro = item.SerialeGiro,
|
||||||
codAutista=item.CodAutista,
|
codAutista=item.CodAutista,
|
||||||
nomeAutista=item.Autista,
|
nomeAutista=item.Autista,
|
||||||
dataGiro=item.DataGiro,
|
dataGiro=item.DataGiro,
|
||||||
codMezzo=item.CodMezzo,
|
codMezzo=item.CodMezzo,
|
||||||
desMezzo=item.Automezzo})" title="Aggiungi nuova destinazione" class="links"><img alt="Aggiungi nuova destinazione" src="@Url.Content("~/images/addBtn.png")" style="width:25px;height:25px;"></a>
|
desMezzo=item.Automezzo})" title="Aggiungi nuova destinazione" class="links" style="text-decoration: none">
|
||||||
|
<img alt="Aggiungi nuova destinazione" src="@Url.Content("~/images/addBtn.png")" style="width:25px;height:25px;">
|
||||||
|
</a>
|
||||||
|
}
|
||||||
@if (item.BancaliCaricati == null)
|
@if (item.BancaliCaricati == null)
|
||||||
{
|
{
|
||||||
<img alt="noBancali" src="@Url.Content("~/images/alert.png")" style="width:23px;height:23px;">
|
<img alt="noBancali" src="@Url.Content("~/images/alert.png")" style="width:23px;height:23px;">
|
||||||
}
|
}
|
||||||
@if (item.DestinazioniModificate != null && item.DestinazioniModificate > 0)
|
@if (/*item.DestinazioniModificate != null &&*/ item.DestinazioniModificate > 0)
|
||||||
{
|
{
|
||||||
<img alt="nocons" src="@Url.Content("~/images/warning.png")" style="width:24px;height:24px;">
|
<img alt="nocons" src="@Url.Content("~/images/warning.png")" style="width:24px;height:24px;">
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user