Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
daa51a5
Environment setting
dmpro91 Jul 2, 2018
25ef2c0
Cteate REDME file
dmpro91 Jul 2, 2018
739307d
Configure webpack to support scss
dmpro91 Jul 2, 2018
e7eb5fe
Up date local branch
dmpro91 Jul 2, 2018
3135874
Edit Readme file & start scripts
dmpro91 Jul 2, 2018
1e68d56
Change webpack config to lint first
dmpro91 Jul 2, 2018
90df5ac
Split webpack config to dev/prod && Clear mess
dmpro91 Jul 2, 2018
69555e2
Edit README
dmpro91 Jul 2, 2018
8929f49
Merge pull request #2 from Social-projects-Rivne/skeleton_prokopiuk
dmpro91 Jul 3, 2018
140934b
Eslint: add indent rules & add style linting
dmpro91 Jul 3, 2018
b95446c
add repo info
dmpro91 Jul 3, 2018
0b0159b
base components structure && routing && img loader ect.
dmpro91 Jul 4, 2018
e25b07c
Merge pull request #3 from Social-projects-Rivne/environment_setting
germaniuk Jul 4, 2018
7bd619f
Merge pull request #4 from Social-projects-Rivne/base_components
dmpro91 Jul 4, 2018
fc3481a
Enable prop type in liner
dmpro91 Jul 5, 2018
9469d16
Merge pull request #5 from Social-projects-Rivne/environment_setting
dmpro91 Jul 5, 2018
ca251b3
This commit will add prop types to existing components and eslintrc rule
io-design Jul 5, 2018
1acf826
Merge pull request #7 from Social-projects-Rivne/iordatii_profile_page
dmpro91 Jul 5, 2018
419e67a
create Profile component and add to route.jsx
io-design Jul 5, 2018
a4528e4
Fix image relative path
dmpro91 Jul 6, 2018
e4b5b26
Profile page fetching data
io-design Jul 6, 2018
f51510a
Merge pull request #8 from Social-projects-Rivne/environment_setting
Stan0men Jul 6, 2018
e5d8201
Add Header & add login link to header
dmpro91 Jul 7, 2018
29eba93
Changed the nesting of components
dmpro91 Jul 7, 2018
a131741
Merge pull request #9 from Social-projects-Rivne/header
kharytonov88 Jul 7, 2018
d96e16f
add car card component
io-design Jul 8, 2018
2a17268
Merge branch 'dev' into iordatii_profile_page
io-design Jul 8, 2018
e2ef2bd
Add dashbord page & add user data json
dmpro91 Jul 8, 2018
87864b4
install axios & create user list component
dmpro91 Jul 8, 2018
838a826
Profile page improvements
io-design Jul 9, 2018
a4e72f6
added materialize scss first stage
io-design Jul 9, 2018
bbdb21a
Add materialize, change style of header and menu
io-design Jul 9, 2018
1b6455e
merge
io-design Jul 9, 2018
942d619
add basic form
Stan0men Jul 10, 2018
8eacb9f
Add feedbacks to profile page
io-design Jul 10, 2018
1616d90
Add axios to fetch data
io-design Jul 10, 2018
5323396
Merge pull request #10 from Social-projects-Rivne/environment_setting
germaniuk Jul 10, 2018
bafe502
Merged dev fixed conflict
dmpro91 Jul 10, 2018
ca81ab2
Merge branch 'dev' into iordatii_profile_page
io-design Jul 10, 2018
f6c62ca
Add styles & route
dmpro91 Jul 10, 2018
9b13ebf
add footer
Stan0men Jul 11, 2018
52d7474
Add triger component for ban btn & add user btn
dmpro91 Jul 11, 2018
3a33db3
Merge pull request #12 from Social-projects-Rivne/dashbord
io-design Jul 11, 2018
dc5d5cf
merge with dev
io-design Jul 11, 2018
2b0dd2e
Add new car, form data sbmit handler
io-design Jul 12, 2018
54898fc
added login and register pages
kharytonov88 Jul 13, 2018
2f16ec4
Modal
io-design Jul 13, 2018
c592fff
Fix header in sidebar
dmpro91 Jul 14, 2018
79ee6b1
Add button for subpoint
dmpro91 Jul 15, 2018
c57db31
Form validation, Toasts, History cards
io-design Jul 15, 2018
bd357f8
Minor code rewriting
io-design Jul 16, 2018
c5e8598
Delete vscode folder, remove google font link
io-design Jul 16, 2018
47b0282
add some styles
Stan0men Jul 17, 2018
165e090
add some styles
Stan0men Jul 17, 2018
df5dabb
add some css
Stan0men Jul 17, 2018
dc7cb76
add some css
Stan0men Jul 17, 2018
5066f84
Add active to route, add shape n prop types, move components to compo…
io-design Jul 17, 2018
188a8e7
fixed login page
kharytonov88 Jul 17, 2018
8e1add8
Create setFirstCarAsActive function for CarCard
io-design Jul 17, 2018
15148bf
Fix color in sidebar
dmpro91 Jul 17, 2018
c1273bd
Fix text transform in navigation menu
dmpro91 Jul 17, 2018
d98a93e
Add google map in app
dmpro91 Jul 18, 2018
e254a5c
Merge pull request #14 from Social-projects-Rivne/iordatii_profile_page
io-design Jul 18, 2018
4b7e958
fixed redirection on create accoutn button
kharytonov88 Jul 18, 2018
4c01e69
Merge remote-tracking branch 'origin/dev' into sidebar
dmpro91 Jul 18, 2018
1ebd8bf
Merge pull request #13 from Social-projects-Rivne/login
kharytonov88 Jul 18, 2018
a0a375b
Search start
io-design Jul 18, 2018
a2eb7c2
retarded google api
io-design Jul 18, 2018
c6bb7e5
almost done (without some styles)
Stan0men Jul 19, 2018
9652f77
almost done (without some styles)
Stan0men Jul 19, 2018
58092cb
Merge branch 'dev' into info_page
Stan0men Jul 19, 2018
f7f03b5
Search route results
io-design Jul 19, 2018
5c23ae9
Update Menu.jsx
Stan0men Jul 20, 2018
ce7f299
Clear const Profile = () => <h1>Profile</h1>;
Stan0men Jul 20, 2018
3820d4e
clear 2 blank lines
Stan0men Jul 20, 2018
69acb7a
Add Places API & method for add location marker
dmpro91 Jul 20, 2018
caf575e
Create new trip page
dmpro91 Jul 20, 2018
b2768c0
Methods for getting route from current point on map
dmpro91 Jul 23, 2018
a464771
Get info trip from API
dmpro91 Jul 23, 2018
3adf6ad
fix <textarea/>
Stan0men Jul 23, 2018
f31fe91
Add save trip info button
dmpro91 Jul 23, 2018
824dcfc
Change language on map
dmpro91 Jul 23, 2018
9883f91
Merge pull request #17 from Social-projects-Rivne/info_page
Stan0men Jul 23, 2018
2310bf9
Search routes filters
io-design Jul 23, 2018
30297ab
Change map component
dmpro91 Jul 24, 2018
0b1a2cd
Parse name route from geocode
dmpro91 Jul 24, 2018
8b6dd02
Save new trip in localStorage
dmpro91 Jul 24, 2018
3ea8cbe
Component for road view
dmpro91 Jul 24, 2018
897adff
Fix data infotrip
dmpro91 Jul 24, 2018
b07278e
local storage raw
kharytonov88 Jul 24, 2018
9e923b3
...
kharytonov88 Jul 24, 2018
6de4598
Merge branch 'login' of https://github.com/Social-projects-Rivne/Trip…
kharytonov88 Jul 24, 2018
6ca626c
fix merge
io-design Jul 24, 2018
ba02561
merge fix2
io-design Jul 24, 2018
c138701
Merge branch 'dev' into sidebar
dmpro91 Jul 24, 2018
910cfba
fix merge
io-design Jul 24, 2018
938ea78
Resolve conflict
dmpro91 Jul 24, 2018
96d2a36
Fetching data from localStorage
io-design Jul 24, 2018
8958e20
add filter and forting for list of users on admin dashboard
germaniuk Jul 25, 2018
ec9edab
Added localstorage to login form
kharytonov88 Jul 25, 2018
2f97d87
fix start end points name size
io-design Jul 25, 2018
18a68d5
Added onSubmt to fix
kharytonov88 Jul 25, 2018
f247f29
Merge pull request #19 from Social-projects-Rivne/filter_and_sorting_…
germaniuk Jul 25, 2018
12f9b0e
Fix map reload
io-design Jul 25, 2018
f526018
Merge pull request #18 from Social-projects-Rivne/sidebar
io-design Jul 26, 2018
5f67680
change api key
io-design Jul 26, 2018
c704652
fix merge
io-design Jul 26, 2018
abbf8c9
Merge pull request #21 from Social-projects-Rivne/merged_test
germaniuk Jul 26, 2018
770ce7a
add general style
io-design Jul 26, 2018
6cd8ddc
Merge pull request #22 from Social-projects-Rivne/general_styles
dmpro91 Jul 26, 2018
ff79771
Рassing the filter into a separate component
dmpro91 Jul 28, 2018
9a7cd7e
Changed styles
dmpro91 Jul 28, 2018
2835205
Fix global card styles
dmpro91 Jul 28, 2018
e4c3e07
Set search trip page as home
dmpro91 Jul 28, 2018
d67f266
Change view of blocked users
dmpro91 Jul 28, 2018
91c60bd
Add iterator to list of items
dmpro91 Jul 28, 2018
317ece1
pg training
io-design Jul 28, 2018
ce563a4
modyfied login page
kharytonov88 Jul 30, 2018
84bf442
Fix content container width
dmpro91 Jul 30, 2018
fcd0ce9
Fix text styles in trip info
dmpro91 Jul 30, 2018
95920cd
Add pre loader to map
dmpro91 Jul 30, 2018
5a76f34
modyfied login page
kharytonov88 Jul 30, 2018
aef14eb
Database connect create tables, data. Profile cars CRUD
io-design Jul 30, 2018
117f996
package
io-design Jul 31, 2018
9d4f526
Merge pull request #23 from Social-projects-Rivne/dashbord
dmpro91 Jul 31, 2018
4555fe8
fixed login page with new styles
kharytonov88 Jul 31, 2018
9484315
fixed login page with new styles v2
kharytonov88 Jul 31, 2018
b9f2661
Merge pull request #24 from Social-projects-Rivne/login
kharytonov88 Jul 31, 2018
0a8270a
Merge branch 'dev' into new_trip
dmpro91 Jul 31, 2018
1e30a3b
Merge branch 'dev' into pg_connect
io-design Jul 31, 2018
4301f9f
fix
io-design Jul 31, 2018
7351438
Merge pull request #25 from Social-projects-Rivne/pg_connect
io-design Aug 1, 2018
0bf3cd5
Fix marker edit
dmpro91 Aug 2, 2018
7d95a76
Fix styles on map page
dmpro91 Aug 3, 2018
2154a68
Resolving conflicts
dmpro91 Aug 3, 2018
6b5284f
Rewrite db connect on promise
dmpro91 Aug 7, 2018
1839122
Refactoring user controller
dmpro91 Aug 7, 2018
266d985
Refactoring db utils
dmpro91 Aug 7, 2018
1bea230
Update README
dmpro91 Aug 7, 2018
c342369
Fix README
dmpro91 Aug 7, 2018
752e19c
Fix input in trip point & fix API conflicts
dmpro91 Aug 8, 2018
4ff1b32
Change Api key
dmpro91 Aug 8, 2018
62a9744
Fix after review
dmpro91 Aug 10, 2018
cac4bf6
Merge pull request #28 from Social-projects-Rivne/db_settings
io-design Aug 12, 2018
d425fc9
Fix after review & remove dropdown
dmpro91 Aug 12, 2018
0526ffd
Merge pull request #26 from Social-projects-Rivne/new_trip
dmpro91 Aug 12, 2018
5ed5931
Create table scripts
dmpro91 Aug 12, 2018
657e92a
Db seed scripts
dmpro91 Aug 12, 2018
875fe82
add user_id column into trips table
dmpro91 Aug 12, 2018
b4a87c4
Create MC for add new trip
dmpro91 Aug 12, 2018
f42c1cf
Send Confirmation email
io-design Aug 12, 2018
6b9752a
Rewriting query from local storage on api
dmpro91 Aug 13, 2018
9e8ebcc
Login, logout, Redirect, Private routes
io-design Aug 14, 2018
f084cbb
Merge pull request #29 from Social-projects-Rivne/trip_model
io-design Aug 14, 2018
8416bea
merge
io-design Aug 14, 2018
280ff69
fix
io-design Aug 14, 2018
4c4ca1a
merge
io-design Aug 14, 2018
7cf3c73
sessionStorage auth
io-design Aug 14, 2018
8983cb4
Merge pull request #30 from Social-projects-Rivne/login_register_redo
dmpro91 Aug 16, 2018
dce9e60
Default path for axios & CORS for express
dmpro91 Aug 16, 2018
14b2ba3
Create History MC
dmpro91 Aug 16, 2018
5a7b2af
Add color for history trip
dmpro91 Aug 16, 2018
33ab0f5
Add admin to db
dmpro91 Aug 16, 2018
158e525
Add Rajesh
dmpro91 Aug 16, 2018
e28d84d
Merge pull request #31 from Social-projects-Rivne/db_settings
io-design Aug 16, 2018
3be6a53
hide dashboard from user
io-design Aug 16, 2018
21067a9
merge
io-design Aug 16, 2018
a550147
Add MC for feedbacks
dmpro91 Aug 16, 2018
73002a9
Add helpers for date
dmpro91 Aug 16, 2018
bac3a60
Fetch date on client
dmpro91 Aug 16, 2018
ef23718
Add dbseeds for feedback table
dmpro91 Aug 16, 2018
89a8883
Merge pull request #32 from Social-projects-Rivne/db_settings
io-design Aug 16, 2018
cb4a058
Dashboard users from database. Delete and block
io-design Aug 16, 2018
4d413ef
merge
io-design Aug 16, 2018
57f62c6
Hide delete admin from admin
io-design Aug 16, 2018
64dcc40
Merge pull request #33 from Social-projects-Rivne/features_io
dmpro91 Aug 16, 2018
5f4b843
Fix prop types on profile
dmpro91 Aug 16, 2018
491fd61
Add redirect after creating trip
dmpro91 Aug 16, 2018
3240ca0
production settings
dmpro91 Aug 16, 2018
c5bd1ad
Fix redirect from email
dmpro91 Aug 16, 2018
5ce96db
Fix redirect email for build
dmpro91 Aug 17, 2018
e6bd96b
change styles for filter block
germaniuk Aug 17, 2018
d266069
Preparation a data for demo
dmpro91 Aug 17, 2018
c34c716
Merge pull request #34 from Social-projects-Rivne/Fixes_for_demo
io-design Aug 17, 2018
276a0a0
Merge pull request #35 from Social-projects-Rivne/dashboard_filters
io-design Aug 17, 2018
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
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
server/*
config/webpack*
27 changes: 27 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"parser": "babel-eslint",
"extends": "airbnb",
"plugins": [
"react",
"jsx-a11y",
"import"
],
"env": {
"browser": true,
"node": true
},
"rules": {
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/jsx-one-expression-per-line": "off",
"react/no-array-index-key": "off",
"jsx-a11y/href-no-hash": "off",
"jsx-a11y/label-has-for": "off",
"react/prefer-stateless-function": "off",
"comma-dangle": ["error", {"functions": "never"}],
"indent": ["error", 2],
"linebreak-style": "off",
"import/no-unresolved": "off",
"no-console": "off",
"object-curly-newline": "off"
}
}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Desktop.ini
.directory
*~

# JetBrains
.idea

# npm
node_modules
Expand All @@ -25,3 +27,8 @@ coverage

# Benchmarking
benchmarks/graphs

# Other
.vscode
build
server/.env
3 changes: 3 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "stylelint-config-standard",
}
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# TripAssistantCore

Start Express server: npm run express;<br><br>
<i>NOTE: Edit database config before starting API server. Path: server/.env.sample (delete .sample and add your credential)</i><br><br>
Database setup:<br>
1: <i>npm run createTables</i>;<br>
2: <i>npm run dbseed</i>.<br>
For recreate all project tables with empty data use:<br>
<i>npm run reCreateTables</i><br>
For clearing all tables use:<br>
<i>npm run clearAllTabless</i><br>
<br>
<br>
<br>
For dev Server: npm run dev;<br>
For build production: npm run build;<br>
<br>
<i>NOTE: "Dev Server" starting with Eslint;</i><br>
<i></i>
92 changes: 92 additions & 0 deletions client/App.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
import React, { Fragment } from 'react';
import { Route, Switch, Redirect } from 'react-router-dom';
import PropTypes from 'prop-types';
import { GoogleApiWrapper } from 'google-maps-react';
import axios from 'axios';
import './App.scss';
import Routes from './routes';
import Login from './pages/Login';
import Header from './components/Header';
import Menu from './components/Menu';

const KEY = 'AIzaSyDWfF4B8J4mmrLGltJfU9XqEauLS8PCarg';

const PrivateRoute = ({ component: Component, isAuth, ...rest }) => {
const id = window.location.search.substr(1);
if (id) {
axios.get(`/api/register/${id}`)
.then(({ data: { iduser, role } }) => {
if (iduser) {
sessionStorage.setItem('iduser', iduser);
sessionStorage.setItem('role', role);
}
})
.catch(e => console.log(e));
}
return (
<Route
{...rest}
render={props => (
isAuth === true
? <Component {...props} />
: <Redirect to="/login" />
)}
/>
);
};

class App extends React.Component {
constructor() {
super();
this.state = {
isAuth: false
};
}

componentDidMount() {
this.updateIsAuth();
}

updateIsAuth = () => {
if (sessionStorage.getItem('iduser')) {
this.setState({ isAuth: true });
} else {
this.setState({ isAuth: false });
}
}

runLogout = () => {
sessionStorage.removeItem('iduser');
sessionStorage.removeItem('role');
this.setState({ isAuth: false });
}

render() {
const { isAuth } = this.state;

return (
<Fragment>
<Header isAuth={isAuth} runLogout={this.runLogout} />
<div className="main">
<Menu isAuth={isAuth} />
<div className="content">
<Switch>
{Routes.map((route, i) => <PrivateRoute {...route} isAuth={isAuth} key={i} />)}
<Route path="/(login|register)" render={props => <Login {...props} isAuth={isAuth} updateIsAuth={this.updateIsAuth} />} />
</Switch>
</div>
</div>
</Fragment>
);
}
}

PrivateRoute.propTypes = {
component: PropTypes.func.isRequired,
isAuth: PropTypes.bool.isRequired
};

export default GoogleApiWrapper({
apiKey: (KEY),
language: 'en'
})(App);
144 changes: 144 additions & 0 deletions client/App.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
@import 'materialize-css/sass/materialize.scss';

#app {
padding-top: 50px;
height: 100%;
}

#map {
margin: -10px -15px 0 0;
flex-grow: 1;
height: calc(100vh - 50px);
position: relative;
}

.main {
display: flex;
height: auto;
min-height: calc(100vh - 50px);
}

.content {
width: calc(100% - 110px);
padding: 10px 15px 0;
background: url('~@images/profile-page-bg.jpg') top;
background-size: cover;

&__wrapper {
margin-right: auto;
margin-left: auto;
padding-right: 15px;
padding-left: 15px;
width: 100%;
max-width: 1240px;
}
}

.online::before {
content: "";
display: inline-block;
width: 10px;
height: 10px;
margin-right: 5px;
border-radius: 50%;
background-color: #4caf50;
}

.offline::before {
content: "";
display: inline-block;
width: 10px;
height: 10px;
margin-right: 5px;
border-radius: 50%;
background-color: #e53935;
}

button {
border-width: 0;
border-style: none;
border-color: transparent;
border-image: none;
}

// COLORS
$blue: #33afe0;
$darkblue: #252d3a;
$green: #2ab7a9;

p {
color: rgba($darkblue, 0.8);
font-size: 14px;
font-weight: 400;
line-height: 1.5em;
}

h1 {
color: #252d3a;
font-size: 30px;
font-weight: 600;
line-height: 1.2em;
}

.main-header {
color: #252d3a;
font-size: 30px;
font-weight: 600;
line-height: 1em;
padding: 40px 15px 30px;
background-color: rgba(#fff, 0.5);
text-align: center;
margin: -15px -10px 20px;
}

.main-card {
background-color: #f7f8fa;
text-align: left;
width: 100%;
border-radius: 3px;
box-shadow: 20px 0 40px rgba(74, 77, 101, 0.2);

&__heading {
color: #252d3a;
font-size: 14px;
line-height: 1em;
font-weight: 600;
margin-bottom: 0;
padding: 32px 15px 31px;
box-shadow: 0 20px 40px rgba(89, 100, 191, 0.1);
border-radius: 3px 3px 0 0;
text-align: center;
}

&__wrap {
background-color: #f7f8fa;
margin-bottom: 35px;
width: 100%;
border-radius: 3px;
box-shadow: 20px 0 40px rgba(74, 77, 101, 0.2);
}

&__body {
padding: 15px;
text-align: center;
}
}

.main-btn {
display: inline-block;
padding: 15px 23px 15px;
margin: 0 10px;
border-radius: 3px;
background-color: $blue;
color: #fff;
font-size: 12px;
font-weight: 600;
line-height: 1em;
letter-spacing: 0.6px;
cursor: pointer;
transition: background-color 0.15s linear;

&:hover {
background-color: $darkblue;
}
}
Loading