Agregado filtro de tipo pedido

This commit is contained in:
Alejandro Tasistro 2025-06-20 01:48:42 -03:00
parent 0ce7b00e90
commit 09fce4e96a
2 changed files with 10 additions and 1 deletions

View file

@ -13,4 +13,12 @@ class FiltroDeSubpedido extends Filtro
$this->builder->where('grupo_de_compra_id', intval($valor));
}
public function tipoPedido(String $valor)
{
if (!is_numeric($valor))
throw new TypeError();
$this->builder->where('tipo_pedido_id', intval($valor));
}
}

View file

@ -88,7 +88,8 @@ export default {
const response = await axios.get('/api/subpedidos/',{
params: {
nombre: nombre,
grupo_de_compra: this.grupo_de_compra.id
grupo_de_compra: this.grupo_de_compra.id,
tipo_pedido: 1,
}
});
this.pedidos = response.data;