Implementación AnomalIA - Fix de dropdowns y permisos.
All checks were successful
Optimized Build and Deploy / remote-build-and-deploy (push) Successful in 5m17s

This commit is contained in:
2025-06-30 15:26:14 -03:00
parent 95aa09d62a
commit c96d259892
59 changed files with 1430 additions and 337 deletions

View File

@@ -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,

View File

@@ -2,6 +2,7 @@ import apiClient from '../apiClient';
import type { OtroDestinoDto } from '../../models/dtos/Distribucion/OtroDestinoDto';
import type { CreateOtroDestinoDto } from '../../models/dtos/Distribucion/CreateOtroDestinoDto';
import type { UpdateOtroDestinoDto } from '../../models/dtos/Distribucion/UpdateOtroDestinoDto';
import type { OtroDestinoDropdownDto } from '../../models/dtos/Distribucion/OtroDestinoDropdownDto';
const getAllOtrosDestinos = async (nombreFilter?: string): Promise<OtroDestinoDto[]> => {
const params: Record<string, string> = {};
@@ -12,6 +13,12 @@ const getAllOtrosDestinos = async (nombreFilter?: string): Promise<OtroDestinoDt
return response.data;
};
const getAllDropdownOtrosDestinos = async (): Promise<OtroDestinoDto[]> => {
// Llama a GET /api/otrosdestinos/dropdown
const response = await apiClient.get<OtroDestinoDropdownDto[]>('/otrosdestinos/dropdown');
return response.data;
};
const getOtroDestinoById = async (id: number): Promise<OtroDestinoDto> => {
// Llama a GET /api/otrosdestinos/{id}
const response = await apiClient.get<OtroDestinoDto>(`/otrosdestinos/${id}`);
@@ -36,6 +43,7 @@ const deleteOtroDestino = async (id: number): Promise<void> => {
const otroDestinoService = {
getAllOtrosDestinos,
getAllDropdownOtrosDestinos,
getOtroDestinoById,
createOtroDestino,
updateOtroDestino,