Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 38766c9cb7 | |||
| fc04855d3f | |||
| 56cb956482 | |||
| 2f5abc8931 | |||
| 026dbb1a0a | |||
| efd464ba8a | |||
| 8c400c7ce1 | |||
| 670f4bbf1a |
@@ -105,4 +105,7 @@ REACT_APP_ANDROID_APP='https://play.google.com/store/apps/details?id=com.wrenchb
|
||||
REACT_APP_APPLE_APP='https://itunes.apple.com/us/app/wrenchboard/id1435718367?ls=1&mt=8'
|
||||
|
||||
# Displays the new family dashboard with boxes
|
||||
REACT_APP_SHOW_NEW_FAMILY_DASH=1
|
||||
REACT_APP_SHOW_NEW_FAMILY_DASH=1
|
||||
|
||||
# Displays the account dashboard
|
||||
REACT_APP_SHOW_ACCOUNT_DASH=1
|
||||
+4
-1
@@ -73,4 +73,7 @@ REACT_APP_ANDROID_APP='https://play.google.com/store/apps/details?id=com.wrenchb
|
||||
REACT_APP_APPLE_APP='https://itunes.apple.com/us/app/wrenchboard/id1435718367?ls=1&mt=8'
|
||||
|
||||
# Displays the new family dashboard with boxes
|
||||
REACT_APP_SHOW_NEW_FAMILY_DASH=1
|
||||
REACT_APP_SHOW_NEW_FAMILY_DASH=1
|
||||
|
||||
# Displays the account dashboard
|
||||
REACT_APP_SHOW_ACCOUNT_DASH=1
|
||||
@@ -80,3 +80,6 @@ REACT_APP_APPLE_APP='https://itunes.apple.com/us/app/wrenchboard/id1435718367?ls
|
||||
|
||||
# Displays the new family dashboard with boxes
|
||||
REACT_APP_SHOW_NEW_FAMILY_DASH=0
|
||||
|
||||
# Displays the account dashboard
|
||||
REACT_APP_SHOW_ACCOUNT_DASH=0
|
||||
@@ -1,10 +1,11 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { useState } from "react";
|
||||
import { PriceFormatter } from "../Helpers/PriceFormatter";
|
||||
import MarketPopUp from "../MarketPlace/PopUp/MarketPopUp";
|
||||
|
||||
export default function AvailableJobsCard({
|
||||
className,
|
||||
datas,
|
||||
key,
|
||||
hidden = false,
|
||||
contentDisplay,
|
||||
image_server,
|
||||
@@ -19,10 +20,10 @@ export default function AvailableJobsCard({
|
||||
datas?.currency
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
const imagePath = require(`../../assets/images/${datas.thumbnil}`); // Replace with your directory path for local images
|
||||
setImageUrl(imagePath);
|
||||
}, []);
|
||||
// useEffect(() => {
|
||||
// const imagePath = require(`../../assets/images/${datas.thumbnil}`); // Replace with your directory path for local images
|
||||
// setImageUrl(imagePath);
|
||||
// }, []);
|
||||
|
||||
const image = localStorage.getItem("session_token")
|
||||
? `${image_server}${localStorage.getItem("session_token")}/job/${
|
||||
@@ -37,6 +38,7 @@ export default function AvailableJobsCard({
|
||||
className={`card-style-two w-full h-[426px] p-[20px] bg-white dark:bg-dark-white rounded-2xl section-shadow ${
|
||||
className || ""
|
||||
}`}
|
||||
key={key}
|
||||
>
|
||||
<div
|
||||
onClick={() => {
|
||||
@@ -75,34 +77,16 @@ export default function AvailableJobsCard({
|
||||
<div
|
||||
className="w-full h-[236px] p-6 rounded-xl overflow-hidden bg-center bg-cover bg-no-repeat"
|
||||
style={{
|
||||
backgroundImage: `url('${imageUrl}')`,
|
||||
backgroundImage: `url('${image}')`,
|
||||
}}
|
||||
>
|
||||
<div className="flex justify-center">{datas.description}</div>
|
||||
<div className="flex justify-center bg-slate-100 p-2 rounded-md">
|
||||
{datas.description}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="details-area">
|
||||
<div className="product-two-options flex justify-between mb-5 relative">
|
||||
{/* <div className="status">*/}
|
||||
{/* {datas.isActive && (*/}
|
||||
{/* <span className="text-xs px-3 py-1.5 tracking-wide rounded-full bg-gold text-white">*/}
|
||||
{/* Active*/}
|
||||
{/*</span>*/}
|
||||
{/* )}*/}
|
||||
{/* </div>*/}
|
||||
|
||||
{/*<div className=" review flex space-x-2">*/}
|
||||
{/* <button*/}
|
||||
{/* onClick={favoriteHandler}*/}
|
||||
{/* type="button"*/}
|
||||
{/* className={`w-7 h-7 bg-white rounded-full flex justify-center items-center ${*/}
|
||||
{/* addFavorite ? "text-red-500" : "text-thin-light-gray"*/}
|
||||
{/* }`}*/}
|
||||
{/* >*/}
|
||||
{/* <Icons name="star" />*/}
|
||||
{/* </button>*/}
|
||||
{/*</div>*/}
|
||||
</div>
|
||||
<div className="product-two-options flex justify-between mb-5 relative"></div>
|
||||
|
||||
<div className="flex justify-between">
|
||||
<div className="flex items-center space-x-2">
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react'
|
||||
|
||||
const AccountDashboard = ({className}) => {
|
||||
return (
|
||||
<div className={`w-full min-h-[400px] md:grid grid-cols-2 lg:p-8 p-4 justify-between items-center gap-2 rounded-2xl overflow-hidden ${
|
||||
<div className={`w-full min-h-[400px] md:grid grid-cols-2 lg:p-8 p-4 justify-between items-center gap-2 rounded-2xl overflow-hidden bg-[#ffed00] ${
|
||||
className || ""
|
||||
}`}>
|
||||
<div className="w-full h-full flex items-center justify-center text-5xl text-center">
|
||||
|
||||
@@ -43,12 +43,27 @@ export default function FamilyDash({ familyOffers, MyActiveJobList }) {
|
||||
<div className="w-full mb-4 grid grid-cols-2 md:grid-cols-3 gap-2 md:gap-4">
|
||||
{Object.keys(familyBannersList?.result?.result_list).map((item, index) => {
|
||||
let content = familyBannersList?.result?.result_list[item]
|
||||
let action = item == 'recommend' ? 'familymarket' : 'mytask'
|
||||
return (
|
||||
<Link key={item} to='/' className={`p-2 h-40 rounded-lg shadow-sm flex justify-center items-center transition-all duration-300 hover:shadow-md ${index%2==0 ? 'bg-red-200/50' : 'bg-sky-300/50'}`}>
|
||||
<Link key={item} to={`/${action}`} className={`h-44 rounded-lg bg-white dark:bg-dark-white shadow-md flex justify-center items-center transition-all duration-300 hover:shadow-sm`}>
|
||||
<div className="h-full w-full">
|
||||
<img className="w-full h-1/2 object-cover rounded-lg" src={content.banner.image} alt='banner image' />
|
||||
<h1 className="my-2 text-lg font-medium tracking-wide">{content.banner.text}</h1>
|
||||
<p className="text-sm">{content.banner.description}</p>
|
||||
<img className="w-full h-1/2 object-cover rounded-t-lg" src={content.banner.image} alt='banner image' />
|
||||
<div className="px-2 py-1">
|
||||
<h1 className="text-lg text-black dark:text-white font-medium tracking-wide">{content.banner.text}</h1>
|
||||
<p className="text-sm text-black dark:text-white">{content.banner.description}</p>
|
||||
</div>
|
||||
{/* Horizontal Line */}
|
||||
<div className="w-full h-[1px] bg-slate-300"></div>
|
||||
|
||||
<div className="px-2 py-1 flex justify-between items-center">
|
||||
<span className="text-slate-400 dark:text-slate-200 text-sm">6w ago</span>
|
||||
{/* Dots */}
|
||||
<div className="flex justify-center gap-1">
|
||||
<div className="w-1 h-1 bg-slate-400 rounded-full"></div>
|
||||
<div className="w-1 h-1 bg-slate-400 rounded-full"></div>
|
||||
<div className="w-1 h-1 bg-slate-400 rounded-full"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
)
|
||||
@@ -60,9 +75,25 @@ export default function FamilyDash({ familyOffers, MyActiveJobList }) {
|
||||
<h1 className="my-4 text-26 font-bold text-dark-gray dark:text-white tracking-wide">Resources</h1>
|
||||
<div className="w-full grid grid-cols-2 md:grid-cols-3 gap-2 md:gap-4">
|
||||
{[1,2,3,4,5].map((item, index) => (
|
||||
<Link key={index} to='/' className={`h-40 rounded-lg shadow-sm ${index%2==0 ? 'bg-red-200/50' : 'bg-sky-300/50'}`}>
|
||||
<div >
|
||||
<Link key={item} to={`/`} className={`h-44 rounded-lg bg-white dark:bg-dark-white shadow-md flex justify-center items-center transition-all duration-300 hover:shadow-sm`}>
|
||||
<div className="h-full w-full">
|
||||
<img className="w-full h-1/2 object-cover rounded-t-lg" src={''} alt='banner image' />
|
||||
<div className="px-2 py-1">
|
||||
<h1 className="text-lg text-black dark:text-white font-medium tracking-wide">{'Heading'}</h1>
|
||||
<p className="text-sm text-black dark:text-white">{'Description'}</p>
|
||||
</div>
|
||||
{/* Horizontal Line */}
|
||||
<div className="w-full h-[1px] bg-slate-300"></div>
|
||||
|
||||
<div className="px-2 py-1 flex justify-between items-center">
|
||||
<span className="text-slate-400 dark:text-slate-200 text-sm">6w ago</span>
|
||||
{/* Dots */}
|
||||
<div className="flex justify-center gap-1">
|
||||
<div className="w-1 h-1 bg-slate-400 rounded-full"></div>
|
||||
<div className="w-1 h-1 bg-slate-400 rounded-full"></div>
|
||||
<div className="w-1 h-1 bg-slate-400 rounded-full"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
))}
|
||||
|
||||
@@ -59,10 +59,14 @@ export default function FullAccountDash(props) {
|
||||
}
|
||||
};
|
||||
|
||||
console.log(process.env.REACT_APP_SHOW_ACCOUNT_DASH)
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="home-page-wrapper">
|
||||
<AccountDashboard className="mb-4" />
|
||||
{process.env.REACT_APP_SHOW_ACCOUNT_DASH == "1" && (
|
||||
<AccountDashboard className="mb-4" />
|
||||
)}
|
||||
{renderDashboard()}
|
||||
|
||||
{props?.dashTypes !== "undefined" &&
|
||||
|
||||
@@ -112,7 +112,7 @@ export default function MainSection({
|
||||
<AvailableJobsCard
|
||||
contentDisplay={contentDisplay}
|
||||
image_server={image_server}
|
||||
key={datas.id}
|
||||
key={datas.job_uid}
|
||||
datas={datas}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -89,7 +89,7 @@ export default function MobileSidebar({
|
||||
<ul className="flex flex-col space-y-6">
|
||||
{/* Using mini component reduces the bulk amount of html */}
|
||||
<ListItem
|
||||
title="Dashboard"
|
||||
title= {userDetails?.account_type == "FULL" ? "Dashboard" : "Home"}
|
||||
route="/"
|
||||
sidebar={sidebar}
|
||||
iconName="new-dashboard"
|
||||
|
||||
@@ -110,7 +110,7 @@ export default function Sidebar({
|
||||
<ul className="flex flex-col space-y-6">
|
||||
{/* Using mini component reduces the bulk amount of html */}
|
||||
<ListItem
|
||||
title="Dashboard"
|
||||
title={userDetails?.account_type == "FULL" ? "Dashboard" : "Home"}
|
||||
route="/"
|
||||
sidebar={sidebar}
|
||||
iconName="new-dashboard"
|
||||
|
||||
Reference in New Issue
Block a user