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

Changes 'CONSULTATION NOTES' to 'GENERAL INSTRUCTIONS (ADVICE)' #8216

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/CAREUI/display/Timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,12 @@ export const TimelineNode = (props: TimelineNodeProps) => {
}`}{" "}
</span>
)}
{props.titleSuffix
? props.titleSuffix
: `${props.event.type} the ${props.name || name}.`}
{props.titleSuffix || (
<>
{`${props.event.type} the `}
<span className="capitalize">{props.name || name}</span>
</>
)}
</p>
<div className="md:w-fit">
{props.actions && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,10 @@ export default function EventsList() {
{(item, items) => (
<TimelineNode
name={
item.event_type.name
.split("_")
.map(
(text) =>
text[0].toUpperCase() + text.toLowerCase().slice(1),
)
.join(" ") + " Event"
t(item.event_type.name.toLowerCase()).replaceAll(
/_/g,
" ",
) + " Event"
}
event={{
type: item.change_type.replace(/_/g, " ").toLowerCase(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import type { ReactNode } from "react";
import { useTranslation } from "react-i18next";

interface IProps {
values: Record<string, unknown>;
}
Expand Down Expand Up @@ -80,12 +82,13 @@ const formatValue = (value: unknown, key?: string): ReactNode => {
};

export default function GenericEvent(props: IProps) {
const { t } = useTranslation();
return (
<div className="flex w-full flex-col gap-4 rounded-lg border border-secondary-400 p-4 @container">
{Object.entries(props.values).map(([key, value]) => (
<div className="flex w-full flex-col items-start gap-2">
<span className="text-xs uppercase text-secondary-700">
{key.replaceAll(/_/g, " ")}
<span className="text-xs capitalize text-secondary-700">
{t(key).replaceAll(/_/g, " ")}
</span>
<span className="break-all text-sm font-semibold text-secondary-700">
{formatValue(value, key)}
Expand Down
5 changes: 3 additions & 2 deletions src/Locale/en/Consultation.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@
"encounter_date_field_label__HI": "Date & Time of Consultation",
"encounter_date_field_label__R": "Date & Time of Consultation",
"back_dated_encounter_date_caution": "You are creating an encounter for",
"encounter_duration_confirmation": "The duration of this encounter would be"
}
"encounter_duration_confirmation": "The duration of this encounter would be",
"consultation_notes": "General Instructions (Advice)"
}
Loading