Commit dcc1476d8c4f2018a80ebab487f2a6937e708214
1 parent
594fec5f
Exists in
master
and in
1 other branch
V. 0.7.0 - Integração do mapa com a procura rápida. Não está localizando com a seleção ainda.
Showing
9 changed files
with
36 additions
and
42 deletions
Show diff stats
client/package-lock.json
1 | { | 1 | { |
2 | "name": "client", | 2 | "name": "client", |
3 | - "version": "0.1.0", | 3 | + "version": "0.6.2", |
4 | "lockfileVersion": 1, | 4 | "lockfileVersion": 1, |
5 | "requires": true, | 5 | "requires": true, |
6 | "dependencies": { | 6 | "dependencies": { |
@@ -8889,6 +8889,11 @@ | @@ -8889,6 +8889,11 @@ | ||
8889 | "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-4.0.0.tgz", | 8889 | "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-4.0.0.tgz", |
8890 | "integrity": "sha512-FlsPxavEyMuR6TjVbSSywovXSEyOg6ZDj5+Z8nbsRl9EkOzAhEIcS+GLoQDC5fz/t9suhUXWmUrOBrgeUvrMxw==" | 8890 | "integrity": "sha512-FlsPxavEyMuR6TjVbSSywovXSEyOg6ZDj5+Z8nbsRl9EkOzAhEIcS+GLoQDC5fz/t9suhUXWmUrOBrgeUvrMxw==" |
8891 | }, | 8891 | }, |
8892 | + "react-iframe": { | ||
8893 | + "version": "1.2.0", | ||
8894 | + "resolved": "https://registry.npmjs.org/react-iframe/-/react-iframe-1.2.0.tgz", | ||
8895 | + "integrity": "sha512-xd7zHdVu6Pe3ijQNkT8PvLfGRQEY/CuKvjMhVC+OLSoXL1mkBA300hen5vm56yNdaUt3AspVclXda1IO7ooMhg==" | ||
8896 | + }, | ||
8892 | "react-input-autosize": { | 8897 | "react-input-autosize": { |
8893 | "version": "2.2.1", | 8898 | "version": "2.2.1", |
8894 | "resolved": "https://registry.npmjs.org/react-input-autosize/-/react-input-autosize-2.2.1.tgz", | 8899 | "resolved": "https://registry.npmjs.org/react-input-autosize/-/react-input-autosize-2.2.1.tgz", |
client/package.json
1 | { | 1 | { |
2 | "name": "client", | 2 | "name": "client", |
3 | - "version": "0.6.2", | 3 | + "version": "0.7.0", |
4 | "private": true, | 4 | "private": true, |
5 | "proxy": { | 5 | "proxy": { |
6 | "/map": { | 6 | "/map": { |
@@ -30,12 +30,13 @@ | @@ -30,12 +30,13 @@ | ||
30 | }, | 30 | }, |
31 | "dependencies": { | 31 | "dependencies": { |
32 | "ajv": "^6.5.0", | 32 | "ajv": "^6.5.0", |
33 | + "axios": "0.17.1", | ||
33 | "faker": "^4.1.0", | 34 | "faker": "^4.1.0", |
34 | "react": "^16.4.0", | 35 | "react": "^16.4.0", |
35 | "react-dom": "^16.4.0", | 36 | "react-dom": "^16.4.0", |
37 | + "react-iframe": "^1.2.0", | ||
36 | "react-scripts": "1.1.4", | 38 | "react-scripts": "1.1.4", |
37 | "react-select": "1.1.0", | 39 | "react-select": "1.1.0", |
38 | - "axios": "0.17.1", | ||
39 | "util": "^0.10.3" | 40 | "util": "^0.10.3" |
40 | }, | 41 | }, |
41 | "scripts": { | 42 | "scripts": { |
client/public/index.html
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | work correctly both with client-side routing and a non-root public URL. | 19 | work correctly both with client-side routing and a non-root public URL. |
20 | Learn how to configure a non-root public URL by running `npm run build`. | 20 | Learn how to configure a non-root public URL by running `npm run build`. |
21 | --> | 21 | --> |
22 | - <title>NEXUS Título</title> | 22 | + <title>NEXUS</title> |
23 | </head> | 23 | </head> |
24 | <body> | 24 | <body> |
25 | <noscript> | 25 | <noscript> |
client/src/App.js
1 | import React, { Component } from "react"; | 1 | import React, { Component } from "react"; |
2 | -import logo from "./logo.svg"; | ||
3 | import "./App.css"; | 2 | import "./App.css"; |
4 | import FindConsumer from "./components/findConsumer"; | 3 | import FindConsumer from "./components/findConsumer"; |
4 | +import Map from "./components/map"; | ||
5 | 5 | ||
6 | class App extends Component { | 6 | class App extends Component { |
7 | render() { | 7 | render() { |
8 | return ( | 8 | return ( |
9 | <div className="App"> | 9 | <div className="App"> |
10 | - <header className="App-header"> | ||
11 | - <img src={logo} className="App-logo" alt="logo" /> | ||
12 | - <h1 className="App-title">NEXUS Início da aplicação</h1> | ||
13 | - </header> | ||
14 | - <p className="App-intro"> | ||
15 | - Digite o nome ou número de ligação de água abaixo | ||
16 | - </p> | ||
17 | - <p /> | ||
18 | - | ||
19 | <div> | 10 | <div> |
20 | <FindConsumer /> | 11 | <FindConsumer /> |
21 | </div> | 12 | </div> |
22 | - <p /> | ||
23 | - <p> Selecione aqui o link desejado 2: </p> | ||
24 | - <a href="/auth/google">Selecione aqui para logar</a> | ||
25 | - <p /> | ||
26 | - <a href="/map/paulo">Selecione aqui para acessar o mapa</a> | ||
27 | - <p /> | ||
28 | - <a href="/api/current_user"> | ||
29 | - Selecione aqui para saber o usuário logado | ||
30 | - </a> | ||
31 | - <p /> | ||
32 | - <a href="/api/logout">Selecione aqui para fazer logout</a> | ||
33 | - <p /> | ||
34 | - <a href="/consumidores">Mostra todos consumidores de água</a> | 13 | + <div> |
14 | + <Map /> | ||
15 | + </div> | ||
35 | </div> | 16 | </div> |
36 | ); | 17 | ); |
37 | } | 18 | } |
@@ -0,0 +1,20 @@ | @@ -0,0 +1,20 @@ | ||
1 | +import React, { Component } from 'react'; | ||
2 | +import Iframe from 'react-iframe'; | ||
3 | +import 'react-select/dist/react-select.css'; | ||
4 | + | ||
5 | +export default class Map extends Component<*, State> { | ||
6 | + constructor(props) { | ||
7 | + super(props); | ||
8 | + this.state = { | ||
9 | + }; | ||
10 | + | ||
11 | + } | ||
12 | + | ||
13 | + render() { | ||
14 | + return ( | ||
15 | + <div> | ||
16 | + <Iframe url="/map/pedro" position="absolute" width="100%" height="95%" id="mapId" allowFullScreen /> | ||
17 | + </div> | ||
18 | + ); | ||
19 | + } | ||
20 | +} |
package.json
1 | { | 1 | { |
2 | "name": "GeoSanWeb", | 2 | "name": "GeoSanWeb", |
3 | - "version": "0.6.2", | 3 | + "version": "0.7.0", |
4 | "description": "Map application for water companies", | 4 | "description": "Map application for water companies", |
5 | "repository": "git@bitbucket.org:nexusbr/geosanweb.git", | 5 | "repository": "git@bitbucket.org:nexusbr/geosanweb.git", |
6 | "private": true, | 6 | "private": true, |
public/stylesheets/style.css
views/index.jade
views/map.jade
1 | extends layout | 1 | extends layout |
2 | block content | 2 | block content |
3 | - br | ||
4 | - .container | ||
5 | - .row | ||
6 | - .col.col-lg-3 | ||
7 | - | #{consumidor} | ||
8 | - .col.col-lg-2 | ||
9 | - input.form-control(type='text', id="nome", placeholder='Digite o nome') | ||
10 | - .col.col-lg-1 | ||
11 | - input.btn.btn-primary(type='button', value='Procura', onclick=' relocate_home()') | ||
12 | - | ||
13 | script. | 3 | script. |
14 | function relocate_home() | 4 | function relocate_home() |
15 | { | 5 | { |
16 | location.href = "/map/" + nome.value; | 6 | location.href = "/map/" + nome.value; |
17 | } | 7 | } |
18 | - br | ||
19 | #map | 8 | #map |
20 | - | ||
21 | script(type='text/javascript'). | 9 | script(type='text/javascript'). |
22 | var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', | 10 | var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', |
23 | southWest = L.latLng(#{bndSW}), | 11 | southWest = L.latLng(#{bndSW}), |