Implementación AnomalIA - Fix de dropdowns y permisos.
All checks were successful
Optimized Build and Deploy / remote-build-and-deploy (push) Successful in 5m17s
All checks were successful
Optimized Build and Deploy / remote-build-and-deploy (push) Successful in 5m17s
This commit is contained in:
@@ -3,6 +3,7 @@ import type { CanillaDto } from '../../models/dtos/Distribucion/CanillaDto';
|
||||
import type { CreateCanillaDto } from '../../models/dtos/Distribucion/CreateCanillaDto';
|
||||
import type { UpdateCanillaDto } from '../../models/dtos/Distribucion/UpdateCanillaDto';
|
||||
import type { ToggleBajaCanillaDto } from '../../models/dtos/Distribucion/ToggleBajaCanillaDto';
|
||||
import type { CanillaDropdownDto } from '../../models/dtos/Distribucion/CanillaDropdownDto';
|
||||
|
||||
|
||||
const getAllCanillas = async (
|
||||
@@ -15,12 +16,24 @@ const getAllCanillas = async (
|
||||
if (nomApeFilter) params.nomApe = nomApeFilter;
|
||||
if (legajoFilter !== undefined && legajoFilter !== null) params.legajo = legajoFilter;
|
||||
if (soloActivos !== undefined) params.soloActivos = soloActivos;
|
||||
if (esAccionistaFilter !== undefined) params.esAccionista = esAccionistaFilter; // <<-- ¡CLAVE! Verifica esto.
|
||||
if (esAccionistaFilter !== undefined) params.esAccionista = esAccionistaFilter;
|
||||
|
||||
const response = await apiClient.get<CanillaDto[]>('/canillas', { params });
|
||||
return response.data;
|
||||
};
|
||||
|
||||
const getAllDropdownCanillas = async (
|
||||
soloActivos?: boolean,
|
||||
esAccionistaFilter?: boolean // Asegúrate que esté aquí
|
||||
): Promise<CanillaDropdownDto[]> => {
|
||||
const params: Record<string, string | number | boolean> = {};
|
||||
if (soloActivos !== undefined) params.soloActivos = soloActivos;
|
||||
if (esAccionistaFilter !== undefined) params.esAccionista = esAccionistaFilter;
|
||||
|
||||
const response = await apiClient.get<CanillaDropdownDto[]>('/canillas/dropdown', { params });
|
||||
return response.data;
|
||||
};
|
||||
|
||||
const getCanillaById = async (id: number): Promise<CanillaDto> => {
|
||||
const response = await apiClient.get<CanillaDto>(`/canillas/${id}`);
|
||||
return response.data;
|
||||
@@ -43,6 +56,7 @@ const toggleBajaCanilla = async (id: number, data: ToggleBajaCanillaDto): Promis
|
||||
|
||||
const canillaService = {
|
||||
getAllCanillas,
|
||||
getAllDropdownCanillas,
|
||||
getCanillaById,
|
||||
createCanilla,
|
||||
updateCanilla,
|
||||
|
||||
Reference in New Issue
Block a user