Skip to content

Commit

Permalink
Remove FAQs page and update Archived and Documents pages: SITE-4129-3…
Browse files Browse the repository at this point in the history
…0-31 (#132)

* Update Archived page to include FAQs and videos and Documents to have GitHub links

* Add text - Repositories to Github link

* Change formatting on documents page to use cards instead of links

* Fix lint errors and warnings

* Move archive menu under resources and remove helpful links section

* add mail icon to Contact Us link

* add text to github repo cards

* add mail icon to Contact Us link on archived page

* fix position of GO button on doc cards

* add mail icon to questions link on fab

* update header text on Documents and Archived pages

* ui: update contact us icon on communcation FAB

* ui: update contact us icon on documentation page and replace bannerbox with typography

* ui: change width of DocsCard componet

* ui: update format for archive home page

* ui: add border & padding to VideoItem. Took out file for now

* ui: make SubMenu sticky and format icon to a better position

* remove use client directive from site nav resources file

---------

Co-authored-by: Ashwini More <[email protected]>
Co-authored-by: Matthew Stankiewicz <[email protected]>
  • Loading branch information
3 people authored Sep 24, 2024
1 parent 2c0465a commit 3387d8b
Show file tree
Hide file tree
Showing 22 changed files with 492 additions and 568 deletions.
File renamed without changes.
12 changes: 0 additions & 12 deletions src/app/(resources)/faqs/page.tsx

This file was deleted.

8 changes: 0 additions & 8 deletions src/components/archived/ArchiveCard.cy.tsx

This file was deleted.

71 changes: 49 additions & 22 deletions src/components/archived/ArchiveCard.tsx
Original file line number Diff line number Diff line change
@@ -1,36 +1,63 @@
import * as React from 'react'
import Card from '@mui/material/Card'
import CardContent from '@mui/material/CardContent'
import Typography from '@mui/material/Typography'
import { Button, CardActions } from '@mui/material'
import ArrowForwardIcon from '@mui/icons-material/ArrowForward'
import Divider from '@mui/material/Divider'
import { CardHeader, CardContent, List, ListItem, ListItemText, Box } from '@mui/material'
export interface QAItem {
question: string
answer: string
}

export interface CriteriaCardProps {
cardHeader: string
description: string
interface FAQCardProps {
header: string
items: QAItem[]
}
const ArchiveCard = ({ cardHeader, description }: CriteriaCardProps) => {

const ArchiveCard = ({ header, items }: FAQCardProps) => {
return (
<Card
sx={{
width: '250px',
borderTop: '16px solid #E8E8E8',
width: '100%',
borderRadius: '8px',
}}
id="category"
>
<CardContent sx={{ pt: 2, pb: 3, pl: 3, pr: 3 }}>
<Typography variant="h6" component="h3" color="default" sx={{ mb: 1 }}>
<strong>{cardHeader}</strong>
</Typography>
<Typography variant="body1" sx={{ fontSize: '0.75rem' }}>
{description}
</Typography>
<CardHeader titleTypographyProps={{ fontWeight: 700 }} title={header} />
<Divider />
<CardContent>
<List disablePadding>
{items.map((item, index) => (
<React.Fragment key={index}>
<ListItem alignItems="flex-start" sx={{ pb: 1, px: 0 }}>
<ListItemText>
<Box display={'flex'} gap={1} flexDirection={'row'}>
<Typography fontWeight={'600'} variant="h6" gutterBottom>
Q:
</Typography>
<Typography fontWeight={'600'} variant="h6" gutterBottom>
{item.question}
</Typography>
</Box>
<Box display={'flex'} gap={1} flexDirection={'row'}>
<Typography variant="body2" gutterBottom>
A:
</Typography>
<Typography variant="body2">
{item.answer.split('\n').map((i, key) => {
return (
<span key={key}>
{i}
<br />
</span>
)
})}
</Typography>
</Box>
</ListItemText>
</ListItem>
</React.Fragment>
))}
</List>
</CardContent>
<CardActions>
<Button size="small" variant="text" color="secondary" endIcon={<ArrowForwardIcon />}>
Go
</Button>
</CardActions>
</Card>
)
}
Expand Down
233 changes: 150 additions & 83 deletions src/components/archived/ArchiveHome.tsx
Original file line number Diff line number Diff line change
@@ -1,113 +1,180 @@
'use client'
// MUI Imports
import { Box, Container, Link } from '@mui/material'
import BannerBox from '../shared/BannerBox'
// Global Imports
// Styles
import { Card, CardContent, CardHeader, Container, Typography, Link, Divider } from '@mui/material'
import Box from '@mui/material/Box'
import BannerBox from '@shared/BannerBox'
import SubMenu, { menuProps } from '@/components/shared/SubMenu'
import palette from '@/styles/palette'
import ArchiveCard from './ArchiveCard'
import ArchiveFilter from './ArchiveFilter'
// Images
import FAQCard from './ArchiveCard'
import faq from './data/FAQ.json'
import VideoItem from '../resources/VideoItem'
import ForwardToInboxOutlinedIcon from '@mui/icons-material/ForwardToInboxOutlined'

const ArchiveHome = () => {
export default function ArchiveHome() {
const menuItems: menuProps[] = [
{ heading: 'All', href: '' },
{ heading: 'C-CDA', href: '' },
{ heading: 'Direct', href: '' },
{ heading: 'Edge', href: '' },
{ heading: 'XDM', href: '' },
{ heading: 'Other', href: '' },
{ heading: 'Contact Us', href: '' },
{ heading: 'Overview', href: '#overview' },
{ heading: 'FAQs', href: '#faq' },
{ heading: 'C-CDA', href: '#ccda' },
{ heading: 'Direct', href: '#direct' },
{ heading: 'XDM', href: '#xdm' },
{ heading: 'XDR', href: '#xdr' },
{ heading: 'SMTP', href: '#smtp' },
{ heading: 'Other', href: '#other' },
{ heading: 'Videos', href: '#videos' },
{
heading: 'Contact Us',
href: 'mailto:[email protected]',
icon: <ForwardToInboxOutlinedIcon color="primary" fontSize="small" />,
},
]

function trackMenuItemClick(heading: string) {
if (typeof window.gtag === 'function') {
window.gtag('event', 'Click archive sub menu', {
window.gtag('event', 'Click FAQs sub menu', {
event_category: 'Navigation',
event_label: heading,
})
}
}

return (
<Box>
{/* Global Header */}
<div>
<BannerBox
breadcrumbs={
<Link color={palette.secondary} href={'/archived'}>
Archived
</Link>
}
heading={'Archived tools, files and other additional content'}
isTourButton={false}
description={
<>
Unearth a treasure trove of archived resources including tools, files, and more! Please be aware that these
materials are no longer actively maintained. Despite this, they offer valuable insights and historical
context. Dive into our curated collection to explore and discover valuable resources for your projects and
endeavors!
</>
'This section contains archived materials, including FAQs and videos. While these items are no longer actively maintained, they may provide useful insights and historical context. Feel free to explore the collection for reference and background information.'
}
/>
<Container>
<Box pt={4} pb={4} display={'flex'} flexDirection={'row'} gap={4}>
<Box display={'flex'} flexDirection={'column'} gap={4}>
<SubMenu onClick={trackMenuItemClick} menuItems={menuItems} />
<ArchiveFilter />
</Box>
<Box gap={4} display={'flex'} flexDirection={'row'} flexWrap={'wrap'}>
<ArchiveCard
cardHeader="Cures Update"
description={
'HL7® CDA R2 Implementation Guide: C-CDA Templates for Clinical Notes R2.1 Companion Guide, Release 2-US Realm, Oct 2021 (with errata)'
}
/>
<ArchiveCard
cardHeader="Cures Update"
description={
'HL7® CDA R2 Implementation Guide: C-CDA Templates for Clinical Notes R2.1 Companion Guide, Release 2-US Realm, Oct 2021 (with errata)'
}
/>
<ArchiveCard
cardHeader="USCDI v2"
description={
'HL7® CDA R2 Implementation Guide: C-CDA Templates for Clinical Notes R2.1 Companion Guide, Release 3-US Realm, May 2022'
}
/>
<ArchiveCard
cardHeader="USCDI v2"
description={
'HL7® CDA R2 Implementation Guide: C-CDA Templates for Clinical Notes R2.1 Companion Guide, Release 3-US Realm, May 2022'
}
/>
<ArchiveCard
cardHeader="Cures Update"
description={
'HL7® CDA R2 Implementation Guide: C-CDA Templates for Clinical Notes R2.1 Companion Guide, Release 2-US Realm, Oct 2021 (with errata)'
}
/>
<ArchiveCard
cardHeader="Cures Update"
description={
'HL7® CDA R2 Implementation Guide: C-CDA Templates for Clinical Notes R2.1 Companion Guide, Release 2-US Realm, Oct 2021 (with errata)'
}
/>
<ArchiveCard
cardHeader="USCDI v2"
description={
'HL7® CDA R2 Implementation Guide: C-CDA Templates for Clinical Notes R2.1 Companion Guide, Release 3-US Realm, May 2022'
}
/>
<ArchiveCard
cardHeader="USCDI v2"
description={
'HL7® CDA R2 Implementation Guide: C-CDA Templates for Clinical Notes R2.1 Companion Guide, Release 3-US Realm, May 2022'
}
/>
<Box pt={4} pb={4} gap={4} display={'flex'} flexDirection={'row'}>
<SubMenu onClick={trackMenuItemClick} menuItems={menuItems} />
<Box gap={4} display={'flex'} flexDirection={'column'}>
<Box>
<Box id="faq">
<Card>
<CardHeader
titleTypographyProps={{ fontWeight: 700 }}
title="Frequently Asked Questions"
subheader="Historical questions & answers"
subheaderTypographyProps={{ style: { marginTop: 0, color: '#333' } }}
/>
<Divider />
<CardContent>
<Typography variant="body2">
The Frequently Asked Questions (FAQ) section of the SITE website compiles questions and inquiries
we have received in the past. You can search for answers by SITE&apos;s features and
functionality.
</Typography>
</CardContent>
</Card>
</Box>
</Box>
<Box id="overview">
<FAQCard header={'SITE Overview'} items={faq.Overview} />
</Box>
<Box id="ccda">
<FAQCard header={'Consolidated Clinical Document Architecture (C-CDA) FAQs'} items={faq['C-CDA']} />
</Box>
<Box id="direct">
<FAQCard header={'Direct Project Tooling FAQs'} items={faq.Direct} />
</Box>
<Box id="xdm">
<FAQCard header={'XDM FAQs'} items={faq.XDM} />
</Box>
<Box id="xdr">
<FAQCard header={'XDR FAQs'} items={faq.XDR} />
</Box>
<Box id="smtp">
<FAQCard header={'SMTP/POP/IMAP FAQs'} items={faq.SMTP} />
</Box>
<Box id="other">
<FAQCard header={'Other FAQs & Helpful Items'} items={faq.Other} />
<Box id="videos" sx={{ my: 4 }}>
<Card>
<CardHeader
titleTypographyProps={{ fontWeight: 700, variant: 'h2', sx: { textAlign: 'left' } }}
title="Videos"
subheader="For those who prefer visual learning, our video collection offers an engaging way to absorb information"
/>
<Divider />
<Box
sx={{
display: 'grid',
gridTemplateColumns: 'repeat(2, 1fr)',
}}
>
<VideoItem
fileName="Intro_To_ETT.mp4"
fileDate="2016-12-12"
fileUrl="https://github.com/onc-healthit/ett/blob/resources/documentation/training/nist-training-videos/Intro_To_ETT.mp4"
showFileType
/>
<VideoItem
fileName="MDHT.mp4"
fileDate="2016-12-12"
fileUrl="https://github.com/onc-healthit/ett/blob/resources/documentation/training/nist-training-videos/MDHT.mp4"
showFileType
/>
<VideoItem
fileName="XDM_Validation.mp4"
fileDate="2016-12-12"
fileUrl="https://github.com/onc-healthit/ett/blob/resources/documentation/training/nist-training-videos/XDM_Validation.mp4"
showFileType
/>
<VideoItem
fileName="Receiver Tests SMTP.mp4"
fileDate="2016-12-12"
fileUrl="https://github.com/onc-healthit/ett/blob/resources/documentation/training/nist-training-videos/Receiver%20Tests%20SMTP.mp4"
showFileType
/>
<VideoItem
fileName="XDR_EDGE_RECEIVER.mp4"
fileDate="2016-12-12"
fileUrl="https://github.com/onc-healthit/ett/blob/resources/documentation/training/nist-training-videos/XDR_EDGE_RECEIVER.mp4"
showFileType
/>
<VideoItem
fileName="XDR_EDGE_SENDER.mp4"
fileDate="2016-12-12"
fileUrl="https://github.com/onc-healthit/ett/blob/resources/documentation/training/nist-training-videos/XDR_EDGE_SENDER.mp4"
showFileType
/>

<VideoItem
fileName="XDR_Validation.mp4"
fileDate="2016-12-12"
fileUrl="https://github.com/onc-healthit/ett/blob/resources/documentation/training/nist-training-videos/XDR_Validation.mp4"
showFileType
/>
<VideoItem
fileName="readme.txt"
fileDate="2016-12-12"
fileUrl="https://github.com/onc-healthit/ett/blob/resources/documentation/training/nist-training-videos/readme.txt"
showFileType
/>
<VideoItem
fileName="Update readme.txt"
fileDate="2016-12-12"
fileUrl="https://github.com/onc-healthit/ett/commit/b7f3e765747720b2d6a9b918e7137dd9ba5eeb3c"
showFileType
/>
<VideoItem
fileName="video_demos.html"
fileDate="2016-12-12"
fileUrl="https://github.com/onc-healthit/ett/blob/resources/documentation/training/nist-training-videos/video_demos.html"
showFileType
/>
</Box>
</Card>
</Box>
</Box>
</Box>
</Box>
</Container>
</Box>
</div>
)
}

export default ArchiveHome
Loading

0 comments on commit 3387d8b

Please sign in to comment.