Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1721dac
feat: type of ticket on payments
May 29, 2022
2acbd65
feat: submitButton creation
rafaeelnunesf May 30, 2022
20b8cb9
docs: removing --openssl-legacy-provider option from script
rafaeelnunesf May 30, 2022
b2ff84c
feat: refactoring the ticket choice and adding the accommodation choice
rafaeelnunesf May 30, 2022
03265e9
feat: missing enrollment message added
FelipeCRAguiar Jun 1, 2022
9734a4f
refactor: show right messages when buttons are selected
FelipeCRAguiar Jun 1, 2022
fe9d27e
Merge pull request #1 from rafaeelnunesf/messages
rafaeelnunesf Jun 2, 2022
fd3adda
fix: fonts
Jun 2, 2022
d752a68
refactor: creating components for selecting and confirming payment
FelipeCRAguiar Jun 2, 2022
4363973
Merge pull request #2 from rafaeelnunesf/componentization
mdeosjr Jun 6, 2022
6c149de
feat: card screen
diego-carneiro Jun 6, 2022
53edc34
feat: sprint 1 last cards
diego-carneiro Jun 9, 2022
0715825
Merge pull request #3 from rafaeelnunesf/sprint_1_last_cards
FelipeCRAguiar Jun 9, 2022
01bc035
feat: error messages for hotel page
FelipeCRAguiar Jun 9, 2022
5237c7e
refactor: changing logs
FelipeCRAguiar Jun 9, 2022
f79ef43
Update Confirmation.js
FelipeCRAguiar Jun 9, 2022
b36d810
feat: hotel info with vacancies
Jun 10, 2022
7cb3e62
Merge pull request #4 from rafaeelnunesf/error_message_hotel
mdeosjr Jun 10, 2022
efdd930
chore: merge with hotels
Jun 10, 2022
b82256c
feat: github oauth login
Jun 12, 2022
5676214
Update index.js
FelipeCRAguiar Jun 12, 2022
e8dc538
Merge pull request #6 from rafaeelnunesf/feat/OAuth
FelipeCRAguiar Jun 12, 2022
d87b61e
feat: button_structure
diego-carneiro Jun 13, 2022
175594f
Merge pull request #7 from rafaeelnunesf/sprint_1_last_cards
FelipeCRAguiar Jun 13, 2022
a441a13
feat: bedroom button added
FelipeCRAguiar Jun 13, 2022
972627d
Merge pull request #8 from rafaeelnunesf/bedroom_buttons
mdeosjr Jun 14, 2022
144b359
feat: 13/06 progress
diego-carneiro Jun 14, 2022
3b6cb7c
Merge branch 'main' of github.com:rafaeelnunesf/drivent into main
diego-carneiro Jun 14, 2022
ec4ab39
feat: card CSS done
diego-carneiro Jun 19, 2022
3af782f
feat: button_icon_fixed
diego-carneiro Jun 20, 2022
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
1 change: 0 additions & 1 deletion .env.example

This file was deleted.

