Compare commits
30 Commits
a2dbe693ce
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 8255115560 | |||
| 6349a50151 | |||
| 702c097c32 | |||
| 71a7f453ee | |||
| 61e55497e3 | |||
| fe101a5554 | |||
| f740b95a1c | |||
| 6abb41f398 | |||
| f670b16eb6 | |||
| e5ff734014 | |||
| a285563f6c | |||
| c17d8c4cc8 | |||
| 9d78928892 | |||
| bb393c803d | |||
| a983f7f45e | |||
| 317c8c1112 | |||
| 36b5b4c30c | |||
| 8f7b606be0 | |||
| e1d6e4d7c3 | |||
| 5f655b6f37 | |||
| 41d201c3aa | |||
| ae43080975 | |||
| ca50f76e02 | |||
| b5efdb3e9c | |||
| 454e4a317c | |||
| 7f33a1ddd8 | |||
| bc74e0c376 | |||
| ddfe628977 | |||
| 46257d0de4 | |||
| 09b451624a |
23
HerramientaCASA/AssemnlyLoadwkhtmltox.cs
Normal file
23
HerramientaCASA/AssemnlyLoadwkhtmltox.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.Loader;
|
||||||
|
|
||||||
|
namespace HerramientaCASA
|
||||||
|
{
|
||||||
|
public class AssemnlyLoadwkhtmltox : AssemblyLoadContext
|
||||||
|
{
|
||||||
|
public IntPtr LoadUnmanagedLibrary(string absolutePath)
|
||||||
|
{
|
||||||
|
return LoadUnmanagedDll(absolutePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override IntPtr LoadUnmanagedDll(string unmanagedDllPath)
|
||||||
|
{
|
||||||
|
return LoadUnmanagedDllFromPath(unmanagedDllPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override Assembly Load(AssemblyName assemblyName)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
|
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
|
||||||
crossorigin="anonymous"></script>
|
crossorigin="anonymous"></script>
|
||||||
<script src="_content/Blazor.Bootstrap/blazor.bootstrap.js"></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="Scripts/Util.js"></script>
|
||||||
|
<script src="_framework/blazor.web.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -2,9 +2,12 @@
|
|||||||
@using BlazorBootstrap;
|
@using BlazorBootstrap;
|
||||||
@using HerramientaCASA.Model
|
@using HerramientaCASA.Model
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
|
@inject IHttpContextAccessor HttpContextAccessor
|
||||||
@inject NavigationManager Navigation
|
@inject NavigationManager Navigation
|
||||||
@using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage
|
@using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage
|
||||||
@inject ProtectedLocalStorage ProtectedLocalStore
|
@inject ProtectedLocalStorage ProtectedLocalStore
|
||||||
|
@inject UserState userState
|
||||||
|
@inject IJSRuntime JS
|
||||||
|
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
@@ -105,14 +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);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
string? urlAnterior = "";
|
||||||
|
|
||||||
|
bool urlVaida = true;
|
||||||
|
string rutaActual = "";
|
||||||
|
|
||||||
|
|
||||||
|
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||||
{
|
{
|
||||||
var obtenerDatoAdmin = await ProtectedLocalStore.GetAsync<bool>("EsAdmin");
|
if (firstRender)
|
||||||
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);
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,32 +3,35 @@
|
|||||||
@using HerramientaCASA.Model
|
@using HerramientaCASA.Model
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
@inject UserState UserState
|
@inject UserState UserState
|
||||||
|
@inject IHttpContextAccessor HttpContextAccessor
|
||||||
|
@inject NavigationManager Navigation
|
||||||
|
@inject IJSRuntime JS
|
||||||
|
|
||||||
|
|
||||||
<head>
|
<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@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="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.css" rel="stylesheet" />
|
||||||
<link href="_content/Blazor.Bootstrap/Blazor.Bootstrap.bundle.scp.css" rel="stylesheet" />
|
<link href="_content/Blazor.Bootstrap/Blazor.Bootstrap.bundle.scp.css" rel="stylesheet" />
|
||||||
<link href="Content/Site.css?v=0.5" rel="stylesheet" />
|
<link href="Content/Site.css?v=0.62" rel="stylesheet" />
|
||||||
<link href="Content/all.min.css" 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">
|
<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="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>
|
<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. -->
|
<!-- 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>
|
<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. -->
|
<!-- 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>
|
<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. -->
|
<!-- 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="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"></script>
|
||||||
<script src="_content/Blazor.Bootstrap/blazor.bootstrap.js"></script>
|
<script src="_content/Blazor.Bootstrap/blazor.bootstrap.js"></script>
|
||||||
<script src="Scripts/popper.min.js"></script>
|
<script src="Scripts/popper.min.js"></script>
|
||||||
<script src="Scripts/all.min.js"></script>
|
<script src="Scripts/all.min.js"></script>
|
||||||
<script src="Scripts/Util.js"></script>
|
<script src="Scripts/Util.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
||||||
<div class="main">
|
<div class="main" style="position: absolute;width: 100%;top: 0px;">
|
||||||
<div class="">
|
<div class="">
|
||||||
@Body
|
@Body
|
||||||
</div>
|
</div>
|
||||||
@@ -37,4 +40,43 @@
|
|||||||
|
|
||||||
@code{
|
@code{
|
||||||
|
|
||||||
}
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,12 @@
|
|||||||
@using HerramientaCASA.Model
|
@using HerramientaCASA.Model
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
@inherits LayoutComponentBase
|
@inherits LayoutComponentBase
|
||||||
|
@inject IHttpContextAccessor HttpContextAccessor
|
||||||
@inject NavigationManager Navigation
|
@inject NavigationManager Navigation
|
||||||
@using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage
|
@using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage
|
||||||
@inject ProtectedLocalStorage ProtectedLocalStore
|
@inject ProtectedLocalStorage ProtectedLocalStore
|
||||||
|
@inject UserState userState
|
||||||
|
@inject IJSRuntime JS
|
||||||
|
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
@@ -12,7 +15,7 @@
|
|||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet" />
|
<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.css" rel="stylesheet" />
|
||||||
<link href="_content/Blazor.Bootstrap/Blazor.Bootstrap.bundle.scp.css" rel="stylesheet" />
|
<link href="_content/Blazor.Bootstrap/Blazor.Bootstrap.bundle.scp.css" rel="stylesheet" />
|
||||||
<link href="Content/Site.css?v=0.50" rel="stylesheet" />
|
<link href="Content/Site.css?v=0.64" rel="stylesheet" />
|
||||||
<link href="Content/all.min.css" 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">
|
<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="Scripts/jquery.min.js"></script>
|
||||||
@@ -31,13 +34,13 @@
|
|||||||
|
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<main style="height: 100%;">
|
<main style="height: 100%;">
|
||||||
<header class="d-none d-md-block">
|
<header class="">
|
||||||
<div class="pa-header-t1">
|
<div class="pa-header-t1">
|
||||||
<div class="pa-header-row1">
|
<div class="pa-header-row1">
|
||||||
<nav class="navbar navbar-expand-lg navbar-light fixed-top bg-light navCACOA">
|
<nav class="navbar navbar-expand-lg navbar-light fixed-top bg-light navCACOA">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div>
|
<div>
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#topMenu" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" onclick="cambiar()">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
<a class="navbar-brand" href="https://www.cacoa.es/">
|
<a class="navbar-brand" href="https://www.cacoa.es/">
|
||||||
@@ -48,19 +51,19 @@
|
|||||||
@if (!MostrarExtra)
|
@if (!MostrarExtra)
|
||||||
{
|
{
|
||||||
<ul class="navbar-nav mr-auto ulMenu">
|
<ul class="navbar-nav mr-auto ulMenu">
|
||||||
<li id="liPC" class="nav-item">
|
<li id="liPC" class="nav-item" onclick="cambiar()">
|
||||||
<NavLink class="nav-link headNav" href="PanelControl"><i class="fa-solid fa-house"></i> Menú</NavLink>
|
<NavLink class="nav-link headNav" href="PanelControl"><i class="fa-solid fa-house"></i> Menú</NavLink>
|
||||||
</li>
|
</li>
|
||||||
<li id="liCC" class="nav-item">
|
<li id="liCC" class="nav-item" onclick="cambiar()">
|
||||||
<NavLink class="@IsActive("HerramientaCASASimulaciones", "herramientacasas")" href="HerramientaCASASimulaciones">CASA – Edificación</NavLink>
|
<NavLink class="@IsActive("HerramientaCASASimulaciones", "herramientacasas")" href="HerramientaCASASimulaciones">CASA – Edificación</NavLink>
|
||||||
</li>
|
</li>
|
||||||
<li id="liCS" class="nav-item">
|
<li id="liCS" class="nav-item" onclick="cambiar()">
|
||||||
<NavLink class="@IsActive("LicitacionCASASimulaciones", "LicitacionCASA")" href="LicitacionCASASimulaciones">Licitaciones Edificación</NavLink>
|
<NavLink class="@IsActive("LicitacionCASASimulaciones", "LicitacionCASA")" href="LicitacionCASASimulaciones">Licitaciones Edificación</NavLink>
|
||||||
</li>
|
</li>
|
||||||
<li id="liCS" class="nav-item">
|
<li id="liCS" class="nav-item" onclick="cambiar()">
|
||||||
<NavLink class="@IsActive("HerramientaURBANSimulaciones", "HerramientaURBAN")" href="HerramientaURBANSimulaciones">CASA – Urbanismo</NavLink>
|
<NavLink class="@IsActive("HerramientaURBANSimulaciones", "HerramientaURBAN")" href="HerramientaURBANSimulaciones">CASA – Urbanismo</NavLink>
|
||||||
</li>
|
</li>
|
||||||
<li id="liCS" class="nav-item">
|
<li id="liCS" class="nav-item" onclick="cambiar()">
|
||||||
<NavLink class="@IsActive("LicitacionUrbanSimulaciones", "LicitacionesUrban")" href="LicitacionUrbanSimulaciones">Licitaciones Urbanismo</NavLink>
|
<NavLink class="@IsActive("LicitacionUrbanSimulaciones", "LicitacionesUrban")" href="LicitacionUrbanSimulaciones">Licitaciones Urbanismo</NavLink>
|
||||||
</li>
|
</li>
|
||||||
@* <li id="liCB" class="nav-item">
|
@* <li id="liCB" class="nav-item">
|
||||||
@@ -77,6 +80,7 @@
|
|||||||
<label class="headNav" style="color: #078b98 !important; font-size: large; font-weight: bold;">Costes Asociados a los Servicios de Arquitectura - CASA</label>
|
<label class="headNav" style="color: #078b98 !important; font-size: large; font-weight: bold;">Costes Asociados a los Servicios de Arquitectura - CASA</label>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="ml-auto">
|
<div class="ml-auto">
|
||||||
<ul class="navbar-nav mr-auto ulMenu">
|
<ul class="navbar-nav mr-auto ulMenu">
|
||||||
@@ -95,20 +99,68 @@
|
|||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
const navbarCollapse = document.getElementById('topMenu');
|
||||||
|
const bsCollapse = new bootstrap.Collapse(navbarCollapse, {
|
||||||
|
toggle: false // No lo colapsa automáticamente al inicializar
|
||||||
|
});
|
||||||
|
function cambiar(){
|
||||||
|
bsCollapse.toggle()
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private bool MostrarExtra => Navigation.Uri.Contains("PanelControl", StringComparison.OrdinalIgnoreCase);
|
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");
|
if (firstRender)
|
||||||
var obtenerDatoId = await ProtectedLocalStore.GetAsync<int>("idUsuario");
|
{
|
||||||
// Redirigir al home si no hay token y la ruta no es pública
|
urlAnterior = await JS.InvokeAsync<string>("eval", "document.referrer");
|
||||||
if (obtenerDatoId.Value == 0 || obtenerDatoAdmin.Value)
|
|
||||||
|
|
||||||
|
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);
|
Navigation.NavigateTo("/", true);
|
||||||
}
|
}
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
|
||||||
|
// Redirigir al home si no hay token y la ruta no es pública
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -121,4 +173,22 @@
|
|||||||
? "nav-link headNav active"
|
? "nav-link headNav active"
|
||||||
: "nav-link headNav";
|
: "nav-link headNav";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 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);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -3,8 +3,9 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 mt-3" style="width:47%;">
|
<!--style="width:47%;"-->
|
||||||
<div style="height: 24px;margin-bottom: 10px;">
|
<div class="col-md-6 mt-3" >
|
||||||
|
<div style="margin-bottom: 10px;">
|
||||||
<b>Costes Asociados a los Servicios de Arquitectura</b>
|
<b>Costes Asociados a los Servicios de Arquitectura</b>
|
||||||
</div>
|
</div>
|
||||||
<table class="tablaAlter" style="width:100%">
|
<table class="tablaAlter" style="width:100%">
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<TrabajadorGrid objetoCASA="objetoCASA"></TrabajadorGrid>
|
<TrabajadorGrid objetoCASA="objetoCASA"></TrabajadorGrid>
|
||||||
</CascadingValue>
|
</CascadingValue>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mt-auto">
|
<div class="row mt-auto" style="padding-top: 40px;">
|
||||||
<div class="col-md-12 d-flex justify-content-end">
|
<div class="col-md-12 d-flex justify-content-end">
|
||||||
<table class="tablaAlter">
|
<table class="tablaAlter">
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-6 mt-3">
|
<div class="col-md-6 mt-3">
|
||||||
<div style="height: 24px;">
|
<div>
|
||||||
<b>Costes Asociados a los Servicios de Arquitectura</b>
|
<b>Costes Asociados a los Servicios de Arquitectura</b>
|
||||||
</div>
|
</div>
|
||||||
<table class="table tablaCACOA tablaCACOA2 mb-0">
|
<table class="table tablaCACOA tablaCACOA2 mb-0">
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<HerramientaCASA.Components.Pages.HerramientaURBANTabs.DespachoProfURBAN.TrabajadorGridURBAN objetoURBAN="objetoURBAN"></HerramientaCASA.Components.Pages.HerramientaURBANTabs.DespachoProfURBAN.TrabajadorGridURBAN>
|
<HerramientaCASA.Components.Pages.HerramientaURBANTabs.DespachoProfURBAN.TrabajadorGridURBAN objetoURBAN="objetoURBAN"></HerramientaCASA.Components.Pages.HerramientaURBANTabs.DespachoProfURBAN.TrabajadorGridURBAN>
|
||||||
</CascadingValue>
|
</CascadingValue>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mt-auto">
|
<div class="row mt-auto" style="padding-top: 40px;">
|
||||||
<div class="col-md-12 d-flex justify-content-end">
|
<div class="col-md-12 d-flex justify-content-end">
|
||||||
<table class="tablaAlter">
|
<table class="tablaAlter">
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
@if (modificarTabla)
|
@if (modificarTabla)
|
||||||
{
|
{
|
||||||
<div class="row p-0 m-0">
|
<div class="row p-0 m-0">
|
||||||
<div class="col-md-12 mt-3 mb-3">
|
<div class="col-md-12 mt-4 mb-3">
|
||||||
<CascadingValue Value="this">
|
<CascadingValue Value="this">
|
||||||
<DocumentosURBAN objetoURBAN="objetoURBAN"></DocumentosURBAN>
|
<DocumentosURBAN objetoURBAN="objetoURBAN"></DocumentosURBAN>
|
||||||
</CascadingValue>
|
</CascadingValue>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mt-3">
|
<div class="row mt-3">
|
||||||
<div class="col-4">
|
<div class="col-md-4">
|
||||||
<label class="tituloLbl">
|
<label class="tituloLbl">
|
||||||
@if (!string.IsNullOrEmpty(objetoURBAN.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 46).Descripcion))
|
@if (!string.IsNullOrEmpty(objetoURBAN.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 46).Descripcion))
|
||||||
{
|
{
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
</GridColumns>
|
</GridColumns>
|
||||||
</Grid>
|
</Grid>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-md-4">
|
||||||
<label class="tituloLbl">
|
<label class="tituloLbl">
|
||||||
@if (!string.IsNullOrEmpty(objetoURBAN.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 63).Descripcion))
|
@if (!string.IsNullOrEmpty(objetoURBAN.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 63).Descripcion))
|
||||||
{
|
{
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-md-4">
|
||||||
<label class="tituloLbl">
|
<label class="tituloLbl">
|
||||||
@if (!string.IsNullOrEmpty(objetoURBAN.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 47).Descripcion))
|
@if (!string.IsNullOrEmpty(objetoURBAN.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 47).Descripcion))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
@UtilidadesCASA.CreateTooltip(objetoURBAN.Enumerados.PuntosInformacion.First(x => x.idPuntosInformacion == 49).Descripcion)
|
@UtilidadesCASA.CreateTooltip(objetoURBAN.Enumerados.PuntosInformacion.First(x => x.idPuntosInformacion == 49).Descripcion)
|
||||||
}
|
}
|
||||||
<b>Innovacion de los instrumentos</b></div>
|
<b>Innovacion de los instrumentos</b></div>
|
||||||
<p class="col-6">
|
<p class="mt-2">
|
||||||
@* @if (!nuevaRedaccion)
|
@* @if (!nuevaRedaccion)
|
||||||
{ *@
|
{ *@
|
||||||
<InputNumber TValue="double" Value="@objetoURBAN.TrabajoProfesional.valorInstrumentos"
|
<InputNumber TValue="double" Value="@objetoURBAN.TrabajoProfesional.valorInstrumentos"
|
||||||
|
|||||||
@@ -6,8 +6,9 @@
|
|||||||
@msTextoEncabezado
|
@msTextoEncabezado
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="d-flex flex-column mt-3">
|
<div class="mt-3">
|
||||||
<label>Simulación: <span class="NombreSimulacionImprimir">@objetoCASA.NombreSimulacion</span></label>
|
<label>Simulación: <span class="NombreSimulacionImprimir">@objetoCASA.NombreSimulacion</span></label>
|
||||||
|
<br />
|
||||||
<label>Fecha de creación: <span class="NombreSimulacionImprimir">@DateTime.Now</span></label>
|
<label>Fecha de creación: <span class="NombreSimulacionImprimir">@DateTime.Now</span></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -148,7 +149,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</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="col-md-10 row ">
|
||||||
<div class="TituloTablaImprimir">
|
<div class="TituloTablaImprimir">
|
||||||
<b>Trabajo profesional</b>
|
<b>Trabajo profesional</b>
|
||||||
@@ -207,15 +208,20 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 mx-auto mb-5">
|
<div class="col-12 mx-auto" >
|
||||||
@* TABLA COSTES ASOCIADOS A LOS SEVICIOS DE ARQUITECTURA *@
|
@* 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">
|
<div class="TituloTablaImprimir">
|
||||||
<b>Costes Asociados a los Servicios de Arquitectura</b>
|
|
||||||
</div>
|
</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;">
|
<tbody style="font-size:9pt;">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="TotalesTabla" > COSTES DE PRODUCCIÓN DEL TRABAJO PROFESIONAL: </td>
|
<td class="TotalesTabla" > COSTES DE PRODUCCIÓN DEL TRABAJO PROFESIONAL: </td>
|
||||||
@@ -323,6 +329,7 @@
|
|||||||
|
|
||||||
public tsHerramientasCACOA bd;
|
public tsHerramientasCACOA bd;
|
||||||
|
|
||||||
|
public string estiloTrabajos = "";
|
||||||
|
|
||||||
|
|
||||||
MarkupString msTextoEncabezado => (MarkupString)textoEncabezado;
|
MarkupString msTextoEncabezado => (MarkupString)textoEncabezado;
|
||||||
@@ -338,6 +345,7 @@
|
|||||||
bd = tsHerramientasCACOA.NuevoContexto(SoloLectura: false);
|
bd = tsHerramientasCACOA.NuevoContexto(SoloLectura: false);
|
||||||
totalUsos = objetoCASA.TrabajoProfesional.Usos.Count;
|
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;
|
textoEncabezado = bd.enumeraciones.First(x => x.Codigo.Contains("PDFCASA")).ValorAlfabeticoLargo;
|
||||||
|
|
||||||
|
|||||||
@@ -12,10 +12,12 @@
|
|||||||
|
|
||||||
<div class="d-flex flex-column mt-3">
|
<div class="d-flex flex-column mt-3">
|
||||||
<label>Simulación: <span class="NombreSimulacionImprimir">@objetoURBAN.NombreSimulacion</span></label>
|
<label>Simulación: <span class="NombreSimulacionImprimir">@objetoURBAN.NombreSimulacion</span></label>
|
||||||
|
<br />
|
||||||
<label>Fecha de creación: <span class="NombreSimulacionImprimir">@DateTime.Now</span></label>
|
<label>Fecha de creación: <span class="NombreSimulacionImprimir">@DateTime.Now</span></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@* COSTE HORA DE LOS TRABAJOS *@
|
||||||
<div class="col-8 mx-auto" style="align-items: flex-end;">
|
<div class="col-8 mx-auto" style="align-items: flex-end;">
|
||||||
<div class="TituloTablaImprimir">
|
<div class="TituloTablaImprimir">
|
||||||
<b>Coste hora de los trabajos realizados por el despacho profesional</b>
|
<b>Coste hora de los trabajos realizados por el despacho profesional</b>
|
||||||
@@ -59,6 +61,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@* COSTE HORA EXTERNALIZACION *@
|
||||||
<div class="col-8 mx-auto" style="margin-top:50px;">
|
<div class="col-8 mx-auto" style="margin-top:50px;">
|
||||||
|
|
||||||
<div class="TituloTablaImprimir" >
|
<div class="TituloTablaImprimir" >
|
||||||
@@ -97,8 +100,10 @@
|
|||||||
|
|
||||||
@* TRABAJAO PROFESIONAL *@
|
@* TRABAJAO PROFESIONAL *@
|
||||||
<div class="@separacionTabla">
|
<div class="@separacionTabla">
|
||||||
<div class="col-12 d-flex justify-content-center" style="gap:20px;">
|
<div class="col-8 mx-auto" style="margin-top:50px;">
|
||||||
<div class="formatoCampos pt-2" style="font-size:9pt;">
|
|
||||||
|
<div class="table-responsive espacioTablas">
|
||||||
|
@* <div class="formatoCampos pt-2" style="font-size:9pt;">
|
||||||
<label class="tituloLbl">Tipo de Documento:</label>
|
<label class="tituloLbl">Tipo de Documento:</label>
|
||||||
@if (objetoURBAN.TrabajoProfesional.idTipoDocumentacion != 0)
|
@if (objetoURBAN.TrabajoProfesional.idTipoDocumentacion != 0)
|
||||||
{
|
{
|
||||||
@@ -119,10 +124,47 @@
|
|||||||
{
|
{
|
||||||
<label>No Seleccionado</label>
|
<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>
|
</div>
|
||||||
@* TABLAS DE DATOS MINIMOS Y OPCIONALES *@
|
@* 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 *@
|
@* TABLA DE DATOS MINIMOS *@
|
||||||
|
|
||||||
<div class="TituloTablaImprimir" style="margin-top:50px;">
|
<div class="TituloTablaImprimir" style="margin-top:50px;">
|
||||||
@@ -158,7 +200,10 @@
|
|||||||
|
|
||||||
@* TABLA DE DATOS OPCIONALES *@
|
@* 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>
|
<b>Documentación Opcional:</b>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-responsive espacioTablas">
|
<div class="table-responsive espacioTablas">
|
||||||
@@ -299,7 +344,10 @@
|
|||||||
@* INNOVACIÓN INSTRUMENTOS*@
|
@* INNOVACIÓN INSTRUMENTOS*@
|
||||||
<div class="col-11 mx-auto mb-5">
|
<div class="col-11 mx-auto mb-5">
|
||||||
<div>
|
<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">
|
<p style="font-size:9pt;" class="col-6">
|
||||||
<label>@objetoURBAN.TrabajoProfesional.valorInstrumentos %</label>
|
<label>@objetoURBAN.TrabajoProfesional.valorInstrumentos %</label>
|
||||||
</p>
|
</p>
|
||||||
@@ -324,7 +372,7 @@
|
|||||||
</div>
|
</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>
|
<label>HORAS TRABAJO PROFESIONAL URBANISMO: <span>@objetoURBAN.TrabajoProfesional.horasTrabProfesional.MilesYDecimales() h</span></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -336,7 +384,7 @@
|
|||||||
<div class="col-11 mx-auto mb-5" >
|
<div class="col-11 mx-auto mb-5" >
|
||||||
<div class="row justify-content-center align-content-center align-items-center">
|
<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" >
|
<div class="TituloTablaImprimir" >
|
||||||
<b>Trabajo profesional</b>
|
<b>Trabajo profesional</b>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,27 +1,29 @@
|
|||||||
|
|
||||||
<div id="LicitacionesCASAImprimir" class="d-flex flex-column align-items-center pagePrincipal">
|
<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 *@
|
@* 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>
|
<p>
|
||||||
@msTextoEncabezado
|
@msTextoEncabezado
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="d-flex flex-column mt-3">
|
<div class="d-flex flex-column mt-3">
|
||||||
<label>Simulación: <span class="NombreSimulacionImprimir">@objetoLicitaciones.Descripcion</span></label>
|
<label>Simulación: <span class="NombreSimulacionImprimir">@objetoLicitaciones.Descripcion</span></label>
|
||||||
|
<br />
|
||||||
<label>Fecha de creación: <span class="NombreSimulacionImprimir">@DateTime.Now</span></label>
|
<label>Fecha de creación: <span class="NombreSimulacionImprimir">@DateTime.Now</span></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@* TABLA USOS TIPOLOGIAS *@
|
@* 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">
|
<div class="TituloTablaImprimir">
|
||||||
<b>Usos/Tipologías</b>
|
<b>Usos/Tipologías</b>
|
||||||
</div>
|
</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>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="15%">Superficie (m²)</th>
|
<th width="15%">Superficie (m²)</th>
|
||||||
@@ -53,7 +55,7 @@
|
|||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4" class="text-start fw-bold colorC TotalesTabla">
|
<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>
|
Total superficie: <span> @objetoLicitaciones.Usos.Sum(x => x.superficie).MilesYDecimales() m²</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -84,8 +86,8 @@
|
|||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>@fase.Denominacion</td>
|
<td>@fase.Denominacion</td>
|
||||||
<td class="text-end">
|
<td >
|
||||||
<div>
|
<div class="centrarChecksImprimir text-end">
|
||||||
<span style="margin-right:5px;">@fase.Porcentaje</span>
|
<span style="margin-right:5px;">@fase.Porcentaje</span>
|
||||||
@if (fase.Seleccionado)
|
@if (fase.Seleccionado)
|
||||||
{
|
{
|
||||||
@@ -138,7 +140,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
@* TABLA COSTES DE PRODUCCION *@
|
@* 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" >
|
<div class="TituloTablaImprimir" >
|
||||||
<b>Costes de producción</b>
|
<b>Costes de producción</b>
|
||||||
</div>
|
</div>
|
||||||
@@ -196,7 +198,8 @@
|
|||||||
|
|
||||||
</div>
|
</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>
|
<p>
|
||||||
@mspie1
|
@mspie1
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -11,12 +11,16 @@
|
|||||||
|
|
||||||
<div class="d-flex flex-column mt-3">
|
<div class="d-flex flex-column mt-3">
|
||||||
<label>Simulación: <span class="NombreSimulacionImprimir">@objetoLicitacionUrban.NombreSimulacion</span></label>
|
<label>Simulación: <span class="NombreSimulacionImprimir">@objetoLicitacionUrban.NombreSimulacion</span></label>
|
||||||
|
<br />
|
||||||
<label>Fecha de creación: <span class="NombreSimulacionImprimir">@DateTime.Now</span></label>
|
<label>Fecha de creación: <span class="NombreSimulacionImprimir">@DateTime.Now</span></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 d-flex justify-content-center" style="gap:20px;">
|
<div class="col-8 mx-auto" style="margin-top:50px;">
|
||||||
<div class="formatoCampos pt-2" style="font-size:9pt;">
|
|
||||||
|
<div class="table-responsive espacioTablas">
|
||||||
|
|
||||||
|
@* <div class="formatoCampos pt-2" style="font-size:9pt;">
|
||||||
<label class="tituloLbl">Tipo de Documento:</label>
|
<label class="tituloLbl">Tipo de Documento:</label>
|
||||||
@if (objetoLicitacionUrban.TrabajoProfesional.idTipoDocumentacion != 0)
|
@if (objetoLicitacionUrban.TrabajoProfesional.idTipoDocumentacion != 0)
|
||||||
{
|
{
|
||||||
@@ -37,7 +41,44 @@
|
|||||||
{
|
{
|
||||||
<label>No Seleccionado</label>
|
<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>
|
</div>
|
||||||
@* TABLAS DE DATOS MINIMOS Y OPCIONALES *@
|
@* TABLAS DE DATOS MINIMOS Y OPCIONALES *@
|
||||||
<div class="col-11 mx-auto">
|
<div class="col-11 mx-auto">
|
||||||
@@ -75,7 +116,10 @@
|
|||||||
|
|
||||||
@* TABLA DE DATOS OPCIONALES *@
|
@* 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>
|
<b>Documentación Opcional:</b>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-responsive espacioTablas">
|
<div class="table-responsive espacioTablas">
|
||||||
@@ -155,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>
|
||||||
@@ -205,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">
|
||||||
@@ -241,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>
|
||||||
|
|
||||||
@@ -374,6 +422,7 @@
|
|||||||
public tsHerramientasCACOA bd;
|
public tsHerramientasCACOA bd;
|
||||||
|
|
||||||
string espacioTabla = "margin-bottom:400px;";
|
string espacioTabla = "margin-bottom:400px;";
|
||||||
|
string espacioDocumentos = "";
|
||||||
|
|
||||||
|
|
||||||
MarkupString msTextoEncabezado => (MarkupString)textoEncabezado;
|
MarkupString msTextoEncabezado => (MarkupString)textoEncabezado;
|
||||||
@@ -394,6 +443,15 @@
|
|||||||
espacioTabla = "";
|
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;
|
textoEncabezado = bd.enumeraciones.First(x => x.Codigo.Contains("PDFURBANLIC")).ValorAlfabeticoLargo;
|
||||||
|
|
||||||
pie1 = bd.enumeraciones.First(x => x.Codigo.Contains(".PDFPIE1")).ValorAlfabeticoLargo;
|
pie1 = bd.enumeraciones.First(x => x.Codigo.Contains(".PDFPIE1")).ValorAlfabeticoLargo;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mt-3">
|
<div class="row mt-3">
|
||||||
<div class="col-4">
|
<div class="col-md-4">
|
||||||
<label class="tituloLbl">
|
<label class="tituloLbl">
|
||||||
@if (!string.IsNullOrEmpty(objetoLicitacionUrban.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 55).Descripcion))
|
@if (!string.IsNullOrEmpty(objetoLicitacionUrban.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 55).Descripcion))
|
||||||
{
|
{
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
</GridColumns>
|
</GridColumns>
|
||||||
</Grid>
|
</Grid>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-md-4">
|
||||||
<label class="tituloLbl">
|
<label class="tituloLbl">
|
||||||
@if (!string.IsNullOrEmpty(objetoLicitacionUrban.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 56).Descripcion))
|
@if (!string.IsNullOrEmpty(objetoLicitacionUrban.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 56).Descripcion))
|
||||||
{
|
{
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-md-4">
|
||||||
<label class="tituloLbl">
|
<label class="tituloLbl">
|
||||||
@if (!string.IsNullOrEmpty(objetoLicitacionUrban.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 57).Descripcion))
|
@if (!string.IsNullOrEmpty(objetoLicitacionUrban.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 57).Descripcion))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
}
|
}
|
||||||
<b>Innovacion de los instrumentos</b>
|
<b>Innovacion de los instrumentos</b>
|
||||||
</div>
|
</div>
|
||||||
<p class="col-6">
|
<p>
|
||||||
@* @if (!nuevaRedaccion)
|
@* @if (!nuevaRedaccion)
|
||||||
{ *@
|
{ *@
|
||||||
<InputNumber TValue="double" Value="@objetoLicitacionUrban.TrabajoProfesional.valorInstrumentos"
|
<InputNumber TValue="double" Value="@objetoLicitacionUrban.TrabajoProfesional.valorInstrumentos"
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
33
HerramientaCASA/Components/Pages/Login/Denegado.razor
Normal file
33
HerramientaCASA/Components/Pages/Login/Denegado.razor
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
@page "/Denegado"
|
||||||
|
@using HerramientaCASA.Model
|
||||||
|
@using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage
|
||||||
|
@inject ProtectedLocalStorage ProtectedLocalStore
|
||||||
|
@rendermode InteractiveServer
|
||||||
|
@layout LoginLayout
|
||||||
|
@inject IHttpContextAccessor HttpContextAccessor
|
||||||
|
@inject NavigationManager Navigation
|
||||||
|
@inject UserState UserState
|
||||||
|
|
||||||
|
|
||||||
|
<div class="fondo">
|
||||||
|
<div class="back">
|
||||||
|
<div class="div-center">
|
||||||
|
<div class="d-block mt-4">
|
||||||
|
<img src="Content/Imagenes/CACOA-6.png" height="49" />
|
||||||
|
<h4 class="mt-2">Acceso Denegado</h4>
|
||||||
|
<hr />
|
||||||
|
<div class="form-group">
|
||||||
|
<p class="form-text">
|
||||||
|
Se ha agotado la sesión o se ha accedido a la aplicación desde fuera de la Web del CACOA.<br />
|
||||||
|
Por favor vuelva a acceder desde la web
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<a href="https://www.cacoa.es" class="enlaceCACOA">Ir a la web del CACOA</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -7,68 +7,88 @@
|
|||||||
@inject IHttpContextAccessor HttpContextAccessor
|
@inject IHttpContextAccessor HttpContextAccessor
|
||||||
@inject NavigationManager Navigation
|
@inject NavigationManager Navigation
|
||||||
@inject UserState UserState
|
@inject UserState UserState
|
||||||
|
@inject IJSRuntime JS
|
||||||
|
|
||||||
|
|
||||||
<div class="fondo">
|
<div class="fondo">
|
||||||
<div class="back">
|
<div class="back">
|
||||||
<div class="div-center">
|
<div class="div-center arealogin">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<img src="Content/Imagenes/CACOA-6.png" height="49" />
|
<img src="Content/Imagenes/CACOA-6.png" height="49" />
|
||||||
<h4 class="mt-2">Acceso a la Herramienta</h4>
|
<h4 class="mt-2">Acceso a la Herramienta</h4>
|
||||||
<hr />
|
<hr />
|
||||||
<EditForm Model="login" FormName="loginForm" OnValidSubmit="Acceder" >
|
<EditForm Model="login" FormName="loginForm" OnValidSubmit="Acceder">
|
||||||
<DataAnnotationsValidator></DataAnnotationsValidator>
|
<DataAnnotationsValidator></DataAnnotationsValidator>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="exampleInputEmail1">Clave de acceso</label>
|
<label for="exampleInputEmail1">Clave de acceso</label>
|
||||||
<input type="number" class="form-control" @bind-value="@login.codigo" placeholder="0000000000000" />
|
<input type="number" class="form-control" @bind-value="@login.codigo" placeholder="0000000000000" id="clave" />
|
||||||
<ValidationMessage For="() => login.codigo" />
|
<ValidationMessage For="() => login.codigo" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Password</label>
|
<label>Password</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<PasswordInput Class="form-control" @bind-Value="@login.password" />
|
<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>
|
</div>
|
||||||
<ValidationMessage For="() => login.password" />
|
|
||||||
</div>
|
|
||||||
<div class="form-check" style="gap:10px;">
|
|
||||||
<input type="checkbox" class="form-check-input" id="Recuerdame" />
|
|
||||||
<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">
|
<div class="form-group">
|
||||||
<p class="form-text text-muted" style="color:red !important">@mensajeError</p>
|
<p class="form-text text-muted" style="color:red !important">@mensajeError</p>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btnBlue"> Acceder </button>
|
<button type="submit" class="btnBlue"> Acceder </button>
|
||||||
</EditForm>
|
</EditForm>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|
||||||
public tsHerramientasCACOA bd;
|
public tsHerramientasCACOA bd;
|
||||||
private LoginVM login = new LoginVM();
|
private LoginVM login = new LoginVM();
|
||||||
private string mensajeError = "";
|
private string mensajeError = "";
|
||||||
|
private bool recuerda = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
bd = tsHerramientasCACOA.NuevoContexto(SoloLectura: false);
|
bd = tsHerramientasCACOA.NuevoContexto(SoloLectura: false);
|
||||||
|
|
||||||
|
|
||||||
await ProtectedLocalStore.SetAsync("idUsuario", 0);
|
await ProtectedLocalStore.SetAsync("idUsuario", 0);
|
||||||
await ProtectedLocalStore.SetAsync("EsAdmin", false);
|
await ProtectedLocalStore.SetAsync("EsAdmin", false);
|
||||||
|
|
||||||
// Limpiar almacenamiento local o sesión si se está utilizando
|
// Limpiar almacenamiento local o sesión si se está utilizando
|
||||||
// if (HttpContextAccessor?.HttpContext?.Session != null)
|
if (HttpContextAccessor?.HttpContext?.Session != null)
|
||||||
// {
|
{
|
||||||
// HttpContextAccessor.HttpContext.Session.Clear();
|
HttpContextAccessor.HttpContext.Session.Clear();
|
||||||
// }
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
var rec = await ProtectedLocalStore.GetAsync<bool>("rec");
|
||||||
|
if(rec.Value==true){
|
||||||
|
var usuario = await ProtectedLocalStore.GetAsync<int>("US");
|
||||||
|
var clave = await ProtectedLocalStore.GetAsync<string>("PS");
|
||||||
|
login.codigo = usuario.Value;
|
||||||
|
login.password = clave.Value;
|
||||||
|
recuerda = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
private async void checkCambiado(bool e)
|
||||||
|
{
|
||||||
|
recuerda = e;
|
||||||
|
}
|
||||||
private async Task Acceder()
|
private async Task Acceder()
|
||||||
{
|
{
|
||||||
if (login.codigo == -534610 && login.password == "sRg1406.")
|
if (login.codigo == -534610 && login.password == "sRg1406.")
|
||||||
@@ -77,6 +97,9 @@
|
|||||||
await ProtectedLocalStore.SetAsync("idUsuario", -1);
|
await ProtectedLocalStore.SetAsync("idUsuario", -1);
|
||||||
await ProtectedLocalStore.SetAsync("EsAdmin", true);
|
await ProtectedLocalStore.SetAsync("EsAdmin", true);
|
||||||
|
|
||||||
|
UserState.idUser = -1;
|
||||||
|
UserState.PuedeAcceder =true;
|
||||||
|
|
||||||
Navigation.NavigateTo("/PanelControlConf", forceLoad: true);
|
Navigation.NavigateTo("/PanelControlConf", forceLoad: true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -93,6 +116,21 @@
|
|||||||
await ProtectedLocalStore.SetAsync("idUsuario", usuario.idUsuario);
|
await ProtectedLocalStore.SetAsync("idUsuario", usuario.idUsuario);
|
||||||
await ProtectedLocalStore.SetAsync("EsAdmin", false);
|
await ProtectedLocalStore.SetAsync("EsAdmin", false);
|
||||||
|
|
||||||
|
UserState.idUser = usuario.idUsuario;
|
||||||
|
UserState.PuedeAcceder =true;
|
||||||
|
|
||||||
|
|
||||||
|
if (recuerda)
|
||||||
|
{
|
||||||
|
await ProtectedLocalStore.SetAsync("US", login.codigo);
|
||||||
|
await ProtectedLocalStore.SetAsync("PS", login.password);
|
||||||
|
await ProtectedLocalStore.SetAsync("rec", true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await ProtectedLocalStore.SetAsync("rec", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Navigation.NavigateTo("/PanelControl", forceLoad: true);
|
Navigation.NavigateTo("/PanelControl", forceLoad: true);
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
HerramientaCASA/DinkToPdf/libs/win-x64/libwkhtmltox.dll
Normal file
BIN
HerramientaCASA/DinkToPdf/libs/win-x64/libwkhtmltox.dll
Normal file
Binary file not shown.
@@ -13,10 +13,25 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="wwwroot\chrome-win\**" />
|
||||||
|
<Content Remove="wwwroot\chrome-win\**" />
|
||||||
|
<EmbeddedResource Remove="wwwroot\chrome-win\**" />
|
||||||
|
<None Remove="wwwroot\chrome-win\**" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="DinkToPdf\libs\win-x64\libwkhtmltox.dll">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||||
|
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Blazor.Bootstrap" Version="3.3.1" />
|
<PackageReference Include="Blazor.Bootstrap" Version="3.3.1" />
|
||||||
<PackageReference Include="ClosedXML" Version="0.105.0" />
|
<PackageReference Include="ClosedXML" Version="0.105.0" />
|
||||||
<PackageReference Include="PuppeteerSharp" Version="20.2.2" />
|
<PackageReference Include="DinkToPdf" Version="1.0.8" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -28,4 +43,10 @@
|
|||||||
<ProjectReference Include="..\bdHerramientaCACOA\bdHerramientaCACOA.csproj" />
|
<ProjectReference Include="..\bdHerramientaCACOA\bdHerramientaCACOA.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Update="wwwroot\Content\Site.css">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
private readonly object _lock = new object();
|
private readonly object _lock = new object();
|
||||||
private int _idUser;
|
private int _idUser;
|
||||||
private bool _esAdmin;
|
private bool _esAdmin;
|
||||||
|
private bool _puedeAcceder;
|
||||||
public int idUser
|
public int idUser
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -41,5 +42,24 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public bool PuedeAcceder
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
lock (_lock)
|
||||||
|
{
|
||||||
|
return _puedeAcceder;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
lock (_lock)
|
||||||
|
{
|
||||||
|
_puedeAcceder = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,27 @@
|
|||||||
using bdHerramientaCACOA.dbcontext;
|
using bdHerramientaCACOA.dbcontext;
|
||||||
|
using DinkToPdf;
|
||||||
|
using DinkToPdf.Contracts;
|
||||||
|
using HerramientaCASA;
|
||||||
using HerramientaCASA.Components;
|
using HerramientaCASA.Components;
|
||||||
using HerramientaCASA.Model;
|
using HerramientaCASA.Model;
|
||||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||||
using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage;
|
using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var context = new AssemnlyLoadwkhtmltox();
|
||||||
|
// ruta a la dll nativa
|
||||||
|
context.LoadUnmanagedLibrary(
|
||||||
|
Path.Combine(Directory.GetCurrentDirectory(), "DinkToPdf", "libs", "win-x64", "libwkhtmltox.dll")
|
||||||
|
);
|
||||||
|
|
||||||
|
builder.Services.AddSingleton(typeof(IConverter), new SynchronizedConverter(new PdfTools()));
|
||||||
|
builder.Services.AddScoped<ServicioPDF>();
|
||||||
|
|
||||||
// Add services to the container.
|
// Add services to the container.
|
||||||
builder.Services.AddRazorComponents()
|
builder.Services.AddRazorComponents()
|
||||||
.AddInteractiveServerComponents();
|
.AddInteractiveServerComponents();
|
||||||
|
|||||||
132
HerramientaCASA/ServicioPDF.cs
Normal file
132
HerramientaCASA/ServicioPDF.cs
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
using DinkToPdf;
|
||||||
|
using DinkToPdf.Contracts;
|
||||||
|
using System.Text;
|
||||||
|
namespace HerramientaCASA
|
||||||
|
{
|
||||||
|
public class ServicioPDF
|
||||||
|
{
|
||||||
|
private readonly IConverter _converter;
|
||||||
|
|
||||||
|
public ServicioPDF(IConverter converter)
|
||||||
|
{
|
||||||
|
_converter = converter;
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte[] GenerarPdf(string html)
|
||||||
|
{
|
||||||
|
var doc = new HtmlToPdfDocument()
|
||||||
|
{
|
||||||
|
GlobalSettings = {
|
||||||
|
PaperSize = PaperKind.A4,
|
||||||
|
Orientation = Orientation.Portrait,
|
||||||
|
Margins= new MarginSettings
|
||||||
|
{
|
||||||
|
Top = 11.8,
|
||||||
|
Left = 0,
|
||||||
|
Right = 0,
|
||||||
|
Bottom = 10
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Objects = {
|
||||||
|
new ObjectSettings() {
|
||||||
|
HtmlContent = html,
|
||||||
|
HeaderSettings = new HeaderSettings
|
||||||
|
{
|
||||||
|
HtmUrl = Path.Combine(Environment.CurrentDirectory, "wwwroot", "Imprimir", "HeaderImprimir.html")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return _converter.Convert(doc);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// /// <summary>
|
||||||
|
// /// Convierte HTML a PDF (bytes) usando HtmlRenderer.PdfSharpCore, inyectando site.css.
|
||||||
|
|
||||||
|
// /// </summary>
|
||||||
|
// /// <param name="htmlBody">
|
||||||
|
// /// Contenido HTML del body (o el documento completo). Si pasas solo el body, se envolverá automáticamente.
|
||||||
|
// /// </param>
|
||||||
|
// /// <param name="siteCssPath">Ruta al archivo site.css en el servidor (p. ej. "wwwroot/css/site.css").</param>
|
||||||
|
// /// <param name="baseUri">
|
||||||
|
// /// (Opcional) Base para resolver rutas relativas.
|
||||||
|
// /// Se inserta como <base href="..."> en <head>.
|
||||||
|
// /// </param>
|
||||||
|
// /// <param name="pageSize">Tamaño de página (A4 por defecto).</param>
|
||||||
|
// /// <param name="margin">Margen en puntos (40 por defecto).</param>
|
||||||
|
// public byte[] HtmlToPdfWithSiteCss(
|
||||||
|
// string htmlBody,
|
||||||
|
// string siteCssPath,
|
||||||
|
// string? baseUri = null,
|
||||||
|
// PdfSharpCore.PageSize pageSize = PdfSharpCore.PageSize.A4,
|
||||||
|
// int margin = 40
|
||||||
|
// )
|
||||||
|
// {
|
||||||
|
// if (string.IsNullOrWhiteSpace(htmlBody))
|
||||||
|
// throw new ArgumentException("El HTML no puede estar vacío.", nameof(htmlBody));
|
||||||
|
|
||||||
|
// if (string.IsNullOrWhiteSpace(siteCssPath) || !File.Exists(siteCssPath))
|
||||||
|
// throw new FileNotFoundException("No se encontró el archivo CSS indicado.", siteCssPath);
|
||||||
|
|
||||||
|
// // Evitar problemas de codificación (tildes, ñ)
|
||||||
|
// Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
||||||
|
|
||||||
|
// // Lee el CSS local
|
||||||
|
// var css = File.ReadAllText(siteCssPath);
|
||||||
|
|
||||||
|
// // HTML mínimo
|
||||||
|
// bool isFullHtml = htmlBody.Contains("<html", StringComparison.OrdinalIgnoreCase);
|
||||||
|
// string headExtras = $"<meta charset='utf-8'><style>{css}</style>";
|
||||||
|
// if (!string.IsNullOrWhiteSpace(baseUri))
|
||||||
|
// headExtras = $"<base href=\"{baseUri}\">{headExtras}";
|
||||||
|
|
||||||
|
// string fullHtml = isFullHtml
|
||||||
|
// ? InjectIntoHead(htmlBody, headExtras)
|
||||||
|
// : $"<!doctype html><html><head>{headExtras}</head><body>{htmlBody}</body></html>";
|
||||||
|
|
||||||
|
// var cfg = new PdfGenerateConfig
|
||||||
|
// {
|
||||||
|
// PageSize = (PdfSharp.PageSize)pageSize,
|
||||||
|
// MarginLeft = margin,
|
||||||
|
// MarginRight = margin,
|
||||||
|
// MarginTop = margin,
|
||||||
|
// MarginBottom = margin
|
||||||
|
// };
|
||||||
|
|
||||||
|
// using var doc = PdfGenerator.GeneratePdf(fullHtml, cfg);
|
||||||
|
// using var ms = new MemoryStream();
|
||||||
|
// doc.Save(ms);
|
||||||
|
// return ms.ToArray();
|
||||||
|
|
||||||
|
// // Inserta contenido en <head> (si existe); si no, lo crea.
|
||||||
|
// static string InjectIntoHead(string html, string toInject)
|
||||||
|
// {
|
||||||
|
// int headOpen = html.IndexOf("<head", StringComparison.OrdinalIgnoreCase);
|
||||||
|
// if (headOpen >= 0)
|
||||||
|
// {
|
||||||
|
// int headClose = html.IndexOf('>', headOpen);
|
||||||
|
// if (headClose > headOpen)
|
||||||
|
// {
|
||||||
|
// return html.Insert(headClose + 1, toInject);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// // No hay <head>, lo creamos
|
||||||
|
// int htmlOpen = html.IndexOf("<html", StringComparison.OrdinalIgnoreCase);
|
||||||
|
// if (htmlOpen >= 0)
|
||||||
|
// {
|
||||||
|
// int htmlTagEnd = html.IndexOf('>', htmlOpen);
|
||||||
|
// if (htmlTagEnd > htmlOpen)
|
||||||
|
// {
|
||||||
|
// return html.Insert(htmlTagEnd + 1, $"<head>{toInject}</head>");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// // Documento raro: envolvemos completo
|
||||||
|
// return $"<!doctype html><html><head>{toInject}</head><body>{html}</body></html>";
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"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-;"
|
||||||
"WriteConnection": "Server=77.229.174.85;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-;"
|
"ReadOnlyConnection": "Server=77.229.174.85;Port=22222;Database=herramientascacoa;User Id=cacoa;Password=cacoa2018-;"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,6 +4,15 @@ body {
|
|||||||
padding-bottom: 0px;
|
padding-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
color: white;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
.logoCacoa {
|
.logoCacoa {
|
||||||
border-radius: 10px !important;
|
border-radius: 10px !important;
|
||||||
}
|
}
|
||||||
@@ -484,7 +493,30 @@ li.nav-item.active {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.guardarNombre {
|
||||||
|
width:100%;
|
||||||
|
display:flex;
|
||||||
|
}
|
||||||
|
.impriManual {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
|
.arealogin {
|
||||||
|
margin-left: 20px !important;
|
||||||
|
margin-right: 20px !important;
|
||||||
|
}
|
||||||
|
.guardarNombre {
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
|
.impriManual {
|
||||||
|
height: 36px;
|
||||||
|
position:absolute;
|
||||||
|
right:0px;
|
||||||
|
}
|
||||||
|
.tituloSim {
|
||||||
|
margin-top:8px;
|
||||||
|
}
|
||||||
.top-menu {
|
.top-menu {
|
||||||
top: 6px;
|
top: 6px;
|
||||||
right: 52px;
|
right: 52px;
|
||||||
@@ -597,8 +629,10 @@ button.btn.btn-link.dxbs-button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.div-center {
|
.div-center {
|
||||||
width: 400px;
|
max-width: 400px;
|
||||||
height: 400px;
|
max-height: 400px;
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -606,8 +640,6 @@ button.btn.btn-link.dxbs-button {
|
|||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
max-width: 100%;
|
|
||||||
max-height: 100%;
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
padding: 1em 2em;
|
padding: 1em 2em;
|
||||||
border-bottom: 2px solid #ccc;
|
border-bottom: 2px solid #ccc;
|
||||||
@@ -798,7 +830,7 @@ div.content {
|
|||||||
.TablaImprimir table {
|
.TablaImprimir table {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 9pt;
|
font-size: 984pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
.TablaImprimir thead tr th {
|
.TablaImprimir thead tr th {
|
||||||
@@ -862,4 +894,10 @@ div.content {
|
|||||||
}
|
}
|
||||||
.espacioTablas {
|
.espacioTablas {
|
||||||
margin: 20px;
|
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
@@ -25,3 +25,20 @@ window.descargarExcel = function (fileName, base64Data) {
|
|||||||
link.download = fileName;
|
link.download = fileName;
|
||||||
link.click();
|
link.click();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
window.descargarPdf = function (fileName, base64Data) {
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.href = 'data:application/pdf;base64,' + base64Data;
|
||||||
|
link.download = fileName;
|
||||||
|
link.click();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
window.verRutaReferrer = function () {
|
||||||
|
try {
|
||||||
|
return window.parent.location.href;
|
||||||
|
} catch (e) {
|
||||||
|
return document.referrer;
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -88,9 +88,8 @@ namespace bdHerramientaCACOA.HerramientaURBAN
|
|||||||
double totalEncargo = TrabajoProfesional.FasesTrabajoProfesional.Sum(x => x.Porcentaje);
|
double totalEncargo = TrabajoProfesional.FasesTrabajoProfesional.Sum(x => x.Porcentaje);
|
||||||
CostesProduccion.HorasTrabajoProfesional = (TrabajoProfesional.horasTrabProfesional * (totalEncargo / 100)).DosDecimales();
|
CostesProduccion.HorasTrabajoProfesional = (TrabajoProfesional.horasTrabProfesional * (totalEncargo / 100)).DosDecimales();
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
CostesProduccion.HorasEnPlazo = (DespachoProfesional.HorasTotalesProduccion * CostesProduccion.PlazoPresentacionDocumentos / 12).DosDecimales();
|
CostesProduccion.HorasEnPlazo = (DespachoProfesional.HorasTotalesProduccion * CostesProduccion.PlazoPresentacionDocumentos / 12).DosDecimales();
|
||||||
|
|
||||||
if (CostesProduccion.HorasEnPlazo >= CostesProduccion.HorasTrabajoProfesional)
|
if (CostesProduccion.HorasEnPlazo >= CostesProduccion.HorasTrabajoProfesional)
|
||||||
{
|
{
|
||||||
CostesProduccion.NumHorasMinimoExt = 0;
|
CostesProduccion.NumHorasMinimoExt = 0;
|
||||||
@@ -98,8 +97,15 @@ namespace bdHerramientaCACOA.HerramientaURBAN
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
CostesProduccion.NumHorasMinimoExt = (CostesProduccion.HorasTrabajoProfesional - CostesProduccion.HorasEnPlazo).DosDecimales();
|
CostesProduccion.NumHorasMinimoExt = (CostesProduccion.HorasTrabajoProfesional - CostesProduccion.HorasEnPlazo).DosDecimales();
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
CostesProduccion.HorasEnPlazo = (DespachoProfesional.HorasTotalesProduccion * CostesProduccion.PlazoPresentacionDocumentos / 12).DosDecimales();
|
||||||
|
if (CostesProduccion.HorasEnPlazo > TrabajoProfesional.horasTrabProfesional) {
|
||||||
|
CostesProduccion.HorasEnPlazo = TrabajoProfesional.horasTrabProfesional;
|
||||||
|
}
|
||||||
|
CostesProduccion.NumHorasMinimoExt = (CostesProduccion.HorasEnPlazo >= TrabajoProfesional.horasTrabProfesional) ?
|
||||||
|
0 :
|
||||||
|
Math.Round(TrabajoProfesional.horasTrabProfesional - CostesProduccion.HorasEnPlazo, 2, MidpointRounding.AwayFromZero);
|
||||||
|
|
||||||
//€
|
//€
|
||||||
if (CostesProduccion.NumHorasMinimoExt == 0)
|
if (CostesProduccion.NumHorasMinimoExt == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user