Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ec8855ed6 | |||
| 06450808ed | |||
| 7eecd34a5e | |||
| ab3693fc0b |
@@ -44,13 +44,13 @@ const AccountDashboard = ({ className, bannerList, offersList, imageServer }) =>
|
|||||||
);
|
);
|
||||||
|
|
||||||
let image = `${imageServer}${localStorage.getItem("session_token")}/job/${item.job_uid}`
|
let image = `${imageServer}${localStorage.getItem("session_token")}/job/${item.job_uid}`
|
||||||
return (
|
if(index < 3){
|
||||||
<div key={item.id}>
|
return (
|
||||||
{index < 3 &&
|
<div key={item.offer_uid}>
|
||||||
<NewOfferCard datas={item} image={image} price={thePrice} setOfferPopout={setOfferPopout} />
|
<NewOfferCard datas={item} image={image} price={thePrice} setOfferPopout={setOfferPopout} />
|
||||||
}
|
</div>
|
||||||
</div>
|
)
|
||||||
)
|
}
|
||||||
})}
|
})}
|
||||||
</>
|
</>
|
||||||
|
|
||||||
@@ -89,12 +89,11 @@ const AccountDashboard = ({ className, bannerList, offersList, imageServer }) =>
|
|||||||
|
|
||||||
let image = `${imageServer}${localStorage.getItem("session_token")}/job/${item.job_uid}`
|
let image = `${imageServer}${localStorage.getItem("session_token")}/job/${item.job_uid}`
|
||||||
if(index >= 3) {
|
if(index >= 3) {
|
||||||
return
|
return(
|
||||||
(<div key={item.id}>
|
<div key={item.offer_uid}>
|
||||||
<NewOfferCardFlat datas={item} image={image} price={thePrice} setOfferPopout={setOfferPopout} />
|
<NewOfferCardFlat datas={item} image={image} price={thePrice} setOfferPopout={setOfferPopout} />
|
||||||
</div>)
|
</div>
|
||||||
}else{
|
)
|
||||||
null
|
|
||||||
}
|
}
|
||||||
})}
|
})}
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ export default function FamilyTableNew() {
|
|||||||
|
|
||||||
let { pathname } = useLocation();
|
let { pathname } = useLocation();
|
||||||
|
|
||||||
|
const queryParams = new URLSearchParams(location?.search);
|
||||||
|
const preSelectedTab = queryParams.get("tab");
|
||||||
|
|
||||||
// Initial state for family details
|
// Initial state for family details
|
||||||
const initialDetailState = {
|
const initialDetailState = {
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -55,9 +58,9 @@ export default function FamilyTableNew() {
|
|||||||
|
|
||||||
// Array of tab names
|
// Array of tab names
|
||||||
const tabs = [
|
const tabs = [
|
||||||
{ id: 1, name: "Tasks" },
|
{ id: 1, name: "tasks" },
|
||||||
{ id: 2, name: "Waiting" },
|
{ id: 2, name: "waiting" },
|
||||||
{ id: 3, name: "Pending" },
|
{ id: 3, name: "pending" },
|
||||||
];
|
];
|
||||||
|
|
||||||
// State for the currently selected tab
|
// State for the currently selected tab
|
||||||
@@ -94,6 +97,14 @@ export default function FamilyTableNew() {
|
|||||||
// Selected tab component based on the current 'tab'
|
// Selected tab component based on the current 'tab'
|
||||||
const selectedTabComponent = tabComponents[tab] || defaultTabComponent;
|
const selectedTabComponent = tabComponents[tab] || defaultTabComponent;
|
||||||
|
|
||||||
|
useEffect(()=>{ // EFFECT TO CHECK FOR PRE SELECTED TAB AND DEFAULT TO IT OR TO DEFAULT IF NOT AVALIABLE
|
||||||
|
if(preSelectedTab && tabs.map(item => item.name.toLowerCase()).includes(preSelectedTab.toLowerCase())){
|
||||||
|
setTab(preSelectedTab)
|
||||||
|
}else{
|
||||||
|
setTab(tabs[0].name)
|
||||||
|
}
|
||||||
|
},[])
|
||||||
|
|
||||||
|
|
||||||
// Effect to manage active family task details
|
// Effect to manage active family task details
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@@ -177,19 +177,31 @@ function OfferJobPopout({ details, onClose, situation }) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p className="text-lg my-5 font-semibold text-slate-900 dark:text-white tracking-wide line-clamp-1">
|
<p className="text-lg my-2 font-semibold text-slate-900 dark:text-white tracking-wide max-h-[200px] overflow-y-auto">
|
||||||
{details.title}
|
{details.title}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div className="my-2 md:flex">
|
<div className="my-2 md:flex">
|
||||||
<Detail label="Description" value={details.description} />
|
<label className='job-label w-full md:w-[150px]'>Description</label>
|
||||||
|
<p className={`p-1 w-full md:w-3/4 text-sm text-slate-900 dark:text-white max-h-[200px] overflow-y-auto`}>{details.description}</p>
|
||||||
|
{/* <Detail label="Description" value={details.description} /> */}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div className="my-2 md:flex">
|
<div className="my-2 md:flx">
|
||||||
<label className='job-label w-full md:w-[150px]'>Detail</label>
|
{/* <label className='job-label w-full md:w-[150px]'>Detail</label>
|
||||||
<p className={`p-1 w-full md:w-3/4 text-sm text-slate-900 dark:text-white min-h-[100px] max-h-[200px] overflow-y-auto border boder-2 rounded-md`}>{details.job_description || details.job_detail}</p>
|
<p className={`p-1 w-full md:w-3/4 text-sm text-slate-900 dark:text-white min-h-[100px] max-h-[200px] overflow-y-auto border-2 rounded-md`}>{details.job_description || details.job_detail}</p> */}
|
||||||
|
<label className="w-full text-slate-900 dark:text-white tracking-wide font-semibold">
|
||||||
|
Delivery Detail
|
||||||
|
</label>
|
||||||
|
<textarea
|
||||||
|
className={`p-2 w-full text-sm text-slate-900 dark:text-white bg-transparent outline-none border border-slate-300 rounded-md`}
|
||||||
|
rows="5"
|
||||||
|
style={{ resize: "none" }}
|
||||||
|
value={details.job_description || details.job_detail}
|
||||||
|
readOnly
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user