feat(GoogleCloud): Initial commits to include the Healthcare API Adapter (#584)

* This is a React port of https://github.com/quantumsoftgroup/healthcare-api-adapter - It still needs some UI cleanup.
This commit is contained in:
Egor Lezhnin authored and Erik Ziegler committed 2019-07-10 09:26:19 +02:00
1 parent 4095629310
commit 4a09f33446
26 files changed
+1451 -46

No files matched your search

+56
View File
@@ -0,0 +1,56 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import './googleCloud.css';
export default class LocationsList extends Component {
constructor(props) {
super(props);
this.state = {
search: '',
};
}
static propTypes = {
locations: PropTypes.array,
loading: PropTypes.bool,
error: PropTypes.string,
onSelect: PropTypes.func,
};
static defaultProps = {};
renderTableRow(location) {
return (
<tr
key={location.locationId}
className={
this.state.highlightedItem === location.locationId
? 'studylistStudy noselect active'
: 'studylistStudy noselect'
}
onMouseEnter={() => {
this.onHighlightItem(location.locationId);
}}
onClick={() => {
this.props.onSelect(location);
}}
>
<td>{location.name.split('/')[3]}</td>
</tr>
);
}
onHighlightItem(locationId) {
this.setState({ highlightedItem: locationId });
}
render() {
return (
<table id="tblLocationList" className="studyListToolbar table noselect">
<tbody id="LocationList">
{this.props.locations.map(project => {
return this.renderTableRow(project);
})}
</tbody>
</table>
);
}
}