-
Notifications
You must be signed in to change notification settings - Fork 500
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
9c7093b
commit 3eb5283
Showing
3 changed files
with
94 additions
and
114 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,78 @@ | ||
import ButtonV2 from "../Common/components/ButtonV2"; | ||
import { HCXPolicyModel } from "../HCX/models"; | ||
import { navigate } from "raviger"; | ||
|
||
interface InsuranceDetails { | ||
data?: HCXPolicyModel; | ||
showViewAllDetails?: boolean; | ||
} | ||
|
||
export const InsuranceDetialsCard = (props: InsuranceDetails) => { | ||
const { data, showViewAllDetails } = props; | ||
|
||
return ( | ||
<div className="w-full"> | ||
<div className="h-full space-y-2 rounded-lg bg-white p-7 shadow"> | ||
<div className="border-b border-dashed pb-2 text-xl font-bold text-gray-900"> | ||
Policy Details | ||
</div> | ||
{data ? ( | ||
<div className="grid grid-cols-1 gap-2 sm:grid-cols-2 md:grid-cols-2"> | ||
<div className=" "> | ||
<div className="text-sm font-semibold leading-5 text-zinc-400"> | ||
Member ID | ||
</div> | ||
<div className="mt-1 whitespace-normal break-words text-sm font-medium leading-5"> | ||
{data.subscriber_id || ""} | ||
</div> | ||
</div> | ||
<div className=" "> | ||
<div className="text-sm font-semibold leading-5 text-zinc-400"> | ||
Policy ID / Policy Name | ||
</div> | ||
<div className="mt-1 whitespace-normal break-words text-sm font-medium leading-5"> | ||
{data.policy_id || ""} | ||
</div> | ||
</div> | ||
<div className="sm:col-span-1"> | ||
<div className="text-sm font-semibold leading-5 text-zinc-400"> | ||
Insurer ID | ||
</div> | ||
<div className="mt-1 whitespace-normal break-words text-sm font-medium leading-5"> | ||
{data.insurer_id || ""} | ||
</div> | ||
</div> | ||
<div className="sm:col-span-1"> | ||
<div className="text-sm font-semibold leading-5 text-zinc-400"> | ||
Insurer Name | ||
</div> | ||
<div className="mt-1 whitespace-normal break-words text-sm font-medium leading-5"> | ||
{data.insurer_name || ""} | ||
</div> | ||
</div> | ||
{showViewAllDetails && ( | ||
<div className=" first-letter: sm:col-span-2 md:ml-auto md:mt-10 "> | ||
<div className=" mt-1 whitespace-normal break-words text-sm font-medium leading-5"> | ||
<ButtonV2 | ||
onClick={() => { | ||
navigate( | ||
`/facility/${data.patient_object?.facility_object?.id}/patient/${data.patient_object?.id}/insurance` | ||
); | ||
}} | ||
className="h-auto whitespace-pre-wrap border border-gray-500 bg-white text-black hover:bg-gray-300" | ||
> | ||
View All Details | ||
</ButtonV2> | ||
</div> | ||
</div> | ||
)} | ||
</div> | ||
) : ( | ||
<div className="flex w-full items-center justify-center text-xl font-bold text-gray-500"> | ||
No Insurance Details Available | ||
</div> | ||
)} | ||
</div> | ||
</div> | ||
); | ||
}; |
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