Merge branch 'family-suggest-list' of WrenchBoard/Users-Wrench into master
This commit is contained in:
@@ -23,16 +23,17 @@ export default function ParentWaiting({ className }) {
|
|||||||
Waiting for Parent to Get Started...
|
Waiting for Parent to Get Started...
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div className="overview-section-wrapper lg:flex lg:h-[494px] lg:pace-x-2 flex-1 lg:gap-8">
|
{/* <div className="overview-section-wrapper py-2 min-h-[450px] lg:flex lg:space-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-[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
|
<img
|
||||||
src={activeAidsBanner}
|
src={activeAidsBanner}
|
||||||
alt="banner"
|
alt="banner"
|
||||||
className="w-full lg:h-full h-[400px]"
|
className="w-full h-full"
|
||||||
/>
|
/>
|
||||||
</div>
|
</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 />}
|
{<ParentWaitingTable />}
|
||||||
|
|
||||||
{/* <div className="lg:mb-0 mb-3">*/}
|
{/* <div className="lg:mb-0 mb-3">*/}
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import transaction1 from "../../assets/images/recent-transation-1.png";
|
import transaction1 from "../../assets/images/recent-transation-1.png";
|
||||||
import transaction2 from "../../assets/images/recent-transation-2.png";
|
import transaction2 from "../../assets/images/recent-transation-2.png";
|
||||||
import transaction3 from "../../assets/images/recent-transation-3.png";
|
import transaction3 from "../../assets/images/recent-transation-3.png";
|
||||||
|
|
||||||
|
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
||||||
|
import { handlePagingFunc } from "../Pagination/HandlePagination";
|
||||||
|
import PaginatedList from "../Pagination/PaginatedList";
|
||||||
|
import usersService from "../../services/UsersService";
|
||||||
|
|
||||||
|
|
||||||
export default function ParentWaitingTable() {
|
export default function ParentWaitingTable() {
|
||||||
const transationFilterData = [
|
const transationFilterData = [
|
||||||
{
|
{
|
||||||
@@ -25,11 +31,34 @@ export default function ParentWaitingTable() {
|
|||||||
const filterHander = (value) => {
|
const filterHander = (value) => {
|
||||||
setValue(value);
|
setValue(value);
|
||||||
};
|
};
|
||||||
return (
|
|
||||||
<div className="rounded-2xl bg-white dark:bg-dark-white ">
|
|
||||||
{/* heading */}
|
|
||||||
<div className="heading sm:flex justify-between items-center">
|
|
||||||
|
|
||||||
|
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>
|
<div>
|
||||||
<ul className="flex space-x-5 items-center">
|
<ul className="flex space-x-5 items-center">
|
||||||
{transationFilterData.map((value) => (
|
{transationFilterData.map((value) => (
|
||||||
@@ -43,297 +72,68 @@ export default function ParentWaitingTable() {
|
|||||||
{value.name}
|
{value.name}
|
||||||
</li>
|
</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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> */}
|
||||||
{/* content */}
|
|
||||||
|
|
||||||
{filterActive === 2 ? (
|
{/* content */}
|
||||||
<div className="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>
|
<ul>
|
||||||
<li className="content-item py-3 border-b dark:border-[#5356fb29] border-light-purple dark:border-[#5356fb29] hover:border-purple">
|
{currentList.map((item)=>(
|
||||||
<div className="flex justify-between items-center">
|
<li key={item.uid} className="content-item py-2 border-b dark:border-[#5356fb29] border-light-purple hover:border-purple">
|
||||||
<div className="account-name flex space-x-4 items-center">
|
<div className="w-full flex justify-between items-center">
|
||||||
<div className="icon w-14 h-14 flex justify-center items-center">
|
<div className="account-name flex space-x-4 items-center">
|
||||||
<img src={transaction1} alt="" className="" />
|
<div className="icon w-14 h-14 flex justify-center items-center">
|
||||||
</div>
|
<img src={transaction1} alt="" className="" />
|
||||||
<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>
|
||||||
<div className="time">
|
<div className="">
|
||||||
|
<p className="text-lg text-dark-gray dark:text-white font-medium mb-[.5px]">
|
||||||
|
{item.title}
|
||||||
|
</p>
|
||||||
|
|
||||||
<p className="text-sm text-thin-light-gray font-medium">
|
<p className="text-sm text-thin-light-gray font-medium">
|
||||||
22 hours ago
|
{item.description}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div className="">
|
||||||
<div>
|
<p className="px-2 text-sm font-bold text-dark-gray dark:text-white">
|
||||||
<p className="eth text-xl font-bold text-dark-gray dark:text-white">
|
{new Date(item.added).toLocaleString().split(',')[0]}
|
||||||
$512.44
|
{/* {item.added} */}
|
||||||
</p>
|
</p>
|
||||||
<p className="usd text-base text-light-green text-right">
|
{/* <p className="usd text-base text-light-green text-right"></p> */}
|
||||||
+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>
|
</div>
|
||||||
<div>
|
</li>
|
||||||
<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>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
:
|
||||||
) : filterActive === 3 ? (
|
<p className="w-full flex items-center justify-center text-xl text-dark-gray dark:text-white">No List Found!</p>
|
||||||
<div className="content">
|
}
|
||||||
<ul>
|
</div>
|
||||||
<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">
|
{/* PAGINATION BUTTON */}
|
||||||
<div className="account-name flex space-x-4 items-center">
|
<PaginatedList
|
||||||
<div className="icon w-14 h-14 flex justify-center items-center">
|
onClick={handlePagination}
|
||||||
<img src={transaction1} alt="" className="" />
|
prev={currentPage == 0 ? true : false}
|
||||||
</div>
|
next={
|
||||||
<div>
|
currentPage + Number(process.env.REACT_APP_ITEM_PER_PAGE) >=
|
||||||
<div className="name">
|
familySuggestList?.data?.length
|
||||||
<p className="text-base text-dark-gray dark:text-white font-medium mb-1">
|
? true
|
||||||
Add ETH from MetaMask
|
: false
|
||||||
</p>
|
}
|
||||||
</div>
|
data={familySuggestList?.data}
|
||||||
<div className="time">
|
start={indexOfFirstItem}
|
||||||
<p className="text-sm text-thin-light-gray font-medium">
|
stop={indexOfLastItem}
|
||||||
22 hours ago
|
/>
|
||||||
</p>
|
{/* END OF PAGINATION BUTTON */}
|
||||||
</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>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -812,6 +812,19 @@ class usersService {
|
|||||||
return this.postAuxEnd("/assigntask", postData);
|
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(username)
|
||||||
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(password)
|
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(password)
|
||||||
|
|||||||
Reference in New Issue
Block a user