recent job fix

This commit is contained in:
dev-chiefworks
2022-03-09 20:28:02 -05:00
parent 3f323ee8c9
commit 71b460e75c
4 changed files with 112 additions and 207 deletions
+1
View File
@@ -16,6 +16,7 @@ function getConfig() {
"support_phone": '404 855-7966',
"support_us_address": 'Atlanta,GA 30339',
"dummy": "2018-06-25T18:54:22.000Z",
"user_service_endpoint": "https://dashboard.wrenchboard.com/svs/user",
}
];
+15 -137
View File
@@ -1,146 +1,24 @@
// http://172.31.4.19:8000/wordpress-data
//import React from 'react';
import Axios from 'axios';
import getConfig from './../Config/config'
function JobsData() {
var callData =[ {
async function JobsData() {
var site = getConfig()[0];
var callData = [{
"limit": 10,
"page":1
} ];
console.log("~~~~~~~~ ameye jobData ~~~~~~~~~");
var res = null;
const getWrenchBoardJobs = () => {
Axios.post("https://www.wrenchboard.com/svs/user/startjoblist",callData).then((response) => {
console.log(response);
res = response;
console.log("~~~~~~~~ jobData ~~~~~~~~~");
return response;
// console.log(blogResultData);
"page": 1
}];
/*
var res = null;
const getWrenchBoardJobs = () => {
Axios.post("https://dashboard.wrenchboard.com/svs/user/startjoblist", callData).then((response) => {
res = response;
return response;
});
}
/* return (
<>
Ameye
</>
);
*/
getWrenchBoardJobs();
//console.log(getWrenchBoardBlog());
//console.log("Ameye got here");
// return blogResultData; // getWrenchBoardBlog();
var res1 =[
{
"title": "Post 5 articles to social ",
"description": "This task is about posting 5 articles like from www.dorcastore.com to you Facebook page",
"id": "109",
"job_description": null,
"price": null,
"timeline_days": null,
"expire": "5th Jan 2022",
"sent": null
},
{
"title": "Article",
"description": "Opinion (Nigeria economy/politics) for Publication",
"id": "108",
"job_description": null,
"price": null,
"timeline_days": null,
"expire": "5th Dec 2019",
"sent": null
},
{
"title": "Create a family related article for my blog",
"description": "Propose a title and write about 500-word article for my blog",
"id": "23",
"job_description": null,
"price": null,
"timeline_days": null,
"expire": "14th Nov 2018",
"sent": null
},
{
"title": "Promote my blog with your Facebook page",
"description": "You will need to have a Facebook page with at least 400 friends to for this task",
"id": "73",
"job_description": null,
"price": null,
"timeline_days": null,
"expire": "14th Nov 2018",
"sent": null
},
{
"title": "Promote health care based articles",
"description": "Promote by placing my articles on your blog with good Alexa ranking ",
"id": "92",
"job_description": null,
"price": null,
"timeline_days": null,
"expire": "14th Nov 2018",
"sent": null
},
{
"title": "Pictures of Product Display In Supermarket",
"description": "We are conducting a product research and I want to know the most common products in my line of business. Go to ten supermarkets around and take pictures of the wine sections clearly showing the wines",
"id": "103",
"job_description": null,
"price": null,
"timeline_days": null,
"expire": "9th Nov 2018",
"sent": null
},
{
"title": "Write a Health Article for a blog",
"description": "Write a 1-page article on “The need for healthy eating in Nigeria”. The article is for publication on a health and wellness blog.",
"id": "101",
"job_description": null,
"price": null,
"timeline_days": null,
"expire": "9th Nov 2018",
"sent": null
},
{
"title": "Who are Niger Delta's Warlords?",
"description": "Describe the situation that led to Niger Delta Amnesty Programme?",
"id": "105",
"job_description": null,
"price": null,
"timeline_days": null,
"expire": "31st Oct 2018",
"sent": null
},
{
"title": "What is Niger Delta Ecology?",
"description": "Write article on Niger Delta Ecology",
"id": "104",
"job_description": null,
"price": null,
"timeline_days": null,
"expire": "28th Oct 2018",
"sent": null
},
{
"title": "Promote health care based articles",
"description": "Promote by placing my articles on your blog with good Alexa ranking ",
"id": "92",
"job_description": null,
"price": null,
"timeline_days": null,
"expire": "25th Jul 2018",
"sent": null
}
];
return res1;
}
let response = await Axios.post(site.user_service_endpoint + "/startjoblist", callData);
return response.data.result_list;
}
export default JobsData;
+3
View File
@@ -4,6 +4,9 @@ a {
text-decoration: none;
background-color: transparent;
}
.expire{
color:red;
}
.mt-5 {
margin-top: 5px;
}
+93 -70
View File
@@ -1,88 +1,111 @@
import React from 'react';
import React, { Component } from 'react';
import blogOne from '../../assets/images/blog-1.jpg';
import blogTwo from '../../assets/images/blog-2.jpg';
import blogThree from '../../assets/images/blog-3.jpg';
import JobsData from '../../Services/JobsData';
function RecentJobsOne() {
const jobsDataResults = JobsData();
var dashUrl = "https://dashboard.wrenchboard.com/";
class RecentJobsOne extends Component {
return (
<>
<section className="appie-blog-area pt-90 pb-95">
<div className="container">
<div className="row">
<div className="col-lg-12">
<div className="appie-section-title text-center">
<h3 className="appie-title">WrenchBoard Market</h3>
</div>
</div>
</div>
<div className="row">
constructor() {
// debugger;
super();
this.state = { jobsDataResults: [] };
}
{
jobsDataResults.map(i=>{
async componentDidMount(){
debugger;
const response = await JobsData();
this.setState({jobsDataResults:response});
}
return ( <div className="col-lg-3 col-md-6">
<div
className="appie-blog-item mt-30 wow animated fadeInUp"
data-wow-duration="3000ms"
data-wow-delay="200ms"
>
<div className="content">
// if (jobsDataResults ()== null){
// return null;
// }
render() {
<h3 className="title">
<a href={dashUrl}>
{i.title}
</a>
</h3>
<div className="blog-meta">
<ul>
<li>
<a href={dashUrl}>Expires : {i.expire}</a>
</li>
</ul>
</div>
<a href={dashUrl}>
Learn More <i className="fal fa-arrow-right" />
</a>
</div>
</div>
</div>)
if ( this.state.jobsDataResults== undefined ){
return null;
}
var dashUrl = "https://dashboard.wrenchboard.com/";
})
}
<div className="col-lg-3 col-md-6">
<div
className="appie-blog-item mt-30 wow animated fadeInUp"
data-wow-duration="3000ms"
data-wow-delay="600ms"
>
<div className="content">
<h3 className="title">
<a href={dashUrl}>
Find more oprotunities at our marketplace.
</a>
</h3>
<a href="https://www.wrenchboard.com/login">
Login now <i className="fal fa-arrow-right" />
</a>
return (
<>
<section className="appie-blog-area pt-90 pb-95">
<div className="container">
<div className="row">
<div className="col-lg-12">
<div className="appie-section-title text-center">
<h3 className="appie-title">WrenchBoard Market</h3>
</div>
</div>
</div>
<div className="row">
{
this.state.jobsDataResults.map(i => {
var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
var postDt = new Date(i.expire).toLocaleDateString("en-US", options);
return (<div className="col-lg-3 col-md-6">
<div
className="appie-blog-item mt-30 wow animated fadeInUp"
data-wow-duration="3000ms"
data-wow-delay="200ms"
>
<div className="content">
<h3 className="title">
<a href={dashUrl}>
{i.title}
</a>
</h3>
<div className="blog-meta">
<ul>
<li className="expire">
<a href={dashUrl}>Expires : {postDt}</a>
</li>
</ul>
</div>
<a href={dashUrl}>
Learn More <i className="fal fa-arrow-right" />
</a>
</div>
</div>
</div>)
})
}
<div className="col-lg-3 col-md-6">
<div
className="appie-blog-item mt-30 wow animated fadeInUp"
data-wow-duration="3000ms"
data-wow-delay="600ms"
>
<div className="content">
<h3 className="title">
<a href={dashUrl}>
Find more oprotunities at our marketplace.
</a>
</h3>
<a href="https://www.wrenchboard.com/login">
Login now <i className="fal fa-arrow-right" />
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</>
);
</section>
</>
);
}
}
export default RecentJobsOne;