Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resources redesign #10308

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@
"additional_instructions": "Additional Instructions",
"address": "Address",
"address_is_required": "Address is required",
"adjust_resource_filters": "Try adjusting your filters or create a new resource",
"administer": "Administer",
"administer_medicine": "Administer Medicine",
"administer_medicines": "Administer Medicines",
Expand Down Expand Up @@ -1071,6 +1072,7 @@
"immunisation-records": "Immunisation",
"in_consultation": "In-Consultation",
"inactive": "Inactive",
"incoming": "Incoming",
"incomplete_patient_details_warning": "Patient details are incomplete. Please update the details before proceeding.",
"inconsistent_dosage_units_error": "Dosage units must be same",
"indian_mobile": "Indian Mobile",
Expand Down Expand Up @@ -1364,6 +1366,7 @@
"no_records_found": "No Records Found",
"no_remarks": "No remarks",
"no_resource_requests_found": "No requests found",
"no_resources_found": "No resources found",
"no_results": "No results",
"no_results_found": "No Results Found",
"no_schedule_templates_found": "No schedule templates found for this month.",
Expand Down Expand Up @@ -1439,6 +1442,7 @@
"otp_verification_error": "Failed to verify OTP. Please try again later.",
"otp_verification_success": "OTP has been verified successfully.",
"out_of_range_error": "Value must be between {{ start }} and {{ end }}.",
"outgoing": "Outgoing",
"overview": "Overview",
"oxygen_information": "Oxygen Information",
"packages": "Packages",
Expand Down Expand Up @@ -1731,6 +1735,14 @@
"resource_request_details_description": "Provide detailed information about what resource is needed and why.",
"resource_requests": "Requests",
"resource_status": "Request Status",
"resource_status__approved": "Approved",
"resource_status__cancelled": "Cancelled",
"resource_status__completed": "Completed",
"resource_status__pending": "Pending",
"resource_status__rejected": "Rejected",
"resource_status__transfer_in_progress": "Transfer in progress",
"resource_status__transportation_to_be_arranged": "Transportation to be arranged",
"resource_title": "Resource Title",
"resource_type": "Request Type",
"result": "Result",
"result_date": "Result Date",
Expand Down Expand Up @@ -1801,6 +1813,7 @@
"search_by_patient_name": "Search by Patient Name",
"search_by_patient_no": "Search by Patient Number",
"search_by_phone_number": "Search by Phone Number",
"search_by_resource_title": "Search by resource title",
"search_by_username": "Search by username",
"search_country": "Search country...",
"search_encounters": "Search Encounters",
Expand Down Expand Up @@ -1995,6 +2008,7 @@
"third_party_software_licenses": "Third Party Software Licenses",
"time": "Time",
"time_slot": "Time Slot",
"title": "Title",
"title_of_request": "Title of Request",
"titrate_dosage": "Titrate Dosage",
"to": "to",
Expand All @@ -2013,7 +2027,6 @@
"total_users": "Total Users",
"transfer_allowed": "Transfer Allowed",
"transfer_blocked": "Transfer Blocked",
"transfer_in_progress": "TRANSFER IN PROGRESS",
"transfer_status_updated": "Transfer Status Updated",
"transfer_to_receiving_facility": "Transfer to receiving facility",
"travel_within_last_28_days": "Domestic/international Travel (within last 28 days)",
Expand Down
1 change: 0 additions & 1 deletion public/locale/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,6 @@
"to_be_conducted": "संचालित किया जाना है",
"total_beds": "कुल बिस्तर",
"total_users": "कुल उपयोगकर्ता",
"transfer_in_progress": "स्थानांतरण प्रगति पर है",
"transfer_to_receiving_facility": "प्राप्ति सुविधा में स्थानांतरण",
"travel_within_last_28_days": "घरेलू/अंतर्राष्ट्रीय यात्रा (पिछले 28 दिनों के भीतर)",
"treating_doctor": "इलाज करने वाला डॉक्टर",
Expand Down
1 change: 0 additions & 1 deletion public/locale/kn.json
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,6 @@
"to_be_conducted": "ನಡೆಸಲಾಗುವುದು",
"total_beds": "ಒಟ್ಟು ಹಾಸಿಗೆಗಳು",
"total_users": "ಒಟ್ಟು ಬಳಕೆದಾರರು",
"transfer_in_progress": "ವರ್ಗಾವಣೆ ಪ್ರಗತಿಯಲ್ಲಿದೆ",
"transfer_to_receiving_facility": "ಸ್ವೀಕರಿಸುವ ಸೌಲಭ್ಯಕ್ಕೆ ವರ್ಗಾಯಿಸಿ",
"travel_within_last_28_days": "ದೇಶೀಯ/ಅಂತರರಾಷ್ಟ್ರೀಯ ಪ್ರಯಾಣ (ಕಳೆದ 28 ದಿನಗಳಲ್ಲಿ)",
"treating_doctor": "ಚಿಕಿತ್ಸೆ ನೀಡುತ್ತಿರುವ ವೈದ್ಯರು",
Expand Down
1 change: 0 additions & 1 deletion public/locale/ml.json
Original file line number Diff line number Diff line change
Expand Up @@ -1778,7 +1778,6 @@
"transcript_information": "ഇതാണ് നമ്മൾ കേട്ടത്",
"transfer_allowed": "കൈമാറ്റം അനുവദിച്ചു",
"transfer_blocked": "കൈമാറ്റം തടഞ്ഞു",
"transfer_in_progress": "കൈമാറ്റം പുരോഗമിക്കുന്നു",
"transfer_status_updated": "ട്രാൻസ്ഫർ സ്റ്റാറ്റസ് അപ്ഡേറ്റ് ചെയ്തു",
"transfer_to_receiving_facility": "സ്വീകരിക്കാനുള്ള സൗകര്യത്തിലേക്ക് ട്രാൻസ്ഫർ ചെയ്യുക",
"travel_within_last_28_days": "ആഭ്യന്തര/അന്താരാഷ്ട്ര യാത്ര (കഴിഞ്ഞ 28 ദിവസത്തിനുള്ളിൽ)",
Expand Down
1 change: 0 additions & 1 deletion public/locale/ta.json
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,6 @@
"to_be_conducted": "நடத்தப்பட வேண்டும்",
"total_beds": "மொத்த படுக்கைகள்",
"total_users": "மொத்த பயனர்கள்",
"transfer_in_progress": "இடமாற்றம் நடைபெறுகிறது",
"transfer_to_receiving_facility": "பெறும் வசதிக்கு இடமாற்றம்",
"travel_within_last_28_days": "உள்நாட்டு/சர்வதேச பயணம் (கடந்த 28 நாட்களுக்குள்)",
"treating_doctor": "சிகிச்சை அளிக்கும் மருத்துவர்",
Expand Down
35 changes: 0 additions & 35 deletions src/CAREUI/display/Count.tsx

