direcciones terminadas

This commit is contained in:
2025-10-26 15:44:54 +01:00
parent 8e011e7fca
commit 8590235709
7 changed files with 643 additions and 43 deletions

View File

@ -18,7 +18,7 @@
<div class="invalid-feedback" th:if="${#fields.hasErrors('user.id')}" th:errors="*{user.id}"></div>
</div>
<input sec:authorize="hasAnyRole('USER')" type="hidden" th:field="*{user.id}" th:value="*{user.id}" />
<input sec:authorize="hasAnyRole('USER')" type="hidden" th:field="*{user.id}" />
<div class="form-group mt-2">
<label for="alias">

View File

@ -0,0 +1,116 @@
<!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/css/presupuestador.css}" rel="stylesheet"
th:unless="${#authorization.expression('isAuthenticated()')}" />
<link th:href="@{/assets/libs/datatables/dataTables.bootstrap5.min.css}" rel="stylesheet" />
</th:block>
</head>
<body>
<div th:replace="~{imprimelibros/partials/topbar :: topbar}" />
<div th:replace="~{imprimelibros/partials/sidebar :: sidebar}" />
<th:block layout:fragment="content">
<div th:if="${#authorization.expression('isAuthenticated()')}">
<!-- Modales-->
<div
th:replace="imprimelibros/partials/modal-form :: modal('direccionFormModal', 'direcciones.add', 'modal-md', 'direccionFormModalBody')">
</div>
<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="#{direcciones.breadcrumb}">
Direcciones</li>
</ol>
</nav>
<div class="container-fluid">
<input type="hidden" id="isUser" th:value="${isUser}" />
<div class="d-flex">
<button type="button" class="btn btn-secondary mb-3" id="addButton">
<i class="ri-add-line align-bottom me-1"></i> <span th:text="#{direcciones.add}">Añadir</span>
</button>
</div>
<div class="d-flex mb-2 ms-0 ps-0">
<input type="text" id="buscadorDirecciones" class="form-control ms-0"
th:placeholder="#{direcciones.buscar-placeholder}"
style="width:auto; display:inline-block; margin-left:10px;" />
</div>
<div class="d-flex">
<label class="form-label mt-2 me-2" for="pageSize" th:text="#{direcciones.registros-pagina}">Registros
por página</label>
<select id="pageSize" class="form-select" style="width:auto">
<option value="10" selected>10</option>
<option value="20">20</option>
<option value="50">50</option>
</select>
</div>
<div id="direccionesContainer" class="row g-3 my-3"></div>
<!-- Tabla sombra para DataTables (oculta) -->
<table id="dtDirecciones" class="d-none" style="width:100%">
<thead>
<tr>
<th>alias</th>
<th>att</th>
<th>direccion</th>
<th>cp</th>
<th>ciudad</th>
<th>provincia</th>
<th>pais</th>
<th>telefono</th>
<th>is_facturacion</th>
<th>razon_social</th>
<th>tipo_identificacion_fiscal</th>
<th>identificacion_fiscal</th>
<th>id</th>
</tr>
</thead>
</table>
</div>
</div>
</th:block>
<th:block layout:fragment="modal" />
<th:block th:replace="~{theme/partials/vendor-scripts :: scripts}" />
<th:block layout:fragment="pagejs">
<script th:inline="javascript">
window.languageBundle = /*[[${languageBundle}]]*/ {};
</script>
<script th:src="@{/assets/libs/datatables/datatables.min.js}"></script>
<script th:src="@{/assets/libs/datatables/dataTables.bootstrap5.min.js}"></script>
<!-- JS de Buttons y dependencias -->
<script th:src="@{/assets/libs/datatables/dataTables.buttons.min.js}"></script>
<script th:src="@{/assets/libs/jszip/jszip.min.js}"></script>
<script th:src="@{/assets/libs/pdfmake/pdfmake.min.js}"></script>
<script th:src="@{/assets/libs/pdfmake/vfs_fonts.min.js}"></script>
<script th:src="@{/assets/libs/datatables/buttons.html5.min.js}"></script>
<script th:src="@{/assets/libs/datatables/buttons.print.min.js}"></script>
<script th:src="@{/assets/libs/datatables/buttons.colVis.min.js}"></script>
<script th:if="${isUser==0}" type="module"
th:src="@{/assets/js/pages/imprimelibros/direcciones/list.js}"></script>
<script th:if="${isUser==1}" type="module"
th:src="@{/assets/js/pages/imprimelibros/direcciones/listc.js}"></script>
</th:block>
</body>
</html>