Skip to content

Commit

Permalink
design sistem
Browse files Browse the repository at this point in the history
  • Loading branch information
TI JONNY committed Mar 27, 2024
1 parent b50187b commit 0583c0a
Show file tree
Hide file tree
Showing 18 changed files with 106 additions and 63 deletions.
8 changes: 8 additions & 0 deletions src/Assets/images/personUser.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/Assets/images/pessoasgray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/Assets/images/school_teacher.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/Assets/images/turma.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/Assets/images/turmasPessoas.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 14 additions & 6 deletions src/Components/Card/CardClassroom/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { ConfirmDialog } from "primereact/confirmdialog";
import { useContext, useState } from "react";
import { ClassroomContext } from "../../../Context/Classroom/context";
import { ClassroomTypes } from "../../../Context/Classroom/type";
import IconClassroom from "./../../../Assets/images/turma.svg";


const CardClassroom = ({
title,
Expand All @@ -25,7 +27,9 @@ const CardClassroom = ({
<>
<Container className="card" onClick={() => history(`/turma/${id}`)}>
<Row id="space-between">
<h3>{title}</h3>
<Column>
<div className={"boxYear"}><Column style={{height: "100%"}} id="center">{year}</Column></div>
</Column>
<div
className="cursor-pointer"
onClick={(e) => {
Expand All @@ -37,11 +41,15 @@ const CardClassroom = ({
</div>
</Row>
<Padding padding="8px" />
<Column>
<div className={"boxDescriptionScheduleSubtitle"}>Turma</div>
<Padding />
<div className={"boxYear"}>{year}</div>
</Column>
<Row>
<div className={`boxQuantity`}>
<img src={IconClassroom} alt="" style={{ height: 40 }} />
</div>
<Padding padding="8px" />
<Column id="center">
<h3>{title}</h3>
</Column>
</Row>
</Container>
<ConfirmDialog
visible={visible}
Expand Down
3 changes: 2 additions & 1 deletion src/Components/Card/CardClassroom/style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ export const Container = styled.div`
}
.boxYear {
border-radius: 25px;
background-color: ${styles.colors.colorsBaseProductLightActive};
background-color: ${styles.colors.green};
width: 64px;
height: 24px;
text-align: center;
color: white;
padding: 9px, 16px, 9px, 16px;
Expand Down
12 changes: 5 additions & 7 deletions src/Components/Card/CardMeeting/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Message } from "primereact/message";
const CardMeeting = ({ title, data, status, idMeeting }: { title: string; data: string, status: string, idMeeting: number }) => {
const history = useNavigate();

const {id} = useParams()
const { id } = useParams()

return (
<Container className="card" onClick={() => history(`/turma/${id}/encontros/${idMeeting}`)}>
Expand All @@ -21,18 +21,16 @@ const CardMeeting = ({ title, data, status, idMeeting }: { title: string; data:
<Padding padding="8px" />
<Row id="space-between">
<Column>
<div className={"boxDescriptionScheduleSubtitle"}>Encontro</div>
<Padding />
<div className={"boxYear"}>
<Column id="center" style={{ height: "100%" }}>
{formatarData(new Date(data))}
<Row>
<p>Data: </p><Padding /> {formatarData(new Date(data))}
</Row>
</Column>
</div>
</Column>
<Column>
<div className={"boxDescriptionScheduleSubtitle"}>Status</div>
<Padding />
{status === Status.PENDING ? <Message severity="warn" text="Pendente" /> : status === Status.APPROVED ? <Message severity="success" text="Aprovado" /> : status === Status.REPROVED ? <Message severity="error" text="Recusado" /> :null}
{status === Status.PENDING ? <Message severity="warn" text="Pendente" /> : status === Status.APPROVED ? <Message severity="success" text="Aprovado" /> : status === Status.REPROVED ? <Message severity="error" text="Recusado" /> : null}
</Column>
</Row>
</Container>
Expand Down
8 changes: 3 additions & 5 deletions src/Components/Card/CardMeeting/style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ export const Container = styled.div`
}
.boxYear {
border-radius: 25px;
background-color: ${styles.colors.colorsBaseProductNormal};
width: 102px;
height: 32px;
height: 100%;
justify-content: center;
align-items: center;
text-align: center;
color: white;
padding: 9px, 16px, 9px, 16px;
font-weight: 600;
color: ${styles.colors.colorsBaseInkLighterActive};
}
`;
12 changes: 12 additions & 0 deletions src/Components/Empty/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Icon from "../Icon";

const Empty = ({title}: {title: string}) => {
return(
<div className="card w- md:w-full">
<Icon icon="pi pi-warning" />
Sem {title}
</div>
)
}

export default Empty;
9 changes: 5 additions & 4 deletions src/Components/Menu/Item/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useNavigate, } from "react-router-dom"
import { Container, Text } from "./style";
import { useNavigate, } from "react-router-dom";
import { Column, Padding, Row } from "../../../Styles/styles";
import Icon from "../../Icon";
import { Container, Text } from "./style";

interface Propsitem {
icon: string,
Expand All @@ -26,7 +25,9 @@ const Item = ({ icon, path, text, active, funcActiv }: Propsitem) => {
<Padding />
<Text active={active}>
<Column id="center">
<Icon size="1.2rem" icon={icon} />
<div className={`boxQuantity`}>
<img src={icon} alt="" style={{ height: 30 }} />
</div>
</Column>
<Padding />
<Column id="center">
Expand Down
22 changes: 9 additions & 13 deletions src/Components/Menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { useContext, useEffect, useState } from "react";
import { Button } from "primereact/button";
import { Dialog } from "primereact/dialog";
import TagLogin from "../../Assets/images/logo.svg";
import { AplicationContext } from "../../Context/Aplication/context";
import { ROLE } from "../../Controller/controllerGlobal";
import {
getMenuItem,
getYear,
Expand All @@ -11,26 +13,21 @@ import {
} from "../../Services/localstorage";
import styles from "../../Styles";
import { Column, Padding, Row } from "../../Styles/styles";
import { PropsAplicationContext } from "../../Types/types";
import DropdownComponent from "../Dropdown";
import Icon from "../Icon";
import Item from "./Item";
import { Container, TopBar } from "./style";
import { AplicationContext } from "../../Context/Aplication/context";
import { PropsAplicationContext } from "../../Types/types";
import { ROLE } from "../../Controller/controllerGlobal";
import { Container } from "./style";
import turmas from "../../Assets/images/turmasPessoas.svg"

import user from "../../Assets/images/personUser.svg"

const Menu = ({ viewdMenu }: { viewdMenu: boolean }) => {
const [active, setActive] = useState(parseInt(getMenuItem()!));
const [visibleModal, setVisibleModal] = useState(false);
const props = useContext(AplicationContext) as PropsAplicationContext
return (
<Container active={viewdMenu}>
<Row>
<TopBar style={{ backgroundColor: "#667DF4" }} />
<TopBar style={{ backgroundColor: "#F45A5A" }} />
<TopBar style={{ backgroundColor: "#66D654" }} />
<TopBar style={{ backgroundColor: "#EADA48" }} />
</Row>
<Padding padding="16px">
<Row id="center">
<img src={TagLogin} style={{ width: "128px" }} alt=""></img>
Expand Down Expand Up @@ -71,7 +68,7 @@ const Menu = ({ viewdMenu }: { viewdMenu: boolean }) => {
}}
active={active === 1 ? true : false}
path={"/turma"}
icon={"pi pi-sitemap"}
icon={turmas}
/>
{/* <Padding />
<Item
Expand All @@ -93,10 +90,9 @@ const Menu = ({ viewdMenu }: { viewdMenu: boolean }) => {
}}
active={active === 2 ? true : false}
path={"/users"}
icon={"pi pi-users"}
icon={user}
/> : null}
</Padding>

) : null}
<ModalYear
visible={visibleModal}
Expand Down
Loading

0 comments on commit 0583c0a

Please sign in to comment.