This file was deleted.

70 changes: 0 additions & 70 deletions src/CAREUI/interactive/FiltersSlideover.tsx

This file was deleted.

141 changes: 0 additions & 141 deletions src/CAREUI/interactive/SlideOver.tsx

This file was deleted.

20 changes: 13 additions & 7 deletions src/Routers/routes/ResourceRoutes.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
import View from "@/components/Common/View";
import PrintResourceLetter from "@/components/Resource/PrintResourceLetter";
import BoardView from "@/components/Resource/ResourceBoard";
import ResourceDetails from "@/components/Resource/ResourceDetails";
import { ResourceDetailsUpdate } from "@/components/Resource/ResourceDetailsUpdate";
import ListView from "@/components/Resource/ResourceList";
import ResourceList from "@/components/Resource/ResourceList";

import { AppRoutes } from "@/Routers/AppRouter";

const ResourceRoutes: AppRoutes = {
"/resource": () => <View name="resource" board={BoardView} list={ListView} />,
"/resource/:id": ({ id }) => <ResourceDetails id={id} />,
"/resource/:id/update": ({ id }) => <ResourceDetailsUpdate id={id} />,
"/resource/:id/print": ({ id }) => <PrintResourceLetter id={id} />,
"/facility/:facilityId/resource": ({ facilityId }) => (
<ResourceList facilityId={facilityId} />
),
"/facility/:facilityId/resource/:id": ({ facilityId, id }) => (
<ResourceDetails facilityId={facilityId} id={id} />
),
"/facility/:facilityId/resource/:id/update": ({ facilityId, id }) => (
<ResourceDetailsUpdate facilityId={facilityId} id={id} />
),
"/facility/:facilityId/resource/:id/print": ({ id }) => (
<PrintResourceLetter id={id} />
),
};
Comment on lines +18 to +20
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add facilityId prop to PrintResourceLetter component.

The PrintResourceLetter component should receive the facilityId prop for consistency with other resource routes.

-  "/facility/:facilityId/resource/:id/print": ({ id }) => (
-    <PrintResourceLetter id={id} />
+  "/facility/:facilityId/resource/:id/print": ({ facilityId, id }) => (
+    <PrintResourceLetter facilityId={facilityId} id={id} />
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"/facility/:facilityId/resource/:id/print": ({ id }) => (
<PrintResourceLetter id={id} />
),
"/facility/:facilityId/resource/:id/print": ({ facilityId, id }) => (
<PrintResourceLetter facilityId={facilityId} id={id} />
),


export default ResourceRoutes;
5 changes: 0 additions & 5 deletions src/Routers/types.ts

This file was deleted.

Loading
Loading