-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd5f3dd
commit e3881d1
Showing
9 changed files
with
297 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ( | ||
<> | ||
<Container className="card" onClick={() => {}}> | ||
<Row id="space-between"> | ||
<Row > | ||
<div className={`boxQuantity`}> | ||
<img src={IconClassroom} alt="" style={{ height: 32 }} /> | ||
</div> | ||
<Padding padding="4px" /> | ||
<Column id="center"> | ||
<h3>{title}</h3> | ||
</Column> | ||
</Row> | ||
{/* <div | ||
className="cursor-pointer" | ||
onClick={(e) => { | ||
e.stopPropagation(); | ||
setVisible(true); | ||
}} | ||
> | ||
<Icon icon="pi pi-trash" color={styles.colors.colorGrayElephant} size="1rem" fontWeight="900" /> | ||
</div> */} | ||
</Row> | ||
{/* < Padding padding="8px" /> | ||
<Row style={{ gap: 16 }}> | ||
<Row style={{ gap: 8, alignItems: "center" }}> | ||
<img src={pessoas} alt="" style={{ width: 24 }} /> | ||
<p> | ||
Alunos: {registrationCount} | ||
</p> | ||
</Row> | ||
<Row style={{ gap: 8, alignItems: "center" }}> | ||
<img src={meeting} alt="" style={{ width: 19 }} /> | ||
<p> | ||
Encontros: {meetingCount} | ||
</p> | ||
</Row> | ||
</Row> */} | ||
</Container> | ||
<ConfirmDialog | ||
visible={visible} | ||
onHide={() => 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ( | ||
<> | ||
<Container className="card" onClick={() => {}}> | ||
<Row id="space-between"> | ||
<Row > | ||
<div className={`boxQuantity`}> | ||
<img src={IconClassroom} alt="" style={{ height: 32 }} /> | ||
</div> | ||
<Padding padding="4px" /> | ||
<Column id="center"> | ||
<h3>{title}</h3> | ||
</Column> | ||
</Row> | ||
{/* <div | ||
className="cursor-pointer" | ||
onClick={(e) => { | ||
e.stopPropagation(); | ||
setVisible(true); | ||
}} | ||
> | ||
<Icon icon="pi pi-trash" color={styles.colors.colorGrayElephant} size="1rem" fontWeight="900" /> | ||
</div> */} | ||
</Row> | ||
{/* < Padding padding="8px" /> | ||
<Row style={{ gap: 16 }}> | ||
<Row style={{ gap: 8, alignItems: "center" }}> | ||
<img src={pessoas} alt="" style={{ width: 24 }} /> | ||
<p> | ||
Alunos: {registrationCount} | ||
</p> | ||
</Row> | ||
<Row style={{ gap: 8, alignItems: "center" }}> | ||
<img src={meeting} alt="" style={{ width: 19 }} /> | ||
<p> | ||
Encontros: {meetingCount} | ||
</p> | ||
</Row> | ||
</Row> */} | ||
</Container> | ||
<ConfirmDialog | ||
visible={visible} | ||
onHide={() => 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.