Skip to content

Commit

Permalink
Merge branch 'issues/10524/minor-responsive' of https://github.com/mo…
Browse files Browse the repository at this point in the history
…damaan/care_feAmaan into issues/10524/minor-responsive
  • Loading branch information
modamaan committed Feb 11, 2025
2 parents 577ea9c + f1906fa commit e22af3c
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 17 deletions.
14 changes: 13 additions & 1 deletion public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@
"assigned_facility": "Facility assigned",
"assigned_to": "Assigned to",
"assigned_volunteer": "Assigned Volunteer",
"at_time": "at <strong>{{time}}</strong>",
"atypical_presentation_details": "Atypical presentation details",
"audio__allow_permission": "Please allow microphone permission in site settings",
"audio__allow_permission_button": "Click here to know how to allow",
Expand Down Expand Up @@ -482,7 +483,7 @@
"booked_by": "Booked by",
"bradycardia": "Bradycardia",
"breathlessness_level": "Breathlessness level",
"by": "By",
"by_name": "by <strong>{{by}}</strong>",
"camera": "Camera",
"camera_bed_link_success": "Camera linked to bed successfully.",
"camera_permission_denied": "Camera Permission denied",
Expand Down Expand Up @@ -716,6 +717,8 @@
"diagnosis_already_added": "This diagnosis was already added",
"diagnosis_at_discharge": "Diagnosis at Discharge",
"diagnosis_empty_message": "No diagnoses recorded",
"diagnosis_status_placeholder": "Select diagnosis status",
"diagnosis_verification_placeholder": "Select verification status",
"diastolic": "Diastolic",
"didnt_receive_a_message": "Didn't receive a message?",
"diet_preference": "Diet Preference",
Expand Down Expand Up @@ -917,6 +920,7 @@
"encounter_suggestion__R": "Consultation",
"encounter_suggestion_edit_disallowed": "Not allowed to switch to this option in edit consultation",
"encounters": "Encounters",
"end_date": "End date",
"end_datetime": "End Date/Time",
"end_dose": "End Dose",
"end_time": "End Time",
Expand Down Expand Up @@ -951,6 +955,7 @@
"error_fetching_slots_data": "Error while fetching slots data",
"error_fetching_user_data": "Error while fetching user data",
"error_fetching_user_details": "Error while fetching user details: ",
"error_fetching_users_data": "Failed to load user data. Please try again later.",
"error_loading_questionnaire_response": "Error loading questionnaire response",
"error_updating_encounter": "Error to Updating Encounter",
"error_verifying_otp": "Error while verifying OTP, Please request a new OTP",
Expand All @@ -972,6 +977,7 @@
"export": "Export",
"export_live_patients": "Export Live Patients",
"exporting": "Exporting",
"external_id": "External ID",
"external_identifier": "External Identifier",
"facilities": "Facilities",
"facility": "Facility",
Expand Down Expand Up @@ -1033,6 +1039,7 @@
"file_upload_error": "Error uploading file",
"file_upload_success": "File uploaded successfully",
"file_uploaded": "File Uploaded Successfully",
"filed": "filed <strong>{{title}}</strong>",
"files": "Files",
"fill_my_details": "Fill My Details",
"filter": "Filter",
Expand Down Expand Up @@ -1291,6 +1298,7 @@
"medical_worker": "Medical Worker",
"medication": "Medication",
"medication_administration_saved": "Medicine Administration saved",
"medication_already_marked_as_error": "Medication already marked as entered in error",
"medication_taken_between": "Medication Taken Between",
"medicine": "Medicine",
"medicine_administration": "Medicine Administration",
Expand Down Expand Up @@ -1383,6 +1391,7 @@
"no_investigation": "No investigation Reports found",
"no_investigation_suggestions": "No Investigation Suggestions",
"no_linked_facilities": "No Linked Facilities",
"no_locations_available": "No locations available",
"no_locations_found": "No locations found",
"no_log_update_delta": "No changes since previous log update",
"no_log_updates": "No log updates found",
Expand Down Expand Up @@ -1441,6 +1450,7 @@
"not_eligible": "Not Eligible",
"not_found": "Not Found",
"not_specified": "Not Specified",
"not_started": "Not started",
"not_taken": "Not Taken",
"note": "Note",
"notes": "Notes",
Expand Down Expand Up @@ -1472,6 +1482,7 @@
"on_emergency_basis": " on emergency basis",
"on_hold": "On Hold",
"ongoing_medications": "Ongoing Medications",
"online": "Online",
"only_indian_mobile_numbers_supported": "Currently only Indian numbers are supported",
"onset": "Onset",
"op_encounter": "OP Encounter",
Expand All @@ -1488,6 +1499,7 @@
"organization_for_care_support": "Organization for Care Support",
"organization_forbidden": "You don't have access to any organizations yet.",
"organization_not_found": "No Organizations Found",
"organization_required": "Organization is required",
"organizations": "Organizations",
"organizations_fetch_error": "Error while fetching organizations",
"origin_facility": "Current facility",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useQuery } from "@tanstack/react-query";
import { t } from "i18next";
import { useQueryParams } from "raviger";
import { useTranslation } from "react-i18next";
import { Trans, useTranslation } from "react-i18next";

