Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] pagina cadastrar contrado #53

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
60d2514
Update code-analysis.yml
DanielViniciusAlves Jul 12, 2024
f18897b
Update sonar-project.properties
GRVial Jul 12, 2024
88ae96c
Update metrics.yml
GRVial Jul 12, 2024
9ed6b29
Update metrics.yml
GRVial Jul 12, 2024
ec99511
Update metrics.js
GRVial Jul 12, 2024
0d16ff0
Update metrics.yml
DanielViniciusAlves Jul 12, 2024
ed3c9a1
feat: Formulário de cadastro de padões de equipamentos #6
MarcusEscobar Jul 26, 2024
08ee16a
feature[Date]: Adiciona componente de data.
DanielViniciusAlves Jul 26, 2024
faefa2e
feature[Input]: Adiciona componente de input.
DanielViniciusAlves Jul 26, 2024
66646e7
feature[Number]: Adiciona componente de number.
DanielViniciusAlves Jul 26, 2024
aa3efa5
feeature[Select]: Adiciona componente de select.
DanielViniciusAlves Jul 26, 2024
d0a0d4e
feature[Cadastro]: Cria form de cadastro.
DanielViniciusAlves Jul 26, 2024
c949bff
feature[Button]: Adiciona componente de botão.
DanielViniciusAlves Jul 26, 2024
81e2348
feature[CSS]: Atualiza CSS do projeto.
DanielViniciusAlves Jul 26, 2024
3d6dfb3
feat: inicio da página de cadastro de contratos
GustavoHaubert Jul 27, 2024
21f6f26
feature[CSS]: Personaliza página de cadastro de impressora
caiolamego Jul 27, 2024
86c0278
feature[Cadastro]: Atualiza página de cadastro.
DanielViniciusAlves Jul 27, 2024
7976132
Merge branch 'feature/4-cadastro-equipamento' of github.com:fga-eps-m…
DanielViniciusAlves Jul 27, 2024
52489b0
feature[Button]: Atualizando estilo de botão.
DanielViniciusAlves Jul 27, 2024
3eada49
feat: inicio da página de edição de contratos
GustavoHaubert Jul 27, 2024
f5121ac
feat: criação da rota para página de edição de contratos
GustavoHaubert Jul 27, 2024
db31bbd
feat: criação da rota para a página de listagem de contratos
GustavoHaubert Jul 27, 2024
6aa4897
feature[Form]: Atualiza requisição de forms.
DanielViniciusAlves Jul 27, 2024
9301f33
Merge pull request #7 from fga-eps-mds/feature/4-cadastro-equipamento
GRVial Jul 27, 2024
0c38469
fix: Correção da listagem de padões de acordo com o protótipo #6
MarcusEscobar Jul 27, 2024
7fb6e6b
style: página de cadastro
GustavoHaubert Jul 27, 2024
0797acb
fix: ajustando tamanho máximo dos inputs e ajustando os placeholder
GustavoHaubert Jul 27, 2024
1120a45
Merge branch 'dev' of https://github.com/fga-eps-mds/2024.1-PrintGo-F…
GustavoHaubert Jul 27, 2024
3ced226
feature[Item]: Cria item de listar
GRVial Jul 27, 2024
b22c1e9
feature[List]: Adiciona form de lista de itens
GRVial Jul 27, 2024
de9be45
style: página de cadastro
GustavoHaubert Jul 27, 2024
9f353f9
Merge branch 'Feature/4-listar-equipamento' of https://github.com/fga…
CA1RO Jul 27, 2024
aa492bb
feature[View]: Adiciona campos com dados da impressora
caiolamego Jul 27, 2024
731c4b0
style: opacidade do input de data
eliseukadesh67 Jul 28, 2024
9e351e9
feature: adicionando service de contratos
eliseukadesh67 Jul 28, 2024
56526c9
feature: cadastro de contratos (integração com o backend)
eliseukadesh67 Jul 28, 2024
6842bb1
Merge branch 'feature/5-gerenciamento-contratos' of https://github.co…
CA1RO Jul 28, 2024
21979e0
feature{contratos}: cria pagina de listagem de contrato
CA1RO Jul 28, 2024
7f5127b
feature: cria página de edição de contratos
GustavoHaubert Jul 28, 2024
a5b6c0b
fix[Cadastro]: Corrige campos necessários relacionados ao cadastro de
DanielViniciusAlves Jul 28, 2024
e017116
Merge pull request #8 from fga-eps-mds/fix/4-cadastro-equipamento
DanielViniciusAlves Jul 28, 2024
7582c21
feature: adiciona as paginas de cadastro na navbar
CA1RO Jul 28, 2024
1e7442c
feature: adiciona botão de read de contratos na listagem.
CA1RO Jul 28, 2024
dc92484
fix: adiciona navegação entre páginas pelos botões
CA1RO Jul 28, 2024
1a45d96
feature[View]: Adiciona campo de localização na visualização
caiolamego Jul 28, 2024
1e999dc
feature[View]: desativa cursor no modo de visualização
caiolamego Jul 28, 2024
e62edf7
feature[SmallCardInfo]: Cria componente de informações na visualização
caiolamego Jul 28, 2024
2cd7b08
style: contractBox e contractList
eliseukadesh67 Jul 28, 2024
52c569d
feat: logica de toggle do status do contrato
eliseukadesh67 Jul 28, 2024
40c0184
feat: service para editar e mudar status do contrato
eliseukadesh67 Jul 28, 2024
6e72530
chore: removendo import desnecessario
eliseukadesh67 Jul 28, 2024
10df18f
feat: adiciona listagem de contratos da api
eliseukadesh67 Jul 28, 2024
2b4aa43
feature[View]: Adiciona componentes de SmallCardInfo na página de vis…
caiolamego Jul 28, 2024
e2bb80e
feature[BigInfoCard]: Cria componente de dados de contagem
caiolamego Jul 28, 2024
198bc11
feture{contratos}: adiciona a pagina de ver contrato no front-end
CA1RO Jul 28, 2024
4938abf
Merge branch 'feature/5-gerenciamento-contratos' of https://github.co…
CA1RO Jul 28, 2024
6fc25d4
feature[View]: Adiciona cards de informações na página de visualização
caiolamego Jul 28, 2024
1003062
Merge branch 'fix/listagem-padroes' of https://github.com/fga-eps-mds…
MarcusEscobar Jul 28, 2024
dc3e80d
chore: change components path
eliseukadesh67 Jul 28, 2024
5fd9608
Resolve Conflict
eliseukadesh67 Jul 28, 2024
eb5ce9c
feat: rediracionando para lista de contratos
eliseukadesh67 Jul 28, 2024
c07cfae
fix: adiciona preventDefault para nao recarregar a pagina
eliseukadesh67 Jul 28, 2024
140044d
feature[padrao]: Cria conexão com backend para criação de padões #7
MarcusEscobar Jul 28, 2024
b6aa054
style: cria dropdown com status ativo e inativo
GustavoHaubert Jul 28, 2024
1d41e33
feature[padrao]: Lista padrões vindos do backend
MarcusEscobar Jul 28, 2024
044eff4
chore: renomeando link da pagina de visualização de contrato
eliseukadesh67 Jul 28, 2024
161c758
fix: corrigindo nome da variavel de data final
eliseukadesh67 Jul 28, 2024
fa2f45f
feature:: redirecionando para visualização do contrato
eliseukadesh67 Jul 28, 2024
be30ef5
Merge branch 'feature/5-gerenciamento-contratos' of https://github.co…
eliseukadesh67 Jul 28, 2024
16a5b60
resolve conflicts
CA1RO Jul 28, 2024
bcf5154
fix[padroes]: Adiciona indicação de padão desativado
MarcusEscobar Jul 28, 2024
3720c7d
style{cadastro}: altera o esilio da pagina
CA1RO Jul 28, 2024
db6c74a
Fix[Padrao] organiza a ordem das chamadas da api
Edilson-r-jr Jul 28, 2024
a074074
resolve conflicts
CA1RO Jul 28, 2024
c361e58
feat(contrato): dados para visualização de contratos da api
eliseukadesh67 Jul 28, 2024
6088df5
fix[padrao] Separa as funções de "padrao" no arquivo patternService e…
Edilson-r-jr Jul 28, 2024
9043d3f
chore: enviando apenas o numero do contrato como parametro para proxi…
eliseukadesh67 Jul 28, 2024
a21c8f5
feature: adiconando o dropdown para o status
eliseukadesh67 Jul 28, 2024
9499b4d
feature[Filter]: Componente dropdown do filtro de equipamentos
anajbsouza Jul 29, 2024
dbdcfb4
feature[Filter]: Componente filtro de equipamentos
anajbsouza Jul 29, 2024
fa0e488
feature[CSS]: Componente filtro de equipamentos
anajbsouza Jul 29, 2024
2a1cbe7
fix: encode utils import
eliseukadesh67 Jul 29, 2024
14f177a
fix: envio de dados editados para o backend
eliseukadesh67 Jul 29, 2024
53e7fc6
feature: redirecionamentos
eliseukadesh67 Jul 29, 2024
f8ed40d
chore: utilidade para formatar data
eliseukadesh67 Jul 29, 2024
5de3a0a
Merge branch 'dev' of https://github.com/fga-eps-mds/2024.1-PrintGo-F…
eliseukadesh67 Jul 29, 2024
a1d2490
fix[padrao] Adiciona o campo tipo na pagina edição padrão
Edilson-r-jr Jul 29, 2024
eafeec4
fix: ajusta alguns estilos css
GustavoHaubert Jul 29, 2024
2e25338
feature[list]: Adiciona requisição de nomes de impressora
GRVial Jul 29, 2024
d81b884
fix[padroes]: Corrige bug no formulario de edição
MarcusEscobar Jul 29, 2024
a2027d3
Merge branch 'Feature/4-listar-equipamento' of https://github.com/fga…
GRVial Jul 29, 2024
f8bdae0
fix[Padrao]: Corrige pagina de detalhes
MarcusEscobar Jul 29, 2024
035c1d3
feature[Padrao]: Adiciona toggle aos padrões
MarcusEscobar Jul 29, 2024
b5e51f4
Merge branch 'feature/5-gerenciamento-contratos' of https://github.co…
eliseukadesh67 Jul 29, 2024
4189666
fix[Padrao]: Torna campos OID opcionais
MarcusEscobar Jul 29, 2024
963b64a
feature[page]: atualiza requisição ver impressora
GRVial Jul 29, 2024
000547b
fix: adicionando de volta o viewContract
eliseukadesh67 Jul 29, 2024
6c675b7
fix[padrao]: volta rotas do gateway
lbvx Jul 29, 2024
11fb123
feature: trocando para utilizar o id ao inves de numero do contrato
eliseukadesh67 Jul 29, 2024
0764a74
feature[Padrao] - Estiliza a página de detalhes #6
MatheussBrant Jul 29, 2024
0615693
fix: version docker-compose
CA1RO Jul 29, 2024
c3cfab7
Merge pull request #11 from fga-eps-mds/feature/5-gerenciamento-contr…
eliseukadesh67 Jul 29, 2024
697f51e
feature[Edit]: Adiciona design da página de edição de impressora
caiolamego Jul 29, 2024
bdbef2d
Merge branch 'dev' into feature/7-crud-padrao-frontend
eliseukadesh67 Jul 29, 2024
d0c572f
Merge pull request #9 from fga-eps-mds/feature/7-crud-padrao-frontend
eliseukadesh67 Jul 29, 2024
5ec50a8
Merge branch 'dev' of github.com:fga-eps-mds/2024.1-PrintGo-FrontEnd …
DanielViniciusAlves Jul 29, 2024
ab78d72
Merge pull request #10 from fga-eps-mds/feature/4-visualizar-equipamento
DanielViniciusAlves Jul 29, 2024
7becc10
fix[API]: Corrige requisição de localização.
DanielViniciusAlves Jul 29, 2024
616b993
Merge pull request #13 from fga-eps-mds/hotfix/12-hotfix-corrigir-rot…
DanielViniciusAlves Jul 29, 2024
72bfbf6
chore: ajustando rotas para o gateway
eliseukadesh67 Jul 29, 2024
6431a26
fix: ajustando a rota para criação e redirecionamento
eliseukadesh67 Jul 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/workflows/code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,3 @@ jobs:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}

