Skip to content

Commit

Permalink
status classroom, status classrom_registration
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnypaulino committed Jan 6, 2025
1 parent 917dadb commit e8f8241
Showing 1 changed file with 30 additions and 40 deletions.
70 changes: 30 additions & 40 deletions src/Pages/InitialPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,13 @@ const InitialPage = () => {
) as PropsAplicationContext;

const [dates, setDates] = useState<Nullable<(Date | null)[]>>(null);
<<<<<<< HEAD
const [, setFormattedDates] = useState<{
start: string;
end: string;
}>({
start: "",
end: "",
});
=======

>>>>>>> 6d59672062ed8c89ceb3ffff10c7bc16063878d8
const [ts, setTs] = useState<number | undefined>();
const [chartData, setChartData] = useState<any>(null);

Expand All @@ -95,6 +91,8 @@ const InitialPage = () => {
const start = formatDate(dates[0]);
const end = formatDate(dates[1]);

setFormattedDates({ start, end });

const fetchData = async () => {
try {
const response = await requestChartMatriculated(start, end);
Expand Down Expand Up @@ -154,40 +152,32 @@ const InitialPage = () => {
title={`Bem vindo, ${propsAplication.user?.name}!`}
description="Visualização dos dados gerais do meuBen."
>
<Row
id="space-between"
style={{
width: "100%",
display: "flex",
alignItems: "center",
}}
>
{propsAplication.project && (
<Row id="end" style={{ flex: 1, marginRight: "10px" }}>
<DropdownComponent
options={[
...propsAplication.project,
{ id: undefined, name: "Todos" },
]}
optionsLabel="name"
optionsValue="id"
value={ts}
onChange={(e) => setTs(e.target.value)}
placerholder="Filtrar por Tecnologia"
/>
</Row>
)}
{propsAplication.user?.role === ROLE.ADMIN && (
<Row id="end">
<Button
label="Baixar CSV"
icon="pi pi-download"
iconPos="left"
onClick={downloadCSV}
/>
</Row>
)}
</Row>
{propsAplication.user?.role === ROLE.ADMIN && (
<Row id="end">
<Button
label="Baixar CSV"
icon="pi pi-download"
iconPos="left"
onClick={downloadCSV}
/>
</Row>
)}
<Padding padding="8px" />
{propsAplication.project && (
<Row id="end">
<DropdownComponent
options={[
...propsAplication.project,
{ id: undefined, name: "Todos" },
]}
optionsLabel="name"
optionsValue="id"
value={ts}
onChange={(e) => setTs(e.target.value)}
placerholder="Filtrar por Tecnologia"
/>
</Row>
)}

<Padding padding="16px" />
<div className="grid">
Expand All @@ -200,7 +190,7 @@ const InitialPage = () => {
</div>
<div className="col-12 md:col-4 lg:col-2">
<CardQuant
title="Total de planos de trabalho"
title="Total de Projetos"
quant={chart?.totalProjects!}
color="blue"
/>
Expand Down Expand Up @@ -235,7 +225,7 @@ const InitialPage = () => {
</div>
</div>

<Padding padding="10px" />
<Padding padding="20px" />
<div
className="card col-12 md:col-12 lg:col-6"
style={{ padding: "20px" }}
Expand Down

0 comments on commit e8f8241

Please sign in to comment.