diff --git a/.env b/.env index 330d22f..245811c 100644 --- a/.env +++ b/.env @@ -18,6 +18,7 @@ REACT_APP_USERS_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/svs/user" #"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser" REACT_APP_SESSION_EXPIRE_MINUTES=300000 +REACT_APP_SESSION_EXPIRE_MINUTES_FAMILY=600000 REACT_APP_SESSION_EXPIRE_CHECKER=60000 REACT_APP_LOGIN_ERROR_TIMEOUT=7000 diff --git a/.env.development b/.env.development index 288f294..95c0a38 100644 --- a/.env.development +++ b/.env.development @@ -18,6 +18,7 @@ REACT_APP_USERS_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/svs/user" #"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser" REACT_APP_SESSION_EXPIRE_MINUTES=300000 +REACT_APP_SESSION_EXPIRE_MINUTES_FAMILY=600000 REACT_APP_SESSION_EXPIRE_CHECKER=60000 REACT_APP_LOGIN_ERROR_TIMEOUT=7000 diff --git a/.env.production b/.env.production index d5d045f..d30af61 100644 --- a/.env.production +++ b/.env.production @@ -18,6 +18,7 @@ REACT_APP_USERS_ENDPOINT="https://apigate.orion.g1.wrenchboard.com/svs/user" #"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser" REACT_APP_SESSION_EXPIRE_MINUTES=300000 +REACT_APP_SESSION_EXPIRE_MINUTES_FAMILY=600000 REACT_APP_SESSION_EXPIRE_CHECKER=60000 REACT_APP_LOGIN_ERROR_TIMEOUT=7000 diff --git a/src/components/Home/HomeActivities.jsx b/src/components/Home/HomeActivities.jsx index 7df619c..4615a86 100644 --- a/src/components/Home/HomeActivities.jsx +++ b/src/components/Home/HomeActivities.jsx @@ -17,923 +17,248 @@ export default function HomeActivities({ className }) {

- Activities + Recent Activities

