Skip to content

Commit

Permalink
Merge pull request #8111 from coronasafe/develop
Browse files Browse the repository at this point in the history
Merge Develop to Staging 24.28.0
  • Loading branch information
khavinshankar committed Jul 4, 2024
2 parents 2fdae2c + 4459776 commit 27cab8f
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 40 deletions.
50 changes: 28 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"echarts-for-react": "^3.0.2",
"eslint-mdx": "^3.1.5",
"events": "^3.3.0",
"glob": "^10.3.15",
"glob": "^10.4.2",
"hi-profiles": "^1.0.6",
"i18next": "^23.11.4",
"i18next-browser-languagedetector": "^7.2.1",
Expand All @@ -83,7 +83,7 @@
"react-copy-to-clipboard": "^5.1.0",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dnd-scrolling": "^1.3.7",
"react-dnd-scrolling": "^1.3.8",
"react-dom": "18.3.1",
"react-google-recaptcha": "^3.1.0",
"react-i18next": "^13.0.1",
Expand Down
36 changes: 22 additions & 14 deletions src/Components/Facility/Consultations/LiveFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { FieldLabel } from "../../Form/FormFields/FormField";
import useFullscreen from "../../../Common/hooks/useFullscreen";
import ReactPlayer from "react-player";
import { isIOS } from "../../../Utils/utils";
import TextFormField from "../../Form/FormFields/TextFormField";

const LiveFeed = (props: any) => {
const middlewareHostname = props.middlewareHostname;
Expand All @@ -39,7 +40,7 @@ const LiveFeed = (props: any) => {
);
const [videoStartTime, setVideoStartTime] = useState<Date | null>(null);
const [bed, setBed] = useState<BedModel>({});
const [preset, setNewPreset] = useState<string>("");
const [presetName, setPresetName] = useState("");
const [loading, setLoading] = useState<string | undefined>();
const dispatch: any = useDispatch();
const [page, setPage] = useState({
Expand Down Expand Up @@ -145,7 +146,7 @@ const LiveFeed = (props: any) => {
const updatePreset = async (currentPreset: any) => {
const data = {
bed_id: bed.id,
preset_name: preset,
preset_name: presetName,
};
const response = await dispatch(
partialUpdateAssetBed(
Expand Down Expand Up @@ -187,7 +188,7 @@ const LiveFeed = (props: any) => {
}, []);

useEffect(() => {
setNewPreset(toUpdate?.meta?.preset_name);
setPresetName(toUpdate?.meta?.preset_name);
setBed(toUpdate?.bed_object);
}, [toUpdate]);

Expand Down Expand Up @@ -334,23 +335,30 @@ const LiveFeed = (props: any) => {
<ConfirmDialog
show
title="Update Preset"
description={"Preset: " + toUpdate.meta.preset_name}
action="Update"
variant="primary"
onClose={() => setToUpdate(null)}
onConfirm={() => updatePreset(toUpdate)}
>
<div className="mt-4 flex flex-col">
<FieldLabel required>Bed</FieldLabel>
<BedSelect
name="bed"
setSelected={(selected) => setBed(selected as BedModel)}
selected={bed}
error=""
multiple={false}
location={cameraAsset.location_id}
facility={cameraAsset.facility_id}
<div className="mt-4">
<TextFormField
name="preset_name"
label="Preset Name"
value={presetName}
onChange={({ value }) => setPresetName(value)}
/>
<div className="flex flex-col">
<FieldLabel required>Bed</FieldLabel>
<BedSelect
name="bed"
setSelected={(selected) => setBed(selected as BedModel)}
selected={bed}
error=""
multiple={false}
location={cameraAsset.location_id}
facility={cameraAsset.facility_id}
/>
</div>
</div>
</ConfirmDialog>
)}
Expand Down
4 changes: 2 additions & 2 deletions src/Components/Patient/ManagePatients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -517,11 +517,11 @@ export const PatientManager = () => {
<div className="flex w-full flex-col gap-2 pl-2 md:block md:flex-row">
<div className="flex w-full items-center justify-between gap-2">
<div
className="flex flex-wrap gap-2 font-semibold"
className="flex flex-wrap items-end gap-3 font-semibold"
id="patient-name-list"
>
<span className="text-xl capitalize">{patient.name}</span>
<span className="text-gray-800">
<span className="font-bold text-gray-700">
{formatPatientAge(patient, true)}
</span>
</div>
Expand Down

0 comments on commit 27cab8f

Please sign in to comment.