forked from E-Health/fred
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathselectView.tsx
64 lines (60 loc) · 2.89 KB
/
selectView.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import {BaseCard} from"./baseCard";
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import {faCaretRight, faInfoCircle} from '@fortawesome/pro-solid-svg-icons';
import State from "../state";
import { Container, Row, Col } from "react-bootstrap";
import friendlyNames from "../../friendly-names.json";
const SelectView = () => {
return (
<div style={{marginTop:"50px", paddingRight:"12px"}}>
<div className="row">
<h3 className="col-lg-10 col-md-9" style={{color:"#2a6b92"}}><b>Make a Card</b></h3>
<button className="navigate col-lg-2 col-md-3"
onClick={() => State.get().set("ui", {status:"collection"})}>
Saved Cards <FontAwesomeIcon icon={faCaretRight} />
</button>
</div>
<div className="box">
<Container fluid="lg">
<Row lg="4" md="3" sm="2" noGutters>
{
friendlyNames.RESOURCES.map(
(resourceType) => {
const isActivity = resourceType.SELF.FHIR == 'ActivityDefinition';
return resourceType.LIST.map(
(resource, i) => {
return (
<div style={{padding: "10px"}} key={resource.FHIR}>
<Col>
<BaseCard
bsBg="sage-white"
bsText="sage-blue"
bsBorder={isActivity ? "activitydefinition" : "questionnaire"}
header={resourceType.SELF.FRIENDLY}
title={resource.FRIENDLY}
content={
<span style={{fontSize:"20px", textAlign:"right"}}>
<a href={resource.PROFILE_URI} target="_blank" rel="noreferrer" className="c-tooltip">
<FontAwesomeIcon icon={faInfoCircle} />
<span className="c-tooltiptext">FHIR Docs</span>
</a>
</span>
}
wait={i*25}
clickable={true}
profile={resource.PROFILE_URI}
/>
</Col>
</div>);
}
);
}
)
}
</Row>
</Container>
</div>
</div>
);
}
export default SelectView