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
…discharge-summary-ui
  • Loading branch information
amjithtitus09 committed Feb 12, 2025
2 parents 9e27bd6 + 7d7cfd6 commit bb61cac
Show file tree
Hide file tree
Showing 29 changed files with 539 additions and 730 deletions.
343 changes: 178 additions & 165 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "care_fe",
"version": "2.10.0",
"version": "2.13.0",
"description": "Care is a Digital Public Good enabling TeleICU & Decentralised Administration of Healthcare Capacity across States.",
"private": true,
"repository": {
Expand Down Expand Up @@ -51,7 +51,7 @@
"dependencies": {
"@fontsource/figtree": "^5.1.1",
"@headlessui/react": "^2.2.0",
"@hookform/resolvers": "^3.10.0",
"@hookform/resolvers": "^4.0.0",
"@originjs/vite-plugin-federation": "^1.3.7",
"@radix-ui/react-alert-dialog": "^1.1.2",
"@radix-ui/react-avatar": "^1.1.2",
Expand All @@ -74,7 +74,7 @@
"@radix-ui/react-tabs": "^1.1.1",
"@radix-ui/react-toast": "^1.2.5",
"@radix-ui/react-tooltip": "^1.1.6",
"@sentry/browser": "^8.51.0",
"@sentry/browser": "^9.0.0",
"@tanstack/react-query": "^5.64.1",
"@tanstack/react-query-devtools": "^5.64.2",
"@vitejs/plugin-react": "^4.3.4",
Expand All @@ -97,7 +97,7 @@
"input-otp": "^1.4.2",
"jspdf": "^2.5.2",
"libphonenumber-js": "^1.11.18",
"lucide-react": "^0.474.0",
"lucide-react": "^0.475.0",
"markdown-it": "^14.1.0",
"next-themes": "^0.4.3",
"postcss-loader": "^8.1.1",
Expand Down Expand Up @@ -180,8 +180,8 @@
"optionalDependencies": {
"@esbuild/linux-arm64": "latest",
"@esbuild/linux-x64": "latest",
"@rollup/rollup-linux-arm64-gnu": "4.34.4",
"@rollup/rollup-linux-x64-gnu": "4.34.4"
"@rollup/rollup-linux-arm64-gnu": "4.34.6",
"@rollup/rollup-linux-x64-gnu": "4.34.6"
},
"browserslist": {
"production": [
Expand Down
8 changes: 8 additions & 0 deletions public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,7 @@
"encounter_notes__failed_send_message": "Failed to send message",
"encounter_notes__new": "New",
"encounter_notes__no_discussions": "No discussions yet",
"encounter_notes__no_unused_threads": "Please enter a custom title for thread",
"encounter_notes__select_create_thread": "Select or create a thread to start messaging",
"encounter_notes__start_conversation": "Start the Conversation",
"encounter_notes__start_new_discussion": "Start New Discussion",
Expand Down Expand Up @@ -1013,6 +1014,7 @@
"facility_updated_successfully": "Facility updated successfully",
"failed_to_create_appointment": "Failed to create an appointment",
"failed_to_link_abha_number": "Failed to link ABHA Number. Please try again later.",
"failed_to_send_message": "Failed to send message",
"false": "False",
"fast_track_testing_reason": "Fast track testing reason",
"features": "Features",
Expand Down Expand Up @@ -1110,6 +1112,7 @@
"hide_notes": "Hide notes",
"high": "High",
"history": "History",
"home": "Home",
"home_facility": "Home Facility",
"home_facility_cleared_success": "Home Facility cleared successfully",
"home_facility_updated_error": "Error while updating Home Facility",
Expand Down Expand Up @@ -1323,6 +1326,7 @@
"medicines_administered": "Medicine(s) administered",
"medicines_administered_error": "Error administering medicine(s)",
"member_id_required": "Member Id is required",
"messages": "Messages",
"method": "Method",
"middleware_hostname": "Middleware Hostname",
"middleware_hostname_example": "e.g. example.ohc.network",
Expand Down Expand Up @@ -1533,6 +1537,7 @@
"page_not_found": "Page Not Found",
"pain": "Pain",
"pain_chart_description": "Mark region and intensity of pain",
"participants": "Participants",
"passport_number": "Passport Number",
"password": "Password",
"password_length_validation": "Use at least <strong>8 characters</strong>",
Expand Down Expand Up @@ -1575,6 +1580,7 @@
"patient_details": "Patient Details",
"patient_details_incomplete": "Patient Details Incomplete",
"patient_face": "Patient Face",
"patient_files": "Patient Files",
"patient_information": "Patient Information",
"patient_name": "Patient Name",
"patient_name_uhid": "Patient Name/UHID",
Expand Down Expand Up @@ -2116,6 +2122,7 @@
"third_party_software_licenses": "Third Party Software Licenses",
"this_action_is_irreversible": "This action is irreversible. Once a file is archived it cannot be unarchived.",
"this_file_has_been_archived": "This file has been archived and cannot be unarchived.",
"thread_already_exists": "Thread with this title already exists",
"time": "Time",
"time_slot": "Time Slot",
"title": "Title",
Expand Down Expand Up @@ -2228,6 +2235,7 @@
"update_preset_position_to_current": "Update preset's position to camera's current position",
"update_record": "Update Record",
"update_record_for_asset": "Update record for asset",
"update_request": "Update Request",
"update_role": "Update Role",
"update_shift_request": "Update Shift Request",
"update_status": "Update Status",
Expand Down
2 changes: 1 addition & 1 deletion src/CAREUI/icons/Index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const IconIndex: React.FC = () => {

return (
<div className="mx-auto max-w-7xl p-4">
<PageTitle title="Care Icons" hideBack={true} />
<PageTitle title="Care Icons" />
<input
type="text"
placeholder={t("search")}
Expand Down
1 change: 1 addition & 0 deletions src/components/Auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ const Login = (props: LoginProps) => {
name="otp"
type="text"
value={otp}
autoComplete="one-time-code"
onChange={(e) => {
setOtp(e.target.value);
setOtpValidationError("");
Expand Down
174 changes: 0 additions & 174 deletions src/components/Common/Breadcrumbs.tsx

This file was deleted.

7 changes: 1 addition & 6 deletions src/components/Common/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function Page(props: PageProps) {

let padding = "";
if (!props.noImplicitPadding) {
if (!props.hideBack || props.componentRight) padding = "py-0 md:px-6";
if (props.componentRight) padding = "py-0 md:px-6";
else padding = "px-6 py-0";
}

Expand All @@ -43,13 +43,8 @@ export default function Page(props: PageProps) {
<PageTitle
changePageMetadata={props.changePageMetadata}
title={props.title}
breadcrumbs={props.breadcrumbs}
backUrl={props.backUrl}
hideBack={props.hideBack}
componentRight={props.componentRight}
crumbsReplacements={props.crumbsReplacements}
focusOnLoad={props.focusOnLoad}
onBackClick={props.onBackClick}
isInsidePage={true}
hideTitleOnPage={props.hideTitleOnPage}
/>
Expand Down
39 changes: 4 additions & 35 deletions src/components/Common/PageTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,46 +1,26 @@
import { ReactNode, useEffect, useRef } from "react";

import Breadcrumbs from "@/components/Common/Breadcrumbs";
import PageHeadTitle from "@/components/Common/PageHeadTitle";
import { cn } from "@/lib/utils";

import { classNames } from "@/Utils/utils";
import PageHeadTitle from "@/components/Common/PageHeadTitle";

export interface PageTitleProps {
title: string;
className?: string;
componentRight?: ReactNode;
breadcrumbs?: boolean;
crumbsReplacements?: {
[key: string]: {
name?: string;
uri?: string;
style?: string;
hide?: boolean;
};
};
focusOnLoad?: boolean;
isInsidePage?: boolean;
changePageMetadata?: boolean;
// New props for Breadcrumbs
hideBack?: boolean;
backUrl?: string;
hideTitleOnPage?: boolean;
onBackClick?: () => boolean | void;
}

export default function PageTitle({
title,
className = "",
componentRight = <></>,
breadcrumbs = true,
crumbsReplacements = {},
focusOnLoad = false,
isInsidePage = false,
changePageMetadata = true,
// New props passed to Breadcrumbs
hideBack = false,
backUrl,
onBackClick,
hideTitleOnPage,
}: PageTitleProps) {
const divRef = useRef<any>();
Expand All @@ -54,23 +34,12 @@ export default function PageTitle({
return (
<div
ref={divRef}
className={classNames(!isInsidePage && "mb-2 md:mb-4", className)}
className={cn(!isInsidePage && "mb-2 md:mb-4", className)}
>
<div className="flex flex-col items-start md:flex-row md:items-center">
{breadcrumbs && (
<Breadcrumbs
replacements={crumbsReplacements}
className="flex-grow"
hideBack={hideBack}
backUrl={backUrl}
onBackClick={onBackClick}
/>
)}
</div>
{changePageMetadata && <PageHeadTitle title={title} />}

<div
className={classNames(
className={cn(
"mt-1 flex",
!!componentRight &&
"flex-col justify-start space-y-2 md:flex-row md:justify-between md:space-y-0",
Expand Down
Loading

0 comments on commit bb61cac

Please sign in to comment.