Skip to content

Commit a760f9e

Browse files
committed
Revert "Renomação de Lumen para Quintana"
This reverts commit d9c36cb.
1 parent d9c36cb commit a760f9e

13 files changed

Lines changed: 563 additions & 563 deletions

File tree

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ services:
1717
- my_custom_network
1818

1919
frontend:
20-
container_name: quintana_frontend
20+
container_name: lumen_frontend
2121
image: node:lts-alpine
2222
working_dir: "/frontend"
2323
command: sh -c "yarn && yarn prod"

frontend/src/components/mainLayout.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const MainLayout = ({ children }: MainLayoutProps) => {
2121
nomeUsuario: '',
2222
});
2323

24-
window.location.href = '/quintana/login';
24+
window.location.href = '/lumen/login';
2525
}
2626

2727
const items = isLoggedIn
@@ -42,7 +42,7 @@ const MainLayout = ({ children }: MainLayoutProps) => {
4242
: [
4343
{
4444
key: '1',
45-
label: <Link href="/quintana/login">Entrar</Link>,
45+
label: <Link href="/lumen/login">Entrar</Link>,
4646
},
4747
];
4848

@@ -64,7 +64,7 @@ const MainLayout = ({ children }: MainLayoutProps) => {
6464
defaultSelectedKeys={['2']}
6565
>
6666
<Menu.Item>
67-
<Link href="/quintana">
67+
<Link href="/lumen">
6868
Quintana
6969
</Link>
7070
</Menu.Item>
@@ -78,18 +78,18 @@ const MainLayout = ({ children }: MainLayoutProps) => {
7878
</Tooltip>
7979
) : (
8080
<Menu.Item>
81-
<Link href="/quintana/home">
81+
<Link href="/lumen/home">
8282
Home
8383
</Link>
8484
</Menu.Item>
8585
)}
8686
<Menu.Item>
87-
<Link href="/quintana/competencias">
87+
<Link href="/lumen/competencias">
8888
Competências
8989
</Link>
9090
</Menu.Item>
9191
<Menu.Item>
92-
<Link href="/quintana/sobre">
92+
<Link href="/lumen/sobre">
9393
Sobre
9494
</Link>
9595
</Menu.Item>

frontend/src/components/modalDetalhesRedacao.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Modal, Input, Button, message, Collapse } from 'antd';
22
import { useState, useEffect } from 'react';
3-
import {Redacao, Tema} from '@/pages/quintana/home';
3+
import {Redacao, Tema} from '@/pages/lumen/home';
44
import { useAuth } from '@/context';
55
import TextArea from "antd/lib/input/TextArea";
66
import {API_URL} from "@/config/config";

frontend/src/components/modalDetalhesTema.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Modal, Input, Button, message } from 'antd';
22
import { useState } from 'react';
3-
import { Tema } from '@/pages/quintana/home';
3+
import { Tema } from '@/pages/lumen/home';
44
import { useAuth } from '@/context';
55
import {API_URL} from "@/config/config";
66

frontend/src/config/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export const API_URL = 'http://localhost:5000';
2-
//export const API_URL = 'http://aquarii.eic.cefet-rj.br/quintana-api'
2+
//export const API_URL = 'http://aquarii.eic.cefet-rj.br/lumen-api'
33

