Skip to content

Commit

Permalink
Added units for pressure-sore (#8755)
Browse files Browse the repository at this point in the history
  • Loading branch information
noufalrahim authored Oct 13, 2024
1 parent ed3be2b commit 7cfd868
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { IPressureSore } from "../../../Patient/models";
import { Error } from "../../../../Utils/Notifications";
import { classNames, getValueDescription } from "../../../../Utils/utils";
import { calculatePushScore } from "./utils";
import { useTranslation } from "react-i18next";

const PressureSore = ({ log, onChange, readonly }: LogUpdateSectionProps) => {
const value = log.pressure_sore ?? [];
Expand Down Expand Up @@ -104,6 +105,8 @@ const RegionEditor = (props: RegionEditorProps) => {

const isReadOnly = !props.onSave;

const { t } = useTranslation();

return (
<PopupModal
show={props.show}
Expand All @@ -129,7 +132,7 @@ const RegionEditor = (props: RegionEditorProps) => {
<br />
<div className="grid grid-cols-2 gap-2">
<TextFormField
label="Width"
label={t("width", { unit: "cm" })}
name="width"
disabled={isReadOnly}
labelClassName="text-xs"
Expand All @@ -141,7 +144,7 @@ const RegionEditor = (props: RegionEditorProps) => {
onChange={(e) => update({ width: parseFloat(e.value) })}
/>
<TextFormField
label="Length"
label={t("length", { unit: "cm" })}
name="length"
disabled={isReadOnly}
labelClassName="text-xs"
Expand Down
4 changes: 3 additions & 1 deletion src/Locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1024,5 +1024,7 @@
"resource_origin_facility": "Origin Facility",
"resource_approving_facility" : "Resource approving facility",
"consultation_not_filed": "You have not filed any consultation for this patient yet.",
"consultation_not_filed_description": "Please file a consultation for this patient to continue."
"consultation_not_filed_description": "Please file a consultation for this patient to continue.",
"width": "Width ({{unit}})",
"length": "Length ({{unit}})"
}

0 comments on commit 7cfd868

Please sign in to comment.