mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-13 00:48:49 +00:00
116 lines
5.9 KiB
HTML
116 lines
5.9 KiB
HTML
<div th:fragment="pedido-linea (item, isAdmin)">
|
|
<div class="mb-3">
|
|
<div class="card p-3 mb-0">
|
|
<div class="row g-3 align-items-start">
|
|
<!-- Col 1: imagen -->
|
|
<div class="col-auto">
|
|
<div class="avatar-lg bg-light rounded p-1">
|
|
<img th:src="${item.imagen != null ? item.imagen : '/assets/images/products/placeholder.png'}"
|
|
alt="portada" class="img-fluid d-block rounded">
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Col 2: detalles -->
|
|
<div class="col">
|
|
<h5 class="fs-18 text-truncate mb-1">
|
|
<span class="text-dark"
|
|
th:text="${item.titulo != null ? item.titulo : 'Presupuesto #'}">Presupuesto</span>
|
|
</h5>
|
|
<h5 class="fs-14 text-truncate mb-1">
|
|
<span th:text="#{cart.item.presupuesto-numero}">Presupuesto #</span>
|
|
<span th:text="${item.presupuestoId != null ? item.presupuestoId : ''}">#</span>
|
|
<a th:href="@{|/presupuesto/edit/${item.presupuestoId}|}"
|
|
th:text="#{pedido.view.view-presupuesto}" class="badge bg-secondary">Ver presupuesto</a>
|
|
</h5>
|
|
|
|
<ul class="list-unstyled text-muted mb-1 ps-0">
|
|
<li th:each="linea : ${item.resumen.lineas}" class="mb-1">
|
|
<span th:utext="${linea['descripcion']}"></span>
|
|
</li>
|
|
</ul>
|
|
|
|
<ul class="list-unstyled text-muted mb-1" th:if="${item.resumen.servicios != null}">
|
|
<li>
|
|
<span th:utext="#{pdf.servicios-adicionales}">Servicios adicionales:</span>
|
|
<span class="spec-label" th:text="${item.resumen.servicios}"></span>
|
|
</li>
|
|
</ul>
|
|
|
|
<ul class="list-unstyled text-muted mb-1"
|
|
th:if="${item.resumen != null and #maps.containsKey(item.resumen,'datosMaquetacion') and item.resumen['datosMaquetacion'] != null}">
|
|
<li class="spec-row mb-1">
|
|
<span th:text="#{pdf.datos-maquetacion}">Datos de maquetación:</span>
|
|
<span th:utext="${item.resumen.datosMaquetacion}"></span>
|
|
</li>
|
|
</ul>
|
|
|
|
<ul class="list-unstyled text-muted mb-1"
|
|
th:if="${item.resumen != null and #maps.containsKey(item.resumen,'datosMarcapaginas') and item.resumen['datosMarcapaginas'] != null}">
|
|
<li class="spec-row mb-1">
|
|
<span th:text="#{pdf.datos-marcapaginas}">Datos de marcapáginas:</span>
|
|
<span th:utext="${item.resumen.datosMarcapaginas}"></span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<!-- Col 3: precio -->
|
|
<div class="col-auto ms-auto text-end">
|
|
<p class="text-muted mb-1" th:text="#{cart.precio}">Precio</p>
|
|
<h5 class="fs-14 mb-0">
|
|
<span th:text="${item.baseTotal != null ? item.total : '-'}">0,00</span>
|
|
</h5>
|
|
<p class="text-muted mt-4 mb-1" th:text="#{pedido.table.estado}">Estado</p>
|
|
<h5 class="fs-14 mb-0">
|
|
<span th:text="${item.estado != null} ?
|
|
#{__${'pedido.estado.' + item.estado}__} : '-'">
|
|
</span>
|
|
</h5>
|
|
<th:block th:if="${item.fechaEntrega != null and item.fechaEntrega != ''}">
|
|
<p class="text-muted mt-4 mb-1" th:text="#{pedido.fecha-entrega}">Fecha de entrega</p>
|
|
<h5 class="fs-14 mb-0">
|
|
<span th:text="${item.fechaEntrega}">-</span>
|
|
</h5>
|
|
</th:block>
|
|
</div>
|
|
</div>
|
|
<div card class="mt-3">
|
|
<div class="card-header bg-light p-3">
|
|
<span class="mb-0 fs-16" th:text="#{pedido.shipping-addresses}">Direcciones de envío</span>
|
|
</div>
|
|
<div class="card-body p-3">
|
|
<div class="row g-3">
|
|
<div class="flex-shrink-0">
|
|
<img src="/assets/images/delivery-truck.gif" style="width: 120px; height: auto;"
|
|
alt="delivery">
|
|
</div>
|
|
</div>
|
|
<div th:each="direccionEnvio : ${item.direccionesEntrega}" class="mb-3">
|
|
<div th:insert="~{imprimelibros/direcciones/direccionEnvioCard :: direccionEnvioCard(
|
|
direccion=${direccionEnvio},
|
|
pais=${direccionEnvio.paisNombre}
|
|
)}">
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div th:if="${isAdmin}" class="card-footer bg-light p-3">
|
|
<div class="row align-items-center gy-3">
|
|
<div class="col-sm">
|
|
<div class="d-flex flex-wrap my-n1">
|
|
<!-- Botón eliminar -->
|
|
<div>
|
|
<a href="javascript:void(0);" class="d-block text-body p-1 px-2 delete-item"
|
|
th:attr="data-cart-item-id=${item.presupuestoId}">
|
|
<i class="ri-delete-bin-fill text-muted align-bottom me-1"><span
|
|
th:text="#{pedido.cancelar}">Cancelar Pedido</span></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> |