Compare commits
2 Commits
login-redi
...
self-regis
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f872c0189 | ||
|
|
372b3883a0 |
@@ -29,8 +29,8 @@ const isFunction = (functionToCheck) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const requireAuth = (nextState, replace, next) => {
|
const requireAuth = (nextState, replace, next) => {
|
||||||
if (nextState.location.pathname === '/login' || nextState.location.pathname === '/sign-up' || (nextState.location.pathname.indexOf('/ride') > -1 && nextState.params.ride_uuid !== undefined && nextState.params.user_uuid !== undefined)
|
if (nextState.location.pathname === '/login' || nextState.location.pathname === '/sign-up' || nextState.location.pathname === '/selfRegister' || (nextState.location.pathname.indexOf('/ride') > -1 && nextState.params.ride_uuid !== undefined && nextState.params.user_uuid !== undefined)
|
||||||
|| (!isFunction(replace) && (replace.location.pathname === '/login' || replace.location.pathname === '/sign-up' || (replace.location.pathname.indexOf('/ride') > -1 && replace.params.ride_uuid !== undefined && replace.params.user_uuid !== undefined)))) {
|
|| (!isFunction(replace) && (replace.location.pathname === '/login' || replace.location.pathname === '/sign-up' || nextState.location.pathname === '/selfRegister' || (replace.location.pathname.indexOf('/ride') > -1 && replace.params.ride_uuid !== undefined && replace.params.user_uuid !== undefined)))) {
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,12 +46,14 @@ export class ValidationErrorsInfoDialog extends React.Component {
|
|||||||
overlayStyle={{ backgroundColor: 'transparent' }}
|
overlayStyle={{ backgroundColor: 'transparent' }}
|
||||||
>
|
>
|
||||||
{this.props.errorMessages.map(errorMessage => {
|
{this.props.errorMessages.map(errorMessage => {
|
||||||
return (
|
const oneValidationMessage = (<span><a>{errorMessage.message}</a><br /></span>);
|
||||||
<div>
|
const oneValidationMessageWithTab = (<span><li style={{ marginLeft: 2 + "em" }}>{errorMessage.message}</li></span>);
|
||||||
<a>{errorMessage.message}</a>
|
|
||||||
<br />
|
if (errorMessage.field_name === "password-tab") {
|
||||||
</div>
|
return oneValidationMessageWithTab;
|
||||||
);
|
} else {
|
||||||
|
return oneValidationMessage;
|
||||||
|
}
|
||||||
})}
|
})}
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -101,10 +101,10 @@ class SidebarContent extends React.Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ul className="nav" ref={(c) => { this.nav = c; }}>
|
<ul className="nav" ref={(c) => { this.nav = c; }}>
|
||||||
{loggedUser.anyOf(planScheduler, visitReporter) &&
|
{loggedUser.anyOf(visitReporter) &&
|
||||||
<li><FlatButton className="prepend-icon" href={"#/app/form/visit/" + this.state.user.useruuid}><span>Create Visit</span></FlatButton></li>
|
<li><FlatButton className="prepend-icon" href={"#/app/form/visit/" + this.state.user.useruuid}><span>Create Visit</span></FlatButton></li>
|
||||||
}
|
}
|
||||||
{!loggedUser.anyOf(planScheduler, visitReporter) &&
|
{!loggedUser.anyOf(visitReporter) &&
|
||||||
<li>
|
<li>
|
||||||
<FlatButton href="#/app/form"><i className="nav-icon material-icons cyan-text text-lighter-4">directions_car</i><span className="nav-text">Rides</span></FlatButton>
|
<FlatButton href="#/app/form"><i className="nav-icon material-icons cyan-text text-lighter-4">directions_car</i><span className="nav-text">Rides</span></FlatButton>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -113,7 +113,7 @@ class SidebarContent extends React.Component {
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
{!loggedUser.anyOf(planScheduler, visitReporter) &&
|
{!loggedUser.anyOf(visitReporter) &&
|
||||||
<li>
|
<li>
|
||||||
<FlatButton href="#/app/chart"><i className="nav-icon material-icons">people_outline</i><span className="nav-text">Members</span></FlatButton>
|
<FlatButton href="#/app/chart"><i className="nav-icon material-icons">people_outline</i><span className="nav-text">Members</span></FlatButton>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -122,36 +122,40 @@ class SidebarContent extends React.Component {
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
<li>
|
{!loggedUser.anyOf(visitReporter) &&
|
||||||
<FlatButton href="#/app/chart"><i className="nav-icon material-icons">schedule</i><span className="nav-text">Visits</span></FlatButton>
|
<li>
|
||||||
<ul>
|
<FlatButton href="#/app/chart"><i className="nav-icon material-icons">schedule</i><span className="nav-text">Visits</span></FlatButton>
|
||||||
<li><FlatButton className="prepend-icon" href={"#/app/form/visit/" + this.state.user.useruuid}><span>Create Visit</span></FlatButton></li>
|
<ul>
|
||||||
<li> <FlatButton className="prepend-icon" href="#/app/table/visits"><span className="nav-text">Manage Visits</span></FlatButton></li>
|
<li><FlatButton className="prepend-icon" href={"#/app/form/visit/" + this.state.user.useruuid}><span>Create Visit</span></FlatButton></li>
|
||||||
</ul>
|
<li> <FlatButton className="prepend-icon" href="#/app/table/visits"><span className="nav-text">Manage Visits</span></FlatButton></li>
|
||||||
</li>
|
</ul>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
|
||||||
<li>
|
{!loggedUser.anyOf(visitReporter) &&
|
||||||
<FlatButton href="#/app/chart"><i className="nav-icon material-icons">settings</i><span className="nav-text">Manage</span></FlatButton>
|
<li>
|
||||||
<ul>
|
<FlatButton href="#/app/chart"><i className="nav-icon material-icons">settings</i><span className="nav-text">Manage</span></FlatButton>
|
||||||
{!loggedUser.anyOf(planScheduler, providerScheduler) &&
|
<ul>
|
||||||
|
{!loggedUser.anyOf(planScheduler, providerScheduler) &&
|
||||||
|
<li>
|
||||||
|
<FlatButton href="#/app/table/authorizedusers"><i className="nav-icon material-icons">people</i><span className="nav-text">Authorized Users</span></FlatButton>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
<li>
|
<li>
|
||||||
<FlatButton href="#/app/table/authorizedusers"><i className="nav-icon material-icons">people</i><span className="nav-text">Authorized Users</span></FlatButton>
|
<FlatButton href="#/app/table/organizations"><i className="nav-icon material-icons">assignment</i><span className="nav-text">Organizations</span></FlatButton>
|
||||||
</li>
|
</li>
|
||||||
}
|
<li>
|
||||||
<li>
|
<FlatButton href="#/app/table/provider"><i className="nav-icon material-icons">local_hospital</i><span className="nav-text">Participating Providers</span></FlatButton>
|
||||||
<FlatButton href="#/app/table/organizations"><i className="nav-icon material-icons">assignment</i><span className="nav-text">Organizations</span></FlatButton>
|
</li>
|
||||||
</li>
|
<li>
|
||||||
<li>
|
<FlatButton href={"#/app/authorizedusers/" + this.state.user.useruuid}><i className="nav-icon material-icons">account_circle</i><span className="nav-text">Profile</span></FlatButton>
|
||||||
<FlatButton href="#/app/table/provider"><i className="nav-icon material-icons">local_hospital</i><span className="nav-text">Participating Providers</span></FlatButton>
|
</li>
|
||||||
</li>
|
{/* <li>
|
||||||
<li>
|
<FlatButton href="#/app/dashboard"><i className="nav-icon material-icons">equalizer</i><span className="nav-text">Reports</span></FlatButton>
|
||||||
<FlatButton href={"#/app/authorizedusers/" + this.state.user.useruuid}><i className="nav-icon material-icons">account_circle</i><span className="nav-text">Profile</span></FlatButton>
|
</li> */}
|
||||||
</li>
|
</ul>
|
||||||
{/* <li>
|
</li>
|
||||||
<FlatButton href="#/app/dashboard"><i className="nav-icon material-icons">equalizer</i><span className="nav-text">Reports</span></FlatButton>
|
}
|
||||||
</li> */}
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li className="nav-divider" />
|
<li className="nav-divider" />
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ export class NEMTLocation extends React.Component {
|
|||||||
long: 0
|
long: 0
|
||||||
},
|
},
|
||||||
providers: [],
|
providers: [],
|
||||||
|
locations: [],
|
||||||
currentSelection: {
|
currentSelection: {
|
||||||
id: 0,
|
id: 0,
|
||||||
name: "",
|
name: "",
|
||||||
@@ -125,6 +126,7 @@ export class NEMTLocation extends React.Component {
|
|||||||
saved: false,
|
saved: false,
|
||||||
},
|
},
|
||||||
inputValue: "",
|
inputValue: "",
|
||||||
|
locationValue: "",
|
||||||
addLocation: false,
|
addLocation: false,
|
||||||
searchAddresses: [],
|
searchAddresses: [],
|
||||||
addLocationText: '',
|
addLocationText: '',
|
||||||
@@ -143,6 +145,12 @@ export class NEMTLocation extends React.Component {
|
|||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
address: '',
|
address: '',
|
||||||
|
},
|
||||||
|
centerLocation: {
|
||||||
|
lat: 0,
|
||||||
|
long: 0,
|
||||||
|
name: '',
|
||||||
|
address: '',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,6 +172,8 @@ export class NEMTLocation extends React.Component {
|
|||||||
this.updateLocation = this.updateLocation.bind(this);
|
this.updateLocation = this.updateLocation.bind(this);
|
||||||
this.handleGetClosestPlace = this.handleGetClosestPlace.bind(this);
|
this.handleGetClosestPlace = this.handleGetClosestPlace.bind(this);
|
||||||
|
|
||||||
|
this.updateLocationValue = this.updateLocationValue.bind(this);
|
||||||
|
this.handleAutoCompleteLocation = this.handleAutoCompleteLocation.bind(this);
|
||||||
// this.updateLocation().then(console.log);
|
// this.updateLocation().then(console.log);
|
||||||
|
|
||||||
|
|
||||||
@@ -184,52 +194,71 @@ export class NEMTLocation extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
geoSuccess = (position) => {
|
geoSuccess = (position) => {
|
||||||
|
let lat = 0;
|
||||||
|
let long = 0;
|
||||||
|
if (this.state.centerLocation.lat !== 0 && this.state.centerLocation.long !== 0) {
|
||||||
|
lat = this.state.centerLocation.lat;
|
||||||
|
long = this.state.centerLocation.long;
|
||||||
|
} else {
|
||||||
|
const geo = GeolocationService.GetCoordinates();
|
||||||
|
lat = geo.lat;
|
||||||
|
long = geo.long;
|
||||||
|
}
|
||||||
|
|
||||||
const geo = GeolocationService.GetCoordinates();
|
if (lat === 0 || long === 0) {
|
||||||
// self.updateLocation().then(p => {
|
lat = 41.886406;
|
||||||
let lat = geo.lat;
|
long = -87.624225;
|
||||||
let long = geo.long;
|
}
|
||||||
|
|
||||||
this.locateNearby(lat, long)
|
this.locateNearby(lat, long)
|
||||||
}
|
}
|
||||||
|
|
||||||
locateNearby = (lat, long) => {
|
locateNearby = (lat, long) => {
|
||||||
|
|
||||||
if (lat === 0 || long === 0) {
|
if (lat === 0 || long === 0) {
|
||||||
lat = 41.886406;
|
lat = 41.886406;
|
||||||
long = -87.624225;
|
long = -87.624225;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.state.locationType === 'provider') {
|
if (this.state.locationType === 'provider') {
|
||||||
Instance.getRawConn().get(`/v1/nemt/provider/participating?sort=distance&lat=${lat}&long=${long}`).then(res => {
|
let url = `/v1/nemt/provider?lat=${lat}&long=${long}&limit=50&sortby=distance`
|
||||||
|
Instance.getRawConn().get(url).then(res => {
|
||||||
let nearByPlaces = [];
|
let nearByPlaces = [];
|
||||||
let providers = res.data.map(p => {
|
if (res.data.resultStatus === 'SUCCESS') {
|
||||||
if (p.address.street_address_1) {
|
let providers = res.data.providers.map(p => {
|
||||||
const streetNumber = p.address.street_address_1.split(' ')[0]
|
const streetNumber = p.streetName_1.split(' ')[0]
|
||||||
let clickResult = {
|
let clickResult = {
|
||||||
id: p.muk_id,
|
id: p.mukId,
|
||||||
address: `${p.address.street_address_1}, ${p.address.city}, ${p.address.state} (${p.address.zipcode})`,
|
muk_id: p.mukId,
|
||||||
lat: p.address.lat,
|
address: `${p.streetName_1}, ${p.cityName}, ${p.state} (${p.zipCode.substr(0, 5)})`,
|
||||||
lng: p.address.long,
|
lat: parseFloat(p.latitude),
|
||||||
name: p.name,
|
lng: parseFloat(p.longitude),
|
||||||
type: "provider",
|
name: p.providerName,
|
||||||
|
type: 'provider',
|
||||||
raw: p,
|
raw: p,
|
||||||
street_number: streetNumber,
|
street_number: streetNumber,
|
||||||
street: p.address.street_address_1.replace(streetNumber, '').trim(),
|
street: p.streetName_1.replace(streetNumber, '').trim(),
|
||||||
city: p.address.city,
|
city: p.cityName,
|
||||||
state: p.address.state,
|
state: p.state,
|
||||||
zipcode: p.address.zipcode.substring(0, 5),
|
zipcode: p.zipCode.substr(0, 5),
|
||||||
country: p.address.country,
|
country: p.country,
|
||||||
saved: false,
|
saved: false,
|
||||||
}
|
}
|
||||||
clickResult.address = `${clickResult.street_number} ${clickResult.street}, ${clickResult.city}`
|
|
||||||
|
|
||||||
var listItem = (<ListItem primaryText={p.name} secondaryText={clickResult.address} key={p.muk_id} rightIcon={<MapsLocalHospital />} onClick={(event) => this.handlePlaceChanged(clickResult)} />)
|
if (p.fivePartKeyGroups.length > 0) {
|
||||||
|
clickResult.npi = p.fivePartKeyGroups[0].providerNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
var listItem = (<ListItem primaryText={p.providerName} secondaryText={clickResult.address} key={p.mukId} rightIcon={<MapsLocalHospital />} onClick={(event) => this.handlePlaceChanged(clickResult)} />)
|
||||||
nearByPlaces.push(listItem);
|
nearByPlaces.push(listItem);
|
||||||
p.providerText = `${p.name} - ${p.address.street_address_1}, ${p.address.city}, ${p.address.state} (${p.address.zipcode}) (${p.address.phone_number})`
|
p.providerText = `${p.providerName} - ${p.streetName_1}, ${p.cityName}, ${p.state} (${p.zipCode.substr(0, 5)}) (${p.phoneNumber})`
|
||||||
}
|
p.muk_id = p.mukId
|
||||||
return p;
|
|
||||||
});
|
|
||||||
|
|
||||||
this.setState(Object.assign(this.state, { nearbyPlaces: nearByPlaces, providers: providers }));
|
return p;
|
||||||
|
});
|
||||||
|
|
||||||
|
this.setState(Object.assign(this.state, { nearbyPlaces: nearByPlaces, providers: providers }));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
var pyrmont = new google.maps.LatLng(lat, long);
|
var pyrmont = new google.maps.LatLng(lat, long);
|
||||||
@@ -495,28 +524,103 @@ export class NEMTLocation extends React.Component {
|
|||||||
this.locateNearby(41.886406, -87.624225);
|
this.locateNearby(41.886406, -87.624225);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateLocationValue(searchText, dtSource, params) {
|
||||||
|
let self = this;
|
||||||
|
self.setState(Object.assign(self.state, { locationValue: searchText }));
|
||||||
|
|
||||||
|
if (searchText.length >= 3) {
|
||||||
|
let lat = 0;
|
||||||
|
let long = 0;
|
||||||
|
if (this.state.centerLocation.lat !== 0 && this.state.centerLocation.long !== 0) {
|
||||||
|
lat = this.state.centerLocation.lat;
|
||||||
|
long = this.state.centerLocation.long;
|
||||||
|
} else {
|
||||||
|
const geo = GeolocationService.GetCoordinates();
|
||||||
|
lat = geo.lat;
|
||||||
|
long = geo.long;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lat === 0 || long === 0) {
|
||||||
|
lat = 41.886406;
|
||||||
|
long = -87.624225;
|
||||||
|
}
|
||||||
|
|
||||||
|
var location = new google.maps.LatLng(lat, long);
|
||||||
|
var request = {
|
||||||
|
location: location,
|
||||||
|
radius: '500',
|
||||||
|
input: searchText,
|
||||||
|
componentRestrictions: { country: 'us' },
|
||||||
|
};
|
||||||
|
const callback = (results, status) => {
|
||||||
|
if (status == google.maps.places.PlacesServiceStatus.OK) {
|
||||||
|
var googlePlaces = results.map(place => {
|
||||||
|
place.providerText = place.description;
|
||||||
|
place.muk_id = place.id;
|
||||||
|
place.saved = false;
|
||||||
|
return place;
|
||||||
|
});
|
||||||
|
self.setState(Object.assign(self.state, { locations: googlePlaces }));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
service.getPlacePredictions(request, callback);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
updateTextSearch(searchText, dtSource, params) {
|
updateTextSearch(searchText, dtSource, params) {
|
||||||
let self = this;
|
let self = this;
|
||||||
self.setState(Object.assign(self.state, { inputValue: searchText }));
|
self.setState(Object.assign(self.state, { inputValue: searchText }));
|
||||||
if (searchText.length >= 3) {
|
if (searchText.length >= 3) {
|
||||||
let lat = self.state.geolocation.lat;
|
let lat = 0;
|
||||||
let long = self.state.geolocation.long;
|
let long = 0;
|
||||||
|
if (this.state.centerLocation.lat !== 0 && this.state.centerLocation.long !== 0) {
|
||||||
|
lat = this.state.centerLocation.lat;
|
||||||
|
long = this.state.centerLocation.long;
|
||||||
|
} else {
|
||||||
|
const geo = GeolocationService.GetCoordinates();
|
||||||
|
lat = geo.lat;
|
||||||
|
long = geo.long;
|
||||||
|
}
|
||||||
|
|
||||||
if (lat === 0 || long === 0) {
|
if (lat === 0 || long === 0) {
|
||||||
lat = 41.886406;
|
lat = 41.886406;
|
||||||
long = -87.624225;
|
long = -87.624225;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self.state.locationType === 'provider') {
|
if (self.state.locationType === 'provider') {
|
||||||
//let url = `/v1/nemt/provider?lat=${lat}&long=${long}&limit=20&name=${searchText}&sortby=distance`
|
let url = `/v1/nemt/provider?lat=${lat}&long=${long}&limit=50&name=${searchText}&sortby=distance`
|
||||||
let url = `/v1/nemt/provider/participating?lat=${lat}&long=${long}&query=${searchText}&sortby=distance`
|
|
||||||
Instance.getRawConn().get(encodeURI(url)).then(res => {
|
Instance.getRawConn().get(encodeURI(url)).then(res => {
|
||||||
if (res.data.length > 0) {
|
if (res.data.resultStatus === 'SUCCESS') {
|
||||||
let places = res.data.map(p => {
|
let providers = res.data.providers.map(p => {
|
||||||
p.providerText = `${p.name} - ${p.address.street_address_1}, ${p.address.city}, ${p.address.state} (${p.address.zipcode}) (${p.address.phone_number})`
|
const streetNumber = p.streetName_1.split(' ')[0]
|
||||||
p.saved = false
|
p.providerText = `${p.providerName} - ${p.streetName_1}, ${p.cityName}, ${p.state} (${p.zipCode.substr(0, 5)}) (${p.phoneNumber})`
|
||||||
|
p.muk_id = p.mukId
|
||||||
|
|
||||||
|
let clickResult = {
|
||||||
|
id: p.mukId,
|
||||||
|
muk_id: p.mukId,
|
||||||
|
address: `${p.streetName_1}, ${p.cityName}, ${p.state} (${p.zipCode.substr(0, 5)})`,
|
||||||
|
lat: parseFloat(p.latitude),
|
||||||
|
lng: parseFloat(p.longitude),
|
||||||
|
name: p.providerName,
|
||||||
|
type: 'provider',
|
||||||
|
raw: p,
|
||||||
|
street_number: streetNumber,
|
||||||
|
street: p.streetName_1.replace(streetNumber, '').trim(),
|
||||||
|
city: p.cityName,
|
||||||
|
state: p.state,
|
||||||
|
zipcode: p.zipCode.substr(0, 5),
|
||||||
|
country: p.country,
|
||||||
|
saved: false,
|
||||||
|
}
|
||||||
|
|
||||||
|
if (p.fivePartKeyGroups.length > 0) {
|
||||||
|
clickResult.npi = p.fivePartKeyGroups[0].providerNum;
|
||||||
|
}
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
})
|
});
|
||||||
self.setState(Object.assign(self.state, { providers: places }));
|
this.setState(Object.assign(this.state, { providers: providers }));
|
||||||
dtSource = self.state.providers;
|
dtSource = self.state.providers;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -554,42 +658,59 @@ export class NEMTLocation extends React.Component {
|
|||||||
this.setState(Object.assign(this.state, { addLocationTextValue: providerSearch }));
|
this.setState(Object.assign(this.state, { addLocationTextValue: providerSearch }));
|
||||||
if (providerSearch.length >= 3) {
|
if (providerSearch.length >= 3) {
|
||||||
|
|
||||||
const geo = GeolocationService.GetCoordinates();
|
|
||||||
let lat = geo.lat;
|
let lat = 0;
|
||||||
let long = geo.long;
|
let long = 0;
|
||||||
|
if (this.state.centerLocation.lat !== 0 && this.state.centerLocation.long !== 0) {
|
||||||
|
lat = this.state.centerLocation.lat;
|
||||||
|
long = this.state.centerLocation.long;
|
||||||
|
} else {
|
||||||
|
const geo = GeolocationService.GetCoordinates();
|
||||||
|
lat = geo.lat;
|
||||||
|
long = geo.long;
|
||||||
|
}
|
||||||
|
|
||||||
if (lat === 0 || long === 0) {
|
if (lat === 0 || long === 0) {
|
||||||
lat = 41.886406;
|
lat = 41.886406;
|
||||||
long = -87.624225;
|
long = -87.624225;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.state.locationType === 'provider') {
|
if (this.state.locationType === 'provider') {
|
||||||
let url = `/v1/nemt/provider/participating?lat=${lat}&long=${long}&query=${providerSearch}&sortby=distance`
|
let url = `/v1/nemt/provider?lat=${lat}&long=${long}&limit=50&name=${providerSearch}&sortby=distance`
|
||||||
Instance.getRawConn().get(encodeURI(url)).then(res => {
|
Instance.getRawConn().get(encodeURI(url)).then(res => {
|
||||||
let places = res.data.map(p => {
|
if (res.data.resultStatus === 'SUCCESS') {
|
||||||
const streetNumber = p.address.street_address_1.split(' ')[0]
|
let providers = res.data.providers.map(p => {
|
||||||
p.providerText = `${p.name} - ${p.address.street_address_1}, ${p.address.city}, ${p.address.state} (${p.address.zipcode}) (${p.address.phone_number})`
|
const streetNumber = p.streetName_1.split(' ')[0]
|
||||||
let clickResult = {
|
p.providerText = `${p.providerName} - ${p.streetName_1}, ${p.cityName}, ${p.state} (${p.zipCode.substr(0, 5)}) (${p.phoneNumber})`
|
||||||
id: p.muk_id,
|
p.muk_id = p.mukId
|
||||||
address: `${p.address.street_address_1}, ${p.address.city}, ${p.address.state} (${p.address.zipcode})`,
|
|
||||||
lat: p.address.lat,
|
|
||||||
lng: p.address.long,
|
|
||||||
name: p.name,
|
|
||||||
type: "provider",
|
|
||||||
raw: p,
|
|
||||||
street_number: streetNumber,
|
|
||||||
street: p.address.street_address_1.replace(streetNumber, '').trim(),
|
|
||||||
city: p.address.city,
|
|
||||||
state: p.address.state,
|
|
||||||
zipcode: p.address.zipcode.substring(0, 5),
|
|
||||||
country: p.address.country,
|
|
||||||
saved: false,
|
|
||||||
}
|
|
||||||
clickResult.address = `${clickResult.street_number} ${clickResult.street}, ${clickResult.city}`
|
|
||||||
|
|
||||||
var listItem = (<ListItem value={p.muk_id} primaryText={p.name} secondaryText={clickResult.address} key={p.muk_id} rightIcon={<MapsLocalHospital />} onClick={(event) => this.handleSaveAddress(clickResult, this)} />)
|
let clickResult = {
|
||||||
return listItem;
|
id: p.mukId,
|
||||||
});
|
muk_id: p.mukId,
|
||||||
|
address: `${p.streetName_1}, ${p.cityName}, ${p.state} (${p.zipCode.substr(0, 5)})`,
|
||||||
|
lat: parseFloat(p.latitude),
|
||||||
|
lng: parseFloat(p.longitude),
|
||||||
|
name: p.providerName,
|
||||||
|
type: 'provider',
|
||||||
|
raw: p,
|
||||||
|
street_number: streetNumber,
|
||||||
|
street: p.streetName_1.replace(streetNumber, '').trim(),
|
||||||
|
city: p.cityName,
|
||||||
|
state: p.state,
|
||||||
|
zipcode: p.zipCode.substr(0, 5),
|
||||||
|
country: p.country,
|
||||||
|
saved: false,
|
||||||
|
}
|
||||||
|
|
||||||
this.setState(Object.assign(this.state, { searchAddresses: places }));
|
if (p.fivePartKeyGroups.length > 0) {
|
||||||
|
clickResult.npi = p.fivePartKeyGroups[0].providerNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
var listItem = (<ListItem primaryText={p.providerName} secondaryText={clickResult.address} key={p.mukId} value={p.mukId} rightIcon={<MapsLocalHospital />} onClick={(event) => this.handleSaveAddress(clickResult)} />)
|
||||||
|
return listItem;
|
||||||
|
});
|
||||||
|
this.setState(Object.assign(this.state, { searchAddresses: providers }));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
var location = new google.maps.LatLng(lat, long);
|
var location = new google.maps.LatLng(lat, long);
|
||||||
@@ -716,6 +837,68 @@ export class NEMTLocation extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleAutoCompleteLocation = (location) => {
|
||||||
|
const self = this;
|
||||||
|
placeService.getDetails(location, (result, status) => {
|
||||||
|
if (status == google.maps.places.PlacesServiceStatus.OK) {
|
||||||
|
let clickResult = {
|
||||||
|
id: result.place_id,
|
||||||
|
placeId: result.place_id,
|
||||||
|
address: result.formatted_address ? result.formatted_address : result.vicinity,
|
||||||
|
lat: result.geometry.location.lat(),
|
||||||
|
lng: result.geometry.location.lng(),
|
||||||
|
name: result.name,
|
||||||
|
type: "google",
|
||||||
|
raw: result,
|
||||||
|
street_number: '',
|
||||||
|
street: '',
|
||||||
|
city: '',
|
||||||
|
state: '',
|
||||||
|
zipcode: '',
|
||||||
|
country: '',
|
||||||
|
saved: false,
|
||||||
|
}
|
||||||
|
|
||||||
|
result.address_components.forEach(a => {
|
||||||
|
a.types.forEach(c => {
|
||||||
|
switch (c) {
|
||||||
|
case "street_number":
|
||||||
|
clickResult.street_number = a.short_name;
|
||||||
|
break;
|
||||||
|
case "route":
|
||||||
|
clickResult.street = a.short_name;
|
||||||
|
break;
|
||||||
|
case "locality":
|
||||||
|
clickResult.city = a.short_name;
|
||||||
|
break;
|
||||||
|
case "administrative_area_level_1":
|
||||||
|
clickResult.state = a.short_name;
|
||||||
|
break;
|
||||||
|
case "country":
|
||||||
|
clickResult.country = a.short_name;
|
||||||
|
break;
|
||||||
|
case "postal_code":
|
||||||
|
clickResult.zipcode = a.short_name;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}, this)
|
||||||
|
}, this);
|
||||||
|
clickResult.address = `${clickResult.street_number} ${clickResult.street}, ${clickResult.city}`
|
||||||
|
|
||||||
|
|
||||||
|
const centerLocation = {
|
||||||
|
lat: clickResult.lat,
|
||||||
|
long: clickResult.lng,
|
||||||
|
name: clickResult.name,
|
||||||
|
address: clickResult.address
|
||||||
|
}
|
||||||
|
|
||||||
|
self.setState(Object.assign(self.state, { centerLocation: centerLocation }));
|
||||||
|
self.locateNearby(clickResult.lat, clickResult.lng);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
handleAutocomplete = (provider) => {
|
handleAutocomplete = (provider) => {
|
||||||
const sendInfo = (clickResult) => {
|
const sendInfo = (clickResult) => {
|
||||||
this.setState(Object.assign(this.state, { currentSelection: clickResult }));
|
this.setState(Object.assign(this.state, { currentSelection: clickResult }));
|
||||||
@@ -735,24 +918,32 @@ export class NEMTLocation extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.state.locationType === "provider") {
|
if (this.state.locationType === "provider") {
|
||||||
const streetNumber = provider.address.street_address_1.split(' ')[0]
|
const p = provider;
|
||||||
|
const streetNumber = p.streetName_1.split(' ')[0]
|
||||||
|
p.providerText = `${p.providerName} - ${p.streetName_1}, ${p.cityName}, ${p.state} (${p.zipCode.substr(0, 5)}) (${p.phoneNumber})`
|
||||||
|
p.muk_id = p.mukId
|
||||||
|
|
||||||
let clickResult = {
|
let clickResult = {
|
||||||
id: provider.muk_id,
|
id: p.mukId,
|
||||||
address: `${provider.address.street_address_1}, ${provider.address.city}, ${provider.address.state} (${provider.address.zipcode})`,
|
muk_id: p.mukId,
|
||||||
lat: provider.address.lat,
|
address: `${p.streetName_1}, ${p.cityName}, ${p.state} (${p.zipCode.substr(0, 5)})`,
|
||||||
lng: provider.address.long,
|
lat: parseFloat(p.latitude),
|
||||||
name: provider.name,
|
lng: parseFloat(p.longitude),
|
||||||
type: "provider",
|
name: p.providerName,
|
||||||
raw: provider,
|
type: 'provider',
|
||||||
|
raw: p,
|
||||||
street_number: streetNumber,
|
street_number: streetNumber,
|
||||||
street: provider.address.street_address_1.replace(streetNumber, '').trim(),
|
street: p.streetName_1.replace(streetNumber, '').trim(),
|
||||||
city: provider.address.city,
|
city: p.cityName,
|
||||||
state: provider.address.state,
|
state: p.state,
|
||||||
zipcode: provider.address.zipcode.substring(0, 5),
|
zipcode: p.zipCode.substr(0, 5),
|
||||||
country: provider.address.country,
|
country: p.country,
|
||||||
saved: false,
|
saved: false,
|
||||||
}
|
}
|
||||||
clickResult.address = `${clickResult.street_number} ${clickResult.street}, ${clickResult.city}`
|
|
||||||
|
if (p.fivePartKeyGroups.length > 0) {
|
||||||
|
clickResult.npi = p.fivePartKeyGroups[0].providerNum;
|
||||||
|
}
|
||||||
|
|
||||||
sendInfo(clickResult);
|
sendInfo(clickResult);
|
||||||
} else {
|
} else {
|
||||||
@@ -842,42 +1033,51 @@ export class NEMTLocation extends React.Component {
|
|||||||
|
|
||||||
handleCurrentLocation(e) {
|
handleCurrentLocation(e) {
|
||||||
const self = this;
|
const self = this;
|
||||||
const geo = GeolocationService.GetCoordinates();
|
|
||||||
// self.updateLocation().then(p => {
|
let lat = 0;
|
||||||
let lat = geo.lat;
|
let long = 0;
|
||||||
let long = geo.long;
|
if (this.state.centerLocation.lat !== 0 && this.state.centerLocation.long !== 0) {
|
||||||
|
lat = this.state.centerLocation.lat;
|
||||||
|
long = this.state.centerLocation.long;
|
||||||
|
} else {
|
||||||
|
const geo = GeolocationService.GetCoordinates();
|
||||||
|
lat = geo.lat;
|
||||||
|
long = geo.long;
|
||||||
|
}
|
||||||
|
|
||||||
if (lat === 0 || long === 0) {
|
if (lat === 0 || long === 0) {
|
||||||
lat = 41.886406;
|
lat = 41.886406;
|
||||||
long = -87.624225;
|
long = -87.624225;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self.state.locationType === 'provider') {
|
if (self.state.locationType === 'provider') {
|
||||||
Instance.getRawConn().get(`/v1/nemt/provider/participating?sort=distance&lat=${lat}&long=${long}`).then(res => {
|
let url = `/v1/nemt/provider?lat=${lat}&long=${long}&limit=50&sortby=distance`
|
||||||
|
Instance.getRawConn().get(url).then(res => {
|
||||||
let listItem = (<ListItem primaryText="No location found" key="-1" leftIcon={<MapsNearMe />} onClick={self.handleCurrentLocation} />)
|
let listItem = (<ListItem primaryText="No location found" key="-1" leftIcon={<MapsNearMe />} onClick={self.handleCurrentLocation} />)
|
||||||
if (res.data.length > 0) {
|
if (res.data.resultStatus === 'SUCCESS') {
|
||||||
const result = res.data[0];
|
const p = res.data.providers[0];
|
||||||
const streetNumber = result.address.street_address_1.split(' ')[0]
|
const streetNumber = p.streetName_1.split(' ')[0]
|
||||||
let clickResult = {
|
let clickResult = {
|
||||||
id: result.muk_id,
|
id: p.mukId,
|
||||||
address: `${result.address.street_address_1}, ${result.address.city}, ${result.address.state} (${result.address.zipcode})`,
|
address: `${p.streetName_1}, ${p.cityName}, ${p.state} (${p.zipCode.substr(0, 5)})`,
|
||||||
lat: result.address.lat,
|
lat: parseFloat(p.latitude),
|
||||||
lng: result.address.long,
|
lng: parseFloat(p.longitude),
|
||||||
name: result.name,
|
name: p.providerName,
|
||||||
type: "provider",
|
type: 'provider',
|
||||||
raw: result,
|
raw: p,
|
||||||
street_number: streetNumber,
|
street_number: streetNumber,
|
||||||
street: result.address.street_address_1.replace(streetNumber, '').trim(),
|
street: p.streetName_1.replace(streetNumber, '').trim(),
|
||||||
city: result.address.city,
|
city: p.cityName,
|
||||||
state: result.address.state,
|
state: p.state,
|
||||||
zipcode: result.address.zipcode.substring(0, 5),
|
zipcode: p.zipCode.substr(0, 5),
|
||||||
country: result.address.country,
|
country: p.country,
|
||||||
saved: false,
|
saved: false,
|
||||||
}
|
}
|
||||||
clickResult.address = `${clickResult.street_number} ${clickResult.street}, ${clickResult.city}`
|
if (p.fivePartKeyGroups.length > 0) {
|
||||||
|
clickResult.npi = p.fivePartKeyGroups[0].providerNum;
|
||||||
|
}
|
||||||
self.handlePlaceChanged(clickResult)
|
self.handlePlaceChanged(clickResult)
|
||||||
//listItem = (<ListItem primaryText={clickResult.name} secondaryText={clickResult.address} key={clickResult.muk_id} leftIcon={<MapsNearMe />} onClick={(event) => self.handlePlaceChanged(clickResult)} />)
|
|
||||||
}
|
}
|
||||||
//self.setState(Object.assign(self.state, { currentLocation: listItem }));
|
|
||||||
}).catch(console.error);
|
}).catch(console.error);
|
||||||
} else {
|
} else {
|
||||||
var location = new google.maps.LatLng(lat, long);
|
var location = new google.maps.LatLng(lat, long);
|
||||||
@@ -1138,6 +1338,7 @@ export class NEMTLocation extends React.Component {
|
|||||||
|
|
||||||
let listItem = (
|
let listItem = (
|
||||||
<div className="" id="container">
|
<div className="" id="container">
|
||||||
|
<AutoComplete dataSourceConfig={datasourceConfig} dataSource={this.state.locations} filter={this.filterResults} maxSearchResults={5} onUpdateInput={this.updateLocationValue} fullWidth={true} floatingLabelText="Center Location" onNewRequest={this.handleAutoCompleteLocation} searchText={this.state.locationValue} />
|
||||||
{autosuggest}
|
{autosuggest}
|
||||||
<List>
|
<List>
|
||||||
{this.state.currentLocation}
|
{this.state.currentLocation}
|
||||||
@@ -1195,4 +1396,4 @@ export class NEMTLocation extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -156,14 +156,8 @@ class SignUp extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
handlePhone = (event) => {
|
handlePhone = (event) => {
|
||||||
let phone = event.target.value;
|
|
||||||
if (phone.indexOf("+1") < 0 && phone.length == 10) {
|
|
||||||
phone = "+1" + phone;
|
|
||||||
phone = phone.substring(0, 12);
|
|
||||||
}
|
|
||||||
|
|
||||||
const user = this.props.user;
|
const user = this.props.user;
|
||||||
user.phonenumber = phone;
|
user.phonenumber = event.target.value;;
|
||||||
if (this.props.onUserChanged) {
|
if (this.props.onUserChanged) {
|
||||||
this.props.onUserChanged(user);
|
this.props.onUserChanged(user);
|
||||||
}
|
}
|
||||||
@@ -674,10 +668,14 @@ class VerticalNonLinear extends React.Component {
|
|||||||
let self = state;
|
let self = state;
|
||||||
const { stepIndex } = self.state;
|
const { stepIndex } = self.state;
|
||||||
|
|
||||||
console.log('Step Index: ', stepIndex)
|
//console.log('Step Index: ', stepIndex)
|
||||||
switch (stepIndex) {
|
switch (stepIndex) {
|
||||||
case 0:
|
case 1:
|
||||||
const eligibility = {
|
const eligibility = {
|
||||||
|
"provider": {
|
||||||
|
"provider_npi": self.state.destination.raw.fivePartKeyGroups[0].providerNum,
|
||||||
|
"provider_name": self.state.destination.raw.providerName
|
||||||
|
},
|
||||||
"subscriber": {
|
"subscriber": {
|
||||||
"patient_type": self.state.user.type,
|
"patient_type": self.state.user.type,
|
||||||
"subscriber_id": self.state.user.member,
|
"subscriber_id": self.state.user.member,
|
||||||
@@ -688,10 +686,12 @@ class VerticalNonLinear extends React.Component {
|
|||||||
"demographic_info": {
|
"demographic_info": {
|
||||||
"date_of_birth": self.state.user.birthdate,
|
"date_of_birth": self.state.user.birthdate,
|
||||||
"gender": self.state.user.gender
|
"gender": self.state.user.gender
|
||||||
}
|
},
|
||||||
|
"user": self.state.user,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
console.log(JSON.stringify(eligibility));
|
||||||
Instance.getRawConn().post('/v1/nemt/eligibility', eligibility).then(function (res) {
|
Instance.getRawConn().post('/v1/nemt/eligibility', eligibility).then(function (res) {
|
||||||
self.setState(Object.assign(self.state, { stepIndex: stepIndex + 1, user: res.data }));
|
self.setState(Object.assign(self.state, { stepIndex: stepIndex + 1, user: res.data }));
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
@@ -1101,6 +1101,18 @@ class VerticalNonLinear extends React.Component {
|
|||||||
>
|
>
|
||||||
<Step>
|
<Step>
|
||||||
<StepButton onClick={() => this.setState({ stepIndex: 0 })}>
|
<StepButton onClick={() => this.setState({ stepIndex: 0 })}>
|
||||||
|
Provider
|
||||||
|
</StepButton>
|
||||||
|
<StepContent>
|
||||||
|
<form role="form">
|
||||||
|
<NEMTLocation type="flat" data={this.state} title={"Provider"} value={""} buttonvalue={this.state.buttonProviderText} onPlaceChanged={(provider) => this.handleProviderChanged(provider, this)} fontSize={12} locationType="provider" loadSuggestion={true} address={this.state.destination} />
|
||||||
|
{/* <div className="divider" /> */}
|
||||||
|
</form>
|
||||||
|
{this.renderStepActions(1, this)}
|
||||||
|
</StepContent>
|
||||||
|
</Step>
|
||||||
|
<Step>
|
||||||
|
<StepButton onClick={() => this.setState({ stepIndex: 1 })}>
|
||||||
Member
|
Member
|
||||||
</StepButton>
|
</StepButton>
|
||||||
<StepContent>
|
<StepContent>
|
||||||
@@ -1113,21 +1125,6 @@ class VerticalNonLinear extends React.Component {
|
|||||||
{this.renderStepActions(0, this)}
|
{this.renderStepActions(0, this)}
|
||||||
</StepContent>
|
</StepContent>
|
||||||
</Step>
|
</Step>
|
||||||
|
|
||||||
<Step>
|
|
||||||
<StepButton onClick={() => this.setState({ stepIndex: 1 })}>
|
|
||||||
Provider
|
|
||||||
</StepButton>
|
|
||||||
<StepContent>
|
|
||||||
<form role="form">
|
|
||||||
<NEMTLocation type="flat" data={this.state} title={"Provider"} value={""} buttonvalue={this.state.buttonProviderText} onPlaceChanged={(provider) => this.handleProviderChanged(provider, this)} fontSize={12} locationType="provider" loadSuggestion={true} address={this.state.destination} />
|
|
||||||
{/* <div className="divider" /> */}
|
|
||||||
</form>
|
|
||||||
{this.renderStepActions(1, this)}
|
|
||||||
</StepContent>
|
|
||||||
</Step>
|
|
||||||
|
|
||||||
|
|
||||||
<Step>
|
<Step>
|
||||||
<StepButton onClick={() => this.setState({ stepIndex: 2 })}>
|
<StepButton onClick={() => this.setState({ stepIndex: 2 })}>
|
||||||
Visit Details
|
Visit Details
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ import Toggle from 'material-ui/Toggle';
|
|||||||
import Snackbar from 'material-ui/Snackbar';
|
import Snackbar from 'material-ui/Snackbar';
|
||||||
import Instance from '../../../components/Connection';
|
import Instance from '../../../components/Connection';
|
||||||
|
|
||||||
|
import ValidationErrorsInfoDialog from '../../../components/Shared/ValidationErrorsInfoDialog';
|
||||||
|
|
||||||
class SignUp extends React.Component {
|
class SignUp extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
@@ -54,8 +56,7 @@ class SignUp extends React.Component {
|
|||||||
this.clickEvent = this.clickEvent.bind(this);
|
this.clickEvent = this.clickEvent.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount = () => {
|
componentDidMount = () => { }
|
||||||
}
|
|
||||||
|
|
||||||
buttonValidated = () => {
|
buttonValidated = () => {
|
||||||
let validated = true;
|
let validated = true;
|
||||||
@@ -128,7 +129,7 @@ class SignUp extends React.Component {
|
|||||||
"pass": this.state.pass,
|
"pass": this.state.pass,
|
||||||
};
|
};
|
||||||
|
|
||||||
Instance.getRawConn().post('/v1/selfregister/', user).then(function (res) {
|
Instance.setToken(null).post('/v1/selfregister/', user).then(function (res) {
|
||||||
localStorage.removeItem('loggedUser');
|
localStorage.removeItem('loggedUser');
|
||||||
location.href = '/#/login';
|
location.href = '/#/login';
|
||||||
}).catch(function (err) {
|
}).catch(function (err) {
|
||||||
@@ -145,29 +146,13 @@ class SignUp extends React.Component {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleDismiss() {
|
handleValidationErrosDialogDismiss() {
|
||||||
this.setState(Object.assign(this.state, { showErrorMessage: false }));
|
this.setState(Object.assign(this.state, {
|
||||||
|
showValidationErrors: false
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let validationErrors = null;
|
|
||||||
if (this.state.showValidationErrors) {
|
|
||||||
validationErrors = (
|
|
||||||
<ul>
|
|
||||||
{this.state.validationErrors.map(errorMessage => {
|
|
||||||
const oneValidationMessage = (<li>{errorMessage.message}</li>);
|
|
||||||
const oneValidationMessageWithTab = (<span><li style={{ marginLeft: 2 + "em" }}>{errorMessage.message}</li></span>);
|
|
||||||
|
|
||||||
if (errorMessage.field_name === "password-tab") {
|
|
||||||
return oneValidationMessageWithTab;
|
|
||||||
} else {
|
|
||||||
return oneValidationMessage;
|
|
||||||
}
|
|
||||||
})}
|
|
||||||
</ul>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="body-inner">
|
<div className="body-inner">
|
||||||
|
|
||||||
@@ -246,10 +231,7 @@ class SignUp extends React.Component {
|
|||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<p className="text-small">By clicking on sign up, you agree to <a href="javascript:;"><i>terms</i></a> and <a href="javascript:;"><i>privacy policy</i></a></p>
|
<p className="text-small">By clicking on sign up, you agree to <a href="javascript:;"><i>terms</i></a> and <a href="javascript:;"><i>privacy policy</i></a></p>
|
||||||
</div>
|
</div>
|
||||||
<div className="divider" />
|
<ValidationErrorsInfoDialog open={this.state.showValidationErrors} errorMessages={this.state.validationErrors} onDismiss={this.handleValidationErrosDialogDismiss.bind(this)} />
|
||||||
<div className="form-group">
|
|
||||||
{validationErrors}
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const normalizeRoles = (profiles) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (roleKeys.length === 1) {
|
if (roleKeys.length === 1) {
|
||||||
return profiles[roleKeys[0]].authorize;
|
return profiles[roleKeys[0]].roles;
|
||||||
}
|
}
|
||||||
|
|
||||||
const roles = profiles.reduce((result, profile) => {
|
const roles = profiles.reduce((result, profile) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user