Gestione Timesheet filtro link su area riservata
This commit is contained in:
parent
9e177436d5
commit
793ca31719
@ -11,6 +11,7 @@ namespace VirtualTask.Controllers
|
||||
private readonly ILogger<HomeController> _logger;
|
||||
string token = string.Empty;
|
||||
string admin = string.Empty;
|
||||
string time_sheet = string.Empty;
|
||||
public HomeController(ILogger<HomeController> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
@ -21,7 +22,11 @@ namespace VirtualTask.Controllers
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
token = helper.GetStringValue("tok");
|
||||
admin = helper.GetStringValue("admin");
|
||||
time_sheet = helper.GetStringValue("time_sheet");
|
||||
|
||||
ViewBag.Admin = admin;
|
||||
ViewBag.TimeSheet = time_sheet;
|
||||
|
||||
if (string.IsNullOrEmpty(token))
|
||||
{
|
||||
return RedirectToAction("Login2", "Login");
|
||||
|
||||
@ -59,6 +59,7 @@ namespace VirtualTask.Controllers
|
||||
helper.SetStringValue("tenant2", loginOut.Tenant);
|
||||
helper.SetStringValue("tecnico", model.Username);
|
||||
helper.SetStringValue("admin", loginOut.Tcsuper != null ? loginOut.Tcsuper : "N");
|
||||
helper.SetStringValue("time_sheet", loginOut.Config!=null && loginOut.Config.time_sheet != null && loginOut.Config.time_sheet ==true? "S" : "N");
|
||||
|
||||
return RedirectToAction("Index", "Home");
|
||||
}
|
||||
|
||||
@ -198,6 +198,8 @@ namespace VirtualTask.Models
|
||||
|
||||
/// <summary>tenant</summary>
|
||||
public string? Tenant { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
string locationTr = string.Empty;
|
||||
string locationPg = string.Empty;
|
||||
string locationRm = string.Empty;
|
||||
string timesheet = ViewBag.TimeSheet;
|
||||
locationTr = @"https://www.google.com/maps/dir/Polo+Informatico,+Via+Curio+Fornaci,+Terni,+TR//@42.5682046,12.5716686,13z/data=!4m8!4m7!1m5!1m1!1s0x132ee4b0d0b5464b:0xfe6f167f10da0915!2m2!1d12.612868!2d42.5681488!1m0?hl=it&entry=ttu";
|
||||
locationPg = @"https://www.google.com/maps/dir/Polo+Informatico,+Via+Adalberto+Migliorati,+Perugia,+PG//@43.0707354,12.3267502,16.25z/data=!4m8!4m7!1m5!1m1!1s0x132ea0273e872527:0x38a8a69c342cf3e4!2m2!1d12.3318154!2d43.0721535!1m0?entry=ttu";
|
||||
locationRm = @"https://www.google.com/maps/dir/Via+del+Serafico,+90,+00142+Roma+RM//@41.8309813,12.4753342,14z/data=!4m8!4m7!1m5!1m1!1s0x13258a552865707b:0x7db7d14e57c069f7!2m2!1d12.4866518!2d41.829886!1m0?hl=it&entry=ttu";
|
||||
@ -177,7 +178,15 @@ Purchase:
|
||||
<li><a asp-area="" asp-controller="DatiAzienda" asp-action="Index">Dati Azienda</a></li>
|
||||
<li><a asp-area="" asp-controller="CommesseVT" asp-action="Index">Commesse</a></li>
|
||||
<li><a asp-area="" asp-controller="Rapportini" asp-action="Index">Esporta buoni</a></li>
|
||||
<li><a asp-area="" asp-controller="Timbrature" asp-action="Index">Timbrature</a></li>
|
||||
|
||||
|
||||
@{
|
||||
if (!string.IsNullOrEmpty(timesheet) && timesheet.Equals("S"))
|
||||
{
|
||||
<li><a asp-area="" asp-controller="Timbrature" asp-action="Index">Timbrature</a></li>
|
||||
}
|
||||
}
|
||||
|
||||
<li><a asp-area="" asp-controller="Login" asp-action="Logout">Logout</a></li>
|
||||
|
||||
@{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user