43,550 changes: 8,751 additions & 34,799 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,21 @@
"html2canvas": "^1.3.2",
"qs": "^6.10.1",
"react": "^17.0.2",
"react-credit-cards": "^0.8.3",
"react-dom": "^17.0.2",
"react-icons": "^4.2.0",
"react-icons": "^4.4.0",
"react-input-mask": "^2.0.4",
"react-loader-spinner": "^4.0.0",
"react-router-dom": "^6.3.0",
"react-scripts": "4.0.3",
"react-scripts": "^5.0.1",
"react-shimmer-effect": "^1.0.9",
"react-toastify": "^7.0.4",
"react-useinterval": "^1.0.2",
"styled-components": "^5.3.0",
"web-vitals": "^1.1.2"
},
"scripts": {
"ssl-start": "react-scripts --openssl-legacy-provider start",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
Expand Down
14 changes: 4 additions & 10 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import {
BrowserRouter as Router,
Routes,
Route,
Navigate
} from 'react-router-dom';
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
import { ToastContainer } from 'react-toastify';

import Countdown from './pages/Countdown';
Expand All @@ -15,6 +10,7 @@ import Payment from './pages/Dashboard/Payment';
import Hotel from './pages/Dashboard/Hotel';
import Activities from './pages/Dashboard/Activities';
import Certificate from './pages/Dashboard/Certificate';
import Callback from './pages/Callback';

import { EventInfoProvider } from './contexts/EventInfoContext';
import { UserProvider } from './contexts/UserContext';
Expand All @@ -32,7 +28,7 @@ export default function App() {
<Route path="/" element={<Countdown />} />
<Route path="/enroll" element={<Enroll />} />
<Route path="/sign-in" element={<SignIn />} />

<Route path="/callback" element={<Callback />} />
<Route
path="/dashboard"
element={
Expand Down Expand Up @@ -63,7 +59,5 @@ function ProtectedRouteGuard({ children }) {
return <Navigate to="/sign-in" />;
}

return <>
{children}
</>;
return <>{children}</>;
}
119 changes: 119 additions & 0 deletions src/components/Card.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
import React from 'react';
import Cards from 'react-credit-cards';
import 'react-credit-cards/es/styles-compiled.css';
import styled from 'styled-components';
export default class PaymentForm extends React.Component {
state = {
cvc: '',
expiry: '',
focus: '',
name: '',
number: '',
};

handleInputFocus = (e) => {
this.setState({ focus: e.target.name });
};

handleInputChange = (e) => {
const { name, value } = e.target;

this.setState({ [name]: value });
};

render() {
return (
<div id="PaymentForm">
{' '}
<CardContainer>
<Cards
cvc={this.state.cvc}
expiry={this.state.expiry}
focused={this.state.focus}
name={this.state.name}
number={this.state.number}
/>
<InputContainer>
<form>
<Input
type="tel"
name="number"
placeholder="Card Number"
onChange={this.handleInputChange}
onFocus={this.handleInputFocus}
/>
<Input
type="text"
name="name"
placeholder="Name"
onChange={this.handleInputChange}
onFocus={this.handleInputFocus}
/>
<Input
type="tel"
name="expiry"
placeholder="Valid Thru"
onChange={this.handleInputChange}
onFocus={this.handleInputFocus}
/>
<Input
type="tel"
name="cvc"
placeholder="CVC"
onChange={this.handleInputChange}
onFocus={this.handleInputFocus}
/>
</form>
</InputContainer>{' '}
</CardContainer>
</div>
);
}
}

//********** Styled Components
const CardContainer = styled.div`
width: 100%;
box-sizing: border-box;
margin-bottom: 52px;

display: flex;
flex-wrap: wrap;
`;
const InputContainer = styled.div`
width: 400px;
height: 200px;

display: flex;
flex-direction: column;
`;

const Input = styled.input`
width: 300px;
height: 42px;
border-radius: 6px;

&:first-child {
padding: 5px;
margin-bottom: 32px;
}

&:nth-child(2) {
padding: 5px;
margin-bottom: 20px;
}


&:nth-child(3) {
width: 180px;
padding: 5px;
margin-bottom: 14px;
margin-right: 20px;
}

&:nth-child(4) {
width: 100px;
padding: 5px;
margin-bottom: 14px;
}
`;
9 changes: 9 additions & 0 deletions src/components/Dashboard/Activities/ActivityContainer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import styled from 'styled-components';

const ActivityContainer = styled.div`
margin-top: 27px;
display: flex;
gap: 17px;
`;

export default ActivityContainer;
19 changes: 19 additions & 0 deletions src/components/Dashboard/Activities/DateButton.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import styled from 'styled-components';

const DateButton = styled.button`
width: 131px;
height: 37px;
left: 489px;
top: 274px;
background-color: ${(props) => (props.selected === false ? '#E0E0E0' : '#FFEED2')};
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.25);
border-radius: 4px;
font-family: 'Roboto';
font-weight: 400;
font-size: 14px;
line-height: 16px;
text-align: center;
color: #000000;
`;

export default DateButton;
20 changes: 20 additions & 0 deletions src/components/Dashboard/Button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import styled from 'styled-components';

const Button = styled.button`
width: 145px;
height: 145px;
margin-right: 24px;
border: ${(props) => (props.selected === false ? '1px solid #cecece' : 'none')};
border-radius: 20px;
background-color: ${(props) => (props.selected === false ? 'white' : '#FFEED2')};
cursor: pointer;

font-family: 'Arial';
font-weight: 400;
font-size: 14px;
line-height: 16px;
text-align: center;
color: #000000;
`;

export default Button;
54 changes: 54 additions & 0 deletions src/components/Dashboard/HotelsButton.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import styled from 'styled-components';

const HotelButton = styled.button`
all: unset;
width: 180px;
height: 220px;
background: #f1f1f1;
border-radius: 10px;
border: ${(props) => (props.selected === false ? '1px solid #cecece' : 'none')};
background-color: ${(props) => (props.selected === false ? 'white' : '#FFEED2')};
cursor: pointer;
display: flex;
flex-direction: column;
gap: 10px;
padding: 14px;

img {
width: 178px;
height: 109px;
border-radius: 5px;
}
`;

const HotelName = styled.p`
font-family: 'Arial';
font-style: normal;
font-weight: 400;
font-size: 20px;
line-height: 23px;

color: #343434;
`;

const InfoType = styled.p`
font-family: 'Arial';
font-style: normal;
font-weight: 700;
font-size: 12px;
line-height: 14px;

color: #3c3c3c;
`;

const Info = styled.p`
font-family: 'Arial';
font-style: normal;
font-weight: 400;
font-size: 12px;
line-height: 14px;

color: #3c3c3c;
`;

export { HotelButton, HotelName, Info, InfoType };
8 changes: 4 additions & 4 deletions src/components/Dashboard/NavigationBar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,28 @@ export default function NavigationBar() {
</Link>

<Link to="/dashboard/payment">
<NavigationButton active={isActive('/dashboard/paymen')}>
<NavigationButton active={isActive('/dashboard/payment')}>
<FaMoneyBill />
<span>Pagamento</span>
</NavigationButton>
</Link>

<Link to="/dashboard/hotel">
<NavigationButton active={isActive('/dashboard/hote')}>
<NavigationButton active={isActive('/dashboard/hotel')}>
<FaBed />
<span>Hotel</span>
</NavigationButton>
</Link>

<Link to="/dashboard/activities">
<NavigationButton active={isActive('/dashboard/activitie')}>
<NavigationButton active={isActive('/dashboard/activities')}>
<FaCalendarWeek />
<span>Atividades</span>
</NavigationButton>
</Link>

<Link to="/dashboard/certificate">
<NavigationButton active={isActive('/dashboard/certificat')}>
<NavigationButton active={isActive('/dashboard/certificate')}>
<FaCertificate />
<span>Certificado</span>
</NavigationButton>
Expand Down
12 changes: 12 additions & 0 deletions src/components/Dashboard/PageTitle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import styled from 'styled-components';

const PageTitle = styled.h1`
font-family: 'Arial';
font-style: normal;
font-weight: 400;
font-size: 34px;
line-height: 40px;
color: #000000;
`;

export default PageTitle;
Loading