Skip to content

Commit

Permalink
justification meeting and status up registration
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnypaulino committed Apr 2, 2024
1 parent ec379d5 commit 17079a4
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
REACT_APP_API_PATH=http://localhost:3000/
REACT_APP_API_PATH=https://br-ipti-beneficiarios.azurewebsites.net/
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ const DataMeeting = () => {
options={status}
/>
</div>
</div>
<div className="grid">
<div className="col-12 md:col-6">
<label>Justificativa</label>
<Padding />
Expand Down
18 changes: 14 additions & 4 deletions src/Pages/Classroom/ClassroomOne/MeetingList/Meeting/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import MeetingListRegistrationProvider, {
MeetingListRegistrationContext,
} from "../../../../../Context/Classroom/Meeting/MeetingListRegistration/context";
import { MeetingListRegisterTypes } from "../../../../../Context/Classroom/Meeting/MeetingListRegistration/type";
import { Status } from "../../../../../Controller/controllerGlobal";
import { ROLE, Status } from "../../../../../Controller/controllerGlobal";
import { Container, Padding } from "../../../../../Styles/styles";
import AttendanceList from "./AttendanceListArchives";
import Beneficiarios from "./Beneficiarios";
import DataMeeting from "./DataMeeting";
import UploadArchivesAttendanceList from "./UploadArchivesAttendanceList";
import { AplicationContext } from "../../../../../Context/Aplication/context";
import { PropsAplicationContext } from "../../../../../Types/types";

const Meeting = () => {
return (
Expand All @@ -23,8 +25,11 @@ const MeetingPage = () => {
const props = useContext(
MeetingListRegistrationContext
) as MeetingListRegisterTypes;



const propsAplication = useContext(
AplicationContext
) as PropsAplicationContext;

return (
<Container>
{props.meeting ? (
Expand All @@ -49,7 +54,12 @@ const MeetingPage = () => {
: "info"
}
/>
<Padding padding="16px" />
<Padding />
{props.meeting.justification &&
propsAplication.user?.role === ROLE.REAPPLICATORS && (
<h4>Justificativa: {props.meeting.justification}</h4>
)}
<Padding padding="16px" />
<DataMeeting />
<Padding padding="16px" />
{true ? <UploadArchivesAttendanceList /> : <AttendanceList />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,47 @@ const RegistrationPage = () => {
RegistrationDetailsContext
) as RegistrationDetailsTypes;

const { idRegistration, id } = useParams()
const { data: classroom } = useFetchRequestClassroomOne(parseInt(id!))
const { idRegistration, id } = useParams();
const { data: classroom } = useFetchRequestClassroomOne(parseInt(id!));

return (
<Container>
<h2>{classroom?.name}</h2>
<Padding padding="16px" />
{props.registration ? (
<Formik initialValues={props.initialValue} onSubmit={(values) => { props.handleUpdateRegistration({ ...values }, parseInt(idRegistration!)) }}>
<Formik
initialValues={props.initialValue}
onSubmit={(values) => {
props.handleUpdateRegistration(
{ ...values },
parseInt(idRegistration!)
);
}}
>
{({ values, handleChange }) => {
return (
<Form>
<Button label="Salvar" />
<Padding padding="8px" />
<div className="grid">
<div className="col-12 md:col-6">
<label>Status</label>
<Padding />
<DropdownComponent
value={values.status}
onChange={handleChange}
name="status"
placerholder="Status"
optionsLabel="name"
options={[
{ id: Status.APPROVED, name: "Aprovado" },
{ id: Status.REPROVED, name: "Reprovado" },
{ id: Status.PENDING, name: "Pedente" },
]}
/>
</div>
</div>{" "}
<Padding padding="8px" />
<h3>Dados basicos</h3>
<Padding />
<div className="grid">
Expand Down Expand Up @@ -115,24 +142,6 @@ const RegistrationPage = () => {
/>
</div>
</div>{" "}
<div className="grid">
<div className="col-12 md:col-6">
<label>Status</label>
<Padding />
<DropdownComponent
value={values.status}
onChange={handleChange}
name="status"
placerholder="Status"
optionsLabel="name"
options={[
{id: Status.APPROVED, name: "Aprovado"},
{id: Status.REPROVED, name: "Reprovado"},
{id: Status.PENDING, name: "Pedente"},
]}
/>
</div>
</div>{" "}
<Padding padding="8px" />
<h3>Dados Responsavel</h3>
<Padding />
Expand Down
1 change: 1 addition & 0 deletions src/Pages/Login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const LoginPage = () => {
height: "100%",
width: "100%",
position: "relative",
overflowY: "auto"
}}
>
<div className="col-11 md:col-9">
Expand Down

0 comments on commit 17079a4

Please sign in to comment.