Skip to content

Commit 4f68b56

Browse files
committed
pontos de correções da ultima reunião
1 parent f511dea commit 4f68b56

File tree

19 files changed

+495
-324
lines changed

19 files changed

+495
-324
lines changed

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
REACT_APP_API_PATH=http://localhost:3000/
2-
# REACT_APP_API_PATH=https://br-ipti-beneficiarios.azurewebsites.net/
1+
# REACT_APP_API_PATH=http://localhost:3000/
2+
REACT_APP_API_PATH=https://br-ipti-beneficiarios.azurewebsites.net/

src/Assets/css/styles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122

123123
.card {
124124
box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;
125-
padding: 2rem;
125+
padding: 1rem;
126126
border-radius: 10px;
127127
margin-bottom: 1rem;
128128
}

src/Assets/images/calendar.svg

Lines changed: 8 additions & 0 deletions
Loading

src/Assets/images/meeting_card.svg

Lines changed: 7 additions & 0 deletions
Loading
Lines changed: 8 additions & 0 deletions
Loading

src/Components/Card/CardMeeting/index.tsx

Lines changed: 58 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,20 @@ import { useNavigate, useParams } from "react-router-dom";
22
import { Container } from "./style";
33
import { Column, Padding, Row } from "../../../Styles/styles";
44
import Icon from "../../Icon";
5-
import { formatarData, Status } from "../../../Controller/controllerGlobal";
6-
import { Message } from "primereact/message";
5+
import {
6+
formatarData,
7+
ROLE,
8+
Status,
9+
} from "../../../Controller/controllerGlobal";
710
import { useContext, useState } from "react";
811
import { MeetingListContext } from "../../../Context/Classroom/Meeting/MeetingList/context";
912
import { MeetingListTypes } from "../../../Context/Classroom/Meeting/MeetingList/type";
1013
import { ConfirmDialog } from "primereact/confirmdialog";
14+
import { AplicationContext } from "../../../Context/Aplication/context";
15+
import { PropsAplicationContext } from "../../../Types/types";
16+
import IconMeeting from "./../../../Assets/images/meeting_card.svg";
17+
import IconCalendar from "./../../../Assets/images/calendar.svg";
18+
import IconStatus from "./../../../Assets/images/published_with_changes.svg";
1119

