Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5a97e9a185 | |||
| 7eb26ce88a | |||
| 3876e1440d | |||
| df1a006f13 | |||
| 77ab969f61 | |||
| 6da9b9158d |
@@ -21,14 +21,45 @@ const RelativePopout = ({
|
||||
|
||||
const {userDetails} = useSelector((state) => state?.userDetails); // CHECKS IF USER Details are avaliable, to determine if user is active
|
||||
|
||||
const [relativeSettings, setRelativeSettings] = useState({loading:true, data:[]})
|
||||
const [reloadSettings, setReloadSettings] = useState(false)
|
||||
|
||||
const [relativeEditKids, setRelativeEditKids] = useState({loading:false, family_uid: ''})
|
||||
|
||||
const apiCall = new usersService();
|
||||
|
||||
let { pathname, state } = useLocation();
|
||||
|
||||
const dispatch = useDispatch();
|
||||
|
||||
useEffect(()=>{
|
||||
},[])
|
||||
const handleUncheck = (e, family_uid) => { // FUNCTION TO EDIT RELATIVE KIDS
|
||||
let isChecked = e.target.checked
|
||||
const reqData = {
|
||||
family_uid: family_uid,
|
||||
relative_uid: relativeSelected.relative_uid,
|
||||
add: isChecked ? '1' : '0'
|
||||
}
|
||||
// console.log('family_uid', isChecked)
|
||||
setRelativeEditKids({loading:true, family_uid:family_uid})
|
||||
apiCall.getRelativeEditKids(reqData).then(res => {
|
||||
setReloadSettings(prev => !prev) // MAKE RELATIVE SETTINGS TO RELOAD IN ORDER TO SET RELATIVE EDIT KIDS LOADING TO FALSE
|
||||
// setRelativeEditKids({loading:false, family_uid:''})
|
||||
}).catch((err)=>{
|
||||
setRelativeEditKids({loading:false, family_uid:''})
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
|
||||
useEffect(()=>{ // FUNCTION TO GET RELATIVE KIDS SETTINGS
|
||||
apiCall.getRelativeSettings({relative_uid: relativeSelected.relative_uid}).then(res => {
|
||||
setRelativeSettings({loading:false, data:res?.data?.kids_list || []})
|
||||
}).catch((err)=>{
|
||||
setRelativeSettings({loading:false, data:[]})
|
||||
console.log(err)
|
||||
}).finally(()=>{ // SET RELATIVE EDIT KIDS TO FALSE
|
||||
setRelativeEditKids({loading:false, family_uid:''})
|
||||
})
|
||||
},[reloadSettings])
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -65,17 +96,27 @@ const RelativePopout = ({
|
||||
</button>
|
||||
</div>
|
||||
<div className="modal-body-wrapper">
|
||||
<div className="w-full grid grid-cols-2 gap-2 space-x-2">
|
||||
<div className="h-full w-full grid grid-cols-2 gap-2 space-x-2">
|
||||
<div className='col-span-2 md:col-span-1 overflow-y-auto h-[350px]'>
|
||||
{familyList.loader ?
|
||||
<LoadingSpinner size='10' color='bg-sky-500' height='min-h-40' />
|
||||
{familyList.loader || relativeSettings.loading ?
|
||||
<LoadingSpinner size='10' color='bg-sky-500' height='min-h-[300px]' />
|
||||
: (!familyList.loader && familyList?.familyList?.result_list?.length > 0) ?
|
||||
familyList?.familyList?.result_list?.map(item => {
|
||||
const isChecked = relativeSettings?.data?.filter(value => value?.family_uid == item?.family_uid)
|
||||
const image = localStorage.getItem("session_token") ? `${familyList?.imageServer}${localStorage.getItem("session_token")}/family/${item?.family_uid}` : "";
|
||||
return (
|
||||
<div key={item.family_uid || index} className="flex items-center border-b dark:border-[#5356fb29] hover:bg-gray-50">
|
||||
<div className='p-2 flex justify-center items-center'>
|
||||
<input type="checkbox" className='w-4 h-4 border-2 border-blue-500 rounded-sm bg-white cursor-pointer' />
|
||||
{relativeEditKids.loading && relativeEditKids.family_uid == item.family_uid?
|
||||
<LoadingSpinner size='4' color='bg-sky-500' />
|
||||
:
|
||||
<input
|
||||
checked={isChecked?.length > 0}
|
||||
type="checkbox"
|
||||
className='w-4 h-4 border-2 border-blue-500 rounded-sm bg-white cursor-pointer'
|
||||
onChange={(e) => handleUncheck(e, item.family_uid)}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
<div className='p-2'>
|
||||
<div className="flex space-x-2 items-center w-full">
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
import React, { Suspense, useEffect, useState } from "react";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { useLocation, useOutletContext } from "react-router-dom";
|
||||
import usersService from "../../../../services/UsersService";
|
||||
import ModalCom from '../../../Helpers/ModalCom';
|
||||
import LoadingSpinner from "../../../Spinners/LoadingSpinner";
|
||||
import localImgLoad from '../../../../lib/localImgLoad'
|
||||
|
||||
// import { tableReload } from "../../../store/TableReloads";
|
||||
// import { PriceFormatter } from "../../Helpers/PriceFormatter";
|
||||
|
||||
|
||||
const RelativeReminderPopout = ({
|
||||
relativeSelected,
|
||||
action,
|
||||
situation,
|
||||
familyList
|
||||
}) => {
|
||||
|
||||
const { walletDetails } = useSelector((state) => state?.walletDetails); // WALLET STORE
|
||||
|
||||
const {userDetails} = useSelector((state) => state?.userDetails); // CHECKS IF USER Details are avaliable, to determine if user is active
|
||||
|
||||
const [relativeReminder, setRelativeReminder] = useState({loading:false, status:false, msg:''})
|
||||
|
||||
const apiCall = new usersService();
|
||||
|
||||
let { pathname, state } = useLocation();
|
||||
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const cancelInvite = (family_uid) => { // FUNCTION TO EDIT RELATIVE KIDS
|
||||
const reqData = {
|
||||
relative_uid: relativeSelected.relative_uid,
|
||||
reminder: 'PENDING_ACCOUNT'
|
||||
}
|
||||
}
|
||||
|
||||
const sendRelativeReminder = ()=>{ // FUNCTION TO SEND REMINDER
|
||||
setRelativeReminder({loading:true, status:false, msg:''})
|
||||
const reqData = {
|
||||
relative_uid: relativeSelected.relative_uid,
|
||||
reminder: 'PENDING_ACCOUNT'
|
||||
}
|
||||
apiCall.sendRelativeReminder(reqData).then(res => {
|
||||
if(res?.data?.internal_return < 0){
|
||||
setRelativeReminder({loading:false, status:false, msg:'failed to send'})
|
||||
return
|
||||
}
|
||||
setRelativeReminder({loading:false, status:true, msg:'Reminder Sent'})
|
||||
setTimeout(()=>{
|
||||
action() // CLOSE MODAL
|
||||
}, 3000)
|
||||
}).catch((err)=>{
|
||||
setRelativeReminder({loading:false, status:false, msg:'Network error'})
|
||||
console.log(err)
|
||||
}).finally(()=>{
|
||||
setTimeout(()=>{
|
||||
setRelativeReminder({loading:false, status:false, msg:''})
|
||||
}, 3000)
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<ModalCom action={action} situation={situation}>
|
||||
<div className="modal-container">
|
||||
<div className="modal-header-con">
|
||||
<h1 className="modal-title">
|
||||
{relativeSelected.firstname && relativeSelected.firstname} {relativeSelected.lastname && relativeSelected.lastname}
|
||||
</h1>
|
||||
<button
|
||||
type="button"
|
||||
className="modal-close-btn"
|
||||
onClick={action}
|
||||
>
|
||||
<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="modal-body-wrapper">
|
||||
<div className="h-full w-full grid grid-cols-4 gap-2 space-x-4">
|
||||
<div className='col-span-4 md:col-span-3 overflow-y-auto h-full md:border-r-2'>
|
||||
<div className='p-2 w-full md:max-w-xl flex flex-col gap-4 justify-center items-center rounded-2xl'>
|
||||
<div className='py-2 w-full flex items-center gap-1'>
|
||||
<h1 className="min-w-[120px] text-xl text-right font-extrabold text-black dark:text-white tracking-wide">First name :</h1>
|
||||
{/* <p className="text-lg font-normal text-dark-gray dark:text-white tracking-wide">{'Dummy'}</p> */}
|
||||
</div>
|
||||
<div className='py-2 w-full flex items-center gap-1'>
|
||||
<h1 className="min-w-[120px] text-xl text-right font-extrabold text-black dark:text-white tracking-wide">Last name :</h1>
|
||||
{/* <p className="text-lg font-normal text-dark-gray dark:text-white tracking-wide">{'Dummy'}</p> */}
|
||||
</div>
|
||||
<div className='py-2 w-full flex items-center gap-1'>
|
||||
<h1 className="min-w-[120px] text-xl text-right font-extrabold text-black dark:text-white tracking-wide">Email :</h1>
|
||||
{/* <p className="text-lg font-normal text-dark-gray dark:text-white tracking-wide">{'Dummy'}</p> */}
|
||||
</div>
|
||||
<div className='py-2 w-full flex items-center gap-1'>
|
||||
<h1 className="min-w-[120px] text-xl text-right font-extrabold text-black dark:text-white tracking-wide">Family Type :</h1>
|
||||
{/* <p className="text-lg font-normal text-dark-gray dark:text-white tracking-wide">{'Dummy'}</p> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='col-span-4 md:col-span-1 min-h-[100px] flex md:flex-col justify-between items-center'>
|
||||
<>
|
||||
{relativeReminder.loading ?
|
||||
<LoadingSpinner size='10' color='bg-sky-500' />
|
||||
:
|
||||
<button
|
||||
className={`p-4 w-200px md:w-full bg-emerald-700 text-white px-2 py-2 border-4 border-slate-300 text-lg lg:text-xl font-medium rounded-2xl ${relativeReminder.status && 'opacity-50'}`}
|
||||
name='sendreminder'
|
||||
onClick={sendRelativeReminder}
|
||||
disabled={relativeReminder.status || relativeReminder.loading}
|
||||
>
|
||||
{/* {relativeReminder.msg ? relativeReminder.msg : <>Send <br />Reminder</>} */}
|
||||
Send <br />Reminder
|
||||
</button>
|
||||
}
|
||||
</>
|
||||
<>
|
||||
{relativeReminder.msg &&
|
||||
<p className={`hidden md:flex w-full break-words text-center ${relativeReminder.status ? 'text-emerald-500' : 'text-red-500'}`}>{relativeReminder.msg}</p>
|
||||
}
|
||||
</>
|
||||
<>
|
||||
{/* <LoadingSpinner size='10' color='bg-sky-500' /> */}
|
||||
<button
|
||||
className='p-4 w-200px md:w-full bg-orange-500 text-white px-2 py-2 border-4 border-slate-300 text-lg lg:text-xl font-medium rounded-2xl'
|
||||
name='cancelreminder'
|
||||
onClick={cancelInvite}
|
||||
>
|
||||
Cancel <br />Invitation
|
||||
</button>
|
||||
</>
|
||||
</div>
|
||||
</div>
|
||||
<>
|
||||
{relativeReminder.msg &&
|
||||
<p className={`md:hidden w-full break-words text-center ${relativeReminder.status ? 'text-emerald-500' : 'text-red-500'}`}>{relativeReminder.msg}</p>
|
||||
}
|
||||
</>
|
||||
</div>
|
||||
<div className="modal-footer-wrapper justify-end">
|
||||
<button
|
||||
onClick={action}
|
||||
className="custom-btn border-gradient"
|
||||
>
|
||||
<span className='text-gradient'>Close</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</ModalCom>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default RelativeReminderPopout;
|
||||
@@ -3,6 +3,7 @@ import { handlePagingFunc } from '../../../Pagination/HandlePagination';
|
||||
import PaginatedList from '../../../Pagination/PaginatedList';
|
||||
|
||||
import RelativePopout from './RelativePopout';
|
||||
import RelativeReminderPopout from './RelativeReminderPopout';
|
||||
|
||||
export default function RelativeTable({relativeList, familyList}) {
|
||||
|
||||
@@ -15,9 +16,15 @@ export default function RelativeTable({relativeList, familyList}) {
|
||||
|
||||
const [relativePopout, setRelativePopout] = useState({show:false, data:null})
|
||||
|
||||
const [reminderPopout, setReminderPopout] = useState({show:false, data:null})
|
||||
|
||||
const closePopout = () => {
|
||||
setRelativePopout({show:false, data:null})
|
||||
}
|
||||
|
||||
const closeReminderPopout = () => {
|
||||
setReminderPopout({show:false, data:null})
|
||||
}
|
||||
|
||||
const handlePagination = (e) => {
|
||||
handlePagingFunc(e, setCurrentPage);
|
||||
@@ -32,6 +39,7 @@ export default function RelativeTable({relativeList, familyList}) {
|
||||
<tr>
|
||||
<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'></th>
|
||||
</tr>
|
||||
@@ -55,9 +63,24 @@ export default function RelativeTable({relativeList, familyList}) {
|
||||
{/* <span>Family Type</span> */}
|
||||
<span>{value.family_type && value.family_type.toUpperCase()}</span>
|
||||
</td>
|
||||
{value.status_action ?
|
||||
<td className='py-4 px-2 text-center'>
|
||||
<button
|
||||
type='button'
|
||||
className='p-1 cursor-pointer text-center bg-sky-50'
|
||||
onClick={() => setReminderPopout({show:true, data:{relativeSelected:value}})}
|
||||
>
|
||||
{value.status && value.status}
|
||||
</button>
|
||||
</td>
|
||||
:
|
||||
<td className='py-4 px-2 text-center'>
|
||||
{value.status && value.status}
|
||||
</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'>
|
||||
<button
|
||||
onClick={() => setRelativePopout({show:true, data:{relativeSelected:value}})}
|
||||
@@ -116,6 +139,16 @@ export default function RelativeTable({relativeList, familyList}) {
|
||||
familyList={familyList}
|
||||
/>
|
||||
}
|
||||
|
||||
{reminderPopout.show &&
|
||||
<RelativeReminderPopout
|
||||
situation={reminderPopout.show}
|
||||
action={closeReminderPopout}
|
||||
relativeSelected={reminderPopout.data.relativeSelected}
|
||||
familyList={familyList}
|
||||
/>
|
||||
}
|
||||
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -143,8 +143,8 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
|
||||
</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="p-4 w-full md:col-span-3 md:border-r-1">
|
||||
<div className="min-h-[240px]">
|
||||
<div className="px-4 py-1 w-full md:col-span-3 md:border-r-1">
|
||||
<div className="min-h-[300px]">
|
||||
<h2 className="font-semibold text-slate-900 dark:text-white tracking-wide">
|
||||
{details?.title}
|
||||
</h2>
|
||||
@@ -168,15 +168,15 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
|
||||
danger: true,
|
||||
},
|
||||
].map(({ name, content, danger }, idx) => (
|
||||
<div className={`my-3 md:flex items-center`} key={idx}>
|
||||
<label className="job-label w-full md:w-[19%]">
|
||||
<div className={`my-3 md:flex items-start`} key={idx}>
|
||||
<label className="py-2 job-label w-full md:w-[19%]">
|
||||
{name}
|
||||
</label>
|
||||
<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"
|
||||
? "min-h-[100px] max-h-[100px] h-full overflow-y-auto break-words"
|
||||
: name == "Delivery Detail" ? " overflow-y-auto h-full min-h-[100px] max-h-[100px]"
|
||||
? "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-[150px] max-h-[150px] bg-slate-50"
|
||||
: "h-full flex items-center"
|
||||
}`}
|
||||
>
|
||||
@@ -215,43 +215,63 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
|
||||
))}
|
||||
</div>
|
||||
<hr className='my-1' />
|
||||
<div className="w-full flex flex-col gap-3">
|
||||
<div className="w-full">
|
||||
<label className="job-label w-full">
|
||||
If you have any questions about this task:
|
||||
</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">
|
||||
<div className='w-full'>
|
||||
<label className="job-label w-full flex gap-2 items-center">
|
||||
If you have any questions about this task:
|
||||
<span className={`text-sm ${marketMsg.state ? 'text-[#57cd89]' : 'text-red-500'}`}>
|
||||
{marketMsg.state && "Message Sent!"}
|
||||
{errMsg.market && "Something went wrong"}
|
||||
{errMsg.market && "Failed to send"}
|
||||
</span>
|
||||
<button
|
||||
className="custom-btn self-end bg-yellow-500 text-white"
|
||||
name="market-message"
|
||||
onClick={MarketDetail}
|
||||
>
|
||||
{marketMsg.loading ? (
|
||||
<LoadingSpinner size={5} color="white" />
|
||||
) : (
|
||||
"Send Message"
|
||||
)}
|
||||
</button>
|
||||
</label>
|
||||
<div className="w-full flex items-center gap-3">
|
||||
<div className="w-full">
|
||||
<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 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 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="w-full flex flex-col justify-center pb-4 gap-2">
|
||||
<p className="job-label w-full">
|
||||
|
||||
@@ -107,11 +107,22 @@ export default function MyPendingJobTable({ MyJobList, className }) {
|
||||
onClick={() => {
|
||||
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"
|
||||
? "Manage"
|
||||
: "View"}
|
||||
{/* {value.owner_status == "OWNER" ? "Manage": "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>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -165,7 +165,7 @@ export default function ManageInterestOffer(props) {
|
||||
|
||||
{/* manage offer section */}
|
||||
<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 */}
|
||||
<div className="w-full mb-5 lg:mb-0 col-span-3">
|
||||
<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="my-0 md:my-3 block md:flex items-center gap-10">
|
||||
<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="min-w-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">{props.offerDetails?.client_name}</p>
|
||||
<p className="text-xl font-extrabold text-black dark:text-white tracking-wide">
|
||||
Name : {' '}
|
||||
<span className="text-lg font-normal text-dark-gray dark:text-white tracking-wide">{props.offerDetails?.client_name}</span>
|
||||
</p>
|
||||
</div>
|
||||
<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="min-w-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">
|
||||
{clientAdded.getFullYear()}{" - "}
|
||||
{clientAdded.getMonth() < 9 ? '0'+ (clientAdded.getMonth() + 1) : clientAdded.getMonth() + 1}
|
||||
<p className="text-xl font-extrabold text-black dark:text-white tracking-wide">
|
||||
Member Since : {' '}
|
||||
<span className="text-lg font-normal text-dark-gray dark:text-white tracking-wide">
|
||||
{clientAdded.getFullYear()}{" - "}
|
||||
{clientAdded.getMonth() < 9 ? '0'+ (clientAdded.getMonth() + 1) : clientAdded.getMonth() + 1}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -248,35 +252,35 @@ export default function ManageInterestOffer(props) {
|
||||
<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>
|
||||
</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='flex items-center gap-4'>
|
||||
<p className="min-w-[150px] text-lg font-bold text-black dark:text-white tracking-wide text-right">Completed:</p>
|
||||
<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-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_completed && interestStats.data?.job_completed}</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-4">
|
||||
<p className="min-w-[150px] text-lg font-bold text-black dark:text-white tracking-wide text-right">Active:</p>
|
||||
<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-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_active && interestStats.data?.job_active}</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-4">
|
||||
<p className="min-w-[150px] text-lg font-bold text-black dark:text-white tracking-wide text-right">% Completion:</p>
|
||||
<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-[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 className='contents md:flex flex-col gap-3'>
|
||||
<div className="flex items-center gap-4">
|
||||
<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>
|
||||
<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-[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 className="flex items-center gap-4">
|
||||
<p className="min-w-[150px] text-lg font-bold text-black dark:text-white tracking-wide text-right">Uncompleted:</p>
|
||||
<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-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_uncompleted && interestStats.data?.job_uncompleted}</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-4">
|
||||
<p className="min-w-[150px] text-lg font-bold text-black dark:text-white tracking-wide text-right">Pending Offers:</p>
|
||||
<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-[100px] text-lg font-normal text-dark-gray dark:text-white tracking-wide">{interestStats.data?.job_pending && interestStats.data?.job_pending}</p>
|
||||
</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">
|
||||
{/* 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'>
|
||||
<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>
|
||||
@@ -404,7 +408,7 @@ export default function ManageInterestOffer(props) {
|
||||
</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 flex-col xxs:flex-row md:flex-col justify-center items-center gap-10">
|
||||
{requestStatus.loading && requestStatus.processType == 'accept' ?
|
||||
<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">
|
||||
<td className=" py-4">
|
||||
<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
|
||||
src={image}
|
||||
alt="data"
|
||||
className="w-full h-full"
|
||||
className="w-full h-full rounded-full"
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-col">
|
||||
|
||||
@@ -190,6 +190,10 @@ export const apiConst = {
|
||||
|
||||
WRENCHBOARD_INTEREST_STATS: 13048,
|
||||
|
||||
WRENCHBOARD_RELATIVE_SETTINGS: 22033,
|
||||
WRENCHBOARD_RELATIVE_EDIT_KIDS: 22034,
|
||||
WRENCHBOARD_RELATIVE_REMINDER: 22035,
|
||||
|
||||
WRENCHBOARD_GROUP_START: 12000,
|
||||
WRENCHBOARD_GROUP_CREATEGROUP: 12010,
|
||||
WRENCHBOARD_GROUP_INVITEGROUP: 12015,
|
||||
|
||||
@@ -655,6 +655,39 @@ class usersService {
|
||||
return this.postAuxEnd("/familylist", postData);
|
||||
}
|
||||
|
||||
getRelativeSettings(reqData) {
|
||||
var postData = {
|
||||
uid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
action: apiConst.WRENCHBOARD_RELATIVE_SETTINGS,
|
||||
...reqData
|
||||
};
|
||||
return this.postAuxEnd("/relativesettings", postData);
|
||||
}
|
||||
|
||||
sendRelativeReminder(reqData) {
|
||||
var postData = {
|
||||
uid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
action: apiConst.WRENCHBOARD_RELATIVE_REMINDER,
|
||||
...reqData
|
||||
};
|
||||
return this.postAuxEnd("/relativereminder", postData);
|
||||
}
|
||||
|
||||
getRelativeEditKids(reqData) {
|
||||
var postData = {
|
||||
uid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
action: apiConst.WRENCHBOARD_RELATIVE_EDIT_KIDS,
|
||||
...reqData
|
||||
};
|
||||
return this.postAuxEnd("/relativeeditkids", postData);
|
||||
}
|
||||
|
||||
getFamilyAdd() {
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
|
||||
Reference in New Issue
Block a user