Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f3b8190418 | |||
| 6a37da92f0 | |||
| 3d382695cd | |||
| 7231d97492 |
@@ -51,7 +51,7 @@ function AmountSection({ currency, amount, country }) {
|
|||||||
<div className={`flex items-center gap-8`}>
|
<div className={`flex items-center gap-8`}>
|
||||||
{/* text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1 */}
|
{/* text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1 */}
|
||||||
<h1 className="min-w-[150px] job-label">
|
<h1 className="min-w-[150px] job-label">
|
||||||
Amount({currency})
|
Amount ({currency})
|
||||||
</h1>
|
</h1>
|
||||||
<span className="min-w-[100px] text-base text-right font-normal text-dark-gray dark:text-white tracking-tighter my-1">
|
<span className="min-w-[100px] text-base text-right font-normal text-dark-gray dark:text-white tracking-tighter my-1">
|
||||||
{formattedAmount}
|
{formattedAmount}
|
||||||
@@ -91,7 +91,7 @@ function TotalSection({ currency, amount, fee, country }) {
|
|||||||
return (
|
return (
|
||||||
<div className={`flex items-center gap-8`}>
|
<div className={`flex items-center gap-8`}>
|
||||||
<h1 className="min-w-[150px] job-label">
|
<h1 className="min-w-[150px] job-label">
|
||||||
Total
|
Total ({currency})
|
||||||
</h1>
|
</h1>
|
||||||
<span className="min-w-[100px] text-base text-right font-normal text-dark-gray dark:text-white tracking-tighter my-1">
|
<span className="min-w-[100px] text-base text-right font-normal text-dark-gray dark:text-white tracking-tighter my-1">
|
||||||
{formattedTotal}
|
{formattedTotal}
|
||||||
|
|||||||
@@ -6,10 +6,18 @@ import CommonHead from "../UserHeader/CommonHead";
|
|||||||
import usersService from "../../services/UsersService";
|
import usersService from "../../services/UsersService";
|
||||||
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
||||||
import OthersInterestedTable from "./OthersInterestedTable";
|
import OthersInterestedTable from "./OthersInterestedTable";
|
||||||
import { useDispatch } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import { tableReload } from "../../store/TableReloads";
|
import { tableReload } from "../../store/TableReloads";
|
||||||
|
import { PriceFormatter } from "../Helpers/PriceFormatter";
|
||||||
|
|
||||||
export default function ManageInterestOffer(props) {
|
export default function ManageInterestOffer(props) {
|
||||||
|
|
||||||
|
const { walletDetails } = useSelector((state) => state?.walletDetails); // WALLET STORE
|
||||||
|
|
||||||
|
let walletBal = walletDetails?.data?.filter(wallet => wallet.code == props?.offerDetails?.currency_code) // USER WALLET BALANCE FOR CORRESPONDING TASK CURRENCY
|
||||||
|
|
||||||
|
let clientAdded = new Date(props.offerDetails?.client_added)
|
||||||
|
|
||||||
const dispatch = useDispatch()
|
const dispatch = useDispatch()
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
const apiCall = new usersService()
|
const apiCall = new usersService()
|
||||||
@@ -183,12 +191,21 @@ export default function ManageInterestOffer(props) {
|
|||||||
<button
|
<button
|
||||||
name="message"
|
name="message"
|
||||||
onClick={(e) => setTab(e.target.name)}
|
onClick={(e) => setTab(e.target.name)}
|
||||||
className={`px-4 py-1 rounded-t-2xl ${
|
className={`px-4 py-1 rounded-t-2xl flex gap-2 ${
|
||||||
tab == "message" ? "bg-[#4687ba] border-[2px] border-[#4687ba] text-white" : "bg-white text-[#000] border-t-[2px]"
|
tab == "message" ? "bg-[#4687ba] border-[2px] border-[#4687ba] text-white" : "bg-white text-[#000] border-t-[2px]"
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
Messages ({messageList.data.length})
|
Messages ({messageList.data.length})
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
name="details"
|
||||||
|
onClick={(e) => setTab(e.target.name)}
|
||||||
|
className={`px-4 py-1 rounded-t-2xl ${
|
||||||
|
tab == "details" ? "bg-[#4687ba] border-[2px] border-[#4687ba] text-white" : "bg-white text-[#000] border-t-[2px]"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
Delivery Details
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{/* END OF switch button */}
|
{/* END OF switch button */}
|
||||||
|
|
||||||
@@ -202,7 +219,10 @@ export default function ManageInterestOffer(props) {
|
|||||||
</div>
|
</div>
|
||||||
<div className="my-3 md:my-0 flex items-center gap-1">
|
<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="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">{props.offerDetails?.client_added}</span>
|
<span className="min-w-[100px] text-sm font-bold text-dark-gray dark:text-white tracking-wide">
|
||||||
|
{clientAdded.getFullYear()}{" - "}
|
||||||
|
{clientAdded.getMonth() < 9 ? '0'+ (clientAdded.getMonth() + 1) : clientAdded.getMonth() + 1}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="my-3 flex items-center gap-1">
|
<div className="my-3 flex items-center gap-1">
|
||||||
@@ -230,7 +250,7 @@ export default function ManageInterestOffer(props) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
:
|
: tab == 'message' ?
|
||||||
<div className="message-details w-full border-t">
|
<div className="message-details w-full border-t">
|
||||||
<p className="my-1 text-base text-dark-gray dark:text-white tracking-wide">To: <span className="font-bold">{props.offerDetails?.client_name}</span></p>
|
<p className="my-1 text-base text-dark-gray dark:text-white tracking-wide">To: <span className="font-bold">{props.offerDetails?.client_name}</span></p>
|
||||||
<div className="w-full flex items-center gap-5">
|
<div className="w-full flex items-center gap-5">
|
||||||
@@ -294,14 +314,31 @@ export default function ManageInterestOffer(props) {
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
: tab == 'details' ?
|
||||||
|
<div className="info-details w-full border-t">
|
||||||
|
<h1 className="my-3 text-base font-medium text-dark-gray dark:text-white tracking-wide">{props?.offerDetails?.description}</h1>
|
||||||
|
</div>
|
||||||
|
:
|
||||||
|
null
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* END OF Detail section */}
|
{/* END OF Detail section */}
|
||||||
|
|
||||||
{/* BUTTON section */}
|
|
||||||
<div className="p-4 w-full min-h-full bg-sky-100 dark:bg-dark-gray col-span-1">
|
<div className="p-4 w-full min-h-full bg-sky-100 dark:bg-dark-gray col-span-1">
|
||||||
<div className="w-full h-full">
|
{/* Wallet balance and reward */}
|
||||||
|
<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>
|
||||||
|
</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>
|
||||||
|
<span className="font-medium text-dark-gray dark:text-white">{PriceFormatter(props?.offerDetails?.price * 0.01,props?.offerDetails?.currency_code,props?.offerDetails?.currency)}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/* BUTTON section */}
|
||||||
|
<div className="w-full">
|
||||||
<div className="h-full flex sm:flex-col justify-center items-center gap-10">
|
<div className="h-full flex sm:flex-col justify-center items-center gap-10">
|
||||||
{requestStatus.loading && requestStatus.processType == 'accept' ?
|
{requestStatus.loading && requestStatus.processType == 'accept' ?
|
||||||
<LoadingSpinner color='sky-blue' size='10' />
|
<LoadingSpinner color='sky-blue' size='10' />
|
||||||
@@ -333,6 +370,7 @@ export default function ManageInterestOffer(props) {
|
|||||||
</button>
|
</button>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
{/* END of BUTTON section */}
|
||||||
|
|
||||||
{/* ERROR DISPLAY */}
|
{/* ERROR DISPLAY */}
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
@@ -357,7 +395,6 @@ export default function ManageInterestOffer(props) {
|
|||||||
{/* End of error or success display */}
|
{/* End of error or success display */}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* END of BUTTON section */}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* END OF manage offer section */}
|
{/* END OF manage offer section */}
|
||||||
|
|||||||
@@ -100,9 +100,21 @@ export default function OffersInterestTable({offerInterestList, className}) {
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
type="button"
|
type="button"
|
||||||
className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
|
className='w-12 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white'
|
||||||
>
|
>
|
||||||
View
|
<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>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -101,9 +101,22 @@ export default function OthersInterestTable({othersInterestedList, className}) {
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
type="button"
|
type="button"
|
||||||
className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
|
className="w-12 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
|
||||||
>
|
>
|
||||||
View
|
{/* View */}
|
||||||
|
<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>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user