Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1f76dd0db8 | |||
| f772cf0a68 | |||
| c4c5c7967e | |||
| 45ecec24ac | |||
| 16fd35df83 | |||
| 3f6a391d30 | |||
| 5eb64f49c0 | |||
| 1761150bd3 | |||
| a4b15dd06e | |||
| 1a15410e4c | |||
| da1133ed43 | |||
| 23605bc358 | |||
| 2092682be6 | |||
| 0e270d8efa | |||
| 3bb4fe6a02 | |||
| fa728d3879 | |||
| a9ce76123b | |||
| 3ac1be9b89 | |||
| e4be117c90 | |||
| 59945c28e4 | |||
| 0feaf42f49 |
@@ -17,7 +17,7 @@ REACT_APP_USERS_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/en/wrench/api
|
|||||||
|
|
||||||
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
||||||
|
|
||||||
REACT_APP_SESSION_EXPIRE_MINUTES=300000
|
REACT_APP_SESSION_EXPIRE_MINUTES=600000
|
||||||
REACT_APP_SESSION_EXPIRE_MINUTES_FAMILY=600000
|
REACT_APP_SESSION_EXPIRE_MINUTES_FAMILY=600000
|
||||||
REACT_APP_SESSION_EXPIRE_CHECKER=60000
|
REACT_APP_SESSION_EXPIRE_CHECKER=60000
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ REACT_APP_USERS_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/en/wrench/api
|
|||||||
|
|
||||||
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
||||||
|
|
||||||
REACT_APP_SESSION_EXPIRE_MINUTES=300000
|
REACT_APP_SESSION_EXPIRE_MINUTES=600000
|
||||||
REACT_APP_SESSION_EXPIRE_MINUTES_FAMILY=600000
|
REACT_APP_SESSION_EXPIRE_MINUTES_FAMILY=600000
|
||||||
REACT_APP_SESSION_EXPIRE_CHECKER=60000
|
REACT_APP_SESSION_EXPIRE_CHECKER=60000
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ REACT_APP_USERS_ENDPOINT="https://apigate.orion.g1.wrenchboard.com/en/wrench/api
|
|||||||
|
|
||||||
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
||||||
|
|
||||||
REACT_APP_SESSION_EXPIRE_MINUTES=300000
|
REACT_APP_SESSION_EXPIRE_MINUTES=600000
|
||||||
REACT_APP_SESSION_EXPIRE_MINUTES_FAMILY=600000
|
REACT_APP_SESSION_EXPIRE_MINUTES_FAMILY=600000
|
||||||
REACT_APP_SESSION_EXPIRE_CHECKER=60000
|
REACT_APP_SESSION_EXPIRE_CHECKER=60000
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -45,6 +45,7 @@ import BlogPage from "./views/BlogPage";
|
|||||||
import MyReviewDueJobsPage from "./views/MyReviewDueJobsPage";
|
import MyReviewDueJobsPage from "./views/MyReviewDueJobsPage";
|
||||||
import OffersInterestPage from "./views/OffersInterestPage";
|
import OffersInterestPage from "./views/OffersInterestPage";
|
||||||
import ManageInterestOfferPage from './views/ManageInterestOfferPage'
|
import ManageInterestOfferPage from './views/ManageInterestOfferPage'
|
||||||
|
import MyWaitingJobsPage from "./views/MyWaitingJobsPage";
|
||||||
|
|
||||||
export default function Routers() {
|
export default function Routers() {
|
||||||
return (
|
return (
|
||||||
@@ -89,10 +90,11 @@ export default function Routers() {
|
|||||||
<Route exact path="/notification" element={<Notification />} />
|
<Route exact path="/notification" element={<Notification />} />
|
||||||
<Route exact path="/mytask" element={<MyTaskPage />} />
|
<Route exact path="/mytask" element={<MyTaskPage />} />
|
||||||
<Route exact path="/myjobs" element={<MyJobsPage />} />
|
<Route exact path="/myjobs" element={<MyJobsPage />} />
|
||||||
<Route exact path="/add-job" element={<AddJobPage />} />
|
{/* <Route exact path="/add-job" element={<AddJobPage />} /> */}
|
||||||
<Route exact path="/my-active-jobs" element={<MyActiveJobsPage />} />
|
<Route exact path="/my-active-jobs" element={<MyActiveJobsPage />} />
|
||||||
<Route exact path="/my-pastdue-jobs" element={<MyPastDueJobsPage />} />
|
<Route exact path="/my-pastdue-jobs" element={<MyPastDueJobsPage />} />
|
||||||
<Route exact path="/my-pending-jobs" element={<MyPendingJobsPage />} />
|
<Route exact path="/my-pending-jobs" element={<MyPendingJobsPage />} />
|
||||||
|
<Route exact path="/pend-interest" element={<MyWaitingJobsPage />} />
|
||||||
<Route exact path="/my-review-jobs" element={<MyReviewDueJobsPage />} />
|
<Route exact path="/my-review-jobs" element={<MyReviewDueJobsPage />} />
|
||||||
<Route exact path="/acc-family" element={<FamilyAccPage />} />
|
<Route exact path="/acc-family" element={<FamilyAccPage />} />
|
||||||
<Route exact path="/manage-family" element={<FamilyManagePage />} />
|
<Route exact path="/manage-family" element={<FamilyManagePage />} />
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 69 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 82 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 68 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 159 KiB |
@@ -14,8 +14,14 @@ const validationSchema = Yup.object().shape({
|
|||||||
.max(25, "Maximum 25 characters")
|
.max(25, "Maximum 25 characters")
|
||||||
.required("Country is required"),
|
.required("Country is required"),
|
||||||
price: Yup.number()
|
price: Yup.number()
|
||||||
.typeError("you must specify a number")
|
.typeError("Invalid number")
|
||||||
.min(1, "Price must be greater than 0")
|
.min(1, "Price must be greater than 0")
|
||||||
|
.test("no-e", "Invalid number", (value) => {
|
||||||
|
if (value && /\d+e/.test(value)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
})
|
||||||
.required("Price is required"),
|
.required("Price is required"),
|
||||||
title: Yup.string()
|
title: Yup.string()
|
||||||
.min(3, "Minimum 3 characters")
|
.min(3, "Minimum 3 characters")
|
||||||
@@ -42,15 +48,16 @@ function AddJob({ popUpHandler, categories }) {
|
|||||||
|
|
||||||
let { userDetails } = useSelector((state) => state.userDetails);
|
let { userDetails } = useSelector((state) => state.userDetails);
|
||||||
|
|
||||||
let [country, setCountry] = useState({
|
const [numberValue, setNumberValue] = useState("");
|
||||||
|
let [currency, setCurrency] = useState({
|
||||||
loading: true,
|
loading: true,
|
||||||
status: false,
|
status: false,
|
||||||
data: [],
|
data: null,
|
||||||
}); // To Hold the array of country getUserCountry returns
|
}); // To Hold the array of currency getUserCurrency returns
|
||||||
|
|
||||||
let initialValues = {
|
let initialValues = {
|
||||||
// initial values for formik
|
// initial values for formik
|
||||||
country: userDetails.country,
|
currency: "",
|
||||||
price: "",
|
price: "",
|
||||||
title: "",
|
title: "",
|
||||||
description: "",
|
description: "",
|
||||||
@@ -65,23 +72,25 @@ function AddJob({ popUpHandler, categories }) {
|
|||||||
message: "",
|
message: "",
|
||||||
}); // Holds state when submit button is pressed
|
}); // Holds state when submit button is pressed
|
||||||
|
|
||||||
// FUNCTION TO GET COUNTRY
|
// FUNCTION TO GET Currency
|
||||||
const getUserCountry = () => {
|
const getUserCurrency = () => {
|
||||||
setCountry((prev) => ({ ...prev, loading: true }));
|
setCurrency((prev) => ({ ...prev, loading: true }));
|
||||||
ApiCall.getSignupCountryData()
|
ApiCall.getUserWallets()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.data.internal_return < 1) {
|
if (res.data.internal_return < 0) {
|
||||||
setCountry({ loading: false, status: true, data: [] });
|
setCurrency({ loading: false, status: true, data: [] });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setCountry({
|
console.log("Res for currency >> ", res);
|
||||||
|
|
||||||
|
setCurrency({
|
||||||
loading: false,
|
loading: false,
|
||||||
status: true,
|
status: true,
|
||||||
data: res.data.signup_country,
|
data: res.data.result_list,
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
setCountry({ loading: false, status: false, data: [] });
|
setCurrency({ loading: false, status: false, data: [] });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -113,7 +122,7 @@ function AddJob({ popUpHandler, categories }) {
|
|||||||
setRequestStatus({
|
setRequestStatus({
|
||||||
loading: false,
|
loading: false,
|
||||||
status: false,
|
status: false,
|
||||||
message: "Opps! soemthing went wrong. Try Again",
|
message: "Opps! something went wrong. Try Again",
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
@@ -124,9 +133,10 @@ function AddJob({ popUpHandler, categories }) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getUserCountry();
|
getUserCurrency();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
console.log("Currency >> ", currency.data);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="add-job p-5 w-full bg-white rounded-md flex flex-col justify-between">
|
<div className="add-job p-5 w-full bg-white rounded-md flex flex-col justify-between">
|
||||||
@@ -141,46 +151,40 @@ function AddJob({ popUpHandler, categories }) {
|
|||||||
<div className="flex flex-col-reverse sm:flex-row">
|
<div className="flex flex-col-reverse sm:flex-row">
|
||||||
<div className="fields w-full">
|
<div className="fields w-full">
|
||||||
{/* inputs starts here */}
|
{/* inputs starts here */}
|
||||||
{/* country */}
|
|
||||||
<div className="xl:flex xl:space-x-7 mb-[5px]">
|
<div className="xl:flex xl:space-x-7 mb-[5px]">
|
||||||
<div className="field w-full mb-6 xl:mb-0">
|
<div className="field w-full mb-6 xl:mb-0">
|
||||||
<label
|
<label
|
||||||
htmlFor="country"
|
htmlFor="currency"
|
||||||
className="input-label text-[#181c32] dark:text-white text-[13.975px] leading-[20.9625px] font-semibold block"
|
className="input-label text-[#181c32] dark:text-white text-[13.975px] leading-[20.9625px] font-semibold block"
|
||||||
>
|
>
|
||||||
Country
|
Currency
|
||||||
</label>
|
</label>
|
||||||
<select
|
<select
|
||||||
id="country"
|
id="currency"
|
||||||
name="country"
|
name="currency"
|
||||||
disabled
|
value={props.values.currency}
|
||||||
value={props.values.country}
|
|
||||||
className={`input-field p-2 mt-3 rounded-md placeholder:text-base text-dark-gray dark:text-white w-full h-10 bg-slate-100 dark:bg-[#11131F] focus:ring-0 focus:outline-none`}
|
className={`input-field p-2 mt-3 rounded-md placeholder:text-base text-dark-gray dark:text-white w-full h-10 bg-slate-100 dark:bg-[#11131F] focus:ring-0 focus:outline-none`}
|
||||||
onChange={props.handleChange}
|
onChange={props.handleChange}
|
||||||
onBlur={props.handleBlur}
|
onBlur={props.handleBlur}
|
||||||
>
|
>
|
||||||
{country.loading ? (
|
{currency.loading ? (
|
||||||
<option className="text-slate-500 text-lg" value="">
|
<option className="text-slate-500 text-lg" value="">
|
||||||
Loading...
|
Loading...
|
||||||
</option>
|
</option>
|
||||||
) : country.data.length ? (
|
) : currency.data.length ? (
|
||||||
<>
|
<>
|
||||||
<option className="text-slate-500 text-lg" value="">
|
<option className="text-slate-500 text-lg" value="">
|
||||||
Select...
|
Select a currency
|
||||||
</option>
|
</option>
|
||||||
{country.data.map((item, index) => {
|
{currency.data?.map((item, index) => (
|
||||||
if (item[0] == userDetails.country) {
|
<option
|
||||||
return (
|
key={index}
|
||||||
<option
|
className="text-slate-500 text-lg"
|
||||||
key={index}
|
value={item?.country}
|
||||||
className="text-slate-500 text-lg"
|
>
|
||||||
value={item[0]}
|
{item?.description}
|
||||||
>
|
</option>
|
||||||
{item[1]}
|
))}
|
||||||
</option>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
})}
|
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<option className="text-slate-500 text-lg" value="">
|
<option className="text-slate-500 text-lg" value="">
|
||||||
@@ -237,7 +241,9 @@ function AddJob({ popUpHandler, categories }) {
|
|||||||
value={props.values.description}
|
value={props.values.description}
|
||||||
inputHandler={props.handleChange}
|
inputHandler={props.handleChange}
|
||||||
blurHandler={props.handleBlur}
|
blurHandler={props.handleBlur}
|
||||||
errorBorder={props.errors.description && props.touched.description}
|
errorBorder={
|
||||||
|
props.errors.description && props.touched.description
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -276,7 +282,10 @@ function AddJob({ popUpHandler, categories }) {
|
|||||||
aria-labelledby="checked-group"
|
aria-labelledby="checked-group"
|
||||||
>
|
>
|
||||||
{Object.entries(categories).map(([key, value]) => (
|
{Object.entries(categories).map(([key, value]) => (
|
||||||
<label key={key} className="flex gap-1 w-full items-center">
|
<label
|
||||||
|
key={key}
|
||||||
|
className="flex gap-1 w-full items-center"
|
||||||
|
>
|
||||||
<Field
|
<Field
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
name="category"
|
name="category"
|
||||||
@@ -354,8 +363,8 @@ function AddJob({ popUpHandler, categories }) {
|
|||||||
|
|
||||||
<div className="w-full h-[70px] border-t border-light-purple dark:border-[#5356fb29] flex justify-end items-center">
|
<div className="w-full h-[70px] border-t border-light-purple dark:border-[#5356fb29] flex justify-end items-center">
|
||||||
<div className="flex items-center space-x-4 mr-9">
|
<div className="flex items-center space-x-4 mr-9">
|
||||||
<Link
|
<button
|
||||||
to="/myjobs"
|
type="button"
|
||||||
className="text-18 text-light-red tracking-wide "
|
className="text-18 text-light-red tracking-wide "
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
@@ -365,7 +374,7 @@ function AddJob({ popUpHandler, categories }) {
|
|||||||
{" "}
|
{" "}
|
||||||
Cancel
|
Cancel
|
||||||
</span>
|
</span>
|
||||||
</Link>
|
</button>
|
||||||
|
|
||||||
{requestStatus.loading ? (
|
{requestStatus.loading ? (
|
||||||
<LoadingSpinner size="8" color="sky-blue" />
|
<LoadingSpinner size="8" color="sky-blue" />
|
||||||
|
|||||||
@@ -152,8 +152,6 @@ export default function Login() {
|
|||||||
);
|
);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
console.log("Looking for the cookies >>", selectedLoginType)
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setMail("");
|
setMail("");
|
||||||
setPassword("");
|
setPassword("");
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ export default function SignUp() {
|
|||||||
|
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
const { data } = res;
|
const { data } = res;
|
||||||
if (data.status === -1 && data.acc === "DULPICATE") {
|
if (data && data.acc === "DULPICATE") {
|
||||||
setMsgError("This account has been already created");
|
setMsgError("This account has been already created");
|
||||||
setSignUpLoading(false);
|
setSignUpLoading(false);
|
||||||
}
|
}
|
||||||
@@ -108,7 +108,7 @@ export default function SignUp() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getCountryList();
|
getCountryList();
|
||||||
});
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ export default function MyJobTable({ MyJobList, reloadJobList, className }) {
|
|||||||
<div className="header w-full flex justify-between items-center mb-5">
|
<div className="header w-full flex justify-between items-center mb-5">
|
||||||
<div className="flex space-x-2 items-center">
|
<div className="flex space-x-2 items-center">
|
||||||
<h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-wide">
|
<h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-wide">
|
||||||
All Jobs
|
{filterCategories[selectedCategory]} Jobs
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<SelectBox
|
<SelectBox
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useLocation } from "react-router-dom";
|
import { useLocation, useNavigate } from "react-router-dom";
|
||||||
import Layout from "../Partials/Layout";
|
import Layout from "../Partials/Layout";
|
||||||
import MyJobTable from "./MyJobTable";
|
import MyJobTable from "./MyJobTable";
|
||||||
import CommonHead from "../UserHeader/CommonHead";
|
import CommonHead from "../UserHeader/CommonHead";
|
||||||
@@ -7,13 +7,26 @@ import AddJobPage from "../../views/AddJobPage";
|
|||||||
|
|
||||||
export default function MyJobs(props) {
|
export default function MyJobs(props) {
|
||||||
let { state } = useLocation();
|
let { state } = useLocation();
|
||||||
const [popUp, setPopUp] = useState(state?.popup ? true : false);
|
const navigate = useNavigate();
|
||||||
|
const [popUp, setPopUp] = useState(false);
|
||||||
|
|
||||||
|
console.log(state)
|
||||||
const popUpHandler = () => {
|
const popUpHandler = () => {
|
||||||
setPopUp((prev) => !prev);
|
setPopUp((prev) => !prev);
|
||||||
|
|
||||||
|
if (state?.popup) navigate("/", { replace: true });
|
||||||
};
|
};
|
||||||
|
|
||||||
const categoryOptions = props.MyJobList?.data?.categories;
|
const categoryOptions = props.MyJobList?.data?.categories;
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!state?.popup) {
|
||||||
|
setPopUp(false);
|
||||||
|
} else {
|
||||||
|
setPopUp(true);
|
||||||
|
}
|
||||||
|
}, [state?.popup]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
<CommonHead commonHeadData={props.commonHeadData} />
|
<CommonHead commonHeadData={props.commonHeadData} />
|
||||||
|
|||||||
@@ -0,0 +1,157 @@
|
|||||||
|
import React, { useState } from "react";
|
||||||
|
import dataImage2 from "../../assets/images/data-table-user-2.png";
|
||||||
|
import { handlePagingFunc } from "../Pagination/HandlePagination";
|
||||||
|
import PaginatedList from "../Pagination/PaginatedList";
|
||||||
|
import PendingJobsPopout from "../jobPopout/PendingJobsPopout";
|
||||||
|
import { PriceFormatter } from "../Helpers/PriceFormatter";
|
||||||
|
|
||||||
|
export default function MyWaitingJobTable({ MyJobList, className }) {
|
||||||
|
let [jobPopout, setJobPopout] = useState({ show: false, data: {} }); // STATE TO HOLD THE VALUE OF THE ALERT DETAILS AND DETERMINE WHEN TO SHOW
|
||||||
|
|
||||||
|
const [currentPage, setCurrentPage] = useState(0);
|
||||||
|
const indexOfFirstItem = Number(currentPage);
|
||||||
|
const indexOfLastItem =
|
||||||
|
Number(indexOfFirstItem) + Number(process.env.REACT_APP_ITEM_PER_PAGE);
|
||||||
|
const currentActiveJobList = MyJobList?.result_list?.slice(
|
||||||
|
indexOfFirstItem,
|
||||||
|
indexOfLastItem
|
||||||
|
);
|
||||||
|
|
||||||
|
const handlePagination = (e) => {
|
||||||
|
handlePagingFunc(e, setCurrentPage);
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className={`update-table w-full p-8 bg-white dark:bg-dark-white overflow-hidden rounded-2xl section-shadow min-h-[520px] ${
|
||||||
|
className || ""
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
{MyJobList && MyJobList?.result_list && (
|
||||||
|
<div className="relative w-full overflow-x-auto sm:rounded-lg flex flex-col justify-between h-full">
|
||||||
|
<table className="w-full text-sm text-left text-gray-500 dark:text-gray-400">
|
||||||
|
<tbody>
|
||||||
|
{/*<tr className="text-base text-thin-light-gray border-b dark:border-[#5356fb29] default-border-b dark:border-[#5356fb29] ottom ">*/}
|
||||||
|
{/* <td className="py-4">All Product</td>*/}
|
||||||
|
{/* <td className="py-4 text-right">.</td>*/}
|
||||||
|
{/*</tr>*/}
|
||||||
|
|
||||||
|
{
|
||||||
|
<>
|
||||||
|
{MyJobList &&
|
||||||
|
MyJobList?.result_list &&
|
||||||
|
MyJobList.result_list.length > 0 ? (
|
||||||
|
currentActiveJobList.map((value, index) => {
|
||||||
|
let deliveryDate = value?.expire?.split(" ")[0];
|
||||||
|
let thePrice = PriceFormatter(
|
||||||
|
value?.price * 0.01,
|
||||||
|
value?.currency_code,
|
||||||
|
value?.currency
|
||||||
|
);
|
||||||
|
return (
|
||||||
|
<tr
|
||||||
|
key={index}
|
||||||
|
className="bg-white dark:bg-dark-white border-b dark:border-[#5356fb29] hover:bg-gray-50"
|
||||||
|
>
|
||||||
|
<td className=" py-4">
|
||||||
|
<div className="flex space-x-2 items-center w-full">
|
||||||
|
<div className="w-full h-[60px] rounded-full overflow-hidden flex justify-center items-center flex-[0.1] max-w-[60px]">
|
||||||
|
<img
|
||||||
|
src={dataImage2}
|
||||||
|
alt="data"
|
||||||
|
className="w-full h-full"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col flex-[0.9]">
|
||||||
|
<h1 className="font-bold text-xl text-dark-gray dark:text-white">
|
||||||
|
{value.title}
|
||||||
|
</h1>
|
||||||
|
<div>{value.description}</div>
|
||||||
|
<span className="text-sm text-thin-light-gray flex items-start gap-1">
|
||||||
|
Price:{" "}
|
||||||
|
<span className="text-purple">
|
||||||
|
{thePrice}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<div className="flex items-center gap-4">
|
||||||
|
<span className="text-sm text-thin-light-gray">
|
||||||
|
Duration:{" "}
|
||||||
|
<span className="text-purple">
|
||||||
|
{" "}
|
||||||
|
{value.timeline_days} day(s)
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<span className="text-sm text-thin-light-gray">
|
||||||
|
Expire:{" "}
|
||||||
|
<span className="text-purple">
|
||||||
|
{" "}
|
||||||
|
{deliveryDate}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<span className="text-sm text-thin-light-gray">
|
||||||
|
Sent :{" "}
|
||||||
|
<span className="text-purple">
|
||||||
|
{" "}
|
||||||
|
{value.sent}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td className="text-right py-4 px-2">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => {
|
||||||
|
setJobPopout({ show: true, data: value });
|
||||||
|
}}
|
||||||
|
className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
|
||||||
|
>
|
||||||
|
View
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
);
|
||||||
|
})
|
||||||
|
) : (
|
||||||
|
<tr className="font-bold text-xl text-dark-gray dark:text-white whitespace-nowrap">
|
||||||
|
<td className="p-2">No Pending Task!</td>
|
||||||
|
</tr>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{/* PAGINATION BUTTON */}
|
||||||
|
<PaginatedList
|
||||||
|
onClick={handlePagination}
|
||||||
|
prev={currentPage == 0 ? true : false}
|
||||||
|
next={
|
||||||
|
currentPage + Number(process.env.REACT_APP_ITEM_PER_PAGE) >=
|
||||||
|
MyJobList?.result_list.length
|
||||||
|
? true
|
||||||
|
: false
|
||||||
|
}
|
||||||
|
data={MyJobList?.result_list}
|
||||||
|
start={indexOfFirstItem}
|
||||||
|
stop={indexOfLastItem}
|
||||||
|
/>
|
||||||
|
{/* END OF PAGINATION BUTTON */}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* Active Job Popout */}
|
||||||
|
{jobPopout.show && (
|
||||||
|
<PendingJobsPopout
|
||||||
|
details={jobPopout.data}
|
||||||
|
onClose={() => {
|
||||||
|
setJobPopout({ show: false, data: {} });
|
||||||
|
}}
|
||||||
|
situation={jobPopout.show}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{/* End of Active Job Popout */}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
import React, { useState } from "react";
|
||||||
|
import { Link } from "react-router-dom";
|
||||||
|
import Layout from "../Partials/Layout";
|
||||||
|
import CommonHead from "../UserHeader/CommonHead";
|
||||||
|
import MyWaitingJobTable from "./MyWaitingJobTable";
|
||||||
|
|
||||||
|
export default function MyWaitingJobs(props) {
|
||||||
|
const [selectTab, setValue] = useState("today");
|
||||||
|
const filterHandler = (value) => {
|
||||||
|
setValue(value);
|
||||||
|
};
|
||||||
|
console.log("AMEYE LOC1", props.MyJobList);
|
||||||
|
return (
|
||||||
|
<Layout>
|
||||||
|
<CommonHead
|
||||||
|
commonHeadData={props.commonHeadData}
|
||||||
|
/>
|
||||||
|
<div className="notification-page w-full mb-10">
|
||||||
|
<div className="notification-wrapper w-full">
|
||||||
|
{/* heading */}
|
||||||
|
<div className="sm:flex justify-between items-center mb-6">
|
||||||
|
<div className="mb-5 sm:mb-0">
|
||||||
|
<h1 className="text-26 font-bold text-dark-gray dark:text-white">
|
||||||
|
<span
|
||||||
|
className={`${selectTab === "today" ? "block" : "hidden"}`}
|
||||||
|
>
|
||||||
|
Waiting Job(s)
|
||||||
|
</span>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<div className="slider-btns flex space-x-4">
|
||||||
|
<div
|
||||||
|
onClick={() => filterHandler("today")}
|
||||||
|
className="relative"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<MyWaitingJobTable MyJobList={props.MyJobList} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Layout>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -4,8 +4,6 @@ import Layout from "../Partials/Layout";
|
|||||||
import CommonHead from "../UserHeader/CommonHead";
|
import CommonHead from "../UserHeader/CommonHead";
|
||||||
|
|
||||||
import usersService from "../../services/UsersService";
|
import usersService from "../../services/UsersService";
|
||||||
// import { handlePagingFunc } from "../Pagination/HandlePagination";
|
|
||||||
// import PaginatedList from "../Pagination/PaginatedList";
|
|
||||||
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
||||||
import OthersInterestedTable from "./OthersInterestedTable";
|
import OthersInterestedTable from "./OthersInterestedTable";
|
||||||
|
|
||||||
@@ -23,15 +21,7 @@ export default function ManageInterestOffer(props) {
|
|||||||
|
|
||||||
let [messageListReload, setMessageListReload] = useState(false) // STATE TO DETERMINE WHEN MESSAGE LIST WILL RELOAD
|
let [messageListReload, setMessageListReload] = useState(false) // STATE TO DETERMINE WHEN MESSAGE LIST WILL RELOAD
|
||||||
|
|
||||||
const [messageList, setMessageList] = useState({loading: true, data: [1,2,3,4,5,6,7,8,95,6,7,8,9]}) // TO BE REMOVED AND REPLACE WITH REAL MESSAGE FROM API CALL
|
const [messageList, setMessageList] = useState({loading: true, data: []}) // TO BE REMOVED AND REPLACE WITH REAL MESSAGE FROM API CALL
|
||||||
// const [currentPage, setCurrentPage] = useState(0);
|
|
||||||
// const indexOfFirstItem = Number(currentPage);
|
|
||||||
// const indexOfLastItem = Number(indexOfFirstItem) + Number(process.env.REACT_APP_ITEM_PER_PAGE);
|
|
||||||
// const currentMessageList = messageList?.data?.slice(indexOfFirstItem, indexOfLastItem);
|
|
||||||
|
|
||||||
// const handlePagination = (e) => {
|
|
||||||
// handlePagingFunc(e, setCurrentPage);
|
|
||||||
// };
|
|
||||||
|
|
||||||
const [selectTab, setValue] = useState("today");
|
const [selectTab, setValue] = useState("today");
|
||||||
const filterHandler = (value) => {
|
const filterHandler = (value) => {
|
||||||
@@ -112,14 +102,17 @@ export default function ManageInterestOffer(props) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{ //API to get Offer Interest message list
|
||||||
// run API to get message to replace message array above, add reload variable as dependence array. CODE IS DUMMY FOR NOW
|
let reqData = { // API PAYLOADS
|
||||||
setMessageList({loading: true, data: []})
|
msg_type: 'MRKTINT',
|
||||||
apiCall.offerInterestMsg().then(res=>{
|
offer_uid: props.offerDetails.offer_uid,
|
||||||
console.log('Data', res.data)
|
interest_uid: props.offerDetails.interest_uid
|
||||||
setMessageList({loading: false, data:[1,2,3,6,7,8,9]})
|
}
|
||||||
|
setMessageList(prev => ({...prev, loading: true}))
|
||||||
|
apiCall.offerInterestListMsg(reqData).then(res=>{
|
||||||
|
setMessageList({loading: false, data:res?.data?.result_list})
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
setMessageList({loading: false, data:[1,2,3,6,7,8,9]})
|
setMessageList(prev => ({...prev, loading: false}))
|
||||||
console.log('Failed', err)
|
console.log('Failed', err)
|
||||||
})
|
})
|
||||||
},[messageListReload])
|
},[messageListReload])
|
||||||
@@ -288,36 +281,14 @@ export default function ManageInterestOffer(props) {
|
|||||||
<div className="my-1 min-h-[100px] max-h-[200px] border-t overflow-y-scroll">
|
<div className="my-1 min-h-[100px] max-h-[200px] border-t overflow-y-scroll">
|
||||||
{ messageList.loading ?
|
{ messageList.loading ?
|
||||||
<LoadingSpinner color='sky-blue' size='16' />
|
<LoadingSpinner color='sky-blue' size='16' />
|
||||||
: messageList.data.map((item, index)=>(
|
: messageList?.data?.map((item, index)=>(
|
||||||
<div key={index} className="my-2 w-full flex items-center gap-1">
|
<div key={index} className="my-2 w-full flex items-center gap-1">
|
||||||
<p className="text-base font-bold text-dark-gray dark:text-white tracking-wide">2023-04-06-from { }<span className="font-normal">Dummy name</span></p>
|
<p className="text-base font-bold text-dark-gray dark:text-white tracking-wide">{item.added.split(' ')[0]}-from { }<span className="font-normal">{item.sender || 'Dummy name'}</span></p>
|
||||||
<p className="text-base font-bold text-dark-gray dark:text-white tracking-wide">I am testing message</p>
|
<p className="text-base font-bold text-dark-gray dark:text-white tracking-wide">{item.msg}</p>
|
||||||
</div>
|
</div>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
{/* {messageList.data.map((item, index)=>(
|
|
||||||
<div key={index} className="my-2 w-full flex items-center gap-1">
|
|
||||||
<p className="text-base font-bold text-dark-gray dark:text-white tracking-wide">2023-04-06-from { }<span className="font-normal">Dummy name</span></p>
|
|
||||||
<p className="text-base font-bold text-dark-gray dark:text-white tracking-wide">I am testing message</p>
|
|
||||||
</div>
|
|
||||||
))} */}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* PAGINATION BUTTON */}
|
|
||||||
{/* <PaginatedList
|
|
||||||
onClick={handlePagination}
|
|
||||||
prev={currentPage == 0 ? true : false}
|
|
||||||
next={
|
|
||||||
currentPage + Number(process.env.REACT_APP_ITEM_PER_PAGE) >=
|
|
||||||
messageList?.data?.length
|
|
||||||
? true
|
|
||||||
: false
|
|
||||||
}
|
|
||||||
data={messageList?.data}
|
|
||||||
start={indexOfFirstItem}
|
|
||||||
stop={indexOfLastItem}
|
|
||||||
/> */}
|
|
||||||
{/* END OF PAGINATION BUTTON */}
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import React, {useEffect, useState} from "react";
|
import React, { useState} from "react";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { toast } from "react-toastify";
|
|
||||||
import useToggle from "../../hooks/useToggle";
|
import useToggle from "../../hooks/useToggle";
|
||||||
import { drawerToggle } from "../../store/drawer";
|
import { drawerToggle } from "../../store/drawer";
|
||||||
import ModalCom from "../Helpers/ModalCom";
|
import ModalCom from "../Helpers/ModalCom";
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler, myJ
|
|||||||
route="/myjobs"
|
route="/myjobs"
|
||||||
iconName="people-two"
|
iconName="people-two"
|
||||||
sidebar={sidebar}
|
sidebar={sidebar}
|
||||||
state={"Add Job"}
|
state={true}
|
||||||
/>
|
/>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -302,12 +302,12 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler, myJ
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ListItem = ({ sidebar, route, title, bubble, state }) => {
|
const ListItem = ({ sidebar, route, title, bubble, popup }) => {
|
||||||
return (
|
return (
|
||||||
<li className="item group">
|
<li className="item group">
|
||||||
<NavLink
|
<NavLink
|
||||||
to={route}
|
to={route}
|
||||||
state={state && {popup: true}}
|
state={popup ? { popup: true } : { popup: false }}
|
||||||
className={`nav-item flex items-center ${
|
className={`nav-item flex items-center ${
|
||||||
((navData) => (navData.isActive ? "active" : ""),
|
((navData) => (navData.isActive ? "active" : ""),
|
||||||
sidebar ? "justify-start space-x-3.5" : "justify-center")
|
sidebar ? "justify-start space-x-3.5" : "justify-center")
|
||||||
|
|||||||
@@ -8,7 +8,12 @@ import {
|
|||||||
import DarkModeContext from "../Contexts/DarkModeContext";
|
import DarkModeContext from "../Contexts/DarkModeContext";
|
||||||
import Icons from "../Helpers/Icons";
|
import Icons from "../Helpers/Icons";
|
||||||
|
|
||||||
export default function Sidebar({ sidebar, action, logoutModalHandler, myJobList }) {
|
export default function Sidebar({
|
||||||
|
sidebar,
|
||||||
|
action,
|
||||||
|
logoutModalHandler,
|
||||||
|
myJobList,
|
||||||
|
}) {
|
||||||
const darkMode = useContext(DarkModeContext);
|
const darkMode = useContext(DarkModeContext);
|
||||||
|
|
||||||
let { userDetails } = useSelector((state) => state.userDetails);
|
let { userDetails } = useSelector((state) => state.userDetails);
|
||||||
@@ -131,27 +136,25 @@ export default function Sidebar({ sidebar, action, logoutModalHandler, myJobList
|
|||||||
|
|
||||||
{/* menu and settings item */}
|
{/* menu and settings item */}
|
||||||
{userDetails?.account_type !== "FAMILY" && (
|
{userDetails?.account_type !== "FAMILY" && (
|
||||||
<div
|
<div
|
||||||
className={`menu-item transition-all duration-300 ease-in-out ${
|
className={`menu-item transition-all duration-300 ease-in-out ${
|
||||||
sidebar ? "my-5" : ""
|
sidebar ? "my-5" : ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<div className="heading mb-5">
|
<div className="heading mb-5">
|
||||||
<h1 className="title text-xl font-bold text-purple">
|
<h1 className="title text-xl font-bold text-purple">Family</h1>
|
||||||
Family
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
<div className="items">
|
|
||||||
<ul className="flex flex-col space-y-6">
|
|
||||||
<ListItem
|
|
||||||
title="Family Corner"
|
|
||||||
route="/acc-family"
|
|
||||||
iconName="people-two"
|
|
||||||
sidebar={sidebar}
|
|
||||||
/>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div className="items">
|
||||||
|
<ul className="flex flex-col space-y-6">
|
||||||
|
<ListItem
|
||||||
|
title="Family Corner"
|
||||||
|
route="/acc-family"
|
||||||
|
iconName="people-two"
|
||||||
|
sidebar={sidebar}
|
||||||
|
/>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
{userDetails?.account_type !== "FAMILY" && (
|
{userDetails?.account_type !== "FAMILY" && (
|
||||||
<>
|
<>
|
||||||
@@ -252,7 +255,7 @@ export default function Sidebar({ sidebar, action, logoutModalHandler, myJobList
|
|||||||
route="/myjobs"
|
route="/myjobs"
|
||||||
iconName="people-two"
|
iconName="people-two"
|
||||||
sidebar={sidebar}
|
sidebar={sidebar}
|
||||||
state={"Add Job"}
|
popup={true}
|
||||||
/>
|
/>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -326,12 +329,12 @@ export default function Sidebar({ sidebar, action, logoutModalHandler, myJobList
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ListItem = ({ sidebar, route, title, bubble, iconName, state }) => {
|
const ListItem = ({ sidebar, route, title, bubble, iconName, popup }) => {
|
||||||
return (
|
return (
|
||||||
<li className={`item group`}>
|
<li className={`item group`}>
|
||||||
<NavLink
|
<NavLink
|
||||||
to={route}
|
to={route}
|
||||||
state={state && {popup: true}}
|
state={popup ? { popup: true } : { popup: false }}
|
||||||
className={`nav-item flex items-center ${
|
className={`nav-item flex items-center ${
|
||||||
((navData) => (navData.isActive ? "active" : ""),
|
((navData) => (navData.isActive ? "active" : ""),
|
||||||
sidebar ? "justify-start space-x-3.5" : "justify-center")
|
sidebar ? "justify-start space-x-3.5" : "justify-center")
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ const EditJobPopOut = ({
|
|||||||
|
|
||||||
let initialValues = {
|
let initialValues = {
|
||||||
// initial values for formik
|
// initial values for formik
|
||||||
country: country,
|
currency: details.currency,
|
||||||
price: details?.price,
|
price: details?.price,
|
||||||
title: details?.title,
|
title: details?.title,
|
||||||
description: details?.description,
|
description: details?.description,
|
||||||
@@ -74,7 +74,7 @@ const EditJobPopOut = ({
|
|||||||
job_uid: details.job_uid,
|
job_uid: details.job_uid,
|
||||||
...values,
|
...values,
|
||||||
};
|
};
|
||||||
delete reqData?.country;
|
delete reqData?.currency;
|
||||||
try {
|
try {
|
||||||
let res = await jobApi.jobManagerUpdateJob(reqData);
|
let res = await jobApi.jobManagerUpdateJob(reqData);
|
||||||
let { data } = await res;
|
let { data } = await res;
|
||||||
@@ -93,6 +93,7 @@ const EditJobPopOut = ({
|
|||||||
[jobApi, navigate, onClose, details]
|
[jobApi, navigate, onClose, details]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
console.log(details)
|
||||||
return (
|
return (
|
||||||
<ModalCom action={onClose} situation={situation} className="edit-popup">
|
<ModalCom action={onClose} situation={situation} className="edit-popup">
|
||||||
<div className="logout-modal-wrapper lg:w-[600px] h-full lg:h-auto bg-white dark:bg-dark-white lg:rounded-2xl">
|
<div className="logout-modal-wrapper lg:w-[600px] h-full lg:h-auto bg-white dark:bg-dark-white lg:rounded-2xl">
|
||||||
@@ -140,13 +141,13 @@ const EditJobPopOut = ({
|
|||||||
<div className="field w-full mb-6 xl:mb-0">
|
<div className="field w-full mb-6 xl:mb-0">
|
||||||
<InputCom
|
<InputCom
|
||||||
fieldClass="px-6 cursor-default"
|
fieldClass="px-6 cursor-default"
|
||||||
label="Country"
|
label="Currency"
|
||||||
labelClass="tracking-wide"
|
labelClass="tracking-wide"
|
||||||
inputBg="bg-slate-100"
|
inputBg="bg-slate-100"
|
||||||
inputClass="input-curve lg border border-light-purple"
|
inputClass="input-curve lg border border-light-purple"
|
||||||
type="text"
|
type="text"
|
||||||
name="country"
|
name="currency"
|
||||||
value={props.values.country}
|
value={props.values.currency}
|
||||||
inputHandler={props.handleChange}
|
inputHandler={props.handleChange}
|
||||||
blurHandler={props.handleBlur}
|
blurHandler={props.handleBlur}
|
||||||
disable={true}
|
disable={true}
|
||||||
@@ -163,7 +164,7 @@ const EditJobPopOut = ({
|
|||||||
inputClass="input-curve lg border border-light-purple"
|
inputClass="input-curve lg border border-light-purple"
|
||||||
type="number"
|
type="number"
|
||||||
name="price"
|
name="price"
|
||||||
value={props.values.price * 0.01}
|
value={props.values.price}
|
||||||
inputHandler={props.handleChange}
|
inputHandler={props.handleChange}
|
||||||
blurHandler={props.handleBlur}
|
blurHandler={props.handleBlur}
|
||||||
errorBorder={
|
errorBorder={
|
||||||
|
|||||||
+5
-1
@@ -26,6 +26,7 @@
|
|||||||
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
|
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
|
||||||
font-family: sans; color: white;
|
font-family: sans; color: white;
|
||||||
font-size: 42px;
|
font-size: 42px;
|
||||||
|
font-family: Circular, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.job-action{
|
.job-action{
|
||||||
@@ -52,10 +53,13 @@
|
|||||||
}
|
}
|
||||||
.siderCardDescription{
|
.siderCardDescription{
|
||||||
margin: 10px 45px 10px 45px;
|
margin: 10px 45px 10px 45px;
|
||||||
font-size: 18px;
|
|
||||||
background-color: aliceblue;
|
background-color: aliceblue;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
font-family: Circular, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 1.125rem;
|
||||||
|
line-height: 1.56;
|
||||||
}
|
}
|
||||||
.siderCardButton{
|
.siderCardButton{
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ class usersService {
|
|||||||
};
|
};
|
||||||
return this.postAuxEnd("/mybanklist", postData);
|
return this.postAuxEnd("/mybanklist", postData);
|
||||||
}
|
}
|
||||||
getUserWallets(reqData) {
|
getUserWallets() {
|
||||||
var postData = {
|
var postData = {
|
||||||
uuid: localStorage.getItem("uuid"),
|
uid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
};
|
};
|
||||||
@@ -208,7 +208,7 @@ class usersService {
|
|||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
action: 22025,
|
action: 22025,
|
||||||
...reqData
|
...reqData,
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/familymanage", postData);
|
return this.postAuxEnd("/familymanage", postData);
|
||||||
}
|
}
|
||||||
@@ -223,7 +223,7 @@ class usersService {
|
|||||||
limit: 30,
|
limit: 30,
|
||||||
offset: 0,
|
offset: 0,
|
||||||
action: 13008,
|
action: 13008,
|
||||||
...reqData
|
...reqData,
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/jobmanageractive", postData);
|
return this.postAuxEnd("/jobmanageractive", postData);
|
||||||
}
|
}
|
||||||
@@ -289,6 +289,29 @@ class usersService {
|
|||||||
};
|
};
|
||||||
return this.postAuxEnd("/jobmanageroffers", postData);
|
return this.postAuxEnd("/jobmanageroffers", postData);
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
getResourceList() { // jobs you have shown inteterest in
|
||||||
|
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("/resources", postData);
|
||||||
|
}
|
||||||
|
getMyWiatingJobList() { // jobs you have shown inteterest in
|
||||||
|
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("/waitinginterest", postData);
|
||||||
|
}
|
||||||
getMyJobList() {
|
getMyJobList() {
|
||||||
var postData = {
|
var postData = {
|
||||||
uuid: localStorage.getItem("uid"),
|
uuid: localStorage.getItem("uid"),
|
||||||
@@ -449,8 +472,8 @@ class usersService {
|
|||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
action: 11032,
|
action: 11032,
|
||||||
...postData
|
...postData,
|
||||||
}
|
};
|
||||||
return this.postAuxEnd("/sendreferral", reqData);
|
return this.postAuxEnd("/sendreferral", reqData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -468,7 +491,7 @@ class usersService {
|
|||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
action: 85020,
|
action: 85020,
|
||||||
...reqData
|
...reqData,
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/couponredeem", postData);
|
return this.postAuxEnd("/couponredeem", postData);
|
||||||
}
|
}
|
||||||
@@ -485,7 +508,7 @@ class usersService {
|
|||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
action: 11183,
|
action: 11183,
|
||||||
country: "NG",
|
// country: "NG",
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/countrybanks", postData);
|
return this.postAuxEnd("/countrybanks", postData);
|
||||||
}
|
}
|
||||||
@@ -507,9 +530,9 @@ class usersService {
|
|||||||
uid: localStorage.getItem("uid"),
|
uid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
msg_type: 'JOB',
|
msg_type: "JOB",
|
||||||
action: 13033,
|
action: 13033,
|
||||||
...reqData
|
...reqData,
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/marketinterest", postData);
|
return this.postAuxEnd("/marketinterest", postData);
|
||||||
}
|
}
|
||||||
@@ -519,9 +542,9 @@ class usersService {
|
|||||||
uid: localStorage.getItem("uid"),
|
uid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
msg_type: 'JOB',
|
msg_type: "JOB",
|
||||||
action: 13036,
|
action: 13036,
|
||||||
...reqData
|
...reqData,
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/marketmessage", postData);
|
return this.postAuxEnd("/marketmessage", postData);
|
||||||
}
|
}
|
||||||
@@ -623,7 +646,7 @@ class usersService {
|
|||||||
for (let data in postData) {
|
for (let data in postData) {
|
||||||
formData.append(data, postData[data]);
|
formData.append(data, postData[data]);
|
||||||
}
|
}
|
||||||
// return this.postAuxEnd("/uploads", formData);
|
// return this.postAuxEnd("/uploads", formData);
|
||||||
|
|
||||||
return this.postAuxEnd("/uploads", postData);
|
return this.postAuxEnd("/uploads", postData);
|
||||||
}
|
}
|
||||||
@@ -668,25 +691,25 @@ class usersService {
|
|||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
action: 13024,
|
action: 13024,
|
||||||
limit: 30,
|
limit: 30,
|
||||||
offset: 0
|
offset: 0,
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/offersinterestlist", postData);
|
return this.postAuxEnd("/offersinterestlist", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
// END POINT FOR PROCESSING OFFER INTEREST
|
// END POINT FOR PROCESSING OFFER INTEREST
|
||||||
offersInterestProc(reqData) {
|
offersInterestProc(reqData) {
|
||||||
var postData = {
|
var postData = {
|
||||||
uid: localStorage.getItem("uid"),
|
uid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
action: 13034,
|
action: 13034,
|
||||||
...reqData
|
...reqData,
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/offersinterestproc", postData);
|
return this.postAuxEnd("/offersinterestproc", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
// END POINT FOR WORKER TO MARK TASK AS COMPLETED
|
// END POINT FOR WORKER TO MARK TASK AS COMPLETED
|
||||||
workerJobAction(reqData) {
|
workerJobAction(reqData) {
|
||||||
var postData = {
|
var postData = {
|
||||||
uid: localStorage.getItem("uid"),
|
uid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
@@ -697,50 +720,72 @@ class usersService {
|
|||||||
return this.postAuxEnd("/activetaskstatus", postData);
|
return this.postAuxEnd("/activetaskstatus", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
// END POINT FOR OWNER JOB ACTION
|
// END POINT FOR OWNER JOB ACTION
|
||||||
ownerJobAction(reqData) {
|
ownerJobAction(reqData) {
|
||||||
var postData = {
|
var postData = {
|
||||||
uid: localStorage.getItem("uid"),
|
uid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
action: 14015,
|
action: 14015,
|
||||||
...reqData,
|
...reqData,
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/activejobstatus", postData);
|
return this.postAuxEnd("/activejobstatus", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
// END POINT FOR OWNER JOB ACTION
|
// END POINT FOR OWNER JOB ACTION
|
||||||
getFaq() {
|
getFaq() {
|
||||||
var postData = {
|
var postData = {
|
||||||
uid: localStorage.getItem("uid"),
|
|
||||||
// member_id: localStorage.getItem("member_id"),
|
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/faq", postData);
|
return this.postAuxEnd("/faq", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getMyNotifications() {
|
||||||
|
var postData = {
|
||||||
|
uid: localStorage.getItem("uid"),
|
||||||
|
member_id: localStorage.getItem("member_id"),
|
||||||
|
sessionid: localStorage.getItem("session_token"),
|
||||||
|
limit: 30,
|
||||||
|
offset: 0,
|
||||||
|
action: 11205,
|
||||||
|
};
|
||||||
|
return this.postAuxEnd("/mynotifications", postData);
|
||||||
|
}
|
||||||
|
|
||||||
// END POINT TO GET LIST OF USER PREVIOUS CARDS
|
// END POINT TO GET LIST OF USER PREVIOUS CARDS
|
||||||
payListCard() {
|
payListCard() {
|
||||||
var postData = {
|
var postData = {
|
||||||
uid: localStorage.getItem("uid"),
|
uid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
action: 11055
|
action: 11055,
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/paylistcard", postData);
|
return this.postAuxEnd("/paylistcard", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
// END POINT TO SEND AND GET OFFER INTEREST MESSAGE
|
// END POINT TO SEND OFFER INTEREST MESSAGE
|
||||||
offerInterestMsg(reqData) {
|
offerInterestMsg(reqData) {
|
||||||
var postData = {
|
var postData = {
|
||||||
uid: localStorage.getItem("uid"),
|
uid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
action: 13037,
|
action: 13037,
|
||||||
...reqData
|
...reqData,
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/offerinterestmsg", postData);
|
return this.postAuxEnd("/offerinterestmsg", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// END POINT TO GET OFFER INTEREST MESSAGE
|
||||||
|
offerInterestListMsg(reqData) {
|
||||||
|
var postData = {
|
||||||
|
uid: localStorage.getItem("uid"),
|
||||||
|
member_id: localStorage.getItem("member_id"),
|
||||||
|
sessionid: localStorage.getItem("session_token"),
|
||||||
|
action: 13037,
|
||||||
|
...reqData,
|
||||||
|
};
|
||||||
|
return this.postAuxEnd("/offerinterestlistmsg", postData);
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(username)
|
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(username)
|
||||||
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(password)
|
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(password)
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import React, { useContext, useState, useEffect } from "react";
|
||||||
|
import usersService from "../services/UsersService";
|
||||||
|
import MyPendingJobs from "../components/MyPendingJobs";
|
||||||
|
import { useSelector } from "react-redux";
|
||||||
|
import MyWaitingJobs from "../components/MyWaitingJobs";
|
||||||
|
|
||||||
|
export default function MyWaitingJobsPage() {
|
||||||
|
let { commonHeadBanner } = useSelector((state) => state.commonHeadBanner);
|
||||||
|
const [MyJobList, setMyJobList] = useState([]);
|
||||||
|
const api = new usersService();
|
||||||
|
|
||||||
|
const getMyJobList = async () => {
|
||||||
|
try {
|
||||||
|
const res = await api.getMyWiatingJobList();
|
||||||
|
setMyJobList(res.data);
|
||||||
|
} catch (error) {
|
||||||
|
console.log("Error getting mode");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
useEffect(() => {
|
||||||
|
getMyJobList();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// debugger;
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<MyWaitingJobs
|
||||||
|
MyJobList={MyJobList}
|
||||||
|
commonHeadData={commonHeadBanner.result_list}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,7 +1,24 @@
|
|||||||
import React from "react";
|
import React, { useContext, useState, useEffect } from "react";
|
||||||
//import UserProfile from "../components/AuthPages/UserProfile";
|
|
||||||
import Resources from "../components/Resources";
|
import Resources from "../components/Resources";
|
||||||
|
import {useSelector} from "react-redux";
|
||||||
|
import usersService from "../services/UsersService";
|
||||||
export default function ResourcePage() {
|
export default function ResourcePage() {
|
||||||
return <Resources />;
|
|
||||||
|
const [MyResourceData, setMyResourceData] = useState([]);
|
||||||
|
const api = new usersService();
|
||||||
|
|
||||||
|
const getMyResourceData = async () => {
|
||||||
|
try {
|
||||||
|
const res = await api.getResourceList();
|
||||||
|
setMyResourceData(res.data);
|
||||||
|
} catch (error) {
|
||||||
|
console.log("Error getting mode");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
useEffect(() => {
|
||||||
|
getMyResourceData();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return <Resources
|
||||||
|
MyResourceData={MyResourceData} />;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ export default function SettingsPage() {
|
|||||||
|
|
||||||
const apiCall = new usersService()
|
const apiCall = new usersService()
|
||||||
|
|
||||||
let [faq, setFaq] = useState({loading:true, data:[]}) // STATE TO HOLD FAQ DATA
|
let [faq, setFaq] = useState({loading:true, data:null}) // STATE TO HOLD FAQ DATA
|
||||||
|
|
||||||
//FUNCTION TO GET FAQ
|
//FUNCTION TO GET FAQ
|
||||||
const getFaq = () => {
|
const getFaq = () => {
|
||||||
apiCall.getFaq().then(res => {
|
apiCall.getFaq().then(res => {
|
||||||
setFaq({loading:false, data:res.data.result_list})
|
setFaq({loading:false, data:res.data.result_list})
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
setFaq({loading:false, data:[]})
|
setFaq({loading:false, data:null})
|
||||||
console.log('Error', err)
|
console.log('Error', err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -21,6 +21,7 @@ export default function SettingsPage() {
|
|||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
getFaq()
|
getFaq()
|
||||||
},[])
|
},[])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Settings faq={faq} />
|
<Settings faq={faq} />
|
||||||
|
|||||||
Reference in New Issue
Block a user