home recent

This commit is contained in:
CHIEFSOFT\ameye
2023-07-20 06:18:56 -04:00
parent 5257f89acb
commit 232211a297
2 changed files with 25 additions and 0 deletions
+15
View File
@@ -7,6 +7,7 @@ import { updateUserDetails } from "../store/UserDetails";
import { updateJobs } from "../store/jobLists";
import { updateUserJobList } from "../store/userJobList";
import { commonHeadBanner } from "../store/CommonHeadBanner";
import { recentActivitiesData } from "../store/RecentActivitiesData";
const AuthRoute = ({ redirectPath = "/login", children }) => {
const apiCall = useMemo(() => new usersService(), []);
@@ -137,6 +138,20 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
console.log('ERROR ', error)
});
},[])
//
//FUNCTION TO GET COMMON HEAD DATA
useEffect(()=>{
apiCall.getRecentActivitiedData().then((res) => {
// debugger;
if (res.data?.internal_return < 0) {
return;
}
dispatch(recentActivitiesData(res.data));
})
.catch((error) => {
console.log('ERROR ', error)
});
},[])
return isLogin.loading && !loggedIn ? (
<LoadingSpinner size="32" color="sky-blue" height="h-screen" />
+10
View File
@@ -147,6 +147,16 @@ class usersService {
return this.postAuxEnd("/homebanners", postData);
}
getRecentActivitiedData() {
var postData = {
uuid: localStorage.getItem("uid"),
member_id: localStorage.getItem("member_id"),
sessionid: localStorage.getItem("session_token"),
page: 0,
limit: 100,
};
return this.postAuxEnd("/dashrecent", postData);
}
getGetPendingJobs() {
var postData = {
uuid: localStorage.getItem("uid"),