import { cn } from "@/lib/utils";

Expand Down Expand Up @@ -214,19 +214,33 @@ function ResponseCard({ item }: { item: QuestionnaireResponse }) {
}
/>
) : (
<h3 className="text-sm font-medium">
{item.questionnaire?.title} {t("filed")}
</h3>
<Trans
i18nKey="filed"
values={{ title: item.questionnaire?.title }}
components={{ strong: <strong /> }}
/>
)}
</div>
<span>{t("at")}</span>
<span>{formatDateTime(item.created_date)}</span>
<span>{t("by")}</span>
<div>
{item.created_by?.first_name || ""}{" "}
{item.created_by?.last_name || ""}
{item.created_by?.user_type && ` (${item.created_by?.user_type})`}
</div>
<span>
<Trans
i18nKey="at_time"
values={{ time: formatDateTime(item.created_date) }}
components={{ strong: <strong /> }}
/>
</span>
<span>
<Trans
i18nKey="by_name"
values={{
by: `${item.created_by?.first_name || ""} ${item.created_by?.last_name || ""}${
item.created_by?.user_type
? ` (${item.created_by.user_type})`
: ""
}`,
}}
components={{ strong: <strong /> }}
/>
</span>
</div>
</div>
</div>
Expand Down
16 changes: 14 additions & 2 deletions src/components/Questionnaire/QuestionTypes/DiagnosisQuestion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,13 @@ const DiagnosisItem: React.FC<DiagnosisItemProps> = ({
disabled={disabled}
>
<SelectTrigger className="h-8 md:h-9">
<SelectValue placeholder={t("status_placeholder")} />
<SelectValue
placeholder={
<span className="text-gray-500">
{t("diagnosis_status_placeholder")}
</span>
}
/>
</SelectTrigger>
<SelectContent>
{DIAGNOSIS_CLINICAL_STATUS.map((status) => (
Expand Down Expand Up @@ -339,7 +345,13 @@ const DiagnosisItem: React.FC<DiagnosisItemProps> = ({
disabled={disabled}
>
<SelectTrigger className="h-8 md:h-9">
<SelectValue placeholder={t("verification_placeholder")} />
<SelectValue
placeholder={
<span className="text-gray-500">
{t("diagnosis_verification_placeholder")}
</span>
}
/>
</SelectTrigger>
<SelectContent>
{DIAGNOSIS_VERIFICATION_STATUS.map((status) => (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Resource/PrintResourceLetter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function PrintResourceLetter({ id }: { id: string }) {

{/* From Address */}
<div className="mb-6">
<div className="font-semibold">{t("From")}:</div>
<div className="font-semibold">{t("from")}:</div>
<div className="mt-1">{data.origin_facility.name}</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/pages/Facility/overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function FacilityOverview({ facilityId }: FacilityOverviewProps) {
href: `/facility/${facilityId}/users/${user?.username}/availability`,
},
{
title: t("Encounters"),
title: t("encounters"),
description: t("manage_facility_users"),
icon: Users,
href: `/facility/${facilityId}/encounters`,
Expand Down

0 comments on commit e22af3c

Please sign in to comment.