diff --git a/.env b/.env index a9d6e8e91b6..55743104f8f 100644 --- a/.env +++ b/.env @@ -15,5 +15,3 @@ CARE_CDN_URL="https://egov-s3-facility-10bedicu.s3.amazonaws.com https://egov-s3 REACT_ALLOWED_LOCALES="en,hi,ta,ml,mr,kn" REACT_ENABLED_APPS="" - -REACT_KERALA_GEO_ID=b04b9efa-5972-419a-892d-26169c1eac8a \ No newline at end of file diff --git a/.example.env b/.example.env index ff2dde1edc5..5466250e094 100644 --- a/.example.env +++ b/.example.env @@ -10,12 +10,6 @@ REACT_GITHUB_URL= # OHCN URL (default: https://ohc.network?ref=care) REACT_OHCN_URL= -# Plausible site domain (default: care.ohc.network) -REACT_PLAUSIBLE_SITE_DOMAIN= - -# Plausible server URL (default: https://plausible.ohc.network) -REACT_PLAUSIBLE_SERVER_URL= - # Care Apps. repo@branch seperated by commas REACT_ENABLED_APPS="ohcnetwork/care_livekit_fe@main,ohcnetwork/care_scribe" @@ -73,5 +67,8 @@ REACT_JWT_TOKEN_REFRESH_INTERVAL= # Minimum encounter date (default: 2020-01-01) REACT_MIN_ENCOUNTER_DATE= +# Default Encounter Type (default: "hh" - Home Health) +REACT_DEFAULT_ENCOUNTER_TYPE= + # Available languages to switch between (2 Digit language code seperated by comas. See src->Locale->config.ts for available codes) REACT_ALLOWED_LOCALES="en,hi,ta,ml,mr,kn" diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 4d8ac14635a..79e4d357951 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -61,7 +61,7 @@ jobs: build: needs: test - if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/staging' || startsWith(github.event.ref, 'refs/tags/v') + if: github.ref == 'refs/heads/develop' || startsWith(github.event.ref, 'refs/tags/v') name: Build & Push to container registries runs-on: ubuntu-latest steps: @@ -139,18 +139,3 @@ jobs: run: | echo "Release ${{ github.sha }} is ready to be deployed to production" - deploy-staging-gcp: - needs: build - if: github.ref == 'refs/heads/staging' - name: Deploy to staging GCP cluster - runs-on: ubuntu-latest - environment: - name: Staging-GCP - url: https://care-staging.ohc.network/ - steps: - - name: Trigger deploy - run: | - COMMIT_SHA=${{ github.sha }} - JSON='{ "substitutions": { "care_be_tag":"", "care_fe_tag": "'"$COMMIT_SHA"'", "metabase_tag": "" } }' - curl --location "${{ secrets.STAGING_GCP_DEPLOY_URL }}" \ - --header 'Content-Type: application/json' --data "$JSON" diff --git a/care.config.ts b/care.config.ts index 1498de9bb18..f48d842d262 100644 --- a/care.config.ts +++ b/care.config.ts @@ -1,3 +1,5 @@ +import { EncounterClass } from "@/types/emr/encounter"; + const env = import.meta.env; interface ILogo { @@ -48,6 +50,9 @@ const careConfig = { .split(",") .map((l) => l.trim()), + defaultEncounterType: (env.REACT_DEFAULT_ENCOUNTER_TYPE || + "hh") as EncounterClass, + gmapsApiKey: env.REACT_GMAPS_API_KEY || "AIzaSyDsBAc3y7deI5ZO3NtK5GuzKwtUzQNJNUk", @@ -82,12 +87,6 @@ const careConfig = { minEncounterDate: new Date(env.REACT_MIN_ENCOUNTER_DATE || "2020-01-01"), // Plugins related configs... - - plausible: { - server: env.REACT_PLAUSIBLE_SERVER_URL || "https://plausible.ohc.network", - domain: env.REACT_PLAUSIBLE_SITE_DOMAIN || "care.ohc.network", - }, - sentry: { dsn: env.REACT_SENTRY_DSN || @@ -120,7 +119,6 @@ const careConfig = { plotsConfigUrl: env.REACT_OBSERVATION_PLOTS_CONFIG_URL || "/config/plots.json", - keralaGeoId: env.REACT_KERALA_GEO_ID || "", } as const; export default careConfig; diff --git a/index.html b/index.html index 0e302341c85..166c2d3bda7 100644 --- a/index.html +++ b/index.html @@ -76,12 +76,5 @@ - diff --git a/netlify.toml b/netlify.toml index 9e44ebc08b1..6f6ae8aaca3 100644 --- a/netlify.toml +++ b/netlify.toml @@ -19,9 +19,7 @@ X-Frame-Options = "DENY" X-Content-Type-Options = "nosniff" Content-Security-Policy-Report-Only = ''' default-src 'self'; - script-src 'self' 'nonce-f51b9742' https://plausible.ohc.network; style-src 'self' 'unsafe-inline'; - connect-src 'self' https://plausible.ohc.network; img-src 'self' https://cdn.ohc.network https://egov-s3-facility-10bedicu.s3.amazonaws.com https://egov-s3-patient-data-10bedicu.s3.amazonaws.com; object-src 'self' https://egov-s3-facility-10bedicu.s3.amazonaws.com https://egov-s3-patient-data-10bedicu.s3.amazonaws.com; report-uri https://csp-logger.ohc.network/ diff --git a/package-lock.json b/package-lock.json index 83d8318e57d..aae20921b8a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "@radix-ui/react-tooltip": "^1.1.6", "@sentry/browser": "^8.47.0", "@tanstack/react-query": "^5.62.8", - "@tanstack/react-query-devtools": "^5.62.7", + "@tanstack/react-query-devtools": "^5.62.15", "@vitejs/plugin-react": "^4.3.4", "@yudiel/react-qr-scanner": "^2.1.0", "bowser": "^2.11.0", @@ -6291,9 +6291,9 @@ } }, "node_modules/@tanstack/query-core": { - "version": "5.62.9", - "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.62.9.tgz", - "integrity": "sha512-lwePd8hNYhyQ4nM/iRQ+Wz2cDtspGeZZHFZmCzHJ7mfKXt+9S301fULiY2IR2byJYY6Z03T427E5PoVfMexHjw==", + "version": "5.62.15", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.62.15.tgz", + "integrity": "sha512-wT20X14CxcWY8YLJ/1pnsXn/y1Q2uRJZYWW93PWRtZt+3/JlGZyiyTcO4pGnqycnP7CokCROAyatsraosqZsDA==", "license": "MIT", "funding": { "type": "github", @@ -6311,12 +6311,12 @@ } }, "node_modules/@tanstack/react-query": { - "version": "5.62.11", - "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.62.11.tgz", - "integrity": "sha512-Xb1nw0cYMdtFmwkvH9+y5yYFhXvLRCnXoqlzSw7UkqtCVFq3cG8q+rHZ2Yz1XrC+/ysUaTqbLKJqk95mCgC1oQ==", + "version": "5.62.15", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.62.15.tgz", + "integrity": "sha512-Ny3xxsOWmEQCFyHiV3CF7t6+QAV+LpBEREiXyllKR4+tStyd8smOAa98ZHmEx0ZNy36M31K8enifB5wTSYAKJw==", "license": "MIT", "dependencies": { - "@tanstack/query-core": "5.62.9" + "@tanstack/query-core": "5.62.15" }, "funding": { "type": "github", @@ -6327,9 +6327,9 @@ } }, "node_modules/@tanstack/react-query-devtools": { - "version": "5.62.11", - "resolved": "https://registry.npmjs.org/@tanstack/react-query-devtools/-/react-query-devtools-5.62.11.tgz", - "integrity": "sha512-i0vKgdM4ORRzqduz7UeUF52UhLrvRp4sNY/DnLsd5NqNyiKct3a0bLQMWE2fqjF5tEExQ0d0xY60ILXW/T62xA==", + "version": "5.62.15", + "resolved": "https://registry.npmjs.org/@tanstack/react-query-devtools/-/react-query-devtools-5.62.15.tgz", + "integrity": "sha512-8aE7uD45NHZgNtHMVQC7PvM9f72mKK4bqcpHr9La8TsTRX7x8dy2Kdu2ReFNLCrdlEWkxdP5843tc/lHg+Q/rg==", "license": "MIT", "dependencies": { "@tanstack/query-devtools": "5.62.9" @@ -6339,7 +6339,7 @@ "url": "https://github.com/sponsors/tannerlinsley" }, "peerDependencies": { - "@tanstack/react-query": "^5.62.11", + "@tanstack/react-query": "^5.62.15", "react": "^18 || ^19" } }, diff --git a/package.json b/package.json index 75b8501fc68..e66c7f8a6aa 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "@radix-ui/react-tooltip": "^1.1.6", "@sentry/browser": "^8.47.0", "@tanstack/react-query": "^5.62.8", - "@tanstack/react-query-devtools": "^5.62.7", + "@tanstack/react-query-devtools": "^5.62.15", "@vitejs/plugin-react": "^4.3.4", "@yudiel/react-qr-scanner": "^2.1.0", "bowser": "^2.11.0", diff --git a/public/locale/en.json b/public/locale/en.json index 65093b6acae..a6b499278b3 100644 --- a/public/locale/en.json +++ b/public/locale/en.json @@ -53,6 +53,7 @@ "ENCOUNTER_TAB__files": "Files", "ENCOUNTER_TAB__medicines": "Medicines", "ENCOUNTER_TAB__neurological_monitoring": "Neuro", + "ENCOUNTER_TAB__notes": "Notes", "ENCOUNTER_TAB__nursing": "Nursing", "ENCOUNTER_TAB__plots": "Plots", "ENCOUNTER_TAB__pressure_sore": "Pressure Sore", @@ -125,8 +126,8 @@ "NURSING_CARE_PROCEDURE__positioning": "Positioning", "NURSING_CARE_PROCEDURE__pre_enema": "P.R.E. Enema", "NURSING_CARE_PROCEDURE__restrain": "Restrain", - "NURSING_CARE_PROCEDURE__ryles_tube_care": "Ryle’s Tube Care", - "NURSING_CARE_PROCEDURE__ryles_tube_change": "Ryle’s Tube Change", + "NURSING_CARE_PROCEDURE__ryles_tube_care": "Ryle's Tube Care", + "NURSING_CARE_PROCEDURE__ryles_tube_change": "Ryle's Tube Change", "NURSING_CARE_PROCEDURE__skin_care": "Skin Care", "NURSING_CARE_PROCEDURE__stoma_care": "Stoma Care", "NURSING_CARE_PROCEDURE__suctioning": "Suctioning", @@ -224,6 +225,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", @@ -315,6 +329,7 @@ "add_new_patient": "Add New Patient", "add_new_user": "Add New User", "add_notes": "Add notes", + "add_patient_updates": "Add Patient Updates", "add_policy": "Add Insurance Policy", "add_prescription_medication": "Add Prescription Medication", "add_prescription_to_consultation_note": "Add a new prescription to this consultation.", @@ -376,6 +391,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", @@ -388,7 +404,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", @@ -641,6 +660,7 @@ "cylinders": "Cylinders", "cylinders_per_day": "Cylinders/day", "daily_rounds": "Daily Rounds", + "dashboard": "Dashboard", "date": "Date", "date_and_time": "Date and Time", "date_declared_positive": "Date of declaring positive", @@ -808,6 +828,23 @@ "encounter_discharge_disposition__snf": "Skilled nursing facility", "encounter_duration_confirmation": "The duration of this encounter would be", "encounter_id": "Encounter ID", + "encounter_notes__all_discussions": "All Discussions", + "encounter_notes__be_first_to_send": "Be the first to send a message", + "encounter_notes__choose_template": "Choose a template or enter a custom title", + "encounter_notes__create_discussion": "Create a new discussion thread to organize your conversation topics.", + "encounter_notes__discussions": "Discussions", + "encounter_notes__enter_discussion_title": "Enter discussion title...", + "encounter_notes__failed_create_thread": "Failed to create thread", + "encounter_notes__failed_send_message": "Failed to send message", + "encounter_notes__new": "New", + "encounter_notes__no_discussions": "No discussions yet", + "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", + "encounter_notes__thread_created": "Thread created successfully", + "encounter_notes__type_message": "Type your message...", + "encounter_notes__welcome": "Welcome to Discussions", + "encounter_notes__welcome_description": "Start a new discussion or select an existing thread to begin messaging", "encounter_priority__ASAP": "ASAP", "encounter_priority__as_needed": "As needed", "encounter_priority__asap": "ASAP", @@ -887,9 +924,10 @@ "facility_linked_success": "Facility linked successfully", "facility_name": "Facility Name", "facility_not_found": "Facility Not Found", + "facility_organizations": "Facility Organizations", "facility_preference": "Facility preference", "facility_search_placeholder": "Search by Facility / District Name", - "facility_search_placeholder_pincode": "Search by Facility / District / Pincode", + "facility_search_placeholder_text": "Search by Facility name", "facility_type": "Facility Type", "failed_to_create_appointment": "Failed to create an appointment", "failed_to_link_abha_number": "Failed to link ABHA Number. Please try again later.", @@ -1110,6 +1148,7 @@ "log_report": "Log Report", "log_update": "Log Update", "log_updates": "Log Updates", + "logged_in_as": "Logged in as", "login": "Login", "logout": "Log Out", "longitude_invalid": "Longitude must be between -180 and 180", @@ -1239,6 +1278,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", @@ -1277,7 +1317,11 @@ "oral_issue_for_non_oral_nutrition_route_error": "Can be specified only if nutrition route is set to Oral", "ordering": "Ordering", "organization": "Organization", + "organization_access_help": "Organizations help you manage facilities, users, and resources efficiently. Contact your administrator to get access.", "organization_for_care_support": "Organization for Care Support", + "organization_forbidden": "You don't have access to any organizations yet.", + "organization_not_found": "No Organizations Found", + "organizations": "Organizations", "origin_facility": "Current facility", "other_details": "Other details", "otp_verification_error": "Failed to verify OTP. Please try again later.", @@ -1322,6 +1366,7 @@ "patient_consultation__treatment__summary__spo2": "SpO2", "patient_consultation__treatment__summary__temperature": "Temperature", "patient_created": "Patient Created", + "patient_dashboard": "Patient Dashboard", "patient_details": "Patient Details", "patient_details_incomplete": "Patient Details Incomplete", "patient_face": "Patient Face", @@ -1448,6 +1493,9 @@ "quantity_approved": "Quantity Approved", "quantity_requested": "Quantity Requested", "quantity_required": "Quantity Required", + "questionnaire": "Questionnaire", + "questionnaire_error_loading": "Error loading questionnaire", + "questionnaire_not_exist": "The questionnaire you tried to access does not exist.", "raise_consent_request": "Raise a consent request to fetch patient records over ABDM", "ration_card__APL": "APL", "ration_card__BPL": "BPL", @@ -1482,6 +1530,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", @@ -1570,6 +1619,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", @@ -1588,6 +1639,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_time": "Select time", @@ -1631,7 +1683,8 @@ "show_default_presets": "Show Default Presets", "show_patient_presets": "Show Patient Presets", "show_unread_notifications": "Show Unread", - "sign_out": "Sign Out", + "sign_in": "Sign in", + "sign_out": "Sign out", "skill_add_error": "Error while adding skill", "skill_added_successfully": "Skill added successfully", "skills": "Skills", diff --git a/src/App.tsx b/src/App.tsx index 0122dfe8eac..e1afe64e966 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -45,7 +45,7 @@ const App = () => { } + unauthorized={} otpAuthorized={} > @@ -55,7 +55,6 @@ const App = () => { {/* Integrations */} - - {props.startIcon && } - {props.text} - {props.endIcon && } - - ); -} diff --git a/src/CAREUI/display/PopupModal.tsx b/src/CAREUI/display/PopupModal.tsx deleted file mode 100644 index 6410addbcc2..00000000000 --- a/src/CAREUI/display/PopupModal.tsx +++ /dev/null @@ -1,151 +0,0 @@ -import { ReactNode, useEffect, useRef, useState } from "react"; -import { useTranslation } from "react-i18next"; - -import { Cancel, Submit } from "@/components/Common/ButtonV2"; -import DialogModal from "@/components/Common/Dialog"; - -import useBreakpoints from "@/hooks/useBreakpoints"; - -import { classNames } from "@/Utils/utils"; - -type Props = { - show: boolean; - onHide: () => void; - children: ReactNode; - anchorRef: React.RefObject; - className?: string; - onSubmit?: () => void; -}; - -type Position = - | { left: number; top: number } - | { right: number; bottom: number } - | { left: number; bottom: number } - | { right: number; top: number }; - -export default function PopupModal(props: Props) { - const { t } = useTranslation(); - const isMobile = useBreakpoints({ default: true, lg: false }); - - if (!isMobile) { - return ; - } - - return ( - -
- {props.children} -
- - {props.onSubmit && ( - - )} -
-
-
- ); -} - -const DesktopView = (props: Props) => { - const { t } = useTranslation(); - const [position, setPosition] = useState({ left: 0, top: 0 }); - const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 }); - const modal = useRef(null); - const [children, setChildren] = useState(props.children); - - useEffect(() => { - // just to make sure the animation runs smoothly - if (props.show) { - setChildren(props.children); - } - }, [props.children, props.show]); - - useEffect(() => { - const handleOutsideClick = (e: MouseEvent) => { - const isModalClicked = - modal.current && modal.current.contains(e.target as Node); - if (!isModalClicked) { - props.onHide(); - } - }; - - if (props.show) { - const currentMousePosition = mousePosition; - const modalHeight = modal.current?.clientHeight || 0; - const modalWidth = modal.current?.clientWidth || 0; - const clickX = currentMousePosition.x; - const clickY = currentMousePosition.y; - const windowHeight = window.innerHeight; - const windowWidth = window.innerWidth; - - const anchorPosition = props.anchorRef.current?.getBoundingClientRect(); - const anchorX = anchorPosition?.x || 0; - const anchorY = anchorPosition?.y || 0; - const verticalCenter = windowHeight / 2; - const horizontalCenter = windowWidth / 2; - const mountLeft = clickX - anchorX; - const mountTop = clickY - anchorY; - - let position; - if (clickX > horizontalCenter) { - position = { left: mountLeft - modalWidth }; - } else { - position = { left: mountLeft }; - } - if (clickY > verticalCenter) { - position = { ...position, top: mountTop - modalHeight }; - } else { - position = { ...position, top: mountTop }; - } - setPosition(position); - } - - document.addEventListener("mousedown", handleOutsideClick); - return () => { - document.removeEventListener("mousedown", handleOutsideClick); - }; - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [props.show]); - - useEffect(() => { - const handleMouseMove = (e: MouseEvent) => { - setMousePosition({ x: e.clientX, y: e.clientY }); - }; - document.addEventListener("mousemove", handleMouseMove); - return () => { - document.removeEventListener("mousemove", handleMouseMove); - }; - }, []); - - const positionAttributes = Object.entries(position).reduce( - (acc, [key, value]) => { - return { ...acc, [key]: `${value}px` }; - }, - {}, - ); - - return ( -
- {children} -
- - {props.onSubmit && ( - - )} -
-
- ); -}; diff --git a/src/CAREUI/interactive/FiltersSlideover.tsx b/src/CAREUI/interactive/FiltersSlideover.tsx index 6e4feeaf852..b3c11fcd035 100644 --- a/src/CAREUI/interactive/FiltersSlideover.tsx +++ b/src/CAREUI/interactive/FiltersSlideover.tsx @@ -6,8 +6,6 @@ import SlideOver from "@/CAREUI/interactive/SlideOver"; import { Button } from "@/components/ui/button"; -import ButtonV2 from "@/components/Common/ButtonV2"; - import useFilters from "@/hooks/useFilters"; type AdvancedFilter = ReturnType["advancedFilter"]; @@ -35,18 +33,17 @@ export default function FiltersSlideover({
{t("filters")}
- + +
} diff --git a/src/CAREUI/interactive/Zoom.tsx b/src/CAREUI/interactive/Zoom.tsx index 0d6513efbba..d97300d36cb 100644 --- a/src/CAREUI/interactive/Zoom.tsx +++ b/src/CAREUI/interactive/Zoom.tsx @@ -2,7 +2,7 @@ import { ReactNode, createContext, useContext, useState } from "react"; import CareIcon from "@/CAREUI/icons/CareIcon"; -import ButtonV2 from "@/components/Common/ButtonV2"; +import { Button } from "@/components/ui/button"; type ProviderValue = { scale: number; @@ -69,31 +69,25 @@ export const ZoomControls = (props: { disabled?: boolean }) => { return (
- - + {Math.round(ctx.scale * 100)}% - - +
); }; diff --git a/src/CAREUI/misc/PaginatedList.tsx b/src/CAREUI/misc/PaginatedList.tsx index 6379b8b7ad8..9cefca73aac 100644 --- a/src/CAREUI/misc/PaginatedList.tsx +++ b/src/CAREUI/misc/PaginatedList.tsx @@ -2,7 +2,8 @@ import { createContext, useContext, useEffect, useState } from "react"; import CareIcon from "@/CAREUI/icons/CareIcon"; -import ButtonV2, { CommonButtonProps } from "@/components/Common/ButtonV2"; +import { Button, ButtonProps } from "@/components/ui/button"; + import Pagination from "@/components/Common/Pagination"; import { PaginatedResponse, QueryRoute } from "@/Utils/request/types"; @@ -118,13 +119,16 @@ const WhenLoading = (props: WhenEmptyProps) => { PaginatedList.WhenLoading = WhenLoading; +interface CommonButtonProps extends ButtonProps { + label?: string; +} + const Refresh = ({ label = "Refresh", ...props }: CommonButtonProps) => { const { loading, refetch } = useContextualized(); return ( - refetch()} disabled={loading} @@ -134,7 +138,7 @@ const Refresh = ({ label = "Refresh", ...props }: CommonButtonProps) => { className={classNames("text-lg", loading && "animate-spin")} /> {label} - + ); }; diff --git a/src/Integrations/Plausible.tsx b/src/Integrations/Plausible.tsx deleted file mode 100644 index 89d0572e9e4..00000000000 --- a/src/Integrations/Plausible.tsx +++ /dev/null @@ -1,87 +0,0 @@ -import careConfig from "@careConfig"; -import { useLocationChange } from "raviger"; -import { useEffect } from "react"; - -import Script from "@/components/Common/Script"; - -export default function Plausible() { - useLocationChange(() => { - plausible("pageview"); - }); - - useEffect(() => { - const missingConfig = []; - if (!careConfig.plausible.domain) missingConfig.push("domain"); - if (!careConfig.plausible.server) missingConfig.push("server"); - if (missingConfig.length > 0) { - console.error( - `Plausible analytics disabled. Missing configuration: ${missingConfig.join(", ")}`, - ); - return; - } - - plausible("pageview"); - }, []); - - return ( -