diff --git a/src/components/Activities/AttendcesLogs.jsx b/src/components/Activities/AttendcesLogs.jsx index feda6c77..1ac58c72 100644 --- a/src/components/Activities/AttendcesLogs.jsx +++ b/src/components/Activities/AttendcesLogs.jsx @@ -112,7 +112,7 @@ const AttendanceLog = ({ handleModalData, projectId, showOnlyCheckout }) => { const { currentPage, totalPages, currentItems: paginatedAttendances, paginate, resetPage } = usePagination( processedData, - 10 + 20 ); // Reset to the first page whenever processedData changes (due to switch on/off) diff --git a/src/components/Activities/ReportTaskComments.jsx b/src/components/Activities/ReportTaskComments.jsx index efe62d0a..91399b79 100644 --- a/src/components/Activities/ReportTaskComments.jsx +++ b/src/components/Activities/ReportTaskComments.jsx @@ -13,6 +13,15 @@ const schema = z.object({ comment: z.string().min(1, "Comment cannot be empty"), }); +/** + * ReportTaskComments component for displaying and adding comments to a task. + * It also shows a summary of the activity and task details. + * + * @param {object} props - The component props. + * @param {object} props.commentsData - Data related to the task and its comments, including the description. + * @param {function} props.closeModal - Callback function to close the modal. + */ + const ReportTaskComments = ({ commentsData, closeModal }) => { const [loading, setloading] = useState(false); const [comments, setComment] = useState([]); @@ -27,7 +36,7 @@ const ReportTaskComments = ({ commentsData, closeModal }) => { }); const containerRef = useRef(null); - const firstRender = useRef(true); + const firstRender = useRef(true); useEffect(() => { @@ -79,7 +88,7 @@ const ReportTaskComments = ({ commentsData, closeModal }) => { showToast(error.response.data?.message || "Something went wrong", "error"); } }; - + console.log("Kartik", commentsData) return (
Activity Summary
+- {comments && comments[0]?.comment} + {commentsData?.workItem?.workArea?.floor?.building?.description}
+Assigned By : @@ -126,7 +140,7 @@ const ReportTaskComments = ({ commentsData, closeModal }) => { Completed Work : {commentsData?.completedTask}
Team:
+Team :
{fullName}
-+
{fullName}
+{moment.utc(data?.commentDate).local().fromNow()}