Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #60

Open
wants to merge 93 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
e005cd4
user Panel restored in navigation (Navbar.js file)
michal-kusnierz Dec 16, 2019
a774f49
Update README.md
aleksanderwalczuk Dec 18, 2019
16dbbee
Merge pull request #1 from infoshareacademy/dev
aleksanderwalczuk Jan 3, 2020
4b98619
Create LICENSE
Michaldoroz7 Feb 26, 2020
24edd4f
Merge pull request #49 from infoshareacademy/add-license-1
michal-kusnierz Feb 26, 2020
d977797
npm audit fixed
aleksanderwalczuk Jun 15, 2020
394f44c
updated package.json
aleksanderwalczuk Sep 13, 2020
49ca5f0
added Hooked function in Search.js, rewriting Search Class there. Lef…
aleksanderwalczuk Sep 13, 2020
4dc24a4
added handlers to Hooked Search
aleksanderwalczuk Sep 13, 2020
b4b5dcd
added getter into funtional Search.js component
aleksanderwalczuk Sep 13, 2020
d22626c
finished queryOutput, added todos
aleksanderwalczuk Sep 13, 2020
7a7dd8c
added Query functions as dumb components, unused till the Hook isn't …
aleksanderwalczuk Sep 13, 2020
80f6161
added Search Items, output and modal
aleksanderwalczuk Sep 13, 2020
a812d4c
src/components/Search.js: renamed Hooked const to Search, added missing
aleksanderwalczuk Sep 13, 2020
1a56e2d
src/components/Search.js: fixed useEffect memory leak, added cleanup fn
aleksanderwalczuk Sep 13, 2020
3a4d65e
src/components/Search.js: added missing Image properties to grid output,
aleksanderwalczuk Sep 13, 2020
1e2afae
src/components/Search.js: deleted unused useState declarations
aleksanderwalczuk Sep 13, 2020
2c96612
src/components/Search.js: deleted class based Search component
aleksanderwalczuk Sep 13, 2020
2c17a5e
src/components/SearchItems.js: init
aleksanderwalczuk Sep 13, 2020
81eb489
src/components/Search.js: imported SearchItems as separate component
aleksanderwalczuk Sep 13, 2020
c039396
src/components/Modal.js: init
aleksanderwalczuk Sep 13, 2020
a5707ee
src/components/Search.js: set modal as another component, added missing
aleksanderwalczuk Sep 13, 2020
229ab27
src/components/Search.js: used JSX set in another const
aleksanderwalczuk Sep 13, 2020
43300d7
src/components/Search.js: fixed typos in unused FilteredQueryResults
aleksanderwalczuk Sep 13, 2020
bd9e731
src/components/Search.js: moved FilteredQueryResults to SearchItems.js
aleksanderwalczuk Sep 13, 2020
775e882
src/components/TripModal.js: renamed due to semantic element name dup…
aleksanderwalczuk Sep 13, 2020
3b6279c
src/components/TripModal.js: imported semantic-ui Modal
aleksanderwalczuk Sep 13, 2020
23cc803
src/components/SearchItems.js: renamed SearchInputs, removed default
aleksanderwalczuk Sep 13, 2020
864e065
src/components/Search.js: updated exports, deleted unused imports
aleksanderwalczuk Sep 13, 2020
4d3cbc5
src/components/Search.js: delegted todo
aleksanderwalczuk Sep 13, 2020
78ed698
src/components/TripModal.js: added destructuring and if statement
aleksanderwalczuk Sep 13, 2020
30c407f
src/components/Search.js: deleted unused import and todos
aleksanderwalczuk Sep 13, 2020
2b365b8
src/components/Search.js: added message parameter to NooQueryResult
aleksanderwalczuk Sep 14, 2020
2a87157
src/components/SearchItems.js: moved NoQueryResult to SearchItems, added
aleksanderwalczuk Sep 14, 2020
99a48f8
src/components/SearchItems.js: set NoFilterQueryResult message as prop
aleksanderwalczuk Sep 14, 2020
cbd86b2
src/components/Favourites.js: imported NoQueryRes
aleksanderwalczuk Sep 14, 2020
1d59674
Merge pull request #51 from Rednaxela700/split-search
aleksanderwalczuk Sep 14, 2020
4c3bb27
src/components/Search.js: moved handleFavIcon trigger to useEffect,
aleksanderwalczuk Sep 14, 2020
8e581b9
src/components/Search.js: added useEffect cleanup
aleksanderwalczuk Sep 14, 2020
3f1fcb2
src/components/Favourites.js: added functional Favourites component
aleksanderwalczuk Sep 14, 2020
6a98a6d
src/components/Favourites.js: successfully converted class component to
aleksanderwalczuk Sep 14, 2020
40019a1
src/components/Favourites.js: deleted unused class based component
aleksanderwalczuk Sep 14, 2020
8dd0114
Merge branch 'dev' of https://github.com/Rednaxela700/jfdd13-dreamtea…
aleksanderwalczuk Oct 3, 2020
98efb05
src/App.js: moved inline styles to css
aleksanderwalczuk Oct 3, 2020
8b21d4e
formatted all files in 2 sraces
aleksanderwalczuk Oct 3, 2020
1fafd7e
src/index.js: removed unused css
aleksanderwalczuk Oct 3, 2020
e0aa859
src/components/Navbar.js: removed inline styles, transformed menuItem…
aleksanderwalczuk Oct 4, 2020
5f3a6c8
src/layout/: init, moved Appbar and Navbar
aleksanderwalczuk Oct 4, 2020
58aeed3
src/components/Appbar.js: moved inline styles to css file
aleksanderwalczuk Oct 4, 2020
6873584
src/screens/Test.js: removed
aleksanderwalczuk Oct 4, 2020
8ad0a60
src/components/SearchItems.js: fixed a typo
aleksanderwalczuk Oct 4, 2020
5f65cc2
src/components/Search.js: simplified useEffect hook
aleksanderwalczuk Oct 4, 2020
ecc97bb
src/components/SearchItems.js: renamed FilteredQueryResults to single…
aleksanderwalczuk Oct 4, 2020
b8689a5
src/components/PieChart.js: converted class to functional component
aleksanderwalczuk Oct 4, 2020
33cb799
src/components/PieChart.js removed unused import
aleksanderwalczuk Oct 4, 2020
2958446
src/components/DataChart.js: converted to functional component
aleksanderwalczuk Oct 4, 2020
98d45bc
src/screens/Register.js: added user registration time
aleksanderwalczuk Oct 4, 2020
ff9cf09
src/services/TripService.js: correct formatting
aleksanderwalczuk Oct 4, 2020
9411aa8
src/components/Favourites.js: removed unneccessary useEffect
aleksanderwalczuk Oct 4, 2020
7289321
Merge pull request #52 from Rednaxela700/cleanup
aleksanderwalczuk Oct 5, 2020
1520207
package.json: updated firebase
aleksanderwalczuk Oct 5, 2020
bc6901c
src/components/Form.js: added functional TripForm component
aleksanderwalczuk Oct 5, 2020
a27b846
src/components/Form.js: fix - adding a trip now sends correct continent
aleksanderwalczuk Oct 5, 2020
dd44ffe
src/App.js: changed form component name and import
aleksanderwalczuk Oct 5, 2020
e9d5afe
Merge pull request #59 from Rednaxela700/convert-form
aleksanderwalczuk Oct 5, 2020
29ab9d7
src/components/Form.js: deleted class based component
aleksanderwalczuk Oct 5, 2020
cd29bc0
src/components/Form.js: deleted unneccesary div
aleksanderwalczuk Oct 6, 2020
5dff515
src/components/Form.js: extracted form handler, fixed typos
aleksanderwalczuk Oct 6, 2020
361cf9e
src/components/Form.js: moved form to Form dir, updated imports
aleksanderwalczuk Oct 6, 2020
e28e24f
src/components/Form/Form.js: replaced semantic ui form elements with
aleksanderwalczuk Oct 6, 2020
98d7e04
src/components/Form/YupSchema.js: moved account schema to separate file
aleksanderwalczuk Oct 6, 2020
7cf9a84
Merge pull request #61 from Rednaxela700/form-split
aleksanderwalczuk Oct 7, 2020
58d736f
src/components/PieChart.js: deleted mock data for PieChart
aleksanderwalczuk Oct 7, 2020
00593da
src/components/DataChart.js: created fn converting registration
aleksanderwalczuk Oct 7, 2020
ef543ab
src/components/DataChart.js: added fn retriving last 2 years from
aleksanderwalczuk Oct 7, 2020
6db651a
src/components/DataChart.js: return two years in getLastYearOrTwo
aleksanderwalczuk Oct 8, 2020
70b7107
src/components/DataChart.js: added notes in createChartData fn
aleksanderwalczuk Oct 8, 2020
b8e082e
src/components/DataChart.js: set fn returning lastTwoMonths data with
aleksanderwalczuk Oct 8, 2020
39bc84f
src/components/DataChart.js: return correct chart data for single year
aleksanderwalczuk Oct 9, 2020
42468ba
src/components/DataChart.js: createChartData shows correct output for
aleksanderwalczuk Oct 9, 2020
48df500
src/components/DataChart.js: put mockData as chart input again, fixed
aleksanderwalczuk Oct 9, 2020
657cd45
src/components/DataChart.js: renamed getMonthName, now it returns month
aleksanderwalczuk Oct 9, 2020
07fa804
src/components/DataChart.js: createChartData return final object data
aleksanderwalczuk Oct 9, 2020
d7d4626
src/components/DataChart.js: rendering chartData in BarChart component
aleksanderwalczuk Oct 9, 2020
198533f
src/components/DataChart.js: deleted mockData
aleksanderwalczuk Oct 9, 2020
5c2aaf1
src/components/DataChart.js: removed comments
aleksanderwalczuk Oct 9, 2020
320e98e
src/components/DataChart.js: set result data and reduce from
aleksanderwalczuk Oct 9, 2020
eb000ea
src/components/DataChart.js: fixed matching previous registration year
aleksanderwalczuk Oct 9, 2020
c93a986
src/components/DataChart.js: added TODO and mock
aleksanderwalczuk Oct 9, 2020
6c07206
src/components/DataChart.js: fixed naming and removed unneccessary if…
aleksanderwalczuk Oct 10, 2020
72c1a96
src/components/DataChart.js: removed mock data and console log
aleksanderwalczuk Oct 10, 2020
d9f16ef
src/components/DataChart.js: renamed getMonth() to convertMonth
aleksanderwalczuk Oct 10, 2020
880c252
Merge pull request #62 from Rednaxela700/chart-fix
aleksanderwalczuk Oct 10, 2020
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
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
This project is currently in progress, check it live here: (http://app.dreamteam.jfdd13.is-academy.pl/)



This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts
Expand Down
9,137 changes: 5,009 additions & 4,128 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"firebase": "^7.5.0",
"firebase": "^7.22.0",
"formik": "^2.0.4",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-favicon": "0.0.17",
"react-loader-spinner": "^3.1.5",
"react-minimal-pie-chart": "^5.0.2",
"react-router-dom": "^5.1.2",
"react-scripts": "3.2.0",
"react-scripts": "^3.4.3",
"recharts": "^1.8.5",
"semantic-ui-css": "^2.4.1",
"semantic-ui-react": "^0.88.1",
Expand Down
36 changes: 35 additions & 1 deletion src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
flex-direction: column;
flex: 1;
min-height: 100vh;
margin-left: 150px;
margin: 0 0 0 150px;
font-size: 16px;
}

