Job list
This commit is contained in:
@@ -55,10 +55,15 @@ export default function MyJobTable({MyJobList, className }) {
|
||||
<h1 className="font-bold text-xl text-dark-gray dark:text-white whitespace-nowrap">
|
||||
{value.title}
|
||||
</h1>
|
||||
<div>
|
||||
{value.description}
|
||||
</div>
|
||||
<span className="text-sm text-thin-light-gray">
|
||||
Price: <span className="text-purple">{value.price*0.01}</span>
|
||||
</span>
|
||||
<span className="text-sm text-thin-light-gray">
|
||||
Price <span className="text-purple">{value.price*0.01}</span>
|
||||
{value.timeline_days} day(s)
|
||||
</span>
|
||||
Duration: <span className="text-purple"> {value.timeline_days} day(s)</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -200,7 +200,7 @@ export default function RightSideBar() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="chart-one bg-white dark:bg-dark-white rounded-2xl p-8 2xl:w-[268px] w-full 2xl:mb-10 2xl:border-none border flex flex-col sm:flex-row 2xl:flex-col 2xl:block lg:justify-between sm:items-center space-x-5 2xl:space-x-0 ">
|
||||
<div>
|
||||
<div className="chart-heading mb-4 xl:flex justify-between items-center">
|
||||
|
||||
@@ -90,6 +90,9 @@ class usersService {
|
||||
return this.postAuxEnd("/pendingjob", postData);
|
||||
}
|
||||
|
||||
/*
|
||||
getActiveJobList - All available Jobs
|
||||
*/
|
||||
getActiveJobList(){
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
@@ -98,9 +101,23 @@ class usersService {
|
||||
page:0,
|
||||
limit :100
|
||||
};
|
||||
return this.postAuxEnd("/activejoblist", postData);
|
||||
return this.postAuxEnd("/getjobsdata", postData);
|
||||
}
|
||||
|
||||
/*
|
||||
getMyActiveJobList - List of jobs active under this user
|
||||
*/
|
||||
getMyActiveJobList(){
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
page:0,
|
||||
offset:0,
|
||||
limit :100
|
||||
};
|
||||
return this.postAuxEnd("/getjobsdata", postData);
|
||||
}
|
||||
getHeroJBanners(){
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
@@ -112,18 +129,6 @@ class usersService {
|
||||
return this.postAuxEnd("/homebanners", postData);
|
||||
}
|
||||
|
||||
getMyJobList(){
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
page:0,
|
||||
offset:0,
|
||||
limit :100
|
||||
};
|
||||
return this.postAuxEnd("/jobmanagerlist", postData);
|
||||
}
|
||||
|
||||
getGetPendingJobs(){
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
|
||||
@@ -5,27 +5,25 @@ import usersService from "../services/UsersService";
|
||||
|
||||
export default function MyTaskPage() {
|
||||
|
||||
// const userApi = new usersService();
|
||||
// const activeJobList = userApi.getMyJobList();
|
||||
const [ActiveJobList, setActiveJobList] = useState([]);
|
||||
const [MyActiveJobList, setMyActiveJobList] = useState([]);
|
||||
const api = new usersService();
|
||||
|
||||
const getActiveJobList = async () => {
|
||||
const getMyActiveJobList = async () => {
|
||||
try {
|
||||
const res = await api.getActiveJobList();
|
||||
setActiveJobList(res.data);
|
||||
const res = await api.getMyActiveJobList();
|
||||
setMyActiveJobList(res.data);
|
||||
} catch (error) {
|
||||
console.log("Error getting mode");
|
||||
}
|
||||
};
|
||||
useEffect(() => {
|
||||
getActiveJobList();
|
||||
getMyActiveJobList();
|
||||
}, []);
|
||||
|
||||
//debugger;
|
||||
return (
|
||||
<>
|
||||
<MyTasks ActiveJobList={ActiveJobList}/>
|
||||
<MyTasks ActiveJobList={MyActiveJobList}/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user