Skip to content

Commit

Permalink
Merge pull request #845 from coronasafe/develop
Browse files Browse the repository at this point in the history
Enable discharge summary for discharged patients
  • Loading branch information
bodhish authored Oct 27, 2020
2 parents 9217dd4 + 5cd7992 commit 1a111a4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/Components/Common/OnlineDoctorsSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ export const OnlineDoctorsSelect = (props: any) => {
</span>
</button>
</span>
{isExpanded && <div className="absolute mt-1 w-full rounded-md bg-white shadow-lg z-40">
<ul role="listbox" aria-labelledby="listbox-label" aria-activedescendant="listbox-item-3" className="max-h-60 rounded-md py-1 text-base leading-6 shadow-xs overflow-auto focus:outline-none sm:text-sm sm:leading-5">
{isExpanded &&
<div role="listbox" aria-labelledby="listbox-label" aria-activedescendant="listbox-item-3" className="multiselect-dropdown__search-dropdown w-full absolute border border-gray-400 bg-white mt-1 rounded-lg shadow-lg px-4 py-2 z-50">
{
state.users.map((user: any) => {
return <li onClick={_ => { setIsExpanded(false); onSelect(user.id) }} id="listbox-item-0" role="option" className="text-gray-900 cursor-default select-none relative py-2 pl-3 pr-9">
return <button onClick={_ => { setIsExpanded(false); onSelect(user.id) }} id="listbox-item-0" role="option" className="flex text-xs py-1 items-center w-full hover:bg-gray-200 focus:outline-none focus:bg-gray-200">
<div className="flex items-center space-x-3">
<span aria-label="Online" className={"flex-shrink-0 inline-block h-2 w-2 rounded-full " + (moment().subtract(5, 'minutes').isBefore(user.last_login) ? "bg-green-400" : "bg-gray-300")}></span>
<span className="font-normal block truncate">
Expand All @@ -76,11 +76,11 @@ export const OnlineDoctorsSelect = (props: any) => {
<path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd" />
</svg>
</span>}
</li>
</button>
})
}
</ul>
</div>}
</div>
}
</div>
</div>
</div >)
Expand Down
4 changes: 2 additions & 2 deletions src/Components/Facility/ConsultationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ export const ConsultationForm = (props: any) => {
<div className="px-2 pb-2 max-w-3xl mx-auto">
<PageTitle title={headerText} />
<div className="mt-4">
<Card>
<div className="bg-white rounded shadow">
<form onSubmit={(e) => handleSubmit(e)}>
<CardContent>
<div className="grid gap-4 grid-cols-1">
Expand Down Expand Up @@ -763,7 +763,7 @@ export const ConsultationForm = (props: any) => {
</div>
</CardContent>
</form>
</Card>
</div>
</div>
</div >
);
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Patient/PatientHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ export const PatientHome = (props: any) => {
</button>
</div>
<div>
<button className="btn btn-primary w-full" onClick={handleClickOpen} disabled={!patientData.is_active || !(patientData?.last_consultation?.facility == facilityId)}>
<button className="btn btn-primary w-full" onClick={handleClickOpen}>
Discharge Summary
</button>
</div>
Expand Down
5 changes: 5 additions & 0 deletions src/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -234,3 +234,8 @@ button:disabled:focus,
@apply py-2 px-6 text-base h-12;
}
@import "tailwindcss/utilities";

.multiselect-dropdown__search-dropdown {
max-height: 20rem;
overflow: auto;
}

0 comments on commit 1a111a4

Please sign in to comment.