- name: Envia cobertura para o Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
flags: jest
name: 2023.2-PrintGo-FrontEnd
verbose: true
1 change: 1 addition & 0 deletions .github/workflows/metrics.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Metrics and Release

on:
workflow_dispatch:
pull_request:
branches:
- main
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.8'

services:
app:
container_name: app-front
Expand Down
Binary file added public/seta-direita 1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 15 additions & 17 deletions scripts/metrics.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
const REPO = '2023.2-PrintGo-FrontEnd'
const REPO = '2024.1-PrintGo-FrontEnd'
const OWNER = 'fga-eps-mds'
const SONAR_ID = 'fga-eps-mds_2023.2-PrintGo-FrontEnd'
const SONAR_ID = 'fga-eps-mds_2024.1-PrintGo-FrontEnd'

const METRIC_LIST = [
'files',
'functions',
'complexity',
'comment_lines_density',
'duplicated_lines_density',
'coverage',
'ncloc',
'tests',
'test_errors',
'test_failures',
'test_execution_time',
'security_rating'
];
const METRIC_LIST = ['files',
'functions',
'complexity',
'comment_lines_density',
'duplicated_lines_density',
'coverage',
'ncloc',
'tests',
'test_errors',
'test_failures',
'test_execution_time',
'security_rating'];

