modificando carrito

This commit is contained in:
2025-10-27 20:30:11 +01:00
parent de7a392e07
commit f6a683de81
22 changed files with 1050 additions and 42 deletions

View File

@ -0,0 +1,43 @@
<div>
<div
th:replace="imprimelibros/partials/modal-form :: modal('direccionFormModal', 'direcciones.add', 'modal-md', 'direccionFormModalBody')">
</div>
<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="#{checkout.shipping.order}">Envio del pedido
</div>
</div>
<div class="ribbon-content mt-4">
<div class="px-2 mb-2">
<p th:text="#{checkout.shipping.info}"></p>
<div
class="form-check form-switch form-switch-custom form-switch-presupuesto mb-3 d-flex align-items-center">
<input type="checkbox" class="form-check-input datos-generales-data me-2" id="onlyOneShipping"
name="onlyOneShipping" checked />
<label for="onlyOneShipping" class="form-label d-flex align-items-center mb-0">
<span th:text="#{checkout.shipping.onlyOneShipping}" class="me-2"></span>
</label>
</div>
<button type="button" class="btn btn-secondary" id="addOrderAddress"
th:text="#{checkout.shipping.add}">Añadir dirección</button>
<div id="orderShippingAddressesContainer" class="mt-4"></div>
<div id="orderShippingMultipleAddressesContainer d-none" class="mt-4"></div>
</div>
</div>
</div>
<div class="card ribbon-box border shadow-none mb-lg-0 material-shadow mt-4" th:if="${hasSample}">
<div class="card-body">
<div class="ribbon ribbon-primary ribbon-shape" th:text="#{checkout.shipping.samples}">Envio de pruebas
</div>
</div>
<div class="ribbon-content mt-4">
</div>
</div>
<!-- End Ribbon Shape -->
</div>

View File

@ -0,0 +1,3 @@
<div>
</div>

View File

@ -0,0 +1,175 @@
<!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}"
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 active" aria-current="page" th:text="#{checkout.title}">Finalizar
compra</li>
</ol>
</nav>
</div>
<div class="row">
<div class="col-xl-8 col-12">
<div class="card">
<div class="card-body">
<div class="step-arrow-nav mt-n3 mx-n3 mb-3">
<ul class="nav nav-pills nav-justified custom-nav" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link fs-15 p-3 active" id="pills-shipping-tab"
data-bs-target="#pills-shipping" type="button" role="tab"
aria-controls="pills-shipping" aria-selected="true">
<i
class="ri-truck-line fs-5 p-1 bg-soft-primary text-primary rounded-circle align-middle me-2"></i>
<label class="fs-13 my-2" th:text="#{checkout.shipping}">Envío</label>
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link fs-15 p-3" id="pills-payment-tab"
data-bs-target="#pills-payment" type="button" role="tab"
aria-controls="pills-payment" aria-selected="false">
<i
class="ri-money-euro-box-line fs-5 p-1 bg-soft-primary text-primary rounded-circle align-middle me-2"></i>
<label class="fs-13 my-2" th:text="#{checkout.payment}">Método de
pago</label>
</button>
</li>
</ul>
</div>
<div class="tab-content">
<div class="tab-pane fade show active" id="pills-shipping" role="tabpanel"
aria-labelledby="pills-shipping-tab">
<div th:include="~{imprimelibros/checkout/_envio.html}">
</div>
</div>
<!-- end tab pane -->
<div class="tab-pane fade" id="pills-payment" role="tabpanel"
aria-labelledby="pills-payment-tab">
<div th:include="~{imprimelibros/checkout/_pago.html}">
</div>
</div>
<!-- end tab pane -->
</div>
</div>
</div>
</div>
<div class="col-xl-4">
<div class="sticky-side-div">
<div class="card">
<div class="card-header border-bottom-dashed">
<h5 th:text="#{checkout.summay}" class="card-title mb-1"></h5>
</div>
<div class="card-body pt-2">
<div class="table-responsive table-card">
<table class="table table-borderless align-middle mb-0">
<thead class="table-light text-muted">
<tr>
<th style="width: 90px;" scope="col"
th:text="#{checkout.summary.presupuesto}">Presupuesto</th>
<th scope="col" th:text="#{checkout.summary.titulo}">Título</th>
<th scope="col" class="text-end" th:text="#{checkout.summary.base}">
Base</th>
<th class="d-none"></th>
</tr>
</thead>
<tbody>
<tr th:each="item : ${items}">
<td>
<span th:text="${item.presupuestoId}">PRESUPUESTO-001</span>
</td>
<td>
<span th:text="${item.titulo}">Título del presupuesto</span>
</td>
<td class="text-end">
<span th:text="${item.baseTotal}">
0,00</span>
</td>
<td class="d-none">
<span th:text="${item.tirada}"></span>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2"><span th:text="#{cart.resumen.base}"></span></td>
<td class="text-end" id="base-cesta"></td>
</tr>
<tr id="tr-iva-4">
<td colspan="2"><span th:text="#{cart.resumen.iva-4}"></span> : </td>
<td class="text-end" id="iva-4-cesta"></td>
</tr>
<tr id="tr-iva-21">
<td colspan="2"><span th:text="#{cart.resumen.iva-21}"></span> : </td>
<td class="text-end" id="iva-21-cesta"></td>
</tr>
<tr class="table-active">
<td colspan="2"><span th:text="#{cart.resumen.total}"></span>:</td>
<td class="text-end">
<span id="total-cesta" class="fw-semibold">
</span>
</td>
</tr>
</tfoot>
</table>
<button type="button" class="btn btn-secondary w-100 mt-2"
th:text="#{cart.resumen.tramitar}">Checkout</button>
</div>
<!-- end table-responsive -->
</div>
</div>
<div class="alert border-dashed alert-danger" role="alert">
<div class="d-flex align-items-center">
<div class="ms-2">
<h5 class="fs-14 text-danger fw-semibold"
th:text="#{cart.resumen.fidelizacion}"></h5>
</div>
</div>
</div>
</div>
<!-- end stickey -->
</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>
<script type="module" th:src="@{/assets/js/pages/imprimelibros/checkout/checkout.js}"></script>
</th:block>
</body>
</html>