1220
const CardMeeting = ({
1321
title,
@@ -23,6 +31,10 @@ const CardMeeting = ({
2331
const history = useNavigate();
2432
const [visible, setVisible] = useState(false);
2533

34+
const propsAplication = useContext(
35+
AplicationContext
36+
) as PropsAplicationContext;
37+
2638
const { id } = useParams();
2739

2840
const props = useContext(MeetingListContext) as MeetingListTypes;
@@ -34,38 +46,61 @@ const CardMeeting = ({
3446
onClick={() => history(`/turma/${id}/encontros/${idMeeting}`)}
3547
>
3648
<Row id="space-between">
37-
<h3>{title}</h3>
38-
<div
39-
className="cursor-pointer"
40-
onClick={(e) => {
41-
e.stopPropagation();
42-
setVisible(true);
43-
}}
44-
>
45-
<Icon icon="pi pi-trash" size="1rem" />
46-
</div>
49+
<Row>
50+
<div className={`boxQuantity`}>
51+
<img src={IconMeeting} alt="" style={{ height: 32 }} />
52+
</div>
53+
<Padding padding="4px" />
54+
<Column id="center">
55+
<h3>{title}</h3>
56+
</Column>
57+
</Row>
58+
{(propsAplication.user?.role === ROLE.ADMIN ||
59+
propsAplication.user?.role === ROLE.COORDINATORS) && (
60+
<div
61+
className="cursor-pointer"
62+
onClick={(e) => {
63+
e.stopPropagation();
64+
setVisible(true);
65+
}}
66+
>
67+
<Icon icon="pi pi-trash" size="1rem" />
68+
</div>
69+
)}
4770
</Row>
4871
<Padding padding="8px" />
4972
<Row id="space-between">
5073
<Column>
5174
<div className={"boxYear"}>
5275
<Column id="center" style={{ height: "100%" }}>
5376
<Row>
54-
<p>Data: </p>
55-
<Padding /> {formatarData(data)}
77+
<img
78+
src={IconCalendar}
79+
alt=""
80+
style={{ height: 16, marginRight: 2 }}
81+
/>
82+
<p style={{ fontSize: "14px" }}>Data: {formatarData(data)}</p>
5683
</Row>
5784
</Column>
5885
</div>
5986
</Column>
60-
<Column>
61-
{status === Status.PENDING ? (
62-
<Message severity="warn" />
63-
) : status === Status.APPROVED ? (
64-
<Message severity="success" />
65-
) : status === Status.REPROVED ? (
66-
<Message severity="error" />
67-
) : null}
68-
</Column>
87+
<Row>
88+
<img
89+
src={IconStatus}
90+
alt=""
91+
style={{ height: 16, marginRight: 2 }}
92+
/>
93+
<Row style={{ fontSize: "14px" }}>
94+
Status:{" "}
95+
{status === Status.PENDING ? (
96+
<p style={{ fontWeight: "600" }}>Pendente</p>
97+
) : status === Status.APPROVED ? (
98+
<p style={{ fontWeight: "600" }}>Aprovado</p>
99+
) : status === Status.REPROVED ? (
100+
<p style={{ fontWeight: "600" }}>Reprovado</p>
101+
) : null}
102+
</Row>
103+
</Row>
69104
</Row>
70105
</Container>
71106
<ConfirmDialog

src/Components/Card/CardMeeting/style.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,28 @@ import styled from "styled-components";
22
import styles from "../../../Styles";
33

44
export const Container = styled.div`
5-
color: ${styles.colors.grayClear};
6-
font-size: ${styles.typography.font.extraSmall};
75
justify-content: space-between;
86
cursor: pointer;
97
8+
border: 1.22px solid rgba(219, 230, 255, 1);
9+
background: ${styles.colors.colorCard};
10+
11+
border-radius: 16px;
12+
1013
.boxQuantity {
1114
display: flex;
1215
color: white;
13-
font-size: ${styles.typography.font.extraSmall};
16+
}
17+
18+
p {
19+
font-weight: 400;
20+
font-size: 4;
1421
}
1522
.boxYear {
1623
border-radius: 25px;
1724
height: 100%;
1825
justify-content: center;
1926
align-items: center;
2027
text-align: center;
21-
font-weight: 600;
22-
color: ${styles.colors.colorsBaseInkLighterActive};
2328
}
2429
`;

src/Context/Beneficiaries/BeneficiaresCreate/state.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export const BeneficiariesCreateState = () => {
4747
project: undefined,
4848
status: "",
4949
classroom: 0,
50+
deficiency_description: ""
5051
};
5152
return {
5253
initialValue,

src/Context/Beneficiaries/BeneficiaresCreate/type.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ export interface BeneficiariesCreateType {
1515
status: string;
1616
classroom: number;
1717
zone: number | undefined,
18-
project: number | undefined
18+
project: number | undefined,
19+
deficiency_description: string | undefined
1920
};
2021
tsOne: Tsone | undefined;
2122
project: any | undefined;

src/Context/Beneficiaries/BeneficiaresEdit/state.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ export const BeneficiariesEditState = () => {
6464
responsable_cpf: registrations?.responsable_cpf,
6565
responsable_telephone: registrations?.responsable_telephone,
6666
status: getStatus(registrations?.status!),
67+
deficiency_description: registrations?.deficiency_description
68+
6769
};
6870

6971
const CreateRegisterClassroom = (data: CreateRegistrationClassroomType) => {

src/Context/Classroom/Registration/state.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ export const RegistrationClassroomState = () => {
3636
responsable_cpf: registration?.registration.responsable_cpf,
3737
responsable_telephone: registration?.registration.responsable_telephone,
3838
status: getStatus(registration?.status!),
39+
deficiency_description: registration?.registration.deficiency_description
40+
3941
};
4042

4143
const handleUpdateRegistration = (data: UpdateRegister, id: number) => {

src/Context/Classroom/Registration/type.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export interface UpdateRegister
2828
responsable_telephone: string | undefined;
2929
status: {id: string, name: string} | undefined;
3030
registration_classroom_id?: number
31+
deficiency_description: any
3132
}
3233
export interface RegistrationType {
3334
id: number

src/Pages/Beneficiaries/BeneficiariesCreate/index.tsx

Lines changed: 43 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ const RegistrationPage = () => {
4545
}
4646
return true;
4747
}),
48-
responsable_telephone: Yup.string().required(
49-
"Telefone é obrigatório"
50-
),
48+
responsable_telephone: Yup.string().required("Telefone é obrigatório"),
5149
birthday: Yup.string()
5250
.nullable()
5351
.required("Data de nascimento é obrigatória"),
@@ -196,36 +194,48 @@ const RegistrationPage = () => {
196194
</div>
197195
) : null}
198196
</div>
199-
<div>
197+
{values.deficiency && (
200198
<div className="col-12 md:col-6">
201-
<label>Zona *</label>
199+
<label>Qual deficiência?</label>
202200
<Padding />
203-
<Column id="end">
204-
<Row className="gap-2">
205-
<RadioButtonComponent
206-
value={1}
207-
checked={values.zone === 1}
208-
onChange={handleChange}
209-
name="zone"
210-
label="Rural"
211-
/>
212-
<RadioButtonComponent
213-
value={2}
214-
checked={values.zone === 2}
215-
onChange={handleChange}
216-
name="zone"
217-
label="Urbana"
218-
/>
219-
</Row>
220-
</Column>
221-
{errors.zone && touched.zone ? (
222-
<div style={{ color: "red", marginTop: "8px" }}>
223-
{errors.zone}
224-
</div>
225-
) : null}
201+
<TextInput
202+
value={values.deficiency_description}
203+
name="deficiency_description"
204+
onChange={handleChange}
205+
placeholder="Qual deficiência ?"
206+
/>
226207
</div>
227-
</div>
208+
)}
228209
</div>{" "}
210+
<div className="grid">
211+
<div className="col-12 md:col-6">
212+
<label>Zona *</label>
213+
<Padding />
214+
<Column id="end">
215+
<Row className="gap-2">
216+
<RadioButtonComponent
217+
value={1}
218+
checked={values.zone === 1}
219+
onChange={handleChange}
220+
name="zone"
221+
label="Rural"
222+
/>
223+
<RadioButtonComponent
224+
value={2}
225+
checked={values.zone === 2}
226+
onChange={handleChange}
227+
name="zone"
228+
label="Urbana"
229+
/>
230+
</Row>
231+
</Column>
232+
{errors.zone && touched.zone ? (
233+
<div style={{ color: "red", marginTop: "8px" }}>
234+
{errors.zone}
235+
</div>
236+
) : null}
237+
</div>
238+
</div>
229239
<Padding padding="8px" />
230240
<h3>Dados Responsavel</h3>
231241
<Padding />
@@ -292,7 +302,10 @@ const RegistrationPage = () => {
292302
value={props.project}
293303
placerholder="Selecione o projeto"
294304
name="project"
295-
onChange={(e) => {props.setProject(e.target.value); setFieldValue("project", e.target.value)}}
305+
onChange={(e) => {
306+
props.setProject(e.target.value);
307+
setFieldValue("project", e.target.value);
308+
}}
296309
options={props.tsOne?.project}
297310
optionsLabel="name"
298311
optionsValue="id"

0 commit comments

Comments
 (0)