const SONAR_URL = `https://sonarcloud.io/api/measures/component_tree?component=${SONAR_ID}&metricKeys=${METRIC_LIST.join(',')}&ps=500`;

module.exports = {
SONAR_URL,
REPO,
OWNER
};
};
4 changes: 2 additions & 2 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sonar.projectKey=fga-eps-mds_2023.2-PrintGo-FrontEnd
sonar.projectKey=fga-eps-mds_2024.1-PrintGo-FrontEnd
sonar.organization=fga-eps-mds-1
sonar.sources=src
sonar.tests=src
Expand All @@ -7,4 +7,4 @@ sonar.exclusions=node_modules/**, test/**, assets/**, .github/**, scripts/**


sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.testExecutionReportPaths=reports/sonar-report.xml
sonar.testExecutionReportPaths=reports/sonar-report.xml
18 changes: 15 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ import ForgottenPasswordPage from "./pages/ForgottenPassword";
import RecoverPasswordPage from "./pages/RecoverPassword";
import PrivateRoutes from "./components/utils/PrivateRoutes";
import AdminRoutes from "./components/utils/AdminRoutes";
import ListEquipment from "./components/forms/ListEquipment";
import ContractForm from "./components/forms/ContractForm";
import EditContractForm from "./components/forms/EditContractForm";
import ContractList from "./pages/ContractList";
import ViewContract from "./pages/ViewContract";

function App() {
return (
Expand All @@ -30,16 +35,23 @@ function App() {
<Routes>
<Route element={<PrivateRoutes />}>
<Route path="/editarusuario/:id" element={<EditUserPage/>}/>
<Route path="/listimpressora" element={<ListEquipment/>}/>
<Route path="/editimpressora/:id" element={<EditPrinter/>}/>
<Route path="/visualizarimpressora/:id" element={<ViewPrinter/>}/>
<Route path="/mudarsenha" element={<ChangePassword />} />
<Route path="/cadastroimpressora" element={<RegisterPrinter />} />
<Route path="/editarimpressora/:printer" element={<EditPrinter />} />
{/* <Route path="/editarimpressora/:printer" element={<EditPrinter />} /> */}
<Route path="/padraoimpressora" element={<PatternPrinter />} />
<Route path="/editarpadrao/:padrao" element={<EditPattern />} />
<Route path="/editarpadrao" element={<EditPattern />} />
<Route path="/impressorascadastradas" element={<PrintersList />} />
<Route path="/visualizarimpressora/:printerData" element={<ViewPrinter/>}/>
<Route path="/listapadroes" element={<PatternList />} />
<Route path="/padroescadastrados" element={<PatternList />} />
<Route path="/visualizarpadrao/:padrao" element={<ViewPattern />} />
<Route path="/visualizarpadrao" element={<ViewPattern />} />
<Route path="/cadastrarContrato" element={<ContractForm />} />
<Route path="/editarContrato" element={<EditContractForm />} />
<Route path="/listagemContrato" element={<ContractList />} />
<Route path="/verContrato/:id" element={<ViewContract />} />
<Route element={<AdminRoutes/>}>
<Route path="/listausuarios" element={<UsersList />} />
<Route path="/cadastro" element={<CreateUserPage />} />
Expand Down
7 changes: 4 additions & 3 deletions src/api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ export async function login(email, password) {
};

