From 702c097c32c1f71d9976e31e1fa6ff53d81562fb Mon Sep 17 00:00:00 2001 From: Perea Date: Tue, 30 Sep 2025 10:00:01 +0200 Subject: [PATCH] adasd --- .../Components/Layout/LoginLayout.razor | 35 ++++++++++- .../Components/Pages/HerramientaCASAS.razor | 2 +- .../Components/Pages/HerramientaURBAN.razor | 2 +- .../Imprimir/HerramientaCASAImprimir.razor | 2 +- .../Imprimir/LicitacionesURBANImprimir.razor | 62 +++++++++++++++++-- .../Components/Pages/Licitaciones.razor | 2 +- .../Components/Pages/Login/Denegado.razor | 16 ----- .../Components/Pages/Login/Login.razor | 31 +--------- 8 files changed, 98 insertions(+), 54 deletions(-) diff --git a/HerramientaCASA/Components/Layout/LoginLayout.razor b/HerramientaCASA/Components/Layout/LoginLayout.razor index ed79adf..814aaeb 100644 --- a/HerramientaCASA/Components/Layout/LoginLayout.razor +++ b/HerramientaCASA/Components/Layout/LoginLayout.razor @@ -5,6 +5,7 @@ @inject UserState UserState @inject IHttpContextAccessor HttpContextAccessor @inject NavigationManager Navigation +@inject IJSRuntime JS @@ -38,7 +39,39 @@ @code{ + + + string? urlAnterior = ""; + + bool urlVaida = true; + string rutaActual = ""; + + + protected override async Task OnAfterRenderAsync(bool firstRender) + { + if (firstRender) + { + if (!string.IsNullOrEmpty(urlAnterior)) + { + urlAnterior = await JS.InvokeAsync("eval", "document.referer"); + + rutaActual = Navigation.ToBaseRelativePath(Navigation.Uri); + + + + if (rutaActual != "Denegado") + { + if (!string.IsNullOrEmpty(urlAnterior) && urlAnterior.Contains("cacoa.es")) + { + Navigation.NavigateTo("/Denegado", true); + } + } + + } + StateHasChanged(); + } + } - } +} diff --git a/HerramientaCASA/Components/Pages/HerramientaCASAS.razor b/HerramientaCASA/Components/Pages/HerramientaCASAS.razor index 51e59d2..95a9549 100644 --- a/HerramientaCASA/Components/Pages/HerramientaCASAS.razor +++ b/HerramientaCASA/Components/Pages/HerramientaCASAS.razor @@ -52,7 +52,7 @@
- + @* *@
diff --git a/HerramientaCASA/Components/Pages/HerramientaURBAN.razor b/HerramientaCASA/Components/Pages/HerramientaURBAN.razor index 1fe294f..1c95574 100644 --- a/HerramientaCASA/Components/Pages/HerramientaURBAN.razor +++ b/HerramientaCASA/Components/Pages/HerramientaURBAN.razor @@ -54,7 +54,7 @@
- + @* *@
diff --git a/HerramientaCASA/Components/Pages/Imprimir/HerramientaCASAImprimir.razor b/HerramientaCASA/Components/Pages/Imprimir/HerramientaCASAImprimir.razor index 1e7e3ea..cd7c6be 100644 --- a/HerramientaCASA/Components/Pages/Imprimir/HerramientaCASAImprimir.razor +++ b/HerramientaCASA/Components/Pages/Imprimir/HerramientaCASAImprimir.razor @@ -208,7 +208,7 @@ -
+
@* TABLA COSTES ASOCIADOS A LOS SEVICIOS DE ARQUITECTURA *@
diff --git a/HerramientaCASA/Components/Pages/Imprimir/LicitacionesURBANImprimir.razor b/HerramientaCASA/Components/Pages/Imprimir/LicitacionesURBANImprimir.razor index 6fa7766..eb01e09 100644 --- a/HerramientaCASA/Components/Pages/Imprimir/LicitacionesURBANImprimir.razor +++ b/HerramientaCASA/Components/Pages/Imprimir/LicitacionesURBANImprimir.razor @@ -11,12 +11,16 @@
+
-
-
+
+ +
+ + @*
@if (objetoLicitacionUrban.TrabajoProfesional.idTipoDocumentacion != 0) { @@ -37,7 +41,44 @@ { } -
+
*@ + + + + + + + + + + + + + + + + + +
Tipo de Documento:Documento:
+ @if (objetoLicitacionUrban.TrabajoProfesional.idTipoDocumentacion != 0) + { + + } + else + { + + } + + @if (objetoLicitacionUrban.TrabajoProfesional.idTipoDocumentacion != 0) + { + + } + else + { + + } +
+
@* TABLAS DE DATOS MINIMOS Y OPCIONALES *@
@@ -75,7 +116,10 @@ @* TABLA DE DATOS OPCIONALES *@ -
+
+
+ +
Documentación Opcional:
@@ -374,6 +418,7 @@ public tsHerramientasCACOA bd; string espacioTabla = "margin-bottom:400px;"; + string espacioDocumentos = ""; MarkupString msTextoEncabezado => (MarkupString)textoEncabezado; @@ -394,6 +439,15 @@ espacioTabla = ""; } + if (objetoLicitacionUrban.TrabajoProfesional.idTipoDocumentacion != 0) + { + espacioDocumentos = "margin-top:300px;"; + } + 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; diff --git a/HerramientaCASA/Components/Pages/Licitaciones.razor b/HerramientaCASA/Components/Pages/Licitaciones.razor index 632f8b9..0d42e8b 100644 --- a/HerramientaCASA/Components/Pages/Licitaciones.razor +++ b/HerramientaCASA/Components/Pages/Licitaciones.razor @@ -54,7 +54,7 @@
- + @* *@
diff --git a/HerramientaCASA/Components/Pages/Login/Denegado.razor b/HerramientaCASA/Components/Pages/Login/Denegado.razor index fc12209..fb9997c 100644 --- a/HerramientaCASA/Components/Pages/Login/Denegado.razor +++ b/HerramientaCASA/Components/Pages/Login/Denegado.razor @@ -23,11 +23,6 @@

