Skip to content

173169085-oneway-trip :create oneway trip #12

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

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

brianineza01
Copy link
Collaborator

@brianineza01 brianineza01 commented Jun 11, 2020

Description

This PR adds create oneWay trip functionality from the UI to the codebase

Type of change

Please select the relevant option

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Others (cosmetics, styling, improvements)
  • This change requires a documentation update

How Has This Been Tested?

  • Unit
  • Integration
  • End-to-end
  • No testing required

How to test?

  • Clone the branch locally
  • Run npm start
  • Go to your browser and go to localhost:8080/home NB: log in if you haven't done it yet
  • click create trip button
  • Insert required information then you will see a toast telling you that the trip was successfully created or if there was an error

Screnshoot?

1
3

STORY ID

[Finishes #173169085]

@brianineza01 brianineza01 added the WIP Work In Progress label Jun 11, 2020
@brianineza01 brianineza01 force-pushed the ft-create-oneway-trip-173169085 branch 3 times, most recently from 703202a to 17eef63 Compare June 18, 2020 20:16
getAllTrips: () => dispatch(getTrips())
});

export default connect(mapStateToProps, mapDispatchToProps)(LatestTrips);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace mapStateToProps,·mapDispatchToProps with ⏎··mapStateToProps,⏎··mapDispatchToProps⏎ prettier/prettier

@brianineza01 brianineza01 force-pushed the ft-create-oneway-trip-173169085 branch 2 times, most recently from 556b640 to c05b7de Compare June 21, 2020 23:17
createOneWayTripAction: form => dispatch(createOneWayTrip(form))
});

export default connect(mapStateToProps, mapDispatchToProps)(OneWayTripForm);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace mapStateToProps,·mapDispatchToProps with ⏎··mapStateToProps,⏎··mapDispatchToProps⏎ prettier/prettier

@brianineza01 brianineza01 force-pushed the ft-create-oneway-trip-173169085 branch 5 times, most recently from 2a46f68 to 37fdb88 Compare June 22, 2020 07:30
@brianineza01 brianineza01 added PEER REVIEW Ready For Peer Review and removed WIP Work In Progress labels Jun 22, 2020
@brianineza01 brianineza01 force-pushed the ft-create-oneway-trip-173169085 branch from 37fdb88 to 9f192c5 Compare June 22, 2020 08:16
@brianineza01 brianineza01 force-pushed the ft-create-oneway-trip-173169085 branch from 9f192c5 to fb8ac3e Compare June 22, 2020 08:27
@brianineza01 brianineza01 force-pushed the ft-create-oneway-trip-173169085 branch 2 times, most recently from 5687f9f to 59ca596 Compare June 22, 2020 12:41
Irutingabo
Irutingabo previously approved these changes Jun 22, 2020
this.state = initialState;
}

componentDidUpdate(prevProps) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing JSDoc comment require-jsdoc

departureDate: today
};

