prueba
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
@using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage
|
@using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage
|
||||||
@inject ProtectedLocalStorage ProtectedLocalStore
|
@inject ProtectedLocalStorage ProtectedLocalStore
|
||||||
@inject UserState userState
|
@inject UserState userState
|
||||||
|
@inject IJSRuntime JS
|
||||||
|
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
@@ -107,31 +108,55 @@
|
|||||||
@code {
|
@code {
|
||||||
|
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
// protected override async Task OnInitializedAsync()
|
||||||
{
|
|
||||||
// Redirigir al home si no hay token y la ruta no es pública
|
|
||||||
if (userState.idUser == 0)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Navigation.NavigateTo("/", true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// protected override void OnAfterRender(bool firstRender)
|
|
||||||
// {
|
// {
|
||||||
// if (firstRender)
|
// // Redirigir al home si no hay token y la ruta no es pública
|
||||||
|
// if (userState.idUser == 0)
|
||||||
// {
|
// {
|
||||||
// string? urlAnterior = HttpContextAccessor.HttpContext?.Request.Headers["Referer"].ToString();
|
// Navigation.NavigateTo("/", true);
|
||||||
// string rutaActual = Navigation.ToBaseRelativePath(Navigation.Uri);
|
|
||||||
|
|
||||||
// if (rutaActual != "Denegado")
|
|
||||||
// {
|
|
||||||
// if (string.IsNullOrEmpty(urlAnterior) || urlAnterior.Contains("cacoa.es"))
|
|
||||||
// {
|
|
||||||
// Navigation.NavigateTo("/Denegado", true);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
string? urlAnterior = "";
|
||||||
|
|
||||||
|
bool urlVaida = true;
|
||||||
|
string rutaActual = "";
|
||||||
|
|
||||||
|
|
||||||
|
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||||
|
{
|
||||||
|
if (firstRender)
|
||||||
|
{
|
||||||
|
urlAnterior = await JS.InvokeAsync<string>("eval", "document.referrer");
|
||||||
|
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(urlAnterior))
|
||||||
|
{
|
||||||
|
|
||||||
|
rutaActual = Navigation.ToBaseRelativePath(Navigation.Uri);
|
||||||
|
|
||||||
|
|
||||||
|
if (rutaActual != "Denegado")
|
||||||
|
{
|
||||||
|
if (!urlAnterior.Contains("cacoa.es"))
|
||||||
|
{
|
||||||
|
Navigation.NavigateTo("/Denegado", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Navigation.NavigateTo("/Denegado", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (userState.idUser == 0)
|
||||||
|
{
|
||||||
|
Navigation.NavigateTo("/", true);
|
||||||
|
}
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,10 +116,10 @@
|
|||||||
|
|
||||||
@* TABLA DE DATOS OPCIONALES *@
|
@* TABLA DE DATOS OPCIONALES *@
|
||||||
|
|
||||||
<div class="TituloTablaImprimir" style="@espacioDocumentos">
|
<div class="TituloTablaImprimir" style="margin-top:10px;">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="TituloTablaImprimir" style="@espacioDocumentos">
|
<div class="TituloTablaImprimir">
|
||||||
<b>Documentación Opcional:</b>
|
<b>Documentación Opcional:</b>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-responsive espacioTablas">
|
<div class="table-responsive espacioTablas">
|
||||||
@@ -199,8 +199,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@* FASES *@
|
@* FASES *@
|
||||||
<div class="col-8 mx-auto" style="margin-top:250px;">
|
<div class="col-8 mx-auto" style="margin-top:150px;">
|
||||||
|
|
||||||
<div class="TituloTablaImprimir" style=" margin-top:50px;">
|
<div class="TituloTablaImprimir" style=" margin-top:50px;">
|
||||||
<b>Fases:</b>
|
<b>Fases:</b>
|
||||||
@@ -249,7 +250,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
@* INNOVACIÓN INSTRUMENTOS*@
|
@* INNOVACIÓN INSTRUMENTOS*@
|
||||||
<div class="col-11 mx-auto ">
|
<div class="col-11 mx-auto" style="margin-top:150px;">
|
||||||
<div>
|
<div>
|
||||||
<div class="mt-3 mb-3 TituloTablaImprimir"><b>Innovacion de los instrumentos</b></div>
|
<div class="mt-3 mb-3 TituloTablaImprimir"><b>Innovacion de los instrumentos</b></div>
|
||||||
<p style="font-size:9pt;" class="col-6">
|
<p style="font-size:9pt;" class="col-6">
|
||||||
@@ -285,7 +286,10 @@
|
|||||||
|
|
||||||
<div class="col-8 mx-auto mt-4">
|
<div class="col-8 mx-auto mt-4">
|
||||||
@* Solvencia tecnica *@
|
@* Solvencia tecnica *@
|
||||||
<div class="TituloTablaImprimir">
|
|
||||||
|
<div class="TituloTablaImprimir" style="margin-top:50px;">
|
||||||
|
</div>
|
||||||
|
<div class="TituloTablaImprimir" style="margin-top:50px;">
|
||||||
<b>Solvencia técnica:</b>
|
<b>Solvencia técnica:</b>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -441,7 +445,7 @@
|
|||||||
|
|
||||||
if (objetoLicitacionUrban.TrabajoProfesional.idTipoDocumentacion != 0)
|
if (objetoLicitacionUrban.TrabajoProfesional.idTipoDocumentacion != 0)
|
||||||
{
|
{
|
||||||
espacioDocumentos = "margin-top:300px;";
|
espacioDocumentos = "margin-top:50px;";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
<InputText @bind-Value="objetoLicitacionUrban.NombreSimulacion" class="form-control inputForm formatoMoneda inputTabla " style="text-align:left;font-weight:bold;"></InputText>
|
<InputText @bind-Value="objetoLicitacionUrban.NombreSimulacion" class="form-control inputForm formatoMoneda inputTabla " style="text-align:left;font-weight:bold;"></InputText>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex ml-auto impriManual">
|
<div class="d-flex ml-auto impriManual">
|
||||||
@* <button @onclick="imprimir" class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-print pe-2"></i>Imprimir</button> *@
|
<button @onclick="imprimir" class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-print pe-2"></i>Imprimir</button>
|
||||||
<button @onclick="VerManual" class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-book pe-2"></i>Manual</button>
|
<button @onclick="VerManual" class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-book pe-2"></i>Manual</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user