Merge branch 'home-banners-dashboard' of WrenchBoard/Users-Wrench into master
This commit is contained in:
|
Before Width: | Height: | Size: 452 B After Width: | Height: | Size: 448 B |
@@ -2,7 +2,7 @@ import React, { useEffect, useLayoutEffect, useState } from "react";
|
|||||||
import { Link, useLocation, useNavigate } from "react-router-dom";
|
import { Link, useLocation, useNavigate } from "react-router-dom";
|
||||||
import linkedInLogo from "../../../assets/images/Linkedin.png";
|
import linkedInLogo from "../../../assets/images/Linkedin.png";
|
||||||
import appleLogo from "../../../assets/images/apple-black.svg";
|
import appleLogo from "../../../assets/images/apple-black.svg";
|
||||||
import facebookLogo from "../../../assets/images/facebook-4.svg";
|
import facebookLogo from "../../../assets/images/facebook.svg";
|
||||||
import googleLogo from "../../../assets/images/google-logo.svg";
|
import googleLogo from "../../../assets/images/google-logo.svg";
|
||||||
import WrenchBoard from "../../../assets/images/wrenchboard-logo-text.png";
|
import WrenchBoard from "../../../assets/images/wrenchboard-logo-text.png";
|
||||||
import usersService from "../../../services/UsersService";
|
import usersService from "../../../services/UsersService";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React, { useEffect, useLayoutEffect, useState } from "react";
|
|||||||
import { Link, useLocation, useNavigate } from "react-router-dom";
|
import { Link, useLocation, useNavigate } from "react-router-dom";
|
||||||
import linkedInLogo from "../../../assets/images/Linkedin.png";
|
import linkedInLogo from "../../../assets/images/Linkedin.png";
|
||||||
import appleLogo from "../../../assets/images/apple-black.svg";
|
import appleLogo from "../../../assets/images/apple-black.svg";
|
||||||
import facebookLogo from "../../../assets/images/facebook-4.svg";
|
import facebookLogo from "../../../assets/images/facebook.svg";
|
||||||
import googleLogo from "../../../assets/images/google-logo.svg";
|
import googleLogo from "../../../assets/images/google-logo.svg";
|
||||||
import WrenchBoard from "../../../assets/images/wrenchboard-logo-text.png";
|
import WrenchBoard from "../../../assets/images/wrenchboard-logo-text.png";
|
||||||
import usersService from "../../../services/UsersService";
|
import usersService from "../../../services/UsersService";
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
const AccountDashboard = ({className}) => {
|
||||||
|
return (
|
||||||
|
<div className={`w-full min-h-[400px] md:grid grid-cols-2 lg:p-8 p-4 justify-between items-center gap-2 rounded-2xl overflow-hidden ${
|
||||||
|
className || ""
|
||||||
|
}`}>
|
||||||
|
<div className="w-full h-full flex items-center justify-center text-5xl text-center">
|
||||||
|
Account Dashboard
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AccountDashboard
|
||||||
@@ -2,10 +2,12 @@ import FamilyParentDashboard from "./FamilyParentDashboard";
|
|||||||
import HomeDashboard from "./HomeDashboard";
|
import HomeDashboard from "./HomeDashboard";
|
||||||
import JobOwnerDashboard from "./JobOwnerDashboard";
|
import JobOwnerDashboard from "./JobOwnerDashboard";
|
||||||
import WorkerDashboard from "./WorkerDashboard";
|
import WorkerDashboard from "./WorkerDashboard";
|
||||||
|
import AccountDashboard from "./AccountDashboard";
|
||||||
|
|
||||||
export {
|
export {
|
||||||
FamilyParentDashboard,
|
FamilyParentDashboard,
|
||||||
HomeDashboard,
|
HomeDashboard,
|
||||||
JobOwnerDashboard,
|
JobOwnerDashboard,
|
||||||
WorkerDashboard,
|
WorkerDashboard,
|
||||||
|
AccountDashboard
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
|
import {
|
||||||
|
AccountDashboard,
|
||||||
|
FamilyParentDashboard,
|
||||||
|
HomeDashboard,
|
||||||
|
JobOwnerDashboard,
|
||||||
|
WorkerDashboard,
|
||||||
|
} from "../Dashboards";
|
||||||
import MyJobTable from "../MyTasks/MyJobTable";
|
import MyJobTable from "../MyTasks/MyJobTable";
|
||||||
import MyOffersTable from "../MyTasks/MyOffersTable";
|
import MyOffersTable from "../MyTasks/MyOffersTable";
|
||||||
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
||||||
import Hero from "./Hero";
|
|
||||||
import HomeActivities from "./HomeActivities";
|
import HomeActivities from "./HomeActivities";
|
||||||
import { FamilyParentDashboard, HomeDashboard, JobOwnerDashboard, WorkerDashboard } from "../Dashboards";
|
|
||||||
|
|
||||||
export default function FullAccountDash(props) {
|
export default function FullAccountDash(props) {
|
||||||
// console.log("PROPS IN HOME->", props);
|
// console.log("PROPS IN HOME->", props);
|
||||||
@@ -57,9 +62,11 @@ export default function FullAccountDash(props) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="home-page-wrapper">
|
<div className="home-page-wrapper">
|
||||||
|
<AccountDashboard className="mb-4" />
|
||||||
{renderDashboard()}
|
{renderDashboard()}
|
||||||
|
|
||||||
{props?.dashTypes !== "undefined" && props.offersList?.data?.result_list?.length ? (
|
{props?.dashTypes !== "undefined" &&
|
||||||
|
props.offersList?.data?.result_list?.length ? (
|
||||||
<MyOffersTable
|
<MyOffersTable
|
||||||
MyActiveOffersList={props.offersList?.data}
|
MyActiveOffersList={props.offersList?.data}
|
||||||
className="mb-10"
|
className="mb-10"
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { useCallback, useEffect, useMemo, useState } from "react";
|
|||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import { Navigate, Outlet, useNavigate } from "react-router-dom";
|
import { Navigate, Outlet, useNavigate } from "react-router-dom";
|
||||||
import LoadingSpinner from "../components/Spinners/LoadingSpinner";
|
import LoadingSpinner from "../components/Spinners/LoadingSpinner";
|
||||||
|
import { formattedDate } from "../lib";
|
||||||
import usersService from "../services/UsersService";
|
import usersService from "../services/UsersService";
|
||||||
import { commonHeadBanner } from "../store/CommonHeadBanner";
|
import { commonHeadBanner } from "../store/CommonHeadBanner";
|
||||||
import { recentActivitiesData } from "../store/RecentActivitiesData";
|
import { recentActivitiesData } from "../store/RecentActivitiesData";
|
||||||
@@ -10,8 +11,6 @@ import { updateJobs } from "../store/jobLists";
|
|||||||
import { updateNotifications } from "../store/notifications";
|
import { updateNotifications } from "../store/notifications";
|
||||||
import { updateUserJobList } from "../store/userJobList";
|
import { updateUserJobList } from "../store/userJobList";
|
||||||
import { updateWalletDetails } from "../store/walletDetails";
|
import { updateWalletDetails } from "../store/walletDetails";
|
||||||
import { formattedDate } from "../lib";
|
|
||||||
import { tableReload } from "../store/TableReloads";
|
|
||||||
|
|
||||||
const AuthRoute = ({ redirectPath = "/login", children }) => {
|
const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||||
const apiCall = useMemo(() => new usersService(), []);
|
const apiCall = useMemo(() => new usersService(), []);
|
||||||
@@ -26,7 +25,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
userDetails: { username, uid, session},
|
userDetails: { username, uid, session },
|
||||||
} = useSelector((state) => state?.userDetails); // CHECKS IF USER Details are avaliable, to determine if user is active
|
} = useSelector((state) => state?.userDetails); // CHECKS IF USER Details are avaliable, to determine if user is active
|
||||||
|
|
||||||
let loggedIn = username && session && uid ? true : false; // variable to determine if user is logged in
|
let loggedIn = username && session && uid ? true : false; // variable to determine if user is logged in
|
||||||
|
|||||||
Reference in New Issue
Block a user