try {
const response = await api.post('/user/login', data);
return {type: 'success', token: response.data.token };
// const response = await api.post('/user/login', data);
let token_mock = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEyMyIsImVtYWlsIjoidXNlckBleGFtcGxlLmNvbSIsIm5vbWUiOiJEYW5pZWwiLCJjYXJnb3MiOiJhZG1pbiJ9.tMm8nEv6qtGnL4XJIFRQJcgw6qafUUDpxgR8LUHXX08"
return {type: 'success', token: token_mock };
} catch (error) {
console.error('Erro ao fazer login:', error);
return {type: 'error', error};
Expand All @@ -28,4 +29,4 @@ export async function changePassword(data) {
} catch(error) {
return {type: 'error', error};
}
}
}
2 changes: 1 addition & 1 deletion src/assets/Filter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/green-calendar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/processor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 40 additions & 18 deletions src/components/Button.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,49 @@
import React from 'react';
import PropTypes from 'prop-types'; // Import PropTypes
import PropTypes from 'prop-types';
import '../style/components/button.css';

const Button = ({ textColor, bgColor, borderColor, children, onClick }) => {
const buttonStyle = {
'--text-color': textColor,
'--bg-color': bgColor,
'--border-color': borderColor,
};

return (
<button className="button" style={buttonStyle} onClick={onClick}>
{children}
</button>
);
const Button = ({ type, size, text, onClick, bgColor }) => {
const typeClasses = {
success: 'button-success',
error: 'button-error',
info: 'button-info',
warning: 'button-warning',
icon: 'button-icon'
};

const sizeClasses = {
small: 'button-small',
medium: 'button-medium',
large: 'button-large',
};

const buttonClass = `button ${typeClasses[type] || 'button-info'} ${sizeClasses[size] || 'button-medium'}`;

return (
<button className={buttonClass} onClick={onClick}
style={
{background: bgColor,
width:"150px",
height:"50px",
borderRadius:"25px",
color:"white"}}>

{text}
</button>
);
};

Button.propTypes = {
textColor: PropTypes.string, // Validate textColor as a string
bgColor: PropTypes.string, // Validate bgColor as a string
borderColor: PropTypes.string, // Validate borderColor as a string
children: PropTypes.node, // Validate children as a React node
onClick: PropTypes.func, // Validate onClick as a function
type: PropTypes.oneOf(['success', 'error', 'info', 'warning', 'icon']),
size: PropTypes.oneOf(['small', 'medium', 'large']),
text: PropTypes.string.isRequired,
bgColor: PropTypes.string.isRequired,
onClick: PropTypes.func.isRequired,
};

Button.defaultProps = {
type: 'info',
size: 'medium',
};

export default Button;
23 changes: 23 additions & 0 deletions src/components/cards/BigInfoCard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react';
import PropTypes from 'prop-types';
import "../../style/components/BigInfoCard.css";

const BigInfoCard = ({ className, title, info }) => {
return (
<div className={`big-card-info ${className}`}>
<span className="big-card-title">{title}</span>
<span className="big-card-info-value">{info}</span>
</div>
);
};

BigInfoCard.propTypes = {
title: PropTypes.string.isRequired,
info: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number
]).isRequired,
className: PropTypes.string,
};

