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_phone": '404 855-7966',
"support_us_address": 'Atlanta,GA 30339', "support_us_address": 'Atlanta,GA 30339',
"dummy": "2018-06-25T18:54:22.000Z", "dummy": "2018-06-25T18:54:22.000Z",
"user_service_endpoint": "https://dashboard.wrenchboard.com/svs/user",
} }
]; ];
+7 -129
View File
@@ -1,145 +1,23 @@
// http://172.31.4.19:8000/wordpress-data
//import React from 'react';
import Axios from 'axios'; import Axios from 'axios';
import getConfig from './../Config/config'
function JobsData() { async function JobsData() {
var site = getConfig()[0];
var callData = [{ var callData = [{
"limit": 10, "limit": 10,
"page": 1 "page": 1
}]; }];
/*
console.log("~~~~~~~~ ameye jobData ~~~~~~~~~");
var res = null; var res = null;
const getWrenchBoardJobs = () => { const getWrenchBoardJobs = () => {
Axios.post("https://www.wrenchboard.com/svs/user/startjoblist",callData).then((response) => { Axios.post("https://dashboard.wrenchboard.com/svs/user/startjoblist", callData).then((response) => {
console.log(response);
res = response; res = response;
console.log("~~~~~~~~ jobData ~~~~~~~~~");
return response; return response;
// console.log(blogResultData);
}); });
} }
/* return (
<>
Ameye
</>
);
*/ */
getWrenchBoardJobs(); let response = await Axios.post(site.user_service_endpoint + "/startjoblist", callData);
return response.data.result_list;
//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;
} }
export default JobsData; export default JobsData;
+3
View File
@@ -4,6 +4,9 @@ a {
text-decoration: none; text-decoration: none;
background-color: transparent; background-color: transparent;
} }
.expire{
color:red;
}
.mt-5 { .mt-5 {
margin-top: 5px; margin-top: 5px;
} }
+29 -6
View File
@@ -1,11 +1,31 @@
import React from 'react'; import React, { Component } from 'react';
import blogOne from '../../assets/images/blog-1.jpg'; import blogOne from '../../assets/images/blog-1.jpg';
import blogTwo from '../../assets/images/blog-2.jpg'; import blogTwo from '../../assets/images/blog-2.jpg';
import blogThree from '../../assets/images/blog-3.jpg'; import blogThree from '../../assets/images/blog-3.jpg';
import JobsData from '../../Services/JobsData'; import JobsData from '../../Services/JobsData';
function RecentJobsOne() { class RecentJobsOne extends Component {
const jobsDataResults = JobsData();
constructor() {
// debugger;
super();
this.state = { jobsDataResults: [] };
}
async componentDidMount(){
debugger;
const response = await JobsData();
this.setState({jobsDataResults:response});
}
// if (jobsDataResults ()== null){
// return null;
// }
render() {
if ( this.state.jobsDataResults== undefined ){
return null;
}
var dashUrl = "https://dashboard.wrenchboard.com/"; var dashUrl = "https://dashboard.wrenchboard.com/";
return ( return (
@@ -22,7 +42,9 @@ var dashUrl = "https://dashboard.wrenchboard.com/";
<div className="row"> <div className="row">
{ {
jobsDataResults.map(i=>{ 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"> return (<div className="col-lg-3 col-md-6">
<div <div
@@ -40,8 +62,8 @@ var dashUrl = "https://dashboard.wrenchboard.com/";
</h3> </h3>
<div className="blog-meta"> <div className="blog-meta">
<ul> <ul>
<li> <li className="expire">
<a href={dashUrl}>Expires : {i.expire}</a> <a href={dashUrl}>Expires : {postDt}</a>
</li> </li>
</ul> </ul>
</div> </div>
@@ -84,5 +106,6 @@ var dashUrl = "https://dashboard.wrenchboard.com/";
</> </>
); );
} }
}
export default RecentJobsOne; export default RecentJobsOne;