Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/ohcnetwork/care_fe into …
Browse files Browse the repository at this point in the history
…enhanced-resource-page
  • Loading branch information
manmeetnagii committed Jan 5, 2025
2 parents 88597fe + a6f4ab6 commit 5f7aeb8
Show file tree
Hide file tree
Showing 29 changed files with 648 additions and 406 deletions.
22 changes: 22 additions & 0 deletions public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,19 @@
"SPO2_LEVEL_MODERATE_HYPOXEMIA": "Moderate Hypoxemia",
"SPO2_LEVEL_NORMAL": "Normal",
"SPO2_LEVEL_SEVERE_HYPOXEMIA": "Severe Hypoxemia",
"SYSTEM__govt_org_type__block_panchayat": "Block Panchayat",
"SYSTEM__govt_org_type__corporation": "Corporation",
"SYSTEM__govt_org_type__default": "State",
"SYSTEM__govt_org_type__district": "District",
"SYSTEM__govt_org_type__grama_panchayat": "Grama Panchayat",
"SYSTEM__govt_org_type__local_body": "Local Body",
"SYSTEM__govt_org_type__municipality": "Municipality",
"SYSTEM__govt_org_type__state": "State",
"SYSTEM__govt_org_type__ward": "Ward",
"SYSTEM__org_type__default": "Organization",
"SYSTEM__org_type__govt": "Government",
"SYSTEM__org_type__role": "Role",
"SYSTEM__org_type__team": "Team",
"Submit": "Submit",
"TELEMEDICINE": "Telemedicine",
"TRANSPORTATION TO BE ARRANGED": "Transportation",
Expand Down Expand Up @@ -376,6 +389,7 @@
"are_you_still_watching": "Are you still watching?",
"are_you_sure_want_to_delete": "Are you sure you want to delete {{name}}?",
"are_you_sure_want_to_delete_this_record": "Are you sure want to delete this record?",
"are_you_sure_want_to_remove": "Are you sure you want to remove {{name}} from the patient? This action cannot be undone",
"ari": "ARI - Acute Respiratory illness",
"arrived": "Arrived",
"asset_class": "Asset Class",
Expand All @@ -388,7 +402,10 @@
"assign": "Assign",
"assign_a_volunteer_to": "Assign a volunteer to {{name}}",
"assign_bed": "Assign Bed",
"assign_to_patient": "Assign to Patient",
"assign_to_volunteer": "Assign to a Volunteer",
"assign_user": "Assign User",
"assign_user_to_patient": "Assign User to Patient",
"assigned_doctor": "Assigned Doctor",
"assigned_facility": "Facility assigned",
"assigned_to": "Assigned to",
Expand Down Expand Up @@ -1239,6 +1256,7 @@
"no_staff": "No staff found",
"no_tests_taken": "No tests taken",
"no_treating_physicians_available": "This facility does not have any home facility doctors. Please contact your admin.",
"no_user_assigned": "No User Assigned to this patient",
"no_users_found": "No Users Found",
"no_vitals_present": "No Vitals Monitor present in this location or facility",
"none": "None",
Expand Down Expand Up @@ -1482,6 +1500,7 @@
"rejected": "Rejected",
"reload": "Reload",
"remove": "Remove",
"remove_user": "Remove User",
"rename": "Rename",
"replace_home_facility": "Replace Home Facility",
"replace_home_facility_confirm": "Are you sure you want to replace",
Expand Down Expand Up @@ -1570,6 +1589,8 @@
"search_medication": "Search Medication",
"search_patients": "Search Patients",
"search_resource": "Search Resource",
"search_user": "Search User",
"search_user_description": "Search for a user and assign a role to add them to the patient.",
"searching": "Searching...",
"see_attachments": "See Attachments",
"select": "Select",
Expand All @@ -1588,6 +1609,7 @@
"select_policy_to_add_items": "Select a Policy to Add Items",
"select_practitioner": "Select Practicioner",
"select_register_patient": "Select/Register Patient",
"select_role": "Select Role",
"select_seven_day_period": "Select a seven day period",
"select_skills": "Select and add some skills",
"select_status": "Select Status",
Expand Down
54 changes: 30 additions & 24 deletions src/Routers/AppRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import FacilityRoutes from "@/Routers/routes/FacilityRoutes";
import PatientRoutes from "@/Routers/routes/PatientRoutes";
import ResourceRoutes from "@/Routers/routes/ResourceRoutes";
import UserRoutes from "@/Routers/routes/UserRoutes";
import { PermissionProvider } from "@/context/PermissionContext";
import { PlugConfigEdit } from "@/pages/Apps/PlugConfigEdit";
import { PlugConfigList } from "@/pages/Apps/PlugConfigList";
import UserDashboard from "@/pages/UserDashboard";
Expand Down Expand Up @@ -87,32 +88,37 @@ export default function AppRouter() {

return (
<SidebarProvider>
{shouldShowSidebar && <AppSidebar user={user} />}
<main
id="pages"
className="flex-1 overflow-y-auto bg-gray-100 focus:outline-none md:pb-2 md:pr-2"
<PermissionProvider
userPermissions={user?.permissions || []}
isSuperAdmin={user?.is_superuser || false}
>
<div className="relative z-10 flex h-16 shrink-0 bg-white shadow md:hidden">
<div className="flex items-center">
{shouldShowSidebar && <SidebarTrigger />}
</div>
<a className="flex h-full w-full items-center px-4 md:hidden">
<img
className="h-8 w-auto"
src={careConfig.mainLogo?.dark}
alt="care logo"
/>
</a>
</div>
<div
className="max-w-8xl mx-auto mt-4 min-h-[96vh] rounded-lg border bg-gray-50 p-3 shadow"
data-cui-page
{shouldShowSidebar && <AppSidebar user={user} />}
<main
id="pages"
className="flex-1 overflow-y-auto bg-gray-100 focus:outline-none md:pb-2 md:pr-2"
>
<ErrorBoundary fallback={<ErrorPage forError="PAGE_LOAD_ERROR" />}>
{pages}
</ErrorBoundary>
</div>
</main>
<div className="relative z-10 flex h-16 shrink-0 bg-white shadow md:hidden">
<div className="flex items-center">
{shouldShowSidebar && <SidebarTrigger />}
</div>
<a className="flex h-full w-full items-center px-4 md:hidden">
<img
className="h-8 w-auto"
src={careConfig.mainLogo?.dark}
alt="care logo"
/>
</a>
</div>
<div
className="max-w-8xl mx-auto mt-4 min-h-[96vh] rounded-lg border bg-gray-50 p-3 shadow"
data-cui-page
>
<ErrorBoundary fallback={<ErrorPage forError="PAGE_LOAD_ERROR" />}>
{pages}
</ErrorBoundary>
</div>
</main>
</PermissionProvider>
</SidebarProvider>
);
}
9 changes: 0 additions & 9 deletions src/common/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1762,12 +1762,3 @@ export const ADMIN_USER_TYPES = ["DistrictAdmin", "StateAdmin"] as const;
* @deprecated use `LocalStorageKeys.patientTokenKey` instead
*/
export const CarePatientTokenKey = LocalStorageKeys.patientTokenKey;

// organization_levels map based of type. for govt
// thought: This might be better placed in the organization types files
export const ORGANIZATION_LEVELS = {
govt: ["State", "District", "LocalBody", "Ward"],
team: ["Team"],
role: ["Role"],
other: ["Other"],
};
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ export default function QuestionnaireResponsesList({ encounter }: Props) {
// New structured response rendering
Object.entries(item.structured_responses).map(
([type, response]) => {
console.log("LOGGG", type, response);
return (
<StructuredResponseView
key={response.id}
Expand Down
Loading

0 comments on commit 5f7aeb8

Please sign in to comment.