From 567eaf48926c9b17808ff3e7a6aaabf495ab6ec4 Mon Sep 17 00:00:00 2001 From: AnveshNalimela Date: Tue, 22 Oct 2024 21:50:36 +0530 Subject: [PATCH 01/16] Resloved the UI and Changed GRID 3 cols --- src/Components/Resource/ListView.tsx | 60 ++- src/Components/Resource/ResourceBoardView.tsx | 49 +-- src/Components/Shifting/BoardView.tsx | 54 +-- src/Components/Shifting/ListView.tsx | 386 +++++++++--------- 4 files changed, 260 insertions(+), 289 deletions(-) diff --git a/src/Components/Resource/ListView.tsx b/src/Components/Resource/ListView.tsx index 31b34065aa5..9ed7235971d 100644 --- a/src/Components/Resource/ListView.tsx +++ b/src/Components/Resource/ListView.tsx @@ -1,20 +1,20 @@ import { navigate } from "raviger"; -import ListFilter from "./ListFilter"; -import { formatFilter } from "./Commons"; -import BadgesList from "./BadgesList"; -import { formatDateTime } from "../../Utils/utils"; -import useFilters from "../../Common/hooks/useFilters"; -import { ExportButton } from "../Common/Export"; -import ButtonV2 from "../Common/components/ButtonV2"; import { useTranslation } from "react-i18next"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; import CareIcon from "../../CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; +import useFilters from "../../Common/hooks/useFilters"; +import routes from "../../Redux/api"; import dayjs from "../../Utils/dayjs"; +import request from "../../Utils/request/request"; import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; +import { formatDateTime } from "../../Utils/utils"; +import { ExportButton } from "../Common/Export"; +import ButtonV2 from "../Common/components/ButtonV2"; import Page from "../Common/components/Page"; import SearchInput from "../Form/SearchInput"; -import request from "../../Utils/request/request"; +import BadgesList from "./BadgesList"; +import { formatFilter } from "./Commons"; +import ListFilter from "./ListFilter"; import Loading from "@/Components/Common/Loading"; export default function ListView() { @@ -50,10 +50,7 @@ export default function ListView() { } return data.map((resource: any) => ( -
+
@@ -73,10 +70,10 @@ export default function ListView() {
-
+
{resource.status}
@@ -87,7 +84,7 @@ export default function ListView() { className="flex items-center text-sm font-medium leading-5 text-secondary-500" > -
+
{(resource.origin_facility_object || {}).name}
@@ -95,10 +92,10 @@ export default function ListView() {
-
+
{(resource.approving_facility_object || {}).name}
@@ -106,11 +103,11 @@ export default function ListView() {
-
+
{(resource.assigned_facility_object || {}).name || "Yet to be decided"}
@@ -121,7 +118,7 @@ export default function ListView() {
-
+
{formatDateTime(resource.modified_date) || "--"}
@@ -171,7 +168,7 @@ export default function ListView() { breadcrumbs={false} options={ <> -
+
-
- {/* dummy div to align space as per board view */} -
-
+
+ advancedFilter.setShow(true)} + /> {t("board_view")} - - advancedFilter.setShow(true)} - />
} @@ -215,8 +208,7 @@ export default function ListView() { {t("refresh_list")}
- -
+
{data?.results && showResourceCardList(data?.results)}
diff --git a/src/Components/Resource/ResourceBoardView.tsx b/src/Components/Resource/ResourceBoardView.tsx index de432496fdd..66fcdf3a814 100644 --- a/src/Components/Resource/ResourceBoardView.tsx +++ b/src/Components/Resource/ResourceBoardView.tsx @@ -1,23 +1,23 @@ -import { useState } from "react"; +import dayjs from "dayjs"; import { Link, navigate } from "raviger"; -import ListFilter from "./ListFilter"; +import { useState } from "react"; +import { useTranslation } from "react-i18next"; +import CareIcon from "../../CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; import { RESOURCE_CHOICES } from "../../Common/constants"; -import BadgesList from "./BadgesList"; -import { formatFilter } from "./Commons"; import useFilters from "../../Common/hooks/useFilters"; +import routes from "../../Redux/api"; +import request from "../../Utils/request/request"; +import { classNames, formatDateTime, formatName } from "../../Utils/utils"; import { ExportButton } from "../Common/Export"; import ButtonV2 from "../Common/components/ButtonV2"; -import { useTranslation } from "react-i18next"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import SearchInput from "../Form/SearchInput"; import Tabs from "../Common/components/Tabs"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import KanbanBoard from "../Kanban/Board"; import { ResourceModel } from "../Facility/models"; -import { classNames, formatDateTime, formatName } from "../../Utils/utils"; -import dayjs from "dayjs"; +import SearchInput from "../Form/SearchInput"; +import KanbanBoard from "../Kanban/Board"; +import BadgesList from "./BadgesList"; +import { formatFilter } from "./Commons"; +import ListFilter from "./ListFilter"; import PageTitle from "@/Components/Common/PageTitle"; const resourceStatusOptions = RESOURCE_CHOICES.map((obj) => obj.text); @@ -43,7 +43,7 @@ export default function BoardView() { return (
-
+
-
+
updateQuery({ [e.name]: e.value })} placeholder={t("search_resource")} /> +
+
setBoardFilter(tab ? COMPLETED : ACTIVE)} currentTab={boardFilter !== ACTIVE ? 1 : 0} /> -
- - - {t("list_view")} - - advancedFilter.setShow(true)} - /> -
+
+ +
+ advancedFilter.setShow(true)} /> + + + {t("list_view")} +
diff --git a/src/Components/Shifting/BoardView.tsx b/src/Components/Shifting/BoardView.tsx index c071cc4d934..930d078d9a9 100644 --- a/src/Components/Shifting/BoardView.tsx +++ b/src/Components/Shifting/BoardView.tsx @@ -3,30 +3,30 @@ import { SHIFTING_CHOICES_WARTIME, } from "../../Common/constants"; -import BadgesList from "./BadgesList"; import { ExportButton } from "../Common/Export"; -import ListFilter from "./ListFilter"; import SearchInput from "../Form/SearchInput"; +import BadgesList from "./BadgesList"; import { formatFilter } from "./Commons"; +import ListFilter from "./ListFilter"; +import PageTitle from "@/Components/Common/PageTitle"; +import careConfig from "@careConfig"; +import dayjs from "dayjs"; import { Link, navigate } from "raviger"; -import useFilters from "../../Common/hooks/useFilters"; import { useState } from "react"; import { useTranslation } from "react-i18next"; -import ButtonV2 from "../Common/components/ButtonV2"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import Tabs from "../Common/components/Tabs"; -import careConfig from "@careConfig"; -import KanbanBoard from "../Kanban/Board"; +import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; +import useAuthUser from "../../Common/hooks/useAuthUser"; +import useFilters from "../../Common/hooks/useFilters"; +import routes from "../../Redux/api"; +import request from "../../Utils/request/request"; import { classNames, formatDateTime, formatName } from "../../Utils/utils"; -import dayjs from "dayjs"; +import ButtonV2 from "../Common/components/ButtonV2"; +import Tabs from "../Common/components/Tabs"; import ConfirmDialog from "../Common/ConfirmDialog"; import { ShiftingModel } from "../Facility/models"; -import useAuthUser from "../../Common/hooks/useAuthUser"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import PageTitle from "@/Components/Common/PageTitle"; +import KanbanBoard from "../Kanban/Board"; export default function BoardView() { const { qParams, updateQuery, FilterBadges, advancedFilter } = useFilters({ @@ -81,7 +81,7 @@ export default function BoardView() { return (
-
+
-
+
updateQuery({ [e.name]: e.value })} placeholder={t("search_patient")} /> +
+
+
-
- navigate("/shifting/list", { query: qParams })} - > - - {t("list_view")} - - advancedFilter.setShow(true)} - /> -
+
+ advancedFilter.setShow(true)} /> + navigate("/shifting/list", { query: qParams })} + > + + {t("list_view")} +
diff --git a/src/Components/Shifting/ListView.tsx b/src/Components/Shifting/ListView.tsx index 1c1d63991f6..ad20cd08c02 100644 --- a/src/Components/Shifting/ListView.tsx +++ b/src/Components/Shifting/ListView.tsx @@ -1,27 +1,26 @@ -import { useState } from "react"; -import BadgesList from "./BadgesList"; -import ButtonV2 from "../Common/components/ButtonV2"; -import ConfirmDialog from "../Common/ConfirmDialog"; -import { ExportButton } from "../Common/Export"; -import ListFilter from "./ListFilter"; -import Page from "../Common/components/Page"; -import SearchInput from "../Form/SearchInput"; -import { formatDateTime } from "../../Utils/utils"; -import { formatFilter } from "./Commons"; +import careConfig from "@careConfig"; import { navigate } from "raviger"; -import useFilters from "../../Common/hooks/useFilters"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import dayjs from "../../Utils/dayjs"; +import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; import useAuthUser from "../../Common/hooks/useAuthUser"; -import request from "../../Utils/request/request"; +import useFilters from "../../Common/hooks/useFilters"; import routes from "../../Redux/api"; +import dayjs from "../../Utils/dayjs"; +import request from "../../Utils/request/request"; import useQuery from "../../Utils/request/useQuery"; -import careConfig from "@careConfig"; -import Loading from "@/Components/Common/Loading"; -import { IShift } from "./models"; +import { formatDateTime, formatPatientAge } from "../../Utils/utils"; +import ButtonV2 from "../Common/components/ButtonV2"; +import Page from "../Common/components/Page"; +import ConfirmDialog from "../Common/ConfirmDialog"; +import { ExportButton } from "../Common/Export"; +import SearchInput from "../Form/SearchInput"; +import BadgesList from "./BadgesList"; +import { formatFilter } from "./Commons"; +import ListFilter from "./ListFilter"; +import Loading from "@/Components/Common/Loading"; export default function ListView() { const { qParams, @@ -32,17 +31,14 @@ export default function ListView() { resultsPerPage, } = useFilters({ cacheBlacklist: ["patient_name"] }); - const [modalFor, setModalFor] = useState<{ - external_id: string | undefined; - loading: boolean; - }>({ - external_id: undefined, + const [modalFor, setModalFor] = useState({ + externalId: undefined, loading: false, }); const authUser = useAuthUser(); const { t } = useTranslation(); - const handleTransferComplete = async (shift: IShift) => { + const handleTransferComplete = async (shift: any) => { setModalFor({ ...modalFor, loading: true }); await request(routes.completeTransfer, { pathParams: { externalId: shift.external_id }, @@ -63,190 +59,172 @@ export default function ListView() { }), }); - const showShiftingCardList = (data: IShift[]) => { - if (loading) { - return ; - } - - if (!data || data.length === 0) { + const showShiftingCardList = (data: any) => { + if (data && !data.length) { return ( -
-
- {t("no_patients_to_show")} -
+
+ {t("no_patients_to_show")}
); } - return ( -
- {data.map((shift: IShift) => ( -
-
-
+ return data.map((shift: any) => ( +
+
+
+
+
+
+ {shift.patient_object.name} -{" "} + {formatPatientAge(shift.patient_object, true)} +
-
-
- {shift.patient_object.name} - {shift.patient_object.age} -
-
- {shift.emergency && ( - - {t("emergency")} - - )} -
+ {shift.emergency && ( + + {t("emergency")} + + )} +
+
+
+
+
+ +
+ {shift.status} +
+ +
+
+
+ +
+ {shift.patient_object.phone_number || ""} +
+ +
+
+
+ +
+ {(shift.origin_facility_object || {}).name} +
+ +
+ {careConfig.wartimeShifting && ( +
+
+ +
+ {(shift.shifting_approving_facility_object || {}).name} +
+
-
-
-
- -
- {shift.status} -
- -
-
-
- -
- {shift.patient_object.phone_number || ""} -
- -
-
-
- -
- {(shift.origin_facility_object || {}).name} -
- -
- {careConfig.wartimeShifting && ( -
-
- -
- { - (shift.shifting_approving_facility_object || {}) - .name - } -
- -
- )} -
-
- - -
- {shift.assigned_facility_external || - shift.assigned_facility_object?.name || - t("yet_to_be_decided")} -
- -
+ )} +
+
+ -
-
- -
- {formatDateTime(shift.modified_date) || "--"} -
- -
+
+ {shift.assigned_facility_external || + shift.assigned_facility_object?.name || + t("yet_to_be_decided")} +
+ +
-
-
- -
- {shift.patient_object.address || "--"} -
- -
- +
+
+ +
+ {formatDateTime(shift.modified_date) || "--"} +
+
-
- navigate(`/shifting/${shift.external_id}`)} - variant="secondary" - border - className="w-full" +
+
- {" "} - {t("all_details")} - + +
+ {shift.patient_object.address || "--"} +
+
- {shift.status === "COMPLETED" && shift.assigned_facility && ( -
- - setModalFor({ - external_id: shift.external_id, - loading: false, - }) - } - > - {t("transfer_to_receiving_facility")} - - - setModalFor({ external_id: undefined, loading: false }) - } - onConfirm={() => handleTransferComplete(shift)} - /> -
- )} -
+ +
+ +
+ navigate(`/shifting/${shift.external_id}`)} + variant="secondary" + border + className="w-full" + > + {t("all_details")} +
+ {shift.status === "COMPLETED" && shift.assigned_facility && ( +
+ setModalFor(shift.external_id)} + > + {t("transfer_to_receiving_facility")} + + + setModalFor({ externalId: undefined, loading: false }) + } + onConfirm={() => handleTransferComplete(shift)} + /> +
+ )}
- ))} +
- ); + )); }; return ( @@ -267,7 +245,9 @@ export default function ListView() { breadcrumbs={false} options={ <> -
+
+ +
-
- {/* dummy div to align space as per board view */} -
-
+ +
+ advancedFilter.setShow(true)} + /> navigate("/shifting/board", { query: qParams })} @@ -286,10 +267,6 @@ export default function ListView() { {t("board_view")} - - advancedFilter.setShow(true)} - />
} @@ -300,9 +277,9 @@ export default function ListView() { ) : (
-
+
- {showShiftingCardList(shiftData?.results || [])} - +
+ {showShiftingCardList(shiftData?.results || [])} +
From eb78865fbcff230714a210972ef572c0e19b1ed9 Mon Sep 17 00:00:00 2001 From: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> Date: Wed, 23 Oct 2024 15:26:08 +0530 Subject: [PATCH 02/16] Update src/Components/Shifting/ListView.tsx --- src/Components/Shifting/ListView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Shifting/ListView.tsx b/src/Components/Shifting/ListView.tsx index ad20cd08c02..6f17d44dd2b 100644 --- a/src/Components/Shifting/ListView.tsx +++ b/src/Components/Shifting/ListView.tsx @@ -76,7 +76,7 @@ export default function ListView() {
{shift.patient_object.name} -{" "} - {formatPatientAge(shift.patient_object, true)} + {shift.patient_object.age}
{shift.emergency && ( From e6f746fc6e7461dceb4829d00fef9b7daa57ba4b Mon Sep 17 00:00:00 2001 From: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> Date: Wed, 23 Oct 2024 15:36:39 +0530 Subject: [PATCH 03/16] removed the import --- src/Components/Shifting/ListView.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Components/Shifting/ListView.tsx b/src/Components/Shifting/ListView.tsx index 6f17d44dd2b..cfcaa223864 100644 --- a/src/Components/Shifting/ListView.tsx +++ b/src/Components/Shifting/ListView.tsx @@ -10,7 +10,7 @@ import routes from "../../Redux/api"; import dayjs from "../../Utils/dayjs"; import request from "../../Utils/request/request"; import useQuery from "../../Utils/request/useQuery"; -import { formatDateTime, formatPatientAge } from "../../Utils/utils"; +import { formatDateTime } from "../../Utils/utils"; import ButtonV2 from "../Common/components/ButtonV2"; import Page from "../Common/components/Page"; import ConfirmDialog from "../Common/ConfirmDialog"; @@ -75,8 +75,7 @@ export default function ListView() {
- {shift.patient_object.name} -{" "} - {shift.patient_object.age} + {shift.patient_object.name} - {shift.patient_object.age}
{shift.emergency && ( From ddea23229fa2afaed8b5824b5d000dff8ac61e02 Mon Sep 17 00:00:00 2001 From: AnveshNalimela Date: Mon, 28 Oct 2024 00:06:32 +0530 Subject: [PATCH 04/16] Made the UI Redesign in Shifting list view --- src/Components/Shifting/ListView.tsx | 245 ++++++++++++++------------- 1 file changed, 124 insertions(+), 121 deletions(-) diff --git a/src/Components/Shifting/ListView.tsx b/src/Components/Shifting/ListView.tsx index cfcaa223864..686bb6c48c9 100644 --- a/src/Components/Shifting/ListView.tsx +++ b/src/Components/Shifting/ListView.tsx @@ -7,13 +7,10 @@ import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover" import useAuthUser from "../../Common/hooks/useAuthUser"; import useFilters from "../../Common/hooks/useFilters"; import routes from "../../Redux/api"; -import dayjs from "../../Utils/dayjs"; import request from "../../Utils/request/request"; import useQuery from "../../Utils/request/useQuery"; -import { formatDateTime } from "../../Utils/utils"; import ButtonV2 from "../Common/components/ButtonV2"; import Page from "../Common/components/Page"; -import ConfirmDialog from "../Common/ConfirmDialog"; import { ExportButton } from "../Common/Export"; import SearchInput from "../Form/SearchInput"; import BadgesList from "./BadgesList"; @@ -21,6 +18,8 @@ import { formatFilter } from "./Commons"; import ListFilter from "./ListFilter"; import Loading from "@/Components/Common/Loading"; +import { formatDateTime } from "@/Utils/utils"; +import ConfirmDialog from "../Common/ConfirmDialog"; export default function ListView() { const { qParams, @@ -69,127 +68,124 @@ export default function ListView() { } return data.map((shift: any) => ( -
-
-
-
-
-
- {shift.patient_object.name} - {shift.patient_object.age} -
-
- {shift.emergency && ( - - {t("emergency")} - - )} -
-
-
-
-
- -
- {shift.status} -
- -
-
-
- -
- {shift.patient_object.phone_number || ""} -
- -
-
-
- -
- {(shift.origin_facility_object || {}).name} -
- -
- {careConfig.wartimeShifting && ( -
-
- -
- {(shift.shifting_approving_facility_object || {}).name} -
- -
- )} -
-
- - -
- {shift.assigned_facility_external || - shift.assigned_facility_object?.name || - t("yet_to_be_decided")} -
- -
+
+
+
+
+ {shift.patient_object.name} +
+
+ {shift.patient_object.age} +
+
-
-
- -
- {formatDateTime(shift.modified_date) || "--"} -
- -
+
+
+
+ +
+ {shift.patient_object.phone_number || ""} +
+ +
+
+
+ +
+ {shift.patient_object.address || "--"} +
+ +
+
-
-
- -
- {shift.patient_object.address || "--"} -
- -
-
+
+
+
+ +
{shift.status}
+ +
+ {shift.emergency && ( + + {t("emergency")} + + )} +
-
- navigate(`/shifting/${shift.external_id}`)} - variant="secondary" - border - className="w-full" +
+
- {t("all_details")} - + +
+ {formatDateTime(shift.modified_date) || "--"} +
+
+
+ +
+
+ +
+ {(shift.origin_facility_object || {}).name} +
+ + + {careConfig.wartimeShifting && ( +
+ +
+ {(shift.shifting_approving_facility_object || {}).name} +
+ + )} + +
+ +
+ {shift.assigned_facility_external || + shift.assigned_facility_object?.name || + t("yet_to_be_decided")} +
+ +
+
+ navigate(`/shifting/${shift.external_id}`)} + variant="secondary" + border + className="w-full" + > + {t("all_details")} + {shift.status === "COMPLETED" && shift.assigned_facility && (
- -
- {showShiftingCardList(shiftData?.results || [])} +
+
+
PATIENTS
+
CONTACT_INFO
+
STATUS
+
FACILTIES
+
ACTIONS
+
+
{showShiftingCardList(shiftData?.results || [])}
+
From 1bf46458d4ee941ca338faf0f38605934335d375 Mon Sep 17 00:00:00 2001 From: AnveshNalimela Date: Wed, 30 Oct 2024 21:24:13 +0530 Subject: [PATCH 05/16] added i18n translation in List View --- src/Components/Shifting/ListView.tsx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/Components/Shifting/ListView.tsx b/src/Components/Shifting/ListView.tsx index 686bb6c48c9..42e5dc3bee6 100644 --- a/src/Components/Shifting/ListView.tsx +++ b/src/Components/Shifting/ListView.tsx @@ -287,11 +287,20 @@ export default function ListView() {
-
PATIENTS
-
CONTACT_INFO
-
STATUS
-
FACILTIES
-
ACTIONS
+
+ {t("patients").toUpperCase()} +
+
CONTACT INFO
+
+ {t("consent__status").toUpperCase()} +
+
+ {t("facilities").toUpperCase()} +
+
+ {" "} + {t("LOG_UPDATE_FIELD_LABEL__action").toUpperCase()} +
{showShiftingCardList(shiftData?.results || [])}
From 8bf77c76e3159e1b1e1c0dcd00e505cbf5351f33 Mon Sep 17 00:00:00 2001 From: AnveshNalimela Date: Fri, 1 Nov 2024 19:51:02 +0530 Subject: [PATCH 06/16] Reset the files --- src/Locale/en.json | 1 + src/Locale/hi.json | 3 +- src/Locale/kn.json | 3 +- src/Locale/ml.json | 3 +- src/Locale/mr.json | 1 + src/Locale/ta.json | 3 +- src/components/Shifting/BoardView.tsx | 34 +-- src/components/Shifting/ListView.tsx | 404 +++++++++++++------------- 8 files changed, 224 insertions(+), 228 deletions(-) diff --git a/src/Locale/en.json b/src/Locale/en.json index fa5bdeb6aff..e592fc47be6 100644 --- a/src/Locale/en.json +++ b/src/Locale/en.json @@ -472,6 +472,7 @@ "consultation_not_filed_description": "Please file a consultation for this patient to continue.", "consultation_notes": "General Instructions (Advice)", "consultation_updates": "Consultation updates", + "contact_info": "Contact Info", "contact_number": "Contact Number", "contact_person": "Name of Contact Person at Facility", "contact_person_at_the_facility": "Contact person at the current facility", diff --git a/src/Locale/hi.json b/src/Locale/hi.json index 20a822323bf..a6baaab0225 100644 --- a/src/Locale/hi.json +++ b/src/Locale/hi.json @@ -16,6 +16,7 @@ "Facilities": "सुविधाएँ", "GENDER__1": "पुरुष", "GENDER__2": "महिला", + "contact_info": "संपर्क जानकारी", "GENDER__3": "नॉन-बाइनरी", "HEARTBEAT_RHYTHM__IRREGULAR": "अनियमित", "HEARTBEAT_RHYTHM__REGULAR": "नियमित", @@ -809,4 +810,4 @@ "you_need_at_least_a_location_to_create_an_assest": "संपत्ति बनाने के लिए आपको कम से कम एक स्थान की आवश्यकता होगी।", "zoom_in": "ज़ूम इन", "zoom_out": "ज़ूम आउट" -} \ No newline at end of file +} diff --git a/src/Locale/kn.json b/src/Locale/kn.json index 0fa96427b85..8c6b593aa73 100644 --- a/src/Locale/kn.json +++ b/src/Locale/kn.json @@ -14,6 +14,7 @@ "DOCTORS_LOG": "ಪ್ರಗತಿ ಟಿಪ್ಪಣಿ", "Dashboard": "ಡ್ಯಾಶ್‌ಬೋರ್ಡ್", "Facilities": "ಸೌಲಭ್ಯಗಳು", + "contact_info": "ಸಂಪರ್ಕ ಮಾಹಿತಿ", "GENDER__1": "ಪುರುಷ", "GENDER__2": "ಹೆಣ್ಣು", "GENDER__3": "ಬೈನರಿ ಅಲ್ಲದ", @@ -809,4 +810,4 @@ "you_need_at_least_a_location_to_create_an_assest": "ಆಸ್ತಿಯನ್ನು ರಚಿಸಲು ನಿಮಗೆ ಕನಿಷ್ಠ ಸ್ಥಳದ ಅಗತ್ಯವಿದೆ.", "zoom_in": "ಜೂಮ್ ಇನ್", "zoom_out": "ಜೂಮ್ ಔಟ್" -} \ No newline at end of file +} diff --git a/src/Locale/ml.json b/src/Locale/ml.json index b9a45ca73fb..dd02973f222 100644 --- a/src/Locale/ml.json +++ b/src/Locale/ml.json @@ -81,6 +81,7 @@ "Patients": "രോഗികൾ", "Profile": "പ്രൊഫൈൽ", "REGULAR": "പതിവ്", + "contact_info": "ബന്ധപ്പെടാനുള്ള വിവരങ്ങൾ", "RESPIRATORY_SUPPORT_SHORT__INVASIVE": "IV", "RESPIRATORY_SUPPORT_SHORT__NON_INVASIVE": "എൻ.ഐ.വി", "RESPIRATORY_SUPPORT_SHORT__OXYGEN_SUPPORT": "O2 പിന്തുണ", @@ -809,4 +810,4 @@ "you_need_at_least_a_location_to_create_an_assest": "ഒരു അസസ്‌റ്റ് സൃഷ്‌ടിക്കാൻ നിങ്ങൾക്ക് ഒരു ലൊക്കേഷനെങ്കിലും ആവശ്യമാണ്.", "zoom_in": "സൂം ഇൻ ചെയ്യുക", "zoom_out": "സൂം ഔട്ട്" -} \ No newline at end of file +} diff --git a/src/Locale/mr.json b/src/Locale/mr.json index 06e9c5bbbde..3517f9e116a 100644 --- a/src/Locale/mr.json +++ b/src/Locale/mr.json @@ -19,6 +19,7 @@ "View Facility": "हॉस्पिटल पाहा", "Ward": "वॉर्ड", "advanced_filters": "अद्ययावत फिल्टर ", + "contact_info": "संपर्क माहिती", "age": "वय", "already_a_member": "आधीपासून सदस्य आहात?", "auth_login_title": "अधिकृत लॉगिन", diff --git a/src/Locale/ta.json b/src/Locale/ta.json index fb5dd0a72c8..c22becca620 100644 --- a/src/Locale/ta.json +++ b/src/Locale/ta.json @@ -63,6 +63,7 @@ "PRESCRIPTION_FREQUENCY_QWK": "வாரம் ஒருமுறை", "PRESCRIPTION_FREQUENCY_STAT": "உடனடியாக", "PRESCRIPTION_FREQUENCY_TID": "8வது மணிநேரம்", + "contact_info": "தொடர்பு தகவல்", "PRESCRIPTION_ROUTE_IM": "ஐ.எம்", "PRESCRIPTION_ROUTE_INHALATION": "உள்ளிழுத்தல்", "PRESCRIPTION_ROUTE_INTRATHECAL": "உள்நோக்கி ஊசி", @@ -809,4 +810,4 @@ "you_need_at_least_a_location_to_create_an_assest": "ஒரு அசெஸ்ட்டை உருவாக்க குறைந்தபட்சம் ஒரு இருப்பிடமாவது தேவை.", "zoom_in": "பெரிதாக்கவும்", "zoom_out": "பெரிதாக்கவும்" -} \ No newline at end of file +} diff --git a/src/components/Shifting/BoardView.tsx b/src/components/Shifting/BoardView.tsx index d05fcab2a9e..8794941f51d 100644 --- a/src/components/Shifting/BoardView.tsx +++ b/src/components/Shifting/BoardView.tsx @@ -3,30 +3,30 @@ import { SHIFTING_CHOICES_WARTIME, } from "@/common/constants"; -import BadgesList from "./BadgesList"; import { ExportButton } from "@/components/Common/Export"; -import ListFilter from "./ListFilter"; import SearchInput from "../Form/SearchInput"; +import BadgesList from "./BadgesList"; import { formatFilter } from "./Commons"; +import ListFilter from "./ListFilter"; -import { Link, navigate } from "raviger"; +import useAuthUser from "@/common/hooks/useAuthUser"; import useFilters from "@/common/hooks/useFilters"; -import { useState } from "react"; -import { useTranslation } from "react-i18next"; import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import CareIcon from "../../CAREUI/icons/CareIcon"; import Tabs from "@/components/Common/components/Tabs"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; +import PageTitle from "@/components/Common/PageTitle"; import careConfig from "@careConfig"; -import KanbanBoard from "../Kanban/Board"; -import { classNames, formatDateTime, formatName } from "../../Utils/utils"; import dayjs from "dayjs"; -import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import { ShiftingModel } from "../Facility/models"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import request from "../../Utils/request/request"; +import { Link, navigate } from "raviger"; +import { useState } from "react"; +import { useTranslation } from "react-i18next"; +import CareIcon from "../../CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; import routes from "../../Redux/api"; -import PageTitle from "@/components/Common/PageTitle"; +import request from "../../Utils/request/request"; +import { classNames, formatDateTime, formatName } from "../../Utils/utils"; +import { ShiftingModel } from "../Facility/models"; +import KanbanBoard from "../Kanban/Board"; export default function BoardView() { const { qParams, updateQuery, FilterBadges, advancedFilter } = useFilters({ @@ -120,6 +120,9 @@ export default function BoardView() { />
+ advancedFilter.setShow(true)} + /> navigate("/shifting/list", { query: qParams })} @@ -127,9 +130,6 @@ export default function BoardView() { {t("list_view")} - advancedFilter.setShow(true)} - />
diff --git a/src/components/Shifting/ListView.tsx b/src/components/Shifting/ListView.tsx index e74f80107b0..14d66729ab4 100644 --- a/src/components/Shifting/ListView.tsx +++ b/src/components/Shifting/ListView.tsx @@ -1,27 +1,24 @@ -import { useState } from "react"; -import BadgesList from "./BadgesList"; +import useAuthUser from "@/common/hooks/useAuthUser"; +import useFilters from "@/common/hooks/useFilters"; import ButtonV2 from "@/components/Common/components/ButtonV2"; +import Page from "@/components/Common/components/Page"; import ConfirmDialog from "@/components/Common/ConfirmDialog"; import { ExportButton } from "@/components/Common/Export"; -import ListFilter from "./ListFilter"; -import Page from "@/components/Common/components/Page"; -import SearchInput from "../Form/SearchInput"; -import { formatDateTime } from "../../Utils/utils"; -import { formatFilter } from "./Commons"; +import Loading from "@/components/Common/Loading"; +import careConfig from "@careConfig"; import { navigate } from "raviger"; -import useFilters from "@/common/hooks/useFilters"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import dayjs from "../../Utils/dayjs"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import request from "../../Utils/request/request"; +import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; import routes from "../../Redux/api"; +import request from "../../Utils/request/request"; import useQuery from "../../Utils/request/useQuery"; -import careConfig from "@careConfig"; -import Loading from "@/components/Common/Loading"; -import { IShift } from "./models"; - +import { formatDateTime } from "../../Utils/utils"; +import SearchInput from "../Form/SearchInput"; +import BadgesList from "./BadgesList"; +import { formatFilter } from "./Commons"; +import ListFilter from "./ListFilter"; export default function ListView() { const { qParams, @@ -32,17 +29,14 @@ export default function ListView() { resultsPerPage, } = useFilters({ cacheBlacklist: ["patient_name"] }); - const [modalFor, setModalFor] = useState<{ - external_id: string | undefined; - loading: boolean; - }>({ - external_id: undefined, + const [modalFor, setModalFor] = useState({ + externalId: undefined, loading: false, }); const authUser = useAuthUser(); const { t } = useTranslation(); - const handleTransferComplete = async (shift: IShift) => { + const handleTransferComplete = async (shift: any) => { setModalFor({ ...modalFor, loading: true }); await request(routes.completeTransfer, { pathParams: { externalId: shift.external_id }, @@ -63,190 +57,168 @@ export default function ListView() { }), }); - const showShiftingCardList = (data: IShift[]) => { - if (loading) { - return ; - } - - if (!data || data.length === 0) { + const showShiftingCardList = (data: any) => { + if (data && !data.length) { return ( -
-
- {t("no_patients_to_show")} -
+
+ {t("no_patients_to_show")}
); } - return ( -
- {data.map((shift: IShift) => ( -
-
-
-
-
-
- {shift.patient_object.name} - {shift.patient_object.age} -
-
- {shift.emergency && ( - - {t("emergency")} - - )} -
-
-
-
-
- -
- {shift.status} -
- -
-
-
- -
- {shift.patient_object.phone_number || ""} -
- -
-
-
- -
- {(shift.origin_facility_object || {}).name} -
- -
- {careConfig.wartimeShifting && ( -
-
- -
- { - (shift.shifting_approving_facility_object || {}) - .name - } -
- -
- )} -
-
- - -
- {shift.assigned_facility_external || - shift.assigned_facility_object?.name || - t("yet_to_be_decided")} -
- -
- -
-
- -
- {formatDateTime(shift.modified_date) || "--"} -
- -
+ return data.map((shift: any) => ( +
+
+
+
+ {shift.patient_object.name} +
+
+ {shift.patient_object.age} +
+
-
-
- -
- {shift.patient_object.address || "--"} -
- -
-
-
+
+
+
+ +
+ {shift.patient_object.phone_number || ""} +
+ +
+
+
+ +
+ {shift.patient_object.address || "--"} +
+ +
+
-
- navigate(`/shifting/${shift.external_id}`)} - variant="secondary" - border - className="w-full" - > - {" "} - {t("all_details")} - -
- {shift.status === "COMPLETED" && shift.assigned_facility && ( -
- - setModalFor({ - external_id: shift.external_id, - loading: false, - }) - } - > - {t("transfer_to_receiving_facility")} - - - setModalFor({ external_id: undefined, loading: false }) - } - onConfirm={() => handleTransferComplete(shift)} - /> -
+
+
+
+ +
{shift.status}
+ +
+ {shift.emergency && ( + + {t("emergency")} + )}
+ +
+
+ +
+ {formatDateTime(shift.modified_date) || "--"} +
+ +
+
+ +
+
+ +
+ {(shift.origin_facility_object || {}).name} +
+ + + {careConfig.wartimeShifting && ( +
+ +
+ {(shift.shifting_approving_facility_object || {}).name} +
+ + )} + +
+ +
+ {shift.assigned_facility_external || + shift.assigned_facility_object?.name || + t("yet_to_be_decided")} +
+ +
+
+ navigate(`/shifting/${shift.external_id}`)} + variant="secondary" + border + className="w-full" + > + {t("all_details")} + + {shift.status === "COMPLETED" && shift.assigned_facility && ( +
+ setModalFor(shift.external_id)} + > + {t("transfer_to_receiving_facility")} + + + setModalFor({ externalId: undefined, loading: false }) + } + onConfirm={() => handleTransferComplete(shift)} + /> +
+ )}
- ))} +
- ); + )); }; return ( @@ -267,7 +239,9 @@ export default function ListView() { breadcrumbs={false} options={ <> -
+
+ +
-
- {/* dummy div to align space as per board view */} -
-
+ +
+ advancedFilter.setShow(true)} + /> navigate("/shifting/board", { query: qParams })} @@ -286,10 +261,6 @@ export default function ListView() { {t("board_view")} - - advancedFilter.setShow(true)} - />
} @@ -300,9 +271,9 @@ export default function ListView() { ) : (
-
+
- - {showShiftingCardList(shiftData?.results || [])} +
+
+
+ {t("patients").toUpperCase()} +
+
+ {t("contact_info").toUpperCase()} +
+
+ {t("consent__status").toUpperCase()} +
+
+ {t("facilities").toUpperCase()} +
+
+ {" "} + {t("LOG_UPDATE_FIELD_LABEL__action").toUpperCase()} +
+
+
{showShiftingCardList(shiftData?.results || [])}
+
From 9249fc9c10b32d0dd9b0caaf50d078a9b21b0604 Mon Sep 17 00:00:00 2001 From: AnveshNalimela Date: Sat, 2 Nov 2024 11:04:39 +0530 Subject: [PATCH 07/16] added uppercase className and remove translations from other languages --- src/Locale/hi.json | 1 - src/Locale/kn.json | 1 - src/Locale/ml.json | 1 - src/Locale/mr.json | 1 - src/Locale/ta.json | 1 - src/components/Shifting/ShiftingList.tsx | 21 ++++++++++----------- 6 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/Locale/hi.json b/src/Locale/hi.json index a6baaab0225..0eb0cc28cfd 100644 --- a/src/Locale/hi.json +++ b/src/Locale/hi.json @@ -16,7 +16,6 @@ "Facilities": "सुविधाएँ", "GENDER__1": "पुरुष", "GENDER__2": "महिला", - "contact_info": "संपर्क जानकारी", "GENDER__3": "नॉन-बाइनरी", "HEARTBEAT_RHYTHM__IRREGULAR": "अनियमित", "HEARTBEAT_RHYTHM__REGULAR": "नियमित", diff --git a/src/Locale/kn.json b/src/Locale/kn.json index 8c6b593aa73..be18432e0ce 100644 --- a/src/Locale/kn.json +++ b/src/Locale/kn.json @@ -14,7 +14,6 @@ "DOCTORS_LOG": "ಪ್ರಗತಿ ಟಿಪ್ಪಣಿ", "Dashboard": "ಡ್ಯಾಶ್‌ಬೋರ್ಡ್", "Facilities": "ಸೌಲಭ್ಯಗಳು", - "contact_info": "ಸಂಪರ್ಕ ಮಾಹಿತಿ", "GENDER__1": "ಪುರುಷ", "GENDER__2": "ಹೆಣ್ಣು", "GENDER__3": "ಬೈನರಿ ಅಲ್ಲದ", diff --git a/src/Locale/ml.json b/src/Locale/ml.json index dd02973f222..cf381c32c0e 100644 --- a/src/Locale/ml.json +++ b/src/Locale/ml.json @@ -81,7 +81,6 @@ "Patients": "രോഗികൾ", "Profile": "പ്രൊഫൈൽ", "REGULAR": "പതിവ്", - "contact_info": "ബന്ധപ്പെടാനുള്ള വിവരങ്ങൾ", "RESPIRATORY_SUPPORT_SHORT__INVASIVE": "IV", "RESPIRATORY_SUPPORT_SHORT__NON_INVASIVE": "എൻ.ഐ.വി", "RESPIRATORY_SUPPORT_SHORT__OXYGEN_SUPPORT": "O2 പിന്തുണ", diff --git a/src/Locale/mr.json b/src/Locale/mr.json index 3517f9e116a..06e9c5bbbde 100644 --- a/src/Locale/mr.json +++ b/src/Locale/mr.json @@ -19,7 +19,6 @@ "View Facility": "हॉस्पिटल पाहा", "Ward": "वॉर्ड", "advanced_filters": "अद्ययावत फिल्टर ", - "contact_info": "संपर्क माहिती", "age": "वय", "already_a_member": "आधीपासून सदस्य आहात?", "auth_login_title": "अधिकृत लॉगिन", diff --git a/src/Locale/ta.json b/src/Locale/ta.json index c22becca620..694efd52e20 100644 --- a/src/Locale/ta.json +++ b/src/Locale/ta.json @@ -63,7 +63,6 @@ "PRESCRIPTION_FREQUENCY_QWK": "வாரம் ஒருமுறை", "PRESCRIPTION_FREQUENCY_STAT": "உடனடியாக", "PRESCRIPTION_FREQUENCY_TID": "8வது மணிநேரம்", - "contact_info": "தொடர்பு தகவல்", "PRESCRIPTION_ROUTE_IM": "ஐ.எம்", "PRESCRIPTION_ROUTE_INHALATION": "உள்ளிழுத்தல்", "PRESCRIPTION_ROUTE_INTRATHECAL": "உள்நோக்கி ஊசி", diff --git a/src/components/Shifting/ShiftingList.tsx b/src/components/Shifting/ShiftingList.tsx index c80e8463649..2e8fef07f79 100644 --- a/src/components/Shifting/ShiftingList.tsx +++ b/src/components/Shifting/ShiftingList.tsx @@ -286,21 +286,20 @@ export default function ListView() {
-
- {t("patients").toUpperCase()} +
+ {t("patients")}
-
- {t("contact_info").toUpperCase()} +
+ {t("contact_info")}
-
- {t("consent__status").toUpperCase()} +
+ {t("consent__status")}
-
- {t("facilities").toUpperCase()} +
+ {t("facilities")}
-
- {" "} - {t("LOG_UPDATE_FIELD_LABEL__action").toUpperCase()} +
+ {t("LOG_UPDATE_FIELD_LABEL__action")}
{showShiftingCardList(shiftData?.results || [])}
From 548707a652725050825cc45d5c3954c4e3128d38 Mon Sep 17 00:00:00 2001 From: AnveshNalimela Date: Sat, 2 Nov 2024 16:27:09 +0530 Subject: [PATCH 08/16] made view Responsive for sm,md screens --- src/components/Shifting/ShiftingList.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Shifting/ShiftingList.tsx b/src/components/Shifting/ShiftingList.tsx index 2e8fef07f79..9087ae54bd1 100644 --- a/src/components/Shifting/ShiftingList.tsx +++ b/src/components/Shifting/ShiftingList.tsx @@ -71,7 +71,7 @@ export default function ListView() { key={`shift_${shift.id}`} className="w-full border-b-2 border-gray-100" > -
+
{shift.patient_object.name} @@ -285,7 +285,7 @@ export default function ListView() {
-
+
{t("patients")}
From 413ff0e9d802b17b8222ed3988281e3b72ddb572 Mon Sep 17 00:00:00 2001 From: AnveshNalimela Date: Sat, 2 Nov 2024 17:38:33 +0530 Subject: [PATCH 09/16] added shiftingModel type and removed any --- src/components/Shifting/ShiftingList.tsx | 28 +++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/components/Shifting/ShiftingList.tsx b/src/components/Shifting/ShiftingList.tsx index 9087ae54bd1..aa3394a08e7 100644 --- a/src/components/Shifting/ShiftingList.tsx +++ b/src/components/Shifting/ShiftingList.tsx @@ -15,6 +15,7 @@ import routes from "../../Redux/api"; import request from "../../Utils/request/request"; import useQuery from "../../Utils/request/useQuery"; import { formatDateTime } from "../../Utils/utils"; +import { ShiftingModel } from "../Facility/models"; import SearchInput from "../Form/SearchInput"; import BadgesList from "./ShiftingBadges"; import { formatFilter } from "./ShiftingCommons"; @@ -29,10 +30,15 @@ export default function ListView() { resultsPerPage, } = useFilters({ cacheBlacklist: ["patient_name"] }); - const [modalFor, setModalFor] = useState({ + // Adjust the modalFor type definition + const [modalFor, setModalFor] = useState<{ + externalId: string | undefined; + loading: boolean; + }>({ externalId: undefined, loading: false, }); + const authUser = useAuthUser(); const { t } = useTranslation(); @@ -57,7 +63,10 @@ export default function ListView() { }), }); - const showShiftingCardList = (data: any) => { + const showShiftingCardList = (data: ShiftingModel[]) => { + if (loading) { + return ; + } if (data && !data.length) { return (
@@ -66,7 +75,7 @@ export default function ListView() { ); } - return data.map((shift: any) => ( + return data.map((shift: ShiftingModel) => (
setModalFor(shift.external_id)} + onClick={() => + setModalFor({ + externalId: shift.external_id, + loading: false, + }) + } > {t("transfer_to_receiving_facility")} @@ -207,10 +221,14 @@ export default function ListView() { title={t("confirm_transfer_complete")} description={t("mark_transfer_complete_confirmation")} action="Confirm" - show={modalFor === shift.external_id} + show={modalFor.externalId === shift.external_id} // Check the externalId here onClose={() => setModalFor({ externalId: undefined, loading: false }) } + // show={modalFor === shift.external_id} + // onClose={() => + // setModalFor({ externalId: undefined, loading: false }) + // } onConfirm={() => handleTransferComplete(shift)} />
From f76311ac15231a09ee74d10dd1815b634aec7dbf Mon Sep 17 00:00:00 2001 From: AnveshNalimela Date: Tue, 5 Nov 2024 18:30:53 +0530 Subject: [PATCH 10/16] Made resposive and aligned patient to left --- src/components/Shifting/ShiftingList.tsx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/components/Shifting/ShiftingList.tsx b/src/components/Shifting/ShiftingList.tsx index aa3394a08e7..eaf1e0253d9 100644 --- a/src/components/Shifting/ShiftingList.tsx +++ b/src/components/Shifting/ShiftingList.tsx @@ -80,7 +80,7 @@ export default function ListView() { key={`shift_${shift.id}`} className="w-full border-b-2 border-gray-100" > -
+
{shift.patient_object.name} @@ -116,10 +116,10 @@ export default function ListView() {
-
+
{shift.status}
+
{shift.emergency && ( @@ -303,20 +304,20 @@ export default function ListView() {
-
-
+
+
{t("patients")}
-
+
{t("contact_info")}
-
+
{t("consent__status")}
-
+
{t("facilities")}
-
+
{t("LOG_UPDATE_FIELD_LABEL__action")}
From d8acaba8679abe962b34f74efae4c8e251149ef1 Mon Sep 17 00:00:00 2001 From: Anvesh Nalimela <151531961+AnveshNalimela@users.noreply.github.com> Date: Tue, 5 Nov 2024 18:34:11 +0530 Subject: [PATCH 11/16] Update src/Locale/ta.json Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- src/Locale/ta.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Locale/ta.json b/src/Locale/ta.json index 694efd52e20..9d8eccca796 100644 --- a/src/Locale/ta.json +++ b/src/Locale/ta.json @@ -806,7 +806,5 @@ "working_status": "வேலை நிலை", "yes": "ஆம்", "yet_to_be_decided": "இன்னும் முடிவு செய்யப்படவில்லை", - "you_need_at_least_a_location_to_create_an_assest": "ஒரு அசெஸ்ட்டை உருவாக்க குறைந்தபட்சம் ஒரு இருப்பிடமாவது தேவை.", - "zoom_in": "பெரிதாக்கவும்", - "zoom_out": "பெரிதாக்கவும்" + "zoom_out": "சிறிதாக்கவும்" } From b6a5792a11fde5e18279297965efdcb673f3c0a7 Mon Sep 17 00:00:00 2001 From: AnveshNalimela Date: Tue, 5 Nov 2024 18:34:39 +0530 Subject: [PATCH 12/16] Made resposive and aligned patient to left --- src/components/Shifting/ShiftingList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Shifting/ShiftingList.tsx b/src/components/Shifting/ShiftingList.tsx index eaf1e0253d9..f26cf445f2b 100644 --- a/src/components/Shifting/ShiftingList.tsx +++ b/src/components/Shifting/ShiftingList.tsx @@ -119,7 +119,7 @@ export default function ListView() {
Date: Tue, 5 Nov 2024 18:38:38 +0530 Subject: [PATCH 13/16] Made responsive and headings aligned --- src/components/Shifting/ShiftingList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Shifting/ShiftingList.tsx b/src/components/Shifting/ShiftingList.tsx index f26cf445f2b..2f1751280ed 100644 --- a/src/components/Shifting/ShiftingList.tsx +++ b/src/components/Shifting/ShiftingList.tsx @@ -119,7 +119,7 @@ export default function ListView() {
Date: Tue, 5 Nov 2024 20:19:40 +0530 Subject: [PATCH 14/16] added Removed keys --- src/Locale/ta.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Locale/ta.json b/src/Locale/ta.json index 9d8eccca796..2c86198b9ef 100644 --- a/src/Locale/ta.json +++ b/src/Locale/ta.json @@ -806,5 +806,7 @@ "working_status": "வேலை நிலை", "yes": "ஆம்", "yet_to_be_decided": "இன்னும் முடிவு செய்யப்படவில்லை", + "you_need_at_least_a_location_to_create_an_assest": "ஒரு அசெஸ்ட்டை உருவாக்க குறைந்தபட்சம் ஒரு இருப்பிடமாவது தேவை.", + "zoom_in": "பெரிதாக்கவும்", "zoom_out": "சிறிதாக்கவும்" } From 2cd8c0fd08ffe60444b53580c6720937992efb8d Mon Sep 17 00:00:00 2001 From: AnveshNalimela Date: Tue, 5 Nov 2024 22:19:58 +0530 Subject: [PATCH 15/16] added proper types suggested by coderrabitai --- src/components/Shifting/ShiftingList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Shifting/ShiftingList.tsx b/src/components/Shifting/ShiftingList.tsx index 2f1751280ed..34e46e3eafe 100644 --- a/src/components/Shifting/ShiftingList.tsx +++ b/src/components/Shifting/ShiftingList.tsx @@ -42,7 +42,7 @@ export default function ListView() { const authUser = useAuthUser(); const { t } = useTranslation(); - const handleTransferComplete = async (shift: any) => { + const handleTransferComplete = async (shift: ShiftingModel) => { setModalFor({ ...modalFor, loading: true }); await request(routes.completeTransfer, { pathParams: { externalId: shift.external_id }, From 768f494b4a61dd4b5365447d9e077584051b75a2 Mon Sep 17 00:00:00 2001 From: AnveshNalimela Date: Thu, 7 Nov 2024 19:09:51 +0530 Subject: [PATCH 16/16] after resloved --- .env | 2 +- src/components/Shifting/ShiftingList.tsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.env b/.env index b5db3d0088f..77e4641b8b2 100644 --- a/.env +++ b/.env @@ -14,4 +14,4 @@ ESLINT_NO_DEV_ERRORS=true CARE_CDN_URL="https://egov-s3-facility-10bedicu.s3.amazonaws.com https://egov-s3-patient-data-10bedicu.s3.amazonaws.com http://localhost:4566" REACT_ALLOWED_LOCALES="en,hi,ta,ml,mr,kn" -REACT_ENABLED_APPS="" +REACT_ENABLED_APPS="" \ No newline at end of file diff --git a/src/components/Shifting/ShiftingList.tsx b/src/components/Shifting/ShiftingList.tsx index f64971c0f26..6b394ea2b27 100644 --- a/src/components/Shifting/ShiftingList.tsx +++ b/src/components/Shifting/ShiftingList.tsx @@ -1,3 +1,4 @@ +import careConfig from "@careConfig"; import { navigate } from "raviger"; import { useState } from "react"; import { useTranslation } from "react-i18next"; @@ -13,15 +14,16 @@ import Page from "@/components/Common/Page"; import { ShiftingModel } from "@/components/Facility/models"; import SearchInput from "@/components/Form/SearchInput"; import BadgesList from "@/components/Shifting/ShiftingBadges"; -import ShiftingBlock from "@/components/Shifting/ShiftingBlock"; import { formatFilter } from "@/components/Shifting/ShiftingCommons"; import ListFilter from "@/components/Shifting/ShiftingFilters"; +import useAuthUser from "@/hooks/useAuthUser"; import useFilters from "@/hooks/useFilters"; import routes from "@/Utils/request/api"; import request from "@/Utils/request/request"; import useQuery from "@/Utils/request/useQuery"; +import { formatDateTime } from "@/Utils/utils"; export default function ListView() { const {