Compare commits
4 Commits
password-v
...
ride-valid
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2b12e11ee | ||
|
|
d6847aae33 | ||
|
|
adf2ba8232 | ||
|
|
c993a194a6 |
@@ -2340,19 +2340,19 @@ html.static.boxed {
|
|||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Lato';
|
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-weight: bold;
|
||||||
font-style: normal; }
|
font-style: normal; }
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Lato';
|
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-weight: bold;
|
||||||
font-style: italic; }
|
font-style: italic; }
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Lato';
|
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-weight: normal;
|
||||||
font-style: italic; }
|
font-style: italic; }
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import Popover from 'material-ui/Popover';
|
|||||||
const ADDRESS_TYPE_HOME = "home";
|
const ADDRESS_TYPE_HOME = "home";
|
||||||
|
|
||||||
let DateTimeFormat;
|
let DateTimeFormat;
|
||||||
|
const roundingTime = 1000 * 60 * 5; //5 minutes
|
||||||
|
|
||||||
|
|
||||||
DateTimeFormat = global.Intl.DateTimeFormat;
|
DateTimeFormat = global.Intl.DateTimeFormat;
|
||||||
@@ -418,16 +419,18 @@ class VerticalNonLinear extends React.Component {
|
|||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
|
let dateNow = new Date();
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
stepIndex: 0,
|
stepIndex: 0,
|
||||||
rideTypeValue: 0,
|
rideTypeValue: 0,
|
||||||
providerID: 0,
|
providerID: 0,
|
||||||
providerName: '',
|
providerName: '',
|
||||||
visitDate: new Date(),
|
visitDate: new Date(),
|
||||||
visitTime: new Date(),
|
visitTime: new Date(Math.round(dateNow.getTime() / roundingTime) * roundingTime),
|
||||||
pickupLocation: null,
|
pickupLocation: null,
|
||||||
pickupTime: new Date(),
|
pickupTime: new Date(Math.round(dateNow.getTime() / roundingTime) * roundingTime),
|
||||||
pickupTimeReturn: new Date(),
|
pickupTimeReturn: new Date(Math.round(dateNow.getTime() / roundingTime) * roundingTime),
|
||||||
pickupTimeReturnDisplayMode: 'none',
|
pickupTimeReturnDisplayMode: 'none',
|
||||||
open: false,
|
open: false,
|
||||||
message: 'Booking Ride',
|
message: 'Booking Ride',
|
||||||
@@ -501,17 +504,19 @@ class VerticalNonLinear extends React.Component {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let visitTime = new Date(new Date().getTime() + (1 * 60 * 60 * 1000));
|
let date = new Date();
|
||||||
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));
|
|
||||||
|
|
||||||
this.setState(Object.assign(this.state, {
|
let visitTime = new Date(Math.round((date.getTime() + (1 * 60 * 60 * 1000)) / roundingTime) * roundingTime);
|
||||||
visitDate: visitDate,
|
let visitDate = date;
|
||||||
visitTime: visitTime,
|
let pickupTime = new Date(Math.round((visitTime.getTime() - (0.5 * 60 * 60 * 1000)) / roundingTime) * roundingTime);
|
||||||
pickupTime: pickupTime,
|
let pickupTimeReturn = new Date(Math.round((visitTime.getTime() - (0.5 * 60 * 60 * 1000)) / roundingTime) * roundingTime);
|
||||||
pickupTimeReturn: pickupTimeReturn,
|
|
||||||
}));
|
this.setState(Object.assign(this.state, {
|
||||||
|
visitDate: visitDate,
|
||||||
|
visitTime: visitTime,
|
||||||
|
pickupTime: pickupTime,
|
||||||
|
pickupTimeReturn: pickupTimeReturn,
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
//for snackbar
|
//for snackbar
|
||||||
handleTouchTap() {
|
handleTouchTap() {
|
||||||
@@ -535,7 +540,8 @@ class VerticalNonLinear extends React.Component {
|
|||||||
if (stepIndex === 3) {
|
if (stepIndex === 3) {
|
||||||
self.handleTouchTap();
|
self.handleTouchTap();
|
||||||
var requestRide = {
|
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",
|
ride_type: "lyft",
|
||||||
origin: state.state.origin,
|
origin: state.state.origin,
|
||||||
destination: state.state.destination,
|
destination: state.state.destination,
|
||||||
@@ -612,10 +618,10 @@ class VerticalNonLinear extends React.Component {
|
|||||||
|
|
||||||
handleDate(event, date, state) {
|
handleDate(event, date, state) {
|
||||||
let self = 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 visitDate = date;
|
||||||
let pickupTime = 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(visitTime.getTime() - (0.5 * 60 * 60 * 1000));
|
let pickupTimeReturn = new Date(Math.round((visitTime.getTime() - (0.5 * 60 * 60 * 1000)) / roundingTime) * roundingTime);
|
||||||
|
|
||||||
self.setState(Object.assign(self.state, {
|
self.setState(Object.assign(self.state, {
|
||||||
visitDate: visitDate,
|
visitDate: visitDate,
|
||||||
@@ -816,7 +822,7 @@ class VerticalNonLinear extends React.Component {
|
|||||||
|
|
||||||
handlePickupChanged = (res, state) => {
|
handlePickupChanged = (res, state) => {
|
||||||
let origin = {
|
let origin = {
|
||||||
id: res.id,
|
id: res.address_uuid ? res.address_uuid : res.id,
|
||||||
name: res.name,
|
name: res.name,
|
||||||
lat: res.lat,
|
lat: res.lat,
|
||||||
lng: res.lng,
|
lng: res.lng,
|
||||||
|
|||||||
Reference in New Issue
Block a user