-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a provider report pdf component.
- Loading branch information
Showing
9 changed files
with
877 additions
and
30 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
3 changes: 3 additions & 0 deletions
3
src/components/asthma/components/AsthmaProviderReport/AsthmaProviderReport.css
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,3 @@ | ||
.mdhui-asthma-provider-report { | ||
padding: 16px; | ||
} |
22 changes: 22 additions & 0 deletions
22
src/components/asthma/components/AsthmaProviderReport/AsthmaProviderReport.previewData.ts
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,22 @@ | ||
import { AsthmaLogEntry, AsthmaParticipant } from '../../model'; | ||
import { DeviceDataPoint, SurveyAnswer } from '@careevolution/mydatahelps-js'; | ||
|
||
export type AsthmaProviderReportPreviewState = 'default'; | ||
|
||
export interface AsthmaProviderReportPreviewData { | ||
participant: AsthmaParticipant; | ||
logEntries: AsthmaLogEntry[]; | ||
surveyAnswers: SurveyAnswer[]; | ||
airQualityDataPoints: DeviceDataPoint[]; | ||
} | ||
|
||
export const previewData: Record<AsthmaProviderReportPreviewState, AsthmaProviderReportPreviewData> = { | ||
'default': { | ||
participant: { | ||
getFirstName: () => 'Leroy' | ||
} as AsthmaParticipant, | ||
logEntries: [], | ||
surveyAnswers: [], | ||
airQualityDataPoints: [] | ||
} | ||
}; |
39 changes: 39 additions & 0 deletions
39
src/components/asthma/components/AsthmaProviderReport/AsthmaProviderReport.stories.tsx
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,39 @@ | ||
import React from 'react'; | ||
import AsthmaProviderReport, { AsthmaProviderReportProps } from './AsthmaProviderReport'; | ||
import { Layout } from '../../../presentational'; | ||
|
||
export default { | ||
title: 'Asthma/Components/AsthmaProviderReport', | ||
component: AsthmaProviderReport, | ||
parameters: {layout: 'fullscreen'} | ||
}; | ||
|
||
interface AsthmaProviderReportStoryArgs extends AsthmaProviderReportProps { | ||
colorScheme: 'auto' | 'light' | 'dark'; | ||
} | ||
|
||
const render = (args: AsthmaProviderReportStoryArgs) => { | ||
return <Layout colorScheme={args.colorScheme}> | ||
<AsthmaProviderReport {...args} logTodayEntrySurveyName="Log Symptoms - Today"/> | ||
</Layout>; | ||
}; | ||
|
||
export const Default = { | ||
args: { | ||
colorScheme: 'auto', | ||
previewState: 'default' | ||
}, | ||
argTypes: { | ||
colorScheme: { | ||
name: 'color scheme', | ||
control: 'radio', | ||
options: ['auto', 'light', 'dark'] | ||
}, | ||
previewState: { | ||
name: 'state', | ||
control: 'radio', | ||
options: ['loading', 'default', 'live'] | ||
} | ||
}, | ||
render: render | ||
}; |
366 changes: 366 additions & 0 deletions
366
src/components/asthma/components/AsthmaProviderReport/AsthmaProviderReport.tsx
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
src/components/asthma/components/AsthmaProviderReport/index.ts
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,2 @@ | ||
export { default } from './AsthmaProviderReport'; | ||
export { AsthmaProviderReportPreviewState } from './AsthmaProviderReport.previewData'; |
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