Expand Down Expand Up @@ -109,4 +109,38 @@
bottom: 1.5rem;
right: 1.5rem;
color: #fff;
}

@media all and (max-width:500px) {
.main {
margin: 0 0 0 60px
}
}

/* appbar.js */

.AppBarHeader {
display: flex;
align-items: center;
justify-content: center;
height: 60px;
background-color: #1b1c1d;
font-size: 1.5rem;
color: #fff;
}

/* navbar.js */

.NavStyles {
position: fixed !important;
min-width: 150px;
min-height: 100vh;
border: 0;
border-radius: 0;
}

@media all and (max-width: 500px) {
.NavStyles {
min-width: 60px;
}
}
65 changes: 30 additions & 35 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,50 +1,45 @@
import React from 'react';
import {BrowserRouter, Route, Switch, Redirect} from "react-router-dom";
import { BrowserRouter, Route, Switch, Redirect } from "react-router-dom";
import "./App.css";
import Navbar from "./components/Navbar";
import Navbar from "./layout/Navbar";
import Dashboard from "./components/Dashboard";
import Form from "./components/Form";
import TripForm from "./components/Form/Form";
import Favorites from "./components/Favourites";
import Search from "./components/Search";
import Appbar from "./components/Appbar";
import Appbar from "./layout/Appbar";
import 'semantic-ui-css/semantic.min.css'
import UserPanel from './components/UserPanel';
import Register from './screens/Register';
import Login from './screens/Login';
import LoggedUser from './screens/LoggedUser';
import Favicon from 'react-favicon';
function App() {
return (
<>
<Favicon url="../public/favicon.ico" />
<BrowserRouter>
<div className="App">
<Navbar/>
<main className={'main'} style={{
marginLeft: (window.screen.width < 501) ? '60px':'150px',
marginTop:'0',
marginBottom: '0'
}
}>
<Appbar/>
<Switch>
<Route exact strict path="/" component={Dashboard}/>
<Route exact strict path="/main" component={Dashboard}/>
<Route exact strict path="/search" component={Search}/>
<Route exact strict path="/panel" component={UserPanel}/>
<Route exact strict path="/register" component={Register}/>
<Route exact strict path="/login" component={Login}/>
<Route exact strict path="/user" component={LoggedUser}/>
<Route exact strict path="/form/" component={Form}/>
<Route exact strict path="/favs" component={Favorites}/>
<Route component={() => <h1>404 - sadface</h1>}/>
</Switch>
</main>
</div>
<Redirect to="/"/>
</BrowserRouter>
</>
);
return (
<>
<Favicon url="../public/favicon.ico" />
<BrowserRouter>
<div className="App">
<Navbar />
<main className={'main'}>
<Appbar />
<Switch>
<Route exact strict path="/" component={Dashboard} />
<Route exact strict path="/main" component={Dashboard} />
<Route exact strict path="/search" component={Search} />
<Route exact strict path="/panel" component={UserPanel} />
<Route exact strict path="/register" component={Register} />
<Route exact strict path="/login" component={Login} />
<Route exact strict path="/user" component={LoggedUser} />
<Route exact strict path="/form" component={TripForm} />
<Route exact strict path="/favs" component={Favorites} />
<Route component={() => <h1>404 - sadface</h1>} />
</Switch>
</main>
</div>
<Redirect to="/" />
</BrowserRouter>
</>
);
}