export default BigInfoCard;
26 changes: 26 additions & 0 deletions src/components/cards/SmallInfoCard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from 'react';
import PropTypes from 'prop-types';
import "../../style/components/SmallInfoCard.css";

const SmallInfoCard = ({ className, title, imageSrc, info }) => {
const titleClass = className === 'grey-info-card' ? 'info-card-title' : 'blue-info-card-title';
const infoClass = className === 'grey-info-card' ? 'info-card-info' : 'blue-info-card-info';
return (
<div className={className}>
<img src={imageSrc} alt={title} className="info-card-image" />
<div className="info-card-content">
<span className={titleClass}>{title}</span>
<span className={infoClass}>{info}</span>
</div>
</div>
);
};

SmallInfoCard.propTypes = {
title: PropTypes.string.isRequired,
imageSrc: PropTypes.string.isRequired,
info: PropTypes.string.isRequired,
className: PropTypes.string,
};

export default SmallInfoCard;
36 changes: 36 additions & 0 deletions src/components/containers/DateContainer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React from 'react';
import PropTypes from 'prop-types';
import "../../style/components/DateContainer.css";

const DateContainer = ({ label, value, onChange, className, error }) => {
return (
<div className='date-container-form'>
<span className="form-subtitle">{label}</span>
<div>
<input
type="date"
value={value}
onChange={onChange}
className={error ? `input-error ${className}` : `number-field ${className}`}
/>
</div>
</div>
);
};

