mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'fix/open_cliente_presupuesto' into 'main'
modificado el link a cliente (icono busqueda) desde presupuesto admin See merge request jjimenez/safekat!611
This commit is contained in:
@ -399,6 +399,8 @@ class Presupuestoadmin extends \App\Controllers\BaseResourceController
|
||||
|
||||
$this->viewData['formAction'] = route_to('updatePresupuestoAdmin', $id);
|
||||
|
||||
$this->viewData['cliente_id'] = $presupuestoEntity->cliente_id;
|
||||
|
||||
// Si se ha llamado a esta funcion porque se ha duplicado el presupuesto
|
||||
// se actualiza la bbdd para que sólo ejecute algunas funciones una vez
|
||||
if ($presupuestoEntity->is_duplicado) {
|
||||
|
||||
@ -143,7 +143,9 @@
|
||||
<div class="mb-3">
|
||||
<label for="clienteId" class="form-label">
|
||||
<?= 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>
|
||||
<?php if(isset($cliente_id)):?>
|
||||
<a href="<?= route_to('editarCliente', $cliente_id); ?>" target="_blank" ><i class="ti ti-file-search ti-sm mx-2""></i></a>
|
||||
<?php endif; ?>
|
||||
</label>
|
||||
<select id="clienteId" name="cliente_id" class="form-control select2bs2" style="width: 100%;">
|
||||
</select>
|
||||
|
||||
@ -16,9 +16,7 @@ class DatosGenerales{
|
||||
this.numeroEdicion = this.domItem.find('#numeroEdicion');
|
||||
this.isbn = this.domItem.find('#isbn');
|
||||
|
||||
this.openCliente = this.domItem.find('#openCliente');
|
||||
|
||||
|
||||
|
||||
this.cliente = new ClassSelect($('#clienteId'), '/clientes/cliente/getSelect2', 'Seleccione cliente');
|
||||
this.pais = new ClassSelect($('#paisId'), '/paises/menuitems2', 'Seleccione País');
|
||||
this.referenciaCliente = this.domItem.find('#referenciaCliente');
|
||||
@ -34,10 +32,7 @@ class DatosGenerales{
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
this.openCliente.click(()=>{
|
||||
const urlObj = new URL(window.location.href);
|
||||
window.open(`${urlObj.origin}` + '/clientes/cliente/edit/' + this.cliente.getVal());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
cargarDatos(datos){
|
||||
|
||||
Reference in New Issue
Block a user