diff --git a/src/Components/Assets/AssetsList.tsx b/src/Components/Assets/AssetsList.tsx index e36e348a635..89d4ae5afc3 100644 --- a/src/Components/Assets/AssetsList.tsx +++ b/src/Components/Assets/AssetsList.tsx @@ -48,6 +48,7 @@ const AssetsList = () => { const [totalCount, setTotalCount] = useState(0); const [facility, setFacility] = useState(); const [asset_type, setAssetType] = useState(); + const [facilityName, setFacilityName] = useState(); const [asset_class, setAssetClass] = useState(); const [locationName, setLocationName] = useState(); const [importAssetModalOpen, setImportAssetModalOpen] = useState(false); @@ -118,6 +119,14 @@ const AssetsList = () => { }, [dispatch, fetchData] ); + useEffect(() => { + async function fetchFacilityName() { + if (!qParams.facility) return setFacilityName(""); + const res = await dispatch(getAnyFacility(qParams.facility, "facility")); + setFacilityName(res?.data?.name); + } + fetchFacilityName(); + }, [dispatch, qParams.facility]); const fetchFacility = useCallback( async (status: statusType) => { @@ -367,14 +376,14 @@ const AssetsList = () => { - + {isLoading ? ( ) : ( <> [ - value("Facility", ["facility", "location"], facility?.name || ""), + value("Facility", "facility", facilityName || ""), badge("Name/Serial No./QR ID", "search"), value("Asset Type", "asset_type", asset_type || ""), value("Asset Class", "asset_class", asset_class || ""), diff --git a/src/Components/ExternalResult/ResultList.tsx b/src/Components/ExternalResult/ResultList.tsx index 345f49d5c80..15184561752 100644 --- a/src/Components/ExternalResult/ResultList.tsx +++ b/src/Components/ExternalResult/ResultList.tsx @@ -334,7 +334,11 @@ export default function ResultList() { - + ); } diff --git a/src/Components/Facility/HospitalList.tsx b/src/Components/Facility/HospitalList.tsx index a61e7178c57..e00aeb4bc6a 100644 --- a/src/Components/Facility/HospitalList.tsx +++ b/src/Components/Facility/HospitalList.tsx @@ -258,7 +258,7 @@ export const HospitalList = () => { - + [ badge("Facility/District Name", "search"), diff --git a/src/Components/Patient/ManagePatients.tsx b/src/Components/Patient/ManagePatients.tsx index 542c7e58b0e..f0ae836869b 100644 --- a/src/Components/Patient/ManagePatients.tsx +++ b/src/Components/Patient/ManagePatients.tsx @@ -882,7 +882,7 @@ export const PatientManager = () => { />
- + updateQuery({ is_active: tab ? "False" : "True" })} options={[ diff --git a/src/Components/Patient/SampleViewAdmin.tsx b/src/Components/Patient/SampleViewAdmin.tsx index 67a4f607009..b7105ef2fd5 100644 --- a/src/Components/Patient/SampleViewAdmin.tsx +++ b/src/Components/Patient/SampleViewAdmin.tsx @@ -378,7 +378,7 @@ export default function SampleViewAdmin() {
advancedFilter.setShow(true)} /> - + [ diff --git a/src/Components/Resource/BadgesList.tsx b/src/Components/Resource/BadgesList.tsx index 1afa6332bae..f5aeccb064c 100644 --- a/src/Components/Resource/BadgesList.tsx +++ b/src/Components/Resource/BadgesList.tsx @@ -1,6 +1,7 @@ import { useState, useEffect } from "react"; import { getAnyFacility } from "../../Redux/actions"; import { useDispatch } from "react-redux"; +import { SHIFTING_FILTER_ORDER } from "../../Common/constants"; export default function BadgesList(props: any) { const { appliedFilters, FilterBadges } = props; @@ -43,10 +44,24 @@ export default function BadgesList(props: any) { fetchData(); }, [dispatch, appliedFilters.assigned_facility]); + const getDescShiftingFilterOrder = (ordering: any) => { + let desc = ""; + SHIFTING_FILTER_ORDER.map((item: any) => { + if (item.text === ordering) { + desc = item.desc; + } + }); + return desc; + }; + return ( [ - badge("Ordering", "ordering"), + value( + "Ordering", + "ordering", + getDescShiftingFilterOrder(appliedFilters.ordering) + ), badge("Status", "status"), boolean("Emergency", "emergency", { trueValue: "yes", diff --git a/src/Components/Resource/ListView.tsx b/src/Components/Resource/ListView.tsx index 6d88814dc69..222bce4f3a0 100644 --- a/src/Components/Resource/ListView.tsx +++ b/src/Components/Resource/ListView.tsx @@ -248,7 +248,11 @@ export default function ListView() { )} - + ); } diff --git a/src/Components/Resource/ResourceBoardView.tsx b/src/Components/Resource/ResourceBoardView.tsx index ecbaf9a6727..616c23b38fb 100644 --- a/src/Components/Resource/ResourceBoardView.tsx +++ b/src/Components/Resource/ResourceBoardView.tsx @@ -112,7 +112,7 @@ export default function BoardView() { )} - + ); } diff --git a/src/Components/Shifting/BadgesList.tsx b/src/Components/Shifting/BadgesList.tsx index b34b674119b..bf378aa8e80 100644 --- a/src/Components/Shifting/BadgesList.tsx +++ b/src/Components/Shifting/BadgesList.tsx @@ -2,6 +2,7 @@ import { useState, useEffect } from "react"; import { getUserList, getAnyFacility } from "../../Redux/actions"; import { useDispatch } from "react-redux"; import { useTranslation } from "react-i18next"; +import { SHIFTING_FILTER_ORDER } from "../../Common/constants"; export default function BadgesList(props: any) { const { qParams, FilterBadges } = props; @@ -63,6 +64,15 @@ export default function BadgesList(props: any) { } fetchData(); }, [dispatch, qParams.assigned_facility]); + const getDescShiftingFilterOrder = (ordering: any) => { + let desc = ""; + SHIFTING_FILTER_ORDER.map((item: any) => { + if (item.text === ordering) { + desc = item.desc; + } + }); + return desc; + }; return ( ); diff --git a/src/Components/Shifting/BoardView.tsx b/src/Components/Shifting/BoardView.tsx index a1c21fb1373..db2db299140 100644 --- a/src/Components/Shifting/BoardView.tsx +++ b/src/Components/Shifting/BoardView.tsx @@ -125,7 +125,7 @@ export default function BoardView() { )} - + ); } diff --git a/src/Components/Shifting/ListView.tsx b/src/Components/Shifting/ListView.tsx index c06fe96a45b..fefff000758 100644 --- a/src/Components/Shifting/ListView.tsx +++ b/src/Components/Shifting/ListView.tsx @@ -339,7 +339,11 @@ export default function ListView() { )} - + ); } diff --git a/src/Components/Users/ManageUsers.tsx b/src/Components/Users/ManageUsers.tsx index 250070c689b..00e9bc50c8f 100644 --- a/src/Components/Users/ManageUsers.tsx +++ b/src/Components/Users/ManageUsers.tsx @@ -470,7 +470,7 @@ export default function ManageUsers() { {userTypes.length && addUser} - + diff --git a/src/Locale/en/Common.json b/src/Locale/en/Common.json index 093f43dc374..ffc0508f60d 100644 --- a/src/Locale/en/Common.json +++ b/src/Locale/en/Common.json @@ -24,6 +24,7 @@ "no": "No", "status": "Status", "created": "Created", + "modified": "Modified", "updated": "Updated", "assigned_to": "Assigned to", "cancel": "Cancel",