diff --git a/public/assets/css/default.css b/public/assets/css/default.css index 08b78aa8..919d49dc 100644 --- a/public/assets/css/default.css +++ b/public/assets/css/default.css @@ -189,3 +189,7 @@ text-align: left; padding-left: 50px; } */ + +.small-text{ + font-size: 12px; +} \ No newline at end of file diff --git a/public/assets/vendor/css/core.css b/public/assets/vendor/css/core.css index b8e659cb..46f34f42 100644 --- a/public/assets/vendor/css/core.css +++ b/public/assets/vendor/css/core.css @@ -29002,7 +29002,6 @@ li:not(:first-child) .dropdown-item, /* Only for menu example */ .menu-collapsed:not(:hover) { inline-size: var(--bs-menu-collapsed-width); - /* Custom for sneat only */ } .menu-collapsed:not(:hover) .menu-inner > .menu-item { inline-size: var(--bs-menu-collapsed-width); @@ -29682,7 +29681,6 @@ li:not(:first-child) .dropdown-item, ) .layout-menu.menu-vertical { inline-size: var(--bs-menu-collapsed-width); - /* Custom for sneat only */ } .layout-menu-collapsed:not( .layout-menu-hover, diff --git a/public/scss/_components/_menu.scss b/public/scss/_components/_menu.scss index 09f9c658..50c58126 100644 --- a/public/scss/_components/_menu.scss +++ b/public/scss/_components/_menu.scss @@ -186,7 +186,6 @@ > .menu-item { margin: $menu-item-spacer 0; - // Sneat menu-link spacing .menu-link { margin: $menu-vertical-link-margin-y $menu-vertical-link-margin-x; } @@ -197,7 +196,6 @@ .menu-block { padding: $menu-vertical-link-padding-y $menu-vertical-link-padding-x; } - // Sneat menu-header spacing .menu-header { margin: $menu-vertical-header-margin-y 0 $menu-vertical-header-margin-y * 0.5 0; padding: $menu-vertical-link-padding-y $menu-vertical-link-padding-x * 2 $menu-vertical-link-padding-y @@ -276,7 +274,7 @@ // Vertical Menu Collapsed // ******************************************************************************* -// ! Updated menu collapsed styles for sneat in this mixin +// ! Updated menu collapsed styles for in this mixin @mixin layout-menu-collapsed() { width: $menu-collapsed-width; @@ -312,7 +310,6 @@ top: 1.1875rem; } } - // Custom for sneat only .menu-block { &::before { bottom: 0.75rem; diff --git a/src/components/Activities/ReportTaskComments.jsx b/src/components/Activities/ReportTaskComments.jsx index 94ee1c7b..efe62d0a 100644 --- a/src/components/Activities/ReportTaskComments.jsx +++ b/src/components/Activities/ReportTaskComments.jsx @@ -27,15 +27,21 @@ const ReportTaskComments = ({ commentsData, closeModal }) => { }); const containerRef = useRef(null); + const firstRender = useRef(true); + + useEffect(() => { setComment(commentsData?.comments); }, [commentsData]); + // Scroll logic: scroll to bottom when new comments are added useEffect(() => { - if (containerRef.current) { + if (!firstRender.current && containerRef.current) { containerRef.current.scrollTop = containerRef.current.scrollHeight; + } else { + firstRender.current = false; // Mark the first render as complete } - }, [comments]); + }, [comments]); // Run this when comments array is updated const onSubmit = async (data) => { let sendComment = { @@ -70,9 +76,10 @@ const ReportTaskComments = ({ commentsData, closeModal }) => { // closeModal(); } catch (error) { setloading(false); - showToast(error.response.data?.message || "Something wrong", "error"); + showToast(error.response.data?.message || "Something went wrong", "error"); } }; + return (
{ onClick={closeModal} aria-label="Close" > -

- {`${commentsData?.workItem?.workArea?.floor?.building?.name}`}{" "} - {" "} - {`${commentsData?.workItem?.workArea?.floor?.floorName} `}{" "} - - {`${commentsData?.workItem?.workArea?.areaName}`} - - {` ${commentsData?.workItem?.activityMaster?.activityName}`} +

Activity Summary

+

+ {comments && comments[0]?.comment} +

+

+ Assigned By : + + {commentsData?.assignedBy.firstName + + " " + + commentsData?.assignedBy.lastName} + {" "}

- -
+ +