mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-02-08 11:59:13 +00:00
primera versión de pedido realizada
This commit is contained in:
@ -37,10 +37,8 @@
|
||||
</div>
|
||||
|
||||
<div th:if="${successPago}" class="alert alert-success alert-fadeout my-1" role="alert" th:text="${successPago}"></div>
|
||||
|
||||
<div th:if="${items.isEmpty()}">
|
||||
<div id="alert-empty"class="alert alert-info" role="alert" th:text="#{cart.empty}"></div>
|
||||
</div>
|
||||
|
||||
<div id="alert-empty" th:class="'alert alert-info ' + ${items.isEmpty() ? '' : 'd-none'}" role="alert" th:text="#{cart.empty}"></div>
|
||||
|
||||
<div th:insert="~{imprimelibros/cart/_cartContent :: cartContent(${items}, ${cartId})}"></div>
|
||||
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
<html th:lang="${#locale.country != '' ? #locale.language + '-' + #locale.country : #locale.language}"
|
||||
th:with="isAuth=${#authorization.expression('isAuthenticated()')}"
|
||||
<html th:lang="${#locale.country != '' ? #locale.language + '-' + #locale.country : #locale.language}" th:with="isAuth=${isAuth != null
|
||||
? isAuth
|
||||
: (#authorization == null ? false : #authorization.expression('isAuthenticated()'))}"
|
||||
th:attrappend="data-layout=${isAuth} ? 'semibox' : 'horizontal'" data-sidebar-visibility="show" data-topbar="light"
|
||||
data-sidebar="light" data-sidebar-size="lg" data-sidebar-image="none" data-preloader="disable"
|
||||
xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
|
||||
|
||||
<head>
|
||||
<meta name="_csrf" th:content="${_csrf.token}" />
|
||||
<meta name="_csrf_header" th:content="${_csrf.headerName}" />
|
||||
<meta name="_csrf" th:content="${_csrf != null ? _csrf.token : ''}" />
|
||||
<meta name="_csrf_header" th:content="${_csrf != null ? _csrf.headerName : ''}" />
|
||||
|
||||
<th:block layout:fragment="pagetitle" />
|
||||
<th:block th:replace="~{imprimelibros/partials/head-css :: head-css}" />
|
||||
@ -18,10 +19,11 @@
|
||||
|
||||
<body>
|
||||
<div th:replace="~{imprimelibros/partials/topbar :: topbar}" />
|
||||
<div th:if="${#authorization.expression('isAuthenticated()')}">
|
||||
<div th:if="${isAuth}">
|
||||
<div th:replace="~{imprimelibros/partials/sidebar :: sidebar}" />
|
||||
</div>
|
||||
|
||||
|
||||
<section class="main-content">
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
@ -39,10 +41,11 @@
|
||||
<th:block layout:fragment="pagejs" />
|
||||
<script th:src="@{/assets/js/app.js}"></script>
|
||||
<script th:src="@{/assets/js/pages/imprimelibros/languageBundle.js}"></script>
|
||||
<th:block th:if="${#authorization.expression('isAuthenticated()')}">
|
||||
<th:block th:if="${isAuth}">
|
||||
<script src="/assets/js/pages/imprimelibros/cart-badge.js"></script>
|
||||
</th:block>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -0,0 +1,73 @@
|
||||
<!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 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}"
|
||||
sec:authorize="isAuthenticated() and hasAnyRole('SUPERADMIN','ADMIN')">
|
||||
|
||||
<th:block layout:fragment="content">
|
||||
<div th:if="${isAuth}">
|
||||
|
||||
|
||||
<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>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row" id="card">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body">
|
||||
<h3 th:text="#{pagos.transferencia.ok.title}"></h3>
|
||||
<span th:utext="#{pagos.transferencia.ok.text(${importe}, ${concepto})}"></span>
|
||||
<div class="d-flex flex-wrap justify-content-center">
|
||||
<a th:href="@{/}" class="btn btn-secondary mt-3">
|
||||
<i class="ri-home-5-fill me-1"></i>
|
||||
<span th:text="#{app.back}">Volver</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--end row-->
|
||||
</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 -->
|
||||
<div th:if="${appMode} == 'view'">
|
||||
<script type="module" th:src="@{/assets/js/pages/imprimelibros/presupuestador/wizard-publicos.js}"></script>
|
||||
</div>
|
||||
<div th:if="${appMode} == 'edit'">
|
||||
<script type="module" th:src="@{/assets/js/pages/imprimelibros/presupuestador/wizard-privado.js}"></script>
|
||||
</div>
|
||||
|
||||
<script type="module" th:src="@{/assets/js/pages/imprimelibros/presupuestos/resumen-view.js}"></script>
|
||||
|
||||
</th:block>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -64,7 +64,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:if="${#authorization.expression('isAuthenticated()')}"
|
||||
<div th:if="${isAuth}"
|
||||
class="ms-1 header-item d-none d-sm-flex">
|
||||
<button type="button" id="btn_cart"
|
||||
class="btn btn-icon btn-topbar material-shadow-none btn-ghost-secondary rounded-circle light-dark-mode">
|
||||
@ -80,7 +80,7 @@
|
||||
|
||||
|
||||
|
||||
<div th:if="${#authorization.expression('isAuthenticated()')}">
|
||||
<div th:if="${isAuth}">
|
||||
<div class="dropdown ms-sm-3 header-item topbar-user">
|
||||
<button type="button" class="btn" id="page-header-user-dropdown" data-bs-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="false">
|
||||
@ -114,9 +114,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- Si NO está autenticado -->
|
||||
<div th:unless="${#authorization.expression('isAuthenticated()')}">
|
||||
<div th:unless="${isAuth}">
|
||||
<a href="/login" class="btn btn-outline-primary ms-sm-3">
|
||||
<i class="mdi mdi-login"></i> <label th:text="#{login.login}">Iniciar sesión</p>
|
||||
<i class="mdi mdi-login"></i> <label th:text="#{login.login}">Iniciar sesión</label>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1,72 +1,196 @@
|
||||
<div id="presupuesto-app" th:data-mode="${appMode} ?: 'public'" th:data-id="${id} ?: ''" th:fragment="presupuestador">
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{imprimelibros/layout}">
|
||||
|
||||
<div class="row" id="presupuesto-row">
|
||||
<div class="animate-fadeInUpBounce">
|
||||
<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>
|
||||
|
||||
<!-- Ribbon Shape -->
|
||||
<div class="card ribbon-box border shadow-none mb-lg-0 material-shadow">
|
||||
<div class="card-body">
|
||||
<div class="ribbon ribbon-primary ribbon-shape" th:text="#{presupuesto.resumen}">Resumen
|
||||
</div>
|
||||
<body>
|
||||
|
||||
<div th:replace="~{imprimelibros/partials/topbar :: topbar}" />
|
||||
<div th:replace="~{imprimelibros/partials/sidebar :: sidebar}"
|
||||
sec:authorize="isAuthenticated() and hasAnyRole('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:if="${appMode == 'add'}"
|
||||
th:text="#{presupuesto.add}">
|
||||
Nuevo presupuesto
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page" th:text="#{presupuesto.editar.title}"
|
||||
th:if="${appMode == 'edit'}">
|
||||
Editar presupuesto
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="ribbon-content mt-4">
|
||||
<div id="div-extras" class="hstack gap-2 justify-content-center flex-wrap">
|
||||
<div class="container-fluid">
|
||||
|
||||
<input type="hidden" id="presupuesto-id" th:value="${presupuesto.id}" />
|
||||
|
||||
<div class="row" id="card presupuesto-row animate-fadeInUpBounce">
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4 class="card-title mb-0 text-uppercase" th:text="${resumen.titulo}">Resumen del
|
||||
presupuesto</h4>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<div class="card col-12 col-sm-9 mx-auto">
|
||||
<h5 id="resumen-titulo" class="text-center"></h5>
|
||||
<table id="resumen-tabla-final" class="table table-borderless table-striped mt-3"
|
||||
th:data-currency="#{app.currency}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th th:text="#{presupuesto.resumen.tabla.descripcion}">Descripción
|
||||
</th>
|
||||
<th class="text-end" th:text="#{presupuesto.resumen.tabla.cantidad}">
|
||||
Cantidad</th>
|
||||
<th class="text-end"
|
||||
th:text="#{presupuesto.resumen.tabla.precio-unidad}">Precio
|
||||
unitario
|
||||
</th>
|
||||
<th class="text-end"
|
||||
th:text="#{presupuesto.resumen.tabla.precio-total}">Precio total
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:if="${resumen['linea0']}">
|
||||
<td><img style="max-width: 60px; height: auto;" th:src="${resumen['imagen']}" th:alt="${resumen['imagen_alt']}" class="img-fluid" /></td>
|
||||
<td class="text-start" th:utext="${resumen['linea0'].descripcion}">
|
||||
Descripción 1</td>
|
||||
<td class="text-end" th:text="${resumen['linea0'].cantidad}">1</td>
|
||||
<td class="text-end moneda4"
|
||||
th:text="${resumen['linea0'].precio_unitario}">
|
||||
100,00 €
|
||||
</td>
|
||||
<td class="text-end moneda" th:text="${resumen['linea0'].precio_total}">
|
||||
100,00
|
||||
€
|
||||
</td>
|
||||
</tr>
|
||||
<tr th:if="${resumen['linea1']}">
|
||||
<td></td>
|
||||
<td class="text-start" th:utext="${resumen['linea1'].descripcion}">
|
||||
Descripción 2</td>
|
||||
<td class="text-end" th:text="${resumen['linea1'].cantidad}">1</td>
|
||||
<td class="text-end moneda4"
|
||||
th:text="${resumen['linea1'].precio_unitario}">
|
||||
50,00 €
|
||||
</td>
|
||||
<td class="text-end moneda" th:text="${resumen['linea1'].precio_total}">
|
||||
50,00 €
|
||||
</td>
|
||||
</tr>
|
||||
<th:block th:each="servicio :${resumen['servicios']}">
|
||||
<tr th:attr="data-servicio-id=${servicio['id']}">
|
||||
<td></td>
|
||||
<td class="text-start" th:utext="${servicio['descripcion']}">
|
||||
Descripción 3</td>
|
||||
<td class="text-end" th:text="${servicio['unidades']}">1</td>
|
||||
<td class="text-end moneda" th:text="${servicio['precio']}">
|
||||
25,00 €
|
||||
</td>
|
||||
<td class="text-end moneda"
|
||||
th:text="${servicio['precio'] * servicio['unidades']}">
|
||||
25,00 €
|
||||
</td>
|
||||
</tr>
|
||||
</th:block>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="table-active">
|
||||
<th colspan="4" class="text-end"
|
||||
th:text="#{presupuesto.resumen.tabla.base}">Total</th>
|
||||
<th class="text-end moneda" id="resumen-base"
|
||||
th:text="${presupuesto.baseImponible}">0,00 €</th>
|
||||
</tr>
|
||||
<tr th:if="${presupuesto.ivaImporte4 > 0}" id="tr-resumen-iva4"
|
||||
class="table-active">
|
||||
<th colspan="4" class="text-end"
|
||||
th:text="#{presupuesto.resumen.tabla.iva4}">IVA (4%)</th>
|
||||
<th class="text-end moneda" id="resumen-iva4"
|
||||
th:text="${presupuesto.ivaImporte4}">0,00 €</th>
|
||||
</tr>
|
||||
<tr th:if="${presupuesto.ivaImporte21 > 0}" id="tr-resumen-iva21"
|
||||
class="table-active">
|
||||
<th colspan="4" class="text-end"
|
||||
th:text="#{presupuesto.resumen.tabla.iva21}">IVA (21%)</th>
|
||||
<th class="text-end moneda" id="resumen-iva21"
|
||||
th:text="${presupuesto.ivaImporte21}">0,00 €</th>
|
||||
</tr>
|
||||
<tr class="table-active">
|
||||
<th colspan="4" class="text-end"
|
||||
th:text="#{presupuesto.resumen.tabla.total}">Total con IVA
|
||||
</th>
|
||||
<th class="text-end moneda" id="resumen-total"
|
||||
th:text="${presupuesto.totalConIva}">0,00 €</th>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="buttons-row center">
|
||||
|
||||
<button type="button"
|
||||
class="btn btn-secondary d-flex align-items-center mx-2 btn-imprimir">
|
||||
<i class="ri-printer-line me-2"></i>
|
||||
<span th:text="#{app.imprimir}">Imprimir</span>
|
||||
</button>
|
||||
|
||||
<button type="button"
|
||||
class="btn btn-secondary d-flex align-items-center mx-2 add-cart-btn">
|
||||
<i class="ri-shopping-cart-line me-2"></i>
|
||||
<span th:text="#{presupuesto.add-to-cart}">Añadir a la cesta</span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--end row-->
|
||||
</div>
|
||||
<!-- End Ribbon Shape -->
|
||||
|
||||
<div class="col-9 mx-auto mt-4">
|
||||
<h5 id="resumen-titulo" class="text-center"></h5>
|
||||
<table id="resumen-tabla-final" class="table table-borderless table-striped mt-3"
|
||||
th:data-currency="#{app.currency}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th th:text="#{presupuesto.resumen.tabla.descripcion}">Descripción</th>
|
||||
<th th:text="#{presupuesto.resumen.tabla.cantidad}">Cantidad</th>
|
||||
<th th:text="#{presupuesto.resumen.tabla.precio-unidad}">Precio unitario</th>
|
||||
<th th:text="#{presupuesto.resumen.tabla.precio-total}">Precio total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="table-active">
|
||||
<th colspan="4" class="text-end" th:text="#{presupuesto.resumen.tabla.base}">Total</th>
|
||||
<th class="text-end" id="resumen-base">0,00 €</th>
|
||||
</tr>
|
||||
<tr id="tr-resumen-iva4" class="table-active">
|
||||
<th colspan="4" class="text-end" th:text="#{presupuesto.resumen.tabla.iva4}">IVA (4%)</th>
|
||||
<th class="text-end" id="resumen-iva4">0,00 €</th>
|
||||
</tr>
|
||||
<tr id="tr-resumen-iva21" class="table-active">
|
||||
<th colspan="4" class="text-end" th:text="#{presupuesto.resumen.tabla.iva21}">IVA (21%)</th>
|
||||
<th class="text-end" id="resumen-iva21">0,00 €</th>
|
||||
</tr>
|
||||
<tr class="table-active">
|
||||
<th colspan="4" class="text-end" th:text="#{presupuesto.resumen.tabla.total}">Total con IVA
|
||||
</th>
|
||||
<th class="text-end" id="resumen-total">0,00 €</th>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center mt-4 w-100">
|
||||
<button type="button"
|
||||
class="btn btn-secondary d-flex align-items-center mx-2 btn-imprimir">
|
||||
<i class="ri-printer-line me-2"></i>
|
||||
<span th:text="#{app.imprimir}">Imprimir</span>
|
||||
</button>
|
||||
|
||||
<button type="button"
|
||||
class="btn btn-secondary d-flex align-items-center mx-2 add-cart-btn">
|
||||
<i class="ri-shopping-cart-line me-2"></i>
|
||||
<span th:text="#{presupuesto.add-to-cart}">Añadir a la cesta</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--end row-->
|
||||
</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 -->
|
||||
<div th:if="${appMode} == 'view'">
|
||||
<script type="module" th:src="@{/assets/js/pages/imprimelibros/presupuestador/wizard-publicos.js}"></script>
|
||||
</div>
|
||||
<div th:if="${appMode} == 'edit'">
|
||||
<script type="module" th:src="@{/assets/js/pages/imprimelibros/presupuestador/wizard-privado.js}"></script>
|
||||
</div>
|
||||
|
||||
<script type="module" th:src="@{/assets/js/pages/imprimelibros/presupuestos/resumen-view.js}"></script>
|
||||
|
||||
</th:block>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user