Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f4e5ba1586 | |||
| 3ee01736db | |||
| b7b09fca66 | |||
| d1e9c21dbb | |||
| 6ceb771005 | |||
| 7d3d5eb8c2 | |||
| 6c39686ee2 | |||
| da24c8a535 |
@@ -50,9 +50,9 @@ export default function MyOffersTable({ className, MyActiveOffersList}) {
|
||||
// }
|
||||
};
|
||||
|
||||
// if ( !MyActiveOffersList || MyActiveOffersList?.result_list?.length == 0 ){
|
||||
// return(''); // want blank or no appear when no items
|
||||
// }
|
||||
if ( !MyActiveOffersList || MyActiveOffersList?.result_list?.length == 0 ){
|
||||
return(''); // want blank or no appear when no items
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -113,11 +113,9 @@ export default function MyOffersTable({ className, MyActiveOffersList}) {
|
||||
</div>
|
||||
<div className="slider-content">
|
||||
<SliderCom settings={settings} selector={sellSlider}>
|
||||
{ MyActiveOffersList.loading ?
|
||||
<LoadingSpinner size={16} color='sky-blue' />
|
||||
:
|
||||
MyActiveOffersList?.data?.length > 0 ?
|
||||
MyActiveOffersList.data.map((value, index) => (
|
||||
{
|
||||
MyActiveOffersList && MyActiveOffersList?.result_list?.length > 0 &&
|
||||
MyActiveOffersList?.result_list?.map((value, index) => (
|
||||
<div className="item" key={index}>
|
||||
<div className="offer-slide-item flex flex-col justify-between items-center">
|
||||
{/* title */}
|
||||
@@ -155,23 +153,6 @@ export default function MyOffersTable({ className, MyActiveOffersList}) {
|
||||
|
||||
</div>
|
||||
))
|
||||
:
|
||||
MyActiveOffersList.status ?
|
||||
(
|
||||
<div className="font-bold text-xl text-dark-gray dark:text-white whitespace-nowrap">
|
||||
<div className="p-2">
|
||||
No Tasks!
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
:
|
||||
(
|
||||
<div className="font-bold text-xl text-dark-gray dark:text-white whitespace-nowrap">
|
||||
<p className="p-2">
|
||||
Error Occurred! Unable to display Tasks!
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -19,8 +19,7 @@ function PurchasesTable({purchase}) {
|
||||
<table className="wallet-activity w-full table-auto border-collapse text-left">
|
||||
<thead className='border-b-2'>
|
||||
<tr className='text-slate-600'>
|
||||
<th className="p-2">Date</th>
|
||||
<th className="p-2">Description</th>
|
||||
<th className="p-4">Trx.</th>
|
||||
<th className="p-2">Amount</th>
|
||||
<th className="p-2">Fee</th>
|
||||
</tr>
|
||||
@@ -30,8 +29,9 @@ function PurchasesTable({purchase}) {
|
||||
<tbody>
|
||||
{currentPurchase.map((item, index) => (
|
||||
<tr key={index} className='text-slate-500'>
|
||||
<td className="p-2">{item.added_date}</td>
|
||||
<td className="p-2">{item.confirmation}</td>
|
||||
<td className="p-4">{item.added_date}<br />
|
||||
<b>{item.confirmation} </b>
|
||||
</td>
|
||||
<td className="p-2">{item.amount}</td>
|
||||
<td className="p-2">{item.fee}</td>
|
||||
</tr>
|
||||
|
||||
@@ -20,9 +20,9 @@ function RecentActivityTable({payment}) {
|
||||
<thead className='border-b-2'>
|
||||
<tr className='text-slate-600'>
|
||||
<th className="p-2">Date</th>
|
||||
<th className="p-2">Recipient</th>
|
||||
<th className="p-2">Amount/Fee</th>
|
||||
<th className="p-2">Conf/Status</th>
|
||||
<th className="p-4">Trx.</th>
|
||||
<th className="p-2">Amnt./Fee</th>
|
||||
<th className="p-2">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{payment.data.length ?
|
||||
@@ -31,8 +31,8 @@ function RecentActivityTable({payment}) {
|
||||
{currentActivity.map((item, index) => (
|
||||
<tr key={index} className='text-slate-500'>
|
||||
<td className="p-2">{item.trx_date}</td>
|
||||
<td className="p-2" dangerouslySetInnerHTML={{__html:item.recipient}}></td>
|
||||
<td className="p-2">{item.amount}/{item.fee}</td>
|
||||
<td className="p-4" dangerouslySetInnerHTML={{__html:item.recipient}}></td>
|
||||
<td className="p-2">{item.amount}<br />{item.fee}</td>
|
||||
<td className="p-2">{item.status}</td>
|
||||
</tr>
|
||||
))}
|
||||
|
||||
@@ -91,7 +91,7 @@ function OfferJobPopout({details, onClose, situation}) {
|
||||
</div>
|
||||
<div className='md:flex bg-white rounded-lg shadow-lg'>
|
||||
<div className='p-4 w-full md:w-3/4 md:border-r-2'>
|
||||
<p className='text-lg my-5 font-semibold text-slate-900 tracking-wide'>Opportunity to make some money by introducing 10 of our recent stories from our</p>
|
||||
<p className='text-lg my-5 font-semibold text-slate-900 tracking-wide'>{details.title}</p>
|
||||
|
||||
{/* INPUT SECTION */}
|
||||
<div className='my-2 md:flex'>
|
||||
@@ -148,7 +148,7 @@ function OfferJobPopout({details, onClose, situation}) {
|
||||
name='accept'
|
||||
onClick={handleOffer}
|
||||
disabled={requestStatus.loading}
|
||||
className='px-2 py-1 text-sm text-white btn-gradient tracking-wide rounded-md'>
|
||||
className='px-2 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white'>
|
||||
Accept Offer
|
||||
</button>
|
||||
}
|
||||
@@ -162,7 +162,7 @@ function OfferJobPopout({details, onClose, situation}) {
|
||||
name='reject'
|
||||
onClick={handleOffer}
|
||||
disabled={requestStatus.loading}
|
||||
className='px-2 py-1 text-sm text-white bg-red-500 hover:opacity-90 rounded-md'>
|
||||
className='px-2 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white'>
|
||||
Reject Offer
|
||||
</button>
|
||||
}
|
||||
@@ -191,9 +191,9 @@ function OfferJobPopout({details, onClose, situation}) {
|
||||
onClick={onClose}
|
||||
disabled={requestStatus.loading}
|
||||
type="button"
|
||||
className=" border-gradient text-18 tracking-wide px-2 py-2 rounded-full"
|
||||
className="border-gradient text-18 tracking-wide px-2 py-2 rounded-full"
|
||||
>
|
||||
<span className="text-gradient">Close</span>
|
||||
<span className="text-gradient">Cancel</span>
|
||||
</button>
|
||||
</div>
|
||||
{/* end of close button */}
|
||||
|
||||
@@ -39,7 +39,7 @@ function PendingJobsPopout({details, onClose, situation}) {
|
||||
</div>
|
||||
<div className='md:flex bg-white rounded-lg shadow-lg'>
|
||||
<div className='p-4 w-full md:w-3/4 md:border-r-2'>
|
||||
<p className='text-base font-semibold text-slate-900 tracking-wide'>Opportunity to make some money by introducing 10 of our recent stories from our</p>
|
||||
<p className='text-base font-semibold text-slate-900 tracking-wide'>{details.title}</p>
|
||||
<div className='my-2 p-2 flex justify-start items-center space-x-2 bg-red-100 border-2 border-red-300'>
|
||||
<span className='w-8 h-8 text-center text-sm rounded-full flex justify-center items-center text-red-300 bg-yellow-100'>!</span>
|
||||
<div className=''>
|
||||
@@ -110,15 +110,15 @@ function PendingJobsPopout({details, onClose, situation}) {
|
||||
</div>
|
||||
|
||||
<div className='my-3'>
|
||||
<button className='px-2 py-1 text-sm text-white btn-gradient tracking-wide rounded-md'>Extend by a week</button>
|
||||
<button className='px-2 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white'>Extend by a week</button>
|
||||
</div>
|
||||
|
||||
<div className='my-3'>
|
||||
<button className='px-2 py-1 text-sm text-white btn-gradient tracking-wide rounded-md'>Send to me</button>
|
||||
<button className='px-2 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white'>Send to me</button>
|
||||
</div>
|
||||
|
||||
<div className='mt-10 md:mt-32 md:flex md:justify-center'>
|
||||
<button className='px-2 py-1 text-sm text-white bg-red-500 hover:opacity-90 rounded-md'>Cancel Offer</button>
|
||||
<button className='px-2 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white'>Cancel Offer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@ export default function MyTaskPage() {
|
||||
const {jobListTable} = useSelector((state) => state.tableReload)
|
||||
|
||||
const [MyActiveJobList, setMyActiveJobList] = useState({loading: true, status:false, data:[]});
|
||||
const [MyActiveOffersList, setMyActiveOffersList] = useState({loading: true, status:false, data:[]});
|
||||
const [MyActiveOffersList, setMyActiveOffersList] = useState([]);
|
||||
const api = new usersService();
|
||||
const commonHeadData =()=>{
|
||||
console.log("COMMON HEAD DATA ----------------=====---------------------");
|
||||
@@ -26,12 +26,12 @@ export default function MyTaskPage() {
|
||||
}
|
||||
};
|
||||
const getMyActiveOffersList = async () => {
|
||||
setMyActiveOffersList({loading: true, status:false, data:[]});
|
||||
// setMyActiveOffersList({loading: true, status:false, data:[]});
|
||||
try {
|
||||
const res = await api.getOffersList();
|
||||
setMyActiveOffersList({loading: false, status:true, data:res.data.result_list});
|
||||
setMyActiveOffersList(res.data);
|
||||
} catch (error) {
|
||||
setMyActiveOffersList({loading: false, status:false, data:[]});
|
||||
// setMyActiveOffersList({loading: false, status:false, data:[]});
|
||||
console.log("Error getting offers");
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user