Compare commits

...

10 Commits

11 changed files with 318 additions and 58 deletions
+56 -11
View File
@@ -1,6 +1,8 @@
import { useState } from "react";
import { PriceFormatter } from "../Helpers/PriceFormatter";
import MarketPopUp from "../MarketPlace/PopUp/MarketPopUp";
import { useSelector } from "react-redux";
import PendingJobsPopout from "../jobPopout/PendingJobsPopout";
export default function AvailableJobsCard({
className,
@@ -11,8 +13,15 @@ export default function AvailableJobsCard({
}) {
//debugger;
const [marketPopUp, setMarketPopUp] = useState({ show: false, data: {} });
const [jobPopout, setJobPopout] = useState({ show: false, data: {} });
const [imageUrl, setImageUrl] = useState("");
const {
userDetails: { uid },
} = useSelector((state) => state?.userDetails); // GETS USER DETAILS
let thePrice = PriceFormatter(
datas?.price * 0.01,
datas?.currency_code,
@@ -40,7 +49,7 @@ export default function AvailableJobsCard({
>
<div
onClick={() => {
setMarketPopUp({ show: true, data: datas });
datas.market_uid != uid ? setMarketPopUp({ show: true, data: datas }) :setJobPopout({ show: true, data: datas });
}}
className="flex flex-col gap-2 justify-between w-full h-full"
>
@@ -80,7 +89,7 @@ export default function AvailableJobsCard({
</div>
<div className="thumbnail-area w-full">
<div
className="w-full h-[236px] rounded-xl overflow-y-auto bg-center bg-cover bg-no-repeat"
className="w-full p-1 h-[150px] rounded-xl overflow-y-auto bg-center bg-cover bg-no-repeat"
// style={{
// backgroundImage: `url('${image}')`,
// }}
@@ -108,15 +117,27 @@ export default function AvailableJobsCard({
</div>
</div>
<div>
<button
{datas.market_uid != uid ?
<button
type="button"
className="px-4 py-2.5 text-white text-sm bg-pink rounded-full tracking-wide"
className="px-4 py-2.5 text-white text-sm bg-pink rounded-full tracking-wide"
onClick={() => {
setMarketPopUp({ show: true, data: datas });
}}
>
View
</button>
:
<button
type="button"
className="px-4 py-2.5 text-white text-sm bg-yellow-500 rounded-full tracking-wide"
onClick={() => {
setMarketPopUp({ show: true, data: datas });
setJobPopout({ show: true, data: datas });
}}
>
View
</button>
>
Manage
</button>
}
</div>
</div>
</div>
@@ -131,7 +152,7 @@ export default function AvailableJobsCard({
<div className="flex flex-col flex-[0.9]">
<h1
onClick={() => {
setMarketPopUp({ show: true, data: datas });
datas.market_uid != uid ? setMarketPopUp({ show: true, data: datas }) :setJobPopout({ show: true, data: datas })
}}
className="font-bold text-xl tracking-wide line-clamp-1 text-dark-gray dark:text-white capitalize"
>
@@ -140,7 +161,7 @@ export default function AvailableJobsCard({
<div
onClick={() => {
setMarketPopUp({ show: true, data: datas });
datas.market_uid != uid ? setMarketPopUp({ show: true, data: datas }) :setJobPopout({ show: true, data: datas })
}}
className="my-2"
>
@@ -168,8 +189,9 @@ export default function AvailableJobsCard({
</div>
</div>
<div className="">
{datas.market_uid != uid ?
<button
type="button"
type="button"
className="px-4 py-2.5 text-white text-sm bg-pink rounded-full tracking-wide"
onClick={() => {
setMarketPopUp({ show: true, data: datas });
@@ -177,6 +199,17 @@ export default function AvailableJobsCard({
>
View
</button>
:
<button
type="button"
className="px-4 py-2.5 text-white text-sm bg-yellow-500 rounded-full tracking-wide"
onClick={() => {
setJobPopout({ show: true, data: datas });
}}
>
Manage
</button>
}
</div>
</div>
)}
@@ -189,6 +222,18 @@ export default function AvailableJobsCard({
situation={marketPopUp.show}
/>
)}
{/* Active Job Popout */}
{jobPopout.show && (
<PendingJobsPopout
details={datas}
onClose={() => {
setJobPopout({ show: false, data: {} });
}}
situation={jobPopout.show}
/>
)}
{/* End of Active Job Popout */}
</>
);
}
@@ -0,0 +1,122 @@
import React, { Suspense, useEffect, useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import { useLocation, useOutletContext } from "react-router-dom";
import usersService from "../../../../services/UsersService";
import ModalCom from '../../../Helpers/ModalCom';
import LoadingSpinner from "../../../Spinners/LoadingSpinner";
import localImgLoad from '../../../../lib/localImgLoad'
// import { tableReload } from "../../../store/TableReloads";
// import { PriceFormatter } from "../../Helpers/PriceFormatter";
const RelativePopout = ({
relativeSelected,
action,
situation,
familyList
}) => {
const { walletDetails } = useSelector((state) => state?.walletDetails); // WALLET STORE
const {userDetails} = useSelector((state) => state?.userDetails); // CHECKS IF USER Details are avaliable, to determine if user is active
const apiCall = new usersService();
let { pathname, state } = useLocation();
const dispatch = useDispatch();
useEffect(()=>{
},[])
return (
<>
<ModalCom action={action} situation={situation}>
<div className="modal-container">
<div className="modal-header-con">
<h1 className="modal-title">
{relativeSelected.firstname && relativeSelected.firstname} {relativeSelected.lastname && relativeSelected.lastname}
</h1>
<button
type="button"
className="modal-close-btn"
onClick={action}
>
<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="modal-body-wrapper">
<div className="w-full grid grid-cols-2 gap-2 space-x-2">
<div className='col-span-2 md:col-span-1 overflow-y-auto h-[350px]'>
{familyList.loader ?
<LoadingSpinner size='10' color='bg-sky-500' height='min-h-40' />
: (!familyList.loader && familyList?.familyList?.result_list?.length > 0) ?
familyList?.familyList?.result_list?.map(item => {
const image = localStorage.getItem("session_token") ? `${familyList?.imageServer}${localStorage.getItem("session_token")}/family/${item?.family_uid}` : "";
return (
<div key={item.family_uid || index} className="flex items-center border-b dark:border-[#5356fb29] hover:bg-gray-50">
<div className='p-2 flex justify-center items-center'>
<input type="checkbox" className='w-4 h-4 border-2 border-blue-500 rounded-sm bg-white cursor-pointer' />
</div>
<div className='p-2'>
<div className="flex space-x-2 items-center w-full">
<div className="min-w-[30px] min-h-[30px] max-w-[30px] max-h-[30px] rounded-full overflow-hidden flex justify-center items-center">
<img
src={image || localImgLoad(`images/icons/${banner}`)}
alt={`Avatar`}
className="w-full h-full"
/>
</div>
<div className="flex flex-col w-full">
<h1 className="font-bold text-[16px] text-dark-gray dark:text-white whitespace-nowrap">
{`${item?.firstname} ${item?.lastname}`}
</h1>
</div>
</div>
</div>
</div>
)
})
:
<div className='min-h-[100px] w-full flex flex-col justify-center items-center'>No records found!</div>
}
</div>
<div className='col-span-2 md:col-span-1 bg-green-100 min-h-[100px]'>
{/* dummy to be filled latter*/}
</div>
</div>
</div>
<div className="modal-footer-wrapper justify-end">
<button
onClick={action}
className="custom-btn border-gradient"
>
<span className='text-gradient'>Close</span>
</button>
</div>
</div>
</ModalCom>
</>
);
};
export default RelativePopout;
@@ -2,7 +2,9 @@ import React, { useState } from 'react'
import { handlePagingFunc } from '../../../Pagination/HandlePagination';
import PaginatedList from '../../../Pagination/PaginatedList';
export default function RelativeTable({relativeList}) {
import RelativePopout from './RelativePopout';
export default function RelativeTable({relativeList, familyList}) {
// Handle Pagination
const [currentPage, setCurrentPage] = useState(0);
@@ -10,21 +12,36 @@ export default function RelativeTable({relativeList}) {
const indexOfLastItem =Number(indexOfFirstItem) + Number(process.env.REACT_APP_ITEM_PER_PAGE);
const currentRelativeList = relativeList?.slice(indexOfFirstItem, indexOfLastItem);
const [relativePopout, setRelativePopout] = useState({show:false, data:null})
const closePopout = () => {
setRelativePopout({show:false, data:null})
}
const handlePagination = (e) => {
handlePagingFunc(e, setCurrentPage);
};
return (
<>
<div className={`w-full overflow-hidden rounded-2xl`}>
<div className="relative w-full overflow-x-auto sm:rounded-lg flex flex-col justify-between min-h-[400px]">
<table className="w-full text-sm text-left text-gray-500 dark:text-gray-400">
<thead>
<tr>
<th className='py-4 px-2'></th>
<th className='py-4 px-2'></th>
<th className='py-4 px-2 text-center'>Kids</th>
<th className='py-4 px-2'></th>
</tr>
</thead>
<tbody>
<>
{relativeList && relativeList?.length > 0 ? (
currentRelativeList.map((value, index) => (
<tr key={value.uid || index} className="border-b dark:border-[#5356fb29] hover:bg-gray-50">
<td className='p-2'>
<td className='py-4 px-2'>
<div className="flex flex-col">
<h1 className="font-bold text-xl text-dark-gray dark:text-white">
{value.firstname && value.firstname} {value.lastname && value.lastname}
@@ -34,13 +51,34 @@ export default function RelativeTable({relativeList}) {
</span>
</div>
</td>
<td className='p-2'>
<td className='py-4 px-2'>
{/* <span>Family Type</span> */}
<span>{value.family_type && value.family_type.toUpperCase()}</span>
</td>
<td className='p-2 text-right'>
<td className='py-4 px-2 text-center'>
{value.status && value.status}
</td>
<td className='py-4 px-2 flex items-center justify-end'>
<button
onClick={() => setRelativePopout({show:true, data:{relativeSelected:value}})}
type="button"
className="w-12 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 11 20"
id="Arrow"
className="w-[0.7rem]"
>
<path
fillRule="evenodd"
d="M.366 19.708c.405.39 1.06.39 1.464 0l8.563-8.264a1.95 1.95 0 0 0 0-2.827L1.768.292A1.063 1.063 0 0 0 .314.282a.976.976 0 0 0-.011 1.425l7.894 7.617a.975.975 0 0 1 0 1.414L.366 18.295a.974.974 0 0 0 0 1.413"
// fill=""
className="color000000 svgShape fill-[#fff]"
></path>
</svg>
</button>
</td>
</tr>
))
) : (
@@ -69,5 +107,15 @@ export default function RelativeTable({relativeList}) {
{/* END OF PAGINATION BUTTON */}
</div>
</div>
{relativePopout.show &&
<RelativePopout
situation={relativePopout.show}
action={closePopout}
relativeSelected={relativePopout.data.relativeSelected}
familyList={familyList}
/>
}
</>
);
};
@@ -4,7 +4,7 @@ import InviteRelative from './InviteRelative'
import usersService from '../../../../services/UsersService'
import LoadingSpinner from '../../../Spinners/LoadingSpinner'
const Relatives = () => {
const Relatives = ({familyList}) => {
const api = new usersService()
@@ -47,7 +47,7 @@ const Relatives = () => {
{relativeList.loading ?
<LoadingSpinner size='8' height='h-full' />
:
<RelativeTable relativeList={relativeList.result_list} />
<RelativeTable relativeList={relativeList.result_list} familyList={familyList} />
}
</div>
</div>
@@ -1,12 +1,20 @@
import React, { useEffect, useState } from "react";
import { Link, useLocation } from "react-router-dom";
import { Link, useLocation, useOutletContext } from "react-router-dom";
import CustomBreadcrumb from "../../Breadcrumb/CustomBreadcrumb";
import Icons from "../../Helpers/Icons";
import Layout from "../../Partials/Layout";
import { AddFamily, FamilyBanner, Relatives } from "./Tabs";
const FamilySettings = () => {
const {loader, setLoader, familyList, setListReload} = useOutletContext() // CONTEXT VALUES FROM OUTLET TO CHILD
let { state } = useLocation();
const imageServer = state?.imageServer
let relativeFamilyList = {loader, familyList, imageServer}
const tabs = [
{
id: 1,
@@ -44,7 +52,7 @@ const FamilySettings = () => {
const tabComponents = {
add_family: <AddFamily />,
relatives: <Relatives />,
relatives: <Relatives familyList={relativeFamilyList} />,
family_banner: <FamilyBanner imageServer={state.imageServer} />,
};
+1 -1
View File
@@ -53,7 +53,7 @@ function JobsCompleted() {
<div className='flex flex-col justify-between min-h-[500px]'>
{jobHistory.loading ?
<LoadingSpinner size='16' color='sky-blue' height='h-[500px]' />
: jobHistory.data.length ?
: jobHistory?.data?.length ?
<table className="wallet-activity w-full table-auto border-collapse text-left">
<thead className='w-full'>
<tr className='text-slate-600 dark:text-white'>
@@ -173,11 +173,12 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
{name}
</label>
<div
className={`w-full md:w-3/4 text-slate-900 dark:text-white market-pop ${
name !== "Delivery Detail"
? " h-full flex items-center"
: " overflow-y-auto max-h-[80px]"
} ${name === "Description" && "max-h-14 h-full overflow-auto"}`}
className={`w-full p-2 md:w-3/4 text-slate-900 dark:text-white market-pop ${
name == "Description"
? "max-h-22 h-full overflow-y-auto break-words"
: name == "Delivery Detail" ? " overflow-y-auto h-full max-h-22"
: "h-full flex items-center"
}`}
>
{danger ? (
<p
@@ -193,12 +194,14 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
{typeof content !== "object" ? content : null}
{typeof content === "object" && (
<>
<hr className="mb-1" />
{/* <hr className="mb-1" /> */}
<span className='flex w-full mb-1 h-[1px] bg-slate-500'></span>
<span className="flex items-center gap-2 dark:text-white">
{content?.text}
<strong>{thePrice}</strong>
</span>
<hr className="mt-1" />
<span className='flex w-full mt-1 h-[1px] bg-slate-500'></span>
{/* <hr className="mt-1" /> */}
</>
)}
</>
@@ -13,6 +13,8 @@ import { PriceFormatter } from "../Helpers/PriceFormatter";
export default function ManageInterestOffer(props) {
const { walletDetails } = useSelector((state) => state?.walletDetails); // WALLET STORE
let { othersInterestedTable } = useSelector((state) => state.tableReload); // FOR OTHERS INTERESTED TABLE RELOAD
let walletBal = walletDetails?.data?.filter(wallet => wallet.code == props?.offerDetails?.currency_code) // USER WALLET BALANCE FOR CORRESPONDING TASK CURRENCY
@@ -143,7 +145,7 @@ export default function ManageInterestOffer(props) {
setInterestStats(prev => ({...prev, loading: false}))
console.log('Failed', err)
})
},[])
},[othersInterestedTable])
return (
<Layout>
<CommonHead
@@ -230,15 +232,15 @@ export default function ManageInterestOffer(props) {
<div className="info-details w-full border-t">
<div className="my-0 md:my-3 block md:flex items-center gap-10">
<div className="my-3 md:my-0 flex items-center gap-1">
<span className="w-[200px] text-lg font-bold text-dark-gray dark:text-white tracking-wide">Name</span>
<span className="min-w-[100px] text-sm font-bold text-dark-gray dark:text-white tracking-wide">{props.offerDetails?.client_name}</span>
<p className="w-[200px] text-lg font-bold text-dark-gray dark:text-white tracking-wide">Name</p>
<p className="min-w-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">{props.offerDetails?.client_name}</p>
</div>
<div className="my-3 md:my-0 flex items-center gap-1">
<span className="w-[200px] text-lg font-bold text-dark-gray dark:text-white tracking-wide">Member Since</span>
<span className="min-w-[100px] text-sm font-bold text-dark-gray dark:text-white tracking-wide">
<p className="w-[200px] text-lg font-bold text-dark-gray dark:text-white tracking-wide">Member Since</p>
<p className="min-w-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">
{clientAdded.getFullYear()}{" - "}
{clientAdded.getMonth() < 9 ? '0'+ (clientAdded.getMonth() + 1) : clientAdded.getMonth() + 1}
</span>
</p>
</div>
</div>
<>
@@ -246,36 +248,66 @@ export default function ManageInterestOffer(props) {
<LoadingSpinner color='sky-blue' size='10' height='min-h-[40px]' />
:
<>
<div className="my-0 md:my-3 block md:flex items-center gap-10">
<div className='my-3 md:my-0 flex items-center gap-1'>
<span className="w-[200px] text-lg font-bold text-dark-gray dark:text-white tracking-wide">Jobs completed</span>
<span className="min-w-[100px] text-sm font-bold text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_completed && interestStats.data?.job_completed}</span>
<div className='flex flex-col md:flex-row gap-4 justify-center items-center max-w-xl'>
<div className='contents md:flex flex-col gap-3'>
<div className='flex items-center gap-4'>
<p className="min-w-[150px] text-lg font-bold text-dark-gray dark:text-white tracking-wide text-right">Completed:</p>
<p className="min-w-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_completed && interestStats.data?.job_completed}</p>
</div>
<div className="flex items-center gap-4">
<p className="min-w-[150px] text-lg font-bold text-dark-gray dark:text-white tracking-wide text-right">Active:</p>
<p className="min-w-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_active && interestStats.data?.job_active}</p>
</div>
<div className="flex items-center gap-4">
<p className="min-w-[150px] text-lg font-bold text-dark-gray dark:text-white tracking-wide text-right">% Completion:</p>
<p className="min-w-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_percent_complete && interestStats.data?.job_percent_complete}</p>
</div>
</div>
<div className="my-3 md:my-0 flex items-center gap-1">
<span className="w-[200px] text-lg font-bold text-dark-gray dark:text-white tracking-wide">Last Job completed</span>
<span className="min-w-[100px] text-sm font-bold text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_last_date && interestStats.data?.job_last_date}</span>
<div className='contents md:flex flex-col gap-3'>
<div className="flex items-center gap-4">
<p className="min-w-[150px] text-lg font-bold text-dark-gray dark:text-white tracking-wide text-right">Last Completed:</p>
<p className="min-w-[150px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_last_date && interestStats.data?.job_last_date}</p>
</div>
<div className="flex items-center gap-4">
<p className="min-w-[150px] text-lg font-bold text-dark-gray dark:text-white tracking-wide text-right">Uncompleted:</p>
<p className="min-w-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_uncompleted && interestStats.data?.job_uncompleted}</p>
</div>
<div className="flex items-center gap-4">
<p className="min-w-[150px] text-lg font-bold text-dark-gray dark:text-white tracking-wide text-right">Pending Offers:</p>
<p className="min-w-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_pending && interestStats.data?.job_pending}</p>
</div>
</div>
</div>
<div className="my-0 md:my-3 block md:flex items-center gap-10">
<div className="my-3 md:my-0 flex items-center gap-1">
<span className="w-[200px] text-lg font-bold text-dark-gray dark:text-white tracking-wide">Jobs active</span>
<span className="min-w-[100px] text-sm font-bold text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_active && interestStats.data?.job_active}</span>
{/* <div className="my-0 md:my-3 block md:flex items-center gap-5">
<div className='my-3 md:my-0 flex items-center gap-4'>
<p className="min-w-[200px] text-lg font-bold text-dark-gray dark:text-white tracking-wide text-right">Completed:</p>
<p className="min-w-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_completed && interestStats.data?.job_completed}</p>
</div>
<div className="my-3 md:my-0 flex items-center gap-1">
<span className="w-[200px] text-lg font-bold text-dark-gray dark:text-white tracking-wide">Jobs uncompleted</span>
<span className="min-w-[100px] text-sm font-bold text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_uncompleted && interestStats.data?.job_uncompleted}</span>
<div className="my-3 md:my-0 flex items-center gap-4">
<p className="min-w-[200px] text-lg font-bold text-dark-gray dark:text-white tracking-wide text-right">Completed:</p>
<p className="min-w-[150px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_last_date && interestStats.data?.job_last_date}</p>
</div>
</div>
<div className="block md:flex items-center gap-10">
<div className="my-3 md:my-0 flex items-center gap-1">
<span className="w-[200px] text-lg font-bold text-dark-gray dark:text-white tracking-wide">% completion</span>
<span className="min-w-[100px] text-sm font-bold text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_percent_complete && interestStats.data?.job_percent_complete}</span>
</div> */}
{/* <div className="my-0 md:my-3 block md:flex items-center gap-10">
<div className="my-3 md:my-0 flex items-center gap-4">
<p className="min-w-[200px] text-lg font-bold text-dark-gray dark:text-white tracking-wide text-right">Active:</p>
<p className="min-w-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_active && interestStats.data?.job_active}</p>
</div>
<div className="flex items-center gap-1">
<span className="w-[200px] text-lg font-bold text-dark-gray dark:text-white tracking-wide">Pending Offers</span>
<span className="min-w-[100px] text-sm font-bold text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_pending && interestStats.data?.job_pending}</span>
<div className="my-3 md:my-0 flex items-center gap-4">
<p className="min-w-[200px] text-lg font-bold text-dark-gray dark:text-white tracking-wide text-right">Uncompleted:</p>
<p className="min-w-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_uncompleted && interestStats.data?.job_uncompleted}</p>
</div>
</div>
</div> */}
{/* <div className="block md:flex items-center gap-10">
<div className="my-3 md:my-0 flex items-center gap-4">
<p className="min-w-[200px] text-lg font-bold text-dark-gray dark:text-white tracking-wide text-right">% Completion:</p>
<p className="min-w-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_percent_complete && interestStats.data?.job_percent_complete}</p>
</div>
<div className="flex items-center gap-4">
<p className="min-w-[200px] text-lg font-bold text-dark-gray dark:text-white tracking-wide text-right">Pending Offers:</p>
<p className="min-w-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_pending && interestStats.data?.job_pending}</p>
</div>
</div> */}
</>
}
</>
@@ -360,7 +392,7 @@ export default function ManageInterestOffer(props) {
<div className='mb-4 border-b-2 flex flex-col justify-center items-center gap-4'>
<div className='w-full flex flex-col lg:flex-row justify-center items-center gap-2'>
<p className="text-lg font-bold text-dark-gray dark:text-white tracking-wide">Wallet:</p>
<span className="font-medium text-dark-gray dark:text-white">{PriceFormatter(walletBal[0]?.amount * 0.01,props?.offerDetails?.currency_code,props?.offerDetails?.currency)}</span>
<span className="font-medium text-dark-gray dark:text-white">{ walletDetails?.loading ? 'loading...' : PriceFormatter(walletBal[0]?.amount * 0.01,props?.offerDetails?.currency_code,props?.offerDetails?.currency)}</span>
</div>
<div className='w-full flex flex-col lg:flex-row justify-center items-center gap-2'>
<p className="text-lg font-bold text-dark-gray dark:text-white tracking-wide">Reward:</p>
+1 -1
View File
@@ -203,7 +203,7 @@ export default function Settings({ faq }) {
</div>
<div className="content-body w-full lg:flex lg:px-10 px-4">
<div className="content-tab-items lg:w-[230px] w-full mr-2">
<ul className="overflow-hidden mb-10 lg:mb-0">
<ul className="overflow-hidden mb-10 lg:mb-0 flex flex-col sm:block lg:flex-col">
{tabs.map(({ name, id, title, iconName }) => (
<li
onClick={() => tabHandler(name)}
@@ -99,6 +99,7 @@ function PendingJobsPopout({ details, onClose, situation }) {
onClose();
dispatch(tableReload({ type: "PENDINGTABLE" }));
dispatch(tableReload({ type: "JOBTABLE" }));
dispatch(tableReload({ type: "MARKETTABLELIST" }));
}, 4000);
})
.catch((error) => {
+1
View File
@@ -217,6 +217,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
}
// Getting market data
const getMarketActiveJobList = async () => {
dispatch(updateJobs({loading: true}));
try {
const res = await apiCall.getActiveJobList();
dispatch(updateJobs({loading: false, ...res.data}));