export default App;
25 changes: 0 additions & 25 deletions src/components/Appbar.js

This file was deleted.

12 changes: 6 additions & 6 deletions src/components/Continents.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export const Continents = [
{ key: 'afr', value: 1, text: "Afryka" },
{ key: 'apd', value: 2, text: "Ameryka Południowa" },
{ key: 'apn', value: 3, text: "Ameryka Północna" },
{ key: 'aus', value: 4, text: "Australia i Oceania" },
{ key: 'azj', value: 5, text: "Azja" },
{ key: 'eur', value: 6, text: "Europa" }
{ key: 'afr', value: 1, text: "Afryka" },
{ key: 'apd', value: 2, text: "Ameryka Południowa" },
{ key: 'apn', value: 3, text: "Ameryka Północna" },
{ key: 'aus', value: 4, text: "Australia i Oceania" },
{ key: 'azj', value: 5, text: "Azja" },
{ key: 'eur', value: 6, text: "Europa" }
];
96 changes: 48 additions & 48 deletions src/components/Dashboard.js
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
import React from 'react';
import PieChartComponent from "./PieChart";
import {Grid} from "semantic-ui-react";
import { Grid } from "semantic-ui-react";
import DataBarChart from "./DataChart";

function Dashboard() {
return (
<div className="Dashboard">
<Grid padded={true}>
<Grid.Row>
<Grid.Column>
<h2>Planowanie podróży nigdy nie było tak proste i przyjemne</h2>
</Grid.Column>
</Grid.Row>
<Grid.Row>
<Grid.Column widescreen={8} largeScreen={8} mobile={16}>
<PieChartComponent/>
</Grid.Column>
<Grid.Column widescreen={8} largeScreen={8} mobile={16} verticalAlign={'middle'}>
<DataBarChart/>
</Grid.Column>
</Grid.Row>
<Grid.Row centered={true}>
<Grid.Column width={8} verticalAlign={'middle'}>
<h3>Z WAY.TO pojedziesz do:</h3>
<div style={{display: 'flex', justifyContent: 'center'}}>
<ul className={'pieUl'}>
<li className={'pieLi pieLi__asia'}>Azji</li>
<li className={'pieLi pieLi__europe'}>Europy</li>
<li className={'pieLi pieLi__northamerica'}>Północnej Ameryki</li>
<li className={'pieLi pieLi__africa'}>Afryki</li>
</ul>
<ul className={'pieUl'}>
<li className={'pieLi pieLi__southamerica'}>Ameryki Południowej</li>
<li className={'pieLi pieLi__antarctica'}>Antarktydy</li>
<li className={'pieLi pieLi__australia'}>Australii</li>
</ul>
</div>
</Grid.Column>
<Grid.Column width={8} verticalAlign={'middle'} style={{height: '100%'}}>
<h3>Podróż na każdą kieszeń, zawsze.</h3>
<div>
<ul style={{listStyle: 'none'}}>
<li>Wyjdź z domu i poczuj się turystą we własnym mieście</li>
<li>Skorzystaj z formularza i dodaj swoją wycieczkę</li>
<li>Wracaj do swoich najlepszych lokalizacji z pomocą ulubionych</li>
return (
<div className="Dashboard">
<Grid padded={true}>
<Grid.Row>
<Grid.Column>
<h2>Planowanie podróży nigdy nie było tak proste i przyjemne</h2>
</Grid.Column>
</Grid.Row>
<Grid.Row>
<Grid.Column widescreen={8} largeScreen={8} mobile={16}>
<PieChartComponent />
</Grid.Column>
<Grid.Column widescreen={8} largeScreen={8} mobile={16} verticalAlign={'middle'}>
<DataBarChart />
</Grid.Column>
</Grid.Row>
<Grid.Row centered={true}>
<Grid.Column width={8} verticalAlign={'middle'}>
<h3>Z WAY.TO pojedziesz do:</h3>
<div style={{ display: 'flex', justifyContent: 'center' }}>
<ul className={'pieUl'}>
<li className={'pieLi pieLi__asia'}>Azji</li>
<li className={'pieLi pieLi__europe'}>Europy</li>
<li className={'pieLi pieLi__northamerica'}>Północnej Ameryki</li>
<li className={'pieLi pieLi__africa'}>Afryki</li>
</ul>
<ul className={'pieUl'}>
<li className={'pieLi pieLi__southamerica'}>Ameryki Południowej</li>
<li className={'pieLi pieLi__antarctica'}>Antarktydy</li>
<li className={'pieLi pieLi__australia'}>Australii</li>
</ul>
</div>
</Grid.Column>
<Grid.Column width={8} verticalAlign={'middle'} style={{ height: '100%' }}>
<h3>Podróż na każdą kieszeń, zawsze.</h3>
<div>
<ul style={{ listStyle: 'none' }}>
<li>Wyjdź z domu i poczuj się turystą we własnym mieście</li>
<li>Skorzystaj z formularza i dodaj swoją wycieczkę</li>
<li>Wracaj do swoich najlepszych lokalizacji z pomocą ulubionych</li>

</ul>
</div>
</Grid.Column>
</Grid.Row>
</Grid>
</div>
)
</ul>
</div>
</Grid.Column>
</Grid.Row>
</Grid>
</div>
)
}


Expand Down
Loading