Comenzando la implementación final de permisos y depuración. Se sigue...

This commit is contained in:
2025-06-03 18:42:56 -03:00
parent 062cc05fd0
commit 8fb94f8cef
46 changed files with 711 additions and 493 deletions

View File

@@ -51,7 +51,7 @@ const GestionarCanillitasPage: React.FC = () => {
}
setLoading(true); setError(null); setApiErrorMessage(null);
try {
const legajoNum = filtroLegajo ? parseInt(filtroLegajo, 10) : undefined;
const legajoNum = filtroLegajo ? parseInt(filtroLegajo, 25) : undefined;
if (filtroLegajo && isNaN(legajoNum!)) {
setApiErrorMessage("Legajo debe ser un número.");
setCanillitas([]); // Limpiar resultados si el filtro es inválido
@@ -194,7 +194,7 @@ const GestionarCanillitasPage: React.FC = () => {
</TableBody>
</Table>
<TablePagination
rowsPerPageOptions={[5, 10, 25]} component="div" count={canillitas.length}
rowsPerPageOptions={[25, 50, 100]} component="div" count={canillitas.length}
rowsPerPage={rowsPerPage} page={page} onPageChange={handleChangePage}
onRowsPerPageChange={handleChangeRowsPerPage} labelRowsPerPage="Filas por página:"
/>

View File

@@ -39,7 +39,7 @@ const GestionarControlDevolucionesPage: React.FC = () => {
const [editingControl, setEditingControl] = useState<ControlDevolucionesDto | null>(null);
const [page, setPage] = useState(0);
const [rowsPerPage, setRowsPerPage] = useState(10);
const [rowsPerPage, setRowsPerPage] = useState(25);
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
const [selectedRow, setSelectedRow] = useState<ControlDevolucionesDto | null>(null);
@@ -206,7 +206,7 @@ const GestionarControlDevolucionesPage: React.FC = () => {
</TableBody>
</Table>
<TablePagination
rowsPerPageOptions={[10, 25, 50]} component="div" count={controles.length}
rowsPerPageOptions={[25, 50, 100]} component="div" count={controles.length}
rowsPerPage={rowsPerPage} page={page} onPageChange={handleChangePage}
onRowsPerPageChange={handleChangeRowsPerPage} labelRowsPerPage="Filas por página:"
/>

View File

@@ -30,7 +30,7 @@ const GestionarDistribuidoresPage: React.FC = () => {
const [apiErrorMessage, setApiErrorMessage] = useState<string | null>(null);
const [page, setPage] = useState(0);
const [rowsPerPage, setRowsPerPage] = useState(5);
const [rowsPerPage, setRowsPerPage] = useState(25);
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
const [selectedDistribuidorRow, setSelectedDistribuidorRow] = useState<DistribuidorDto | null>(null);
@@ -171,7 +171,7 @@ const GestionarDistribuidoresPage: React.FC = () => {
</TableBody>
</Table>
<TablePagination
rowsPerPageOptions={[5, 10, 25]} component="div" count={distribuidores.length}
rowsPerPageOptions={[25, 50, 100]} component="div" count={distribuidores.length}
rowsPerPage={rowsPerPage} page={page} onPageChange={handleChangePage}
onRowsPerPageChange={handleChangeRowsPerPage} labelRowsPerPage="Filas por página:"
/>

View File

@@ -30,7 +30,7 @@ const GestionarEmpresasPage: React.FC = () => {
const [apiErrorMessage, setApiErrorMessage] = useState<string | null>(null); // Para errores del modal (Create/Update/Delete)
const [page, setPage] = useState(0);
const [rowsPerPage, setRowsPerPage] = useState(5);
const [rowsPerPage, setRowsPerPage] = useState(25);
// Para el menú contextual de acciones por fila
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
@@ -227,7 +227,7 @@ const GestionarEmpresasPage: React.FC = () => {
</Table>
{/* Paginación */}
<TablePagination
rowsPerPageOptions={[5, 10, 25]}
rowsPerPageOptions={[25, 50, 100]}
component="div"
count={empresas.length}
rowsPerPage={rowsPerPage}

View File

@@ -49,7 +49,7 @@ const GestionarEntradasSalidasCanillaPage: React.FC = () => {
const [editingMovimiento, setEditingMovimiento] = useState<EntradaSalidaCanillaDto | null>(null);
const [page, setPage] = useState(0);
const [rowsPerPage, setRowsPerPage] = useState(10);
const [rowsPerPage, setRowsPerPage] = useState(25);
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
const [selectedRow, setSelectedRow] = useState<EntradaSalidaCanillaDto | null>(null);
const [selectedIdsParaLiquidar, setSelectedIdsParaLiquidar] = useState<Set<number>>(new Set());
@@ -452,7 +452,7 @@ const GestionarEntradasSalidasCanillaPage: React.FC = () => {
</TableBody>
</Table>
<TablePagination
rowsPerPageOptions={[10, 25, 50, 100]} component="div" count={movimientos.length}
rowsPerPageOptions={[25, 50, 100]} component="div" count={movimientos.length}
rowsPerPage={rowsPerPage} page={page} onPageChange={handleChangePage}
onRowsPerPageChange={handleChangeRowsPerPage} labelRowsPerPage="Filas por página:"
/>

View File

@@ -44,7 +44,7 @@ const GestionarEntradasSalidasDistPage: React.FC = () => {
const [editingMovimiento, setEditingMovimiento] = useState<EntradaSalidaDistDto | null>(null);
const [page, setPage] = useState(0);
const [rowsPerPage, setRowsPerPage] = useState(10);
const [rowsPerPage, setRowsPerPage] = useState(25);
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
const [selectedRow, setSelectedRow] = useState<EntradaSalidaDistDto | null>(null);
@@ -220,7 +220,7 @@ const GestionarEntradasSalidasDistPage: React.FC = () => {
</TableBody>
</Table>
<TablePagination
rowsPerPageOptions={[10, 25, 50]} component="div" count={movimientos.length}
rowsPerPageOptions={[25, 50, 100]} component="div" count={movimientos.length}
rowsPerPage={rowsPerPage} page={page} onPageChange={handleChangePage}
onRowsPerPageChange={handleChangeRowsPerPage} labelRowsPerPage="Filas por página:"
/>

View File

@@ -29,7 +29,7 @@ const GestionarOtrosDestinosPage: React.FC = () => {
const [apiErrorMessage, setApiErrorMessage] = useState<string | null>(null);
const [page, setPage] = useState(0);
const [rowsPerPage, setRowsPerPage] = useState(5);
const [rowsPerPage, setRowsPerPage] = useState(25);
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
const [selectedDestinoRow, setSelectedDestinoRow] = useState<OtroDestinoDto | null>(null);
@@ -193,7 +193,7 @@ const GestionarOtrosDestinosPage: React.FC = () => {
</TableBody>
</Table>
<TablePagination
rowsPerPageOptions={[5, 10, 25]}
rowsPerPageOptions={[25, 50, 100]}
component="div"
count={otrosDestinos.length}
rowsPerPage={rowsPerPage}

View File

@@ -47,7 +47,7 @@ const GestionarPublicacionesPage: React.FC = () => {
const [apiErrorMessage, setApiErrorMessage] = useState<string | null>(null);
const [page, setPage] = useState(0);
const [rowsPerPage, setRowsPerPage] = useState(5);
const [rowsPerPage, setRowsPerPage] = useState(25);
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
const [selectedPublicacionRow, setSelectedPublicacionRow] = useState<PublicacionDto | null>(null);
@@ -284,7 +284,7 @@ const GestionarPublicacionesPage: React.FC = () => {
</TableBody>
</Table>
<TablePagination
rowsPerPageOptions={[5, 10, 25]} component="div" count={publicaciones.length}
rowsPerPageOptions={[25, 50, 100]} component="div" count={publicaciones.length}
rowsPerPage={rowsPerPage} page={page} onPageChange={handleChangePage}
onRowsPerPageChange={handleChangeRowsPerPage} labelRowsPerPage="Filas por página:"
/>

View File

@@ -42,7 +42,7 @@ const GestionarSalidasOtrosDestinosPage: React.FC = () => {
const [editingSalida, setEditingSalida] = useState<SalidaOtroDestinoDto | null>(null);
const [page, setPage] = useState(0);
const [rowsPerPage, setRowsPerPage] = useState(10);
const [rowsPerPage, setRowsPerPage] = useState(25);
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
const [selectedRow, setSelectedRow] = useState<SalidaOtroDestinoDto | null>(null);
@@ -224,7 +224,7 @@ const GestionarSalidasOtrosDestinosPage: React.FC = () => {
</TableBody>
</Table>
<TablePagination
rowsPerPageOptions={[5, 10, 25]} component="div" count={salidas.length}
rowsPerPageOptions={[25, 50, 100]} component="div" count={salidas.length}
rowsPerPage={rowsPerPage} page={page} onPageChange={handleChangePage}
onRowsPerPageChange={handleChangeRowsPerPage} labelRowsPerPage="Filas por página:"
/>

View File

@@ -30,7 +30,7 @@ const GestionarZonasPage: React.FC = () => {
const [apiErrorMessage, setApiErrorMessage] = useState<string | null>(null);
const [page, setPage] = useState(0);
const [rowsPerPage, setRowsPerPage] = useState(5);
const [rowsPerPage, setRowsPerPage] = useState(25);
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
const [selectedZonaRow, setSelectedZonaRow] = useState<ZonaDto | null>(null);
@@ -201,7 +201,7 @@ const GestionarZonasPage: React.FC = () => {
</TableBody>
</Table>
<TablePagination
rowsPerPageOptions={[5, 10, 25]}
rowsPerPageOptions={[25, 50, 100]}
component="div"
count={zonas.length}
rowsPerPage={rowsPerPage}