Compare commits

...

4 Commits

5 changed files with 107 additions and 68 deletions
@@ -32,6 +32,7 @@ export default function RelativeTable({relativeList, familyList}) {
<tr> <tr>
<th className='py-4 px-2'></th> <th className='py-4 px-2'></th>
<th className='py-4 px-2'></th> <th className='py-4 px-2'></th>
<th className='py-4 px-2 text-center'>Status</th>
<th className='py-4 px-2 text-center'>Kids</th> <th className='py-4 px-2 text-center'>Kids</th>
<th className='py-4 px-2'></th> <th className='py-4 px-2'></th>
</tr> </tr>
@@ -58,6 +59,9 @@ export default function RelativeTable({relativeList, familyList}) {
<td className='py-4 px-2 text-center'> <td className='py-4 px-2 text-center'>
{value.status && value.status} {value.status && value.status}
</td> </td>
<td className='py-4 px-2 text-center'>
{value.kid_count && value.kid_count}
</td>
<td className='py-4 px-2 flex items-center justify-end'> <td className='py-4 px-2 flex items-center justify-end'>
<button <button
onClick={() => setRelativePopout({show:true, data:{relativeSelected:value}})} onClick={() => setRelativePopout({show:true, data:{relativeSelected:value}})}
@@ -143,8 +143,8 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
</div> </div>
<div className="md:grid md:grid-cols-4 bg-white dark:bg-dark-white text-slate-900 dark:text-white rounded-lg"> <div className="md:grid md:grid-cols-4 bg-white dark:bg-dark-white text-slate-900 dark:text-white rounded-lg">
<div className="p-4 w-full md:col-span-3 md:border-r-1"> <div className="px-4 py-1 w-full md:col-span-3 md:border-r-1">
<div className="min-h-[240px]"> <div className="min-h-[300px]">
<h2 className="font-semibold text-slate-900 dark:text-white tracking-wide"> <h2 className="font-semibold text-slate-900 dark:text-white tracking-wide">
{details?.title} {details?.title}
</h2> </h2>
@@ -168,15 +168,15 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
danger: true, danger: true,
}, },
].map(({ name, content, danger }, idx) => ( ].map(({ name, content, danger }, idx) => (
<div className={`my-3 md:flex items-center`} key={idx}> <div className={`my-3 md:flex items-start`} key={idx}>
<label className="job-label w-full md:w-[19%]"> <label className="py-2 job-label w-full md:w-[19%]">
{name} {name}
</label> </label>
<div <div
className={`w-full p-2 md:w-3/4 text-slate-900 dark:text-white market-pop ${ className={`w-full p-2 md:w-3/4 text-slate-900 dark:text-white market-pop rounded-2xl ${
name == "Description" name == "Description"
? "min-h-[100px] max-h-[100px] h-full overflow-y-auto break-words" ? "min-h-[150px] max-h-[150px] h-full overflow-y-auto break-words bg-slate-50"
: name == "Delivery Detail" ? " overflow-y-auto h-full min-h-[100px] max-h-[100px]" : name == "Delivery Detail" ? " overflow-y-auto h-full min-h-[150px] max-h-[150px] bg-slate-50"
: "h-full flex items-center" : "h-full flex items-center"
}`} }`}
> >
@@ -215,43 +215,63 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
))} ))}
</div> </div>
<hr className='my-1' /> <hr className='my-1' />
<div className="w-full flex flex-col gap-3"> <div className='w-full'>
<div className="w-full"> <label className="job-label w-full flex gap-2 items-center">
<label className="job-label w-full"> If you have any questions about this task:
If you have any questions about this task: <span className={`text-sm ${marketMsg.state ? 'text-[#57cd89]' : 'text-red-500'}`}>
</label>
<textarea
className={`p-1 w-full text-sm text-slate-900 dark:text-white ${
marketMsg.loading && "italic text-[#9CA3AF]"
} bg-transparent outline-none border-2 border-slate-300 rounded-md`}
rows="3"
style={{ resize: "none" }}
placeholder="Enter message here ..."
value={marketMsg.loading ? "Sending..." : textValue}
onChange={handleInputChange}
/>
</div>
<div className="relative flex w-full justify-end ">
<span className="text-sm text-[#57cd89] absolute left-[8rem] top-4">
{marketMsg.state && "Message Sent!"} {marketMsg.state && "Message Sent!"}
{errMsg.market && "Something went wrong"} {errMsg.market && "Failed to send"}
</span> </span>
<button </label>
className="custom-btn self-end bg-yellow-500 text-white" <div className="w-full flex items-center gap-3">
name="market-message" <div className="w-full">
onClick={MarketDetail} <textarea
> className={`p-1 w-full text-sm text-slate-900 dark:text-white ${
{marketMsg.loading ? ( marketMsg.loading && "italic text-[#9CA3AF]"
<LoadingSpinner size={5} color="white" /> } bg-transparent outline-none border-2 border-slate-300 rounded-md`}
) : ( rows="3"
"Send Message" style={{ resize: "none" }}
)} placeholder="Enter message here ..."
</button> value={marketMsg.loading ? "Sending..." : textValue}
onChange={handleInputChange}
/>
</div>
<div className="relative flex flex-col">
<button
className="rounded-full flex justify-center items-center w-12 h-11 bg-yellow-500 text-white"
name="market-message"
onClick={MarketDetail}
disabled={marketMsg.loading}
>
{marketMsg.loading ? (
<LoadingSpinner size={5} color="white" />
) : (
// "Send Message"
<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>
{/* <span className="text-sm text-[#57cd89]">
{marketMsg.state && "Sent!"}
{errMsg.market && "Failed"}
</span> */}
</div>
</div> </div>
</div> </div>
</div> </div>
<div className="py-2 w-full md:col-span-1 h-full flex flex-col"> <div className="py-2 w-full md:col-span-1 h-full flex flex-col rounded-2xl">
<div className="mx-auto bg-[#f1f8ff] dark:bg-[#C2C8D3] px-4 rounded-md w-full h-full md:min-h-[420px] flex flex-col justify-between"> <div className="mx-auto bg-[#f1f8ff] dark:bg-[#C2C8D3] px-4 rounded-md w-full h-full md:min-h-[420px] flex flex-col justify-between">
<div className="w-full flex flex-col justify-center pb-4 gap-2"> <div className="w-full flex flex-col justify-center pb-4 gap-2">
<p className="job-label w-full"> <p className="job-label w-full">
+15 -4
View File
@@ -107,11 +107,22 @@ export default function MyPendingJobTable({ MyJobList, className }) {
onClick={() => { onClick={() => {
setJobPopout({ show: true, data: value }); setJobPopout({ show: true, data: value });
}} }}
className="px-4 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"
> >
{value.owner_status == "OWNER" {/* {value.owner_status == "OWNER" ? "Manage": "View"} */}
? "Manage" <svg
: "View"} 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>
@@ -165,7 +165,7 @@ export default function ManageInterestOffer(props) {
{/* manage offer section */} {/* manage offer section */}
<div className="w-full p-4 bg-white dark:bg-dark-white rounded-2xl section-shadow"> <div className="w-full p-4 bg-white dark:bg-dark-white rounded-2xl section-shadow">
<div className="my-2 w-full sm:grid gap-5 grid-cols-4"> <div className="my-2 w-full md:grid gap-5 grid-cols-4">
{/* Detail section */} {/* Detail section */}
<div className="w-full mb-5 lg:mb-0 col-span-3"> <div className="w-full mb-5 lg:mb-0 col-span-3">
<div className="w-full flex justify-start space-x-3 items-center"> <div className="w-full flex justify-start space-x-3 items-center">
@@ -232,14 +232,18 @@ export default function ManageInterestOffer(props) {
<div className="info-details w-full border-t"> <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-0 md:my-3 block md:flex items-center gap-10">
<div className="my-3 md:my-0 flex items-center gap-1"> <div className="my-3 md:my-0 flex items-center gap-1">
<p className="w-[200px] text-lg font-bold text-black dark:text-white tracking-wide">Name</p> <p className="text-xl font-extrabold text-black dark:text-white tracking-wide">
<p className="min-w-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">{props.offerDetails?.client_name}</p> Name : {' '}
<span className="text-lg font-normal text-dark-gray dark:text-white tracking-wide">{props.offerDetails?.client_name}</span>
</p>
</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">
<p className="w-[200px] text-lg font-bold text-black dark:text-white tracking-wide">Member Since</p> <p className="text-xl font-extrabold text-black dark:text-white tracking-wide">
<p className="min-w-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide"> Member Since : {' '}
{clientAdded.getFullYear()}{" - "} <span className="text-lg font-normal text-dark-gray dark:text-white tracking-wide">
{clientAdded.getMonth() < 9 ? '0'+ (clientAdded.getMonth() + 1) : clientAdded.getMonth() + 1} {clientAdded.getFullYear()}{" - "}
{clientAdded.getMonth() < 9 ? '0'+ (clientAdded.getMonth() + 1) : clientAdded.getMonth() + 1}
</span>
</p> </p>
</div> </div>
</div> </div>
@@ -248,35 +252,35 @@ export default function ManageInterestOffer(props) {
<LoadingSpinner color='sky-blue' size='10' height='min-h-[40px]' /> <LoadingSpinner color='sky-blue' size='10' height='min-h-[40px]' />
: :
<> <>
<div className='w-full'> <div className='w-full my-3 md:my-0'>
<h1 className="text-xl font-extrabold text-black dark:text-white tracking-wide">Previous Job Statistics</h1> <h1 className="text-xl font-extrabold text-black dark:text-white tracking-wide">Previous Job Statistics</h1>
</div> </div>
<div className='p-2 flex flex-col md:flex-row gap-4 justify-center items-center max-w-xl rounded-2xl bg-sky-100'> <div className='p-2 w-full md:max-w-xl flex flex-col md:flex-row gap-4 justify-center items-center rounded-2xl bg-sky-100'>
<div className='contents md:flex flex-col gap-3'> <div className='contents md:flex flex-col gap-3'>
<div className='flex items-center gap-4'> <div className='flex items-center gap-1'>
<p className="min-w-[150px] text-lg font-bold text-black dark:text-white tracking-wide text-right">Completed:</p> <p className="min-w-[150px] text-lg font-bold text-black 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> <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>
<div className="flex items-center gap-4"> <div className="flex items-center gap-1">
<p className="min-w-[150px] text-lg font-bold text-black dark:text-white tracking-wide text-right">Active:</p> <p className="min-w-[150px] text-lg font-bold text-black 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> <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>
<div className="flex items-center gap-4"> <div className="flex items-center gap-1">
<p className="min-w-[150px] text-lg font-bold text-black dark:text-white tracking-wide text-right">% Completion:</p> <p className="min-w-[150px] text-lg font-bold text-black 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> <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> </div>
<div className='contents md:flex flex-col gap-3'> <div className='contents md:flex flex-col gap-3'>
<div className="flex items-center gap-4"> <div className="flex items-center gap-1">
<p className="min-w-[150px] text-lg font-bold text-black dark:text-white tracking-wide text-right">Last Completed:</p> <p className="min-w-[150px] text-lg font-bold text-black 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> <p className="min-w-[100px] 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="flex items-center gap-4"> <div className="flex items-center gap-1">
<p className="min-w-[150px] text-lg font-bold text-black dark:text-white tracking-wide text-right">Uncompleted:</p> <p className="min-w-[150px] text-lg font-bold text-black 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> <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 className="flex items-center gap-4"> <div className="flex items-center gap-1">
<p className="min-w-[150px] text-lg font-bold text-black dark:text-white tracking-wide text-right">Pending Offers:</p> <p className="min-w-[150px] text-lg font-bold text-black 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> <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>
@@ -392,7 +396,7 @@ export default function ManageInterestOffer(props) {
<div className="p-4 w-full min-h-full bg-sky-100 rounded-2xl dark:bg-dark-gray col-span-1"> <div className="p-4 w-full min-h-full bg-sky-100 rounded-2xl dark:bg-dark-gray col-span-1">
{/* Wallet balance and reward */} {/* Wallet balance and reward */}
<div className='mb-4 border-b-2 flex flex-col justify-center items-center gap-4'> <div className='mb-4 border-b-2 flex flex-col xxs:flex-row md:flex-col justify-center items-center gap-4'>
<div className='w-full flex flex-col lg:flex-row justify-center items-center gap-2'> <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> <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">{ walletDetails?.loading ? 'loading...' : 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>
@@ -404,7 +408,7 @@ export default function ManageInterestOffer(props) {
</div> </div>
{/* BUTTON section */} {/* BUTTON section */}
<div className="w-full"> <div className="w-full">
<div className="h-full flex sm:flex-col justify-center items-center gap-10"> <div className="h-full flex flex-col xxs:flex-row md: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' />
: :
@@ -65,11 +65,11 @@ export default function OthersInterestTable({othersInterestedList, className}) {
<tr key={index} className="bg-white dark:bg-dark-white border-b dark:border-[#5356fb29] hover:bg-gray-50"> <tr key={index} className="bg-white dark:bg-dark-white border-b dark:border-[#5356fb29] hover:bg-gray-50">
<td className=" py-4"> <td className=" py-4">
<div className="flex space-x-2 items-center"> <div className="flex space-x-2 items-center">
<div className="min-w-[60px] min-h-[60px] rounded-full overflow-hidden flex justify-center items-center"> <div className="w-[60px] h-[60px] p-2 bg-alice-blue rounded-full overflow-hidden flex justify-center items-center">
<img <img
src={image} src={image}
alt="data" alt="data"
className="w-full h-full" className="w-full h-full rounded-full"
/> />
</div> </div>
<div className="flex flex-col"> <div className="flex flex-col">