-
Notifications
You must be signed in to change notification settings - Fork 249
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
cd9e20e
commit aef6a3e
Showing
10 changed files
with
38 additions
and
38 deletions.
There are no files selected for viewing
22 changes: 12 additions & 10 deletions
22
packages/esm-patient-chart-app/src/visit/visit-dialog.component.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 |
---|---|---|
@@ -1,18 +1,20 @@ | ||
import React from 'react'; | ||
import StartVisit from './visit-prompt/start-visit.component'; | ||
import EndVisit from './visit-prompt/end-visit.component'; | ||
import CancelVisit from './visit-prompt/cancel-visit.component'; | ||
import StartVisitDialog from './visit-prompt/start-visit-dialog.component'; | ||
import EndVisitDialog from './visit-prompt/end-visit-dialog.component'; | ||
import CancelVisitDialog from './visit-prompt/cancel-visit-dialog.component'; | ||
import { useVisitDialog } from './useVisitDialog'; | ||
|
||
interface VisitDialogProps { | ||
patientUuid: string; | ||
} | ||
|
||
const VisitDialog: React.FC<VisitDialogProps> = ({ patientUuid }) => ( | ||
<> | ||
<StartVisit patientUuid={patientUuid} /> | ||
<EndVisit patientUuid={patientUuid} /> | ||
<CancelVisit patientUuid={patientUuid} /> | ||
</> | ||
); | ||
const VisitDialog: React.FC<VisitDialogProps> = ({ patientUuid }) => { | ||
const { type } = useVisitDialog(patientUuid); | ||
|
||
if (type === 'cancel') return <CancelVisitDialog patientUuid={patientUuid} />; | ||
if (type === 'end') return <EndVisitDialog patientUuid={patientUuid} />; | ||
if (type === 'prompt') return <StartVisitDialog patientUuid={patientUuid} />; | ||
return null; | ||
}; | ||
|
||
export default VisitDialog; |
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
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
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