-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63afa3b
commit c5dfb97
Showing
20 changed files
with
569 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ [email protected] | |
clinical:[email protected] | ||
clinical:[email protected] | ||
clinical:[email protected] | ||
clinical:hl7-fhir-data-infrastructure@6.28.2 | ||
clinical:hl7-fhir-data-infrastructure@6.33.0 | ||
clinical:[email protected] | ||
[email protected] | ||
[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,9 +46,9 @@ littledata:synced-cron | |
clinical:[email protected] | ||
clinical:[email protected] | ||
clinical:[email protected] | ||
clinical:hl7-fhir-data-infrastructure@6.28.2 | ||
clinical:hl7-fhir-data-infrastructure@6.33.0 | ||
clinical:json-routes | ||
# clinical:vault-server | ||
clinical:vault-server | ||
clinical:uscore | ||
|
||
# TESTING | ||
|
@@ -64,5 +64,10 @@ clinical:uscore | |
# omega:meteor-desktop-bundler@=2.2.5 | ||
|
||
symptomatic:data-importer | ||
mitre:flightsuit | ||
symptomatic:data-relay | ||
symptomatic:timelines | ||
mitre:flightsuit | ||
mitre:consent-engine | ||
mitre:space-health-registry | ||
mitre:deqm-report-generator | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
import React, { useState } from 'react'; | ||
|
||
import { Button, Grid, CardHeader, CardContent, Typography } from '@material-ui/core'; | ||
import { StyledCard, PageCanvas } from 'fhir-starter'; | ||
|
||
|
||
import PropTypes from 'prop-types'; | ||
|
||
|
||
|
||
export function NoDataWrapper(props){ | ||
|
||
let { | ||
children, | ||
dataCount, | ||
title, | ||
subheader, | ||
noDataImagePath, | ||
buttonLabel, | ||
marginTop, | ||
redirectPath, | ||
...otherProps | ||
} = props; | ||
|
||
// Meteor.absoluteUrl() + noDataImage | ||
|
||
function handleOpenPage(){ | ||
if(redirectPath){ | ||
props.history.replace(redirectPath); | ||
} else { | ||
props.history.replace("/"); | ||
} | ||
} | ||
|
||
let dataManagementElements; | ||
if(dataCount > 0){ | ||
dataManagementElements = children; | ||
} else { | ||
let noDataImageElement; | ||
if(noDataImagePath){ | ||
noDataImageElement = <img src={noDataImagePath} style={{width: '100%', marginTop: marginTop}} />; | ||
} | ||
dataManagementElements = <Grid justify="center" container spacing={8} style={{marginTop: '0px', marginBottom: '80px'}}> | ||
<Grid item md={6}> | ||
<CardHeader title={title} subheader={subheader} /> | ||
{ noDataImageElement } | ||
<CardContent> | ||
<Button | ||
fullWidth | ||
variant="contained" | ||
color="primary" | ||
onClick={handleOpenPage.bind(this)} | ||
>{buttonLabel}</Button> | ||
|
||
</CardContent> | ||
</Grid> | ||
</Grid> | ||
} | ||
|
||
return(dataManagementElements); | ||
} | ||
|
||
|
||
|
||
NoDataWrapper.propTypes = { | ||
dataCount: PropTypes.number, | ||
title: PropTypes.string, | ||
subheader: PropTypes.string, | ||
buttonLabel: PropTypes.string, | ||
noDataImagePath: PropTypes.string, | ||
marginTop: PropTypes.string, | ||
redirectPath: PropTypes.string | ||
}; | ||
|
||
NoDataWrapper.defaultProps = { | ||
dataCount: 0, | ||
title: "No Data", | ||
subheader: "Click the button to begin importing data.", | ||
buttonLabel: "Import Data", | ||
noDataImagePath: "NoData.png", | ||
marginTop: "0px", | ||
redirectPath: "/import-data" | ||
} | ||
|
||
export default NoDataWrapper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
import React, { useState } from 'react'; | ||
|
||
import { Button, Grid, CardHeader, CardContent, Typography } from '@material-ui/core'; | ||
import { StyledCard, PageCanvas } from 'fhir-starter'; | ||
|
||
import { ReactMeteorData, useTracker } from 'meteor/react-meteor-data'; | ||
import PropTypes from 'prop-types'; | ||
|
||
|
||
|
||
export function NotSignedInWrapper(props){ | ||
|
||
let { | ||
children, | ||
dataCount, | ||
title, | ||
subheader, | ||
notSignedInImagePath, | ||
buttonLabel, | ||
marginTop, | ||
redirectPath, | ||
...otherProps | ||
} = props; | ||
|
||
// Meteor.absoluteUrl() + noDataImage | ||
|
||
let currentUser = null; | ||
currentUser = useTracker(function(){ | ||
return Session.get("currentUser"); | ||
}, []); | ||
|
||
function handleOpenPage(){ | ||
if(redirectPath){ | ||
props.history.replace(redirectPath); | ||
} else { | ||
props.history.replace("/"); | ||
} | ||
} | ||
|
||
function toggleLoginDialog(){ | ||
// console.log('Toggle login dialog open/close.') | ||
Session.set('mainAppDialogJson', false); | ||
Session.set('mainAppDialogMaxWidth', "sm"); | ||
|
||
if(Session.get('currentUser')){ | ||
Session.set('mainAppDialogTitle', "Logout"); | ||
Session.set('mainAppDialogComponent', "LogoutDialog"); | ||
} else { | ||
Session.set('mainAppDialogTitle', "Login"); | ||
Session.set('mainAppDialogComponent', "LoginDialog"); | ||
} | ||
|
||
Session.toggle('mainAppDialogOpen'); | ||
} | ||
|
||
let dataManagementElements; | ||
if(currentUser){ | ||
dataManagementElements = children; | ||
} else { | ||
let noUserMessageElement; | ||
if(notSignedInImagePath){ | ||
noUserMessageElement = <img src={notSignedInImagePath} style={{width: '100%', marginTop: marginTop}} />; | ||
} | ||
dataManagementElements = <Grid justify="center" container spacing={8} style={{marginTop: '0px', marginBottom: '80px'}}> | ||
<Grid item md={6}> | ||
<CardHeader title={title} subheader={subheader} /> | ||
{ noUserMessageElement } | ||
<CardContent> | ||
<Button | ||
fullWidth | ||
variant="contained" | ||
color="primary" | ||
onClick={toggleLoginDialog.bind(this)} | ||
>{buttonLabel}</Button> | ||
|
||
</CardContent> | ||
</Grid> | ||
</Grid> | ||
} | ||
|
||
return(dataManagementElements); | ||
} | ||
|
||
|
||
|
||
NotSignedInWrapper.propTypes = { | ||
dataCount: PropTypes.number, | ||
title: PropTypes.string, | ||
subheader: PropTypes.string, | ||
buttonLabel: PropTypes.string, | ||
notSignedInImagePath: PropTypes.string, | ||
marginTop: PropTypes.string, | ||
redirectPath: PropTypes.string | ||
}; | ||
|
||
NotSignedInWrapper.defaultProps = { | ||
dataCount: 0, | ||
title: "Not Signed In", | ||
subheader: "Lets get started.", | ||
buttonLabel: "Sign In", | ||
notSignedInImagePath: "", | ||
marginTop: "0px", | ||
redirectPath: "/import-data" | ||
} | ||
|
||
export default NotSignedInWrapper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.