Compare commits
1 Commits
font-loadi
...
show-error
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
768afa475b |
@@ -2340,19 +2340,19 @@ html.static.boxed {
|
|||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Lato';
|
font-family: 'Lato';
|
||||||
src: url(/fonts/lato/lato-regular-webfont.woff2) format("woff2"), url(/fonts/lato/lato-regular-webfont.woff) format("woff");
|
src: url(/assets/./fonts/646474e48f4c1ea783f43ac5e41fd111.woff2) format("woff2"), url(/assets/./fonts/374df2a818582454b6e6832804e52f86.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/lato/lato-bolditalic-webfont.woff2) format("woff2"), url(/assets/./fonts/lato/lato-bolditalic-webfont.woff) format("woff");
|
src: url(/assets/./fonts/5fa6d7ddc0a0d53311752343d7176d70.woff2) format("woff2"), url(/assets/./fonts/c53136193516ed2d4fac337d1dc6965a.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/lato/lato-italic-webfont.woff2) format("woff2"), url(/assets/./fonts/lato/lato-italic-webfont.woff) format("woff");
|
src: url(/assets/./fonts/9bcf055a732c0b22d2279ba79e20c577.woff2) format("woff2"), url(/assets/./fonts/c8eef482ac448a91ecca9d008634c044.woff) format("woff");
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: italic; }
|
font-style: italic; }
|
||||||
|
|
||||||
|
|||||||
@@ -38,61 +38,6 @@ let DateTimeFormat;
|
|||||||
|
|
||||||
DateTimeFormat = global.Intl.DateTimeFormat;
|
DateTimeFormat = global.Intl.DateTimeFormat;
|
||||||
|
|
||||||
export class ValidationErrorsInfoDialog extends React.Component {
|
|
||||||
|
|
||||||
state = {
|
|
||||||
open: this.props.open,
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(newProps){
|
|
||||||
this.setState({open: newProps.open});
|
|
||||||
}
|
|
||||||
|
|
||||||
handleOpen = () => {
|
|
||||||
this.setState({ open: true });
|
|
||||||
};
|
|
||||||
|
|
||||||
handleClose = () => {
|
|
||||||
this.setState({ open: false });
|
|
||||||
this.props.onDismiss();
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
|
||||||
|
|
||||||
const actions = [
|
|
||||||
<FlatButton
|
|
||||||
label="Dismiss"
|
|
||||||
primary={true}
|
|
||||||
keyboardFocused={true}
|
|
||||||
onClick={this.handleClose}
|
|
||||||
/>,
|
|
||||||
];
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<Dialog
|
|
||||||
title="Erors"
|
|
||||||
actions={actions}
|
|
||||||
modal={false}
|
|
||||||
open={this.state.open}
|
|
||||||
onRequestClose={this.handleClose}
|
|
||||||
overlayStyle={{backgroundColor: 'transparent'}}
|
|
||||||
>
|
|
||||||
{this.props.errorMessages.map(errorMessage => {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<a>{errorMessage.message}</a>
|
|
||||||
<br/>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</Dialog>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export class DialogExampleSimple extends React.Component {
|
export class DialogExampleSimple extends React.Component {
|
||||||
state = {
|
state = {
|
||||||
open: true,
|
open: true,
|
||||||
@@ -453,8 +398,6 @@ class VerticalNonLinear extends React.Component {
|
|||||||
},
|
},
|
||||||
return_time: new Date(),
|
return_time: new Date(),
|
||||||
pickupTimeHide: false,
|
pickupTimeHide: false,
|
||||||
showValidationErrors:false,
|
|
||||||
validationErrors:[],
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -555,15 +498,7 @@ class VerticalNonLinear extends React.Component {
|
|||||||
Instance.getRawConn().post('/v1/nemt/rides', requestRide).then(function (res) {
|
Instance.getRawConn().post('/v1/nemt/rides', requestRide).then(function (res) {
|
||||||
self.handleRequestClose(self);
|
self.handleRequestClose(self);
|
||||||
window.location.href = '/#/app/page/map/' + res.data.ride_uuid;
|
window.location.href = '/#/app/page/map/' + res.data.ride_uuid;
|
||||||
}).catch(error => {
|
}).catch(console.error);
|
||||||
if (error.response.status === 422){
|
|
||||||
//Unprocessable Entity (validation failed)
|
|
||||||
self.setState(Object.assign(self.state, {
|
|
||||||
showValidationErrors:true,
|
|
||||||
validationErrors:error.response.data.data
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -850,12 +785,6 @@ class VerticalNonLinear extends React.Component {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleValidationErrosDialogDismiss(){
|
|
||||||
this.setState(Object.assign(this.state, {
|
|
||||||
showValidationErrors:false
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
// const { stepIndex } = this.state;
|
// const { stepIndex } = this.state;
|
||||||
this.getLocation();
|
this.getLocation();
|
||||||
@@ -919,8 +848,6 @@ class VerticalNonLinear extends React.Component {
|
|||||||
<div className="box-body padding-xs">
|
<div className="box-body padding-xs">
|
||||||
|
|
||||||
<div style={{ maxWidth: 380, margin: 'auto' }}>
|
<div style={{ maxWidth: 380, margin: 'auto' }}>
|
||||||
<ValidationErrorsInfoDialog open = {this.state.showValidationErrors} errorMessages = {this.state.validationErrors} onDismiss={this.handleValidationErrosDialogDismiss.bind(this)}/>
|
|
||||||
|
|
||||||
<Stepper
|
<Stepper
|
||||||
activeStep={this.state.stepIndex}
|
activeStep={this.state.stepIndex}
|
||||||
linear={false}
|
linear={false}
|
||||||
|
|||||||
@@ -650,7 +650,7 @@ class Organization extends React.Component {
|
|||||||
open={this.state.showErrorMessage}
|
open={this.state.showErrorMessage}
|
||||||
onRequestClose={this.handleDialogDismiss.bind(this)}
|
onRequestClose={this.handleDialogDismiss.bind(this)}
|
||||||
>
|
>
|
||||||
{this.state.errorMessage}
|
{this.state.message}
|
||||||
</Dialog>
|
</Dialog>
|
||||||
<Main organization={this.state.organization}
|
<Main organization={this.state.organization}
|
||||||
onAddressAdded={this.handleAddressAdded} onAddressRemoved={this.handleAddressRemoved}
|
onAddressAdded={this.handleAddressAdded} onAddressRemoved={this.handleAddressRemoved}
|
||||||
|
|||||||
Reference in New Issue
Block a user