diff --git a/src/components/MyActiveJobs/MyActiveJobTable.jsx b/src/components/MyActiveJobs/MyActiveJobTable.jsx
index 500ff6c..d4a838f 100644
--- a/src/components/MyActiveJobs/MyActiveJobTable.jsx
+++ b/src/components/MyActiveJobs/MyActiveJobTable.jsx
@@ -1,17 +1,12 @@
import React, { useState } from "react";
import dataImage2 from "../../assets/images/data-table-user-2.png";
-
import { useNavigate, useLocation } from "react-router-dom";
-
import { handlePagingFunc } from "../Pagination/HandlePagination";
import PaginatedList from "../Pagination/PaginatedList";
export default function MyActiveJobTable({ MyJobList, className }) {
const navigate = useNavigate();
- let {pathname} = useLocation()
-
- const filterCategories = ["All Categories", "Explore", "Featured"];
- const [selectedCategory, setCategory] = useState(filterCategories[0]);
+ let { pathname } = useLocation();
const [currentPage, setCurrentPage] = useState(0);
const indexOfFirstItem = Number(currentPage);
@@ -44,82 +39,86 @@ export default function MyActiveJobTable({ MyJobList, className }) {
{
<>
{MyJobList &&
- MyJobList?.result_list &&
- MyJobList.result_list.length > 0 ?
- currentActiveJobList.map((value, index) => (
-
-
-
-
- 
-
-
-
- {value.title}
-
- {value.description}
-
- Price:{" "}
-
- {value.price * 0.01}
-
-
-
- Duration:{" "}
-
- {" "}
- {value.timeline_days} day(s)
-
-
-
- Expire:{" "}
-
- {" "}
- {value.expire}
-
-
-
- Send to:{" "}
-
- {" "}
- {value.job_to}
-
-
-
-
- |
+ MyJobList?.result_list &&
+ MyJobList.result_list.length > 0 ? (
+ currentActiveJobList.map((value, index) => {
+ let deliveryDate = value?.delivery_date?.split(" ")[0];
-
-
-
-
- |
-
- ))
- :
+ return (
+
+
+
+
+ 
+
+
+
+ {value.title}
+
+ {value.description}
+
+ Price:{" "}
+
+ {value.price * 0.01}
+
+
+
+ Duration:{" "}
+
+ {" "}
+ {value.timeline_days} day(s)
+
+
+
+ Expire:{" "}
+
+ {" "}
+ {deliveryDate}
+
+
+
+ Send to:{" "}
+
+ {" "}
+ {value.job_to === null
+ ? "(pending)"
+ : value.job_to}
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+ );
+ })
+ ) : (
- |
- No Active Task!
- |
+ No Active Task! |
- }
+ )}
>
}
diff --git a/src/components/MyActiveJobs/index.jsx b/src/components/MyActiveJobs/index.jsx
index 35ecdf7..46b9259 100644
--- a/src/components/MyActiveJobs/index.jsx
+++ b/src/components/MyActiveJobs/index.jsx
@@ -12,9 +12,7 @@ export default function MyActiveJobs(props) {
console.log("AMEYE LOC1", props.MyJobList);
return (
-
+
{/* heading */}
diff --git a/src/components/MyTasks/MyJobTable.jsx b/src/components/MyTasks/MyJobTable.jsx
index 67cadb8..a7c7ed6 100644
--- a/src/components/MyTasks/MyJobTable.jsx
+++ b/src/components/MyTasks/MyJobTable.jsx
@@ -45,123 +45,126 @@ export default function MyJobTable({ className, ActiveJobList }) {
: "none",
}}
>
+ {/* Adding this dark overlay in order to see the texts properly */}
{!ActiveJobList?.data.length && (
)}
- {ActiveJobList.loading ? (
+ {ActiveJobList?.data.length > 0 && ActiveJobList.loading && (
- ) : (
-
-
- {ActiveJobList?.data?.length > 0 ? (
- currentTask?.map((task, idx) => (
-
-
-
-
-

-
-
-
- {task?.title}
-
-
- {task?.description}
+ )}
+
+
+
+ {ActiveJobList?.data?.length > 0 &&
+ currentTask?.map((task, idx) => (
+
+
+
+
+

+
+
+
+ {task?.title}
+
+
+ {task?.description}
+
+
+ Price:
+
+ {Number(task?.price) * 0.01}
-
- Price:
-
- {Number(task?.price) * 0.01}
-
+
+
+ Duration:
+
+ {Number(task?.timeline_days) === 1
+ ? `${task?.timeline_days} day`
+ : `${task?.timeline_days} day(s)`}
-
- Duration:
-
- {Number(task?.timeline_days) === 1
- ? `${task?.timeline_days} day`
- : `${task?.timeline_days} day(s)`}
-
+
+
+ Due Date:
+
+ {task?.delivery_date}
-
- Due Date:
-
- {task?.delivery_date}
-
+
+
+ Confirmation:
+
+ {task?.contract}
-
- Confirmation:
-
- {task?.contract}
-
-
-
+
-
-
-
-
- ))
- ) : ActiveJobList.status ? (
-
-
- You currently have "0" task
-
-
-
- ) : (
-
-
Error Occurred! Unable to display Tasks!
-
- )}
-
- {/* PAGINATION BUTTON */}
-
=
- ActiveJobList?.data?.length
- ? true
- : false
- }
- data={ActiveJobList?.data}
- start={indexOfFirstItem}
- stop={indexOfLastItem}
- />
- {/* END OF PAGINATION BUTTON */}
+
+
+
+
+ ))}
+
+ {ActiveJobList?.data?.length <= 0 && (
+
+
+ You currently have "0" task
+
+
+
+ )}
+ {ActiveJobList?.internal_return < 0 && (
+
+
Error Occurred! Unable to display Tasks!
+
+ )}
- )}
+
+ {/* PAGINATION BUTTON */}
+
=
+ ActiveJobList?.data?.length
+ ? true
+ : false
+ }
+ data={ActiveJobList?.data}
+ start={indexOfFirstItem}
+ stop={indexOfLastItem}
+ />
+ {/* END OF PAGINATION BUTTON */}
+
);
}