Compare commits

..

11 Commits

15 changed files with 362 additions and 407 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

+6 -6
View File
@@ -23,16 +23,16 @@ const validationSchema = Yup.object().shape({
})
.required("Price is required"),
title: Yup.string()
.min(25, "Minimum 25 characters")
.max(45, "Maximum 45 characters")
.min(5, "Minimum 5 characters")
.max(149, "Maximum 149 characters")
.required("Title is required"),
description: Yup.string()
.min(25, "Minimum 25 characters")
.max(250, "Maximum 250 characters")
.min(5, "Minimum 5 characters")
.max(299, "Maximum 299 characters")
.required("Description is required"),
job_detail: Yup.string()
.min(25, "Minimum 25 characters")
.max(250, "Maximum 250 characters")
.min(3, "Minimum 3 characters")
.max(1440, "Maximum 1440 characters")
.required("Details is required"),
timeline_days: Yup.number()
.typeError("you must specify a number")
+57 -54
View File
@@ -1,72 +1,75 @@
import React, { useState } from "react";
import { Link } from "react-router-dom";
import { toast } from "react-toastify";
import localImgLoad from "../../lib/localImgLoad";
import getTimeAgo from "../../lib/getTimeAgo";
import Icons from "../Helpers/Icons";
import SuggestTask from "../FamilyPopup/SuggestTask";
export default function FamilyMarketCard({
className,
datas,
hidden = false,
}) {
export default function FamilyMarketCard({ className, datas, hidden = false }) {
// debugger;
const [addFavorite, setValue] = useState(datas.whishlisted);
const [options, setOption] = useState(false);
const favoriteHandler = () => {
if (!addFavorite) {
setValue(true);
toast.success("Added to Favorite List");
} else {
setValue(false);
toast.warn("Remove to Favorite List");
}
const [popUp, setPopUp] = useState(false);
const popUpHandler = () => {
setPopUp((prev) => !prev);
};
// Image
let selectedImage =
datas?.image || require("../../assets/images/banner-job-due.jpg");
return (
<div
className={`card-style-two w-full h-[336px] p-[20px] bg-white dark:bg-dark-white rounded-2xl section-shadow ${
className || ""
}`}
>
<div className="flex flex-col justify-between w-full h-full">
<div className="thumbnail-area w-full">
<div
className="w-full h-[236px] p-6 rounded-xl overflow-hidden"
style={{
background: `url(${`https://blog.float.sg/wp-content/uploads/${datas.meta_value}`}) 0% 0% / cover no-repeat`,
}}
>
<div className="product-two-options flex justify-between mb-5 relative">
<div className="status">
{datas?.isActive && (
<span className="text-xs px-3 py-1.5 tracking-wide rounded-full bg-gold text-white">
<>
<div
className={`card-style-two w-full h-[336px] p-[20px] bg-white dark:bg-dark-white rounded-2xl section-shadow ${
className || ""
}`}
key={datas?.uid}
>
<div className="flex flex-col justify-between w-full h-full">
<div className="thumbnail-area w-full">
<div
className="w-full h-[236px] p-6 rounded-xl overflow-hidden"
style={{
background: `url(${selectedImage}) 0% 0% / cover no-repeat`,
}}
>
<div className="product-two-options flex justify-between mb-5 relative">
<div className="status">
{/* <span className="text-xs px-3 py-1.5 tracking-wide rounded-full bg-gold text-white">
Active
</span>
)}
</span> */}
</div>
</div>
{hidden && <div className="flex justify-center"></div>}
</div>
{hidden && <div className="flex justify-center"></div>}
</div>
</div>
<div className="details-area">
{/* title */}
<Link to="/shop-details" className="mb-2.5">
<h1 className="font-bold text-xl tracking-wide line-clamp-1 text-dark-gray dark:text-white capitalize">
{datas.post_title}
</h1>
</Link>
<div className="flex justify-between">
<div className="flex items-center space-x-2"></div>
<div>
<button
type="button"
className="px-4 py-2.5 text-white text-sm bg-pink rounded-full tracking-wide"
>
View
</button>
<div className="details-area mt-12">
{/* title */}
<button onClick={popUpHandler}>
<h1 className="font-bold text-xl tracking-wide line-clamp-1 text-dark-gray dark:text-white capitalize">
{datas?.title}
</h1>
</button>
<div className="flex justify-between">
<div className="flex items-center space-x-2">
<p className="italic text-gray-400">
{getTimeAgo(datas?.added)}
</p>
</div>
<div>
<button
type="button"
className="px-4 py-2.5 text-white text-sm bg-pink rounded-full tracking-wide"
>
Send
</button>
</div>
</div>
</div>
</div>
</div>
</div>
{popUp && (
<SuggestTask onClose={popUpHandler} situation={popUp} details={datas} />
)}
</>
);
}
+35 -16
View File
@@ -8,17 +8,41 @@ import SearchCom from "../Helpers/SearchCom";
import collections from "../../data/collectionplan_data.json";
import FamilyMarketCard from "../Cards/FamilyMarketCard";
import { Link } from "react-router-dom";
import usersService from "../../services/UsersService";
import SuggestTask from "../FamilyPopup/SuggestTask";
export default function FamilyMarket() {
const [selectTab, setValue] = useState("today");
const [popUp, setPopUp] = useState(false);
const apiCall = useMemo(() => new SiteService(), []);
const [MyFamilySampleTasks, setMyFamilySampleTasks] = useState({
loading: true,
status: false,
data: [],
});
// This is to make sure it's called once and used everywhere
let memberId = localStorage.getItem("member_id");
let uid = localStorage.getItem("uid");
let sessionId = localStorage.getItem("session_token");
const apiCall = useMemo(() => new usersService(), []);
const getMyFamilySampleTasks = useCallback(async () => {
setMyFamilySampleTasks({ loading: true, status: false, data: [] });
try {
const res = await apiCall.getFamilySampleTasks();
setMyFamilySampleTasks({
loading: false,
status: true,
data: res.data.result_list,
});
} catch (error) {
setMyFamilySampleTasks({ loading: false, status: false, data: [] });
console.log("Error getting tasks");
}
}, [apiCall, setMyFamilySampleTasks]);
useEffect(() => {
getMyFamilySampleTasks();
}, [getMyFamilySampleTasks]);
console.log("My family stuff>> ", MyFamilySampleTasks);
const popUpHandler = () => {
setPopUp((prev) => !prev);
@@ -56,24 +80,23 @@ export default function FamilyMarket() {
<div className="filter-section w-full items-center sm:flex justify-between mb-6">
{/* filter-search */}
<div className="sm:w-1/2 w-full sm:pr-20 pr-0 mb-5 sm:mb-0">
<SearchCom />
<SearchCom placeholder="Search for tasks..." />
</div>
{/* filer-dropdown */}
<div className="flex-1 flex sm:justify-end">
<Link
to="/upload-product"
<button onClick={popUpHandler}
className="btn-gradient lg:flex hidden w-[153px] h-[46px] rounded-full text-white justify-center items-center"
>
Any Other Task
</Link>
</button>
</div>
</div>
<div className="content-section w-full-width">
<div className="grid lg:grid-cols-3 sm:grid-cols-2 grid-cols-1 gap-[30px]">
<DataIteration
datas={collections?.data}
datas={MyFamilySampleTasks?.data}
startLength={process.env.REACT_APP_ZERO_STATE}
endLength={collections?.data.length}
endLength={MyFamilySampleTasks?.data.length}
>
{({ datas }) => (
<FamilyMarketCard key={datas.id} datas={datas} />
@@ -83,11 +106,7 @@ export default function FamilyMarket() {
</div>
</div>
</div>
{popUp && (
<ModalCom action={popUpHandler} situation={popUp}>
{/* */}
</ModalCom>
)}
{popUp && <SuggestTask onClose={popUpHandler} situation={popUp} />}
</Layout>
);
}
@@ -0,0 +1,77 @@
import React from "react";
import ModalCom from "../Helpers/ModalCom";
const SuggestTask = ({ 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">
<div className="logout-modal-header w-full flex items-center justify-between lg:p-6 px-[30px] py-[23px] border-b dark:border-[#5356fb29] border-light-purple">
<h1 className="text-base md:text-lg font-bold text-dark-gray dark:text-white tracking-wide">
Suggest to Parent
</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="p-5 w-full bg-white rounded-md flex flex-col justify-between">
<div className="p-4 w-full md:w-2/4 md:border-r-2"></div>
{/* ACTION SECTION */}
<div className="p-4 w-full md:w-2/4 h-full"></div>
</div>
<div className="w-full h-[70px] border-t border-light-purple dark:border-[#5356fb29] flex justify-end items-center">
<div className="flex items-center space-x-4 mr-9">
<button
type="button"
className="text-18 text-light-red tracking-wide "
>
<span
className="border-b dark:border-[#5356fb29] border-light-red"
onClick={onClose}
>
{" "}
Cancel
</span>
</button>
{/* {requestStatus.loading ? (
<LoadingSpinner size="8" color="sky-blue" />
) : ( */}
<button
type="submit"
className="w-[152px] h-[46px] flex justify-center items-center btn-gradient text-base rounded-full text-white"
// className='w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white'
>
Send to Parent
</button>
{/* )} */}
</div>
</div>
</div>
</ModalCom>
);
};
export default SuggestTask;
@@ -126,7 +126,9 @@ const inputConfigs = {
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]+" },
description: { minLength: 5, maxLength: 250 },
description: { minLength: 5, maxLength: 299 },
title: { minLength: 5, maxLength: 149 },
job_detail: { minLength: 4, maxLength: 1440 }
};
/* Numbers Only: <input type="text" pattern="[0-9]*" /> strictly numbers
@@ -2,8 +2,6 @@ import React, { useState } from "react";
import { Link } from "react-router-dom";
import { toast } from "react-toastify";
import activeAidsBanner from "../../assets/images/kids-waiting.jpg";
import HeroUser from "../../assets/images/hero-user.png";
import CountDown from "../Helpers/CountDown";
import ParentWaitingTable from "./ParentWaitingTable";
export default function ParentWaiting({ className }) {
@@ -20,21 +18,22 @@ export default function ParentWaiting({ className }) {
return (
<>
<div className={`overview-section w-full ${className || ""}`}>
<div>
<div className="mb-3">
<h1 className="text-26 font-bold text-dark-gray dark:text-white">
Waiting for Parent to Get Started...
</h1>
</div>
<div className="overview-section-wrapper lg:flex lg:h-[494px] lg:pace-x-2 flex-1 lg:gap-8">
<div className=" w-full h-full bg-white dark:bg-dark-white flex-[50%] rounded-2xl overflow-hidden mb-10">
{/* <div className="overview-section-wrapper py-2 min-h-[450px] lg:flex lg:space-x-2 flex-1 lg:gap-8"> */}
<div className="overview-section-wrapper py-2 min-h-[400px] lg:grid grid-cols-2 gap-4">
<div className="mb-10 lg:mb-0 h-full w-full bg-white dark:bg-dark-white rounded-2xl overflow-hidden">
<img
src={activeAidsBanner}
alt="banner"
className="w-full lg:h-full h-[400px]"
className="w-full h-full"
/>
</div>
<div className="overview-countdown lg:w-2/5 w-full h-full flex flex-col justify-between lg:p-8 rounded-2xl bg-white dark:bg-dark-white flex-[50%] ">
<div className="overview-countdown h-full w-full flex flex-col justify-between p-4 rounded-2xl bg-white dark:bg-dark-white">
{<ParentWaitingTable />}
{/* <div className="lg:mb-0 mb-3">*/}
@@ -1,35 +1,64 @@
import React, { useState } from "react";
import React, { useState, useEffect } from "react";
import transaction1 from "../../assets/images/recent-transation-1.png";
import transaction2 from "../../assets/images/recent-transation-2.png";
import transaction3 from "../../assets/images/recent-transation-3.png";
export default function ParentWaitingTable() {
const transationFilterData = [
{
id: 1,
name: "all",
uniqueId: Math.random(),
},
{
id: 2,
name: "send",
uniqueId: Math.random(),
},
{
id: 3,
name: "recent",
uniqueId: Math.random(),
},
];
const [filterActive, setValue] = useState(transationFilterData[0].id);
const filterHander = (value) => {
setValue(value);
};
return (
<div className="rounded-2xl bg-white dark:bg-dark-white ">
{/* heading */}
<div className="heading sm:flex justify-between items-center">
import LoadingSpinner from "../Spinners/LoadingSpinner";
import { handlePagingFunc } from "../Pagination/HandlePagination";
import PaginatedList from "../Pagination/PaginatedList";
import usersService from "../../services/UsersService";
export default function ParentWaitingTable() {
// const transationFilterData = [
// {
// id: 1,
// name: "all",
// uniqueId: Math.random(),
// },
// {
// id: 2,
// name: "send",
// uniqueId: Math.random(),
// },
// {
// id: 3,
// name: "recent",
// uniqueId: Math.random(),
// },
// ];
// const [filterActive, setValue] = useState(transationFilterData[0].id);
// const filterHander = (value) => {
// setValue(value);
// };
const apiCall = new usersService()
let [familySuggestList, setFamilySuggestList] = useState({loading: true, data:[]})
const [currentPage, setCurrentPage] = useState(0);
const indexOfFirstItem = Number(currentPage);
const indexOfLastItem =
Number(indexOfFirstItem) + Number(process.env.REACT_APP_ITEM_PER_PAGE);
const currentList = familySuggestList?.data?.slice(indexOfFirstItem, indexOfLastItem);
const handlePagination = (e) => {
handlePagingFunc(e, setCurrentPage);
};
useEffect(()=>{
apiCall.getFamilySuggestList().then(res => {
setFamilySuggestList({loading: false, data:res.data?.result_list})
}).catch(err => {
setFamilySuggestList({loading: false, data:[]})
console.log('ERROR==>Familysuggestlist', err)
})
},[])
return (
<div className="rounded-2xl bg-white dark:bg-dark-white flex flex-col justify-between">
{/* heading */}
{/* <div className="heading sm:flex justify-between items-center">
<div>
<ul className="flex space-x-5 items-center">
{transationFilterData.map((value) => (
@@ -43,297 +72,68 @@ export default function ParentWaitingTable() {
{value.name}
</li>
))}
{/* <li className="text-base text-thin-light-gray hover:text-purple border-b dark:border-[#5356fb29] border-transparent hover:border-purple uppercase">
All
</li>
<li className="text-base text-thin-light-gray hover:text-purple border-b dark:border-[#5356fb29] border-transparent hover:border-purple uppercase">
SEND
</li>
<li className="text-base text-thin-light-gray hover:text-purple border-b dark:border-[#5356fb29] border-transparent hover:border-purple uppercase">
recent
</li> */}
</ul>
</div>
</div>
{/* content */}
</div> */}
{filterActive === 2 ? (
<div className="content">
{/* content */}
<div className="content min-h-[400px]">
{familySuggestList.loading ?
<div className="h-full flex justify-center items-center">
<LoadingSpinner size='16' color='sky-blue' />
</div>
:
familySuggestList && familySuggestList.length != 0?
<ul>
<li className="content-item py-3 border-b dark:border-[#5356fb29] border-light-purple dark:border-[#5356fb29] hover:border-purple">
<div className="flex justify-between items-center">
<div className="account-name flex space-x-4 items-center">
<div className="icon w-14 h-14 flex justify-center items-center">
<img src={transaction1} alt="" className="" />
</div>
<div>
<div className="name">
<p className="text-base text-dark-gray dark:text-white font-medium mb-1">
Add ETH from MetaMask
</p>
{currentList.map((item)=>(
<li key={item.uid} className="content-item py-2 border-b dark:border-[#5356fb29] border-light-purple hover:border-purple">
<div className="w-full flex justify-between items-center">
<div className="account-name flex space-x-4 items-center">
<div className="icon w-14 h-14 flex justify-center items-center">
<img src={transaction1} alt="" className="" />
</div>
<div className="time">
<div className="">
<p className="text-xl font-bold text-dark-gray dark:text-white mb-2 capitalize line-clamp-1">
{item.title}
</p>
<p className="text-sm text-thin-light-gray font-medium">
22 hours ago
{item.description}
</p>
</div>
</div>
</div>
<div>
<p className="eth text-xl font-bold text-dark-gray dark:text-white">
$512.44
</p>
<p className="usd text-base text-light-green text-right">
+324.75
</p>
</div>
</div>
</li>
<li className="content-item py-3 border-b dark:border-[#5356fb29] border-light-purple dark:border-[#5356fb29] hover:border-purple">
<div className="flex justify-between items-center">
<div className="account-name flex space-x-4 items-center">
<div className="icon w-14 h-14 flex justify-center items-center">
<img src={transaction2} alt="" className="" />
</div>
<div>
<div className="name">
<p className="text-base text-dark-gray dark:text-white font-medium mb-1">
Add BTC from Coinbase Wallet
</p>
</div>
<div className="time">
<p className="text-sm text-thin-light-gray font-medium">
22 hours ago
</p>
</div>
<div className="px-2">
<p className="text-sm font-bold text-dark-gray dark:text-white">
{new Date(item.added).toLocaleString().split(',')[0]}
</p>
<p className="text-sm text-dark-gray dark:text-white">Status: {item.status}</p>
</div>
</div>
<div>
<p className="eth text-xl font-bold text-dark-gray dark:text-white">
$512.44
</p>
<p className="usd text-base text-light-red text-right">
-824.78
</p>
</div>
</div>
</li>
<li className="content-item py-3 border-b dark:border-[#5356fb29] border-light-purple dark:border-[#5356fb29] hover:border-purple">
<div className="flex justify-between items-center">
<div className="account-name flex space-x-4 items-center">
<div className="icon w-14 h-14 flex justify-center items-center">
<img src={transaction3} alt="" className="" />
</div>
<div>
<div className="name">
<p className="text-base text-dark-gray dark:text-white font-medium mb-1">
Buy Nft art from LTC
</p>
</div>
<div className="time">
<p className="text-sm text-thin-light-gray font-medium">
22 hours ago
</p>
</div>
</div>
</div>
<div>
<p className="eth text-xl font-bold text-dark-gray dark:text-white">
$512.44
</p>
<p className="usd text-base text-light-red text-right">
-924.54
</p>
</div>
</div>
</li>
</li>
))}
</ul>
</div>
) : filterActive === 3 ? (
<div className="content">
<ul>
<li className="content-item py-3 border-b dark:border-[#5356fb29] border-light-purple dark:border-[#5356fb29] hover:border-purple">
<div className="flex justify-between items-center">
<div className="account-name flex space-x-4 items-center">
<div className="icon w-14 h-14 flex justify-center items-center">
<img src={transaction1} alt="" className="" />
</div>
<div>
<div className="name">
<p className="text-base text-dark-gray dark:text-white font-medium mb-1">
Add ETH from MetaMask
</p>
</div>
<div className="time">
<p className="text-sm text-thin-light-gray font-medium">
22 hours ago
</p>
</div>
</div>
</div>
<div>
<p className="eth text-xl font-bold text-dark-gray dark:text-white">
$512.44
</p>
<p className="usd text-base text-light-green text-right">
+324.75
</p>
</div>
</div>
</li>
<li className="content-item py-3 border-b dark:border-[#5356fb29] border-light-purple dark:border-[#5356fb29] hover:border-purple">
<div className="flex justify-between items-center">
<div className="account-name flex space-x-4 items-center">
<div className="icon w-14 h-14 flex justify-center items-center">
<img src={transaction2} alt="" className="" />
</div>
<div>
<div className="name">
<p className="text-base text-dark-gray dark:text-white font-medium mb-1">
Add BTC from Coinbase Wallet
</p>
</div>
<div className="time">
<p className="text-sm text-thin-light-gray font-medium">
22 hours ago
</p>
</div>
</div>
</div>
<div>
<p className="eth text-xl font-bold text-dark-gray dark:text-white">
$512.44
</p>
<p className="usd text-base text-light-red text-right">
-824.78
</p>
</div>
</div>
</li>
</ul>
</div>
) : (
<div className="content">
<ul>
<li className="content-item py-3 border-b dark:border-[#5356fb29] border-light-purple dark:border-[#5356fb29] hover:border-purple">
<div className="flex justify-between items-center">
<div className="account-name flex space-x-4 items-center">
<div className="icon w-14 h-14 flex justify-center items-center">
<img src={transaction1} alt="" className="" />
</div>
<div>
<div className="name">
<p className="text-base text-dark-gray dark:text-white font-medium mb-1">
Add ETH from MetaMask
</p>
</div>
<div className="time">
<p className="text-sm text-thin-light-gray font-medium">
22 hours ago
</p>
</div>
</div>
</div>
<div>
<p className="eth text-xl font-bold text-dark-gray dark:text-white">
$512.44
</p>
<p className="usd text-base text-light-green text-right">
+324.75
</p>
</div>
</div>
</li>
<li className="content-item py-3 border-b dark:border-[#5356fb29] border-light-purple dark:border-[#5356fb29] hover:border-purple">
<div className="flex justify-between items-center">
<div className="account-name flex space-x-4 items-center">
<div className="icon w-14 h-14 flex justify-center items-center">
<img src={transaction2} alt="" className="" />
</div>
<div>
<div className="name">
<p className="text-base text-dark-gray dark:text-white font-medium mb-1">
Add BTC from Coinbase Wallet
</p>
</div>
<div className="time">
<p className="text-sm text-thin-light-gray font-medium">
22 hours ago
</p>
</div>
</div>
</div>
<div>
<p className="eth text-xl font-bold text-dark-gray dark:text-white">
$512.44
</p>
<p className="usd text-base text-light-red text-right">
-824.78
</p>
</div>
</div>
</li>
<li className="content-item py-3 border-b dark:border-[#5356fb29] border-light-purple dark:border-[#5356fb29] hover:border-purple">
<div className="flex justify-between items-center">
<div className="account-name flex space-x-4 items-center">
<div className="icon w-14 h-14 flex justify-center items-center">
<img src={transaction3} alt="" className="" />
</div>
<div>
<div className="name">
<p className="text-base text-dark-gray dark:text-white font-medium mb-1">
Buy Nft art from LTC
</p>
</div>
<div className="time">
<p className="text-sm text-thin-light-gray font-medium">
22 hours ago
</p>
</div>
</div>
</div>
<div>
<p className="eth text-xl font-bold text-dark-gray dark:text-white">
$512.44
</p>
<p className="usd text-base text-light-red text-right">
-924.54
</p>
</div>
</div>
</li>
<li className="content-item py-3 border-b dark:border-[#5356fb29] border-light-purple dark:border-[#5356fb29] hover:border-purple">
<div className="flex justify-between items-center">
<div className="account-name flex space-x-4 items-center">
<div className="icon w-14 h-14 flex justify-center items-center">
<img src={transaction1} alt="" className="" />
</div>
<div>
<div className="name">
<p className="text-base text-dark-gray dark:text-white font-medium mb-1">
Add ETH from MetaMask
</p>
</div>
<div className="time">
<p className="text-sm text-thin-light-gray font-medium">
22 hours ago
</p>
</div>
</div>
</div>
<div>
<p className="eth text-xl font-bold text-dark-gray dark:text-white">
$512.44
</p>
<p className="usd text-base text-light-green text-right">
+324.75
</p>
</div>
</div>
</li>
</ul>
</div>
)}
:
<p className="w-full flex items-center justify-center text-xl text-dark-gray dark:text-white">No List Found!</p>
}
</div>
{/* PAGINATION BUTTON */}
<PaginatedList
onClick={handlePagination}
prev={currentPage == 0 ? true : false}
next={
currentPage + Number(process.env.REACT_APP_ITEM_PER_PAGE) >=
familySuggestList?.data?.length
? true
: false
}
data={familySuggestList?.data}
start={indexOfFirstItem}
stop={indexOfLastItem}
/>
{/* END OF PAGINATION BUTTON */}
</div>
);
}
+1 -1
View File
@@ -145,7 +145,7 @@ export default function MyJobTable({ className, ActiveJobList, Account }) {
>
<div
className={`p-2 font-bold text-3xl ${
accountType ? "text-white" : "text-purple"
accountType ? "text-white" : "text-sky-blue"
} whitespace-nowrap`}
>
You currently have {accountType ? '"0"' : "no"} task
+4 -1
View File
@@ -26,7 +26,10 @@ export default function MyTasks({
return (
<Layout>
<CommonHead commonHeadData={commonHeadData} />
{userDetails?.account_type == 'FULL' &&
<CommonHead commonHeadData={commonHeadData} />
}
<div className="notification-page w-full mb-10">
<div className="notification-wrapper w-full">
{/* heading */}
+1 -9
View File
@@ -124,15 +124,7 @@ export default function Sidebar({
iconName="market"
/>
)}
{userDetails && userDetails?.account_type == "FAMILY" && (
<ListItem
title="Family Market"
route="/familymarket"
// bubble={noOfJobs}
sidebar={sidebar}
iconName="market"
/>
)}
<ListItem
title="My Task(s)"
route="/mytask"
+5 -5
View File
@@ -25,16 +25,16 @@ const validationSchema = Yup.object().shape({
})
.required("Price is required"),
title: Yup.string()
.min(3, "Minimum 3 characters")
.max(100, "Maximum 25 characters")
.min(5, "Minimum 5 characters")
.max(149, "Maximum 149 characters")
.required("Title is required"),
description: Yup.string()
.min(3, "Minimum 3 characters")
.max(250, "Maximum 250 characters")
.min(5, "Minimum 5 characters")
.max(299, "Maximum 299 characters")
.required("Description is required"),
job_detail: Yup.string()
.min(3, "Minimum 3 characters")
.max(250, "Maximum 250 characters")
.max(1440, "Maximum 1440 characters")
.required("Details is required"),
timeline_days: Yup.number()
.typeError("you must specify a number")
+35
View File
@@ -0,0 +1,35 @@
export default function getTimeAgo(dateString) {
const date = new Date(dateString);
const now = new Date();
const timeDifference = now.getTime() - date.getTime();
const secondsDifference = Math.floor(timeDifference / 1000);
const minutesDifference = Math.floor(secondsDifference / 60);
const hoursDifference = Math.floor(minutesDifference / 60);
const daysDifference = Math.floor(hoursDifference / 24);
if (secondsDifference < 60) {
return "Just now";
} else if (minutesDifference < 60) {
return `${minutesDifference} ${
minutesDifference === 1 ? "minute" : "minutes"
} ago`;
} else if (hoursDifference < 24) {
return `${hoursDifference} ${hoursDifference === 1 ? "hour" : "hours"} ago`;
} else if (hoursDifference < 48) {
return "Yesterday";
} else if (daysDifference < 7) {
return `${daysDifference} ${daysDifference === 1 ? "day" : "days"} ago`;
} else if (daysDifference < 30) {
const weeksDifference = Math.floor(daysDifference / 7);
return `${weeksDifference} ${weeksDifference === 1 ? "week" : "weeks"} ago`;
} else if (daysDifference < 365) {
const monthsDifference = Math.floor(daysDifference / 30);
return `${monthsDifference} ${
monthsDifference === 1 ? "month" : "months"
} ago`;
} else {
const yearsDifference = Math.floor(daysDifference / 365);
return `${yearsDifference} ${yearsDifference === 1 ? "year" : "years"} ago`;
}
}
+25
View File
@@ -201,6 +201,18 @@ class usersService {
return this.postAuxEnd("/sendmoneyfee", postData);
}
getFamilySampleTasks() {
var postData = {
uid: localStorage.getItem("uid"),
member_id: localStorage.getItem("member_id"),
sessionid: localStorage.getItem("session_token"),
limit: 30,
offset: 0,
action: 22027,
};
return this.postAuxEnd("/familysampletasks", postData);
}
// Family Manage
ManageFamily(reqData) {
var postData = {
@@ -800,6 +812,19 @@ class usersService {
return this.postAuxEnd("/assigntask", postData);
}
// FUNCTION TO GET FAMILY SUGGEST LIST
getFamilySuggestList() {
var postData = {
uid: localStorage.getItem("uid"),
member_id: localStorage.getItem("member_id"),
sessionid: localStorage.getItem("session_token"),
limit: 30,
offset: 0,
action: 13010
};
return this.postAuxEnd("/familysuggestlist", postData);
}
/*
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(username)
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(password)
+1 -1
View File
@@ -17,7 +17,7 @@ module.exports = {
"white-opacity": "#7B7EFC",
"dark-white":"#1D1F2F",
"dark-light-purple":"#5356fb29",
'sky-blue': '#009ef7'
'sky-blue': '#3a8fc3'
},
},
},