mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'mod/open_cliente_from' into 'main'
añadido icono para abrir cliente en presupuesto See merge request jjimenez/safekat!600
This commit is contained in:
@ -143,6 +143,7 @@
|
|||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="clienteId" class="form-label">
|
<label for="clienteId" class="form-label">
|
||||||
<?= lang('Presupuestos.clienteId') ?>*
|
<?= lang('Presupuestos.clienteId') ?>*
|
||||||
|
<a id="openCliente" href="javascript(void)" target="_blank" ><i class="ti ti-file-search ti-sm btn-edit mx-2" data-id="${data.id}"></i></a>
|
||||||
</label>
|
</label>
|
||||||
<select id="clienteId" name="cliente_id" class="form-control select2bs2" style="width: 100%;">
|
<select id="clienteId" name="cliente_id" class="form-control select2bs2" style="width: 100%;">
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -15,6 +15,8 @@ class DatosGenerales{
|
|||||||
this.coleccion = this.domItem.find('#coleccion');
|
this.coleccion = this.domItem.find('#coleccion');
|
||||||
this.numeroEdicion = this.domItem.find('#numeroEdicion');
|
this.numeroEdicion = this.domItem.find('#numeroEdicion');
|
||||||
this.isbn = this.domItem.find('#isbn');
|
this.isbn = this.domItem.find('#isbn');
|
||||||
|
|
||||||
|
this.openCliente = this.domItem.find('#openCliente');
|
||||||
|
|
||||||
|
|
||||||
this.cliente = new ClassSelect($('#clienteId'), '/clientes/cliente/getSelect2', 'Seleccione cliente');
|
this.cliente = new ClassSelect($('#clienteId'), '/clientes/cliente/getSelect2', 'Seleccione cliente');
|
||||||
@ -31,6 +33,11 @@ class DatosGenerales{
|
|||||||
this.inc_rei.select2({
|
this.inc_rei.select2({
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.openCliente.click(()=>{
|
||||||
|
const urlObj = new URL(window.location.href);
|
||||||
|
window.open(`${urlObj.origin}` + '/clientes/cliente/edit/' + this.cliente.getVal());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
cargarDatos(datos){
|
cargarDatos(datos){
|
||||||
|
|||||||
Reference in New Issue
Block a user