Ir a la web del CACOA - - - - -
@@ -35,15 +30,4 @@ @code { - - string? urlAnterior = ""; - string? rutaActual = ""; - - - - protected override async Task OnInitializedAsync() - { - urlAnterior = HttpContextAccessor.HttpContext?.Request.Headers["Referer"].ToString(); - rutaActual = Navigation.ToBaseRelativePath(Navigation.Uri); - } } diff --git a/HerramientaCASA/Components/Pages/Login/Login.razor b/HerramientaCASA/Components/Pages/Login/Login.razor index adbc88e..c10b27d 100644 --- a/HerramientaCASA/Components/Pages/Login/Login.razor +++ b/HerramientaCASA/Components/Pages/Login/Login.razor @@ -11,8 +11,6 @@
- @if (urlVaida) - {
@@ -51,10 +49,6 @@
- } - - -
@code { @@ -63,35 +57,14 @@ private string mensajeError = ""; private bool recuerda = false; - string? urlAnterior = ""; + - bool urlVaida = true; - - private bool jsCargado = false; - - // protected override async Task OnAfterRenderAsync(bool firstRender) - // { - // if (firstRender && !jsCargado) - // { - // if (string.IsNullOrEmpty(urlAnterior)) - // { - // urlAnterior = await JS.InvokeAsync("eval", "document.referer"); - // } - // // Actualiza la UI - // StateHasChanged(); - // } - // } + protected override async Task OnInitializedAsync() { bd = tsHerramientasCACOA.NuevoContexto(SoloLectura: false); - // if (string.IsNullOrEmpty(urlAnterior)) - // { - // urlAnterior = await JS.InvokeAsync("eval", "document.referer"); - // } - - // StateHasChanged(); await ProtectedLocalStore.SetAsync("idUsuario", 0); await ProtectedLocalStore.SetAsync("EsAdmin", false);