trabajando en envios dentro del presupuesto

This commit is contained in:
2025-10-28 22:28:27 +01:00
parent f770bd07d6
commit c272fd7b9b
8 changed files with 277 additions and 104 deletions

View File

@ -1,19 +1,35 @@
<div th:fragment="direccionCard(direccion)" class="card card border mb-3 direccion-card bg-light w-100 mx-2" th:attr="data-id=${direccion.id},
data-cp=${direccion.cp},
data-pais-code3=${direccion.pais.code3}" >
<div th:fragment="direccionCard(direccion)" name="direccion"
class="card card border mb-3 direccion-card bg-light w-100 mx-2">
<div class="card-body">
<div class="p-2 mx-3">
<span class="mb-2 fw-semibold d-block text-muted text-uppercase" th:text="${direccion.alias}"></span>
<span class="fs-14 mb-1 d-block" th:text="${direccion.att}"></span>
<span class="text-muted fw-normal text-wrap mb-1 d-block" th:text="${direccion.direccion}"></span>
<span class="text-muted fw-normal d-block" th:text="${pais}"></span>
<span class="text-muted fw-normal d-block"
th:text="#{'direcciones.telefono'} + ': ' + ${direccion.telefono}"></span>
<input type="hidden" class="presupuesto-id" th:value="${presupuestoId}" />
<input type="hidden" class="direccion-id" th:value="${direccion.id}" />
<input type="hidden" class="direccion-cp" th:value="${direccion.cp}" />
<input type="hidden" class="direccion-pais-code3" th:value="${direccion.pais.code3}" />
<input type="hidden" class="item-tirada" th:value="${unidades != null ? unidades : ''}" />
<div class="row g-3 align-items-start">
<div class="col">
<span class="mb-2 fw-semibold d-block text-muted text-uppercase" th:text="${direccion.alias}"></span>
<span class="fs-14 mb-1 d-block" th:text="${direccion.att}"></span>
<span class="text-muted fw-normal text-wrap mb-1 d-block" th:text="${direccion.direccion}"></span>
<span class="text-muted fw-normal d-block" th:text="${pais}"></span>
<span class="text-muted fw-normal d-block"
th:text="#{'direcciones.telefono'} + ': ' + ${direccion.telefono}"></span>
</div>
<div th:if="${unidades != null}" class="col-auto ms-auto text-end">
<span class="mb-2 fw-semibold d-block text-muted text-uppercase" th:if="${unidades == 1}"
th:text="|${unidades} #{cart.shipping.ud}|"></span>
<!-- plural -->
<span class="mb-2 fw-semibold d-block text-muted text-uppercase" th:unless="${unidades == 1}"
th:text="|${unidades} #{cart.shipping.uds}|"></span>
</div>
</div>
<div
class="d-flex flex-wrap align-items-center gap-2 px-2 py-1 bg-light rounded-bottom border-top mt-auto actions-row">
<a href="#" class="d-block text-body p-1 px-2 btn-delete-direccion" data-id="${this._esc(d.id ?? '')}">
<a href="javascript:void(0)" class="d-block text-body p-1 px-2 btn-delete-direccion"
data-id="${this._esc(d.id ?? '')}">
<i class="ri-delete-bin-fill text-muted align-bottom me-1"></i>
<span th:text="#{'direcciones.btn.delete'}">Eliminar</span>
</a>