Skip to content

Final#48

Open
johnsonfash wants to merge 1 commit into
developfrom
final
Open

Final#48
johnsonfash wants to merge 1 commit into
developfrom
final

Conversation

@johnsonfash

Copy link
Copy Markdown

Description

Please include a summary of the change and relevant motivation and context.
List any dependencies that are required for this change.

All pull requests should be related to open issues. Indicate the issue(s) bellow and remove this line:
Fixes #(issue number 1) #(issue number 2 if applicable)

How Has This Been Tested?

Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code etc.

Screenshots (if applicable, else remove this line / section)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added necessary inline code documentation
  • I have added tests that prove my fix is effective and that this feature works
  • New and existing unit tests pass locally with my changes

Copy link
Copy Markdown
Collaborator

Codacy Here is an overview of what got changed by this pull request:

Issues
======
+ Solved 1
- Added 478
           

Complexity increasing per file
==============================
- src/views/Order/Summary.js  1
- src/views/Pages/Login/Login.js  6
- src/views/Order/Address.js  1
- src/views/Map/CustomerMap.js  4
- src/components/Screens/Orders/index.js  1
- src/containers/DefaultLayout/DefaultHeader.js  1
- src/containers/DefaultLayout/__tests__/DefaultLayout.test.js  1
- src/store/actions/community.js  1
- src/views/Order/index.js  1
- src/store/reducers/community.js  4
- src/views/Pages/Register/Register.js  7
- src/views/Community/View.js  9
- src/views/Pages/Accout/index.js  1
- src/views/Pages/Message/RegMessage.js  3
- src/routes.js  1
- src/views/Community/Editor.js  12
- src/containers/DefaultLayout/DefaultLayout.js  4
- src/views/Community/index.js  7
- src/views/History/index.js  1
- src/containers/DefaultLayout/__tests__/DefaultHeader.test.js  1
- src/components/Payment/index.js  4
- src/store/reducers/user.js  2
- src/containers/DefaultLayout/DefaultFooter.js  1
- src/views/Pages/Register/Register.test.js  1
- src/views/Map/AgentMAp.js  3
         

See the complete overview on Codacy

Comment thread src/views/Map/AgentMAp.js Outdated
let google = window.google;
let addRoute = this.addRoute;
const handleLocationError = this.handleLocationError;
let processSVData = this.processSVData;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread src/views/Pages/Login/Login.js Outdated
let { loading, error, errorMessage, userData } = this.props.userData;
error === 'true' && errorMessage !== '' ? (f = errorMessage) :
(userData.errorcount !== '0' ? (f = userData.error) : (f = ''));
loading === 'done' ? (u = 'Login') :

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread src/components/Payment/index.js Outdated
let val = e.target.value.replace(/\D/g, '');
switch (e.target.id) {
case 'cardNumber':
let addSpace = val.replace(/(.{4})/g, '$1 ').trim();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread src/views/Map/AgentMAp.js Outdated
panorama.setVisible(true);

marker.addListener('click', () => {
let markerPanoID = data.location.pano;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread src/views/Community/Editor.js Outdated
const mapStateToProps = (state) => {
return {
communityData: state.communityData
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Codacy Issue found: Missing semicolon.

Comment thread src/views/Community/View.js Outdated
const mapStateToProps = (state) => {
return {
communityData: state.communityData
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Codacy Issue found: Missing semicolon.

Comment thread src/views/Pages/Register/Register.js Outdated
import React, { Component } from 'react';
import {
Button, Card, CardBody, Col, Container, Form, Input, InputGroup
, InputGroupAddon, InputGroupText, Row, Nav, NavItem, NavLink, TabContent, TabPane

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread src/views/Community/index.js Outdated
}
}


Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread src/views/Order/Summary.js Outdated
});
}

render() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread src/views/Order/Address.js Outdated
@@ -0,0 +1,123 @@
import React, { Component } from 'react'
import {
Button,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread src/store/actions/community.js Outdated
dispatch(fetchCommunityDataFailure(errorMessage))
})

} catch (error) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread src/views/Map/CustomerMap.js Outdated
let bounds = new google.maps.LatLngBounds();
places.forEach((place) => {
if (!place.geometry) {
console.log("Returned place contains no geometry");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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


render() {
const mystyle = {
backgroundColor: "white",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread src/views/Pages/Message/RegMessage.js Outdated
import { Col, Container, Row } from 'reactstrap';
import { withRouter } from 'react-router-dom';


Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread src/views/Community/View.js Outdated
import { sendCommunityData } from '../../store/actions/community';
import Payment from '../../components/Payment';
import { isAuthUserType } from '../../services/Auth';
import { Link } from 'react-router-dom';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread src/views/Pages/Login/Login.js Outdated
}

componentDidUpdate(prevProps) {
let { userData } = this.props.userData;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread src/views/Map/AgentMAp.js Outdated
infoWindow.open(map);
}

render() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread src/views/Map/CustomerMap.js Outdated

render() {
let { searchBox, addressBox } = this.state
console.log(addressBox)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@@ -0,0 +1,26 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread src/views/Map/CustomerMap.js Outdated
markers = [];

// For each place, get the icon, name and location.
let bounds = new google.maps.LatLngBounds();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread src/views/Map/AgentMAp.js Outdated

handleLocationError(browserHasGeolocation, infoWindow, pos) {
infoWindow.setPosition(pos);
infoWindow.setContent(browserHasGeolocation ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread src/views/Community/Editor.js Outdated
if ((data.file_name === imagePreviewUrl) && (data.location === location) && (data.amount === amount) && (data.details === details)) {
this.clsBtn.current.style.display = "block";
return null
} else {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread src/views/Pages/Login/Login.js Outdated
if (userData.status === 'successful' && userData.errorcount === '0') {
authenticateUser(userData.email, 'customer')
this.props.history.push('/order')
};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Codacy Issue found: Unnecessary semicolon.

return (
<div className="app">
<AppHeader fixed>
<DefaultHeader onLogout={e => this.signOut(e)} />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread src/routeList.js Outdated
{ path: '/order', exact: true, name: 'Order', component: Order },
{ path: '/account', exact: true, name: 'Account', component: Account },
{ path: '/community', exact: true, name: 'Community', component: Community },
{ path: '/history', exact: true, name: 'History', component: History },

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants