diff --git a/src/components/Dashboards/AccountDashboard.jsx b/src/components/Dashboards/AccountDashboard.jsx index dc4e7c3..bf55bf5 100644 --- a/src/components/Dashboards/AccountDashboard.jsx +++ b/src/components/Dashboards/AccountDashboard.jsx @@ -44,13 +44,13 @@ const AccountDashboard = ({ className, bannerList, offersList, imageServer }) => ); let image = `${imageServer}${localStorage.getItem("session_token")}/job/${item.job_uid}` - return ( -
- {index < 3 && - - } -
- ) + if(index < 3){ + return ( +
+ +
+ ) + } })} @@ -89,12 +89,11 @@ const AccountDashboard = ({ className, bannerList, offersList, imageServer }) => let image = `${imageServer}${localStorage.getItem("session_token")}/job/${item.job_uid}` if(index >= 3) { - return - (
+ return( +
-
) - }else{ - null +
+ ) } })} diff --git a/src/components/FamilyAcc/FamilyTableNew.jsx b/src/components/FamilyAcc/FamilyTableNew.jsx index 4ced8c7..562957a 100644 --- a/src/components/FamilyAcc/FamilyTableNew.jsx +++ b/src/components/FamilyAcc/FamilyTableNew.jsx @@ -20,6 +20,9 @@ export default function FamilyTableNew() { let { pathname } = useLocation(); + const queryParams = new URLSearchParams(location?.search); + const preSelectedTab = queryParams.get("tab"); + // Initial state for family details const initialDetailState = { loading: false, @@ -55,9 +58,9 @@ export default function FamilyTableNew() { // Array of tab names const tabs = [ - { id: 1, name: "Tasks" }, - { id: 2, name: "Waiting" }, - { id: 3, name: "Pending" }, + { id: 1, name: "tasks" }, + { id: 2, name: "waiting" }, + { id: 3, name: "pending" }, ]; // State for the currently selected tab @@ -94,6 +97,14 @@ export default function FamilyTableNew() { // Selected tab component based on the current 'tab' const selectedTabComponent = tabComponents[tab] || defaultTabComponent; + useEffect(()=>{ // EFFECT TO CHECK FOR PRE SELECTED TAB AND DEFAULT TO IT OR TO DEFAULT IF NOT AVALIABLE + if(preSelectedTab && tabs.map(item => item.name.toLowerCase()).includes(preSelectedTab.toLowerCase())){ + setTab(preSelectedTab) + }else{ + setTab(tabs[0].name) + } + },[]) + // Effect to manage active family task details useEffect(() => { diff --git a/src/components/jobPopout/OfferJobPopout.jsx b/src/components/jobPopout/OfferJobPopout.jsx index 6f83024..d285cc9 100644 --- a/src/components/jobPopout/OfferJobPopout.jsx +++ b/src/components/jobPopout/OfferJobPopout.jsx @@ -177,19 +177,31 @@ function OfferJobPopout({ details, onClose, situation }) { -

+

{details.title}

- + +

{details.description}

+ {/* */}
-
- -

{details.job_description || details.job_detail}

+
+ {/* +

{details.job_description || details.job_detail}

*/} + +