Skip to content

Commit

Permalink
Merge branch 'develop' into issues/8699/bug/comment-wrap-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chakribontha authored Oct 4, 2024
2 parents dc4abac + 1687ced commit edb6d80
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/Components/Common/BloodPressureFormField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ export default function BloodPressureFormField(props: Props) {
const map = meanArterialPressure(props.value)?.toFixed();

const handleChange = (event: FieldChangeEvent<number>) => {
const bp = field.value ?? {};
const bp = {
systolic: field.value?.systolic,
diastolic: field.value?.diastolic,
};
bp[event.name as keyof BloodPressure] = event.value;
field.handleChange(Object.values(bp).filter(Boolean).length ? bp : null);
};
Expand Down
9 changes: 5 additions & 4 deletions src/Components/Facility/FacilityCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ export const FacilityCard = (props: { facility: any; userType: any }) => {
)}
</Link>

<div className="flex h-fit w-full flex-col flex-wrap justify-between md:h-full">
<div className="mx-auto flex h-fit w-full max-w-full flex-col flex-wrap justify-between md:h-full lg:max-w-3xl">
<div className="w-full p-4">
<div className="flex gap-5">
<div className="flex flex-col gap-5 sm:flex-row">
<Link
href={`/facility/${facility.id}`}
className="group relative z-0 hidden h-[150px] min-h-[150px] w-[150px] min-w-[150px] items-center justify-center self-stretch rounded-md bg-secondary-300 min-[425px]:flex"
className="group relative z-0 hidden h-[150px] min-h-[150px] w-[150px] min-w-[150px] items-center justify-center rounded-md bg-secondary-300 sm:flex"
>
{(facility.read_cover_image_url && (
<img
Expand All @@ -100,7 +100,7 @@ export const FacilityCard = (props: { facility: any; userType: any }) => {
>
<Link
href={`/facility/${facility.id}`}
className="float-left text-xl font-bold capitalize text-inherit hover:text-inherit"
className="text-xl font-bold capitalize text-inherit hover:text-inherit"
>
{facility.name}
</Link>
Expand All @@ -109,6 +109,7 @@ export const FacilityCard = (props: { facility: any; userType: any }) => {
href={`/facility/${facility.id}/cns`}
border
ghost
className="mt-2 sm:mt-0"
>
<CareIcon
icon="l-monitor-heart-rate"
Expand Down
2 changes: 1 addition & 1 deletion src/Components/LogUpdate/Sections/Vitals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const BPAttributeEditor = ({
name={attribute}
label={t(attribute)}
onChange={(event) => {
const bp = log.bp ?? {};
const bp = { systolic: log.bp?.systolic, diastolic: log.bp?.diastolic };
bp[event.name as keyof BloodPressure] = event.value;
onChange({
bp: Object.values(bp).filter(Boolean).length ? bp : undefined,
Expand Down

0 comments on commit edb6d80

Please sign in to comment.