From a50374507708f822a74957b3923b01f44703ec03 Mon Sep 17 00:00:00 2001 From: JahnabDutta Date: Wed, 30 Aug 2023 19:11:04 +0530 Subject: [PATCH 1/2] merge upstream develop Signed-off-by: JahnabDutta --- package-lock.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 21661be98b7..bc74da4e4d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7789,15 +7789,9 @@ "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" }, "node_modules/cypress": { -<<<<<<< HEAD - "version": "12.17.3", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.17.3.tgz", - "integrity": "sha512-/R4+xdIDjUSLYkiQfwJd630S81KIgicmQOLXotFxVXkl+eTeVO+3bHXxdi5KBh/OgC33HWN33kHX+0tQR/ZWpg==", -======= "version": "12.17.4", "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.17.4.tgz", "integrity": "sha512-gAN8Pmns9MA5eCDFSDJXWKUpaL3IDd89N9TtIupjYnzLSmlpVr+ZR+vb4U/qaMp+lB6tBvAmt7504c3Z4RU5KQ==", ->>>>>>> 568a5421b5b4d4e9c183faab6edb91d67b77b6db "dev": true, "hasInstallScript": true, "dependencies": { From e7f36b5cfe38763042ed7453a5a87ad32a4c9883 Mon Sep 17 00:00:00 2001 From: JahnabDutta Date: Wed, 30 Aug 2023 20:05:42 +0530 Subject: [PATCH 2/2] revert extra files Signed-off-by: JahnabDutta --- src/CAREUI/display/RecordMeta.tsx | 2 +- src/Components/Notifications/NoticeBoard.tsx | 7 +++++-- src/Redux/actions.tsx | 4 ++-- src/index.tsx | 3 +-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/CAREUI/display/RecordMeta.tsx b/src/CAREUI/display/RecordMeta.tsx index dd14ccd2a26..83928f1f23a 100644 --- a/src/CAREUI/display/RecordMeta.tsx +++ b/src/CAREUI/display/RecordMeta.tsx @@ -23,7 +23,7 @@ const RecordMeta = ({ time, user, prefix, className }: Props) => { let child = (
{relativeTime(time)} - + {formatDateTime(time)} {user && ( <> diff --git a/src/Components/Notifications/NoticeBoard.tsx b/src/Components/Notifications/NoticeBoard.tsx index 1c6fd486d49..7fd16efb3cf 100644 --- a/src/Components/Notifications/NoticeBoard.tsx +++ b/src/Components/Notifications/NoticeBoard.tsx @@ -7,7 +7,7 @@ import { formatDateTime } from "../../Utils/utils"; import { useTranslation } from "react-i18next"; import CareIcon from "../../CAREUI/icons/CareIcon"; -export const NoticeBoard: any = () => { +export const NoticeBoard = () => { const dispatch: any = useDispatch(); const [isLoading, setIsLoading] = useState(true); const [data, setData] = useState([]); @@ -16,7 +16,10 @@ export const NoticeBoard: any = () => { useEffect(() => { setIsLoading(true); dispatch( - getNotifications({ offset: 0, event: "MESSAGE", medium_sent: "SYSTEM" }) + getNotifications( + { offset: 0, event: "MESSAGE", medium_sent: "SYSTEM" }, + new Date().getTime().toString() + ) ) .then((res: any) => { if (res && res.data) { diff --git a/src/Redux/actions.tsx b/src/Redux/actions.tsx index e00fd33bec6..0ea1270f741 100644 --- a/src/Redux/actions.tsx +++ b/src/Redux/actions.tsx @@ -684,8 +684,8 @@ export const partialUpdateExternalResult = (id: number, params: object) => { }; // Notifications -export const getNotifications = (params: object) => { - return fireRequest("getNotifications", [], params); +export const getNotifications = (params: object, altKey?: string) => { + return fireRequest("getNotifications", [], params, {}, altKey); }; export const getNotificationData = (pathParam: object) => { diff --git a/src/index.tsx b/src/index.tsx index 9311fec8e60..0c60d9ba2db 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -9,8 +9,7 @@ import * as Sentry from "@sentry/browser"; import "./style/index.css"; import { registerSW } from "virtual:pwa-register"; - -if("serviceWorker" in navigator){ +if ("serviceWorker" in navigator) { registerSW({ immediate: false }); }