Common head data

This commit is contained in:
CHIEFSOFT\ameye
2023-05-21 21:26:49 -04:00
parent 7f69233054
commit e112c7776b
14 changed files with 70 additions and 17 deletions
+2
View File
@@ -38,6 +38,7 @@ import AddJobPage from "./views/AddJobPage";
import MyPendingJobsPage from "./views/MyPendingJobsPage";
import ManageActiveJobs from "./views/ManageActiveJobs";
import FamilyManagePage from "./views/FamilyManagePage";
import MyCouponPage from "./views/MyCouponPage";
export default function Routers() {
return (
@@ -74,6 +75,7 @@ export default function Routers() {
<Route exact path="/calendar" element={<CalendarPage />} />
<Route exact path="/resources" element={<ResourcePage />} />
<Route exact path="/my-wallet/*" element={<MyWalletPage />} />
<Route exact path="/my-coupon" element={<MyCouponPage />} />
<Route exact path="/notification" element={<Notification />} />
<Route exact path="/market-place" element={<MarketPlacePage />} />
<Route exact path="/market" element={<MarketPlacePage />} />
+2 -2
View File
@@ -6,7 +6,7 @@ import MainSection from "./MainSection";
import CommonHead from "../UserHeader/CommonHead";
import { useSelector } from "react-redux";
export default function MarketPlace() {
export default function MarketPlace({commonHeadData}) {
let { jobLists } = useSelector((state) => state.jobLists);
const marketData = jobLists?.result_list;
@@ -14,7 +14,7 @@ export default function MarketPlace() {
return (
<>
<Layout>
<CommonHead />
<CommonHead commonHeadData={commonHeadData} />
<MainSection marketPlaceProduct={marketData} className="mb-10" />
</Layout>
</>
+3 -1
View File
@@ -12,7 +12,9 @@ export default function MyActiveJobs(props) {
console.log("AMEYE LOC1", props.MyJobList);
return (
<Layout>
<CommonHead />
<CommonHead
commonHeadData={props.commonHeadData}
/>
<div className="notification-page w-full mb-10">
<div className="notification-wrapper w-full">
{/* heading */}
+7 -2
View File
@@ -12,7 +12,9 @@ export default function MyJobs(props) {
console.log("AMEYE LOC1", props.MyJobList);
return (
<Layout>
<CommonHead />
<CommonHead
commonHeadData={props.commonHeadData}
/>
<div className="notification-page w-full mb-10">
<div className="notification-wrapper w-full">
{/* heading */}
@@ -40,7 +42,10 @@ export default function MyJobs(props) {
></div>
</div>
</div>
<MyJobTable MyJobList={props.MyJobList} reloadJobList={props.reloadJobList} />
<MyJobTable
MyJobList={props.MyJobList}
reloadJobList={props.reloadJobList}
/>
</div>
</div>
</Layout>
+3 -1
View File
@@ -12,7 +12,9 @@ export default function MyPendingJobs(props) {
console.log("AMEYE LOC1", props.MyJobList);
return (
<Layout>
<CommonHead />
<CommonHead
commonHeadData={props.commonHeadData}
/>
<div className="notification-page w-full mb-10">
<div className="notification-wrapper w-full">
{/* heading */}
+2 -2
View File
@@ -4,14 +4,14 @@ import Layout from "../Partials/Layout";
import MyJobTable from "./MyJobTable";
import CommonHead from "../UserHeader/CommonHead";
export default function MyTasks() {
export default function MyTasks({commonHeadData}) {
const [selectTab, setValue] = useState("today");
const filterHandler = (value) => {
setValue(value);
};
return (
<Layout>
<CommonHead />
<CommonHead commonHeadData={commonHeadData} />
<div className="notification-page w-full mb-10">
<div className="notification-wrapper w-full">
{/* heading */}
+3 -1
View File
@@ -1,7 +1,9 @@
import React from "react";
import { Link } from "react-router-dom";
export default function CommonHead({ className }) {
export default function CommonHead({ className,commonHeadData }) {
const vvv= commonHeadData();
console.log("UUUUUUUU-",vvv);
return (
<div
className={`create-nft w-full lg:h-[140px] shadow lg:flex rounded-lg justify-between items-center md:p-9 p-4 bg-white dark:bg-dark-white border-b dark:border-[#5356fb29] -2 border-pink mb-10 ${
+8 -1
View File
@@ -1,9 +1,16 @@
import MarketPlace from "../components/MarketPlace";
export default function MarketPlacePage() {
const commonHeadData =()=>{
console.log("COMMON HEAD DATA ----------------=====---------------------");
return 0;
}
return (
<>
<MarketPlace />
<MarketPlace
commonHeadData={commonHeadData} />
</>
);
}
+8 -2
View File
@@ -4,7 +4,10 @@ import usersService from "../services/UsersService";
import MyActiveJobs from "../components/MyActiveJobs";
export default function MyActiveJobsPage() {
const commonHeadData =()=>{
console.log("COMMON HEAD DATA ----------------=====---------------------");
return 0;
}
const [MyJobList, setMyJobList] = useState([]);
const api = new usersService();
//TARGET ENDPOINT[POST]http://10.204.5.100:9083/en/wrench/api/v1/jobmanageractive
@@ -23,7 +26,10 @@ export default function MyActiveJobsPage() {
// debugger;
return (
<>
<MyActiveJobs MyJobList={MyJobList} />
<MyActiveJobs
MyJobList={MyJobList}
commonHeadData={commonHeadData}
/>
</>
);
}
+10
View File
@@ -0,0 +1,10 @@
import React from "react";
import WalletRoutes from "../components/MyWallet/Wallet";
export default function MyCouponPage() {
return (
<>
<WalletRoutes />
</>
);
}
+8 -1
View File
@@ -8,6 +8,11 @@ import { useSelector } from "react-redux";
export default function MyJobsPage() {
const commonHeadData =()=>{
console.log("COMMON HEAD DATA ----------------=====---------------------");
return 0;
}
const {jobListTable} = useSelector((state) => state.tableReload)
// const userApi = new usersService();
@@ -33,7 +38,9 @@ export default function MyJobsPage() {
// debugger;
return (
<>
<MyJobs MyJobList={MyJobList} />
<MyJobs
MyJobList={MyJobList}
commonHeadData={commonHeadData} />
</>
);
}
+8 -2
View File
@@ -5,7 +5,10 @@ import MyActiveJobs from "../components/MyActiveJobs";
import MyPendingJobs from "../components/MyPendingJobs";
export default function MyPendingJobsPage() {
const commonHeadData =()=>{
console.log("COMMON HEAD DATA ----------------=====---------------------");
return 0;
}
const [MyJobList, setMyJobList] = useState([]);
const api = new usersService();
@@ -24,7 +27,10 @@ export default function MyPendingJobsPage() {
// debugger;
return (
<>
<MyPendingJobs MyJobList={MyJobList} />
<MyPendingJobs
MyJobList={MyJobList}
commonHeadData={commonHeadData}
/>
</>
);
}
+6 -2
View File
@@ -7,7 +7,10 @@ export default function MyTaskPage() {
const [MyActiveJobList, setMyActiveJobList] = useState([]);
const api = new usersService();
const commonHeadData =()=>{
console.log("COMMON HEAD DATA ----------------=====---------------------");
return 0;
}
const getMyActiveJobList = async () => {
try {
const res = await api.getMyActiveTaskList();
@@ -23,7 +26,8 @@ export default function MyTaskPage() {
//debugger;
return (
<>
<MyTasks ActiveJobList={MyActiveJobList}/>
<MyTasks ActiveJobList={MyActiveJobList}
commonHeadData={commonHeadData}/>
</>
);
}