From e238f00f26711fe6d81816cca390fe61ea3afdba Mon Sep 17 00:00:00 2001 From: Marmik Patel <44599895+Marmik2003@users.noreply.github.com> Date: Sat, 21 May 2022 19:55:08 +0530 Subject: [PATCH 1/5] added patient details in investigation report (#2291) --- .../Investigations/Reports/ReportTable.tsx | 20 +++++++++++++++++- .../Facility/Investigations/Reports/index.tsx | 21 +++++++++++++++---- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/src/Components/Facility/Investigations/Reports/ReportTable.tsx b/src/Components/Facility/Investigations/Reports/ReportTable.tsx index 753ae456565..ccad9316bf9 100644 --- a/src/Components/Facility/Investigations/Reports/ReportTable.tsx +++ b/src/Components/Facility/Investigations/Reports/ReportTable.tsx @@ -10,6 +10,7 @@ import { Typography, Box, Button, + Grid, } from "@material-ui/core"; import { createStyles, makeStyles, withStyles } from "@material-ui/styles"; import React from "react"; @@ -17,6 +18,7 @@ import { getColorIndex, rowColor, transformData } from "./utils"; import { InvestigationResponse } from "./types"; import moment from "moment"; +// eslint-disable-next-line @typescript-eslint/no-unused-vars const useStyle = makeStyles((theme: Theme) => ({ tableCell: { fontSize: "1.1rem", @@ -45,6 +47,7 @@ const useStyle = makeStyles((theme: Theme) => ({ }, })); +// eslint-disable-next-line @typescript-eslint/no-unused-vars const StyledTableRow = withStyles((theme: Theme) => createStyles({ root: { @@ -74,6 +77,7 @@ const ReportRow = ({ data, name, min, max }: any) => { }); return ( { interface ReportTableProps { title: string; + patientDetails: { + name: string; + age: number; + hospitalName: string; + }; investigationData: InvestigationResponse; } const ReportTable: React.FC = ({ title, investigationData, + patientDetails, }) => { const className = useStyle(); const { data, sessions } = transformData(investigationData); @@ -142,6 +152,15 @@ const ReportTable: React.FC = ({ )}
+ + +

Name: {patientDetails.name}

+ +

Age: {patientDetails.age}

+

Hospital: {patientDetails.hospitalName}

+
+
+
Below Ideal @@ -204,7 +223,6 @@ const ReportTable: React.FC = ({ min={t.investigation_object.min_value} max={t.investigation_object.max_value} name={t.investigation_object.name} - onChange={(e: { target: { value: any } }) => {}} /> ); }) diff --git a/src/Components/Facility/Investigations/Reports/index.tsx b/src/Components/Facility/Investigations/Reports/index.tsx index 8d39c72eb24..69576c2d493 100644 --- a/src/Components/Facility/Investigations/Reports/index.tsx +++ b/src/Components/Facility/Investigations/Reports/index.tsx @@ -103,7 +103,11 @@ const InvestigationReports = ({ id }: any) => { const [sessionPage, setSessionPage] = useState(1); const [isNextSessionDisabled, setIsNextSessionDisabled] = useState(false); const [isLoadMoreDisabled, setIsLoadMoreDisabled] = useState(false); - const [patientName, setPatientName] = useState(""); + const [patientDetails, setPatientDetails] = useState<{ + name: string; + age: number; + hospitalName: string; + }>({ name: "", age: -1, hospitalName: "" }); const [state, dispatch] = useReducer( investigationReportsReducer, initialState @@ -219,10 +223,18 @@ const InvestigationReports = ({ id }: any) => { if (id) { const res = await dispatchAction(getPatient({ id: id })); if (res.data) { - setPatientName(res.data.name); + setPatientDetails({ + name: res.data.name, + age: res.data.age, + hospitalName: res.data.facility_object.name, + }); } } else { - setPatientName(""); + setPatientDetails({ + name: "", + age: -1, + hospitalName: "", + }); } } fetchPatientName(); @@ -324,7 +336,7 @@ const InvestigationReports = ({ id }: any) => { title={"Investigation Reports"} crumbsReplacements={{ patient: { style: "pointer-events-none" }, - [id]: { name: patientName }, + [id]: { name: patientDetails.name }, }} /> {!isLoading.investigationGroupLoading ? ( @@ -442,6 +454,7 @@ const InvestigationReports = ({ id }: any) => { {!!isLoading.tableData && ( From 52a2261daf5036eca62b26dbf74741b202003cfa Mon Sep 17 00:00:00 2001 From: Mohammed Rabil <63334479+rabilrbl@users.noreply.github.com> Date: Sat, 21 May 2022 20:17:36 +0530 Subject: [PATCH 2/5] Collapse nav bar in mobile devices automatically #2421 (#2423) --- src/Components/Common/SideBar.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Components/Common/SideBar.tsx b/src/Components/Common/SideBar.tsx index fa66e9c7632..1b0178f04da 100644 --- a/src/Components/Common/SideBar.tsx +++ b/src/Components/Common/SideBar.tsx @@ -173,6 +173,7 @@ export const SideBar: React.FC = ({ isOpen, setIsOpen }) => { isMobile && setIsOpen(false)} className={clsx( "flex justify-items-start items-center overflow-hidden w-10 py-1 my-1 hover:bg-primary-700 hover:text-white rounded transition-all duration-300", active === item.link.replaceAll("/", "") @@ -204,6 +205,7 @@ export const SideBar: React.FC = ({ isOpen, setIsOpen }) => { href={process.env.REACT_APP_DASHBOARD_URL} target="_blank" rel="noreferrer" + onClick={() => isMobile && setIsOpen(false)} className={clsx( "flex justify-items-start items-center overflow-hidden w-10 py-1 my-1 hover:bg-primary-700 hover:text-white rounded transition-all duration-300 text-primary-300", expanded && "w-60" From 36571725a9122d963234bc9d9a7024b811280232 Mon Sep 17 00:00:00 2001 From: Mohammed Rabil <63334479+rabilrbl@users.noreply.github.com> Date: Sat, 21 May 2022 20:19:01 +0530 Subject: [PATCH 3/5] Add Kannada Language Choice (#2446) --- src/Locale/config.ts | 1 + src/Locale/kn/Auth.json | 33 +++++++++++++++++++++++++++++++++ src/Locale/kn/Common.json | 18 ++++++++++++++++++ src/Locale/kn/Entities.json | 11 +++++++++++ src/Locale/kn/Facility.json | 10 ++++++++++ src/Locale/kn/index.js | 11 +++++++++++ src/i18n.ts | 2 ++ 7 files changed, 86 insertions(+) create mode 100644 src/Locale/kn/Auth.json create mode 100644 src/Locale/kn/Common.json create mode 100644 src/Locale/kn/Entities.json create mode 100644 src/Locale/kn/Facility.json create mode 100644 src/Locale/kn/index.js diff --git a/src/Locale/config.ts b/src/Locale/config.ts index 7c432e2012f..cc41f589581 100644 --- a/src/Locale/config.ts +++ b/src/Locale/config.ts @@ -3,4 +3,5 @@ export const LANGUAGE_NAMES: { [key: string]: any } = { ta: "தமிழ்", ml: "മലയാളം", mr: "मराठी", + kn: "ಕನ್ನಡ", }; diff --git a/src/Locale/kn/Auth.json b/src/Locale/kn/Auth.json new file mode 100644 index 00000000000..ff13e8e15b1 --- /dev/null +++ b/src/Locale/kn/Auth.json @@ -0,0 +1,33 @@ +{ + "username": "ಬಳಕೆದಾರ ಹೆಸರು", + "password": "ಪಾಸ್ವರ್ಡ್", + "new_password": "ಹೊಸ ಪಾಸ್ವರ್ಡ್", + "confirm_password": "ಪಾಸ್ವರ್ಡ್ ದೃಢೀಕರಿಸಿ", + "first_name": "ಮೊದಲ ಹೆಸರು", + "last_name": "ಕೊನೆಯ ಹೆಸರು", + "email": "ಇಮೇಲ್ ವಿಳಾಸ", + "phone_number": "ದೂರವಾಣಿ ಸಂಖ್ಯೆ", + "district": "ಜಿಲ್ಲೆ", + "gender": "ಲಿಂಗ", + "age": "ವಯಸ್ಸು", + "login": "ಲಾಗಿನ್", + "field_required": "ಈ ಜಾಗ ಬೇಕಾಗಿದೆ", + "password_mismatch": "ಪಾಸ್ವರ್ಡ್ ಮತ್ತು ದೃಢೀಕರಣ ಪಾಸ್ವರ್ಡ್ ಒಂದೇ ಆಗಿರಬೇಕು.", + "enter_valid_age": "ದಯವಿಟ್ಟು ಮಾನ್ಯವಾದ ವಯಸ್ಸನ್ನು ನಮೂದಿಸಿ", + "invalid_username": "ಅಗತ್ಯವಿದೆ. 150 ಅಕ್ಷರಗಳು ಅಥವಾ ಕಡಿಮೆ. ಅಕ್ಷರಗಳು, ಅಂಕೆಗಳು ಮತ್ತು @/./+/-/_ ಮಾತ್ರ.", + "invalid_password": "ಪಾಸ್ವರ್ಡ್ ಅವಶ್ಯಕತೆಗಳನ್ನು ಪೂರೈಸುವುದಿಲ್ಲ", + "invalid_email": "ದಯವಿಟ್ಟು ಸರಿಯಾದ ಇಮೇಲ್ ವಿಳಾಸವನ್ನು ನಮೂದಿಸಿ", + "invalid_phone": "ದಯವಿಟ್ಟು ಮಾನ್ಯವಾದ ಫೋನ್ ಸಂಖ್ಯೆಯನ್ನು ನಮೂದಿಸಿ", + "register_hospital": "ಆಸ್ಪತ್ರೆಯನ್ನು ನೋಂದಾಯಿಸಿ", + "register_page_title": "ಆಸ್ಪತ್ರೆ ನಿರ್ವಾಹಕರಾಗಿ ನೋಂದಾಯಿಸಿ", + "auth_login_title": "ಅಧಿಕೃತ ಲಾಗಿನ್", + "forget_password": "ಪಾಸ್ವರ್ಡ್ ಮರೆತಿರಾ?", + "forget_password_instruction": "ನಿಮ್ಮ ಬಳಕೆದಾರ ಹೆಸರನ್ನು ನಮೂದಿಸಿ ಮತ್ತು ನಿಮ್ಮ ಪಾಸ್‌ವರ್ಡ್ ಅನ್ನು ಮರುಹೊಂದಿಸಲು ನಾವು ನಿಮಗೆ ಲಿಂಕ್ ಅನ್ನು ಕಳುಹಿಸುತ್ತೇವೆ.", + "send_reset_link": "ಮರುಹೊಂದಿಸುವ ಲಿಂಕ್ ಕಳುಹಿಸಿ", + "already_a_member": "ಈಗಾಗಲೇ ಸದಸ್ಯರೇ?", + "password_sent": "ಪಾಸ್ವರ್ಡ್ ಮರುಹೊಂದಿಸುವ ಇಮೇಲ್ ಕಳುಹಿಸಲಾಗಿದೆ", + "password_reset_success": "ಪಾಸ್ವರ್ಡ್ ಅನ್ನು ಯಶಸ್ವಿಯಾಗಿ ಮರುಹೊಂದಿಸಲಾಗಿದೆ", + "password_reset_failure": "ಪಾಸ್ವರ್ಡ್ ಮರುಹೊಂದಿಸಲು ವಿಫಲವಾಗಿದೆ", + "reset_password": "ಪಾಸ್ವರ್ಡ್ ಮರುಹೊಂದಿಸಿ", + "sign_out": "ಸೈನ್ ಔಟ್ ಮಾಡಿ" +} diff --git a/src/Locale/kn/Common.json b/src/Locale/kn/Common.json new file mode 100644 index 00000000000..cfe72a21bcd --- /dev/null +++ b/src/Locale/kn/Common.json @@ -0,0 +1,18 @@ +{ + "coronasafe_network": "ಕೊರೊನಾಸೇಫ್ ನೆಟ್‌ವರ್ಕ್", + "goal": "ಸಾಮರ್ಥ್ಯ ಮೀರಿದ ಓವರ್‌ಲೋಡ್‌ನಿಂದ ಆರೋಗ್ಯ ವ್ಯವಸ್ಥೆಯನ್ನು ರಕ್ಷಿಸುವುದು ನಮ್ಮ ಗುರಿಯಾಗಿದೆ.", + "something_wrong": "ಏನೋ ತಪ್ಪಾಗಿದೆ! ನಂತರ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ!", + "contribute_github": "GitHub ನಲ್ಲಿ ಕೊಡುಗೆ ನೀಡಿ", + "footer_body": "ಕೊರೊನಾಸೇಫ್ ನೆಟ್‌ವರ್ಕ್ ಎಂಬುದು ತೆರೆದ ಮೂಲ ಸಾರ್ವಜನಿಕ ಉಪಯುಕ್ತತೆಯಾಗಿದ್ದು, ನಾವೀನ್ಯಕಾರರು ಮತ್ತು ಸ್ವಯಂಸೇವಕರ ಬಹು-ಶಿಸ್ತಿನ ತಂಡದಿಂದ ವಿನ್ಯಾಸಗೊಳಿಸಲಾಗಿದೆ. ಕರೋನಾ ಸೇಫ್ ಕೇರ್ ವಿಶ್ವಸಂಸ್ಥೆಯಿಂದ ಗುರುತಿಸಲ್ಪಟ್ಟ ಡಿಜಿಟಲ್ ಸಾರ್ವಜನಿಕ ಸೇವೆಯಾಗಿದೆ.", + "reset": "ಮರುಹೊಂದಿಸಿ", + "downloads": "ಡೌನ್‌ಲೋಡ್‌ಗಳು", + "download_type": "ಡೌನ್‌ಲೋಡ್ ಪ್ರಕಾರ", + "State": "ರಾಜ್ಯ", + "District": "ಜಿಲ್ಲೆ", + "Local Body": "ಸ್ಥಳೀಯ ಸಂಸ್ಥೆ", + "Location": "ಸ್ಥಳ", + "Ward": "ವಾರ್ಡ್", + "Notice Board": "ಸೂಚನಾ ಫಲಕ", + "Assets": "ಸ್ವತ್ತುಗಳು", + "Notifications": "ಅಧಿಸೂಚನೆಗಳು" +} diff --git a/src/Locale/kn/Entities.json b/src/Locale/kn/Entities.json new file mode 100644 index 00000000000..b8c2c72faad --- /dev/null +++ b/src/Locale/kn/Entities.json @@ -0,0 +1,11 @@ +{ + "Facilities": "ಸೌಲಭ್ಯಗಳು", + "Patients": "ರೋಗಿಗಳು", + "Sample Test": "ಮಾದರಿ ಪರೀಕ್ಷೆ", + "Shifting": "ಸ್ಥಳಾಂತರ", + "Resource": "ಸಂಪನ್ಮೂಲ", + "External Results": "ಬಾಹ್ಯ ಫಲಿತಾಂಶಗಳು", + "Users": "ಬಳಕೆದಾರರು", + "Profile": "ಪ್ರೊಫೈಲ್", + "Dashboard": "ಡ್ಯಾಶ್‌ಬೋರ್ಡ್" +} diff --git a/src/Locale/kn/Facility.json b/src/Locale/kn/Facility.json new file mode 100644 index 00000000000..8bd18d2ce3b --- /dev/null +++ b/src/Locale/kn/Facility.json @@ -0,0 +1,10 @@ +{ + "facility_search_placeholder": "ಸೌಲಭ್ಯ / ಜಿಲ್ಲೆಯ ಹೆಸರಿನ ಮೂಲಕ ಹುಡುಕಿ", + "advanced_filters": "ಸುಧಾರಿತ ಫಿಲ್ಟರ್‌ಗಳು", + "Facility Type": "ಸೌಲಭ್ಯದ ಪ್ರಕಾರ", + "KASP Empanelled": "ಕೆಎಎಸ್ಪಿ ಎಂಪನೇಲ್ಡ್", + "View Facility": "ವೀಕ್ಷಣೆ ಸೌಲಭ್ಯ", + "no_duplicate_facility": "ನೀವು ನಕಲಿ ಸೌಲಭ್ಯಗಳನ್ನು ರಚಿಸಬಾರದು", + "no_facilities": "ಯಾವುದೇ ಸೌಲಭ್ಯಗಳು ಕಂಡುಬಂದಿಲ್ಲ", + "create_facility": "ಹೊಸ ಸೌಲಭ್ಯವನ್ನು ರಚಿಸಿ" +} diff --git a/src/Locale/kn/index.js b/src/Locale/kn/index.js new file mode 100644 index 00000000000..cbf1d10c3b9 --- /dev/null +++ b/src/Locale/kn/index.js @@ -0,0 +1,11 @@ +import Auth from "./Auth.json"; +import Common from "./Common.json"; +import Entities from "./Entities.json"; +import Facility from "./Facility.json"; + +export default { + ...Auth, + ...Common, + ...Entities, + ...Facility, +}; diff --git a/src/i18n.ts b/src/i18n.ts index 43a28c5a976..c2784b16e56 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -5,12 +5,14 @@ import en from "./Locale/en"; import ta from "./Locale/ta"; import ml from "./Locale/ml"; import mr from "./Locale/mr"; +import kn from "./Locale/kn"; const resources = { en: { translation: en }, ta: { translation: ta }, ml: { translation: ml }, mr: { translation: mr }, + kn: { translation: kn }, }; i18n From e538d28d87089de9c6822fae1a8c8a025281656f Mon Sep 17 00:00:00 2001 From: Mohammed Rabil <63334479+rabilrbl@users.noreply.github.com> Date: Sat, 21 May 2022 20:19:42 +0530 Subject: [PATCH 4/5] Fix navbar translations (#2444) --- src/Locale/en/Common.json | 5 ++++- src/Locale/ml/Common.json | 5 ++++- src/Locale/mr/Common.json | 5 ++++- src/Locale/ta/Common.json | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/Locale/en/Common.json b/src/Locale/en/Common.json index 465bdb69941..58d69ec1c7a 100644 --- a/src/Locale/en/Common.json +++ b/src/Locale/en/Common.json @@ -11,5 +11,8 @@ "District": "District", "Local Body": "Local Body", "Location": "Location", - "Ward": "Ward" + "Ward": "Ward", + "Notice Board": "Notice Board", + "Assets": "Assets", + "Notifications": "Notifications" } diff --git a/src/Locale/ml/Common.json b/src/Locale/ml/Common.json index a97895081d4..5978494e713 100644 --- a/src/Locale/ml/Common.json +++ b/src/Locale/ml/Common.json @@ -11,5 +11,8 @@ "District": "ജില്ല", "Local Body": "തദ്ദേശസ്ഥാപനം", "Location": "സ്ഥാനം", - "Ward": "വാര്‍ഡ്‌" + "Ward": "വാര്‍ഡ്‌", + "Notice Board": "നോട്ടീസ് ബോർഡ്", + "Assets": "ആസ്തികൾ", + "Notifications": "അറിയിപ്പുകൾ" } diff --git a/src/Locale/mr/Common.json b/src/Locale/mr/Common.json index 6ee666fc91b..551462e08e1 100644 --- a/src/Locale/mr/Common.json +++ b/src/Locale/mr/Common.json @@ -11,5 +11,8 @@ "District": "जिल्हा", "Local Body": "स्थानिक संस्था", "Location": "स्थान", - "Ward": "वॉर्ड" + "Ward": "वॉर्ड", + "Notice Board": "सूचना फलक", + "Assets": "मालमत्ता", + "Notifications": "अधिसूचना" } diff --git a/src/Locale/ta/Common.json b/src/Locale/ta/Common.json index add6625afc7..e674915563f 100644 --- a/src/Locale/ta/Common.json +++ b/src/Locale/ta/Common.json @@ -11,5 +11,8 @@ "District": "மாவட்டம்", "Local Body": "உள்ளாட்சி மன்றம்", "Location": "இடம்", - "Ward": "தொகுதி" + "Ward": "தொகுதி", + "Notice Board": "அறிவிப்பு பலகை", + "Assets": "சொத்துக்கள்", + "Notifications": "அறிவிப்புகள்" } From 8e781b0b19410dcb8386828aa075f5987204da51 Mon Sep 17 00:00:00 2001 From: Mohammed Rabil <63334479+rabilrbl@users.noreply.github.com> Date: Sat, 21 May 2022 20:20:27 +0530 Subject: [PATCH 5/5] Redirect `/user` to `/users`. (#2443) --- src/Router/AppRouter.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Router/AppRouter.tsx b/src/Router/AppRouter.tsx index 661a791e7e8..6ee61e15fc1 100644 --- a/src/Router/AppRouter.tsx +++ b/src/Router/AppRouter.tsx @@ -459,6 +459,7 @@ const menus = [ const AppRouter = () => { useRedirect("/", "/facility"); useRedirect("/teleicu", "/teleicu/facility"); + useRedirect("/user", "/users"); const pages = useRoutes(routes); const path = usePath(); const [isSidebarOpen, setIsSidebarOpen] = useState(false);