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

FIXED: The assets configuration page lacks mobile responsiveness #9467

26 changes: 18 additions & 8 deletions src/components/Assets/AssetType/HL7Monitor.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { SyntheticEvent, useEffect, useState } from "react";

import Card from "@/CAREUI/display/Card";
import CareIcon from "@/CAREUI/icons/CareIcon";

import { Button } from "@/components/ui/button";
import { Card } from "@/components/ui/card";
modamaan marked this conversation as resolved.
Show resolved Hide resolved

import {
AssetClass,
AssetData,
ResolvedMiddleware,
} from "@/components/Assets/AssetTypes";
import { BedSelect } from "@/components/Common/BedSelect";
import { Submit } from "@/components/Common/ButtonV2";
import Loading from "@/components/Common/Loading";
import { BedModel } from "@/components/Facility/models";
import { FieldLabel } from "@/components/Form/FormFields/FormField";
Expand Down Expand Up @@ -91,7 +92,7 @@ const HL7Monitor = (props: HL7MonitorProps) => {
<div className="mx-auto flex flex-col gap-4 xl:flex-row-reverse">
{["DistrictAdmin", "StateAdmin"].includes(authUser.user_type) && (
<div className="flex w-full shrink-0 flex-col gap-4 xl:max-w-xs">
<Card className="flex w-full flex-col">
<Card className="flex flex-wrap flex-col p-4 m-4 md:m-0 w-1/2 sm:w-2/3 md:w-full">
modamaan marked this conversation as resolved.
Show resolved Hide resolved
<form onSubmit={handleSubmit}>
<h2 className="mb-2 text-lg font-bold">Connection</h2>
<div className="flex flex-col gap-2">
Expand Down Expand Up @@ -127,15 +128,19 @@ const HL7Monitor = (props: HL7MonitorProps) => {
required
error={ipadrdress_error}
/>
<Submit className="w-full">
<Button
id="submit"
variant={"primary"}
className="flex gap-2 w-full"
>
<CareIcon icon="l-save" />
<span>Save Configuration</span>
</Submit>
</Button>
</div>
</form>
</Card>
{["HL7MONITOR"].includes(assetType) && (
<Card>
<Card className="p-4 m-4 md:m-0 w-1/2 sm:w-2/3 md:w-full">
modamaan marked this conversation as resolved.
Show resolved Hide resolved
<MonitorConfigure asset={asset as AssetData} />
</Card>
)}
Expand All @@ -150,6 +155,7 @@ const HL7Monitor = (props: HL7MonitorProps) => {
hideFooter={true}
/>
)}

{assetType === "VENTILATOR" && (
<VentilatorPatientVitalsMonitor
key={socketUrl}
Expand Down Expand Up @@ -231,10 +237,14 @@ function MonitorConfigure({ asset }: { asset: AssetData }) {
className="w-full"
/>
</div>
<Submit className="mt-6 w-full shrink-0">
<Button
id="submit"
variant={"primary"}
className="flex gap-2 mt-6 w-full shrink-0"
>
<CareIcon icon="l-bed" className="text-lg" />
{shouldUpdateLink ? "Update Bed" : "Save Bed"}
</Submit>
</Button>
</div>
</form>
);
Expand Down
Loading