Original file line numberDiff line numberDiff line change
@@ -1,105 +1,105 @@
1-
import { useState } from 'react';
2-
import { Button, Checkbox, Input, Layout } from 'antd';
3-
import axios from 'axios';
4-
import router from 'next/router';
5-
import { API_URL } from "@/config/config";
6-
7-
const { Content } = Layout;
8-
9-
const Cadastro = () => {
10-
const [email, setEmail] = useState('');
11-
const [password, setPassword] = useState('');
12-
const [nomeUsuario, setNomeUsuario] = useState('');
13-
const [isProfessor, setIsProfessor] = useState(false);
14-
const [isAluno, setIsAluno] = useState(false);
15-
const [tipoUsuario, setTipoUsuario] = useState('');
16-
17-
18-
const handleCheckboxChange = (type: string) => {
19-
console.log('type', type)
20-
if (type === 'professor') {
21-
setIsProfessor(!isProfessor);
22-
setIsAluno(false);
23-
setTipoUsuario(type);
24-
} else if (type === 'aluno') {
25-
setIsAluno(!isAluno);
26-
setIsProfessor(false);
27-
setTipoUsuario(type);
28-
}
29-
};
30-
31-
const handleCadastro = async () => {
32-
try {
33-
await axios.post(`${API_URL}/userRegister`, {
34-
email,
35-
password,
36-
nomeUsuario,
37-
tipoUsuario
38-
});
39-
console.log('Usuário cadastrado com sucesso!');
40-
setEmail('');
41-
setPassword('');
42-
setTipoUsuario('');
43-
setNomeUsuario('');
44-
router.push('/quintana/login');
45-
} catch (error) {
46-
console.error('Erro ao cadastrar usuário:', error);
47-
}
48-
}
49-
50-
const isDisabled = !isProfessor && !isAluno;
51-
52-
return (
53-
<Layout style={{ minHeight: '50vh', display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
54-
<Content style={{ padding: '20px', borderRadius: '8px', boxShadow: '0 4px 8px rgba(0,0,0,0.1)', width: '300px' }}>
55-
<div style={{ marginBottom: '20px', textAlign: 'center' }}>
56-
<h2>Cadastro</h2>
57-
</div>
58-
<div style={{ marginBottom: '20px' }}>
59-
<Checkbox
60-
style={{ marginLeft: '50px' }}
61-
checked={isProfessor}
62-
onChange={() => handleCheckboxChange('professor')}
63-
>
64-
Professor
65-
</Checkbox>
66-
<Checkbox
67-
checked={isAluno}
68-
onChange={() => handleCheckboxChange('aluno')}
69-
>
70-
Aluno
71-
</Checkbox>
72-
</div>
73-
<div style={{ marginBottom: '20px' }}>
74-
<Input
75-
placeholder="Email"
76-
value={email}
77-
onChange={e => setEmail(e.target.value)}
78-
disabled={isDisabled}
79-
/>
80-
</div>
81-
<div style={{ marginBottom: '20px' }}>
82-
<Input
83-
placeholder="Nome de usuário"
84-
value={nomeUsuario}
85-
onChange={e => setNomeUsuario(e.target.value)}
86-
disabled={isDisabled}
87-
/>
88-
</div>
89-
<div style={{ marginBottom: '20px' }}>
90-
<Input.Password
91-
placeholder="Senha"
92-
value={password}
93-
onChange={e => setPassword(e.target.value)}
94-
disabled={isDisabled}
95-
/>
96-
</div>
97-
<div style={{ textAlign: 'center' }}>
98-
<Button onClick={handleCadastro} type="primary">Entrar</Button>
99-
</div>
100-
</Content>
101-
</Layout>
102-
);
103-
};
104-
1+
import { useState } from 'react';
2+
import { Button, Checkbox, Input, Layout } from 'antd';
3+
import axios from 'axios';
4+
import router from 'next/router';
5+
import {API_URL} from "@/config/config";
6+
7+
const { Content } = Layout;
8+
9+
const Cadastro = () => {
10+
const [email, setEmail] = useState('');
11+
const [password, setPassword] = useState('');
12+
const [nomeUsuario, setNomeUsuario] = useState('');
13+
const [isProfessor, setIsProfessor] = useState(false);
14+
const [isAluno, setIsAluno] = useState(false);
15+
const [tipoUsuario, setTipoUsuario] = useState('');
16+
17+
18+
const handleCheckboxChange = (type: string) => {
19+
console.log('type', type)
20+
if (type === 'professor') {
21+
setIsProfessor(!isProfessor);
22+
setIsAluno(false);
23+
setTipoUsuario(type);
24+
} else if (type === 'aluno') {
25+
setIsAluno(!isAluno);
26+
setIsProfessor(false);
27+
setTipoUsuario(type);
28+
}
29+
};
30+
31+
const handleCadastro = async () => {
32+
try {
33+
await axios.post(`${API_URL}/userRegister`, {
34+
email,
35+
password,
36+
nomeUsuario,
37+
tipoUsuario
38+
});
39+
console.log('Usuário cadastrado com sucesso!');
40+
setEmail('');
41+
setPassword('');
42+
setTipoUsuario('');
43+
setNomeUsuario('');
44+
router.push('/lumen/login');
45+
} catch (error) {
46+
console.error('Erro ao cadastrar usuário:', error);
47+
}
48+
}
49+
50+
const isDisabled = !isProfessor && !isAluno;
51+
52+
return (
53+
<Layout style={{ minHeight: '50vh', display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
54+
<Content style={{ padding: '20px', borderRadius: '8px', boxShadow: '0 4px 8px rgba(0,0,0,0.1)', width: '300px' }}>
55+
<div style={{ marginBottom: '20px', textAlign: 'center' }}>
56+
<h2>Cadastro</h2>
57+
</div>
58+
<div style={{ marginBottom: '20px' }}>
59+
<Checkbox
60+
style={{ marginLeft: '50px'}}
61+
checked={isProfessor}
62+
onChange={() => handleCheckboxChange('professor')}
63+
>
64+
Professor
65+
</Checkbox>
66+
<Checkbox
67+
checked={isAluno}
68+
onChange={() => handleCheckboxChange('aluno')}
69+
>
70+
Aluno
71+
</Checkbox>
72+
</div>
73+
<div style={{ marginBottom: '20px' }}>
74+
<Input
75+
placeholder="Email"
76+
value={email}
77+
onChange={e => setEmail(e.target.value)}
78+
disabled={isDisabled}
79+
/>
80+
</div>
81+
<div style={{ marginBottom: '20px' }}>
82+
<Input
83+
placeholder="Nome de usuário"
84+
value={nomeUsuario}
85+
onChange={e => setNomeUsuario(e.target.value)}
86+
disabled={isDisabled}
87+
/>
88+
</div>
89+
<div style={{ marginBottom: '20px' }}>
90+
<Input.Password
91+
placeholder="Senha"
92+
value={password}
93+
onChange={e => setPassword(e.target.value)}
94+
disabled={isDisabled}
95+
/>
96+
</div>
97+
<div style={{ textAlign: 'center' }}>
98+
<Button onClick={handleCadastro} type="primary">Entrar</Button>
99+
</div>
100+
</Content>
101+
</Layout>
102+
);
103+
};
104+
105105
export default Cadastro;
File renamed without changes.

0 commit comments

Comments
 (0)