From 9c101cdcfd7b7eb47a587564bab29bb5345b9a4a Mon Sep 17 00:00:00 2001 From: nikhilagastya <72994295+nikhilagastya@users.noreply.github.com> Date: Tue, 30 May 2023 16:48:23 +0530 Subject: [PATCH] Adds Illustration when no notices available + Replaced Material UI components in NoticeBoard page (#5552) * Date picker not closing on selecting date fixed * No Notice Component added * Notice board Empty componenet * Notice board empty component with tailwind css * Changes made regarding styling in NoticeBoard.tsx * Direct path of img given in NoticeBoard.tsx * minor fix: consistent design * button classes removed * Closed change of Material UI components in Notice Board * added key prop * fixed page issue * removed Notificationsbell.png * merged NoticeBoard changes * NoticeBoard full page * Update src/Components/Notifications/NoticeBoard.tsx * Update src/Components/Notifications/NoticeBoard.tsx * Update src/Components/Notifications/NoticeBoard.tsx * Bell Slash Icon added --------- Co-authored-by: Rithvik Nishad Co-authored-by: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> Co-authored-by: Khavin Shankar --- package.json | 2 +- .../CriticalCare__PressureSoreInputModal.res | 2 +- src/Components/Notifications/NoticeBoard.tsx | 58 +++++++++---------- 3 files changed, 30 insertions(+), 32 deletions(-) diff --git a/package.json b/package.json index 5d20bce652a..1a6b488a1c7 100644 --- a/package.json +++ b/package.json @@ -209,4 +209,4 @@ "engines": { "node": "18.x" } -} +} \ No newline at end of file diff --git a/src/Components/CriticalCareRecording/PressureSore/CriticalCare__PressureSoreInputModal.res b/src/Components/CriticalCareRecording/PressureSore/CriticalCare__PressureSoreInputModal.res index db303b6c38f..190731aca11 100644 --- a/src/Components/CriticalCareRecording/PressureSore/CriticalCare__PressureSoreInputModal.res +++ b/src/Components/CriticalCareRecording/PressureSore/CriticalCare__PressureSoreInputModal.res @@ -207,4 +207,4 @@ let make = ( -} +} \ No newline at end of file diff --git a/src/Components/Notifications/NoticeBoard.tsx b/src/Components/Notifications/NoticeBoard.tsx index 8ce910e2e73..01a2af1a469 100644 --- a/src/Components/Notifications/NoticeBoard.tsx +++ b/src/Components/Notifications/NoticeBoard.tsx @@ -1,11 +1,11 @@ import React, { useEffect, useState } from "react"; import { useDispatch } from "react-redux"; import { getNotifications } from "../../Redux/actions"; -import PageTitle from "../Common/PageTitle"; -import { Card, CardContent } from "@material-ui/core"; +import Page from "../Common/components/Page"; import Loading from "../Common/Loading"; import { formatDate } from "../../Utils/utils"; import { useTranslation } from "react-i18next"; +import CareIcon from "../../CAREUI/icons/CareIcon"; export const NoticeBoard: any = () => { const dispatch: any = useDispatch(); @@ -30,50 +30,48 @@ export const NoticeBoard: any = () => { }, [dispatch]); let notices; + if (data && data.length) { notices = (
{data.map((item) => ( - - -
-
{item.message}
-
- {`${item.caused_by.first_name} ${item.caused_by.last_name}`} -{" "} - - {item.caused_by.user_type} - -
-
- {t("on")}: {formatDate(item.created_date)} -
+
+
+
{item.message}
+
+ {`${item.caused_by.first_name} ${item.caused_by.last_name}`} -{" "} + + {item.caused_by.user_type} + +
+
+ {t("on")}: {formatDate(item.created_date)}
- - +
+
))}
); } else { notices = ( - - -
- {t("no_notices_for_you")} +
+
+ +
+ No Notice Available
- - +
+
); } if (isLoading) return ; return ( -
- +
{notices}
-
+ ); };