- {
- // Show online icon based on last_login
- user.last_login && isUserOnline(user) ? (
- <>
-
-
- >
- ) : (
-
- )
- }
+
+ {
+ // Show online icon based on last_login
+ user.last_login && isUserOnline(user) ? (
+ <>
+
+
+ >
+ ) : (
+
+ )
+ }
+
+
+
+
+ {formatName(user)}
+
+
-
-
-
- {formatName(user)}
-
-
-
- {!!user.skills.length && (
-
-
- {user.skills?.map((skill: SkillObjectModel) => (
-
- {skill.name}
-
- ))}
-
-
- )}
-
);
}
diff --git a/src/components/Licenses/SBOMViewer.tsx b/src/components/Licenses/SBOMViewer.tsx
index d8a7cdc93df..e2cd75d372e 100644
--- a/src/components/Licenses/SBOMViewer.tsx
+++ b/src/components/Licenses/SBOMViewer.tsx
@@ -1,10 +1,10 @@
import dayjs from "dayjs";
import React, { useState } from "react";
-import { CopyToClipboard } from "react-copy-to-clipboard";
import Card from "@/CAREUI/display/Card";
import CareIcon from "@/CAREUI/icons/CareIcon";
+import CopyButton from "@/components/Common/CopyButton";
import beBomData from "@/components/Licenses/be-sbom.json";
import feBomData from "@/components/Licenses/fe-sbom.json";
import licenseUrls from "@/components/Licenses/licenseUrls.json";
@@ -13,6 +13,7 @@ const getLicenseUrl = (licenseId: string | undefined): string | null => {
if (!licenseId) return null;
return licenseUrls[licenseId as keyof typeof licenseUrls] || null;
};
+
interface CycloneDXExternalRef {
url?: string;
type?: string;
@@ -64,15 +65,9 @@ interface CycloneDXBOM {
}
const BOMDisplay: React.FC = () => {
- const [copyStatus, setCopyStatus] = useState(false);
const [showExternalRefs, setShowExternalRefs] = useState
(null);
const [activeTab, setActiveTab] = useState("bom");
- const handleCopy = () => {
- setCopyStatus(true);
- setTimeout(() => setCopyStatus(false), 2000);
- };
-
const bomData = (activeTab === "bom" ? feBomData : beBomData) as CycloneDXBOM;
return (
@@ -182,19 +177,13 @@ const BOMDisplay: React.FC = () => {
))}
-
-
-
- {copyStatus && (
-
- Copied to clipboard!
-
- )}
+ Copy BOM JSON
+
diff --git a/src/components/Shifting/ShiftDetails.tsx b/src/components/Shifting/ShiftDetails.tsx
index 58685d20fb1..df5942a479a 100644
--- a/src/components/Shifting/ShiftDetails.tsx
+++ b/src/components/Shifting/ShiftDetails.tsx
@@ -2,7 +2,6 @@ import careConfig from "@careConfig";
import { QRCodeSVG } from "qrcode.react";
import { Link, navigate } from "raviger";
import { useState } from "react";
-import { CopyToClipboard } from "react-copy-to-clipboard";
import { useTranslation } from "react-i18next";
import RecordMeta from "@/CAREUI/display/RecordMeta";
@@ -12,6 +11,7 @@ import PrintPreview from "@/CAREUI/misc/PrintPreview";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import ButtonV2 from "@/components/Common/ButtonV2";
+import CopyButton from "@/components/Common/CopyButton";
import Loading from "@/components/Common/Loading";
import Page from "@/components/Common/Page";
import { ConsultationModel } from "@/components/Facility/models";
@@ -30,7 +30,6 @@ import { formatDateTime, formatName, formatPatientAge } from "@/Utils/utils";
export default function ShiftDetails(props: { id: string }) {
const [isPrintMode, setIsPrintMode] = useState(false);
- const [isCopied, setIsCopied] = useState(false);
const { t } = useTranslation();
const shiftStatusOptions = careConfig.wartimeShifting
@@ -41,22 +40,7 @@ export default function ShiftDetails(props: { id: string }) {
pathParams: { id: props.id },
});
const showCopyToclipBoard = (data: any) => {
- return (
-
- setIsCopied(true)}
- >
- {isCopied ? (
- {t("copied_to_clipboard")}
- ) : (
-
-
-
- )}
-
-
- );
+ return
;
};
const copyContent = (data: any) => {
@@ -93,10 +77,6 @@ export default function ShiftDetails(props: { id: string }) {
return formattedText;
};
- setTimeout(() => {
- setIsCopied(false);
- }, 5000);
-
const showPatientCard = (patientData: PatientModel) => {
const patientGender = GENDER_TYPES.find(
(i) => i.id === patientData?.gender,