mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-29 15:18:50 +00:00
falta actualizar bien el resumen
This commit is contained in:
@ -10,6 +10,7 @@
|
||||
<div th:if="${items.isEmpty()}">
|
||||
<div class="alert alert-info" role="alert" th:text="#{cart.empty}"></div>
|
||||
</div>
|
||||
<div id="errorEnvio" th:class="${'alert alert-danger' + (errorEnvio ? '' : ' d-none')}" role="alert" th:text="#{cart.errors.shipping}"></div>
|
||||
<div th:if="${errorMessage}" class="alert alert-danger " role="alert" th:text="${errorMessage}"></div>
|
||||
|
||||
<div class="alert alert-danger alert-shipment d-none" role="alert"
|
||||
@ -24,17 +25,30 @@
|
||||
<p th:text="#{cart.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="onlyOneShipment"
|
||||
th:field="${cart.onlyOneShipment}"/>
|
||||
th:field="${cart.onlyOneShipment}" />
|
||||
<label for="onlyOneShipment" class="form-label d-flex align-items-center mb-0">
|
||||
<span th:text="#{cart.shipping.onlyOneShipment}" class="me-2"></span>
|
||||
</label>
|
||||
</div>
|
||||
<button type="button" th:class="${'btn btn-secondary' + (!cart.onlyOneShipment or mainDir?.size > 0 ? ' d-none' : '')}" id="addOrderAddress"
|
||||
th:text="#{cart.shipping.add}">Añadir dirección</button>
|
||||
<button type="button"
|
||||
th:class="${'btn btn-secondary' + (!cart.onlyOneShipment or #lists.size(mainDir ?: {}) > 0 ? ' d-none' : '')}"
|
||||
id="addOrderAddress" th:text="#{cart.shipping.add}">Añadir dirección</button>
|
||||
|
||||
<div id="shippingAddressesContainer" class="shipping-order-address d-flex flex-wrap gap-3 mt-4"></div>
|
||||
<div id="shippingAddressesContainer" class="shipping-order-address d-flex flex-wrap gap-3 mt-4">
|
||||
<div th:replace="${cart.onlyOneShipment and mainDir != null}
|
||||
? ~{imprimelibros/direcciones/direccionCard :: direccionCard(
|
||||
${mainDir.direccion},
|
||||
${mainDir.pais},
|
||||
${mainDir.presupuestoId},
|
||||
${mainDir.unidades},
|
||||
${mainDir.isPalets}
|
||||
)}
|
||||
: ~{}">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -4,11 +4,12 @@
|
||||
data-base=${item.base}">
|
||||
<div class="card-body">
|
||||
|
||||
<input type="hidden" class="item-presupuesto-id" th:value="${item.cartItemId}" />
|
||||
<input type="hidden" class="item-presupuesto-id" th:value="${item.presupuestoId}" />
|
||||
<input type="hidden" class="item-tirada" th:value="${item.tirada}" />
|
||||
|
||||
<div class="step-arrow-nav mt-n3 mx-n3 mb-3">
|
||||
<ul th:class="${'nav nav-pills nav-justified custom-nav nav-product' + (cart.onlyOneShipment ? ' d-none' : '')}" role="tablist">
|
||||
<ul th:class="${'nav nav-pills nav-justified custom-nav nav-product' + (cart.onlyOneShipment ? ' d-none' : '')}"
|
||||
role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link fs-15 active" th:id="${'pills-details-' + item.cartItemId + '-tab'}"
|
||||
th:data-bs-target="${'#pills-details-' + item.cartItemId}" type="button" role="tab"
|
||||
@ -131,7 +132,22 @@
|
||||
<button type="button" class="btn btn-secondary btn-add-shipping"
|
||||
th:text="#{cart.shipping.add}">Añadir dirección</button>
|
||||
|
||||
<div class="shipping-addresses-item d-flex flex-wrap gap-3 mt-4"></div>
|
||||
<div class="shipping-addresses-item d-flex flex-wrap gap-3 mt-4">
|
||||
<th:block th:each="dir : ${direcciones}">
|
||||
<th:block
|
||||
th:if="${dir != null and dir.unidades != null and dir.unidades > 0 and dir.presupuestoId == item.presupuestoId}">
|
||||
<div th:replace="~{imprimelibros/direcciones/direccionCard ::
|
||||
direccionCard(
|
||||
direccion=${dir.direccion},
|
||||
pais=${dir.pais},
|
||||
presupuestoId=${dir.presupuestoId},
|
||||
unidades=${dir.unidades},
|
||||
isPalets=${dir.isPalets} )}">
|
||||
|
||||
</div>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -149,7 +165,22 @@
|
||||
<button type="button" class="btn btn-secondary btn-add-shipping-sample"
|
||||
th:text="#{cart.shipping.add}">Añadir dirección</button>
|
||||
|
||||
<div class="shipping-addresses-sample d-flex flex-wrap gap-3 mt-4"></div>
|
||||
<div class="shipping-addresses-sample d-flex flex-wrap gap-3 mt-4">
|
||||
<th:block th:each="dir : ${direcciones}">
|
||||
<th:block
|
||||
th:if="${dir != null and dir.unidades == null and dir.presupuestoId == item.presupuestoId}">
|
||||
<div th:replace="~{imprimelibros/direcciones/direccionCard ::
|
||||
direccionCard(
|
||||
direccion=${dir.direccion},
|
||||
pais=${dir.pais},
|
||||
presupuestoId=${dir.presupuestoId},
|
||||
unidades=${dir.unidades},
|
||||
isPalets=${dir.isPalets} )}">
|
||||
|
||||
</div>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<div th:fragment="cartSummary(summary)" class="col-xl-4">
|
||||
<div th:fragment="cartSummary(summary)" class="col-xl-4 cart-summary-container">
|
||||
<div class="sticky-side-div">
|
||||
<div class="card">
|
||||
<div class="card-header border-bottom-dashed">
|
||||
@ -12,6 +12,10 @@
|
||||
<td><span th:text="#{cart.resumen.base}"></span></td>
|
||||
<td class="text-end" id="base-cesta" th:text="${summary.base}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span th:text="#{cart.resumen.envio}"></span></td>
|
||||
<td class="text-end" id="envio-cesta" th:text="${summary.shipment}"></td>
|
||||
</tr>
|
||||
<tr id="tr-iva-4">
|
||||
<td><span th:text="#{cart.resumen.iva-4}"></span> : </td>
|
||||
<td class="text-end" id="iva-4-cesta" th:text="${summary.iva4}"></td>
|
||||
@ -28,8 +32,12 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<button type="button" class="btn btn-secondary w-100 mt-2" id="btn-checkout"
|
||||
th:onclick="location.href='/checkout'" th:text="#{cart.resumen.tramitar}">Checkout</button>
|
||||
<form th:action="@{/pagos/redsys/crear}" method="post">
|
||||
<input type="hidden" name="order" value="123456789012"/>
|
||||
<input type="hidden" name="amountCents" value="12525"/>
|
||||
<button type="submit" class="btn btn-secondary w-100 mt-2"
|
||||
th:text="#{cart.resumen.tramitar}">Checkout</button>
|
||||
</form>
|
||||
</div>
|
||||
<!-- end table-responsive -->
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user