Compare commits

..

4 Commits

Author SHA1 Message Date
GotPPay
d2b12e11ee add missing date variable 2018-05-17 19:06:01 +02:00
GotPPay
d6847aae33 set pickup address id to valid uuid 2018-05-17 19:06:01 +02:00
Senad Uka
adf2ba8232 Upstream sync 2018-05-17 19:02:54 +02:00
Senad Uka
c993a194a6 upstream sync 2018-05-16 18:41:24 +02:00
2 changed files with 27 additions and 21 deletions

View File

@@ -2340,19 +2340,19 @@ html.static.boxed {
@font-face {
font-family: 'Lato';
src: url(/assets/./fonts/646474e48f4c1ea783f43ac5e41fd111.woff2) format("woff2"), url(/assets/./fonts/374df2a818582454b6e6832804e52f86.woff) format("woff");
src: url(/fonts/lato/lato-regular-webfont.woff2) format("woff2"), url(/fonts/lato/lato-regular-webfont.woff) format("woff");
font-weight: bold;
font-style: normal; }
@font-face {
font-family: 'Lato';
src: url(/assets/./fonts/5fa6d7ddc0a0d53311752343d7176d70.woff2) format("woff2"), url(/assets/./fonts/c53136193516ed2d4fac337d1dc6965a.woff) format("woff");
src: url(/assets/./fonts/lato/lato-bolditalic-webfont.woff2) format("woff2"), url(/assets/./fonts/lato/lato-bolditalic-webfont.woff) format("woff");
font-weight: bold;
font-style: italic; }
@font-face {
font-family: 'Lato';
src: url(/assets/./fonts/9bcf055a732c0b22d2279ba79e20c577.woff2) format("woff2"), url(/assets/./fonts/c8eef482ac448a91ecca9d008634c044.woff) format("woff");
src: url(/assets/./fonts/lato/lato-italic-webfont.woff2) format("woff2"), url(/assets/./fonts/lato/lato-italic-webfont.woff) format("woff");
font-weight: normal;
font-style: italic; }

View File

@@ -36,6 +36,7 @@ import Popover from 'material-ui/Popover';
const ADDRESS_TYPE_HOME = "home";
let DateTimeFormat;
const roundingTime = 1000 * 60 * 5; //5 minutes
DateTimeFormat = global.Intl.DateTimeFormat;
@@ -418,16 +419,18 @@ class VerticalNonLinear extends React.Component {
constructor(props) {
super(props);
let dateNow = new Date();
this.state = {
stepIndex: 0,
rideTypeValue: 0,
providerID: 0,
providerName: '',
visitDate: new Date(),
visitTime: new Date(),
visitTime: new Date(Math.round(dateNow.getTime() / roundingTime) * roundingTime),
pickupLocation: null,
pickupTime: new Date(),
pickupTimeReturn: new Date(),
pickupTime: new Date(Math.round(dateNow.getTime() / roundingTime) * roundingTime),
pickupTimeReturn: new Date(Math.round(dateNow.getTime() / roundingTime) * roundingTime),
pickupTimeReturnDisplayMode: 'none',
open: false,
message: 'Booking Ride',
@@ -501,17 +504,19 @@ class VerticalNonLinear extends React.Component {
}
});
let visitTime = new Date(new Date().getTime() + (1 * 60 * 60 * 1000));
let visitDate = visitTime;
let pickupTime = new Date(visitTime.getTime() - (0.5 * 60 * 60 * 1000));
let pickupTimeReturn = new Date(visitTime.getTime() - (0.5 * 60 * 60 * 1000));
let date = new Date();
this.setState(Object.assign(this.state, {
visitDate: visitDate,
visitTime: visitTime,
pickupTime: pickupTime,
pickupTimeReturn: pickupTimeReturn,
}));
let visitTime = new Date(Math.round((date.getTime() + (1 * 60 * 60 * 1000)) / roundingTime) * roundingTime);
let visitDate = date;
let pickupTime = new Date(Math.round((visitTime.getTime() - (0.5 * 60 * 60 * 1000)) / roundingTime) * roundingTime);
let pickupTimeReturn = new Date(Math.round((visitTime.getTime() - (0.5 * 60 * 60 * 1000)) / roundingTime) * roundingTime);
this.setState(Object.assign(this.state, {
visitDate: visitDate,
visitTime: visitTime,
pickupTime: pickupTime,
pickupTimeReturn: pickupTimeReturn,
}));
}
//for snackbar
handleTouchTap() {
@@ -535,7 +540,8 @@ class VerticalNonLinear extends React.Component {
if (stepIndex === 3) {
self.handleTouchTap();
var requestRide = {
user_uuid: state.state.user.useruuid,
user_uuid: state.state.user ? state.state.user.useruuid : '',
user_consent: state.state.checked,
ride_type: "lyft",
origin: state.state.origin,
destination: state.state.destination,
@@ -612,10 +618,10 @@ class VerticalNonLinear extends React.Component {
handleDate(event, date, state) {
let self = state
let visitTime = new Date(date.getTime() + (1 * 60 * 60 * 1000));
let visitTime = new Date(Math.round((date.getTime() + (1 * 60 * 60 * 1000)) / roundingTime) * roundingTime);
let visitDate = date;
let pickupTime = new Date(visitTime.getTime() - (0.5 * 60 * 60 * 1000));
let pickupTimeReturn = new Date(visitTime.getTime() - (0.5 * 60 * 60 * 1000));
let pickupTime = new Date(Math.round((visitTime.getTime() - (0.5 * 60 * 60 * 1000)) / roundingTime) * roundingTime);
let pickupTimeReturn = new Date(Math.round((visitTime.getTime() - (0.5 * 60 * 60 * 1000)) / roundingTime) * roundingTime);
self.setState(Object.assign(self.state, {
visitDate: visitDate,
@@ -816,7 +822,7 @@ class VerticalNonLinear extends React.Component {
handlePickupChanged = (res, state) => {
let origin = {
id: res.id,
id: res.address_uuid ? res.address_uuid : res.id,
name: res.name,
lat: res.lat,
lng: res.lng,