- |
+ |
{" "}
Loading...
@@ -306,7 +306,7 @@ const ManageBucket = () =>
)}
{!loading && buckets.length == 0 && (
- |
+ |
Bucket Not Available.
@@ -315,7 +315,7 @@ const ManageBucket = () =>
)}
{!loading && sortedBucktesList.length == 0 && (
|
- |
+ |
No Matching Bucket Found.
diff --git a/src/components/Directory/NoteCardDirectory.jsx b/src/components/Directory/NoteCardDirectory.jsx
index 2b5c0868..7b996e94 100644
--- a/src/components/Directory/NoteCardDirectory.jsx
+++ b/src/components/Directory/NoteCardDirectory.jsx
@@ -156,15 +156,16 @@ const NoteCardDirectory = ({refetchProfile,refetchNotes, noteItem, contactId, se
)}
>
) : isActivProcess ? (
- < i className='bx bx-refresh text-primary bx-spin' >
+ < i className='bx bx-loader-alt bx-spin text-primary' >
) : (
handleDeleteNote(!noteItem.isActive)}
title="Restore"
>
)}
-
+
+
diff --git a/src/components/Project/AssignRole.jsx b/src/components/Project/AssignRole.jsx
index a639abc8..65badfb7 100644
--- a/src/components/Project/AssignRole.jsx
+++ b/src/components/Project/AssignRole.jsx
@@ -273,13 +273,6 @@ const AssignRoleModel = ({ assignData, onClose }) => {
- {employeeLoading && Loading employees... }
- {!employeeLoading &&
- filteredEmployees?.length === 0 &&
- employees && (
- No employees found for the selected role.
- )}
-
{selectedRole !== "" && (
diff --git a/src/components/Project/ManageProjectInfo.jsx b/src/components/Project/ManageProjectInfo.jsx
index 41d2cb24..a03077f9 100644
--- a/src/components/Project/ManageProjectInfo.jsx
+++ b/src/components/Project/ManageProjectInfo.jsx
@@ -102,13 +102,21 @@ const ManageProjectInfo = ({ project, handleSubmitForm, onClose }) => {
const onSubmitForm = (updatedProject) => {
setLoading(true);
handleSubmitForm( updatedProject, setLoading,reset );
-
-
+ };
+ const handleCancel = () => {
+ reset({
+ id: project?.id || "",
+ name: project?.name || "",
+ contactPerson: project?.contactPerson || "",
+ projectAddress: project?.projectAddress || "",
+ startDate: formatDate(project?.startDate) || currentDate,
+ endDate: formatDate(project?.endDate) || currentDate,
+ projectStatusId: String(project?.projectStatusId || "00000000-0000-0000-0000-000000000000"),
+ });
+ onClose();
};
-
-
return (
{
@@ -280,7 +288,7 @@ const ManageProjectInfo = ({ project, handleSubmitForm, onClose }) => {
@@ -188,7 +190,7 @@ const DailyTask = () => {
|
)}
{!task_loading && TaskList.length === 0 && (
-
+
|
No Reports Found
|
@@ -199,7 +201,7 @@ const DailyTask = () => {
|
- {date}
+ {moment(date).format("DD-MM-YYYY")}
|
{TaskLists.filter((task) =>
@@ -246,7 +248,7 @@ const DailyTask = () => {
task.workItem.completedWork}
{task.completedTask} |
- {formatDate(task.assignmentDate)} |
+ {moment(task.assignmentDate).format("DD-MM-YYYY")} |
{
${task.teamMembers
.map(
(member) => `
-
-
-
- ${
- member?.firstName?.charAt(
- 0
- ) || ""
- }${
+
+
+
+ ${
+ member?.firstName?.charAt(
+ 0
+ ) || ""
+ }${
member?.lastName?.charAt(0) || ""
}
-
-
- ${member.firstName} ${
+
+
+ ${member.firstName} ${
member.lastName
}
-
- `
+
+ `
)
.join("")}
@@ -362,4 +364,4 @@ const DailyTask = () => {
>
);
};
-export default DailyTask;
+export default DailyTask;
\ No newline at end of file
diff --git a/src/pages/Directory/Directory.jsx b/src/pages/Directory/Directory.jsx
index a9ceab49..ad3e1052 100644
--- a/src/pages/Directory/Directory.jsx
+++ b/src/pages/Directory/Directory.jsx
@@ -21,8 +21,9 @@ import ManageBucket from "../../components/Directory/ManageBucket";
import {useFab} from "../../Context/FabContext";
import {DireProvider, useDir} from "../../Context/DireContext";
-const Directory = () =>
+const Directory = ({IsPage=true,prefernceContacts}) =>
{
+ const[projectPrefernce,setPerfence] = useState(null)
const[IsActive,setIsActive] = useState(true)
const [isOpenModal, setIsOpenModal] = useState(false);
const [isOpenModalNote, setIsOpenModalNote] = useState(false);
@@ -44,7 +45,7 @@ const Directory = () =>
const { dirActions, setDirActions } = useDir();
- const { contacts, loading , refetch} = useDirectory(IsActive);
+ const { contacts, loading , refetch} = useDirectory(IsActive,projectPrefernce);
const { contactCategory, loading: contactCategoryLoading } =
useContactCategory();
const {buckets} = useBuckets();
@@ -72,7 +73,7 @@ const Directory = () =>
// cacheData("Contacts", {data:updatedContacts,isActive:IsActive});
// setContactList(updatedContacts);
- refetch()
+ refetch(IsActive,prefernceContacts)
} catch (error) {
const msg =
error.response?.data?.message ||
@@ -216,35 +217,43 @@ const handleDeleteContact = async (overrideId = null) => {
};
- useEffect(() => {
- setActions([
- {
- label: "New Contact",
- icon: "bx bx-plus-circle",
- color: "warning",
- onClick: () => setIsOpenModal(true),
- },
- {
- label: "Manage Bucket",
- icon: "fa-solid fa-bucket fs-5 ",
- color: "primary",
- onClick: () => setOpenBucketModal(true),
- },
-
- ]);
+ useEffect(() => {
+ const actions = [];
- return () => setActions([]); // Clean up
- }, []);
+ if (IsPage) {
+ actions.push({
+ label: "Manage Bucket",
+ icon: "fa-solid fa-bucket fs-5",
+ color:"primary",
+ onClick: () => setOpenBucketModal(true),
+ });
+ }
+ actions.push({
+ label: "New Contact",
+ icon: "bx bx-plus-circle",
+ color: "warning",
+ onClick: () => setIsOpenModal(true),
+ } );
+
+
+ setActions(actions);
+
+ return () => setActions([]);
+}, [IsPage]);
+ useEffect( () =>
+ {
+ setPerfence(prefernceContacts)
+},[prefernceContacts])
return (
-
+ >)}
{isOpenModal && (
-
-
+
| |