mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-21 00:00:26 +00:00
trabajando en el wizard del presupuesto
This commit is contained in:
@ -16,4 +16,6 @@ app.logout=Cerrar sesión
|
||||
app.sidebar.inicio=Inicio
|
||||
app.sidebar.presupuestos=Presupuestos
|
||||
app.sidebar.configuracion=Configuración
|
||||
app.sidebar.usuarios=Usuarios
|
||||
app.sidebar.usuarios=Usuarios
|
||||
|
||||
app.errors.403=No tienes permiso para acceder a esta página.
|
||||
@ -1,4 +1,5 @@
|
||||
presupuesto.title=Presupuestos
|
||||
presupuesto.editar.title=Editar presupuesto
|
||||
presupuesto.datos-generales=Datos Generales
|
||||
presupuesto.interior=Interior
|
||||
presupuesto.cubierta=Cubierta
|
||||
@ -287,5 +288,7 @@ presupuesto.errores.papel-cubierta=Seleccione el tipo de papel para la cubierta
|
||||
presupuesto.errores.gramaje-cubierta=Seleccione el gramaje del papel para la cubierta
|
||||
presupuesto.errores.acabado-cubierta=Seleccione el acabado de la cubierta
|
||||
|
||||
presupuesto.errores.presupuesto-no-existe=El presupuesto con ID {0} no existe.
|
||||
|
||||
presupuesto.errores.presupuesto-maquetacion=No se pudo calcular el presupuesto de maquetación.
|
||||
presupuesto.errores.presupuesto-marcapaginas=No se pudo calcular el presupuesto de marcapáginas.
|
||||
@ -1780,15 +1780,15 @@ File: Main Css File
|
||||
}
|
||||
[data-layout=semibox] .main-content {
|
||||
margin-left: calc(250px + 25px);
|
||||
padding: 0 6%;
|
||||
padding: 0 2%;
|
||||
}
|
||||
[data-layout=semibox] .footer {
|
||||
left: calc(250px + 6% + 1.5rem + 25px);
|
||||
right: calc(6% + 1.5rem);
|
||||
left: calc(250px + 2% + 1.5rem + 25px);
|
||||
right: calc(2% + 1.5rem);
|
||||
}
|
||||
[data-layout=semibox] #page-topbar {
|
||||
left: calc(250px + 6% + 1.5rem + 25px);
|
||||
right: calc(6% + 1.5rem);
|
||||
left: calc(250px + 2% + 1.5rem + 25px);
|
||||
right: calc(2% + 1.5rem);
|
||||
top: 25px;
|
||||
border-radius: 0.25rem;
|
||||
-webkit-transition: all 0.5s ease;
|
||||
@ -1801,10 +1801,10 @@ File: Main Css File
|
||||
margin-left: calc(180px + 25px);
|
||||
}
|
||||
[data-layout=semibox][data-sidebar-size=md] #page-topbar {
|
||||
left: calc(180px + 6% + 1.5rem + 25px);
|
||||
left: calc(180px + 2% + 1.5rem + 25px);
|
||||
}
|
||||
[data-layout=semibox][data-sidebar-size=md] .footer {
|
||||
left: calc(180px + 6% + 1.5rem + 25px);
|
||||
left: calc(180px + 2% + 1.5rem + 25px);
|
||||
}
|
||||
[data-layout=semibox][data-sidebar-size=sm] .main-content {
|
||||
margin-left: calc(70px + 25px);
|
||||
@ -1813,19 +1813,19 @@ File: Main Css File
|
||||
top: 25px;
|
||||
}
|
||||
[data-layout=semibox][data-sidebar-size=sm] #page-topbar {
|
||||
left: calc(70px + 6% + 1.5rem + 25px);
|
||||
left: calc(70px + 2% + 1.5rem + 25px);
|
||||
}
|
||||
[data-layout=semibox][data-sidebar-size=sm] .footer {
|
||||
left: calc(70px + 6% + 1.5rem + 25px);
|
||||
left: calc(70px + 2% + 1.5rem + 25px);
|
||||
}
|
||||
[data-layout=semibox][data-sidebar-size=sm-hover] .main-content {
|
||||
margin-left: calc(70px + 25px);
|
||||
}
|
||||
[data-layout=semibox][data-sidebar-size=sm-hover] #page-topbar {
|
||||
left: calc(70px + 6% + 1.5rem + 25px);
|
||||
left: calc(70px + 2% + 1.5rem + 25px);
|
||||
}
|
||||
[data-layout=semibox][data-sidebar-size=sm-hover] .footer {
|
||||
left: calc(70px + 6% + 1.5rem + 25px);
|
||||
left: calc(70px + 2% + 1.5rem + 25px);
|
||||
}
|
||||
}
|
||||
[data-layout=semibox] .mx-n4 {
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
if (!lang || lang === getCurrentLang()) return;
|
||||
|
||||
// Guarda la preferencia (opcional)
|
||||
try { localStorage.setItem("language", lang); } catch {}
|
||||
try { localStorage.setItem("language", lang); } catch { }
|
||||
|
||||
// Redirige con ?lang=... para que Spring cambie el Locale y renderice en ese idioma
|
||||
const url = new URL(location.href);
|
||||
@ -48,6 +48,22 @@
|
||||
url.searchParams.set("lang", saved);
|
||||
location.replace(url); // alinea y no deja historial extra
|
||||
}
|
||||
|
||||
initsAlert();
|
||||
}
|
||||
|
||||
function initsAlert() {
|
||||
var alerts = document.querySelectorAll('.alert.alert-dismissible');
|
||||
alerts.forEach(function (el) {
|
||||
// Solo si está visible
|
||||
if (el.classList.contains('show')) {
|
||||
setTimeout(function () {
|
||||
// Usa la API de Bootstrap para cerrar con transición
|
||||
var bsAlert = bootstrap.Alert.getOrCreateInstance(el);
|
||||
bsAlert.close();
|
||||
}, 5000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", initLanguage);
|
||||
|
||||
@ -66,6 +66,13 @@
|
||||
],
|
||||
});
|
||||
|
||||
$('#presupuestos-anonimos-datatable').on('click', '.btn-edit-anonimo', function (e) {
|
||||
e.preventDefault();
|
||||
const id = $(this).data('id');
|
||||
if (id) {
|
||||
window.location.href = '/presupuesto/view/' + id;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
})();
|
||||
|
||||
@ -0,0 +1,56 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{imprimelibros/layout}">
|
||||
|
||||
<head>
|
||||
<th:block layout:fragment="pagetitle" />
|
||||
<th:block th:replace="~{imprimelibros/partials/head-css :: head-css}" />
|
||||
<th:block layout:fragment="pagecss">
|
||||
<link th:href="@{/assets/libs/datatables/dataTables.bootstrap5.min.css}" rel="stylesheet" />
|
||||
</th:block>
|
||||
<th:block layout:fragment="pagecss">
|
||||
<link th:href="@{/assets/css/presupuestador.css}" rel="stylesheet" />
|
||||
</th:block>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div th:replace="~{imprimelibros/partials/topbar :: topbar}" />
|
||||
<div th:replace="~{imprimelibros/partials/sidebar :: sidebar}"
|
||||
th:unless="${#authorization.expression('isAuthenticated()') and (#authorization.expression('hasRole('SUPERADMIN', 'ADMIN')'))}" />
|
||||
|
||||
<th:block layout:fragment="content">
|
||||
<div th:if="${#authorization.expression('isAuthenticated()')}">
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="/"><i class="ri-home-5-fill"></i></a></li>
|
||||
<li class="breadcrumb-item"><a href="/presupuesto" th:text="#{presupuesto.title}"></a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page" th:text="#{presupuesto.editar.title}">
|
||||
Editar presupuesto
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div th:insert="~{imprimelibros/presupuestos/presupuestador :: presupuestador}"></div>
|
||||
</div>
|
||||
</div>
|
||||
</th:block>
|
||||
|
||||
<th:block th:replace="~{theme/partials/vendor-scripts :: scripts}" />
|
||||
<th:block layout:fragment="pagejs">
|
||||
<script th:inline="javascript">
|
||||
window.languageBundle = /*[[${languageBundle}]]*/ {};
|
||||
</script>
|
||||
|
||||
<!-- JS de Buttons y dependencias -->
|
||||
<script type="module" th:src="@{/assets/js/pages/imprimelibros/presupuestador/presupuestador.js}"></script>
|
||||
</th:block>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -21,16 +21,24 @@
|
||||
<div th:if="${#authorization.expression('isAuthenticated()')}">
|
||||
|
||||
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="/"><i class="ri-home-5-fill"></i></a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page" th:text="#{presupuesto.title}">Presupuestos
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
<div class="container-fluid">
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="/"><i class="ri-home-5-fill"></i></a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page" th:text="#{presupuesto.title}">
|
||||
Presupuestos
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div th:if="${errorMessage}" class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
<span th:text="${errorMessage}"></span>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn btn-secondary mb-3" id="addPresupuestoButton">
|
||||
<i class="ri-add-line align-bottom me-1"></i> <span th:text="#{presupuesto.add}">Añadir
|
||||
presupuesto</span>
|
||||
@ -68,7 +76,7 @@
|
||||
<div
|
||||
th:insert="~{imprimelibros/presupuestos/presupuesto-list-items/tabla-anonimos :: tabla-anonimos}">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user