diff --git a/.env b/.env index 77602a0..7c3a28b 100644 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ -REACT_APP_API_PATH=http://localhost:3000/ -# REACT_APP_API_PATH=https://br-ipti-beneficiarios.azurewebsites.net/ \ No newline at end of file +# REACT_APP_API_PATH=http://localhost:3000/ +REACT_APP_API_PATH=https://br-ipti-beneficiarios.azurewebsites.net/ \ No newline at end of file diff --git a/src/Components/Menu/index.tsx b/src/Components/Menu/index.tsx index e499b73..70281b1 100644 --- a/src/Components/Menu/index.tsx +++ b/src/Components/Menu/index.tsx @@ -43,6 +43,14 @@ const Menu = ({ viewdMenu }: { viewdMenu: boolean }) => { const [active, setActive] = useState(parseInt(getMenuItem()!)); const [visibleModal, setVisibleModal] = useState(false); const props = useContext(AplicationContext) as PropsAplicationContext; + + const itemMenu = getMenuItem() + + useEffect(() => { + setActive(parseInt(getMenuItem()!)) + }, [itemMenu]) + + return ( diff --git a/src/Pages/Classroom/ClassroomOne/MeetingList/Meeting/Beneficiarios/index.tsx b/src/Pages/Classroom/ClassroomOne/MeetingList/Meeting/Beneficiarios/index.tsx index 1be0408..b8f6992 100644 --- a/src/Pages/Classroom/ClassroomOne/MeetingList/Meeting/Beneficiarios/index.tsx +++ b/src/Pages/Classroom/ClassroomOne/MeetingList/Meeting/Beneficiarios/index.tsx @@ -24,7 +24,6 @@ import { } from "../../../../../../Controller/controllerGlobal"; import styles from "../../../../../../Styles"; import { Padding, Row } from "../../../../../../Styles/styles"; -import Swal from "sweetalert2"; pdfMake.vfs = pdfFonts.pdfMake.vfs; const StyleComponent = styled.div` @@ -333,20 +332,13 @@ const Beneficiarios = () => { icon="pi pi-save" tooltip={(props.meeting?.meeting_archives?.length! === 0 || props.meeting?.status === Status.APPROVED) ? "Para conseguir salvar a lista, é necessario adicionar um arquivo como uma evidencia da aula" : "Salvar as faltas do encontro"} - tooltipOptions={{disabled: true}} - + tooltipOptions={{ disabled: true }} onClick={() => { - if((props.meeting?.meeting_archives?.length! === 0 || - props.meeting?.status === Status.APPROVED)){ - Swal.fire({title: "Para conseguir salvar a lista, é necessario adicionar um arquivo como uma evidência da aula", icon: 'error',}) - } else{ + props.CreateFouls({ + meeting: props.meeting?.id!, + registration: FilterId(selectedProducts), + }); - console.log() - props.CreateFouls({ - meeting: props.meeting?.id!, - registration: FilterId(selectedProducts), - }); - } }} />