@@ -53,4 +53,4 @@ const FamilyAccount = forwardRef(({ familyData, myRef, handlePrint }, ref) => {
);
});
-export default FamilyAccount;
\ No newline at end of file
+export default FamilyAccount;
diff --git a/src/components/FamilyAcc/Tabs/FamilyPending.jsx b/src/components/FamilyAcc/Tabs/FamilyPending.jsx
index 08ad302..c33f023 100644
--- a/src/components/FamilyAcc/Tabs/FamilyPending.jsx
+++ b/src/components/FamilyAcc/Tabs/FamilyPending.jsx
@@ -1,9 +1,8 @@
import { useMemo, useState } from "react";
-import { PaginatedList, handlePagingFunc } from "../../Pagination";
-import { PriceFormatter } from "../../Helpers/PriceFormatter";
-import dataImage2 from "../../../assets/images/data-table-user-2.png";
-import PendingJobsPopout from "../../jobPopout/PendingJobsPopout";
import localImgLoad from "../../../lib/localImgLoad";
+import { PriceFormatter } from "../../Helpers/PriceFormatter";
+import { PaginatedList, handlePagingFunc } from "../../Pagination";
+import PendingJobsPopout from "../../jobPopout/PendingJobsPopout";
export default function FamilyPending({
familyData,
@@ -37,7 +36,7 @@ export default function FamilyPending({
return (
@@ -125,8 +124,10 @@ export default function FamilyPending({
);
})
) : (
-
- | No Pending Task! |
+
+ |
+ No Pending Task!
+ |
)}
>
diff --git a/src/components/FamilyAcc/Tabs/FamilyProfile.jsx b/src/components/FamilyAcc/Tabs/FamilyProfile.jsx
index 0ff4fd9..79e318b 100644
--- a/src/components/FamilyAcc/Tabs/FamilyProfile.jsx
+++ b/src/components/FamilyAcc/Tabs/FamilyProfile.jsx
@@ -1,3 +1,11 @@
-export default function FamilyProfile() {
- return <>Profile>;
-}
\ No newline at end of file
+export default function FamilyProfile({ className }) {
+ return (
+
+
Profile
+
+ );
+}
diff --git a/src/components/FamilyAcc/Tabs/FamilyTasks.jsx b/src/components/FamilyAcc/Tabs/FamilyTasks.jsx
index 26ee19d..c114a31 100644
--- a/src/components/FamilyAcc/Tabs/FamilyTasks.jsx
+++ b/src/components/FamilyAcc/Tabs/FamilyTasks.jsx
@@ -1,20 +1,30 @@
-import React, { useState } from "react";
-import dataImage2 from "../../../assets/images/data-table-user-2.png";
-import { useNavigate, useLocation } from "react-router-dom";
+import React, { useMemo, useState } from "react";
+import { useLocation, useNavigate } from "react-router-dom";
+import localImgLoad from "../../../lib/localImgLoad";
+import Icons from "../../Helpers/Icons";
+import { PriceFormatter } from "../../Helpers/PriceFormatter";
import { handlePagingFunc } from "../../Pagination/HandlePagination";
import PaginatedList from "../../Pagination/PaginatedList";
import LoadingSpinner from "../../Spinners/LoadingSpinner";
-import Icons from "../../Helpers/Icons";
-import { PriceFormatter } from "../../Helpers/PriceFormatter";
-import ModalCom from "../../Helpers/ModalCom";
-import Detail from "../../jobPopout/popoutcomponent/Detail";
-import localImgLoad from "../../../lib/localImgLoad";
-
-export default function FamilyTasks({ familyData, className, loader, accountDetails }) {
+export default function FamilyTasks({
+ familyData,
+ className,
+ loader,
+ accountDetails,
+}) {
let navigate = useNavigate();
let { pathname } = useLocation();
+ // ...
+ const filteredFamilyData = useMemo(
+ () =>
+ familyData?.result_list?.filter(
+ (data) => data?.family_uid === accountDetails?.family_uid
+ ),
+ [familyData, accountDetails]
+ );
+
const [currentPage, setCurrentPage] = useState(0);
const indexOfFirstItem = Number(currentPage);
const indexOfLastItem =
@@ -26,9 +36,10 @@ export default function FamilyTasks({ familyData, className, loader, accountDeta
const handlePagination = (e) => handlePagingFunc(e, setCurrentPage);
+
return (
@@ -45,8 +56,8 @@ export default function FamilyTasks({ familyData, className, loader, accountDeta
{
<>
{familyData &&
- familyData?.result_list &&
- familyData.result_list.length > 0 &&
+ familyData?.result_list &&
+ familyData.result_list.length > 0 ? (
currentTask.map((value, index) => {
// find due date
const dueDate = value?.delivery_date.split(" ")[0];
@@ -56,7 +67,9 @@ export default function FamilyTasks({ familyData, className, loader, accountDeta
value?.currency_code,
value?.currency
);
- let image = value.banner ? value.banner : 'default.jpg'
+ let image = value.banner
+ ? value.banner
+ : "default.jpg";
return (
})
@@ -109,8 +124,8 @@ export default function FamilyTasks({ familyData, className, loader, accountDeta
state: {
...value,
pathname,
- accountDetails
- }
+ accountDetails,
+ },
});
}}
className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
@@ -120,7 +135,14 @@ export default function FamilyTasks({ familyData, className, loader, accountDeta
);
- })}
+ })
+ ) : (
+
+ |
+ No Family Task
+ |
+
+ )}
>
}
diff --git a/src/components/FamilyAcc/Tabs/FamilyWaitlist.jsx b/src/components/FamilyAcc/Tabs/FamilyWaitlist.jsx
index 996654c..e623306 100644
--- a/src/components/FamilyAcc/Tabs/FamilyWaitlist.jsx
+++ b/src/components/FamilyAcc/Tabs/FamilyWaitlist.jsx
@@ -48,7 +48,7 @@ const FamilyWaitlist = memo(
return (