Compare commits

...

36 Commits

Author SHA1 Message Date
Ebube 5a37352c53 Merge branch 'master' of https://gitlab.chiefsoft.net/WrenchBoard/Users-Wrench into task-layout 2023-05-17 00:21:05 +01:00
Ebube 0c21f953ee Called the api and structured the component 2023-05-17 00:20:41 +01:00
CHIEFSOFT\ameye 448c1c69ba active job message 2023-05-16 19:03:39 -04:00
ameye b535326c51 Merge branch 'centering-btn' of WrenchBoard/Users-Wrench into master 2023-05-16 19:40:51 +00:00
ameye dad2b6781e Merge branch 'task-layout' of WrenchBoard/Users-Wrench into master 2023-05-16 19:40:45 +00:00
victorAnumudu 3cb0604e81 Button centered 2023-05-16 17:58:14 +01:00
Ebube 73a21a2367 added for mobile 2023-05-16 17:25:08 +01:00
Ebube 8716b16a70 Implented zero state for market bubble 2023-05-16 17:22:08 +01:00
tokslaw 3290fce6da Merge branch 'manage-active-jobs' of WrenchBoard/Users-Wrench into master 2023-05-16 14:11:59 +00:00
victorAnumudu 21e4221301 unused snippet of code cleaned up 2023-05-16 15:06:05 +01:00
victorAnumudu d9f1771045 'Merge master with branch` 2023-05-16 15:00:11 +01:00
victorAnumudu 119dfcde06 active jobs page implementation 2023-05-16 14:53:57 +01:00
CHIEFSOFT\ameye f6e37d0f14 My Task page 2023-05-16 06:45:53 -04:00
ameye 3b1dc859e0 Merge branch 'transfer-fund-page' of WrenchBoard/Users-Wrench into master 2023-05-16 10:33:00 +00:00
ameye a45d21cd2d Merge branch 'edit-delete-btn-position' of WrenchBoard/Users-Wrench into master 2023-05-16 10:32:51 +00:00
ameye 1774d07980 Merge branch 'broken-link' of WrenchBoard/Users-Wrench into master 2023-05-16 10:32:02 +00:00
Ebube 69ec1e3766 Merge branch 'master' of https://gitlab.chiefsoft.net/WrenchBoard/Users-Wrench into transfer-fund-page 2023-05-16 00:59:34 +01:00
Ebube 7e0f19212f manage pop up 2023-05-16 00:58:43 +01:00
victorAnumudu 5fd3940911 Fixed broken link on active job view button 2023-05-15 21:39:07 +01:00
victorAnumudu 4f1a4dd045 Delete/Edit Btn Position Changed 2023-05-15 21:16:18 +01:00
ameye f755786adc Merge branch 'transfer-fund-page' of WrenchBoard/Users-Wrench into master 2023-05-15 13:06:23 +00:00
Ebube 19f111c6a8 fixed button for family acc 2023-05-15 12:28:31 +01:00
CHIEFSOFT\ameye c877c70bf0 Active Jobs 2023-05-14 21:49:08 -04:00
CHIEFSOFT\ameye 7c2f90b1b8 active pending jobs 2023-05-14 13:33:08 -04:00
ameye 872ba05a01 Merge branch 'positioning-delete-edit-btn' of WrenchBoard/Users-Wrench into master 2023-05-14 12:06:35 +00:00
victorAnumudu 7083e67667 Positioned the delete and edit button in my jobs list 2023-05-14 07:33:46 +01:00
ameye 94e7c549df Merge branch 'job-page-layout-fix' of WrenchBoard/Users-Wrench into master 2023-05-13 14:48:37 +00:00
victorAnumudu 0d013c261b Job layout implemented 2023-05-13 14:04:40 +01:00
ameye 60eca6e703 Merge branch 'deleted-job-api-implementation' of WrenchBoard/Users-Wrench into master 2023-05-12 20:48:20 +00:00
victorAnumudu d51c9dc55d delete job api implementation 2023-05-12 21:07:17 +01:00
ameye c7985e6b48 Merge branch 'transfer-fund-page' of WrenchBoard/Users-Wrench into master 2023-05-12 19:00:31 +00:00
Ebube 985dc58f37 Merge branch 'master' of https://gitlab.chiefsoft.net/WrenchBoard/Users-Wrench into transfer-fund-page 2023-05-12 19:07:40 +01:00
Ebube d3a19d0a31 changed layout 2023-05-12 19:06:53 +01:00
tokslaw e1a7b8647b Merge branch 'delete-job-implementation' of WrenchBoard/Users-Wrench into master 2023-05-12 15:18:02 +00:00
victorAnumudu 77bc0ca795 delete job implemented 2023-05-12 16:06:59 +01:00
ameye 7a5e5580f9 Merge branch 'add-family-acc' of WrenchBoard/Users-Wrench into master 2023-05-12 08:46:22 +00:00
27 changed files with 3020 additions and 2242 deletions
+4
View File
@@ -35,6 +35,8 @@ import MyActiveJobsPage from "./views/MyActiveJobsPage";
import FamilyAccPage from "./views/FamilyAccPage";
import StartJob from "./components/MyJobs/StartJob";
import AddJobPage from "./views/AddJobPage";
import MyPendingJobsPage from "./views/MyPendingJobsPage";
import ManageActiveJobs from "./views/ManageActiveJobs";
export default function Routers() {
return (
@@ -79,8 +81,10 @@ export default function Routers() {
<Route exact path="/myjobs" element={<MyJobsPage />} />
<Route exact path="/add-job" element={<AddJobPage />} />
<Route exact path="/my-active-jobs" element={<MyActiveJobsPage />} />
<Route exact path="/my-pending-jobs" element={<MyPendingJobsPage />} />
<Route exact path="/acc-family" element={<FamilyAccPage />} />
<Route exact path="/start-job" element={<StartJob />} />
<Route exact path="/manage-active-job" element={<ManageActiveJobs />} />
<Route
exact
path="/my-collection/collection-item"
+15 -4
View File
@@ -13,7 +13,7 @@ const validationSchema = Yup.object().shape({
.max(25, "Maximum 25 characters")
.required("Country is required"),
price: Yup.number()
.typeError("you must specify a number")
.typeError("you must specify a number")
.min(1, "Price must be greater than 0")
.required("Price is required"),
title: Yup.string()
@@ -36,7 +36,7 @@ const validationSchema = Yup.object().shape({
let initialValues = { // initial values for formik
country: '',
price: '',
price: 0,
title: '',
description: '',
job_detail: '',
@@ -69,7 +69,6 @@ function AddJob() {
// FUNCTION TO HANDLE ADD JOB FORM
const handleAddJob = (values, helpers) => {
console.log(values)
setRequestStatus({loading: true, status: false, message:''})
ApiCall.jobManagerCreateJob(values).then(res => {
if(res.data.internal_return < 1){
@@ -83,6 +82,10 @@ function AddJob() {
}).catch(err => {
setRequestStatus({loading: false, status: false, message:'Opps! soemthing went wrong. Try Again'})
}).finally(()=>{
setTimeout(()=>{
setRequestStatus({loading: false, status: false, message:''})
}, 5000)
})
}
@@ -134,8 +137,10 @@ function AddJob() {
<select
id='country'
name='country'
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`}
onChange={props.handleChange}
onBlur={props.handleBlur}
>
{country.loading ? (
<option className="text-slate-500 text-lg" value="">
@@ -176,11 +181,13 @@ function AddJob() {
label="Price"
labelClass='tracking-wide'
inputBg = 'bg-slate-100'
type="text"
type="number"
name="price"
fieldClass='text-right'
// placeholder="Please Enter Amount"
value={props.values.price}
inputHandler={props.handleChange}
blurHandler={props.handleBlur}
/>
{props.errors.price && props.touched.price && (
<p className="text-sm text-red-500">
@@ -203,6 +210,7 @@ function AddJob() {
// placeholder="Enter Job Title"
value={props.values.title}
inputHandler={props.handleChange}
blurHandler={props.handleBlur}
/>
{props.errors.title && props.touched.title && (
<p className="text-sm text-red-500">
@@ -223,6 +231,7 @@ function AddJob() {
// placeholder="Enter a description"
value={props.values.description}
inputHandler={props.handleChange}
blurHandler={props.handleBlur}
/>
{props.errors.description && props.touched.description && (
<p className="text-sm text-red-500">
@@ -255,6 +264,7 @@ function AddJob() {
name='job_detail'
value={props.values.job_detail}
onChange={props.handleChange}
onBlur={props.handleBlur}
/>
{props.errors.job_detail && props.touched.job_detail && (
<p className="text-sm text-red-500">
@@ -275,6 +285,7 @@ function AddJob() {
// placeholder="Please Enter Detail Description of Job"
value={props.values.timeline_days}
inputHandler={props.handleChange}
blurHandler={props.handleBlur}
/>
{props.errors.timeline_days && props.touched.timeline_days && (
<p className="text-sm text-red-500">
+5 -4
View File
@@ -134,7 +134,7 @@ export default function FamilyAcc() {
{/* heading */}
<div className="sm:flex justify-between items-center mb-6">
<div className="mb-5 sm:mb-0">
<h1 className="text-26 font-bold inline-flex gap-2 text-dark-gray dark:text-white">
<h1 className="text-26 font-bold inline-flex gap-3 text-dark-gray dark:text-white items-center">
<span
className={`${selectTab === "today" ? "block" : "hidden"}`}
>
@@ -143,9 +143,9 @@ export default function FamilyAcc() {
<button
onClick={popUpHandler}
type="button"
className="text-purple"
className="text-white btn-gradient text-lg tracking-wide px-5 py-2 rounded-full"
>
(Add)
Add
</button>
</h1>
</div>
@@ -266,7 +266,8 @@ const FamilyForm = ({
<button
type="button"
onClick={onClick}
className={`rounded-[0.475rem] text-white flex justify-center bg-[#4687ba] hover:bg-[#009ef7] transition-all duration-300 items-center h-[42px] py-[0.8875rem] px-[1.81rem] text-[14.95px] btn-login`}
// className={`rounded-[0.475rem] text-white flex justify-center bg-[#4687ba] hover:bg-[#009ef7] transition-all duration-300 items-center h-[42px] py-[0.8875rem] px-[1.81rem] text-[14.95px] btn-login`}
className="text-white btn-gradient text-lg tracking-wide px-6 py-2 rounded-full"
>
{loader ? (
<div className="signup btn-loader"></div>
+41 -106
View File
@@ -20,119 +20,28 @@ export default function InputCom({
disable,
blurHandler,
spanTag,
inputBg
inputBg,
direction
}) {
const inputRef = useRef(null);
// Entry Validation
// for Min Length:
const minLengthValidation = () => {
if (inputRef && inputRef?.current && inputRef?.current?.name === "email") {
return 7;
} else if (
inputRef &&
inputRef?.current &&
inputRef?.current?.name === "first_name"
) {
return 3;
} else if (
inputRef &&
inputRef?.current &&
inputRef?.current?.name === "last_name"
) {
return 3;
} else if (
inputRef &&
inputRef?.current &&
inputRef?.current?.name === "address"
) {
return 5;
} else if (
inputRef &&
inputRef?.current &&
inputRef?.current?.name === "password"
) {
return 8;
} else if (
inputRef &&
inputRef?.current &&
inputRef?.current?.name === "state"
) {
return 3;
} else if (
inputRef &&
inputRef?.current &&
inputRef?.current?.name === "province"
) {
return 3;
} else if (
inputRef &&
inputRef?.current &&
inputRef?.current?.name === "city"
) {
return 3;
} else if (
inputRef &&
inputRef?.current &&
inputRef?.current?.name === "amount"
) {
return 1;
}
const inputConfig = inputConfigs[inputRef?.current?.name]?.minLength;
return inputConfig || 0;
};
// for MaxLength
const maxLengthValidation = () => {
if (inputRef && inputRef?.current && inputRef?.current?.name === "email") {
return 35;
} else if (
inputRef &&
inputRef?.current &&
inputRef?.current?.name === "first_name"
) {
return 25;
} else if (
inputRef &&
inputRef?.current &&
inputRef?.current?.name === "last_name"
) {
return 25;
} else if (
inputRef &&
inputRef?.current &&
inputRef?.current?.name === "address"
) {
return 49;
} else if (
inputRef &&
inputRef?.current &&
inputRef?.current?.name === "password"
) {
return 15;
} else if (
inputRef &&
inputRef?.current &&
inputRef?.current?.name === "state"
) {
return 25;
} else if (
inputRef &&
inputRef?.current &&
inputRef?.current?.name === "province"
) {
return 25;
} else if (
inputRef &&
inputRef?.current &&
inputRef?.current?.name === "city"
) {
return 25;
} else if (
inputRef &&
inputRef?.current &&
inputRef?.current?.name === "amount"
) {
return 9;
}
const inputConfig = inputConfigs[inputRef?.current?.name]?.maxLength;
return inputConfig || 30;
};
// for Patterns
const inputPatterns = () => {
const inputConfig = inputConfigs[inputRef?.current?.name]?.pattern;
return inputConfig || ""
}
return (
<div className={`input-com ${parentClass}`}>
<div className={`flex items-center justify-between mb-2.5 ${labelClass}`}>
@@ -140,9 +49,13 @@ export default function InputCom({
<label
className="input-label text-[#181c32] dark:text-white text-[13.975px] leading-[20.9625px] font-semibold block"
htmlFor={name}
>
>
{label}
{spanTag && <span className="text-green-700 text-sm tracking-wide">{spanTag}</span>}
{spanTag && (
<span className="text-green-700 text-sm tracking-wide">
{spanTag}
</span>
)}
</label>
)}
{forgotPassword && (
@@ -161,15 +74,19 @@ export default function InputCom({
placeholder={placeholder}
value={value}
onChange={inputHandler}
className={`input-field placeholder:text-base text-bese px-12 text-dark-gray w-full h-full ${inputBg ? inputBg: 'bg-[#FAFAFA]'} dark:bg-[#11131F] focus:ring-0 focus:outline-none ${fieldClass}`}
className={`input-field placeholder:text-base text-dark-gray w-full h-full ${
inputBg ? inputBg : "bg-[#FAFAFA]"
} dark:bg-[#11131F] focus:ring-0 focus:outline-none ${fieldClass}`}
type={type}
id={name}
name={name}
minLength={minLengthValidation()}
maxLength={maxLengthValidation()}
pattern={() => inputPatterns}
ref={inputRef}
readOnly={disable}
onBlur={blurHandler}
dir={direction}
/>
{iconName && (
<div className="absolute right-6 bottom-[10px] z-10">
@@ -188,3 +105,21 @@ export default function InputCom({
</div>
);
}
const inputConfigs = {
email: { minLength: 7, maxLength: 30 },
first_name: { minLength: 3, maxLength: 25, pattern: "[a-zA-Z]+" },
last_name: { minLength: 3, maxLength: 25, pattern: "[a-zA-Z]+" },
address: { minLength: 5, maxLength: 49, pattern: "[a-zA-Z0-9]+" },
password: { minLength: 8, maxLength: 15, pattern: ".{8,}" },
state: { minLength: 3, maxLength: 25, pattern: "[a-zA-Z]+" },
province: { minLength: 3, maxLength: 25, pattern: "[a-zA-Z]+" },
city: { minLength: 3, maxLength: 25, pattern: "[a-zA-Z]+" },
amount: { minLength: 1, maxLength: 9, pattern: "[0-9]+" },
};
/* Numbers Only: <input type="text" pattern="[0-9]*" /> strictly numbers
Alphabets Only: <input type="text" pattern="[a-zA-Z]+" /> strictly alphabets
Alphanumeric: <input type="text" pattern="[a-zA-Z0-9]+" /> mix
Password: <input type="text" pattern=".{8,}" /> a minimum of 8 characters
*/
File diff suppressed because it is too large Load Diff
+155
View File
@@ -0,0 +1,155 @@
import React, { useEffect, useState } from "react";
import { useSelector } from "react-redux";
import ModalCom from "../Helpers/ModalCom";
import Layout from "../Partials/Layout";
import { useLocation, useNavigate } from "react-router-dom";
import ActiveJobMessage from "./ActiveJobMessage";
function ActiveJobs() {
let { userDetails } = useSelector((state) => state.userDetails);
let navigate = useNavigate()
let {state} = useLocation()
let [details, setDetails] = useState({})
// console.log(state, userDetails);
useEffect(()=>{
if(!state){
navigate('/my-active-jobs', {replace: true})
}
setDetails(state)
},[])
return (
<Layout>
{/* <div className="logout-modal-wrapper min-w-[850px] h-full lg:h-auto lg:rounded-2xl overflow-y-auto"> */}
<div className="p-4 lg:flex justify-between items-start space-y-4 lg:space-x-4 lg:space-y-0 rounded-lg shadow-lg bg-slate-100">
<div className="w-full lg:w-3/4">
<div className="py-[20px] bg-white px-4 rounded-md shadow-md">
{/* back btn and title */}
<div className="w-full flex justify-start space-x-3 items-center">
<button
type="button"
className="text-[#374557] border border-sky-blue p-1 rounded-full"
onClick={() => navigate('/my-active-jobs', {replace: true})}
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="35"
height="35"
viewBox="0 0 24 24"
fill="skyblue"
>
<path d="M19 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H19v-2z" />
</svg>
</button>
<h1 className="text-lg font-bold text-dark-gray dark:text-white tracking-wide">
{details.title && details.title}
</h1>
</div>
{/* END of back btn and title */}
<div className="mt-2 w-full lg:flex lg:justify-between lg:items-center lg:space-x-2">
<div className="my-2 lg:my-0">
<p className="text-base text-slate-700 dark:text-black">
{details.contract && details.contract}
</p>
<p className="text-base text-slate-700 dark:text-black">
<span className="font-semibold">Description: </span>
{details.description && details.description}
</p>
<p className="text-base text-sky-blue">Delivery Detail</p>
</div>
<div className="">
<p className="text-base text-sky-blue">
{userDetails.firstname && userDetails.firstname}
</p>
<p className="text-base text-slate-700 dark:text-black">
<span className="font-semibold">Due: </span>
{details.delivery_date &&
details.delivery_date.split(" ")[0]}
</p>
<p className="text-base text-slate-700 dark:text-black">
{details.delivery_date &&
details.delivery_date.split(" ")[1]}
</p>
<p className="text-base text-slate-700 dark:text-black">
{details.timeline_days && details.timeline_days} day(s)
</p>
</div>
</div>
</div>
<div className="mt-5 bg-white p-4 rounded-md shadow-md">
<div className="">
<p className="text-lg font-bold text-slate-600 dark:text-blask tracking-wide">Message(s)</p>
<textarea
className="p-4 w-full text-base text-slate-600 border border-slate-300 outline-none rounded-md"
rows="10"
style={{ resize: "none" }}
/>
</div>
{/* Buttons Sections */}
<div className="py-2 mb-8 sm:flex sm:justify-center sm:items-center">
<div className="w-full sm:w-3/4 mb-5 sm:mb-0">
<button
onClick={()=> console.log('working')}
type="button"
className="btn-gradient text-base tracking-wide px-4 py-2 rounded-md flex justify-center items-center"
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill='white'>
<path d="M12 2L2 12h3v8h14v-8h3L12 2zm0 16v-6h-2v6H7l5-5 5 5h-3z"/>
</svg>
<span className="text-white">Upload Files</span>
</button>
</div>
<div className="w-full sm:w-1/4 flex justify-between items-center space-x-2">
<button
type="button"
className="bg-red-600 text-base text-white tracking-wide px-4 py-2 rounded-md hover:opacity-90"
>
<span className="text-white">Clear</span>
</button>
<button
type="button"
className="btn-gradient text-base text-white tracking-wide px-4 py-2 rounded-md"
>
<span className="text-white">Send</span>
</button>
</div>
</div>
{/* end of Buttons Sections */}
</div>
</div>
{/* ACTION SECTION */}
<div className="w-full lg:w-1/4 h-full">
<div className="py-[20px] bg-white px-4 rounded-md shadow-md">
<h1 className="text-lg font-bold text-dark-gray dark:text-white tracking-wide">Actions</h1>
<p className="my-3 py-1 text-base">
Waiting for the completion message from the client before you can approve.
</p>
</div>
<div className="mt-5 bg-white p-4 rounded-md shadow-md">
<div className="">
<p className="text-lg font-bold text-dark-gray dark:text-black tracking-wide">Message</p>
<ActiveJobMessage />
</div>
</div>
</div>
</div>
{/* </div> */}
</Layout>
);
}
export default ActiveJobs;
+122 -98
View File
@@ -1,112 +1,136 @@
import React, { useState } from "react";
import dataImage1 from "../../assets/images/data-table-user-1.png";
import dataImage2 from "../../assets/images/data-table-user-2.png";
import dataImage3 from "../../assets/images/data-table-user-3.png";
import dataImage4 from "../../assets/images/data-table-user-4.png";
import SelectBox from "../Helpers/SelectBox";
import ActiveJobsPopout from "../jobPopout/ActiveJobsPopout";
import PaginatedList from "../Pagination/PaginatedList";
import { useNavigate } from "react-router-dom";
import { handlePagingFunc } from "../Pagination/HandlePagination";
import PaginatedList from "../Pagination/PaginatedList";
export default function MyActiveJobTable({MyJobList, className }) {
const filterCategories = ["All Categories", "Explore", "Featured"];
const [selectedCategory, setCategory] = useState(filterCategories[0]);
export default function MyActiveJobTable({ MyJobList, className }) {
const navigate = useNavigate()
let [jobPopout,setJobPopout] = useState({show:false, data:{}}) // STATE TO HOLD THE VALUE OF THE ALERT DETAILS AND DETERMINE WHEN TO SHOW
const filterCategories = ["All Categories", "Explore", "Featured"];
const [selectedCategory, setCategory] = useState(filterCategories[0]);
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)
}
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
);
return (
<div
className={`update-table w-full p-8 bg-white dark:bg-dark-white overflow-hidden rounded-2xl section-shadow ${
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>*/}
const handlePagination = (e) => {
handlePagingFunc(e, setCurrentPage);
};
{
<>
{MyJobList && MyJobList?.result_list &&
MyJobList.result_list.length > 0 &&
currentActiveJobList.map((value, index) => (
<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">
<div className="w-[60px] h-[60px] rounded-full overflow-hidden flex justify-center items-center">
<img
src={dataImage2}
alt="data"
className="w-full h-full"
/>
</div>
<div className="flex flex-col">
<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">
Price: <span className="text-purple">{value.price*0.01}</span>
</span>
<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"> {value.expire}</span>
</span>
<span className="text-sm text-thin-light-gray">
Send to: <span className="text-purple"> {value.job_to}</span>
</span>
return (
<div
className={`update-table w-full p-8 bg-white dark:bg-dark-white overflow-hidden rounded-2xl section-shadow ${
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>*/}
</div>
</div>
</td>
{
<>
{MyJobList &&
MyJobList?.result_list &&
MyJobList.result_list.length > 0 &&
currentActiveJobList.map((value, index) => (
<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">
<div className="w-[60px] h-[60px] rounded-full overflow-hidden flex justify-center items-center">
<img
src={dataImage2}
alt="data"
className="w-full h-full"
/>
</div>
<div className="flex flex-col">
<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">
Price:{" "}
<span className="text-purple">
{value.price * 0.01}
</span>
</span>
<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">
{" "}
{value.expire}
</span>
</span>
<span className="text-sm text-thin-light-gray">
Send to:{" "}
<span className="text-purple">
{" "}
{value.job_to}
</span>
</span>
</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>
))}
</>
}
</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>
<td className="text-right py-4 px-2">
<div className="flex justify-center items-center">
<button
type="button"
onClick={() => {
navigate('/manage-active-job', {state:value});
}}
className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
>
View
</button>
</div>
</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
}
{/* Active Job Popout */}
{jobPopout.show &&
<ActiveJobsPopout details={jobPopout.data} onClose={()=>{setJobPopout({show:false, data:{}})}} situation={jobPopout.show} />
}
{/* End of Active Job Popout */}
data={MyJobList?.result_list}
start={indexOfFirstItem}
stop={indexOfLastItem}
/>
{/* END OF PAGINATION BUTTON */}
</div>
);
)}
</div>
);
}
+29 -29
View File
@@ -5,37 +5,37 @@ import CommonHead from "../UserHeader/CommonHead";
import MyActiveJobTable from "./MyActiveJobTable";
export default function MyActiveJobs(props) {
const [selectTab, setValue] = useState("today");
const filterHandler = (value) => {
setValue(value);
};
console.log("AMEYE LOC1", props.MyJobList);
return (
<Layout>
<CommonHead />
<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">
const [selectTab, setValue] = useState("today");
const filterHandler = (value) => {
setValue(value);
};
console.log("AMEYE LOC1", props.MyJobList);
return (
<Layout>
<CommonHead />
<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"}`}
className={`${selectTab === "today" ? "block" : "hidden"}`}
>
Current Job(s)
Active Job(s)
</span>
</h1>
</div>
<div className="slider-btns flex space-x-4">
<div onClick={() => filterHandler("today")} className="relative">
</div>
</div>
</div>
<MyActiveJobTable MyJobList={props.MyJobList} />
</div>
</h1>
</div>
</Layout>
);
<div className="slider-btns flex space-x-4">
<div
onClick={() => filterHandler("today")}
className="relative"
></div>
</div>
</div>
<MyActiveJobTable MyJobList={props.MyJobList} />
</div>
</div>
</Layout>
);
}
+40 -28
View File
@@ -5,6 +5,7 @@ import dataImage3 from "../../assets/images/data-table-user-3.png";
import dataImage4 from "../../assets/images/data-table-user-4.png";
import SelectBox from "../Helpers/SelectBox";
import JobListPopout from "../jobPopout/JobListPopout";
import DeleteJobPopout from "../jobPopout/DeleteJobPopout";
import PaginatedList from "../Pagination/PaginatedList";
import { handlePagingFunc } from "../Pagination/HandlePagination";
@@ -15,6 +16,8 @@ export default function MyJobTable({MyJobList, className }) {
let [jobPopout,setJobPopout] = useState({show:false, data:{}}) // STATE TO HOLD THE VALUE OF THE ALERT DETAILS AND DETERMINE WHEN TO SHOW
let [deleteJobPopout,setDeleteJobPopout] = useState({show:false, data:{}}) // STATE TO HOLD THE VALUE OF THE ITEM DETAILS TO DELETE 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);
@@ -48,8 +51,8 @@ export default function MyJobTable({MyJobList, className }) {
<table className="table-auto min-w-full text-sm text-left text-gray-500 dark:text-gray-400">
<tbody>
<tr className="text-base text-thin-light-gray border-b default-border-b dark:border-[#5356fb29] ottom ">
<td className="py-8">.</td>
<td className="py-4 text-right">.</td>
<td className="py-1">.</td>
<td className="py-1 text-right">.</td>
</tr>
{selectedCategory === "All Categories" ? (
@@ -59,42 +62,45 @@ export default function MyJobTable({MyJobList, className }) {
currentJobList.map((value, index) => (
<tr key={index} className="bg-white dark:bg-dark-white border-b dark:border-[#5356fb29] hover:bg-gray-50">
<td className="py-9">
<div className="flex space-x-2 items-center job-items">
<div className="w-[60px] h-[60px] rounded-full overflow-hidden flex justify-center items-center">
<img
src={dataImage2}
alt="data"
className="w-full h-full"
/>
</div>
<div className="flex flex-col">
<h1 className="font-bold text-xl text-dark-gray dark:text-white">
{value.title}
</h1>
<div>
{value.description}
<div className="sm:flex sm:space-x-2 sm:justify-between sm:items-center job-items">
<div className="flex space-x-2 items-center job-items">
<div className="w-[60px] h-[60px] rounded-full overflow-hidden flex justify-center items-center">
<img
src={dataImage2}
alt="data"
className="w-full h-full"
/>
</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">
Duration: <span className="text-purple"> {value.timeline_days} day(s)</span>
</span>
<div className="flex flex-col">
<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">
Price: <span className="text-purple">{value.price*0.01}</span>
</span>
<span className="text-sm text-thin-light-gray">
Duration: <span className="text-purple"> {value.timeline_days} day(s)</span>
</span>
</div>
</div>
<div className="min-w-[110px] max-w-[110px] bg-yellow-300 mx-2 rounded-md flex flex-nowrap space-x-2 justify-center items-center self-end">
<button type="button" className="p-2 w-[60px] h-11" onClick={()=>{setDeleteJobPopout({show:true, data:value})}}>[Delete]</button>
<span>|</span>
<button type="button" className="p-2 w-[40px] h-11">Edit</button>
</div>
<div className="job-sub-menu"><button type="button" className="w-20 h-11">[Delete]</button> |
<button type="button" className="w-20 h-11">Edit</button> </div>
</div>
</td>
<td className="text-right py-3 px-2">
<td className="text-right py-9 px-2">
<button
type="button"
onClick={()=>{setJobPopout({show:true, data:value})}}
onClick={()=>{setJobPopout({show:true, data:value})}}
className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
>
Manage
@@ -128,6 +134,12 @@ export default function MyJobTable({MyJobList, className }) {
<JobListPopout details={jobPopout.data} onClose={()=>{setJobPopout({show:false, data:{}})}} situation={jobPopout.show} />
}
{/* End of Job List Popout */}
{/* Delete Job Popout */}
{deleteJobPopout.show &&
<DeleteJobPopout details={deleteJobPopout.data} onClose={()=>{setDeleteJobPopout({show:false, data:{}})}} situation={deleteJobPopout.show} />
}
{/* END of Delete Job Popout */}
</div>
);
}
+38 -34
View File
@@ -5,40 +5,44 @@ import MyJobTable from "./MyJobTable";
import CommonHead from "../UserHeader/CommonHead";
export default function MyJobs(props) {
const [selectTab, setValue] = useState("today");
const filterHandler = (value) => {
setValue(value);
};
console.log("AMEYE LOC1", props.MyJobList);
return (
<Layout>
<CommonHead />
<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 flex items-center space-x-1 text-dark-gray dark:text-white">
<span
className={`${selectTab === "today" ? "block" : "hidden"}`}
>
My Jobs
</span>
const [selectTab, setValue] = useState("today");
const filterHandler = (value) => {
setValue(value);
};
console.log("AMEYE LOC1", props.MyJobList);
return (
<Layout>
<CommonHead />
<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 flex items-center space-x-1 text-dark-gray dark:text-white">
<span
className={`${selectTab === "today" ? "block" : "hidden"}`}
>
My Jobs
</span>
<Link to='/add-job' className='w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white'>
Add Job
</Link>
</h1>
</div>
<div className="slider-btns flex space-x-4">
<div onClick={() => filterHandler("today")} className="relative">
</div>
</div>
</div>
<MyJobTable MyJobList={props.MyJobList} />
</div>
<Link
to="/add-job"
className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
>
Add Job
</Link>
</h1>
</div>
</Layout>
);
<div className="slider-btns flex space-x-4">
<div
onClick={() => filterHandler("today")}
className="relative"
></div>
</div>
</div>
<MyJobTable MyJobList={props.MyJobList} />
</div>
</div>
</Layout>
);
}
@@ -0,0 +1,112 @@
import React, { useState } from "react";
import dataImage1 from "../../assets/images/data-table-user-1.png";
import dataImage2 from "../../assets/images/data-table-user-2.png";
import dataImage3 from "../../assets/images/data-table-user-3.png";
import dataImage4 from "../../assets/images/data-table-user-4.png";
import SelectBox from "../Helpers/SelectBox";
import PendingJobsPopout from "../jobPopout/PendingJobsPopout";
import PaginatedList from "../Pagination/PaginatedList";
import { handlePagingFunc } from "../Pagination/HandlePagination";
export default function MyPendingJobTable({MyJobList, className }) {
const filterCategories = ["All Categories", "Explore", "Featured"];
const [selectedCategory, setCategory] = useState(filterCategories[0]);
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 ${
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) => (
<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">
<div className="w-[60px] h-[60px] rounded-full overflow-hidden flex justify-center items-center">
<img
src={dataImage2}
alt="data"
className="w-full h-full"
/>
</div>
<div className="flex flex-col">
<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">
Price: <span className="text-purple">{value.price*0.01}</span>
</span>
<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"> {value.expire}</span>
</span>
<span className="text-sm text-thin-light-gray">
Send to: <span className="text-purple"> {value.job_to}</span>
</span>
</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>
))}
</>
}
</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>
);
}
+41
View File
@@ -0,0 +1,41 @@
import React, { useState } from "react";
import { Link } from "react-router-dom";
import Layout from "../Partials/Layout";
import CommonHead from "../UserHeader/CommonHead";
import MyPendingJobTable from "./MyPendingJobTable";
export default function MyPendingJobs(props) {
const [selectTab, setValue] = useState("today");
const filterHandler = (value) => {
setValue(value);
};
console.log("AMEYE LOC1", props.MyJobList);
return (
<Layout>
<CommonHead />
<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"}`}
>
Pending Job(s)
</span>
</h1>
</div>
<div className="slider-btns flex space-x-4">
<div onClick={() => filterHandler("today")} className="relative">
</div>
</div>
</div>
<MyPendingJobTable MyJobList={props.MyJobList} />
</div>
</div>
</Layout>
);
}
File diff suppressed because it is too large Load Diff
+27 -27
View File
@@ -5,36 +5,36 @@ import MyJobTable from "./MyJobTable";
import CommonHead from "../UserHeader/CommonHead";
export default function MyTasks() {
const [selectTab, setValue] = useState("today");
const filterHandler = (value) => {
setValue(value);
};
return (
<Layout>
<CommonHead />
<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">
const [selectTab, setValue] = useState("today");
const filterHandler = (value) => {
setValue(value);
};
return (
<Layout>
<CommonHead />
<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"}`}
className={`${selectTab === "today" ? "block" : "hidden"}`}
>
My Tasks
</span>
</h1>
</div>
<div className="slider-btns flex space-x-4">
<div onClick={() => filterHandler("today")} className="relative">
</div>
</div>
</div>
<MyJobTable />
</div>
</h1>
</div>
</Layout>
);
<div className="slider-btns flex space-x-4">
<div
onClick={() => filterHandler("today")}
className="relative"
></div>
</div>
</div>
<MyJobTable />
</div>
</div>
</Layout>
);
}
+87 -78
View File
@@ -110,6 +110,7 @@ function TransferFund({ payment, wallet }) {
useEffect(() => {
getRecipients();
}, []);
return (
<div className="content-wrapper w-full lg:flex xl:space-x-8 lg:space-x-4 bottomMargin">
<div className="lg:w-1/2 w-full mb-10 lg:mb-0">
@@ -136,21 +137,25 @@ function TransferFund({ payment, wallet }) {
</h2>
) : wallet.error ? (
<h2 className="my-4 py-2 text-slate-900 dark:text-white text-xl lg:text-2xl font-medium">
Opps! An Error Occured
Opps! An Error Occurred
</h2>
) : (
<h2 className="my-4 py-2 text-slate-900 dark:text-white text-xl lg:text-2xl font-medium">
No Wallet Information Found!
</h2>
)}
<div className="xl:flex xl:space-x-7 mb-6">
<div className="field w-full mb-6 xl:mb-0">
<div className=" mb-6 gap-4 flex flex-col">
<div className="field w-full">
<InputCom
fieldClass="px-6"
label="Amount"
type="text"
fieldClass="px-4"
parentClass="flex items-center gap-1 justify-between"
labelClass="flex-[0.2] mb-0"
inputClass="flex-[0.8] max-w-[12rem]"
label="Amount:"
type="number"
name="amount"
placeholder="0"
direction="rtl"
value={props.values.amount}
inputHandler={props.handleChange}
blurHandler={(e) => {
@@ -160,7 +165,7 @@ function TransferFund({ payment, wallet }) {
// onMouseLeave={(e)=>{getSendMoneyFee(e)}}
/>
{props.errors.amount && props.touched.amount && (
<p className="text-sm text-red-500">
<p className="sm:text-sm text-[12px] text-red-500 sm:text-left text-right sm:translate-y-0 translate-y-1">
{props.errors.amount}
</p>
)}
@@ -168,25 +173,31 @@ function TransferFund({ payment, wallet }) {
<div className="field w-full">
<InputCom
fieldClass="px-6"
label="Fee"
fieldClass="px-4 transfer-field"
parentClass="flex items-center gap-1 justify-between"
labelClass="flex-[0.2] mb-0"
inputClass="flex-[0.8] transfer-field max-w-[12rem]"
label="Fee:"
type="text"
name="fee"
direction="rtl"
value={
sendMoneyFee.loading ? "loading" : sendMoneyFee.fee
}
disable={true}
/>
</div>
</div>
<div className="md:flex items-center justify-end">
<div className="field w-full lg:w-1/2 mb-6">
<div className="field w-full mb-6">
<InputCom
fieldClass="px-6"
label="Total"
fieldClass="px-4 transfer-field"
parentClass="flex items-center gap-1 justify-between"
labelClass="flex-[0.2] mb-0"
inputClass="flex-[0.8] transfer-field max-w-[12rem]"
label="Total:"
type="text"
name="total"
direction="rtl"
value={
sendMoneyFee.loading ? "loading" : sendMoneyFee.total
}
@@ -197,87 +208,85 @@ function TransferFund({ payment, wallet }) {
<div className="w-full">
<div className="relative my-3 md:flex items-center">
<div className="transfer-input w-full">
<div className="flex items-center justify-start py-2">
<label className="text-[#181c32] dark:text-white text-base font-semibold block mb-2.5">
Recipient
<span className="text-red-500 mx-2">*</span>
<span
title="Transfer Recipient"
className={`text-white text-sm bg-slate-500 w-1 h-1 rounded-full px-3 py-1 cursor-pointer`}
>
!
</span>
</label>
<Link
to="add-recipient"
className="mx-1 text-base text-white p-2 bg-[orange] rounded-md hover:opacity-80"
<div className="transfer-input w-full flex items-start gap-1 justify-between">
<label className="text-[#181c32] dark:text-white text-base font-semibold block flex-[0.2] mb-0 mt-3">
Recipient:
</label>
<div className="flex flex-col gap-3 flex-[0.8] sm:items-start items-end">
<select
className="sm:w-full w-48 text-base p-2 text-dark-gray dark:text-white rounded-md border border-slate-300 outline-0 flex-[0.8]"
value={props.values.recipientID}
name="recipientID"
onChange={props.handleChange}
onBlur={props.handleBlur}
>
Add New
</Link>
</div>
<select
className="w-full text-base p-2 text-dark-gray dark:text-white rounded-md border border-slate-300 outline-0"
value={props.values.recipientID}
name="recipientID"
onChange={props.handleChange}
onBlur={props.handleBlur}
>
{recipients.loading ? (
<option className="text-slate-500 text-lg" value="">
Loading...
</option>
) : recipients.data.length ? (
<>
{recipients.loading ? (
<option
className="text-slate-500 text-lg"
value=""
>
Select...
Loading...
</option>
{recipients.data.map((item, index) => (
) : recipients.data.length ? (
<>
<option
key={index}
value={item.recipient_id}
className="text-slate-500 text-lg"
value=""
>
{item.recipient}
Select...
</option>
))}
</>
) : recipients.error ? (
<option className="text-slate-500 text-lg" value="">
Could'nt Load, try again!
</option>
) : (
<option className="text-slate-500 text-lg" value="">
No Recipient Found! Click Add to Add
</option>
)}
</select>
{recipients.data.map((item, index) => (
<option
key={index}
value={item.recipient_id}
className="text-slate-500 text-lg"
>
{item.recipient}
</option>
))}
</>
) : recipients.error ? (
<option
className="text-slate-500 text-lg"
value=""
>
Could'nt load, try again!
</option>
) : (
<option
className="text-slate-500 text-lg"
value=""
>
No Recipient Found!
</option>
)}
</select>
<div className="flex justify-end relative w-full">
{props.errors.recipientID &&
props.touched.recipientID && (
<p className="sm:text-sm text-[12px] text-red-500 absolute sm:top-1 -top-20 sm:left-0 left-[160px]">
{props.errors.recipientID}
</p>
)}
<Link
to="add-recipient"
className="mx-1 text-base text-white p-2 bg-[orange] rounded-md hover:opacity-80 max-w-[5rem]"
>
Add New
</Link>
</div>
</div>
</div>
</div>
{props.errors.recipientID && props.touched.recipientID && (
<p className="text-sm text-red-500">
{props.errors.recipientID}
</p>
)}
</div>
<div className="field w-full mb-6">
{/* <InputCom fieldClass="px-6"
label="Comment"
type="text"
name="comment"
value={inputs.comment}
inputHandler={handleChange}
/> */}
<label className="text-[#181c32] dark:text-white text-base font-semibold block mb-2.5">
Comment
<div className="field w-full mb-6 flex gap-1 justify-between">
<label className="text-[#181c32] dark:text-white text-base font-semibold flex flex-[0.2] mt-2.5">
Comment:
</label>
<textarea
style={{ resize: "none" }}
className="text-base px-6 text-dark-gray dark:text-white w-full bg-slate-100 dark:bg-[#11131F] focus:ring-0 focus:outline-none"
className="text-base px-4 py-2 rounded-md min-h-[100px] sm:max-w-[550px] max-w-[250px] text-dark-gray dark:text-white w-full bg-slate-100 dark:bg-[#11131F] focus:ring-0 focus:outline-none flex-[0.8]"
name="comment"
value={props.values.comment}
onChange={props.handleChange}
+183 -169
View File
@@ -1,4 +1,4 @@
import {Link} from 'react-router-dom'
import { Link, useLocation, useNavigate } from "react-router-dom";
import Icons from "../Helpers/Icons";
import bank1 from "../../assets/images/bank-1.png";
import bank2 from "../../assets/images/bank-2.png";
@@ -8,180 +8,194 @@ import Accordion from "../Helpers/Accordion";
export default function WalletHeader(props) {
// debugger;
//props.myWalletList.result_list
return (
<>
<div
className="lg:flex hidden user-balance cursor-pointer lg:w-[152px] w-[150px] h-[48px] items-center rounded-full relative bg-purple pr-1.5 pl-4">
<div
onClick={() => props.handlerBalance()}
className="flex items-center lg:justify-between justify-center w-full h-full"
>
<span className="lg:block hidden">
<Icons name="wallet"/>
</span>
<p className="lg:text-xl text-lg font-bold text-white">
Wallet
</p>
<span className="lg:block hidden">
<Icons name="deep-plus"/>
</span>
</div>
<div
className={`balance-dropdown w-96 z-30 bg-white dark:bg-dark-white absolute -left-24 rounded-lg cursor-pointer ${
props.balanceDropdown ? "active" : ""
}`}
>
<div className="heading border-b dark:border-[#5356fb29] border-light-purple px-7 py-6">
<h3 className="text-xl font-bold text-dark-gray dark:text-white">
Wallet
</h3>
//props.myWalletList.result_list
let { pathname } = useLocation();
let navigate = useNavigate();
return (
<>
<div className="lg:flex hidden user-balance cursor-pointer lg:w-[152px] w-[150px] h-[48px] items-center rounded-full relative bg-purple pr-1.5 pl-4">
<div
onClick={() => props.handlerBalance()}
className="flex items-center lg:justify-between justify-center w-full h-full"
>
<span className="lg:block hidden">
<Icons name="wallet" />
</span>
<p className="lg:text-xl text-lg font-bold text-white">Wallet</p>
<span className="lg:block hidden">
<Icons name="deep-plus" />
</span>
</div>
<div
className={`balance-dropdown w-96 z-30 bg-white dark:bg-dark-white absolute -left-24 rounded-lg cursor-pointer ${
props.balanceDropdown ? "active" : ""
}`}
>
<div className="heading border-b dark:border-[#5356fb29] border-light-purple px-7 py-6">
<h3 className="text-xl font-bold text-dark-gray dark:text-white">
Wallet
</h3>
</div>
<div className="content px-7 pb-7">
<ul>
{props.myWalletList &&
props.myWalletList?.result_list?.length > 0 &&
props.myWalletList.result_list.map((value, index) => (
<li
key={index}
className="content-item py-4 border-b dark:border-[#5356fb29] border-light-purple hover:border-purple dark:hover:border-purple"
>
<div className="sm:flex justify-between items-center">
<div className="account-name flex space-x-4 items-center mb-2 sm:mb-0">
<div className="icon w-14 h-14 transition duration-300 ease-in-out rounded-full flex justify-center items-center bg-light-purple dark:bg-dark-light-purple ">
<img src={bank1} alt="" />
</div>
<div className="name">
<p className="text-base text-dark-gray dark:text-white font-medium">
{value.description}
</p>
</div>
</div>
<div>
<p className="eth text-xl font-bold text-purple">
{(value.amount * 0.01).toFixed(2)} {value.code}
</p>
<p className="usd text-base text-thin-light-gray text-right">
{/*(773.69 USD)*/}
</p>
</div>
</div>
<div className="content px-7 pb-7">
<ul>
</li>
))}
{props.myWalletList &&
props.myWalletList?.result_list?.length > 0 &&
props.myWalletList.result_list.map((value, index) => (
<li key={index} className="content-item py-4 border-b dark:border-[#5356fb29] border-light-purple hover:border-purple dark:hover:border-purple">
<div className="sm:flex justify-between items-center">
<div className="account-name flex space-x-4 items-center mb-2 sm:mb-0">
<div
className="icon w-14 h-14 transition duration-300 ease-in-out rounded-full flex justify-center items-center bg-light-purple dark:bg-dark-light-purple ">
<img src={bank1} alt=""/>
</div>
<div className="name">
<p className="text-base text-dark-gray dark:text-white font-medium">
{value.description}
</p>
</div>
</div>
<div>
<p className="eth text-xl font-bold text-purple">
{(value.amount*0.01).toFixed(2)} {value.code}
</p>
<p className="usd text-base text-thin-light-gray text-right">
{/*(773.69 USD)*/}
</p>
</div>
</div>
</li>
))}
{/*<li className="content-item py-4 border-b dark:border-[#5356fb29] border-light-purple hover:border-purple dark:hover:border-purple">*/}
{/* <div className="sm:flex justify-between items-center">*/}
{/* <div className="account-name flex space-x-4 items-center mb-2 sm:mb-0">*/}
{/* <div*/}
{/* className="icon w-14 h-14 transition duration-300 ease-in-out rounded-full flex justify-center items-center bg-light-purple dark:bg-dark-light-purple ">*/}
{/* <img src={bank1} alt=""/>*/}
{/* </div>*/}
{/* <div className="name">*/}
{/* <p className="text-base text-dark-gray dark:text-white font-medium">*/}
{/* MetaMask*/}
{/* </p>*/}
{/* </div>*/}
{/* </div>*/}
{/* <div>*/}
{/* <p className="eth text-xl font-bold text-purple">*/}
{/* 75,320 ETH*/}
{/* </p>*/}
{/* <p className="usd text-base text-thin-light-gray text-right">*/}
{/* (773.69 USD)*/}
{/* </p>*/}
{/* </div>*/}
{/* </div>*/}
{/*</li>*/}
{/*<li className="content-item py-4 border-b dark:border-[#5356fb29] border-light-purple hover:border-purple dark:hover:border-purple">*/}
{/* <div className="sm:flex justify-between items-center">*/}
{/* <div className="account-name flex space-x-4 items-center mb-2 sm:mb-0">*/}
{/* <div*/}
{/* className="icon w-14 h-14 transition duration-300 ease-in-out rounded-full flex justify-center items-center bg-light-purple dark:bg-dark-light-purple ">*/}
{/* <img src={bank2} alt=""/>*/}
{/* </div>*/}
{/* <div className="name">*/}
{/* <p className="text-base text-dark-gray dark:text-white font-medium">*/}
{/* Coinbase Wallet*/}
{/* </p>*/}
{/* </div>*/}
{/* </div>*/}
{/* <div>*/}
{/* <p className="eth text-xl font-bold text-purple">*/}
{/* 56,124 ETH*/}
{/* </p>*/}
{/* <p className="usd text-base text-thin-light-gray text-right">*/}
{/* (773.69 USD)*/}
{/* </p>*/}
{/* </div>*/}
{/* </div>*/}
{/*</li>*/}
{/*<li className="content-item py-4 border-b dark:border-[#5356fb29] border-light-purple hover:border-purple dark:hover:border-purple">*/}
{/* <div className="sm:flex justify-between items-center">*/}
{/* <div className="account-name flex space-x-4 items-center mb-2 sm:mb-0">*/}
{/* <div*/}
{/* className="icon w-14 h-14 transition duration-300 ease-in-out rounded-full flex justify-center items-center bg-light-purple dark:bg-dark-light-purple ">*/}
{/* <img src={bank3} alt=""/>*/}
{/* </div>*/}
{/* <div className="name">*/}
{/* <p className="text-base text-dark-gray dark:text-white font-medium">*/}
{/* Bitski*/}
{/* </p>*/}
{/* </div>*/}
{/* </div>*/}
{/* <div>*/}
{/* <p className="eth text-xl font-bold text-purple">*/}
{/* 99,123 ETH*/}
{/* </p>*/}
{/* <p className="usd text-base text-thin-light-gray text-right">*/}
{/* (773.69 USD)*/}
{/* </p>*/}
{/* </div>*/}
{/* </div>*/}
{/*</li>*/}
{/*<li className="content-item py-5">*/}
{/* <div className="sm:flex justify-between items-center">*/}
{/* <div className="account-name flex space-x-4 items-center mb-2 sm:mb-0">*/}
{/* <div*/}
{/* className="icon w-14 h-14 transition duration-300 ease-in-out rounded-full flex justify-center items-center bg-light-purple dark:bg-dark-light-purple ">*/}
{/* <img src={bank4} alt=""/>*/}
{/* </div>*/}
{/* <div className="name">*/}
{/* <p className="text-base text-dark-gray dark:text-white font-medium">*/}
{/* WalletConnect*/}
{/* </p>*/}
{/* </div>*/}
{/* </div>*/}
{/* <div>*/}
{/* <p className="eth text-xl font-bold text-purple">*/}
{/* 43,728 ETH*/}
{/* </p>*/}
{/* <p className="usd text-base text-thin-light-gray text-right">*/}
{/* (773.69 USD)*/}
{/* </p>*/}
{/* </div>*/}
{/* </div>*/}
{/*</li>*/}
</ul>
<div className="add-money-btn flex justify-center items-center mt-3">
{/* <button
onClick={() => props.addMoneyHandler()}
{/*<li className="content-item py-4 border-b dark:border-[#5356fb29] border-light-purple hover:border-purple dark:hover:border-purple">*/}
{/* <div className="sm:flex justify-between items-center">*/}
{/* <div className="account-name flex space-x-4 items-center mb-2 sm:mb-0">*/}
{/* <div*/}
{/* className="icon w-14 h-14 transition duration-300 ease-in-out rounded-full flex justify-center items-center bg-light-purple dark:bg-dark-light-purple ">*/}
{/* <img src={bank1} alt=""/>*/}
{/* </div>*/}
{/* <div className="name">*/}
{/* <p className="text-base text-dark-gray dark:text-white font-medium">*/}
{/* MetaMask*/}
{/* </p>*/}
{/* </div>*/}
{/* </div>*/}
{/* <div>*/}
{/* <p className="eth text-xl font-bold text-purple">*/}
{/* 75,320 ETH*/}
{/* </p>*/}
{/* <p className="usd text-base text-thin-light-gray text-right">*/}
{/* (773.69 USD)*/}
{/* </p>*/}
{/* </div>*/}
{/* </div>*/}
{/*</li>*/}
{/*<li className="content-item py-4 border-b dark:border-[#5356fb29] border-light-purple hover:border-purple dark:hover:border-purple">*/}
{/* <div className="sm:flex justify-between items-center">*/}
{/* <div className="account-name flex space-x-4 items-center mb-2 sm:mb-0">*/}
{/* <div*/}
{/* className="icon w-14 h-14 transition duration-300 ease-in-out rounded-full flex justify-center items-center bg-light-purple dark:bg-dark-light-purple ">*/}
{/* <img src={bank2} alt=""/>*/}
{/* </div>*/}
{/* <div className="name">*/}
{/* <p className="text-base text-dark-gray dark:text-white font-medium">*/}
{/* Coinbase Wallet*/}
{/* </p>*/}
{/* </div>*/}
{/* </div>*/}
{/* <div>*/}
{/* <p className="eth text-xl font-bold text-purple">*/}
{/* 56,124 ETH*/}
{/* </p>*/}
{/* <p className="usd text-base text-thin-light-gray text-right">*/}
{/* (773.69 USD)*/}
{/* </p>*/}
{/* </div>*/}
{/* </div>*/}
{/*</li>*/}
{/*<li className="content-item py-4 border-b dark:border-[#5356fb29] border-light-purple hover:border-purple dark:hover:border-purple">*/}
{/* <div className="sm:flex justify-between items-center">*/}
{/* <div className="account-name flex space-x-4 items-center mb-2 sm:mb-0">*/}
{/* <div*/}
{/* className="icon w-14 h-14 transition duration-300 ease-in-out rounded-full flex justify-center items-center bg-light-purple dark:bg-dark-light-purple ">*/}
{/* <img src={bank3} alt=""/>*/}
{/* </div>*/}
{/* <div className="name">*/}
{/* <p className="text-base text-dark-gray dark:text-white font-medium">*/}
{/* Bitski*/}
{/* </p>*/}
{/* </div>*/}
{/* </div>*/}
{/* <div>*/}
{/* <p className="eth text-xl font-bold text-purple">*/}
{/* 99,123 ETH*/}
{/* </p>*/}
{/* <p className="usd text-base text-thin-light-gray text-right">*/}
{/* (773.69 USD)*/}
{/* </p>*/}
{/* </div>*/}
{/* </div>*/}
{/*</li>*/}
{/*<li className="content-item py-5">*/}
{/* <div className="sm:flex justify-between items-center">*/}
{/* <div className="account-name flex space-x-4 items-center mb-2 sm:mb-0">*/}
{/* <div*/}
{/* className="icon w-14 h-14 transition duration-300 ease-in-out rounded-full flex justify-center items-center bg-light-purple dark:bg-dark-light-purple ">*/}
{/* <img src={bank4} alt=""/>*/}
{/* </div>*/}
{/* <div className="name">*/}
{/* <p className="text-base text-dark-gray dark:text-white font-medium">*/}
{/* WalletConnect*/}
{/* </p>*/}
{/* </div>*/}
{/* </div>*/}
{/* <div>*/}
{/* <p className="eth text-xl font-bold text-purple">*/}
{/* 43,728 ETH*/}
{/* </p>*/}
{/* <p className="usd text-base text-thin-light-gray text-right">*/}
{/* (773.69 USD)*/}
{/* </p>*/}
{/* </div>*/}
{/* </div>*/}
{/*</li>*/}
</ul>
<div className="add-money-btn flex justify-center items-center mt-3">
{/* <button
onClick={() => {
if(pathname == '/my-wallet') props.setBalanceDropdown.toggle()
else navigate('/my-wallet', {replace: true})
}}
type="button"
className="w-[122px] h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
>
Manage
</button> */}
<Link to='/my-wallet' className="w-[122px] h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white">Manage</Link>
</div>
</div>
</div>
<Link
to="/my-wallet"
onClick={() => {
if (pathname == "/my-wallet")
props.setBalanceDropdown.toggle();
else navigate("/my-wallet", { replace: true });
}}
className="w-[122px] h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
>
Manage
</Link>
</div>
{/*<div*/}
{/* className="lg:hidden flex user-balance cursor-pointer lg:w-[252px] w-[150px] h-[48px] items-center rounded-full relative bg-purple">*/}
{/* <div className="flex items-center lg:justify-between justify-center w-full h-full">*/}
{/* <p className="lg:text-xl text-lg font-bold text-white">*/}
{/* $ 234,435.34*/}
{/* </p>*/}
{/* </div>*/}
{/*</div>*/}
<div className="lg:hidden block"></div>
</>);
</div>
</div>
</div>
{/*<div*/}
{/* className="lg:hidden flex user-balance cursor-pointer lg:w-[252px] w-[150px] h-[48px] items-center rounded-full relative bg-purple">*/}
{/* <div className="flex items-center lg:justify-between justify-center w-full h-full">*/}
{/* <p className="lg:text-xl text-lg font-bold text-white">*/}
{/* $ 234,435.34*/}
{/* </p>*/}
{/* </div>*/}
{/*</div>*/}
<div className="lg:hidden block"></div>
</>
);
}
+12 -2
View File
@@ -1,5 +1,5 @@
import React, { useContext,useState, useEffect } from "react";
import { Link } from "react-router-dom";
import { Link, useLocation } from "react-router-dom";
import bank1 from "../../assets/images/bank-1.png";
import bank2 from "../../assets/images/bank-2.png";
import bank3 from "../../assets/images/bank-3.png";
@@ -91,6 +91,15 @@ export default function Header({ logoutModalHandler, sidebarHandler }) {
setToggleNotification.toggle()
}
// getting the location of head
let {pathname} = useLocation()
const handleWalletBtn = () => {
if (pathname === "/my-wallet"){
setbalanceValue.set(false)
} else return balanceDropdown
}
// User Profile
let {firstname, lastname, email, profile_pic} = userDetails
let userEmail = email.split('@')[0]
@@ -234,7 +243,8 @@ export default function Header({ logoutModalHandler, sidebarHandler }) {
myWalletList={myWalletList}
handlerBalance={handlerBalance}
balanceDropdown={balanceDropdown}
addMoneyHandler={addMoneyHandler} />
addMoneyHandler={addMoneyHandler}
setBalanceDropdown = {setbalanceValue} />
{/* notification */}
<div className="user-notification lg:block hidden relative">
<div
+37 -39
View File
@@ -12,7 +12,7 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler }) {
let { jobLists } = useSelector((state) => state.jobLists);
const marketData = jobLists?.result_list;
let noOfJobs = marketData?.length;
let noOfJobs = marketData?.length <= 0 ? "0" : marketData?.length;
return (
<div className="w-full h-full">
@@ -163,19 +163,20 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler }) {
</div>
</div>
{!userDetails.post_jobs ?
{!userDetails.post_jobs ? (
<div className="setting-item">
<div className="top-platform bg-pink dark:bg-dark-white rounded-2xl p-16 2xl:w-[180px] w-full 2xl:mb-10 2xl:border-none border ">
<NavLink to="/start-job" className="nav-item flex items-center justify-start space-x-3.5">
<span className="item-content relative group-hover:text-purple text-xl transition-all duration-300 ease-in-out text-lighter-gray font-medium active flex-1">
Enable Job Post
</span>
</NavLink>
<div className="top-platform bg-pink dark:bg-dark-white rounded-2xl p-16 2xl:w-[180px] w-full 2xl:mb-10 2xl:border-none border ">
<NavLink
to="/start-job"
className="nav-item flex items-center justify-start space-x-3.5"
>
<span className="item-content relative group-hover:text-purple text-xl transition-all duration-300 ease-in-out text-lighter-gray font-medium active flex-1">
Enable Job Post
</span>
</NavLink>
</div>
</div>
</div>
:
jobLists?.result_list?.length ?
(
) : jobLists?.result_list?.length ? (
<div className="setting-item">
<div className="heading mb-5">
<h1 className="title text-xl font-bold text-purple">My Jobs</h1>
@@ -224,33 +225,30 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler }) {
</ul>
</div>
</div>
)
:
(
<div className="setting-item">
<div className="heading mb-5">
<h1 className="title text-xl font-bold text-purple">My Jobs</h1>
</div>
<div className="items">
<ul className="flex flex-col space-y-6">
<li className="item group">
<NavLink
to="/add-job"
className="nav-item flex items-center justify-start space-x-3.5"
>
<span className="item-icon group-hover:bg-purple group-hover:text-white w-8 h-8 flex justify-center items-center transition-all duration-300 ease-in-out bg-light-purple dark:bg-dark-light-purple rounded-full text-dark-gray dark:text-white">
<Icons name="people-two" />
</span>
<span className="item-content group-hover:text-purple text-[18px] transition-all duration-300 ease-in-out text-lighter-gray relative font-medium active flex-1">
My Jobs
</span>
</NavLink>
</li>
</ul>
</div>
) : (
<div className="setting-item">
<div className="heading mb-5">
<h1 className="title text-xl font-bold text-purple">My Jobs</h1>
</div>
)
}
<div className="items">
<ul className="flex flex-col space-y-6">
<li className="item group">
<NavLink
to="/add-job"
className="nav-item flex items-center justify-start space-x-3.5"
>
<span className="item-icon group-hover:bg-purple group-hover:text-white w-8 h-8 flex justify-center items-center transition-all duration-300 ease-in-out bg-light-purple dark:bg-dark-light-purple rounded-full text-dark-gray dark:text-white">
<Icons name="people-two" />
</span>
<span className="item-content group-hover:text-purple text-[18px] transition-all duration-300 ease-in-out text-lighter-gray relative font-medium active flex-1">
My Jobs
</span>
</NavLink>
</li>
</ul>
</div>
</div>
)}
</div>
{/* signout area */}
{sidebar ? (
@@ -345,4 +343,4 @@ const ListItem = ({ sidebar, route, title, bubble }) => {
</NavLink>
</li>
);
};
};
+150 -154
View File
@@ -13,7 +13,7 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) {
let { jobLists } = useSelector((state) => state.jobLists);
const marketData = jobLists?.result_list;
let noOfJobs = marketData?.length;
let noOfJobs = marketData?.length <= 0 ? "0" : marketData?.length;
useEffect(() => {
const title = document.querySelectorAll(".menu-setting-items .heading");
@@ -233,168 +233,164 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) {
<div className="setting-item">
<div className="heading mb-5 bg-dark-blue rounded-2xl p-2 2xl:w-[180px] w-full 2xl:mb-10 2xl:border-none border">
<NavLink to="/acc-family">
<h1 className="title text-xl font-bold text-purple">Family Corner</h1>
<h1 className="title text-xl font-bold text-purple">
Family Corner
</h1>
</NavLink>
</div>
</div>
{!userDetails.post_jobs ?
<div className="setting-item">
<div className="top-platform bg-pink dark:bg-dark-white rounded-2xl p-16 2xl:w-[180px] w-full 2xl:mb-10 2xl:border-none border ">
<NavLink to="/start-job">
<span className="item-content relative group-hover:text-purple text-[18px] transition-all duration-300 ease-in-out text-lighter-gray font-medium active flex-1">
Enable Job Post
</span>
</NavLink>
{!userDetails.post_jobs ? (
<div className="setting-item">
<div className="top-platform bg-pink dark:bg-dark-white rounded-2xl p-16 2xl:w-[180px] w-full 2xl:mb-10 2xl:border-none border ">
<NavLink to="/start-job">
<span className="item-content relative group-hover:text-purple text-[18px] transition-all duration-300 ease-in-out text-lighter-gray font-medium active flex-1">
Enable Job Post
</span>
</NavLink>
</div>
</div>
</div>
:
jobLists?.result_list?.length ?
(
<div className="setting-item">
<div className="heading mb-5">
<h1 className="title text-xl font-bold text-purple">My Jobs</h1>
</div>
<div className="items">
<ul className="flex flex-col space-y-6">
<li className="item group">
<NavLink
to="/myjobs"
className={`nav-item flex items-center ${
((navData) => (navData.isActive ? "active" : ""),
sidebar ? "justify-start space-x-3.5" : "justify-center")
}`}
>
<span className="item-icon group-hover:bg-purple group-hover:text-white w-8 h-8 flex justify-center items-center transition-all duration-300 ease-in-out bg-light-purple dark:bg-dark-light-purple rounded-full text-dark-gray dark:text-white dark:text-lighter-gray">
<Icons name="people-two" />
</span>
<span
className={`item-content group-hover:text-purple text-[18px] transition-all duration-300 ease-in-out text-lighter-gray relative font-medium ${
sidebar ? "active flex-1" : "w-0"
}`}
>
List
</span>
</NavLink>
</li>
<li className="item group">
<NavLink
to="/my-active-jobs"
className={`nav-item flex items-center ${
((navData) => (navData.isActive ? "active" : ""),
sidebar ? "justify-start space-x-3.5" : "justify-center")
}`}
>
<span className="item-icon group-hover:bg-purple group-hover:text-white w-8 h-8 flex justify-center items-center transition-all duration-300 ease-in-out bg-light-purple dark:bg-dark-light-purple rounded-full text-dark-gray dark:text-white dark:text-lighter-gray">
<Icons name="people-two" />
</span>
<span
className={`item-content group-hover:text-purple text-[18px] transition-all duration-300 ease-in-out text-lighter-gray relative font-medium ${
sidebar ? "active flex-1" : "w-0"
}`}
>
Pending
</span>
</NavLink>
</li>
<li className="item group">
<NavLink
to="/my-active-jobs"
className={`nav-item flex items-center ${
((navData) => (navData.isActive ? "active" : ""),
sidebar ? "justify-start space-x-3.5" : "justify-center")
}`}
>
<span className="item-icon group-hover:bg-purple group-hover:text-white w-8 h-8 flex justify-center items-center transition-all duration-300 ease-in-out bg-light-purple dark:bg-dark-light-purple rounded-full text-dark-gray dark:text-white dark:text-lighter-gray">
<Icons name="people-two" />
</span>
<span
className={`item-content group-hover:text-purple text-[18px] transition-all duration-300 ease-in-out text-lighter-gray relative font-medium ${
sidebar ? "active flex-1" : "w-0"
}`}
>
Active
</span>
</NavLink>
</li>
{/*<li className="item group">*/}
{/* <NavLink*/}
{/* to="/profile"*/}
{/* className={`nav-item flex items-center ${*/}
{/* ((navData) => (navData.isActive ? "active" : ""),*/}
{/* sidebar ? "justify-start space-x-3.5" : "justify-center")*/}
{/* }`}*/}
{/* >*/}
{/* <span className="item-icon group-hover:bg-purple group-hover:text-white w-8 h-8 flex justify-center items-center transition-all duration-300 ease-in-out bg-light-purple dark:bg-dark-light-purple rounded-full text-dark-gray dark:text-white dark:text-lighter-gray">*/}
{/* <Icons name="people-two" />*/}
{/* </span>*/}
{/* <span*/}
{/* className={`item-content group-hover:text-purple text-[18px] transition-all duration-300 ease-in-out text-lighter-gray relative font-medium ${*/}
{/* sidebar ? "active flex-1" : "w-0"*/}
{/* }`}*/}
{/* >*/}
{/* My Profile*/}
{/* </span>*/}
{/* </NavLink>*/}
{/*</li>*/}
{/*<li className="item group">*/}
{/* <NavLink*/}
{/* to="/settings"*/}
{/* className={`nav-item flex items-center ${*/}
{/* ((navData) => (navData.isActive ? "active" : ""),*/}
{/* sidebar ? "justify-start space-x-3.5" : "justify-center")*/}
{/* }`}*/}
{/* >*/}
{/* <span className="item-icon group-hover:bg-purple group-hover:text-white w-8 h-8 flex justify-center items-center transition-all duration-300 ease-in-out bg-light-purple dark:bg-dark-light-purple rounded-full text-dark-gray dark:text-white dark:text-lighter-gray">*/}
{/* <Icons name="setting" />*/}
{/* </span>*/}
{/* <span*/}
{/* className={`item-content group-hover:text-purple text-[18px] transition-all duration-300 ease-in-out text-lighter-gray relative font-medium ${*/}
{/* sidebar ? "active flex-1" : "w-0"*/}
{/* }`}*/}
{/* >*/}
{/* Settings*/}
{/* </span>*/}
{/* </NavLink>*/}
{/*</li>*/}
</ul>
</div>
) : jobLists?.result_list?.length ? (
<div className="setting-item">
<div className="heading mb-5">
<h1 className="title text-xl font-bold text-purple">My Jobs</h1>
</div>
)
:
(
<div className="setting-item">
<div className="heading mb-5">
<h1 className="title text-xl font-bold text-purple">My Jobs</h1>
</div>
<div className="items">
<ul className="flex flex-col space-y-6">
<li className="item group">
<NavLink
to="/add-job"
className={`nav-item flex items-center ${
((navData) => (navData.isActive ? "active" : ""),
sidebar ? "justify-start space-x-3.5" : "justify-center")
<div className="items">
<ul className="flex flex-col space-y-6">
<li className="item group">
<NavLink
to="/myjobs"
className={`nav-item flex items-center ${
((navData) => (navData.isActive ? "active" : ""),
sidebar ? "justify-start space-x-3.5" : "justify-center")
}`}
>
<span className="item-icon group-hover:bg-purple group-hover:text-white w-8 h-8 flex justify-center items-center transition-all duration-300 ease-in-out bg-light-purple dark:bg-dark-light-purple rounded-full text-dark-gray dark:text-white dark:text-lighter-gray">
<Icons name="people-two" />
</span>
<span
className={`item-content group-hover:text-purple text-[18px] transition-all duration-300 ease-in-out text-lighter-gray relative font-medium ${
sidebar ? "active flex-1" : "w-0"
}`}
>
<span className="item-icon group-hover:bg-purple group-hover:text-white w-8 h-8 flex justify-center items-center transition-all duration-300 ease-in-out bg-light-purple dark:bg-dark-light-purple rounded-full text-dark-gray dark:text-white dark:text-lighter-gray">
<Icons name="people-two" />
</span>
<span
className={`item-content group-hover:text-purple text-[18px] transition-all duration-300 ease-in-out text-lighter-gray relative font-medium ${
sidebar ? "active flex-1" : "w-0"
}`}
>
Add Job
</span>
</NavLink>
</li>
</ul>
</div>
List
</span>
</NavLink>
</li>
<li className="item group">
<NavLink
to="/my-pending-jobs"
className={`nav-item flex items-center ${
((navData) => (navData.isActive ? "active" : ""),
sidebar ? "justify-start space-x-3.5" : "justify-center")
}`}
>
<span className="item-icon group-hover:bg-purple group-hover:text-white w-8 h-8 flex justify-center items-center transition-all duration-300 ease-in-out bg-light-purple dark:bg-dark-light-purple rounded-full text-dark-gray dark:text-white dark:text-lighter-gray">
<Icons name="people-two" />
</span>
<span
className={`item-content group-hover:text-purple text-[18px] transition-all duration-300 ease-in-out text-lighter-gray relative font-medium ${
sidebar ? "active flex-1" : "w-0"
}`}
>
Pending
</span>
</NavLink>
</li>
<li className="item group">
<NavLink
to="/my-active-jobs"
className={`nav-item flex items-center ${
((navData) => (navData.isActive ? "active" : ""),
sidebar ? "justify-start space-x-3.5" : "justify-center")
}`}
>
<span className="item-icon group-hover:bg-purple group-hover:text-white w-8 h-8 flex justify-center items-center transition-all duration-300 ease-in-out bg-light-purple dark:bg-dark-light-purple rounded-full text-dark-gray dark:text-white dark:text-lighter-gray">
<Icons name="people-two" />
</span>
<span
className={`item-content group-hover:text-purple text-[18px] transition-all duration-300 ease-in-out text-lighter-gray relative font-medium ${
sidebar ? "active flex-1" : "w-0"
}`}
>
Active
</span>
</NavLink>
</li>
{/*<li className="item group">*/}
{/* <NavLink*/}
{/* to="/profile"*/}
{/* className={`nav-item flex items-center ${*/}
{/* ((navData) => (navData.isActive ? "active" : ""),*/}
{/* sidebar ? "justify-start space-x-3.5" : "justify-center")*/}
{/* }`}*/}
{/* >*/}
{/* <span className="item-icon group-hover:bg-purple group-hover:text-white w-8 h-8 flex justify-center items-center transition-all duration-300 ease-in-out bg-light-purple dark:bg-dark-light-purple rounded-full text-dark-gray dark:text-white dark:text-lighter-gray">*/}
{/* <Icons name="people-two" />*/}
{/* </span>*/}
{/* <span*/}
{/* className={`item-content group-hover:text-purple text-[18px] transition-all duration-300 ease-in-out text-lighter-gray relative font-medium ${*/}
{/* sidebar ? "active flex-1" : "w-0"*/}
{/* }`}*/}
{/* >*/}
{/* My Profile*/}
{/* </span>*/}
{/* </NavLink>*/}
{/*</li>*/}
{/*<li className="item group">*/}
{/* <NavLink*/}
{/* to="/settings"*/}
{/* className={`nav-item flex items-center ${*/}
{/* ((navData) => (navData.isActive ? "active" : ""),*/}
{/* sidebar ? "justify-start space-x-3.5" : "justify-center")*/}
{/* }`}*/}
{/* >*/}
{/* <span className="item-icon group-hover:bg-purple group-hover:text-white w-8 h-8 flex justify-center items-center transition-all duration-300 ease-in-out bg-light-purple dark:bg-dark-light-purple rounded-full text-dark-gray dark:text-white dark:text-lighter-gray">*/}
{/* <Icons name="setting" />*/}
{/* </span>*/}
{/* <span*/}
{/* className={`item-content group-hover:text-purple text-[18px] transition-all duration-300 ease-in-out text-lighter-gray relative font-medium ${*/}
{/* sidebar ? "active flex-1" : "w-0"*/}
{/* }`}*/}
{/* >*/}
{/* Settings*/}
{/* </span>*/}
{/* </NavLink>*/}
{/*</li>*/}
</ul>
</div>
)
}
</div>
) : (
<div className="setting-item">
<div className="heading mb-5">
<h1 className="title text-xl font-bold text-purple">My Jobs</h1>
</div>
<div className="items">
<ul className="flex flex-col space-y-6">
<li className="item group">
<NavLink
to="/add-job"
className={`nav-item flex items-center ${
((navData) => (navData.isActive ? "active" : ""),
sidebar ? "justify-start space-x-3.5" : "justify-center")
}`}
>
<span className="item-icon group-hover:bg-purple group-hover:text-white w-8 h-8 flex justify-center items-center transition-all duration-300 ease-in-out bg-light-purple dark:bg-dark-light-purple rounded-full text-dark-gray dark:text-white dark:text-lighter-gray">
<Icons name="people-two" />
</span>
<span
className={`item-content group-hover:text-purple text-[18px] transition-all duration-300 ease-in-out text-lighter-gray relative font-medium ${
sidebar ? "active flex-1" : "w-0"
}`}
>
Add Job
</span>
</NavLink>
</li>
</ul>
</div>
</div>
)}
</div>
{/* signout area */}
{sidebar ? (
@@ -0,0 +1,149 @@
import React, { useState } from 'react'
import ModalCom from '../Helpers/ModalCom'
import { useNavigate } from 'react-router-dom'
import usersService from '../../services/UsersService'
import LoadingSpinner from '../Spinners/LoadingSpinner'
function DeleteJobPopout({details, onClose, situation}) {
const navigate = useNavigate()
const ApiCall = new usersService()
let [requestStatus, setRequestStatus] = useState({laoding: false, status:false, message: ''}) // STATE FOR KNOWING WHEN A REQUEST IS MADE TO THE SERVER
// FUNCTION CALLED ONCE USER CONFIRM DELETE JOB
const deleteJob = (details) => {
setRequestStatus({laoding: true, status:false, message: ''})
let reqData = {
job_id: details.job_id,
job_uid: details.job_uid
} // DATA NEEDED BY THE API
// API CALL TO DELETE A JOB
ApiCall.deleteJob(reqData).then(res => {
if(res.data.internal_return < 0){
setRequestStatus({laoding: false, status:false, message: 'Could not perform the request, try again!'})
return
}
setRequestStatus({laoding: false, status:true, message: 'Job deleted successfully'})
setTimeout(()=>{
navigate('/myjobs', {replace: true})
onClose()
window.location.reload()
}, 1000)
}).catch(error => {
setRequestStatus({laoding: false, status:false, message: 'Opps! something went wrong, try again'})
}).finally(()=>{
setTimeout(()=>{
setRequestStatus({laoding: false, status:false, message: ''})
}, 5000)
})
}
return (
<ModalCom action={onClose} situation={situation}>
<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-header w-full flex items-center justify-between lg:px-10 lg:py-8 px-[30px] py-[23px] border-b border-light-purple dark:border-[#5356fb29] ">
<h1 className="text-26 font-bold text-dark-gray dark:text-white tracking-wide">
Delete Job
</h1>
<button
type="button"
className="text-[#374557] dark:text-red-500"
onClick={onClose}
>
<svg
width="36"
height="36"
viewBox="0 0 36 36"
fill="none"
className="fill-current"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M36 16.16C36 17.4399 36 18.7199 36 20.0001C35.7911 20.0709 35.8636 20.2554 35.8385 20.4001C34.5321 27.9453 30.246 32.9248 22.9603 35.2822C21.9006 35.6251 20.7753 35.7657 19.6802 35.9997C18.4003 35.9997 17.1204 35.9997 15.8401 35.9997C15.5896 35.7086 15.2189 35.7732 14.9034 35.7093C7.77231 34.2621 3.08728 30.0725 0.769671 23.187C0.435002 22.1926 0.445997 21.1199 0 20.1599C0 18.7198 0 17.2798 0 15.8398C0.291376 15.6195 0.214408 15.2656 0.270759 14.9808C1.71321 7.69774 6.02611 2.99691 13.0428 0.700951C14.0118 0.383805 15.0509 0.386897 15.9999 0C17.2265 0 18.4532 0 19.6799 0C19.7156 0.124041 19.8125 0.136067 19.9225 0.146719C27.3 0.868973 33.5322 6.21922 35.3801 13.427C35.6121 14.3313 35.7945 15.2484 36 16.16ZM33.011 18.0787C33.0433 9.77105 26.3423 3.00309 18.077 2.9945C9.78479 2.98626 3.00344 9.658 2.98523 17.8426C2.96667 26.1633 9.58859 32.9601 17.7602 33.0079C26.197 33.0577 32.9787 26.4186 33.011 18.0787Z"
fill=""
fillOpacity="0.6"
/>
<path
d="M15.9309 18.023C13.9329 16.037 12.007 14.1207 10.0787 12.2072C9.60071 11.733 9.26398 11.2162 9.51996 10.506C9.945 9.32677 11.1954 9.0811 12.1437 10.0174C13.9067 11.7585 15.6766 13.494 17.385 15.2879C17.9108 15.8401 18.1633 15.7487 18.6375 15.258C20.3586 13.4761 22.1199 11.7327 23.8822 9.99096C24.8175 9.06632 26.1095 9.33639 26.4967 10.517C26.7286 11.2241 26.3919 11.7413 25.9133 12.2178C24.1757 13.9472 22.4477 15.6855 20.7104 17.4148C20.5228 17.6018 20.2964 17.7495 20.0466 17.9485C22.0831 19.974 24.0372 21.8992 25.9689 23.8468C26.9262 24.8119 26.6489 26.1101 25.4336 26.4987C24.712 26.7292 24.2131 26.3441 23.7455 25.8757C21.9945 24.1227 20.2232 22.3892 18.5045 20.6049C18.0698 20.1534 17.8716 20.2269 17.4802 20.6282C15.732 22.4215 13.9493 24.1807 12.1777 25.951C11.7022 26.4262 11.193 26.7471 10.4738 26.4537C9.31345 25.9798 9.06881 24.8398 9.98589 23.8952C11.285 22.5576 12.6138 21.2484 13.9387 19.9355C14.5792 19.3005 15.2399 18.6852 15.9309 18.023Z"
fill="#"
fillOpacity="0.6"
/>
</svg>
</button>
</div>
<div className="logout-modal-body w-full flex flex-col items-center px-10 py-8">
<div className="what-icon mb-6 cursor-pointer">
<svg
width="136"
height="136"
viewBox="0 0 136 136"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<circle cx="68" cy="68" r="68" fill="#5356FB" />
<path
d="M69.8844 35.7891C71.1588 36.0357 72.4569 36.1967 73.7044 36.5423C81.5447 38.7098 87.2705 45.5378 87.9574 53.6156C88.5113 60.1147 86.3075 65.6006 81.5043 70.0195C79.8359 71.5545 78.0497 72.9604 76.3408 74.4534C76.127 74.6397 75.9654 75.0037 75.9604 75.2872C75.9284 77.2752 75.9435 79.2649 75.9435 81.2965C70.8895 81.2965 65.8758 81.2965 60.7915 81.2965C60.7915 81.0616 60.7915 80.8385 60.7915 80.6137C60.7915 76.5454 60.7999 72.4772 60.7797 68.4106C60.778 67.9392 60.9312 67.649 61.2831 67.3537C64.5643 64.5957 67.8271 61.8175 71.1033 59.0545C72.2616 58.0781 72.9215 56.8702 72.9081 55.3419C72.8878 52.916 70.8608 50.9146 68.423 50.8911C65.9701 50.8693 63.9145 52.8053 63.832 55.2328C63.8084 55.8988 63.8286 56.5665 63.8286 57.2695C58.7745 57.2695 53.7744 57.2695 48.6917 57.2695C48.6917 56.3149 48.6462 55.3385 48.6984 54.3655C49.222 44.699 56.7442 36.8745 66.4331 35.8914C66.5762 35.8763 66.7142 35.8243 66.854 35.7891C67.8641 35.7891 68.8742 35.7891 69.8844 35.7891Z"
fill="white"
/>
<path
d="M67.485 100.21C66.1617 99.9268 64.9041 99.5091 63.803 98.6787C61.3804 96.8484 60.2877 93.7699 61.0386 90.7888C61.7726 87.8747 64.2138 85.6703 67.2089 85.2157C71.273 84.6 75.2024 87.3681 75.8135 91.277C76.4937 95.6153 73.8202 99.3782 69.544 100.103C69.4429 100.12 69.3487 100.172 69.2527 100.209C68.6635 100.21 68.0742 100.21 67.485 100.21Z"
fill="white"
/>
</svg>
</div>
<div className="mb-6">
<p className="text-xl tracking-wide text-dark-gray dark:text-white">
{details.title}
</p>
<p className="text-lg tracking-wide text-dark-gray dark:text-white">
Price: {details.price}
</p>
<p className="text-lg tracking-wide text-dark-gray dark:text-white">
Duration: {details.timeline_days} day(s)
</p>
</div>
<div className="flex space-x-2.5">
<button
onClick={onClose}
type="button"
className=" border-gradient text-18 tracking-wide px-4 py-3 rounded-full"
>
<span className="text-gradient">Cancel</span>
</button>
{requestStatus.laoding ?
<LoadingSpinner size='8' color='sky-blue' />
:
<button
onClick={() => deleteJob(details)}
type="button"
className="text-white primary-gradient text-18 tracking-wide px-4 py-3 rounded-full"
>
Confirm Delete
</button>
}
</div>
{/* ERROR DISPLAY AND SUBMIT BUTTON */}
{requestStatus.message != "" && (
!requestStatus.status ?
(<div className={`relative p-4 my-4 text-[#912741] bg-[#fcd9e2] border-[#fbc6d3] mb-4 rounded-[0.475rem] text-md font-light leading-[19.5px] text-[13px]`}>
{requestStatus.message}
</div>)
:
requestStatus.status &&
(<div className={`relative p-4 my-4 text-green-700 bg-slate-200 border-slate-800 mb-4 rounded-[0.475rem] text-md font-light leading-[19.5px] text-[13px]`}>
{requestStatus.message}
</div>
)
)}
{/* End of error or success display */}
</div>
</div>
</ModalCom>
)
}
export default DeleteJobPopout
@@ -3,7 +3,7 @@ import Detail from './popoutcomponent/Detail'
import ModalCom from '../Helpers/ModalCom'
function ActiveJobsPopout({details, onClose, situation}) {
function PendingJobsPopout({details, onClose, situation}) {
return (
<ModalCom action={onClose} situation={situation}>
<div className="logout-modal-wrapper lw-[90%] md:w-[768px] h-full lg:h-auto bg-white dark:bg-dark-white lg:rounded-2xl overflow-y-auto">
@@ -66,7 +66,7 @@ function ActiveJobsPopout({details, onClose, situation}) {
<div className='my-2 md:flex'>
<Detail
label='Offer Expire'
value={`${details.expire.split(' ')[0]} ${details.expire.split(' ')[1].split('.')[0]}`}
value={details.expire && `${details.expire.split(' ')[0]} ${details.expire.split(' ')[1].split('.')[0]}`}
/>
</div>
@@ -139,4 +139,4 @@ function ActiveJobsPopout({details, onClose, situation}) {
)
}
export default ActiveJobsPopout
export default PendingJobsPopout
+12
View File
@@ -105,6 +105,11 @@ input::-webkit-inner-spin-button {
input[type="number"] {
-moz-appearance: textfield;
}
input[type="text"][dir="rtl"] {
text-align: right;
}
.default-border-bottom {
border-bottom: 1px solid #d3d2fe;
}
@@ -364,6 +369,13 @@ input[type="number"] {
margin: 0 16px;
}
.transfer-field, .transfer-field:focus, .transfer-field:focus-within{
background: #FFF !important;
border: none !important;
outline: none !important;
box-shadow: none !important;
}
/* the parent */
.trending-products .slick-list {
margin: 0 -16px;
+47 -12
View File
@@ -107,17 +107,17 @@ class usersService {
/*
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);
}
// 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"),
@@ -198,7 +198,31 @@ class usersService {
return this.postAuxEnd("/sendmoneyfee", postData);
}
// Task for the person doing the job
getMyActiveTaskList(){
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("/activetaskslist", postData);
}
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("/jobmanageractive", postData);
}
getMyPendingJobList(){
var postData = {
uuid: localStorage.getItem("uid"),
member_id: localStorage.getItem("member_id"),
@@ -209,7 +233,6 @@ class usersService {
};
return this.postAuxEnd("/jobmanageroffers", postData);
}
getMyJobList(){
var postData = {
uuid: localStorage.getItem("uid"),
@@ -438,6 +461,18 @@ class usersService {
return this.postAuxEnd("/jobmanagercreatejob", postData);
}
// END POINT TO DELETE A JOB
deleteJob(reqData) {
var postData = {
uid: localStorage.getItem("uid"),
member_id: localStorage.getItem("member_id"),
sessionid: localStorage.getItem("session_token"),
action: 13011,
...reqData
};
return this.postAuxEnd("/jobmanagerdeletejob", postData);
}
verifyEmail(code) {
const reqData = {
verify_link: code,
+10
View File
@@ -0,0 +1,10 @@
import React from 'react'
import ActiveJobs from '../components/MyActiveJobs/ActiveJobs'
function ManageActiveJobs() {
return (
<ActiveJobs />
)
}
export default ManageActiveJobs
+1 -1
View File
@@ -7,7 +7,7 @@ export default function MyActiveJobsPage() {
const [MyJobList, setMyJobList] = useState([]);
const api = new usersService();
//TARGET ENDPOINT[POST]http://10.204.5.100:9083/en/wrench/api/v1/jobmanageractive
const getMyJobList = async () => {
try {
const res = await api.getMyActiveJobList();
+30
View File
@@ -0,0 +1,30 @@
import React, { useContext,useState, useEffect } from "react";
import usersService from "../services/UsersService";
//import MyJobs from "../components/MyJobs";
import MyActiveJobs from "../components/MyActiveJobs";
import MyPendingJobs from "../components/MyPendingJobs";
export default function MyPendingJobsPage() {
const [MyJobList, setMyJobList] = useState([]);
const api = new usersService();
const getMyJobList = async () => {
try {
const res = await api.getMyPendingJobList();
setMyJobList(res.data);
} catch (error) {
console.log("Error getting mode");
}
};
useEffect(() => {
getMyJobList();
}, []);
// debugger;
return (
<>
<MyPendingJobs MyJobList={MyJobList} />
</>
);
}
+1 -1
View File
@@ -10,7 +10,7 @@ export default function MyTaskPage() {
const getMyActiveJobList = async () => {
try {
const res = await api.getMyActiveJobList();
const res = await api.getMyActiveTaskList();
setMyActiveJobList(res.data);
} catch (error) {
console.log("Error getting mode");