Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: listado de alumnos que no abonaron matricula #143

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Tabs, TabList, Tab, TabPanels, TabPanel } from '@chakra-ui/react';
import TablaAlumnos from './TablaAlumnos';
import { FetchFirmantes } from '../../../../API/AlumnosCompromisoPago';
import { FetchNoFirmantes } from '../../../../API/AlumnosCompromisoPago';
import Pestaña from './Pestaña';

const AlumnosCompromisoPago: React.FC = () => {
const [index, setIndex] = useState(0); // Estado para manejar la pestaña seleccionada
Expand All @@ -11,32 +12,8 @@ const AlumnosCompromisoPago: React.FC = () => {
<div>
<Tabs variant="enclosed" index={index} onChange={setIndex} isLazy>
<TabList display="flex" justifyContent="center" alignItems="center" borderBottom="2px solid" borderColor="gray.200">
<Tab
_selected={{
borderBottom: "2px solid",
borderColor: "blue.500",
color: "blue.500",
borderTop: "none",
borderLeft: "none",
borderRight: "none"
}}
_focus={{ boxShadow: "none" }}
>
Firmaron
</Tab>
<Tab
_selected={{
borderBottom: "2px solid",
borderColor: "blue.500",
color: "blue.500",
borderTop: "none",
borderLeft: "none",
borderRight: "none"
}}
_focus={{ boxShadow: "none" }}
>
No firmaron
</Tab>
<Pestaña title="Firmaron" />
<Pestaña title="No Firmaron" />
</TabList>

<TabPanels>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
import React from 'react';
import React, { useState } from 'react';
import { Tabs, TabList, Tab, TabPanels, TabPanel } from '@chakra-ui/react';
import TablaAlumnos from './TablaAlumnos';
import { FetchFirmantes } from '../../../../API/AlumnosCompromisoPago';
import { FetchNoFirmantes } from '../../../../API/AlumnosCompromisoPago';
import Pestaña from './Pestaña';

const Matricula: React.FC = () => {
const [index, setIndex] = useState(0); // Estado para manejar la pestaña seleccionada

return (
<TablaAlumnos fetchFunction={FetchFirmantes} title="Alumnos que abonaron matricula" />
<div>
<Tabs variant="enclosed" index={index} onChange={setIndex} isLazy>
<TabList display="flex" justifyContent="center" alignItems="center" borderBottom="2px solid" borderColor="gray.200">
<Pestaña title="Abonaron" />
<Pestaña title="No Abonaron" />
</TabList>

<TabPanels>
<TabPanel>
<TablaAlumnos fetchFunction={FetchFirmantes} title="Alumnos que abonaron matrícula"/>
</TabPanel>
<TabPanel>
<TablaAlumnos fetchFunction={FetchNoFirmantes} title="Alumnos que no abonaron matrícula"/>
</TabPanel>
</TabPanels>
</Tabs>
</div>
);
};

export default Matricula;
export default Matricula;
26 changes: 26 additions & 0 deletions FrontAdmin/src/components/Pages/Estadisticas/SubPages/Pestaña.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from 'react';
import { Tab } from '@chakra-ui/react';

interface CustomTabProps {
title: string;
}

const CustomTab: React.FC<CustomTabProps> = ({ title }) => {
return (
<Tab
_selected={{
borderBottom: "2px solid",
borderColor: "blue.500",
color: "blue.500",
borderTop: "none",
borderLeft: "none",
borderRight: "none",
}}
_focus={{ boxShadow: "none" }}
>
{title}
</Tab>
);
};

export default CustomTab;
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const TablaAlumnos: React.FC<TablaAlumnosProps> = ({ fetchFunction, title }) =>
<Table>
<Thead>
<Tr>
{['full_name', 'legajo', 'dni', 'estado_financiero', 'anio_ingreso'].map((field) => (
{['APELLIDO Y NOMBRE', 'LEGAJO', 'DNI', 'ESTADO FINANCIERO', 'AÑO INGRESO'].map((field) => (
<Th key={field} fontFamily="Helvetica" fontWeight="900">
{field.toUpperCase()}
<IconButton
Expand Down
Loading