-
{/* table heading */} - - */} + {/* */} + {/* */} + {/* */} + + {/* */} + {/**/} + + + + + + - - - - - - - {/* table heading end */} - {selectedCategory === "All Categories" ? ( - <> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ) : selectedCategory === "Explore" ? ( - <> - - - - - - - - - - - - - - - - - - - - ) : ( - - + - - - - - - - - )} + + + + + + +
- All Product + {/*
*/} + {/* All Product*/} + {/* .
+
+
+ data +
+
+

+ Mullican Computer Joy +

+ + Owned by Xoeyam + +
+
+
+
+ + + + + + + + + + + + + 7473 ETH + +
+
+
+ + + + + + + + + + 6392.99$ + +
+
+ ValueUSD24H%BitsTimeStatus
-
-
- data -
-
-

- Mullican Computer Joy -

- - Owned by Xoeyam - -
-
-
-
- - - - - - - - - - - - - 7473 ETH - -
-
-
- - - - - - - - - - 6392.99$ - -
-
- - -24.75 (11.5%) - - - - 343 - - - - 2 Hours 1 min 30s - - - -
-
-
- data -
-
-

- Mullican Computer Joy -

- - Owned by Xoeyam - -
-
-
-
- - - - - - - - - - - - - 7473 ETH - -
-
-
- - - - - - - - - - 6392.99$ - -
-
- - -24.75 (11.5%) - - - - 343 - - - - 2 Hours 1 min 30s - - - -
-
-
- data -
-
-

- Mullican Computer Joy -

- - Owned by Xoeyam - -
-
-
-
- - - - - - - - - - - - - 7473 ETH - -
-
-
- - - - - - - - - - 6392.99$ - -
-
- - -24.75 (11.5%) - - - - 343 - - - - 2 Hours 1 min 30s - - - -
-
-
- data -
-
-

- Mullican Computer Joy -

- - Owned by Xoeyam - -
-
-
-
- - - - - - - - - - - - - 7473 ETH - -
-
-
- - - - - - - - - - 6392.99$ - -
-
- - -24.75 (11.5%) - - - - 343 - - - - 2 Hours 1 min 30s - - - -
-
-
- data -
-
-

- Mullican Computer Joy -

- - Owned by Xoeyam - -
-
-
-
- - - - - - - - - - - - - 7473 ETH - -
-
-
- - - - - - - - - - 6392.99$ - -
-
- - -24.75 (11.5%) - - - - 343 - - - - 2 Hours 1 min 30s - - - -
-
-
- data -
-
-

- Mullican Computer Joy -

- - Owned by Xoeyam - -
-
-
-
- - - - - - - - - - - - - 7473 ETH - -
-
-
- - - - - - - - - - 6392.99$ - -
-
- - -24.75 (11.5%) - - - - 343 - - - - 2 Hours 1 min 30s - - - -
-
-
- data -
-
-

- Mullican Computer Joy -

- - Owned by Xoeyam - -
+
+
+
+ data
-
-
- - - - - - - - - - - - - 7473 ETH - +
+

+ Mullican Computer Joy +

+ + Owned by Xoeyam +
-
-
- - - - - - - - - - 6392.99$ - -
-
- - -24.75 (11.5%) - - - - 343 - - - - 2 Hours 1 min 30s - - - -
+
+ + + + + + + + + + + + + 7473 ETH + +
+
+
+ + + + + + + + + + 6392.99$ + +
+
+ +
diff --git a/src/components/MyActiveJobs/ActiveJobMessage.jsx b/src/components/MyActiveJobs/ActiveJobMessage.jsx index c73ec45..8bc4abd 100644 --- a/src/components/MyActiveJobs/ActiveJobMessage.jsx +++ b/src/components/MyActiveJobs/ActiveJobMessage.jsx @@ -31,7 +31,13 @@ export default function ActiveJobMessage({ activeJobMesList }) { {currentActiveJobMesList.map((item, index) => ( - + +
+
{item.msg_date} {item.msg_firstname}
+ +
+ + ))} diff --git a/src/components/Partials/Header.jsx b/src/components/Partials/Header.jsx index 24b26c1..11a586b 100644 --- a/src/components/Partials/Header.jsx +++ b/src/components/Partials/Header.jsx @@ -100,7 +100,7 @@ export default function Header({ logoutModalHandler, sidebarHandler }) { // User Profile let { firstname, lastname, email, profile_pic } = userDetails; - let userEmail = email.split("@")[0]; + let userEmail = email?.split("@")[0]; return ( <> diff --git a/src/components/jobPopout/PendingJobsPopout.jsx b/src/components/jobPopout/PendingJobsPopout.jsx index 160437c..f42f444 100644 --- a/src/components/jobPopout/PendingJobsPopout.jsx +++ b/src/components/jobPopout/PendingJobsPopout.jsx @@ -229,4 +229,4 @@ function PendingJobsPopout({ details, onClose, situation }) { ); } -export default PendingJobsPopout; +export default PendingJobsPopout; \ No newline at end of file diff --git a/src/index.css b/src/index.css index c8f46b3..64f56ef 100644 --- a/src/index.css +++ b/src/index.css @@ -9,6 +9,17 @@ font-family: "Product Sans"; src: url("./assets/fonts/Product Sans Bold.ttf"); } +.msg_box{ + background-color: aliceblue; + margin: 5px; + padding: 5px; + border-radius: 15px; +} +.msg_header{ + background-color: #1a3544; + color: white; + font-weight: bold; +} .siderCardHeader{ margin: 40px 40px 10px 40px; font-size: 24px; diff --git a/src/middleware/AuthRoute.jsx b/src/middleware/AuthRoute.jsx index 52bbb81..724f4c3 100644 --- a/src/middleware/AuthRoute.jsx +++ b/src/middleware/AuthRoute.jsx @@ -12,23 +12,37 @@ const AuthRoute = ({ redirectPath = "/login", children }) => { const dispatch = useDispatch(); const [lastActivityTime, setLastActivityTime] = useState(Date.now()); const [isLogin, setIsLogin] = useState({ loading: true, status: false }); + const [loadProfileDetails, setLoadProfileDetails] = useState([]); const navigate = useNavigate(); - const {jobListTable} = useSelector((state) => state.tableReload) - + const { jobListTable } = useSelector((state) => state.tableReload); + useEffect(() => { //Removing Data stored at localStorage after session expires const expireSession = () => { - localStorage.clear(); + localStorage.removeItem("uid"); + localStorage.removeItem("member_id"); + localStorage.removeItem("session_token"); navigate("/login", { replace: true }); // redirects user to login page after session expires }; + console.log(loadProfileDetails); const checkInactivity = setInterval(() => { - if ( - Date.now() - lastActivityTime > - process.env.REACT_APP_SESSION_EXPIRE_MINUTES - ) { - expireSession(); + let { account_type } = loadProfileDetails; + if (account_type === "FAMILY") { + if ( + Date.now() - lastActivityTime > + process.env.REACT_APP_SESSION_EXPIRE_MINUTES_FAMILY + ) { + expireSession(); + } + } else { + if ( + Date.now() - lastActivityTime > + process.env.REACT_APP_SESSION_EXPIRE_MINUTES + ) { + expireSession(); + } } }, process.env.REACT_APP_SESSION_EXPIRE_CHECKER); // Checks for inactivity every minute @@ -65,6 +79,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => { setIsLogin({ loading: false, status: false }); return; } + setLoadProfileDetails(res.data); dispatch(updateUserDetails(res.data)); setIsLogin({ loading: false, status: true }); }) @@ -76,22 +91,22 @@ const AuthRoute = ({ redirectPath = "/login", children }) => { } }, []); - useEffect(()=>{ + useEffect(() => { const getMyJobList = async () => { - dispatch(updateUserJobList({loading: true, data:[]})) + dispatch(updateUserJobList({ loading: true, data: [] })); try { const res = await apiCall.getMyJobList(); // setMyJobList({loading: false, data:res.data}) // setMyJobList(res.data); - dispatch(updateUserJobList({loading: false, data:res.data})) + dispatch(updateUserJobList({ loading: false, data: res.data })); } catch (error) { - dispatch(updateUserJobList({loading: false, data:[]})) + dispatch(updateUserJobList({ loading: false, data: [] })); // setMyJobList({loading: false, data:[]}) console.log("Error getting mode"); } }; - getMyJobList() - },[jobListTable]) + getMyJobList(); + }, [jobListTable]); useEffect(() => { // Getting market data