Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot/npm_and_yarn/glob-10.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
khavinshankar authored Jul 4, 2024
2 parents 26e41eb + f2be0a4 commit 1c58f64
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
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
2 changes: 1 addition & 1 deletion src/Components/Scribe/Scribe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ export const Scribe: React.FC<ScribeProps> = ({ fields, onFormUpdate }) => {
&#8203;
</span>

<div className="inline-block w-full max-w-md overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all">
<div className="inline-block max-h-[75vh] w-full max-w-md overflow-hidden overflow-y-auto rounded-2xl border-2 border-gray-300 bg-white p-6 text-left align-middle shadow-xl transition-all">
<div className="flex justify-between">
<h3 className="text-lg font-medium leading-6 text-gray-900">
Voice AutoFill
Expand Down

0 comments on commit 1c58f64

Please sign in to comment.