/**
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing JSDoc @returns for function valid-jsdoc

color: $trip-status-text-color;
display: block;
font-family: $font-family;
font-style: normal;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered color, display, font-family, font-size, font-style, font-weight, line-height, margin-top

.trip-status {
background-color: $block-background-color;
border-radius: 20px;
box-shadow: 0px 10px 15px $block-box-shadow-color;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0px should be written without units as 0

@brianineza01 brianineza01 force-pushed the ft-create-oneway-trip-173169085 branch from 865d273 to 983a92a Compare June 29, 2020 06:57
import "./Sidebar.scss";

const Sidebar = ({ onChange, selectedItem }) => {
const onItemClicked = item => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected block statement surrounding arrow body; move the returned value immediately after the => arrow-body-style

import { string, bool } from "prop-types";
import "./Sidebar.scss";

function SidebarItem(props) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing JSDoc comment require-jsdoc

import React from "react";
import "./Content.scss";

function ContentComponent() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing JSDoc comment require-jsdoc

import Content from "./Content/Content.jsx";
import "./Dashboard.scss";

const Dashboard = () => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected block statement surrounding arrow body; move the returned value immediately after the => arrow-body-style

}

&:hover {
background-color: #687cd7;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color literals like #687cd7 should only be used in variable declarations; they should be referred to via variable everywhere else.

}
}

.toggle-menu-button {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule set contains (14/10) properties

font-weight: 900;
font-size: 16px;
line-height: 19px;
color: #ffffff;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color literals like #ffffff should only be used in variable declarations; they should be referred to via variable everywhere else.


&__menu-item-title,
.expanded-menu {
margin-left: 24px;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered color, font-size, font-style, font-weight, line-height, margin-left

height: 45px;
color: #fff;
margin-top: auto;
padding: 15px 0 0 22px;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shorthands of length 4 are not allowed. Value was 15px 0 0 22px

border-top: 1px solid #ffffff47;
font-size: 14px;
height: 45px;
color: #fff;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color literals like #fff should only be used in variable declarations; they should be referred to via variable everywhere else.

@brianineza01 brianineza01 force-pushed the ft-create-oneway-trip-173169085 branch from 983a92a to d70c3fd Compare June 29, 2020 15:37
* for LatestTrips component
*/
export class LatestTrips extends Component {
constructor(props) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing JSDoc comment require-jsdoc


import "./LatestTrips.scss";

/**
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing JSDoc @returns for function valid-jsdoc
Missing JSDoc for parameter 'newTrips' valid-jsdoc
Missing JSDoc for parameter 'pageNumber' valid-jsdoc

height: unset;
margin-left: 5px;
padding-top: 15px;
&__title {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule declaration should be preceded by an empty line

}

&__date {
color: rgba(0, 1, 0, 0.5);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color literals like rgba(0, 1, 0, 0.5) should only be used in variable declarations; they should be referred to via variable everywhere else.

margin-left: 20px;

&__title {
color: rgba(0, 1, 0, 0.8);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color literals like rgba(0, 1, 0, 0.8) should only be used in variable declarations; they should be referred to via variable everywhere else.


.Place-container {
background: #f7f7f7;
display: flex;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered background, border-radius, box-sizing, display, height, margin, padding, position, width

$font-family: "Roboto", sans-serif;

.Place-container {
background: #f7f7f7;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color literals like #f7f7f7 should only be used in variable declarations; they should be referred to via variable everywhere else.

@@ -0,0 +1,47 @@
$font-family: "Roboto", sans-serif;

.Place-container {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Selector Place-container should be written in lowercase with hyphens

.place-badge {
margin-bottom: 5px;
width: 120px;
&--oval {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule declaration should be preceded by an empty line

.place-badge {
margin-right: 2px;
width: 120px;
&--oval {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule declaration should be preceded by an empty line

- Create the popup modal for inserting data
- create the action creators for trip and Places
- Link the created elements with their corresponding Components
- test all functionality

[Finishes #173169085]
@brianineza01 brianineza01 force-pushed the ft-create-oneway-trip-173169085 branch from d70c3fd to bde535e Compare June 29, 2020 16:00
margin-right: 12px;
}
}
@media (max-width: 480px) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@media declaration should be preceded by an empty line

margin-left: 12px;
margin-right: 12px;
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@media declaration should be followed by an empty line

}
.icon-styles {
margin-left: 12px;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule declaration should be followed by an empty line

}
.title {
margin-left: 36px;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule declaration should be followed by an empty line

@media (max-width: 768px) {
.name {
display: "none";
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule declaration should be followed by an empty line

}

.separator {
border-left: "1px solid #DFE0EB";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color #DFE0EB should be written as #dfe0eb

line-height: 21px;
text-align: right;

color: rgba(0, 0, 0, 0.5);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color literals like rgba(0, 0, 0, 0.5) should only be used in variable declarations; they should be referred to via variable everywhere else.

}

.name {
font-family: Roboto;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered color, font-family, font-size, font-style, font-weight, line-height, text-align

border-radius: 50px;
margin-left: 14px;
margin-right: 14px;
border: "1px solid #DFE0EB";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color #DFE0EB should be written as #dfe0eb

}

.avatar {
height: 35px;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered border, border-radius, height, margin-left, margin-right, width

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PEER REVIEW Ready For Peer Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants