Compare commits
4 Commits
61e55497e3
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 8255115560 | |||
| 6349a50151 | |||
| 702c097c32 | |||
| 71a7f453ee |
@@ -18,8 +18,8 @@
|
||||
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="_content/Blazor.Bootstrap/blazor.bootstrap.js"></script>
|
||||
<script src="_framework/blazor.web.js"></script>
|
||||
<script src="Scripts/Util.js"></script>
|
||||
<script src="_framework/blazor.web.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
@inject NavigationManager Navigation
|
||||
@using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage
|
||||
@inject ProtectedLocalStorage ProtectedLocalStore
|
||||
@inject UserState userState
|
||||
@inject IJSRuntime JS
|
||||
|
||||
|
||||
<head>
|
||||
@@ -106,32 +108,55 @@
|
||||
@code {
|
||||
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
var obtenerDatoAdmin = await ProtectedLocalStore.GetAsync<bool>("EsAdmin");
|
||||
var obtenerDatoId = await ProtectedLocalStore.GetAsync<int>("idUsuario");
|
||||
// Redirigir al home si no hay token y la ruta no es pública
|
||||
if (obtenerDatoId.Value == 0 || !obtenerDatoAdmin.Value)
|
||||
{
|
||||
Navigation.NavigateTo("/", true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// protected override void OnAfterRender(bool firstRender)
|
||||
// protected override async Task OnInitializedAsync()
|
||||
// {
|
||||
// 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();
|
||||
// string rutaActual = Navigation.ToBaseRelativePath(Navigation.Uri);
|
||||
|
||||
// if (rutaActual != "Denegado")
|
||||
// {
|
||||
// if (string.IsNullOrEmpty(urlAnterior) || urlAnterior.Contains("cacoa.es"))
|
||||
// {
|
||||
// Navigation.NavigateTo("/Denegado", true);
|
||||
// }
|
||||
// }
|
||||
// Navigation.NavigateTo("/", 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,28 +5,29 @@
|
||||
@inject UserState UserState
|
||||
@inject IHttpContextAccessor HttpContextAccessor
|
||||
@inject NavigationManager Navigation
|
||||
@inject IJSRuntime JS
|
||||
|
||||
|
||||
<head>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet" />
|
||||
<link href="_content/Blazor.Bootstrap/blazor.bootstrap.css" rel="stylesheet" />
|
||||
<link href="_content/Blazor.Bootstrap/Blazor.Bootstrap.bundle.scp.css" rel="stylesheet" />
|
||||
<link href="Content/Site.css?v=0.9" rel="stylesheet" />
|
||||
<link href="Content/all.min.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||
<script src="Scripts/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
|
||||
<!-- Add chart.js reference if chart components are used in your application. -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.0.1/chart.umd.js" integrity="sha512-gQhCDsnnnUfaRzD8k1L5llCCV6O9HN09zClIzzeJ8OJ9MpGmIlCxm+pdCkqTwqJ4JcjbojFr79rl2F1mzcoLMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<!-- Add chartjs-plugin-datalabels.min.js reference if chart components with data label feature is used in your application. -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-datalabels/2.2.0/chartjs-plugin-datalabels.min.js" integrity="sha512-JPcRR8yFa8mmCsfrw4TNte1ZvF1e3+1SdGMslZvmrzDYxS69J7J49vkFL8u6u8PlPJK+H3voElBtUCzaXj+6ig==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<!-- Add sortable.js reference if SortableList component is used in your application. -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"></script>
|
||||
<script src="_content/Blazor.Bootstrap/blazor.bootstrap.js"></script>
|
||||
<script src="Scripts/popper.min.js"></script>
|
||||
<script src="Scripts/all.min.js"></script>
|
||||
<script src="Scripts/Util.js"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet" />
|
||||
<link href="_content/Blazor.Bootstrap/blazor.bootstrap.css" rel="stylesheet" />
|
||||
<link href="_content/Blazor.Bootstrap/Blazor.Bootstrap.bundle.scp.css" rel="stylesheet" />
|
||||
<link href="Content/Site.css?v=0.62" rel="stylesheet" />
|
||||
<link href="Content/all.min.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||
<script src="Scripts/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
|
||||
<!-- Add chart.js reference if chart components are used in your application. -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.0.1/chart.umd.js" integrity="sha512-gQhCDsnnnUfaRzD8k1L5llCCV6O9HN09zClIzzeJ8OJ9MpGmIlCxm+pdCkqTwqJ4JcjbojFr79rl2F1mzcoLMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<!-- Add chartjs-plugin-datalabels.min.js reference if chart components with data label feature is used in your application. -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-datalabels/2.2.0/chartjs-plugin-datalabels.min.js" integrity="sha512-JPcRR8yFa8mmCsfrw4TNte1ZvF1e3+1SdGMslZvmrzDYxS69J7J49vkFL8u6u8PlPJK+H3voElBtUCzaXj+6ig==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<!-- Add sortable.js reference if SortableList component is used in your application. -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"></script>
|
||||
<script src="_content/Blazor.Bootstrap/blazor.bootstrap.js"></script>
|
||||
<script src="Scripts/popper.min.js"></script>
|
||||
<script src="Scripts/all.min.js"></script>
|
||||
<script src="Scripts/Util.js"></script>
|
||||
</head>
|
||||
|
||||
|
||||
@@ -39,22 +40,43 @@
|
||||
|
||||
@code{
|
||||
|
||||
protected override void OnAfterRender(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
string? urlAnterior = HttpContextAccessor.HttpContext?.Request.Headers["Referer"].ToString();
|
||||
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);
|
||||
}
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
@inject NavigationManager Navigation
|
||||
@using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage
|
||||
@inject ProtectedLocalStorage ProtectedLocalStore
|
||||
@inject UserState userState
|
||||
@inject IJSRuntime JS
|
||||
|
||||
|
||||
<head>
|
||||
@@ -13,7 +15,7 @@
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet" />
|
||||
<link href="_content/Blazor.Bootstrap/blazor.bootstrap.css" rel="stylesheet" />
|
||||
<link href="_content/Blazor.Bootstrap/Blazor.Bootstrap.bundle.scp.css" rel="stylesheet" />
|
||||
<link href="Content/Site.css?v=0.62" rel="stylesheet" />
|
||||
<link href="Content/Site.css?v=0.64" rel="stylesheet" />
|
||||
<link href="Content/all.min.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||
<script src="Scripts/jquery.min.js"></script>
|
||||
@@ -111,15 +113,54 @@
|
||||
@code {
|
||||
private bool MostrarExtra => Navigation.Uri.Contains("PanelControl", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
|
||||
string? urlAnterior = "";
|
||||
|
||||
bool urlVaida = true;
|
||||
string rutaActual = "";
|
||||
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
var obtenerDatoAdmin = await ProtectedLocalStore.GetAsync<bool>("EsAdmin");
|
||||
var obtenerDatoId = await ProtectedLocalStore.GetAsync<int>("idUsuario");
|
||||
// Redirigir al home si no hay token y la ruta no es pública
|
||||
if (obtenerDatoId.Value == 0 || obtenerDatoAdmin.Value)
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
|
||||
// Redirigir al home si no hay token y la ruta no es pública
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -384,7 +384,7 @@
|
||||
var fullHtml = $@"
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<meta charset='UTF-8'/>
|
||||
<style>{cssContent}</style>
|
||||
<link href='https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css' rel='stylesheet' integrity='sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN' crossorigin='anonymous'>
|
||||
</head>
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-10 mx-auto d-flex justify-content-center" style="align-items: flex-end; margin-top:150px;">
|
||||
<div class="col-10 mx-auto d-flex justify-content-center" style="@estiloTrabajos">
|
||||
<div class="col-md-10 row ">
|
||||
<div class="TituloTablaImprimir">
|
||||
<b>Trabajo profesional</b>
|
||||
@@ -208,15 +208,20 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-12 mx-auto mb-5">
|
||||
<div class="col-12 mx-auto" >
|
||||
@* TABLA COSTES ASOCIADOS A LOS SEVICIOS DE ARQUITECTURA *@
|
||||
|
||||
<div class="col-8 mx-auto mb-4">
|
||||
<div class="col-8 mx-auto" style=" margin-top:70px;">
|
||||
<div class="TituloTablaImprimir">
|
||||
<b>Costes Asociados a los Servicios de Arquitectura</b>
|
||||
</div>
|
||||
|
||||
<table class="tablaAlter" style="width:100%">
|
||||
<div class="TituloTablaImprimir" style=" margin-top:70px;">
|
||||
<p>
|
||||
<b>Costes Asociados a los Servicios de Arquitectura</b>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<table class="tablaAlter" style="width:100%;">
|
||||
<tbody style="font-size:9pt;">
|
||||
<tr>
|
||||
<td class="TotalesTabla" > COSTES DE PRODUCCIÓN DEL TRABAJO PROFESIONAL: </td>
|
||||
@@ -324,6 +329,7 @@
|
||||
|
||||
public tsHerramientasCACOA bd;
|
||||
|
||||
public string estiloTrabajos = "";
|
||||
|
||||
|
||||
MarkupString msTextoEncabezado => (MarkupString)textoEncabezado;
|
||||
@@ -339,6 +345,7 @@
|
||||
bd = tsHerramientasCACOA.NuevoContexto(SoloLectura: false);
|
||||
totalUsos = objetoCASA.TrabajoProfesional.Usos.Count;
|
||||
|
||||
estiloTrabajos = objetoCASA.TrabajoProfesional.Usos.Count != 0 ? "align-items: flex-end; margin-top:50px;" : "align-items: flex-end; margin-top:150px;";
|
||||
|
||||
textoEncabezado = bd.enumeraciones.First(x => x.Codigo.Contains("PDFCASA")).ValorAlfabeticoLargo;
|
||||
|
||||
|
||||
@@ -12,10 +12,12 @@
|
||||
|
||||
<div class="d-flex flex-column mt-3">
|
||||
<label>Simulación: <span class="NombreSimulacionImprimir">@objetoURBAN.NombreSimulacion</span></label>
|
||||
<br />
|
||||
<label>Fecha de creación: <span class="NombreSimulacionImprimir">@DateTime.Now</span></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* COSTE HORA DE LOS TRABAJOS *@
|
||||
<div class="col-8 mx-auto" style="align-items: flex-end;">
|
||||
<div class="TituloTablaImprimir">
|
||||
<b>Coste hora de los trabajos realizados por el despacho profesional</b>
|
||||
@@ -59,6 +61,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@* COSTE HORA EXTERNALIZACION *@
|
||||
<div class="col-8 mx-auto" style="margin-top:50px;">
|
||||
|
||||
<div class="TituloTablaImprimir" >
|
||||
@@ -97,8 +100,10 @@
|
||||
|
||||
@* TRABAJAO PROFESIONAL *@
|
||||
<div class="@separacionTabla">
|
||||
<div class="col-12 d-flex justify-content-center" style="gap:20px;">
|
||||
<div class="formatoCampos pt-2" style="font-size:9pt;">
|
||||
<div class="col-8 mx-auto" style="margin-top:50px;">
|
||||
|
||||
<div class="table-responsive espacioTablas">
|
||||
@* <div class="formatoCampos pt-2" style="font-size:9pt;">
|
||||
<label class="tituloLbl">Tipo de Documento:</label>
|
||||
@if (objetoURBAN.TrabajoProfesional.idTipoDocumentacion != 0)
|
||||
{
|
||||
@@ -119,10 +124,47 @@
|
||||
{
|
||||
<label>No Seleccionado</label>
|
||||
}
|
||||
</div>
|
||||
</div> *@
|
||||
|
||||
<table class="mb-0" style="width:100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th >Tipo de Documento:</th>
|
||||
<th>Documento:</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td class="text-end">
|
||||
@if (objetoURBAN.TrabajoProfesional.idTipoDocumentacion != 0)
|
||||
{
|
||||
<label>@CultureInfo.CurrentCulture.TextInfo.ToTitleCase(@objetoURBAN.Enumerados.TiposDeDocumentos.First(x => x.idEnumeracion == objetoURBAN.TrabajoProfesional.idTipoDocumentacion).Descripcion.ToLower())</label>
|
||||
}
|
||||
else
|
||||
{
|
||||
<label>No Seleccionado</label>
|
||||
}
|
||||
</td>
|
||||
<td class="text-end">
|
||||
@if (objetoURBAN.TrabajoProfesional.idTipoDocumentacion != 0)
|
||||
{
|
||||
<label>@objetoURBAN.Enumerados.ProyectosPorTipo(objetoURBAN.TrabajoProfesional.idTipoDocumentacion).First(x => x.idtipoproyectos == objetoURBAN.TrabajoProfesional.idTipoProyecto).Descripcion</label>
|
||||
}
|
||||
else
|
||||
{
|
||||
<label>No Seleccionado</label>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@* TABLAS DE DATOS MINIMOS Y OPCIONALES *@
|
||||
<div class="col-11 mx-auto" style="margin-top:200px;">
|
||||
<div class="col-11 mx-auto" style="margin-top:50px;">
|
||||
@* TABLA DE DATOS MINIMOS *@
|
||||
|
||||
<div class="TituloTablaImprimir" style="margin-top:50px;">
|
||||
@@ -158,7 +200,10 @@
|
||||
|
||||
@* TABLA DE DATOS OPCIONALES *@
|
||||
|
||||
<div class="TituloTablaImprimir" style="margin-top:50px;">
|
||||
<div class="TituloTablaImprimir" style="margin-top:80px;">
|
||||
|
||||
</div>
|
||||
<div class="TituloTablaImprimir" style="margin-top:80px;">
|
||||
<b>Documentación Opcional:</b>
|
||||
</div>
|
||||
<div class="table-responsive espacioTablas">
|
||||
@@ -299,7 +344,10 @@
|
||||
@* INNOVACIÓN INSTRUMENTOS*@
|
||||
<div class="col-11 mx-auto mb-5">
|
||||
<div>
|
||||
<div class="mt-3 mb-3 TituloTablaImprimir"><b>Innovacion de los instrumentos</b></div>
|
||||
<div class="TituloTablaImprimir" style="margin-top:80px;">
|
||||
</div>
|
||||
|
||||
<div class="mb-3 TituloTablaImprimir" style="margin-top:80px;"><b>Innovacion de los instrumentos</b></div>
|
||||
<p style="font-size:9pt;" class="col-6">
|
||||
<label>@objetoURBAN.TrabajoProfesional.valorInstrumentos %</label>
|
||||
</p>
|
||||
@@ -324,7 +372,7 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
<div style="font-size:9pt;" class="fw-bold">
|
||||
<div style="font-size:9pt;" class="fw-bold mt-2">
|
||||
<label>HORAS TRABAJO PROFESIONAL URBANISMO: <span>@objetoURBAN.TrabajoProfesional.horasTrabProfesional.MilesYDecimales() h</span></label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -336,7 +384,7 @@
|
||||
<div class="col-11 mx-auto mb-5" >
|
||||
<div class="row justify-content-center align-content-center align-items-center">
|
||||
|
||||
<div class="col-9 mb-5 ">
|
||||
<div class="col-9 mb-5 mb-0" style="width:100%;">
|
||||
<div class="TituloTablaImprimir" >
|
||||
<b>Trabajo profesional</b>
|
||||
</div>
|
||||
|
||||
@@ -1,27 +1,29 @@
|
||||
|
||||
<div id="LicitacionesCASAImprimir" class="d-flex flex-column align-items-center pagePrincipal">
|
||||
<div class="col-12 mx-auto mb-5">
|
||||
<div class="col-12 mx-auto">
|
||||
@* ENCABEZADO DE LA PAGINA *@
|
||||
<div class="EncabezadoImprimir">
|
||||
@* A esta se le pone un margin bottom diferente para que cuando los usos esten vacios que entre en una sola página *@
|
||||
<div class="EncabezadoImprimir" style="margin-bottom: 80px !important;">
|
||||
<p>
|
||||
@msTextoEncabezado
|
||||
</p>
|
||||
|
||||
<div class="d-flex flex-column mt-3">
|
||||
<label>Simulación: <span class="NombreSimulacionImprimir">@objetoLicitaciones.Descripcion</span></label>
|
||||
<br />
|
||||
<label>Fecha de creación: <span class="NombreSimulacionImprimir">@DateTime.Now</span></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* TABLA USOS TIPOLOGIAS *@
|
||||
<div class="col-11 mx-auto mb-5" style="align-items: flex-end;">
|
||||
<div class="col-11 mx-auto mb-4" style="align-items: flex-end;">
|
||||
<div class="TituloTablaImprimir">
|
||||
<b>Usos/Tipologías</b>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<div class="table-responsive espacioTablas">
|
||||
|
||||
<table class="TablaImprimir mb-0 espacioTablas" style="width:100%;">
|
||||
<table class="TablaImprimir mb-0" style="width:100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="15%">Superficie (m²)</th>
|
||||
@@ -53,7 +55,7 @@
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4" class="text-start fw-bold colorC TotalesTabla">
|
||||
<div style="height:28px; align-content:center;">
|
||||
<div style="height:20px; align-content:center;">
|
||||
Total superficie: <span> @objetoLicitaciones.Usos.Sum(x => x.superficie).MilesYDecimales() m²</span>
|
||||
</div>
|
||||
</td>
|
||||
@@ -84,8 +86,8 @@
|
||||
{
|
||||
<tr>
|
||||
<td>@fase.Denominacion</td>
|
||||
<td class="text-end">
|
||||
<div>
|
||||
<td >
|
||||
<div class="centrarChecksImprimir text-end">
|
||||
<span style="margin-right:5px;">@fase.Porcentaje</span>
|
||||
@if (fase.Seleccionado)
|
||||
{
|
||||
@@ -138,7 +140,7 @@
|
||||
|
||||
</div>
|
||||
@* TABLA COSTES DE PRODUCCION *@
|
||||
<div class="col-8 mx-auto" style="align-items: flex-end; margin-top:800px;">
|
||||
<div class="col-8 mx-auto" style="align-items: flex-end; margin-top:35px;">
|
||||
<div class="TituloTablaImprimir" >
|
||||
<b>Costes de producción</b>
|
||||
</div>
|
||||
@@ -196,7 +198,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="FooterImprimir">
|
||||
@* A esta se le pone un margin top diferente para que cuando los usos esten vacios que entre en una sola página *@
|
||||
<div class="FooterImprimir" style="margin-top: 55px !important;">
|
||||
<p>
|
||||
@mspie1
|
||||
</p>
|
||||
|
||||
@@ -11,12 +11,16 @@
|
||||
|
||||
<div class="d-flex flex-column mt-3">
|
||||
<label>Simulación: <span class="NombreSimulacionImprimir">@objetoLicitacionUrban.NombreSimulacion</span></label>
|
||||
<br />
|
||||
<label>Fecha de creación: <span class="NombreSimulacionImprimir">@DateTime.Now</span></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 d-flex justify-content-center" style="gap:20px;">
|
||||
<div class="formatoCampos pt-2" style="font-size:9pt;">
|
||||
<div class="col-8 mx-auto" style="margin-top:50px;">
|
||||
|
||||
<div class="table-responsive espacioTablas">
|
||||
|
||||
@* <div class="formatoCampos pt-2" style="font-size:9pt;">
|
||||
<label class="tituloLbl">Tipo de Documento:</label>
|
||||
@if (objetoLicitacionUrban.TrabajoProfesional.idTipoDocumentacion != 0)
|
||||
{
|
||||
@@ -37,7 +41,44 @@
|
||||
{
|
||||
<label>No Seleccionado</label>
|
||||
}
|
||||
</div>
|
||||
</div> *@
|
||||
|
||||
<table class="mb-0" style="width:100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tipo de Documento:</th>
|
||||
<th>Documento:</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td class="text-end">
|
||||
@if (objetoLicitacionUrban.TrabajoProfesional.idTipoDocumentacion != 0)
|
||||
{
|
||||
<label>@CultureInfo.CurrentCulture.TextInfo.ToTitleCase(@objetoLicitacionUrban.Enumerados.TiposDeDocumentos.First(x => x.idEnumeracion == objetoLicitacionUrban.TrabajoProfesional.idTipoDocumentacion).Descripcion.ToLower())</label>
|
||||
}
|
||||
else
|
||||
{
|
||||
<label>No Seleccionado</label>
|
||||
}
|
||||
</td>
|
||||
<td class="text-end">
|
||||
@if (objetoLicitacionUrban.TrabajoProfesional.idTipoDocumentacion != 0)
|
||||
{
|
||||
<label>@objetoLicitacionUrban.Enumerados.ProyectosPorTipo(objetoLicitacionUrban.TrabajoProfesional.idTipoDocumentacion).First(x => x.idtipoproyectos == objetoLicitacionUrban.TrabajoProfesional.idTipoProyecto).Descripcion</label>
|
||||
}
|
||||
else
|
||||
{
|
||||
<label>No Seleccionado</label>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@* TABLAS DE DATOS MINIMOS Y OPCIONALES *@
|
||||
<div class="col-11 mx-auto">
|
||||
@@ -75,7 +116,10 @@
|
||||
|
||||
@* TABLA DE DATOS OPCIONALES *@
|
||||
|
||||
<div class="TituloTablaImprimir" style=" margin-top:50px;">
|
||||
<div class="TituloTablaImprimir" style="margin-top:10px;">
|
||||
</div>
|
||||
|
||||
<div class="TituloTablaImprimir">
|
||||
<b>Documentación Opcional:</b>
|
||||
</div>
|
||||
<div class="table-responsive espacioTablas">
|
||||
@@ -155,8 +199,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* 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;">
|
||||
<b>Fases:</b>
|
||||
@@ -205,7 +250,7 @@
|
||||
</div>
|
||||
|
||||
@* INNOVACIÓN INSTRUMENTOS*@
|
||||
<div class="col-11 mx-auto ">
|
||||
<div class="col-11 mx-auto" style="margin-top:150px;">
|
||||
<div>
|
||||
<div class="mt-3 mb-3 TituloTablaImprimir"><b>Innovacion de los instrumentos</b></div>
|
||||
<p style="font-size:9pt;" class="col-6">
|
||||
@@ -241,7 +286,10 @@
|
||||
|
||||
<div class="col-8 mx-auto mt-4">
|
||||
@* 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>
|
||||
</div>
|
||||
|
||||
@@ -374,6 +422,7 @@
|
||||
public tsHerramientasCACOA bd;
|
||||
|
||||
string espacioTabla = "margin-bottom:400px;";
|
||||
string espacioDocumentos = "";
|
||||
|
||||
|
||||
MarkupString msTextoEncabezado => (MarkupString)textoEncabezado;
|
||||
@@ -394,6 +443,15 @@
|
||||
espacioTabla = "";
|
||||
}
|
||||
|
||||
if (objetoLicitacionUrban.TrabajoProfesional.idTipoDocumentacion != 0)
|
||||
{
|
||||
espacioDocumentos = "margin-top:50px;";
|
||||
}
|
||||
else
|
||||
{
|
||||
espacioDocumentos = "margin-top:50px;";
|
||||
}
|
||||
|
||||
textoEncabezado = bd.enumeraciones.First(x => x.Codigo.Contains("PDFURBANLIC")).ValorAlfabeticoLargo;
|
||||
|
||||
pie1 = bd.enumeraciones.First(x => x.Codigo.Contains(".PDFPIE1")).ValorAlfabeticoLargo;
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<InputText @bind-Value="objetoLicitacionUrban.NombreSimulacion" class="form-control inputForm formatoMoneda inputTabla " style="text-align:left;font-weight:bold;"></InputText>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -29,4 +29,5 @@
|
||||
</div>
|
||||
|
||||
@code {
|
||||
|
||||
}
|
||||
|
||||
@@ -7,47 +7,48 @@
|
||||
@inject IHttpContextAccessor HttpContextAccessor
|
||||
@inject NavigationManager Navigation
|
||||
@inject UserState UserState
|
||||
@inject IJSRuntime JS
|
||||
|
||||
|
||||
<div class="fondo">
|
||||
<div class="back">
|
||||
<div class="div-center arealogin">
|
||||
<div class="content">
|
||||
<img src="Content/Imagenes/CACOA-6.png" height="49" />
|
||||
<h4 class="mt-2">Acceso a la Herramienta</h4>
|
||||
<hr />
|
||||
<EditForm Model="login" FormName="loginForm" OnValidSubmit="Acceder" >
|
||||
<DataAnnotationsValidator></DataAnnotationsValidator>
|
||||
<div class="back">
|
||||
<div class="div-center arealogin">
|
||||
<div class="content">
|
||||
<img src="Content/Imagenes/CACOA-6.png" height="49" />
|
||||
<h4 class="mt-2">Acceso a la Herramienta</h4>
|
||||
<hr />
|
||||
<EditForm Model="login" FormName="loginForm" OnValidSubmit="Acceder">
|
||||
<DataAnnotationsValidator></DataAnnotationsValidator>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Clave de acceso</label>
|
||||
<input type="number" class="form-control" @bind-value="@login.codigo" placeholder="0000000000000" id="clave" />
|
||||
<ValidationMessage For="() => login.codigo" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Password</label>
|
||||
<div class="input-group">
|
||||
<PasswordInput Class="form-control" @bind-Value="@login.password" Id="pass"/>
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Clave de acceso</label>
|
||||
<input type="number" class="form-control" @bind-value="@login.codigo" placeholder="0000000000000" id="clave" />
|
||||
<ValidationMessage For="() => login.codigo" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Password</label>
|
||||
<div class="input-group">
|
||||
<PasswordInput Class="form-control" @bind-Value="@login.password" Id="pass" />
|
||||
</div>
|
||||
<ValidationMessage For="() => login.password" />
|
||||
</div>
|
||||
<div class="form-group d-flex">
|
||||
@* <input type="checkbox" class="form-check-input" id="chkRecuerda" /> *@
|
||||
<CheckboxInput Class="form-check-input" Id="chkRecuerda" Value=@recuerda ValueExpression="() => recuerda" ValueChanged="(value) => checkCambiado(value)" />
|
||||
<label class="form-check-label" for="Recuerdame">Recordarme</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<small class="form-text text-muted">Si es la primera vez que utiliza la herramienta, <a href="NuevoAcceso" class="mt-2">cree una nueva clave de acceso</a></small>
|
||||
</div>
|
||||
<ValidationMessage For="() => login.password" />
|
||||
</div>
|
||||
<div class="form-group d-flex">
|
||||
@* <input type="checkbox" class="form-check-input" id="chkRecuerda" /> *@
|
||||
<CheckboxInput Class="form-check-input" Id="chkRecuerda" Value=@recuerda ValueExpression="() => recuerda" ValueChanged="(value) => checkCambiado(value)" />
|
||||
<label class="form-check-label" for="Recuerdame">Recordarme</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<small class="form-text text-muted">Si es la primera vez que utiliza la herramienta, <a href="NuevoAcceso" class="mt-2">cree una nueva clave de acceso</a></small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<p class="form-text text-muted" style="color:red !important">@mensajeError</p>
|
||||
</div>
|
||||
<button type="submit" class="btnBlue"> Acceder </button>
|
||||
</EditForm>
|
||||
<div class="form-group">
|
||||
<p class="form-text text-muted" style="color:red !important">@mensajeError</p>
|
||||
</div>
|
||||
<button type="submit" class="btnBlue"> Acceder </button>
|
||||
</EditForm>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@code {
|
||||
|
||||
@@ -56,18 +57,23 @@
|
||||
private string mensajeError = "";
|
||||
private bool recuerda = false;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
bd = tsHerramientasCACOA.NuevoContexto(SoloLectura: false);
|
||||
|
||||
|
||||
await ProtectedLocalStore.SetAsync("idUsuario", 0);
|
||||
await ProtectedLocalStore.SetAsync("EsAdmin", false);
|
||||
|
||||
// Limpiar almacenamiento local o sesión si se está utilizando
|
||||
// if (HttpContextAccessor?.HttpContext?.Session != null)
|
||||
// {
|
||||
// HttpContextAccessor.HttpContext.Session.Clear();
|
||||
// }
|
||||
if (HttpContextAccessor?.HttpContext?.Session != null)
|
||||
{
|
||||
HttpContextAccessor.HttpContext.Session.Clear();
|
||||
}
|
||||
|
||||
var rec = await ProtectedLocalStore.GetAsync<bool>("rec");
|
||||
if(rec.Value==true){
|
||||
@@ -91,6 +97,9 @@
|
||||
await ProtectedLocalStore.SetAsync("idUsuario", -1);
|
||||
await ProtectedLocalStore.SetAsync("EsAdmin", true);
|
||||
|
||||
UserState.idUser = -1;
|
||||
UserState.PuedeAcceder =true;
|
||||
|
||||
Navigation.NavigateTo("/PanelControlConf", forceLoad: true);
|
||||
}
|
||||
else
|
||||
@@ -107,6 +116,9 @@
|
||||
await ProtectedLocalStore.SetAsync("idUsuario", usuario.idUsuario);
|
||||
await ProtectedLocalStore.SetAsync("EsAdmin", false);
|
||||
|
||||
UserState.idUser = usuario.idUsuario;
|
||||
UserState.PuedeAcceder =true;
|
||||
|
||||
|
||||
if (recuerda)
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
private readonly object _lock = new object();
|
||||
private int _idUser;
|
||||
private bool _esAdmin;
|
||||
private bool _puedeAcceder;
|
||||
public int idUser
|
||||
{
|
||||
get
|
||||
@@ -41,5 +42,24 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool PuedeAcceder
|
||||
{
|
||||
get
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
return _puedeAcceder;
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
_puedeAcceder = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,10 +19,21 @@ namespace HerramientaCASA
|
||||
GlobalSettings = {
|
||||
PaperSize = PaperKind.A4,
|
||||
Orientation = Orientation.Portrait,
|
||||
Margins= new MarginSettings
|
||||
{
|
||||
Top = 11.8,
|
||||
Left = 0,
|
||||
Right = 0,
|
||||
Bottom = 10
|
||||
},
|
||||
},
|
||||
Objects = {
|
||||
new ObjectSettings() {
|
||||
HtmlContent = html
|
||||
HtmlContent = html,
|
||||
HeaderSettings = new HeaderSettings
|
||||
{
|
||||
HtmUrl = Path.Combine(Environment.CurrentDirectory, "wwwroot", "Imprimir", "HeaderImprimir.html")
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
//"WriteConnection": "Server=localhost;Port=22222;Database=herramientascacoa;User Id=cacoa;Password=cacoa2018-;",
|
||||
//"ReadOnlyConnection": "Server=localhost;Port=22222;Database=herramientascacoa;User Id=cacoa;Password=cacoa2018-;",
|
||||
//"ReadOnlyConnection": "Server=localhost;Port=22222;Database=herramientascacoa;User Id=cacoa;Password=cacoa2018-;"
|
||||
"WriteConnection": "Server=77.229.174.85;Port=22222;Database=herramientascacoa;User Id=cacoa;Password=cacoa2018-;",
|
||||
"ReadOnlyConnection": "Server=77.229.174.85;Port=22222;Database=herramientascacoa;User Id=cacoa;Password=cacoa2018-;"
|
||||
},
|
||||
|
||||
@@ -4,6 +4,15 @@ body {
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.logoCacoa {
|
||||
border-radius: 10px !important;
|
||||
}
|
||||
@@ -886,3 +895,9 @@ div.content {
|
||||
.espacioTablas {
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
.centrarChecksImprimir {
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
display: flex;
|
||||
}
|
||||
21
HerramientaCASA/wwwroot/Imprimir/HeaderImprimir.html
Normal file
21
HerramientaCASA/wwwroot/Imprimir/HeaderImprimir.html
Normal file
File diff suppressed because one or more lines are too long
@@ -33,3 +33,12 @@ window.descargarPdf = function (fileName, base64Data) {
|
||||
link.download = fileName;
|
||||
link.click();
|
||||
};
|
||||
|
||||
|
||||
window.verRutaReferrer = function () {
|
||||
try {
|
||||
return window.parent.location.href;
|
||||
} catch (e) {
|
||||
return document.referrer;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user