diff --git a/README.md b/README.md index 0282529ed..dfc0842a5 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ -# PAINEL DE SALAS - - -![](frontend/public/view.png) - +

PAINEL DE SALAS

+

+ +

A PROPOSTA DESSA APLICAÇÃO É TORNAR SIMPLES A IDENTIFICAÇÃO DAS EMPRESAS PRESENTES EM EMPREENDIMENTOS QUE SÃO COMERCIAIS @@ -43,11 +42,57 @@ Acesse a interface do seu banco mysql http://`seuendereçoip`/phpmyadmin/ Copie o conteúdo do arquivo `PAINEL/provisioning.sql`, cole e execute -# AUTENTICAÇÃO INICIAL +### AUTENTICAÇÃO INICIAL `Username`: admin + `Password`: admin +### SKETCHES + +#### WEB + + + + + + + + + + + + + + +
+ +### MOBILE + + + + + + + + + + + + + +
+ + +`apk:` [address](https://exp-shell-app-assets.s3.us-west-1.amazonaws.com/android/%40jadson179/Painel-5aad65f531a9401dbcda37fd677efc24-signed.apk) + +# CONTRIBUIDORES + + + + + +
![](frontend/public/logo.png) diff --git a/RELEASES.md b/RELEASES.md index b277e5e6e..6c16ace72 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -33,4 +33,9 @@ a ação irá duplicar o usuário administrador e assim o servidor irá para de * Estilizado as informação de horário, cotação do dolar * `BUG`: Problema de servidor crachando. * Adicionado campo para acesso a segunda view do painel, na página admnistração. -* Ajustado a interface para ser responsiva \ No newline at end of file +* Ajustado a interface para ser responsiva + + +## VERSÃO 1.0.4 + +* Criado aplicativo mobile diff --git a/backend/migrate/Schemas.js b/backend/migrate/Schemas.js index 6c966d38a..88d4e69ba 100644 --- a/backend/migrate/Schemas.js +++ b/backend/migrate/Schemas.js @@ -1,4 +1,5 @@ -const connection = require('../database/connection') +const mysql = require('mysql2') +const database = require('../database/connection') async function SchemaUsers () { const sql = ` @@ -8,9 +9,10 @@ async function SchemaUsers () { UserPassword VARCHAR(255) NOT NULL, UserType VARCHAR(255) NOT NULL);` - await connection.promise().query(sql); - await connection.promise().query("INSERT INTO Users (UserName, UserPassword, UserType ) VALUES ('admin','admin','administrator');"); - + const connection = await mysql.createConnection(database) + await connection.promise().execute(sql) + await connection.promise().execute("INSERT INTO Users (UserName, UserPassword, UserType ) VALUES ('admin','admin','administrator');") + connection.end(); } async function SchemaRooms() { @@ -21,8 +23,9 @@ async function SchemaRooms() { NameImage VARCHAR(100) ); ` - + const connection = await mysql.createConnection(database) await connection.promise().query(sql); + connection.end(); } async function SchemaFloors() { @@ -34,8 +37,9 @@ async function SchemaFloors() { FOREIGN KEY(RoomsID) REFERENCES Rooms(RoomsID)ON DELETE CASCADE ON UPDATE CASCADE ); ` - + const connection = await mysql.createConnection(database) await connection.promise().query(sql); + connection.end(); } diff --git a/frontend/public/admin-mobile.png b/frontend/public/admin-mobile.png new file mode 100644 index 000000000..cc82b1a23 Binary files /dev/null and b/frontend/public/admin-mobile.png differ diff --git a/frontend/public/admin-web.png b/frontend/public/admin-web.png new file mode 100644 index 000000000..8becfaae0 Binary files /dev/null and b/frontend/public/admin-web.png differ diff --git a/frontend/public/admin.png b/frontend/public/admin.png deleted file mode 100644 index e4a1e00ef..000000000 Binary files a/frontend/public/admin.png and /dev/null differ diff --git a/frontend/public/favicon.ico b/frontend/public/favicon.ico index a11777cc4..46ef36cf9 100644 Binary files a/frontend/public/favicon.ico and b/frontend/public/favicon.ico differ diff --git a/frontend/public/index.html b/frontend/public/index.html index aa069f27c..78a54376b 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -10,34 +10,12 @@ content="Web site created using create-react-app" /> - - - React App + Painel de Salas
- diff --git a/frontend/public/login-mobile.png b/frontend/public/login-mobile.png new file mode 100644 index 000000000..e997ebf6f Binary files /dev/null and b/frontend/public/login-mobile.png differ diff --git a/frontend/public/login.png b/frontend/public/login.png index 86b077270..48e5406fb 100644 Binary files a/frontend/public/login.png and b/frontend/public/login.png differ diff --git a/frontend/public/logo192.png b/frontend/public/logo192.png index fc44b0a37..46ef36cf9 100644 Binary files a/frontend/public/logo192.png and b/frontend/public/logo192.png differ diff --git a/frontend/public/logo512.png b/frontend/public/logo512.png index a4e47a654..46ef36cf9 100644 Binary files a/frontend/public/logo512.png and b/frontend/public/logo512.png differ diff --git a/frontend/public/manifest.json b/frontend/public/manifest.json index 080d6c77a..3d6d6ba50 100644 --- a/frontend/public/manifest.json +++ b/frontend/public/manifest.json @@ -1,5 +1,5 @@ { - "short_name": "React App", + "short_name": "Painel de Salas", "name": "Create React App Sample", "icons": [ { diff --git a/frontend/public/view-1.png b/frontend/public/view-1.png new file mode 100644 index 000000000..bd76730cf Binary files /dev/null and b/frontend/public/view-1.png differ diff --git a/frontend/public/view-2.png b/frontend/public/view-2.png new file mode 100644 index 000000000..228d95dc2 Binary files /dev/null and b/frontend/public/view-2.png differ diff --git a/frontend/public/view-mobile.png b/frontend/public/view-mobile.png new file mode 100644 index 000000000..c698093d3 Binary files /dev/null and b/frontend/public/view-mobile.png differ diff --git a/frontend/public/view.png b/frontend/public/view.png deleted file mode 100644 index 999e6a4f3..000000000 Binary files a/frontend/public/view.png and /dev/null differ diff --git a/frontend/src/components/Administration/style.css b/frontend/src/components/Administration/style.css index 12bc9fc20..74585e2e6 100644 --- a/frontend/src/components/Administration/style.css +++ b/frontend/src/components/Administration/style.css @@ -15,6 +15,8 @@ #containerNavigation ul { width: 100%; + background: #fff; + border-radius: 0.2em; } #containerNavigation ul li p { font-weight: bold; @@ -24,19 +26,18 @@ } #containerNavigation ul li:hover { cursor: pointer; - border-left: 2px solid #fff; + background: rgb(219, 219, 219); } #containerNavigation ul li { padding-left: 10px; - margin-top: 10px; - border-radius: 0.5em; height: 50px; text-align: start; font-family: 'Roboto',sans-serif; - background: rgb(19, 18, 23); font-size: small; - color: #fff; + font-weight: bold; + border-bottom: 1px solid rgb(182, 182, 182); + color: #000; display: flex; align-items: center; } @@ -55,7 +56,7 @@ #continerTopToMobile { display: flex; width: 100%; - height: 60px; + height: 65px; background: #fff; position: absolute; flex-direction: row; @@ -67,9 +68,10 @@ } #buttonTopMenu { color: #fff; - width: 30px; - height: 20px; - margin-left: 5px; + width: 40px; + height: 30px; + margin-top: 10px; + margin-left: 10px; cursor: pointer; } #containerFunctional { @@ -99,7 +101,11 @@ font-family: 'Roboto',sans-serif; margin-top: 8px; line-height: 40px; - margin-left: 10px; + padding-left: 10px; height: 40px; + cursor: pointer; + } + #list-menu li:hover { + background: rgb(151, 151, 151); } } \ No newline at end of file diff --git a/frontend/src/components/CreateUser/index.js b/frontend/src/components/CreateUser/index.js index e4174eeed..6210a1459 100644 --- a/frontend/src/components/CreateUser/index.js +++ b/frontend/src/components/CreateUser/index.js @@ -41,7 +41,7 @@ function CreateUser() { { ((password === verifyPassword) && (password !== '') && - (verifyPassword !== '') && + (verifyPassword !== '') && (usertype !== '') ) ?

Senha correta

:

Senha Incorreta

diff --git a/frontend/src/components/ListUsers/style.css b/frontend/src/components/ListUsers/style.css index bd73d9669..bd7f8ea31 100644 --- a/frontend/src/components/ListUsers/style.css +++ b/frontend/src/components/ListUsers/style.css @@ -10,10 +10,10 @@ h2 { } #list { - width: 200px; + width: 300px; } .item-list { - color: #000; + color: #fff; display: block; text-align: center; height: 30px; diff --git a/frontend/src/components/Login/index.js b/frontend/src/components/Login/index.js index 2e9442426..591b2abce 100644 --- a/frontend/src/components/Login/index.js +++ b/frontend/src/components/Login/index.js @@ -44,7 +44,7 @@ function Auth() {
-

Login

+

Login

setUsername(username.target.value)} autoFocus required /> diff --git a/frontend/src/components/Login/style.css b/frontend/src/components/Login/style.css index 31e04c42b..7753be8f4 100644 --- a/frontend/src/components/Login/style.css +++ b/frontend/src/components/Login/style.css @@ -12,8 +12,7 @@ html, body, #root, #containerLogin { height: 100%; width: 100%; display: flex; - background: rgb(2,0,36); - background: #fff; + background: rgb(4, 1, 44); flex: 1; } #containerLogin { @@ -40,7 +39,7 @@ header { color: rgb(6, 2, 66); } h2 { - color: #000; + color: #fff; font-size: 25px; text-align: center; border-bottom: 1px solid #000; @@ -58,7 +57,7 @@ input { width: 90%; margin-top: 20px; border-radius: 0.3em; - border: 0.6px solid rgb(70, 70, 70); + border: 0.5px solid rgb(128, 128, 128); } #area-buttons { @@ -73,7 +72,7 @@ button { height: 40px; border-radius: 5px; font-size: 15px; - background-color: rgb(0, 4, 42); + background-color: rgb(109, 109, 109); color: #fff; cursor: pointer; margin-left: 24px; diff --git a/frontend/src/components/Section/style.css b/frontend/src/components/Section/style.css index 4a73e136c..57cc1c9bf 100644 --- a/frontend/src/components/Section/style.css +++ b/frontend/src/components/Section/style.css @@ -37,18 +37,18 @@ html, body, #root { } .title { - margin-bottom: 13px; + padding-bottom: 13px; width: 100%; font-size: 20px; color: #fff; font-weight: 900; - height: 35px; + height: 45px; text-align: center; - line-height: 35px; + line-height: 45px; } .imageCostumer { - width: 80%; + width: 70%; height: 5%; } diff --git a/frontend/src/components/Weather/index.js b/frontend/src/components/Weather/index.js index 126f87e1c..b456ebe1d 100644 --- a/frontend/src/components/Weather/index.js +++ b/frontend/src/components/Weather/index.js @@ -1,6 +1,5 @@ import React, { useState, useEffect } from 'react' import OAuth from 'oauth' -import config from '../../config' import Price from '../Price' import './style.css' @@ -21,7 +20,6 @@ function Time() { function Weather(){ const [forecast, setForecast ] = useState([]) - const [ firstForecast, setFirstForecast ] = useState({}) const [ date, setDate ] = useState('') useEffect(()=>{ @@ -56,7 +54,6 @@ function Weather(){ const repo_yahoo = JSON.parse(data) //document.getElementById('condicion').innerHTML = `${repo_yahoo.forecasts[0].text}` setForecast(repo_yahoo.forecasts) - setFirstForecast(repo_yahoo.forecasts[0].code) } } ); diff --git a/mobile/.expo-shared/assets.json b/mobile/.expo-shared/assets.json new file mode 100644 index 000000000..17ad2288c --- /dev/null +++ b/mobile/.expo-shared/assets.json @@ -0,0 +1,4 @@ +{ + "f9155ac790fd02fadcdeca367b02581c04a353aa6d5aa84409a59f6804c87acd": true, + "89ed26367cdb9b771858e026f2eb95bfdb90e5ae943e716575327ec325f39c44": true +} \ No newline at end of file diff --git a/mobile/.gitignore b/mobile/.gitignore new file mode 100644 index 000000000..c409cf6af --- /dev/null +++ b/mobile/.gitignore @@ -0,0 +1,14 @@ +node_modules/**/* +.expo/* +npm-debug.* +*.jks +*.p8 +*.p12 +*.key +*.mobileprovision +*.orig.* +web-build/ +web-report/ + +# macOS +.DS_Store diff --git a/mobile/App.js b/mobile/App.js new file mode 100644 index 000000000..5bb12df9a --- /dev/null +++ b/mobile/App.js @@ -0,0 +1,7 @@ +import React from 'react'; +import Routes from './routes' + +export default function App() { + return + +} \ No newline at end of file diff --git a/mobile/app.json b/mobile/app.json new file mode 100644 index 000000000..748700210 --- /dev/null +++ b/mobile/app.json @@ -0,0 +1,34 @@ +{ + "expo": { + "name": "Painel de Salas", + "slug": "Painel", + "privacy": "public", + "sdkVersion": "36.0.0", + "platforms": [ + "ios", + "android", + "web" + ], + "version": "1.0.0", + "orientation": "portrait", + "icon": "./assets/icon.png", + "splash": { + "image": "./assets/splash.png", + "resizeMode": "contain", + "backgroundColor": "#000320" + }, + "updates": { + "fallbackToCacheTimeout": 0 + }, + "assetBundlePatterns": [ + "**/*" + ], + "ios": { + "supportsTablet": true + }, + "android": { + "package": "com.enigma.painel", + "versionCode": 1 + } + } +} diff --git a/mobile/assets/icon.png b/mobile/assets/icon.png new file mode 100644 index 000000000..46ef36cf9 Binary files /dev/null and b/mobile/assets/icon.png differ diff --git a/mobile/assets/splash.png b/mobile/assets/splash.png new file mode 100644 index 000000000..85348d90a Binary files /dev/null and b/mobile/assets/splash.png differ diff --git a/mobile/babel.config.js b/mobile/babel.config.js new file mode 100644 index 000000000..2900afe9d --- /dev/null +++ b/mobile/babel.config.js @@ -0,0 +1,6 @@ +module.exports = function(api) { + api.cache(true); + return { + presets: ['babel-preset-expo'], + }; +}; diff --git a/mobile/package.json b/mobile/package.json new file mode 100644 index 000000000..8cd088b71 --- /dev/null +++ b/mobile/package.json @@ -0,0 +1,29 @@ +{ + "main": "node_modules/expo/AppEntry.js", + "scripts": { + "start": "expo start", + "android": "expo start --android", + "ios": "expo start --ios", + "web": "expo start --web", + "eject": "expo eject" + }, + "dependencies": { + "@react-native-community/masked-view": "0.1.5", + "expo": "~36.0.0", + "react": "~16.9.0", + "react-dom": "~16.9.0", + "react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz", + "react-native-gesture-handler": "~1.5.0", + "react-native-safe-area-context": "0.6.0", + "react-native-screens": "2.0.0-alpha.12", + "react-native-web": "~0.11.7", + "react-native-webview": "7.4.3", + "react-navigation": "^4.1.1", + "react-navigation-stack": "^2.1.1" + }, + "devDependencies": { + "@babel/core": "^7.0.0", + "babel-preset-expo": "~8.0.0" + }, + "private": true +} diff --git a/mobile/routes.js b/mobile/routes.js new file mode 100644 index 000000000..9a2d0c643 --- /dev/null +++ b/mobile/routes.js @@ -0,0 +1,34 @@ +import { createAppContainer } from 'react-navigation' +import { createStackNavigator } from 'react-navigation-stack' + +import Init from './src/pages/Init' +import Login from './src/pages/Login' + +const Routes = createAppContainer( + createStackNavigator({ + Init:{ + screen: Init, + navigationOptions:{ + headerShown: false + } + }, + Login:{ + screen: Login, + navigationOptions:{ + headerShown: false + } + } + },{ + defaultNavigationOptions:{ + headerBackTitleVisible: false, + header: 'none', + headerTintColor: '#fff', + headerStyle:{ + backgroundColor: '#7d40e7' + } + }, + initialRouteName: 'Init' + }) +) + +export default Routes; \ No newline at end of file diff --git a/mobile/src/pages/Init/index.js b/mobile/src/pages/Init/index.js new file mode 100644 index 000000000..520558b8c --- /dev/null +++ b/mobile/src/pages/Init/index.js @@ -0,0 +1,46 @@ +import React, { useState} from 'react'; +import { StyleSheet, Text, View, TextInput, Button } from 'react-native'; + +export default function Init({navigation}){ + const [address, setAddress] = useState(''); + return ( + + setAddress(text)} /> + http://example.painel.com:8080 + +