DateContainer.propTypes = {
label: PropTypes.string.isRequired,
value: PropTypes.string,
onChange: PropTypes.func.isRequired,
className: PropTypes.string,
error: PropTypes.string,
};

DateContainer.defaultProps = {
value: '',
className: '',
error: '',
};

export default DateContainer;

37 changes: 37 additions & 0 deletions src/components/containers/DropdownSection.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import "../../style/components/FilterContainer.css"

const DropdownSection = ({ title }) => {
const [isOpen, setIsOpen] = useState(false);

const toggleOpen = () => {
setIsOpen(!isOpen);
};

return (
<div className="dropdown-section">
<div className="dropdown-header" onClick={toggleOpen}>
{title}
<img
src={process.env.PUBLIC_URL + '/seta-direita 1.png'}
className={`arrow ${isOpen ? 'up' : 'down'}`}
alt="seta"
/>
</div>
{isOpen && (
<div className="dropdown-content">
<label><input type="checkbox" /> Valor 1</label>
<label><input type="checkbox" /> Valor 2</label>
<label><input type="checkbox" /> Valor 3</label>
</div>
)}
</div>
);
};

DropdownSection.propTypes = {
title: PropTypes.string.isRequired,
};

export default DropdownSection;
21 changes: 21 additions & 0 deletions src/components/containers/FilterContainer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';
import DropdownSection from './DropdownSection';
import "../../style/components/FilterContainer.css"

const FilterContainer = () => {
return (
<div className="filter-container">
<header className="filter-header">
<h1>Equipamentos disponíveis</h1>
</header>
<main>
<DropdownSection title="Equipamento" />
<DropdownSection title="Modelo" />
<DropdownSection title="Número de série" />
<DropdownSection title="Localização" />
</main>
</div>
);
};

export default FilterContainer;
Loading
Loading