Merge branch 'master' into manage-family-page

This commit is contained in:
Ebube
2023-05-22 17:43:32 +01:00
19 changed files with 115 additions and 28 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 />} />
Binary file not shown.

After

Width:  |  Height:  |  Size: 958 B

+10 -8
View File
@@ -3,6 +3,7 @@ import { Link, useNavigate } from "react-router-dom";
import appleLogo from "../../../assets/images/apple-black.svg";
import facebookLogo from "../../../assets/images/facebook-4.svg";
import googleLogo from "../../../assets/images/google-logo.svg";
import linkedInLogo from "../../../assets/images/Linkedin.png";
import WrenchBoard from "../../../assets/images/wrenchboard.png";
import usersService from "../../../services/UsersService";
import InputCom from "../../Helpers/Inputs/InputCom";
@@ -232,13 +233,14 @@ export default function Login() {
)}
</button>
</div>
<BrandBtn link="#" imgSrc={googleLogo} brand="Google" />
<BrandBtn
link="#"
imgSrc={facebookLogo}
brand="Facebook"
/>
<BrandBtn link="#" imgSrc={appleLogo} brand="Apple" />
<div className="sm:flex sm:justify-between sm:items-center sm:space-x-2">
<BrandBtn link="#" imgSrc={googleLogo} brand="Google" />
<BrandBtn link="#" imgSrc={appleLogo} brand="Apple" />
</div>
<div className="sm:flex sm:justify-between sm:items-center sm:space-x-2">
<BrandBtn link="#" imgSrc={facebookLogo} brand="Facebook" />
<BrandBtn link="#" imgSrc={linkedInLogo} brand="LinkedIn" />
</div>
</div>
</div>
) : (
@@ -346,7 +348,7 @@ const BrandBtn = ({ link, imgSrc, brand }) => {
};
return (
<div className="flex justify-center bottomMargin">
<div className="w-full sm:w-1/2 flex justify-center bottomMargin">
<a
// onClick={doGoogle}
href="#dd"
@@ -9,6 +9,7 @@ import LoadingSpinner from "../Spinners/LoadingSpinner";
import cover from "../../assets/images/profile-info-cover.png";
import profile from "../../assets/images/profile-info-profile.png";
import usersService from "../../services/UsersService";
import FamilyTasks from "./FamilyTasks";
export default function FamilyManageTabs({
className,
@@ -130,7 +131,7 @@ export default function FamilyManageTabs({
<LoadingSpinner size="8" color="sky-blue" />
) : (
<>
{name === "Tasks" && <Tasks />}
{name === "Tasks" && <FamilyTasks className={className} loader={loader}/>}
{name === "Account" && (
<Account familyDetails={familyDetails} />
)}
+31
View File
@@ -0,0 +1,31 @@
import React, { useState } from "react";
import dataImage1 from "../../assets/images/data-table-user-1.png";
import LoadingSpinner from "../Spinners/LoadingSpinner";
import { useNavigate, useLocation, Link } from "react-router-dom";
export default function FamilyTasks({ className, loader }) {
return (
<div
className={`update-table w-full p-8 bg-white dark:bg-dark-white overflow-y-auto rounded-2xl section-shadow min-h-[520px] max-h-[600px] ${
className || ""
}`}
>
<div className="relative w-full overflow-x-auto sm:rounded-lg">
{loader ? (
<div className="h-full min-h-[500px] w-full overflow-hidden flex justify-center items-center">
<LoadingSpinner size="16" color="sky-blue" />
</div>
) : (
<table className="w-full text-sm text-left text-gray-500 dark:text-gray-400 relative">
<tr>
<td> Yes This are my tasks </td>
</tr>
</table>
)}
</div>
</div>
);
}
+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 */}
+2 -2
View File
@@ -502,9 +502,9 @@ export default function Header({ logoutModalHandler, sidebarHandler }) {
</div>
<div className="heading border-b dark:border-[#5356fb29] border-light-purple px-7 py-2">
<h3 className="text-xl font-bold text-dark-gray dark:text-white">
Fullname
{`${firstname} ${lastname}`}
</h3>
<p className="text-base text-gray-400 dark:text-white hover:text-sky-blue cursor-pointer">{`${firstname} ${lastname}`}</p>
{/* <p className="text-base text-gray-400 dark:text-white hover:text-sky-blue cursor-pointer">{`${firstname} ${lastname}`}</p> */}
</div>
<div className="content">
<ul className="px-7">
+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}/>
</>
);
}