Skip to content

Commit

Permalink
updated modal
Browse files Browse the repository at this point in the history
  • Loading branch information
F-sh2019 committed Jan 4, 2025
1 parent ba5d12e commit bc994ca
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/components/Modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ const Modal = ({ isOpen, onClose, record }) => {
X
</button>
<h2 style={h2Style}>Medication Details</h2>

<p style={pStyle}>
{Object.entries(record)
.filter(([key]) => key.toUpperCase() !== '__V' && key.toUpperCase() !== 'CREATEDBY') // Exclude unwanted keys
.map(([key, value]) => (
<p style={pStyle} key={key}>
<strong>{key}:</strong> {value}
</p>
))}
{/* <p style={pStyle}>
<strong>name:</strong> {record.name}
</p>
<p style={pStyle}>
Expand All @@ -32,7 +38,7 @@ const Modal = ({ isOpen, onClose, record }) => {
</p>
<p style={pStyle}>
<strong>ndcNumber:</strong> {record.ndcNumber}
</p>
</p> */}
</div>
</div>
);
Expand Down Expand Up @@ -74,15 +80,15 @@ const pStyle = {
fontSize: 14,
fontWeight: 'bold',
textAlign: 'left',
lineHeight: 1.5,
padding: '10px',
lineHeight: 1,
padding: '8px',
margin: '20px',
textTransform: 'uppercase',
};

const h2Style = {
alignItems: 'center',
padding: '20px',
padding: '0px',
margin: '40px',
color: 'blue',
};
Expand Down

0 comments on commit bc994ca

Please sign in to comment.