-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
9 changed files
with
338 additions
and
205 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 |
---|---|---|
@@ -1,28 +1,25 @@ | ||
import React from "react"; | ||
import {BrowserRouter, Routes , Route} from "react-router-dom" | ||
import Home from "./pages/Home" | ||
import { BrowserRouter, Routes, Route } from "react-router-dom"; | ||
import Home from "./pages/Home"; | ||
import CreateUserPage from "./pages/CreateUser"; | ||
import Login from "./pages/Login"; | ||
import Contact from "./pages/Contact"; | ||
import AboutUs from "./pages/AboutUs"; | ||
import ChangePassword from "./pages/ChangePassword"; | ||
|
||
|
||
|
||
function App(){ | ||
|
||
function App() { | ||
return ( | ||
<BrowserRouter> | ||
<Routes> | ||
<Route path="/" element={<Home/>}/> | ||
<Route path="/cadastro" element={<CreateUserPage/>}/> | ||
<Route path="/login" element={<Login/>}/> | ||
<Route path="/contato" element={<Contact/>}/> | ||
<Route path="/quemsomos" element={<AboutUs/>}/> | ||
<Route path="/changePassword" element={<ChangePassword/>}/> | ||
</Routes> | ||
<Routes> | ||
<Route path="/" element={<Home />} /> | ||
<Route path="/cadastro" element={<CreateUserPage />} /> | ||
<Route path="/login" element={<Login />} /> | ||
<Route path="/contato" element={<Contact />} /> | ||
<Route path="/quemsomos" element={<AboutUs />} /> | ||
<Route path="/mudarsenha" element={<ChangePassword />} /> | ||
</Routes> | ||
</BrowserRouter> | ||
); | ||
} | ||
|
||
export default App; | ||
export default App; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from "react"; | ||
import "../../style/components/navbarSimple.css"; | ||
import logo from "../../assets/logo 3.svg"; | ||
|
||
const NavbarSimple = () => { | ||
return ( | ||
<div className="container-navbar-simple"> | ||
<img alt="" src={logo}></img> | ||
|
||
<div className="button-navbar-simple"> | ||
<button className="home-navbar-simple"> | ||
<a href="http://localhost:3000/">Home</a> | ||
</button> | ||
<button className="aboutUs-navbar-simple"> | ||
<a href="http://localhost:3000/quemsomos">Quem Somos</a> | ||
</button> | ||
<button className="contact-navbar-simple"> | ||
{" "} | ||
<a href="http://localhost:3000/contato">Contato</a> | ||
</button> | ||
</div> | ||
|
||
<div className="button-login-navbar-simple"> | ||
<button className="login-navbar-simple"> | ||
<a href="http://localhost:3000/login">Login</a> | ||
</button> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
export default NavbarSimple; |
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 |
---|---|---|
@@ -1,31 +1,46 @@ | ||
import React from 'react'; | ||
import '../style/pages/aboutUs.css'; | ||
import PoliciaCivilLogo from '../assets/PoliciaCivilLogo.svg'; | ||
import elipse from '../assets/home_elipse.svg'; | ||
|
||
import React from "react"; | ||
import "../style/pages/aboutUs.css"; | ||
import PoliciaCivilLogo from "../assets/PoliciaCivilLogo.svg"; | ||
import elipse from "../assets/home_elipse.svg"; | ||
import NavbarSimple from "../components/navbar/NavbarSimple"; | ||
|
||
export default function AboutUs() { | ||
|
||
return ( | ||
<div className="container-about-us"> | ||
<div className="texto"> | ||
<h2 className='h2-label'>Quem Somos</h2> | ||
<p> | ||
O PrintGO tem a finalidade de corrigir o problema chave que foi definido junto com a visão do produto, que diz: Os servidores da Polícia Civil do Goiás não possuem uma ferramenta de monitoração de impressoras e impressão, mesmo que os servidores precisem monitorar e registrar valores de contadores nas unidades policias nos municípios de Goiás. O PrintGO é uma ferramenta de monitoramento de ativos de impressão que simplifica a tarefa de monitorar e registrar informações relacionadas ao uso e manutenção das impressoras de forma a garantir um acompanhamento preciso e eficaz. | ||
</p> | ||
<p> | ||
A aplicação web foi feita sob encomenda para a Polícia Civil do estado do Goiás pela Universidade de Brasília, UnB, sob supervisão das disciplinas de EPS e MDS juntamente com seus monitores e professor. | ||
</p> | ||
</div> | ||
<div className="logo-about-us"> | ||
<img src={PoliciaCivilLogo} alt="PoliciaCivilLogo" className="PoliciaCivilLogo" /> | ||
</div> | ||
|
||
<div className="ellipse-about"> | ||
<img alt="" src={elipse}></img> | ||
<> | ||
<NavbarSimple /> | ||
<div className="container-about-us"> | ||
<div className="texto"> | ||
<h2 className="h2-label">Quem Somos</h2> | ||
<p> | ||
O PrintGO tem a finalidade de corrigir o problema chave que foi | ||
definido junto com a visão do produto, que diz: Os servidores da | ||
Polícia Civil do Goiás não possuem uma ferramenta de monitoração de | ||
impressoras e impressão, mesmo que os servidores precisem monitorar | ||
e registrar valores de contadores nas unidades policias nos | ||
municípios de Goiás. O PrintGO é uma ferramenta de monitoramento de | ||
ativos de impressão que simplifica a tarefa de monitorar e registrar | ||
informações relacionadas ao uso e manutenção das impressoras de | ||
forma a garantir um acompanhamento preciso e eficaz. | ||
</p> | ||
<p> | ||
A aplicação web foi feita sob encomenda para a Polícia Civil do | ||
estado do Goiás pela Universidade de Brasília, UnB, sob supervisão | ||
das disciplinas de EPS e MDS juntamente com seus monitores e | ||
professor. | ||
</p> | ||
</div> | ||
<div className="logo-about-us"> | ||
<img | ||
src={PoliciaCivilLogo} | ||
alt="PoliciaCivilLogo" | ||
className="PoliciaCivilLogo" | ||
/> | ||
</div> | ||
|
||
<div className="ellipse-about"> | ||
<img alt="" src={elipse}></img> | ||
</div> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
} | ||
|
||
|
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 |
---|---|---|
@@ -1,78 +1,83 @@ | ||
import React,{ useState } from "react"; | ||
import '../style/pages/changePassword.css'; | ||
import ChangePasswordPeople from '../assets/change-password-people.svg'; | ||
import elipse6 from '../assets/elipse6.svg'; | ||
import React, { useState } from "react"; | ||
import "../style/pages/changePassword.css"; | ||
import ChangePasswordPeople from "../assets/change-password-people.svg"; | ||
import elipse6 from "../assets/elipse6.svg"; | ||
import { changePassword } from "../api/api"; | ||
import Navbar from "../components/navbar/Navbar"; | ||
|
||
export default function ChangePassword() { | ||
const [password, setPassword] = useState(""); | ||
const [passwordConfirmation, setPasswordConfirmation] = useState(""); | ||
const [error, setError] = useState(null); | ||
const [success, setSuccess] = useState(false); | ||
const [password, setPassword] = useState(""); | ||
const [passwordConfirmation, setPasswordConfirmation] = useState(""); | ||
const [error, setError] = useState(null); | ||
const [success, setSuccess] = useState(false); | ||
|
||
const handleSubmit = async (e) => { | ||
e.preventDefault(); | ||
|
||
const handleSubmit = async (e) => { | ||
e.preventDefault(); | ||
|
||
try { | ||
const response = await changePassword(password, passwordConfirmation); | ||
|
||
if(response) { | ||
setSuccess(true) | ||
setPassword('') | ||
setPasswordConfirmation('') | ||
} | ||
} catch (error) { | ||
console.log(error); | ||
setError('Erro ao trocar de senha'); | ||
} | ||
} | ||
try { | ||
const response = await changePassword(password, passwordConfirmation); | ||
|
||
return ( | ||
<div className="change-password-container"> | ||
<div className="image-container"> | ||
<img src={ChangePasswordPeople} alt="Pessoas"/> | ||
</div> | ||
<div className="form-container"> | ||
<form className="form" onSubmit={handleSubmit}> | ||
<div className="input-container"> | ||
<div className="form-title">Mudar senha</div> | ||
<div className="form-group"> | ||
<div className="input-form-container"> | ||
<label className="label-change-password">Nova Senha</label> | ||
<input | ||
type="password" | ||
name="password" | ||
placeholder="*****************" | ||
className="input-field" | ||
value={password} | ||
onChange={e => setPassword(e.target.value)} | ||
/> | ||
</div> | ||
<div className="input-form-container"> | ||
<label className="label-change-password">Repita a senha</label> | ||
<input | ||
type="password" | ||
name="passwordConfirmation" | ||
placeholder="*****************" | ||
className="input-field" | ||
value={passwordConfirmation} | ||
onChange={e => setPasswordConfirmation(e.target.value)} | ||
/> | ||
</div> | ||
</div> | ||
<div className="button-container"> | ||
<input type="submit" value="Confirmar" className="button"/> | ||
</div> | ||
{error && <h5 style={{color: 'red'}}>{error}</h5>} | ||
{success && <h5 style={{color: 'green'}}>Senha atualizada!</h5>} | ||
</div> | ||
</form> | ||
if (response) { | ||
setSuccess(true); | ||
setPassword(""); | ||
setPasswordConfirmation(""); | ||
} | ||
} catch (error) { | ||
console.log(error); | ||
setError("Erro ao trocar de senha"); | ||
} | ||
}; | ||
|
||
<div className="elipse-change-pass"> | ||
<img src={elipse6} alt="elipse_azul"></img> | ||
return ( | ||
<> | ||
<Navbar /> | ||
<div className="change-password-container"> | ||
<div className="image-container"> | ||
<img src={ChangePasswordPeople} alt="Pessoas" /> | ||
</div> | ||
<div className="form-container"> | ||
<form className="form" onSubmit={handleSubmit}> | ||
<div className="input-container"> | ||
<div className="form-title">Mudar senha</div> | ||
<div className="form-group"> | ||
<div className="input-form-container"> | ||
<label className="label-change-password">Nova Senha</label> | ||
<input | ||
type="password" | ||
name="password" | ||
placeholder="*****************" | ||
className="input-field" | ||
value={password} | ||
onChange={(e) => setPassword(e.target.value)} | ||
/> | ||
</div> | ||
<div className="input-form-container"> | ||
<label className="label-change-password"> | ||
Repita a senha | ||
</label> | ||
<input | ||
type="password" | ||
name="passwordConfirmation" | ||
placeholder="*****************" | ||
className="input-field" | ||
value={passwordConfirmation} | ||
onChange={(e) => setPasswordConfirmation(e.target.value)} | ||
/> | ||
</div> | ||
</div> | ||
<div className="button-container"> | ||
<input type="submit" value="Confirmar" className="button" /> | ||
</div> | ||
{error && <h5 style={{ color: "red" }}>{error}</h5>} | ||
{success && <h5 style={{ color: "green" }}>Senha atualizada!</h5>} | ||
</div> | ||
</form> | ||
|
||
<div className="elipse-change-pass"> | ||
<img src={elipse6} alt="elipse_azul"></img> | ||
</div> | ||
</div> | ||
) | ||
} | ||
</div> | ||
</> | ||
); | ||
} |
Oops, something went wrong.