-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⛲ feat Users can search a drug name listing clients that take that drug
- Loading branch information
Showing
4 changed files
with
87 additions
and
34 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
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,34 @@ | ||
import Table from 'react-bootstrap/Table'; | ||
import React from 'reactn'; | ||
import {randomString} from 'utility/common'; | ||
|
||
interface IProps { | ||
lookupList: {Drug: string; LastName: string; FirstName: string}[]; | ||
} | ||
|
||
const RxLookupGrid = (props: IProps) => { | ||
const lookupList = props.lookupList; | ||
|
||
return ( | ||
<Table bordered size="sm" striped> | ||
<tr> | ||
<th>Client</th> | ||
<th>Drug</th> | ||
</tr> | ||
<tbody> | ||
{lookupList.map((rxItem, index) => { | ||
const key = index || randomString(); | ||
|
||
return ( | ||
<tr id={key.toString()} key={`rx-lookup-grid-${key}`}> | ||
<td>{rxItem.FirstName.trim() + ' ' + rxItem.LastName.trim()}</td> | ||
<td>{rxItem.Drug}</td> | ||
</tr> | ||
); | ||
})} | ||
</tbody> | ||
</Table> | ||
); | ||
}; | ||
|
||
export default RxLookupGrid; |
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