diff --git a/src/Components/Card/CardProject/index.tsx b/src/Components/Card/CardProject/index.tsx new file mode 100644 index 0000000..8e5f774 --- /dev/null +++ b/src/Components/Card/CardProject/index.tsx @@ -0,0 +1,84 @@ +import { ConfirmDialog } from "primereact/confirmdialog"; +import { useContext, useState } from "react"; +import { useNavigate } from "react-router-dom"; +import { ClassroomContext } from "../../../Context/Classroom/context"; +import { ClassroomTypes } from "../../../Context/Classroom/type"; +import { Column, Padding, Row } from "../../../Styles/styles"; +import IconClassroom from "./../../../Assets/images/cardturmas.svg"; +import { Container } from "./style"; +import Icon from "../../Icon"; + +import pessoas from "../../../Assets/images/pessoasgray.svg" +import meeting from "../../../Assets/images/school_teacher.svg" +import styles from "../../../Styles"; + + +const CardProject = ({ + title, + meetingCount, + registrationCount, + id, +}: { + title: string; + meetingCount?: number; + registrationCount?: number, + id: number; +}) => { + const history = useNavigate(); + const [visible, setVisible] = useState(false); + + const props = useContext(ClassroomContext) as ClassroomTypes; + + return ( + <> + {}}> + + +
+ +
+ + +

{title}

+
+
+ {/*
{ + e.stopPropagation(); + setVisible(true); + }} + > + +
*/} +
+ {/* < Padding padding="8px" /> + + + +

+ Alunos: {registrationCount} +

+
+ + +

+ Encontros: {meetingCount} +

+
+
*/} +
+ setVisible(false)} + message="Tem certeza de que deseja prosseguir?" + header="Confirmation" + icon="pi pi-exclamation-triangle" + accept={() => props.DeleteClassroom(id)} + reject={() => setVisible(false)} + /> + + ); +}; + +export default CardProject; diff --git a/src/Components/Card/CardProject/style.tsx b/src/Components/Card/CardProject/style.tsx new file mode 100644 index 0000000..dbd6c68 --- /dev/null +++ b/src/Components/Card/CardProject/style.tsx @@ -0,0 +1,28 @@ +import styled from "styled-components"; +import styles from "../../../Styles"; + +export const Container = styled.div` + font-size: ${styles.typography.font.extraSmall}; + justify-content: space-between; + cursor: pointer; + + border: 1.22px solid rgba(219, 230, 255, 1); + background: ${styles.colors.colorCard}; + + border-radius: 16px; + + .boxQuantity { + display: flex; + color: white; + font-size: ${styles.typography.font.extraSmall}; + } + .boxYear { + border-radius: 25px; + background-color: ${styles.colors.green}; + width: 64px; + height: 24px; + text-align: center; + color: white; + padding: 9px, 16px, 9px, 16px; + } +`; diff --git a/src/Components/Card/CardTs/index.tsx b/src/Components/Card/CardTs/index.tsx new file mode 100644 index 0000000..d6fb864 --- /dev/null +++ b/src/Components/Card/CardTs/index.tsx @@ -0,0 +1,80 @@ +import { ConfirmDialog } from "primereact/confirmdialog"; +import { useContext, useState } from "react"; +import { useNavigate } from "react-router-dom"; +import { ClassroomContext } from "../../../Context/Classroom/context"; +import { ClassroomTypes } from "../../../Context/Classroom/type"; +import { Column, Padding, Row } from "../../../Styles/styles"; +import IconClassroom from "./../../../Assets/images/cardturmas.svg"; +import { Container } from "./style"; + + + +const CardTs = ({ + title, + meetingCount, + registrationCount, + id, +}: { + title: string; + meetingCount?: number; + registrationCount?: number, + id: number; +}) => { + const history = useNavigate(); + const [visible, setVisible] = useState(false); + + const props = useContext(ClassroomContext) as ClassroomTypes; + + return ( + <> + {}}> + + +
+ +
+ + +

{title}

+
+
+ {/*
{ + e.stopPropagation(); + setVisible(true); + }} + > + +
*/} +
+ {/* < Padding padding="8px" /> + + + +

+ Alunos: {registrationCount} +

+
+ + +

+ Encontros: {meetingCount} +

+
+
*/} +
+ setVisible(false)} + message="Tem certeza de que deseja prosseguir?" + header="Confirmation" + icon="pi pi-exclamation-triangle" + accept={() => props.DeleteClassroom(id)} + reject={() => setVisible(false)} + /> + + ); +}; + +export default CardTs; diff --git a/src/Components/Card/CardTs/style.tsx b/src/Components/Card/CardTs/style.tsx new file mode 100644 index 0000000..dbd6c68 --- /dev/null +++ b/src/Components/Card/CardTs/style.tsx @@ -0,0 +1,28 @@ +import styled from "styled-components"; +import styles from "../../../Styles"; + +export const Container = styled.div` + font-size: ${styles.typography.font.extraSmall}; + justify-content: space-between; + cursor: pointer; + + border: 1.22px solid rgba(219, 230, 255, 1); + background: ${styles.colors.colorCard}; + + border-radius: 16px; + + .boxQuantity { + display: flex; + color: white; + font-size: ${styles.typography.font.extraSmall}; + } + .boxYear { + border-radius: 25px; + background-color: ${styles.colors.green}; + width: 64px; + height: 24px; + text-align: center; + color: white; + padding: 9px, 16px, 9px, 16px; + } +`; diff --git a/src/Components/Menu/index.tsx b/src/Components/Menu/index.tsx index 0ea91a7..3080180 100644 --- a/src/Components/Menu/index.tsx +++ b/src/Components/Menu/index.tsx @@ -162,7 +162,7 @@ const Menu = ({ viewdMenu }: { viewdMenu: boolean }) => { ) : null} setVisibleModal(!visibleModal)} + onHide={() => setVisibleModal(false)} /> ); diff --git a/src/Pages/Login/Login.tsx b/src/Pages/Login/Login.tsx index f8b63a3..1537314 100644 --- a/src/Pages/Login/Login.tsx +++ b/src/Pages/Login/Login.tsx @@ -26,7 +26,13 @@ const Login = () => { const LoginPage = () => { const props = useContext(LoginContext) as LoginContextText; - const years = [2024, 2023, 2022, 2021]; + const years = [ + { value: 2024 }, + { value: 2023 }, + { value: 2022 }, + { value: 2021 }, + ]; + const [year, setYearState] = useState(); @@ -147,7 +153,8 @@ const LoginPage = () => { setYearState(e.target.value); setYear(e.target.value.toString()); }} - optionsLabel="" + optionsLabel="value" + optionsValue="value" value={year} /> diff --git a/src/Pages/Projects/ProjectsList/index.tsx b/src/Pages/Projects/ProjectsList/index.tsx index 27bed62..14ddf3a 100644 --- a/src/Pages/Projects/ProjectsList/index.tsx +++ b/src/Pages/Projects/ProjectsList/index.tsx @@ -1,15 +1,15 @@ import { Button } from "primereact/button"; -import { ROLE } from "../../../Controller/controllerGlobal"; -import { Container, Padding, Row } from "../../../Styles/styles"; -import { useNavigate } from "react-router-dom"; import { useContext } from "react"; +import { useNavigate } from "react-router-dom"; +import CardProject from "../../../Components/Card/CardProject"; import { AplicationContext } from "../../../Context/Aplication/context"; -import { PropsAplicationContext } from "../../../Types/types"; import ProjectListProvider, { ProjectListContext, } from "../../../Context/Project/ProjectList/context"; import { ProjectListTypes } from "../../../Context/Project/ProjectList/type"; -import CardClassroom from "../../../Components/Card/CardClassroom"; +import { ROLE } from "../../../Controller/controllerGlobal"; +import { Container, Padding, Row } from "../../../Styles/styles"; +import { PropsAplicationContext } from "../../../Types/types"; const ProjectsList = () => { return ( @@ -42,11 +42,12 @@ const ProjectsListPage = () => { /> )} +
{props.tsOne?.project?.map((item, index) => { return (
- +
); })} diff --git a/src/Pages/Register/Wizard/Steps/ChoiceYear/index.tsx b/src/Pages/Register/Wizard/Steps/ChoiceYear/index.tsx index ed8717b..c982a4f 100644 --- a/src/Pages/Register/Wizard/Steps/ChoiceYear/index.tsx +++ b/src/Pages/Register/Wizard/Steps/ChoiceYear/index.tsx @@ -11,42 +11,66 @@ import queryClient from "../../../../../Services/reactquery"; // import { RegistrationContext } from "../../containers/Registration/Context/context"; const ChoiceYear = () => { + const [year, setYearPage] = useState(); - const [year, setYearPage] = useState() + useEffect(() => { + setYearPage(parseInt(getYear()!)); + }, []); - useEffect(() => { - setYearPage(parseInt(getYear()!)) - }, []) + const props = useContext(RegisterContext) as RegisterTypes; - const props = useContext(RegisterContext) as RegisterTypes; + const years = [ + { value: 2024 }, + { value: 2023 }, + { value: 2022 }, + { value: 2021 }, + ]; - return ( - <> - - Bem-vindo ao Matrícula online, para
iniciar escolha o ano - e clique no botão abaixo

} /> - -
- { setYearPage(e.target.value); setYear(e.target.value); queryClient.refetchQueries("useRequestProjectsAndClassroom") }} options={[2024, 2023, 2022, 2021, 2020]} optionsLabel="" value={year} /> -
-
- - -
-
-
-
- - ); + return ( + <> + + + Bem-vindo ao Matrícula online, para
iniciar escolha o ano e + clique no botão abaixo +

+ } + /> + +
+ { + setYearPage(e.target.value); + setYear(e.target.value); + queryClient.refetchQueries("useRequestProjectsAndClassroom"); + }} + options={years} + optionsLabel="value" + value={year} + /> +
+
+ + +
+
+
+
+ + ); }; export default ChoiceYear; diff --git a/src/Pages/TecnologySocial/TecnologySocialList/index.tsx b/src/Pages/TecnologySocial/TecnologySocialList/index.tsx index 44a79c9..53b0c02 100644 --- a/src/Pages/TecnologySocial/TecnologySocialList/index.tsx +++ b/src/Pages/TecnologySocial/TecnologySocialList/index.tsx @@ -1,11 +1,11 @@ +import { Button } from "primereact/button"; import { useContext } from "react"; import { useNavigate } from "react-router-dom"; +import CardTs from "../../../Components/Card/CardTs"; import { AplicationContext } from "../../../Context/Aplication/context"; -import { PropsAplicationContext } from "../../../Types/types"; import { ROLE } from "../../../Controller/controllerGlobal"; import { Container, Padding, Row } from "../../../Styles/styles"; -import { Button } from "primereact/button"; -import CardClassroom from "../../../Components/Card/CardClassroom"; +import { PropsAplicationContext } from "../../../Types/types"; const TecnologySocial = () => { const history = useNavigate(); @@ -31,7 +31,7 @@ const TecnologySocial = () => { {propsAplication.project?.map((item, index) => { return (
- +
); })}