Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patient header UI update in Patient details page #9377

Closed
Closed
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
316f2e2
patient header and other fixes
Mahendar0701 Dec 11, 2024
e1e7f6d
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 11, 2024
82736a6
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 11, 2024
38bcda5
changes
Mahendar0701 Dec 11, 2024
b6621a5
transfer label position updated
Mahendar0701 Dec 11, 2024
242e3d0
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 11, 2024
1eb78d2
allergies
Mahendar0701 Dec 12, 2024
b408d5b
allergies
Mahendar0701 Dec 12, 2024
53ec8ad
changes
Mahendar0701 Dec 12, 2024
83d2fb8
adjusted margin
Mahendar0701 Dec 13, 2024
596e470
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 13, 2024
86a3597
added varients to badge
Mahendar0701 Dec 13, 2024
70f946a
resolved merge conflicts
Mahendar0701 Dec 14, 2024
be0183f
replaced ButtonV2 with Button
Mahendar0701 Dec 15, 2024
c955864
added primary varient
Mahendar0701 Dec 16, 2024
d19a3c1
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 16, 2024
923bd7a
added authorized button
Mahendar0701 Dec 16, 2024
24ad7ac
removed overriding
Mahendar0701 Dec 16, 2024
eaf9ebf
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 16, 2024
f64d18e
removed careicons from badge component
Mahendar0701 Dec 16, 2024
7fbfa65
replaced green adn gray with primary adn secondary
Mahendar0701 Dec 16, 2024
f31fe47
...
Mahendar0701 Dec 16, 2024
ac7c90a
resolved merge conflicts
Mahendar0701 Dec 17, 2024
11bddea
resolved merge conflicts
Mahendar0701 Dec 17, 2024
7c5a558
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 18, 2024
8a5eb42
Merge branch 'develop' into patient-header-ui-design
nihal467 Dec 19, 2024
8276111
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 19, 2024
340bec4
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 20, 2024
d093082
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 20, 2024
97547fb
Merge branch 'patient-header-ui-design' of https://github.com/Mahenda…
Mahendar0701 Dec 20, 2024
a82c3e4
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 20, 2024
7186a87
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 22, 2024
0e61d74
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 23, 2024
881d2a1
Merge branch 'patient-header-ui-design' of https://github.com/Mahenda…
Mahendar0701 Dec 23, 2024
cae2c1b
resolved conflicts
Mahendar0701 Dec 23, 2024
cd3e31e
resolved conflicts
Mahendar0701 Dec 23, 2024
6a45d65
added changes
Mahendar0701 Dec 23, 2024
db3a49a
added changes
Mahendar0701 Dec 23, 2024
8ef8b19
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 23, 2024
6810996
removed default
Mahendar0701 Dec 23, 2024
9059f4d
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 24, 2024
ea0fb17
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 26, 2024
14bd464
add absolute imports
Mahendar0701 Dec 26, 2024
a99d103
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 27, 2024
87dd73c
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 28, 2024
3e05b57
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 29, 2024
00084ac
Merge branch 'develop' into patient-header-ui-design
Mahendar0701 Dec 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@
"patient_consultation__treatment__summary__spo2": "SpO2",
"patient_consultation__treatment__summary__temperature": "Temperature",
"patient_created": "Patient Created",
"patient_details": "Patient Details",
"patient_details": "Details of Patient",
"patient_details_incomplete": "Patient Details Incomplete",
"patient_face": "Patient Face",
"patient_name": "Patient name",
Expand Down
18 changes: 14 additions & 4 deletions src/components/Common/AuthorizedButton.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
import { Button, ButtonProps } from "@headlessui/react";
import * as React from "react";

import AuthorizedChild from "@/CAREUI/misc/AuthorizedChild";

import { Button, ButtonProps } from "@/components/ui/button";

import { AuthorizedElementProps } from "@/Utils/AuthorizeFor";

export const AuthorizedButton: React.FC<
AuthorizedElementProps & ButtonProps
> = ({ authorizeFor = () => true, ...props }) => {
const AuthorizedButton: React.FC<AuthorizedElementProps & ButtonProps> = ({
authorizeFor,
...props
}) => {
if (!authorizeFor) {
throw new Error(
"The 'authorizeFor' prop is required for AuthorizedButton.",
);
}
return (
<AuthorizedChild authorizeFor={authorizeFor}>
{({ isAuthorized }) => (
Expand All @@ -17,3 +25,5 @@ export const AuthorizedButton: React.FC<
</AuthorizedChild>
);
};

export default AuthorizedButton;
4 changes: 2 additions & 2 deletions src/components/Patient/PatientDetailsTab/Demography.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const Demography = (props: PatientProps) => {
const EmergencyContact = (props: { number?: string; name?: string }) => (
<div className="sm:col-span-2">
<div className="mr-6 flex flex-col items-start justify-between rounded-md border border-orange-300 bg-orange-50 p-4 sm:flex-row">
{/* Emergency Contact Section */}
{/* Emergency contact Section */}
<div className="flex-1">
<div className="text-sm font-normal leading-5 text-gray-600">
{t("emergency_contact")}
Expand Down Expand Up @@ -226,7 +226,7 @@ export const Demography = (props: PatientProps) => {
},
{
label: t("state"),
value: patientData.state,
value: patientData?.state_object?.name,
},
{
label: t("district"),
Expand Down
Loading
Loading