mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-02-27 21:29:13 +00:00
se modifican los item de los listados para que se abran en una nueva pestaña. Se añade un badge al carrito item para editar el presupuesto
This commit is contained in:
@ -71,7 +71,7 @@ $(() => {
|
||||
// -----------------------------
|
||||
$table.on('click', '.btn-view-factura', function () {
|
||||
const row = dt.row($(this).closest('tr')).data();
|
||||
window.location.href = `/facturas/${row.id}`;
|
||||
window.open('/facturas/' + row.id, '_blank', 'noopener,noreferrer');
|
||||
});
|
||||
|
||||
// -----------------------------
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
$(() => {
|
||||
$(document).on('click', '.btn-view', function () {
|
||||
let pedidoId = $(this).data('id');
|
||||
let url = `/pedidos/view/${pedidoId}`;
|
||||
window.location.href = url;
|
||||
if(!pedidoId) return;
|
||||
window.open('/pedidos/view/' + pedidoId, '_blank', 'noopener,noreferrer');
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-pay', async function () {
|
||||
|
||||
@ -72,7 +72,7 @@ import { preguntarTipoPresupuesto, duplicar, reimprimir } from './presupuesto-ut
|
||||
e.preventDefault();
|
||||
const id = $(this).data('id');
|
||||
if (id) {
|
||||
window.location.href = '/presupuesto/view/' + id;
|
||||
window.open('/presupuesto/view/' + id, '_blank', 'noopener,noreferrer');
|
||||
}
|
||||
});
|
||||
|
||||
@ -196,7 +196,7 @@ import { preguntarTipoPresupuesto, duplicar, reimprimir } from './presupuesto-ut
|
||||
e.preventDefault();
|
||||
const id = $(this).data('id');
|
||||
if (id) {
|
||||
window.location.href = '/presupuesto/edit/' + id;
|
||||
window.open('/presupuesto/edit/' + id, '_blank', 'noopener,noreferrer');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -56,6 +56,8 @@
|
||||
<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">
|
||||
|
||||
Reference in New Issue
Block a user