Compare commits

..

107 Commits

Author SHA1 Message Date
victorAnumudu 3d150f7a6b array length bug fixed 2024-03-01 15:18:20 +01:00
tokslaw bbd100d04e Merge branch 'resources-linking' of WrenchBoard/Users-Wrench into master 2024-03-01 00:35:21 +00:00
victorAnumudu fcb340007c linked family resources 2024-02-29 21:52:11 +01:00
ameye 95a10cf795 Merge branch 'home-banners-dashboard' of WrenchBoard/Users-Wrench into master 2024-02-29 19:48:34 +00:00
Ebube 5b5a083987 Added Home Img on Home btn 2024-02-29 20:06:18 +01:00
ameye 1564f29a4c Merge branch 'family-home-offerlist' of WrenchBoard/Users-Wrench into master 2024-02-29 17:35:02 +00:00
ameye 2b73191741 Merge branch 'parent-waiting-page' of WrenchBoard/Users-Wrench into master 2024-02-29 17:34:57 +00:00
victorAnumudu fee5c20fe2 removed offerlist from family home page 2024-02-29 17:09:47 +01:00
victorAnumudu 2d2b184291 parent waiting page top brought to top 2024-02-29 16:40:13 +01:00
ameye 5abd3665d1 Merge branch 'home-banners-dashboard' of WrenchBoard/Users-Wrench into master 2024-02-29 15:01:45 +00:00
Ebube a603a9eaff Merge branch 'master' of https://gitlab.chiefsoft.net/WrenchBoard/Users-Wrench into home-banners-dashboard 2024-02-29 15:54:35 +01:00
Ebube 5bd74b3ca4 Added new stuff 2024-02-29 15:54:11 +01:00
Ebube 60cc290004 reduced component 2024-02-29 13:05:44 +01:00
ameye 12f30ec1e8 Merge branch 'banner-pages' of WrenchBoard/Users-Wrench into master 2024-02-29 11:46:56 +00:00
victorAnumudu 2521fbc1d8 more pages created for family banner links 2024-02-29 12:38:35 +01:00
ameye 29812e9265 Merge branch 'family-banner-linking' of WrenchBoard/Users-Wrench into master 2024-02-29 09:35:47 +00:00
victorAnumudu 271180932c linked banner to page 2024-02-29 10:32:27 +01:00
ameye 0a2e291013 Merge branch 'home-banners-dashboard' of WrenchBoard/Users-Wrench into master 2024-02-28 18:00:00 +00:00
ameye 8be09a9f9f Merge branch 'parent-waiting' of WrenchBoard/Users-Wrench into master 2024-02-28 17:59:53 +00:00
Ebube 78aa4fe58b Added padding 2024-02-28 18:38:52 +01:00
victorAnumudu 154ea29504 added parent waiting page 2024-02-28 18:38:19 +01:00
ameye 4f670fa3ba Merge branch 'resources-banner-fix' of WrenchBoard/Users-Wrench into master 2024-02-28 16:49:51 +00:00
victorAnumudu 8d48435705 reduced family resources banner 2024-02-28 17:40:32 +01:00
ameye 76109dc458 Merge branch 'implemented-breadcrumb' of WrenchBoard/Users-Wrench into master 2024-02-28 16:00:09 +00:00
victorAnumudu 05a7b3ec12 added breadcrumb to my task page 2024-02-28 16:54:54 +01:00
ameye 0a3805ddf8 Merge branch 'family-banner-fix' of WrenchBoard/Users-Wrench into master 2024-02-28 15:20:57 +00:00
victorAnumudu 059fdaf294 family banner img height reduced 2024-02-28 15:48:59 +01:00
ameye 353c372284 Merge branch 'home-banners-dashboard' of WrenchBoard/Users-Wrench into master 2024-02-28 11:18:52 +00:00
ameye 26e5248a0f Merge branch 'family-button-reduction' of WrenchBoard/Users-Wrench into master 2024-02-28 11:18:47 +00:00
ameye ae6a677b25 Merge branch 'market-date-format' of WrenchBoard/Users-Wrench into master 2024-02-28 11:18:43 +00:00
Ebube cab5debfb7 Added icon toggler 2024-02-28 11:41:17 +01:00
Ebube c4c1bf6ca1 added dark mode feature to right sidebar 2024-02-28 11:20:29 +01:00
Ebube fc2a78dde7 changed the background 2024-02-28 11:05:58 +01:00
victorAnumudu 1249685c41 reduced family banner button 2024-02-28 10:26:13 +01:00
victorAnumudu 3c422d9036 formatted date style 2024-02-28 10:08:26 +01:00
Ebube 264511dfb2 adjusted home dash sizes 2024-02-28 08:30:43 +01:00
Ebube d8c5b3ff07 home_dash board sizing 2024-02-28 07:49:57 +01:00
Ebube 624f97df8d Merge branch 'master' of https://gitlab.chiefsoft.net/WrenchBoard/Users-Wrench into home-banners-dashboard 2024-02-28 07:48:31 +01:00
Ebube 4dfb442a80 responsiveness check 2024-02-28 07:47:23 +01:00
ameye 50f675e82b Merge branch 'home-banners-dashboard' of WrenchBoard/Users-Wrench into master 2024-02-28 04:52:03 +00:00
CHIEFSOFT\ameye a0584a26fe show new dash 2024-02-27 20:50:54 -05:00
Ebube 0d3025c4d0 Reduced fonts 2024-02-27 21:47:10 +01:00
ameye ed24fea513 Merge branch 'home-banners-dashboard' of WrenchBoard/Users-Wrench into master 2024-02-27 19:57:44 +00:00
ameye e6d83be4d9 Merge branch 'job-link-hidden' of WrenchBoard/Users-Wrench into master 2024-02-27 19:57:38 +00:00
Ebube 36e3154933 Merge branch 'master' of https://gitlab.chiefsoft.net/WrenchBoard/Users-Wrench into home-banners-dashboard 2024-02-27 19:36:19 +01:00
Ebube 5d59ff1b30 Reduced component height 2024-02-27 19:35:53 +01:00
victorAnumudu 33832fdd96 made quick job link hidden in family account 2024-02-27 18:57:16 +01:00
ameye 9f02395214 Merge branch 'home-banners-dashboard' of WrenchBoard/Users-Wrench into master 2024-02-27 17:38:03 +00:00
ameye 9cc88eebf6 Merge branch 'family-resources' of WrenchBoard/Users-Wrench into master 2024-02-27 17:37:45 +00:00
Ebube 2390670d8c added top banner 2024-02-27 18:35:49 +01:00
victorAnumudu d908b1e10e added family resources API 2024-02-27 18:10:54 +01:00
ameye d91a3bf9f0 Merge branch 'banner-match' of WrenchBoard/Users-Wrench into master 2024-02-27 12:39:53 +00:00
victorAnumudu 880c223834 matched the image height in family banner to full member banner 2024-02-27 13:27:32 +01:00
ameye e7bf07d09e Merge branch 'home-banners-dashboard' of WrenchBoard/Users-Wrench into master 2024-02-27 10:47:10 +00:00
ameye e1de701ea6 Merge branch 'family-header' of WrenchBoard/Users-Wrench into master 2024-02-27 10:47:03 +00:00
Ebube 3403210fe8 Populated the lower component 2024-02-27 11:36:53 +01:00
victorAnumudu 03a897829c changed family header bg color 2024-02-27 10:24:23 +01:00
victorAnumudu d884b2a43d added header on family home page 2024-02-27 10:15:13 +01:00
ameye 3b86c6cd0e Merge branch 'home-banners-dashboard' of WrenchBoard/Users-Wrench into master 2024-02-26 23:43:47 +00:00
Ebube 2b5de9c95f Added the first 3 banners 2024-02-27 00:39:51 +01:00
ameye 3a8a980660 Merge branch 'banner-api-caching' of WrenchBoard/Users-Wrench into master 2024-02-26 17:26:16 +00:00
victorAnumudu 06186b3c0f cache banner API using redux 2024-02-26 18:07:58 +01:00
ameye bddbe6ceb4 Merge branch 'home-banners-dashboard' of WrenchBoard/Users-Wrench into master 2024-02-26 15:46:14 +00:00
Ebube dd802ab22e increase size of dots 2024-02-26 16:38:57 +01:00
Ebube 8c363765ae Merge branch 'master' of https://gitlab.chiefsoft.net/WrenchBoard/Users-Wrench into home-banners-dashboard 2024-02-26 16:34:58 +01:00
Ebube f597c207fa Banner Area Layout 2024-02-26 16:34:08 +01:00
ameye dc07cff959 Merge branch 'asidebar-link' of WrenchBoard/Users-Wrench into master 2024-02-26 14:35:12 +00:00
victorAnumudu 38766c9cb7 changed Dashboard aside link name to Home 2024-02-26 15:30:30 +01:00
ameye fc04855d3f Merge branch 'banner-card' of WrenchBoard/Users-Wrench into master 2024-02-26 13:17:11 +00:00
victorAnumudu 56cb956482 adjusted banner card design 2024-02-26 14:07:15 +01:00
ameye 2f5abc8931 Merge branch 'home-banners-dashboard' of WrenchBoard/Users-Wrench into master 2024-02-26 10:39:34 +00:00
ameye 026dbb1a0a Merge branch 'family-banner-bug' of WrenchBoard/Users-Wrench into master 2024-02-26 10:39:23 +00:00
Ebube efd464ba8a Merge branch 'master' of https://gitlab.chiefsoft.net/WrenchBoard/Users-Wrench into home-banners-dashboard 2024-02-26 02:49:58 +01:00
Ebube 8c400c7ce1 fixed market bug, fixed key issue and added texts fork the cards 2024-02-26 02:49:35 +01:00
victorAnumudu d3d2b3cb5a changed to three cards banner 2024-02-26 02:40:25 +01:00
victorAnumudu 3054a5eb9a remove unused API from family login 2024-02-26 01:55:52 +01:00
Ebube 670f4bbf1a Added color to component and toggler to the env 2024-02-26 00:12:29 +01:00
ameye ae73f10c42 Merge branch 'family-banners' of WrenchBoard/Users-Wrench into master 2024-02-25 22:14:19 +00:00
victorAnumudu de477f32ed added banner to family dashboard banner list 2024-02-25 21:16:38 +01:00
ameye 2c6e36aea9 Merge branch 'home-banners-dashboard' of WrenchBoard/Users-Wrench into master 2024-02-23 20:12:12 +00:00
ameye dc3aa1470e Merge branch 'family_new_dashboard' of WrenchBoard/Users-Wrench into master 2024-02-23 20:12:07 +00:00
victorAnumudu 9029953432 added familybanners API 2024-02-23 17:29:18 +01:00
Ebube fa47de7292 Added empty component to the dashboard 2024-02-23 17:19:41 +01:00
victorAnumudu d0a2b804b9 configured family new dashboard to show only on dev 2024-02-23 16:27:17 +01:00
victorAnumudu aa48529dca configured family new dashboard to show only on dev 2024-02-23 16:15:46 +01:00
ameye ad2745dfce Merge branch 'section-addition' of WrenchBoard/Users-Wrench into master 2024-02-19 17:37:50 +00:00
victorAnumudu b6ab3a6ee7 added new section to family acct dashboard 2024-02-19 14:09:20 +01:00
ameye f968cc5a50 Merge branch 'home-banners-dashboard' of WrenchBoard/Users-Wrench into master 2024-02-17 16:41:08 +00:00
Ebube 1ddb2fd903 remove mypage component from family 2024-02-17 16:27:09 +01:00
ameye 70f6ac4e24 Merge branch 'failedtopup-alert' of WrenchBoard/Users-Wrench into master 2024-02-15 18:50:06 +00:00
victorAnumudu 3d30481852 displays failed popout box for failed top up transaction 2024-02-15 13:49:05 +01:00
ameye 63c0b07f61 Merge branch 'home-banners-dashboard' of WrenchBoard/Users-Wrench into master 2024-02-03 23:31:58 +00:00
ameye 60568c42e8 Merge branch 'number-fix' of WrenchBoard/Users-Wrench into master 2024-02-03 23:31:51 +00:00
Ebube 77ac52820d added the email and offed the autocomplete attr for the component 2024-02-04 00:29:09 +01:00
victorAnumudu 240e075305 assign offer message updated 2024-02-03 22:49:15 +01:00
victorAnumudu bea41d8181 group count fixed 2024-02-03 22:09:25 +01:00
ameye 6268d68b67 Merge branch 'home-banners-dashboard' of WrenchBoard/Users-Wrench into master 2024-02-03 20:31:19 +00:00
Ebube f96b16b373 Added the number identifier for job list 2024-02-03 21:18:49 +01:00
ameye 9fb6a4db86 Merge branch 'download-app-links' of WrenchBoard/Users-Wrench into master 2024-02-02 11:26:36 +00:00
victorAnumudu 1aa3c79666 added download app links to signup page 2024-02-02 09:42:51 +01:00
ameye ecc2360dc4 Merge branch 'app-download-link' of WrenchBoard/Users-Wrench into master 2024-02-01 20:49:27 +00:00
victorAnumudu ca9bb1c211 changed class to classname 2024-02-01 19:43:36 +01:00
victorAnumudu 2f756d189a added app download links on login page 2024-02-01 19:34:01 +01:00
ameye d7acea769c Merge branch 'home-banners-dashboard' of WrenchBoard/Users-Wrench into master 2024-01-30 17:58:31 +00:00
Ebube 7ff5e2b6e0 . 2024-01-30 17:10:39 +01:00
Ebube 2f90c4a6c2 Different dashboards for Home Banner 2024-01-30 17:10:30 +01:00
ameye 29e0345e1c Merge branch 'Jobs-Manager-Side' of WrenchBoard/Users-Wrench into master 2024-01-27 00:26:56 +00:00
61 changed files with 1839 additions and 476 deletions
+11 -1
View File
@@ -98,4 +98,14 @@ REACT_APP_FAMILY_MINIMUM_AGE=4
REACT_APP_FAMILY_MAXIMUM_AGE=18
#CHANGE LOGIN LAYOUT
REACT_APP_NEW_LOGIN_LAYOUT=1
REACT_APP_NEW_LOGIN_LAYOUT=1
#APP DOWNLOAD LINKS
REACT_APP_ANDROID_APP='https://play.google.com/store/apps/details?id=com.wrenchboard.users'
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
# Displays the account dashboard
REACT_APP_SHOW_ACCOUNT_DASH=1
+11 -1
View File
@@ -66,4 +66,14 @@ REACT_APP_FAMILY_MINIMUM_AGE=4
REACT_APP_FAMILY_MAXIMUM_AGE=18
#CHANGE LOGIN LAYOUT
REACT_APP_NEW_LOGIN_LAYOUT=1
REACT_APP_NEW_LOGIN_LAYOUT=1
#APP DOWNLOAD LINKS
REACT_APP_ANDROID_APP='https://play.google.com/store/apps/details?id=com.wrenchboard.users'
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
# Displays the account dashboard
REACT_APP_SHOW_ACCOUNT_DASH=1
+10
View File
@@ -73,3 +73,13 @@ REACT_APP_FAMILY_MAXIMUM_AGE=18
#CHANGE LOGIN LAYOUT
REACT_APP_NEW_LOGIN_LAYOUT=1
#APP DOWNLOAD LINKS
REACT_APP_ANDROID_APP='https://play.google.com/store/apps/details?id=com.wrenchboard.users'
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
# Displays the account dashboard
REACT_APP_SHOW_ACCOUNT_DASH=1
+3
View File
@@ -17,6 +17,9 @@
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>WrenchBoard</title>
<!-- FONT AWESOME -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v6.5.1/css/all.css"/>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
+16 -16
View File
@@ -1,22 +1,22 @@
import Toaster from "./components/Helpers/Toaster";
import Routers from "./Routers";
import Default from "./components/Partials/Default";
import { Navigate, useLocation } from "react-router-dom";
import Routers from "./Routers";
import Toaster from "./components/Helpers/Toaster";
import Default from "./components/Partials/Default";
function App() {
const {pathname} = useLocation()
return (
<Default>
<>
{pathname.startsWith('/@') ?
<Navigate to="/app" replace={true} />
:
<Routers />
}
<Toaster />
</>
</Default>
);
const { pathname } = useLocation();
return (
<Default>
<>
{pathname.startsWith("/@") ? (
<Navigate to="/app" replace={true} />
) : (
<Routers />
)}
<Toaster />
</>
</Default>
);
}
export default App;
+6
View File
@@ -57,6 +57,9 @@ import VerifyPasswordPagesTwo from "./views/VerifyPasswordPagesTwo";
import VerifyYouPages from "./views/VerifyYouPages";
import VerifyYouPagesTwo from "./views/VerifyYouPagesTwo";
import YourPages from "./views/YourPage_";
import ParentWaitingPage from "./views/ParentWaitingPage";
import FamilyPendingOfferPage from "./views/FamilyPendingOfferPage";
import FamilyPastDuePage from "./views/FamilyPastDuePage";
export default function Routers() {
return (
@@ -129,6 +132,9 @@ export default function Routers() {
<Route exact path="/market-place" element={<MarketPlacePage />} />
<Route exact path="/market" element={<MarketPlacePage />} />
<Route exact path="/familymarket" element={<FamilyMarketPage />} />
<Route exact path="/suggested" element={<ParentWaitingPage />} />
<Route exact path="/pastdue" element={<FamilyPastDuePage />} />
<Route exact path="/pending" element={<FamilyPendingOfferPage />} />
<Route
exact
path="/familysettings"
@@ -1,4 +1,4 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17.5 0H2.5C1.12125 0 0 1.12125 0 2.5V17.5C0 18.8787 1.12125 20 2.5 20H17.5C18.8787 20 20 18.8787 20 17.5V2.5C20 1.12125 18.8787 0 17.5 0Z" fill="#1976D2"/>
<path d="M16.875 10H13.75V7.5C13.75 6.81 14.31 6.875 15 6.875H16.25V3.75H13.75C11.6788 3.75 10 5.42875 10 7.5V10H7.5V13.125H10V20H13.75V13.125H15.625L16.875 10Z" fill="#FAFAFA"/>
</svg>
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17.5 0H2.5C1.12125 0 0 1.12125 0 2.5V17.5C0 18.8787 1.12125 20 2.5 20H17.5C18.8787 20 20 18.8787 20 17.5V2.5C20 1.12125 18.8787 0 17.5 0Z" fill="#1976D2"/>
<path d="M16.875 10H13.75V7.5C13.75 6.81 14.31 6.875 15 6.875H16.25V3.75H13.75C11.6788 3.75 10 5.42875 10 7.5V10H7.5V13.125H10V20H13.75V13.125H15.625L16.875 10Z" fill="#FAFAFA"/>
</svg>

Before

Width:  |  Height:  |  Size: 452 B

After

Width:  |  Height:  |  Size: 448 B

+38 -33
View File
@@ -1,19 +1,22 @@
import React, { lazy, useContext } from "react";
import React, { useContext } from "react";
import { Link } from "react-router-dom";
import { localImgLoad } from "../../lib";
import DarkModeContext from "../Contexts/DarkModeContext";
export default function LoginLayout({ slogan, children }) {
const bgImg = localImgLoad('images/left-wrenchboard.jpg')
const bgImgNig = localImgLoad('images/wrench-home-back-nigeria.jpg')
const bgImgCom = localImgLoad('images/wrench-home-back-common.jpg')
const bgImg = localImgLoad("images/left-wrenchboard.jpg");
const bgImgNig = localImgLoad("images/wrench-home-back-nigeria.jpg");
const bgImgCom = localImgLoad("images/wrench-home-back-common.jpg");
const {countryMode} = useContext(DarkModeContext);
const { countryMode } = useContext(DarkModeContext);
return (
<div className={`h-screen overflow-y-auto bg-cover bg-center`}
style={{backgroundImage: `url(${ countryMode == 'NG' ? bgImgNig : bgImgCom})`}}
<div
className={`h-screen overflow-y-auto bg-cover bg-center`}
style={{
backgroundImage: `url(${countryMode == "NG" ? bgImgNig : bgImgCom})`,
}}
>
<div className={`w-full grid grid-cols-1 lg:grid-cols-2`}>
{/* <div
@@ -22,41 +25,43 @@ export default function LoginLayout({ slogan, children }) {
>
</div> */}
<div className="p-5 sm:p-7 flex place-content-center lg:col-start-2">
<div className="py-10 w-full sm:w-11/12 max-w-2xl shadow-md bg-slate-50 dark:bg-dark-white rounded-[0.475rem]">
<div className="py-5 w-full sm:w-11/12 max-w-2xl shadow-md bg-slate-50 rounded-[0.475rem]">
<div className="w-full flex justify-center items-center">
{children && children}
</div>
<div className="w-full flex flex-col justify-center items-center px-10">
<div className="w-full flex justify-center items-center pt-5">
<div className="flex items-center">
<a
href="https://www.wrenchboard.com/about-us"
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
target="_blank"
rel="noreferrer"
>
About
</a>
<a
href="https://www.wrenchboard.com/service"
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
target="_blank"
rel="noreferrer"
>
Services
</a>
<a
href="https://www.wrenchboard.com/contact"
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
target="_blank"
rel="noreferrer"
>
Contact Us
</a>
<a
href="https://www.wrenchboard.com/about-us"
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
target="_blank"
rel="noreferrer"
>
About
</a>
<a
href="https://www.wrenchboard.com/service"
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
target="_blank"
rel="noreferrer"
>
Services
</a>
<a
href="https://www.wrenchboard.com/contact"
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
target="_blank"
rel="noreferrer"
>
Contact Us
</a>
</div>
</div>
<p className="py-1 text-black text-[15px] px-2 font-medium flex items-center gap-1">
<span className="dark:text-white">&copy; {new Date().getFullYear()} -</span>
<span className="dark:text-white">
&copy; {new Date().getFullYear()} -
</span>
<Link to="/" className="text-[#009ef7] ml-1">
WrenchBoard
</Link>{" "}
+1 -1
View File
@@ -2,7 +2,7 @@ import React, { useEffect, useLayoutEffect, useState } from "react";
import { Link, useLocation, useNavigate } from "react-router-dom";
import linkedInLogo from "../../../assets/images/Linkedin.png";
import appleLogo from "../../../assets/images/apple-black.svg";
import facebookLogo from "../../../assets/images/facebook-4.svg";
import facebookLogo from "../../../assets/images/facebook.svg";
import googleLogo from "../../../assets/images/google-logo.svg";
import WrenchBoard from "../../../assets/images/wrenchboard-logo-text.png";
import usersService from "../../../services/UsersService";
+59 -19
View File
@@ -2,7 +2,7 @@ import React, { useEffect, useLayoutEffect, useState } from "react";
import { Link, useLocation, useNavigate } from "react-router-dom";
import linkedInLogo from "../../../assets/images/Linkedin.png";
import appleLogo from "../../../assets/images/apple-black.svg";
import facebookLogo from "../../../assets/images/facebook-4.svg";
import facebookLogo from "../../../assets/images/facebook.svg";
import googleLogo from "../../../assets/images/google-logo.svg";
import WrenchBoard from "../../../assets/images/wrenchboard-logo-text.png";
import usersService from "../../../services/UsersService";
@@ -24,7 +24,9 @@ export default function Login() {
const dispatch = useDispatch();
const { state } = useLocation();
const [sessionExpired, setSessionExpired] = useState(queryParams.get("sessionExpired"))
const [sessionExpired, setSessionExpired] = useState(
queryParams.get("sessionExpired")
);
const [validCaptcha, setValidCaptcha] = useState({ show: false, valid: "" }); // FOR CAPTCHA
@@ -97,7 +99,7 @@ export default function Login() {
username: email,
password: password,
sessionid: "STARTING",
login_mode: 1100
login_mode: 1100,
};
} else if (name == "family") {
// Post Data Info for family Login
@@ -105,7 +107,7 @@ export default function Login() {
username: email,
pin: password,
sessionid: "20067A92714",
login_mode: 1105
login_mode: 1105,
};
} else {
setLoginLoading(false);
@@ -235,19 +237,18 @@ export default function Login() {
setPassword("");
}, [loginType]);
// EFFECT TO CLEAR SESSION EXPIRY IF IT EXISTS AFTER SOME SECONDS
useEffect(()=>{
useEffect(() => {
let timer;
if(sessionExpired == "true"){
timer = setTimeout(()=>{
setSessionExpired(false)
},5000)
if (sessionExpired == "true") {
timer = setTimeout(() => {
setSessionExpired(false);
}, 5000);
}
return () => {
clearTimeout(timer)
}
}, [])
clearTimeout(timer);
};
}, []);
return (
<>
@@ -520,11 +521,50 @@ export default function Login() {
}
{/* END of login component */}
{loginType == "full" && (
<div className="pt-5 text-[#181c32] text-center font-semibold text-[13.975px] leading-[20.9625px]">
This site is protected by a Captcha. Our Privacy Policy and
Terms of Service apply.
{/* APP DOWNLOAD STORE */}
<div className="w-full mt-4">
<div className="w-full flex justify-center items-center gap-4">
<div className="w-28 lg:w-32">
<a
className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
target="_blank"
rel="noreferrer"
href={process.env.REACT_APP_APPLE_APP}
>
<i className="fa-brands fa-apple text-3xl"></i>
<div className="flex flex-col">
<span className="text-[11px]">Available on the</span>
<span className="text-[12px] lg:text-base">
App Store
</span>
</div>
</a>
</div>
<div className="w-28 lg:w-32">
<a
className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
target="_blank"
rel="noreferrer"
href={process.env.REACT_APP_ANDROID_APP}
>
<i className="fa-brands fa-google-play text-2xl"></i>
<div className="flex flex-col">
<span className="text-[11px]">Available on the</span>
<span className="text-[12px] lg:text-base">
Google Play
</span>
</div>
</a>
</div>
</div>
</div>
{loginType == "full" && (
<>
<div className="pt-5 text-[#181c32] text-center font-semibold text-[13.975px] leading-[20.9625px]">
This site is protected by a Captcha. Our Privacy Policy and
Terms of Service apply.
</div>
</>
)}
</div>
</div>
@@ -565,7 +605,7 @@ const BrandBtn = ({
{isAnchor ? (
<a
href={link}
className="w-full border border-light-purple dark:border-[#5356fb29] rounded-[0.475rem] h-[48px] flex justify-center bg-[#FAFAFA] hover:bg-[#eff2f5] hover:text-[#7e8299] transition duration-300 dark:bg-[#11131F] items-center font-medium cursor-pointer"
className="w-full border border-light-purple rounded-[0.475rem] h-[48px] flex justify-center bg-[#FAFAFA] hover:bg-[#eff2f5] hover:text-[#7e8299] transition duration-300 items-center font-medium cursor-pointer"
>
<img className="mr-3 h-6" src={imgSrc} alt="logo-icon(s)" />
<span className="text-lg text-thin-light-gray font-normal text-[15px]">
@@ -576,7 +616,7 @@ const BrandBtn = ({
<button
onClick={onClick}
// href="#dd"
className="w-full border border-light-purple dark:border-[#5356fb29] rounded-[0.475rem] h-[48px] flex justify-center bg-[#FAFAFA] hover:bg-[#eff2f5] hover:text-[#7e8299] transition duration-300 dark:bg-[#11131F] items-center font-medium cursor-pointer"
className="w-full border border-light-purple rounded-[0.475rem] h-[48px] flex justify-center bg-[#FAFAFA] hover:bg-[#eff2f5] hover:text-[#7e8299] transition duration-300 items-center font-medium cursor-pointer"
>
<img className="mr-3 h-6" src={imgSrc} alt="logo-icon(s)" />
<span className="text-lg text-thin-light-gray font-normal text-[15px]">
+80 -40
View File
@@ -9,19 +9,21 @@ export default function SignUp() {
// eslint-disable-next-line no-restricted-globals
const queryParams = new URLSearchParams(location?.search);
const country = queryParams.get("cnt")?.toUpperCase();
const {pathname} = useLocation()
const currentPath = country ? `${pathname}?cnt=${country.toLowerCase()}`:pathname // Determines the new pathname is country query params exist
const { pathname } = useLocation();
const currentPath = country
? `${pathname}?cnt=${country.toLowerCase()}`
: pathname; // Determines the new pathname is country query params exist
const [signUpLoading, setSignUpLoading] = useState(false);
const [checked, setValue] = useState(false);
// for the catch error
const [msgError, setMsgError] = useState("");
const [showPassword, setShowPassword] = useState(false);
const [countries, setCountries] = useState({loading:true, data:[]});
const [countries, setCountries] = useState({ loading: true, data: [] });
const [formData, setFormData] = useState({
country: country? country : "",
country: country ? country : "",
first_name: "",
last_name: "",
email: "",
@@ -47,22 +49,23 @@ export default function SignUp() {
// Get Country Api
const getCountryList = useCallback(async () => {
try {
const res = await userApi.getSignupCountryData();
if (res.status === 200 && res.data.internal_return >= 0) {
const { result_list } = await res.data;
if(country){ // IF LINK/PATHNAME HAS CNT QUERY VALUE
let cnt = result_list.filter(item => item.code == country) // test to see country passed in query param exist from list of countries supplied by API
if(!cnt.length){ // IF CNT EMPTY, SET FORMDATA COUNTRY BACK TO EMPTY STRING: RE: THIS IS BCOS WE INITAIL SET COUNTRY VALUE IN FORMDATA, IF COUNTRY PARAM IS PRESENT IN LINK
setFormData(prev => ({...prev, country: ''}))
return setCountries({loading: false, data: result_list});
if (country) {
// IF LINK/PATHNAME HAS CNT QUERY VALUE
let cnt = result_list.filter((item) => item.code == country); // test to see country passed in query param exist from list of countries supplied by API
if (!cnt.length) {
// IF CNT EMPTY, SET FORMDATA COUNTRY BACK TO EMPTY STRING: RE: THIS IS BCOS WE INITAIL SET COUNTRY VALUE IN FORMDATA, IF COUNTRY PARAM IS PRESENT IN LINK
setFormData((prev) => ({ ...prev, country: "" }));
return setCountries({ loading: false, data: result_list });
}
return setCountries({loading: false, data: cnt});
return setCountries({ loading: false, data: cnt });
}
setCountries({loading: false, data:result_list});
setCountries({ loading: false, data: result_list });
} else if (res.data.result !== 100) {
setCountries({loading: false, data:[]});
setCountries({ loading: false, data: [] });
}
} catch (error) {
throw new Error(error);
@@ -113,9 +116,7 @@ export default function SignUp() {
if (res.status === 200) {
const { data } = res;
if (data && data.acc === "DULPICATE") {
setMsgError(
"Unable to use this username. Please try another username."
);
setMsgError("Duplicate username. Please try another email.");
setSignUpLoading(false);
}
if (data && data.status === "1") {
@@ -124,6 +125,11 @@ export default function SignUp() {
setSignUpLoading(false);
}, 2000);
}
if (data && data.status === "5") {
setMsgError("Something went wrong. Please try another email.");
setSignUpLoading(false);
}
} else {
setSignUpLoading(false);
setMsgError("An error occurred");
@@ -187,7 +193,9 @@ export default function SignUp() {
name="country"
value={formData.country}
inputHandler={handleInputChange}
disable={country && countries?.data?.length <= 1 ? true : false}
disable={
country && countries?.data?.length <= 1 ? true : false
}
/>
<div className="input-fl-name mb-4 sm:flex w-full sm:space-x-6 ">
<div className="input-item sm:w-1/2 w-full mb-4 sm:mb-0">
@@ -325,7 +333,7 @@ export default function SignUp() {
disabled={countries.loading}
type="button"
onClick={handleSignUp}
className={`rounded-full mb-6 text-white flex justify-center bg-[#4687ba] hover:bg-[#009ef7] transition-all duration-300 items-center h-[42px] py-[0.8875rem] px-[1.81rem] text-[14.95px] btn-login`}
className={`rounded-full text-white flex justify-center bg-[#4687ba] hover:bg-[#009ef7] transition-all duration-300 items-center h-[42px] py-[0.8875rem] px-[1.81rem] text-[14.95px] btn-login`}
>
{signUpLoading ? (
<div className="signup btn-loader"></div>
@@ -335,6 +343,44 @@ export default function SignUp() {
</button>
</div>
</div>
{/* APP DOWNLOAD STORE */}
<div className="w-full mt-4">
<div className="w-full flex justify-center items-center gap-4">
<div className="w-28 lg:w-32">
<a
className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
target="_blank"
href={process.env.REACT_APP_APPLE_APP}
rel="noreferrer"
>
<i className="fa-brands fa-apple text-3xl"></i>
<div className="flex flex-col">
<span className="text-[11px]">Available on the</span>
<span className="text-[12px] lg:text-base">
App Store
</span>
</div>
</a>
</div>
<div className="w-28 lg:w-32">
<a
className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
target="_blank"
href={process.env.REACT_APP_ANDROID_APP}
rel="noreferrer"
>
<i className="fa-brands fa-google-play text-2xl"></i>
<div className="flex flex-col">
<span className="text-[11px]">Available on the</span>
<span className="text-[12px] lg:text-base">
Google Play
</span>
</div>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
@@ -350,7 +396,7 @@ const SelectOption = ({
inputHandler,
value,
data, // passing the data from parent
disable
disable,
}) => {
return (
<div className="input-com mb-7">
@@ -364,39 +410,33 @@ const SelectOption = ({
</div>
<div>
<select
disabled={disable}
disabled={disable}
name={name}
id={name}
className="input-wrapper border border-[#f5f8fa] dark:border-[#5e6278] w-full rounded-full h-[42px] overflow-hidden relative font-medium leading-6 bg-clip-padding text-[#5e6278] dark:text-gray-100 bg-[#f5f8fa] dark:bg-[#5e6278] text-base focus-visible:border-transparent focus-visible:outline-0 focus-visible:ring-transparent "
onChange={inputHandler}
value={value}
>
{data?.data?.length > 1 ?
{data?.data?.length > 1 ? (
<>
<option value={""}>Select your Country</option>
{data?.data?.map((item) => (
<option value={item.code} key={item.uid}>
{item.country}
</option>
))}
<option value={""}>Select your Country</option>
{data?.data?.map((item) => (
<option value={item.code} key={item.uid}>
{item.country}
</option>
))}
</>
:
data?.data?.length == 1 ?
) : data?.data?.length == 1 ? (
data?.data?.map((item) => (
<option value={item.code} key={item.uid}>
{item.country}
</option>
))
:
data?.data?.length < 1 && data.loading ?
<option value=''>
Loading...
</option>
:
<option value=''>
No Country Found!
</option>
}
) : data?.data?.length < 1 && data.loading ? (
<option value="">Loading...</option>
) : (
<option value="">No Country Found!</option>
)}
</select>
</div>
</div>
+59 -55
View File
@@ -51,8 +51,7 @@ export default function VerifyLink() {
localStorage.setItem("member_id", `${data?.member_id}`);
localStorage.setItem("session_token", `${data?.session}`);
localStorage.setItem("session", `${data?.session}`);
localStorage.setItem("uid", data?.uid)
localStorage.setItem("uid", data?.uid);
navigate("/", { replace: true });
setLinkLoader(false);
@@ -80,19 +79,19 @@ export default function VerifyLink() {
};
// for verifying the incoming verification link and render the correct component
const verifyEmail = useCallback(async (code) => {
const verifyEmail = async (code) => {
try {
const verifyRes = await userApi.verifyEmail(code);
if (verifyRes.status === 200) {
let { data } = verifyRes;
console.log('TESTING VERIFY',data)
console.log("TESTING VERIFY", data);
if (
data &&
data.internal_return >= 0 &&
data.status == 0 &&
data.pending_id != '' &&
data.pending_uid != '' &&
data.username != '' &&
data.internal_return >= 0 &&
data.status == 0 &&
data.pending_id != "" &&
data.pending_uid != "" &&
data.username != "" &&
data.status_text === "Link Verified"
) {
setPageLoader(false);
@@ -106,12 +105,13 @@ export default function VerifyLink() {
setLinkSuccess(false);
throw new Error(error);
}
}, []);
};
// delay verify requests by 10000ms
const debouncedEmail = debounce(verifyEmail, 1000);
useEffect(() => {
setEmail("")
debouncedEmail(token);
}, []);
@@ -171,53 +171,57 @@ const SuccessfulComponent = ({
handleEmail,
msgErr,
loader,
}) => (
<div className="input-area">
{/* INPUT */}
<div className="mb-5">
<InputCom
fieldClass="px-6"
value={email}
inputHandler={handleEmail}
placeholder="support@mermsemr.com"
label="Email"
name="email"
type="email"
iconName="message"
/>
</div>
<div className="mb-5">
<InputCom
fieldClass="px-6"
value={password}
inputHandler={handlePassword}
placeholder="● ● ● ● ● ●"
label="Password"
name="password"
type="password"
iconName="password"
/>
</div>
{msgErr && (
<div className="relative p-4 text-[#912741] bg-[#fcd9e2] border-[#fbc6d3] mb-4 rounded-[0.475rem] text-md font-light leading-[19.5px] text-[13px]">
{msgErr}
}) => {
return (
<div className="input-area">
{/* INPUT */}
<div className="mb-5">
<InputCom
fieldClass="px-6"
value={email}
inputHandler={handleEmail}
placeholder="support@mermsemr.com"
label="Email"
name="email"
type="email"
iconName="message"
autoComplete="off"
/>
</div>
<div className="mb-5">
<InputCom
fieldClass="px-6"
value={password}
inputHandler={handlePassword}
placeholder="● ● ● ● ● ●"
label="Password"
name="password"
type="password"
iconName="password"
autoComplete="off"
/>
</div>
{msgErr && (
<div className="relative p-4 text-[#912741] bg-[#fcd9e2] border-[#fbc6d3] mb-4 rounded-[0.475rem] text-md font-light leading-[19.5px] text-[13px]">
{msgErr}
</div>
)}
<div className="signin-area mb-3.5">
<button
onClick={onSubmit}
type="button"
className={`btn-login rounded-[0.475rem] mb-6 text-xl text-white flex justify-center bg-[#4687ba] hover:bg-[#009ef7] transition-all duration-300 items-center text-[15px]`}
>
{loader ? (
<div className="signup btn-loader"></div>
) : (
<span>Continue</span>
)}
</button>
</div>
)}
<div className="signin-area mb-3.5">
<button
onClick={onSubmit}
type="button"
className={`btn-login rounded-[0.475rem] mb-6 text-xl text-white flex justify-center bg-[#4687ba] hover:bg-[#009ef7] transition-all duration-300 items-center text-[15px]`}
>
{loader ? (
<div className="signup btn-loader"></div>
) : (
<span>Continue</span>
)}
</button>
</div>
</div>
);
);
};
const ErrorComponent = ({ onClick }) => (
<div className="input-area">
+10 -8
View File
@@ -51,8 +51,7 @@ export default function VerifyLink() {
localStorage.setItem("member_id", `${data?.member_id}`);
localStorage.setItem("session_token", `${data?.session}`);
localStorage.setItem("session", `${data?.session}`);
localStorage.setItem("uid", data?.uid)
localStorage.setItem("uid", data?.uid);
navigate("/", { replace: true });
setLinkLoader(false);
@@ -85,16 +84,17 @@ export default function VerifyLink() {
const verifyRes = await userApi.verifyEmail(code);
if (verifyRes.status === 200) {
let { data } = verifyRes;
console.log('TESTING VERIFY',data)
console.log("TESTING VERIFY", data);
if (
data &&
data.internal_return >= 0 &&
data.status == 0 &&
data.pending_id != '' &&
data.pending_uid != '' &&
data.username != '' &&
data.internal_return >= 0 &&
data.status == 0 &&
data.pending_id != "" &&
data.pending_uid != "" &&
data.username != "" &&
data.status_text === "Link Verified"
) {
setEmail(data.username);
setPageLoader(false);
} else {
setPageLoader(false);
@@ -184,6 +184,7 @@ const SuccessfulComponent = ({
name="email"
type="email"
iconName="message"
autoComplete="off"
/>
</div>
<div className="mb-5">
@@ -196,6 +197,7 @@ const SuccessfulComponent = ({
name="password"
type="password"
iconName="password"
autoComplete="off"
/>
</div>
{msgErr && (
@@ -0,0 +1,22 @@
import React from 'react'
import { Link } from 'react-router-dom'
export default function CustomBreadcrumb({title, breadcrumb}) {
return (
<div className="">
<h3 className="text-26 font-bold text-dark-gray dark:text-white">{title}</h3>
<nav aria-label="breadcrumb" className='text-base text-dark-gray dark:text-white flex items-center'>
{breadcrumb.map((value, index) => (
<p key={index}>
<Link className={`${value.active ? 'opacity-60' : ''}`} to={value.link}>{value.title}</Link>
{index != breadcrumb.length - 1 ?
<span className='px-1'>/</span>
:
null
}
</p>
))}
</nav>
</div>
)
}
+13 -31
View File
@@ -1,4 +1,4 @@
import { useEffect, useState } from "react";
import { useState } from "react";
import { PriceFormatter } from "../Helpers/PriceFormatter";
import MarketPopUp from "../MarketPlace/PopUp/MarketPopUp";
@@ -19,10 +19,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/${
@@ -55,7 +55,7 @@ export default function AvailableJobsCard({
Added
</p>
<p className="text-base text-dark-gray dark:text-white">
{datas.offer_added}
{new Date(datas.offer_added).toLocaleDateString()}
</p>
</div>
</div>
@@ -66,7 +66,7 @@ export default function AvailableJobsCard({
Expires
</p>
<p className="text-base text-dark-gray dark:text-white text-right">
{datas.expire}
{new Date(datas.expire).toLocaleDateString()}
</p>
</div>
</div>
@@ -75,34 +75,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">
@@ -135,7 +117,7 @@ export default function AvailableJobsCard({
</div>
</div>
) : (
<div className="card-style-two w-full p-8 my-2 flex items-center gap-4 bg-white dark:bg-dark-white rounded-2xl section-shadow">
<div className="card-style-two w-full px-4 py-[0.4rem] my-2 flex items-center gap-4 bg-white dark:bg-dark-white rounded-2xl section-shadow">
<div className="flex gap-5 items-center w-full">
<div className="w-full h-[60px] rounded-full overflow-hidden flex justify-center items-center flex-[0.1] min-w-[60px] max-w-[60px]">
<img src={image} alt="data" className="w-full h-full" />
@@ -8,7 +8,7 @@ export default function HomeBannerOffersCard(props) {
useEffect(() => {
let { banner, banner_location } = props?.itemData;
if (banner_location === "LOCAL") {
const imagePath = require(`../../assets/images/${banner}`); // Replace with your directory path for local images
const imagePath = require(`../../assets/images/${banner}`);
setImageUrl(imagePath);
} else if (banner_location === "URL") setImageUrl(banner);
else return null;
@@ -0,0 +1,204 @@
import React from "react";
import { Link } from "react-router-dom";
const AccountDashboard = ({ className, bannerList }) => {
// getting the upper three banners for the home layout
const getUpperBanner = bannerList?.filter((value, idx) => idx <= 2);
const getLowerBanner = bannerList?.filter((value, idx) => idx > 2);
let getImage = ({ banner_location, banner }) => {
if (banner_location == "LOCAL") {
return require(`../../assets/images/${banner}`);
} else {
return banner;
}
};
console.log(getLowerBanner);
return (
<div
className={`w-full min-h-[450px] flex flex-col justify-between items-center gap-4 rounded-2xl overflow-hidden ${
className || ""
}`}
>
<div className="w-full grid xxs:grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 items-center justify-center gap-2 md:gap-4">
{getUpperBanner?.map((props, idx) => {
let image = getImage(props);
let { short_title, short_description, short_button_text, link_path } =
props;
return (
<TopBanner
btn={short_button_text}
image={image}
title={short_title}
desc={short_description}
link_path={link_path}
key={idx}
/>
);
})}
</div>
<div className="w-full grid-cols-1 md:grid-cols-2 2xl::grid-cols-3 grid items-center justify-center gap-2 md:gap-4">
{getLowerBanner?.map((props, idx) => {
let image = getImage(props);
let { short_title, short_description, short_button_text, link_path } =
props;
return (
<LowerBanner
btn={short_button_text}
image={image}
title={short_title}
desc={short_description}
link_path={link_path}
key={idx}
/>
);
})}
</div>
</div>
);
};
export default AccountDashboard;
const TopBanner = ({ image, title = "", desc = "", btn, link_path, key }) => {
return (
<div className="flex flex-col shadow-md rounded-xl dark:border-[#5356fb29]" key={key}>
<Link to={link_path} className="h-[12rem] rounded-t-xl">
<img
src={image}
alt="banner-img"
loading="lazy"
className="w-full h-full rounded-t-xl object-cover"
/>
</Link>
<div className="h-[7rem] rounded-b-xl bg-white dark:bg-dark-white">
<div className="border-b border-slate-300 px-2 py-1 h-[5.4rem] flex flex-col gap-2 dark:text-white">
<Link to={link_path} className="font-bold text-lg">
{title}
</Link>
<Link to={link_path} className="text-sm">
{desc}
</Link>
</div>
<div className="flex justify-between w-full px-2 items-center pt-[0.2rem]">
<Link to={link_path} className="text-slate-300 font-semibold text-sm">
{btn}
</Link>
<button className="flex items-center justify-center gap-2">
<div className="w-[4px] h-[4px] bg-slate-400 rounded-full"></div>
<div className="w-[4px] h-[4px] bg-slate-400 rounded-full"></div>
<div className="w-[4px] h-[4px] bg-slate-400 rounded-full"></div>
</button>
</div>
</div>
</div>
);
};
const LowerBanner = ({ image, title = "", desc = "", btn, link_path, key }) => {
return (
<div
key={key}
className="flex flex-col bg-white shadow-md h-full rounded-xl dark:border-[#5356fb29] dark:bg-dark-white"
>
<div className="w-full flex justify-between border-b border-slate-300 p-2">
<div className="h-[130px] flex justify-between items-center">
<div className="px-2 flex flex-col gap-2 dark:text-white">
<Link to={link_path} className="text-lg font-bold">
{title}
</Link>
<p to={link_path} className="text-sm">
{desc}
</p>
</div>
</div>
<Link to={link_path} className="w-[150px] h-[100px]">
<img
src={image}
alt="banner-img"
loading="lazy"
className="w-full h-full rounded-xl"
/>
</Link>
</div>
<div className="flex justify-between w-full px-2 items-center">
<Link to={link_path} className="text-slate-300 font-semibold text-sm">
{btn}
</Link>
<button className="flex items-center justify-center gap-2">
<div className="w-[4px] h-[4px] bg-slate-400 rounded-full"></div>
<div className="w-[4px] h-[4px] bg-slate-400 rounded-full"></div>
<div className="w-[4px] h-[4px] bg-slate-400 rounded-full"></div>
</button>
</div>
</div>
);
};
const BannerSection = ({ banners, variant }) => {
const getImage = ({ banner_location, banner }) => {
return banner_location === "LOCAL"
? require(`../../assets/images/${banner}`)
: banner;
};
return (
<>
{banners?.map((props, idx) => {
const { short_title, short_description, short_button_text, link_path } =
props;
const image = getImage(props);
return (
<div
key={idx}
className={`flex flex-col shadow-md rounded-xl ${
variant === "top" ? "" : "bg-white"
}`}
>
<div className={`${variant === "top" ? "rounded-t-xl" : ""}`}>
<Link to={link_path}>
<img
src={image}
alt="banner-img"
className="w-full h-full rounded-t-xl object-cover"
/>
</Link>
</div>
<div
className={`${
variant === "top"
? "rounded-b-xl bg-white"
: "border-b border-slate-300"
} h-[7rem]`}
>
<div className="border-b border-slate-300 px-2 py-1 h-[5.4rem] flex flex-col gap-2">
<Link to={link_path} className="font-bold text-lg">
{short_title}
</Link>
<Link to={link_path} className="text-sm">
{short_description}
</Link>
</div>
<div className="flex justify-between w-full px-2 items-center">
<Link to={link_path} className="text-slate-300 font-semibold">
{short_button_text}
</Link>
<button className="flex items-center justify-center gap-2">
<div className="w-[4px] h-[4px] bg-slate-400 rounded-full"></div>
<div className="w-[4px] h-[4px] bg-slate-400 rounded-full"></div>
<div className="w-[4px] h-[4px] bg-slate-400 rounded-full"></div>
</button>
</div>
</div>
</div>
);
})}
</>
);
};
@@ -0,0 +1,83 @@
import React from "react";
import CountDown from "../Helpers/CountDown";
// import HomeSliders from "./HomeSliders";
import { useSelector } from "react-redux";
export default function FamilyParentDashboard({
className,
bannerList,
nextDueTask,
}) {
const { userDetails } = useSelector((state) => state?.userDetails);
let loginDate = userDetails?.last_login.split(" ")[0];
let { firstname, lastname, email } = userDetails;
let userEmail = email.split("@")[0];
return (
<div
className={`w-full md:h-[47px] xxs:h-[74px] flex px-[1.05rem] py-[0.35rem] flex-wrap justify-between items-center gap-2 rounded-2xl overflow-hidden bg-sky-blue ${
className || ""
}`}
style={{
// background: `url(${heroBg})`,
backgroundRepeat: "no-repeat",
backgroundSize: "cover",
}}
>
<div className="h-full flex flex-wrap w-full justify-between mb-5 lg:mb-0">
{/* heading */}
<div className="flex gap-8">
<h1 className="text-base font-medium text-white tracking-wide">
Welcome
</h1>
{/* user */}
<div className="flex flex-col gap-1">
<p className="text-base tracking-wide font-bold antise text-white leading-[1]">
{`${firstname} ${lastname}`}
</p>
<p className="text-sm tracking-wide text-white leading-[1]">
@{userEmail}
</p>
</div>
</div>
{/* countdown */}
{nextDueTask?.next_due &&
Object.keys(nextDueTask.next_due)?.length != 0 && (
<div className="w-full h-32 flex justify-evenly items-center sm:p-6 p-1 rounded-2xl border back-dark1 border-white-opacity">
<div className="flex flex-col justify-between">
<p className="text-base text-white tracking-wide">
Current Task
</p>
<p className="lg:text-2xl text-lg font-bold tracking-wide text-white">
{nextDueTask.next_due.item_code.substr(0, 4) + "..."}
</p>
<p className="text-base text-white tracking-wide">
{nextDueTask.next_due.price * 0.01} Naira
</p>
</div>
<div className="w-[1px] h-full bg-white-opacity"></div>
<div className="flex flex-col justify-between">
<p className="text-base text-white tracking-wide">
Next due in
</p>
<p className="lg:text-2xl text-lg font-bold tracking-wide text-white">
{/* <CountDown lastDate="2023-04-26 4:00:00" /> */}
<CountDown lastDate={nextDueTask.next_due.due_date} />
</p>
<div className="text-base text-white tracking-wide flex gap-[23px]">
<span>Hrs</span>
<span>Min</span>
<span>Sec</span>
</div>
</div>
</div>
)}
<span className="text-base font-thin tracking-wide text-white flex items-end">
Last Login : {loginDate}
</span>
</div>
</div>
);
}
@@ -0,0 +1,79 @@
import React from "react";
import CountDown from "../Helpers/CountDown";
// import HomeSliders from "./HomeSliders";
import { useSelector } from "react-redux";
export default function HomeDashboard({ className, bannerList, nextDueTask }) {
const { userDetails } = useSelector((state) => state?.userDetails);
let loginDate = userDetails?.last_login.split(" ")[0];
let { firstname, lastname, email } = userDetails;
let userEmail = email.split("@")[0];
return (
<div
className={`w-full md:h-[47px] xxs:h-[74px] flex px-[1.05rem] py-[0.35rem] flex-wrap justify-between items-center gap-2 rounded-2xl overflow-hidden bg-sky-blue ${
className || ""
}`}
style={{
// background: `url(${heroBg})`,
backgroundRepeat: "no-repeat",
backgroundSize: "cover",
}}
>
<div className="h-full flex flex-wrap w-full justify-between mb-5 lg:mb-0">
{/* heading */}
<div className="flex gap-8">
<h1 className="text-base font-medium text-white tracking-wide">
Welcome
</h1>
{/* user */}
<div className="flex flex-col gap-1">
<p className="text-base tracking-wide font-bold antise text-white leading-[1]">
{`${firstname} ${lastname}`}
</p>
<p className="text-sm tracking-wide text-white leading-[1]">
@{userEmail}
</p>
</div>
</div>
{/* countdown */}
{nextDueTask?.next_due &&
Object.keys(nextDueTask.next_due)?.length != 0 && (
<div className="w-full h-32 flex justify-evenly items-center sm:p-6 p-1 rounded-2xl border back-dark1 border-white-opacity">
<div className="flex flex-col justify-between">
<p className="text-base text-white tracking-wide">
Current Task
</p>
<p className="lg:text-2xl text-lg font-bold tracking-wide text-white">
{nextDueTask.next_due.item_code.substr(0, 4) + "..."}
</p>
<p className="text-base text-white tracking-wide">
{nextDueTask.next_due.price * 0.01} Naira
</p>
</div>
<div className="w-[1px] h-full bg-white-opacity"></div>
<div className="flex flex-col justify-between">
<p className="text-base text-white tracking-wide">
Next due in
</p>
<p className="lg:text-2xl text-lg font-bold tracking-wide text-white">
{/* <CountDown lastDate="2023-04-26 4:00:00" /> */}
<CountDown lastDate={nextDueTask.next_due.due_date} />
</p>
<div className="text-base text-white tracking-wide flex gap-[23px]">
<span>Hrs</span>
<span>Min</span>
<span>Sec</span>
</div>
</div>
</div>
)}
<span className="text-base font-thin tracking-wide text-white flex items-end">
Last Login : {loginDate}
</span>
</div>
</div>
);
}
@@ -0,0 +1,83 @@
import React from "react";
import CountDown from "../Helpers/CountDown";
// import HomeSliders from "./HomeSliders";
import { useSelector } from "react-redux";
export default function JobOwnerDashboard({
className,
bannerList,
nextDueTask,
}) {
const { userDetails } = useSelector((state) => state?.userDetails);
let loginDate = userDetails?.last_login.split(" ")[0];
let { firstname, lastname, email } = userDetails;
let userEmail = email.split("@")[0];
return (
<div
className={`w-full md:h-[47px] xxs:h-[74px] flex px-[1.05rem] py-[0.35rem] flex-wrap justify-between items-center gap-2 rounded-2xl overflow-hidden bg-sky-blue ${
className || ""
}`}
style={{
// background: `url(${heroBg})`,
backgroundRepeat: "no-repeat",
backgroundSize: "cover",
}}
>
<div className="h-full flex flex-wrap w-full justify-between mb-5 lg:mb-0">
{/* heading */}
<div className="flex gap-8">
<h1 className="text-base font-medium text-white tracking-wide">
Welcome
</h1>
{/* user */}
<div className="flex flex-col gap-1">
<p className="text-base tracking-wide font-bold antise text-white leading-[1]">
{`${firstname} ${lastname}`}
</p>
<p className="text-sm tracking-wide text-white leading-[1]">
@{userEmail}
</p>
</div>
</div>
{/* countdown */}
{nextDueTask?.next_due &&
Object.keys(nextDueTask.next_due)?.length != 0 && (
<div className="w-full h-32 flex justify-evenly items-center sm:p-6 p-1 rounded-2xl border back-dark1 border-white-opacity">
<div className="flex flex-col justify-between">
<p className="text-base text-white tracking-wide">
Current Task
</p>
<p className="lg:text-2xl text-lg font-bold tracking-wide text-white">
{nextDueTask.next_due.item_code.substr(0, 4) + "..."}
</p>
<p className="text-base text-white tracking-wide">
{nextDueTask.next_due.price * 0.01} Naira
</p>
</div>
<div className="w-[1px] h-full bg-white-opacity"></div>
<div className="flex flex-col justify-between">
<p className="text-base text-white tracking-wide">
Next due in
</p>
<p className="lg:text-2xl text-lg font-bold tracking-wide text-white">
{/* <CountDown lastDate="2023-04-26 4:00:00" /> */}
<CountDown lastDate={nextDueTask.next_due.due_date} />
</p>
<div className="text-base text-white tracking-wide flex gap-[23px]">
<span>Hrs</span>
<span>Min</span>
<span>Sec</span>
</div>
</div>
</div>
)}
<span className="text-base font-thin tracking-wide text-white flex items-end">
Last Login : {loginDate}
</span>
</div>
</div>
);
}
+103
View File
@@ -0,0 +1,103 @@
import React, { useState } from "react";
import { Link } from "react-router-dom";
import { toast } from "react-toastify";
import heroBg from "../../assets/images/bg-sky-blue.jpg"; //hero-bg.svg";
import heroUser from "../../assets/images/hero-user.png";
import CountDown from "../Helpers/CountDown";
// import HomeSliders from "./HomeSliders";
import { useSelector } from "react-redux";
import HomeSliders from "../Home/HomeSliders";
export default function WorkerDashboard({ className, bannerList, nextDueTask }) {
const settings = {
autoplay: true,
dots: true,
arrows: false,
infinite: true,
swipe: true,
};
const sildeData = null;
const { userDetails } = useSelector((state) => state?.userDetails);
let loginDate = userDetails?.last_login.split(" ")[0];
let { firstname, lastname, email, profile_pic } = userDetails;
let userEmail = email.split("@")[0];
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 bg-blue-900 ${
className || ""
}`}
style={{
// background: `url(${heroBg})`,
backgroundRepeat: "no-repeat",
backgroundSize: "cover",
}}
>
<div className="h-full flex flex-col justify-between mb-5 lg:mb-0">
{/* heading */}
<div>
<h1 className="lg:text-2xl text-xl font-medium text-white tracking-wide">
Welcome
</h1>
<span className="text-[18px] font-thin tracking-wide text-white">
Last Login : {loginDate}
</span>
</div>
{/* user */}
<div className="flex items-center space-x-3">
<div className="w-14 h-14 flex justify-center items-center rounded-full overflow-hidden">
<img src={profile_pic != "" ? profile_pic : heroUser} alt="" />
</div>
<div>
<p className="text-xl tracking-wide font-bold antise text-white">
{`${firstname} ${lastname}`}
</p>
<p className="text-sm tracking-wide text-white">@{userEmail}</p>
</div>
</div>
{/* countdown */}
{nextDueTask?.next_due && Object.keys(nextDueTask.next_due)?.length != 0 && (
<div className="w-full h-32 flex justify-evenly items-center sm:p-6 p-1 rounded-2xl border back-dark1 border-white-opacity">
<div className="flex flex-col justify-between">
<p className="text-base text-white tracking-wide">Current Task</p>
<p className="lg:text-2xl text-lg font-bold tracking-wide text-white">
{(nextDueTask.next_due.item_code).substr(0,4)+'...'}
</p>
<p className="text-base text-white tracking-wide">
{nextDueTask.next_due.price * 0.01} Naira
</p>
</div>
<div className="w-[1px] h-full bg-white-opacity"></div>
<div className="flex flex-col justify-between">
<p className="text-base text-white tracking-wide">Next due in</p>
<p className="lg:text-2xl text-lg font-bold tracking-wide text-white">
{/* <CountDown lastDate="2023-04-26 4:00:00" /> */}
<CountDown lastDate={nextDueTask.next_due.due_date} />
</p>
<div className="text-base text-white tracking-wide flex gap-[23px]">
<span>Hrs</span>
<span>Min</span>
<span>Sec</span>
</div>
</div>
</div>
)}
{/* action */}
<div className="flex lg:space-x-3 space-x-1 items-center">
<Link to="/mytask" className="text-white text-base">
<span className=" border-b dark:border-[#5356fb29] border-white">
{" "}
View All Task(s)
</span>
</Link>
</div>
</div>
<HomeSliders
settings={settings}
sideData={sildeData}
bannerList={bannerList}
/>
</div>
);
}
@@ -0,0 +1,83 @@
import React from "react";
import CountDown from "../Helpers/CountDown";
// import HomeSliders from "./HomeSliders";
import { useSelector } from "react-redux";
export default function WorkerDashboard({
className,
bannerList,
nextDueTask,
}) {
const { userDetails } = useSelector((state) => state?.userDetails);
let loginDate = userDetails?.last_login.split(" ")[0];
let { firstname, lastname, email } = userDetails;
let userEmail = email.split("@")[0];
return (
<div
className={`w-full md:h-[47px] xxs:h-[74px] flex px-[1.05rem] py-[0.35rem] flex-wrap justify-between items-center gap-2 rounded-2xl overflow-hidden bg-sky-blue ${
className || ""
}`}
style={{
// background: `url(${heroBg})`,
backgroundRepeat: "no-repeat",
backgroundSize: "cover",
}}
>
<div className="h-full flex flex-wrap w-full justify-between mb-5 lg:mb-0">
{/* heading */}
<div className="flex gap-8">
<h1 className="text-base font-medium text-white tracking-wide">
Welcome
</h1>
{/* user */}
<div className="flex flex-col gap-1">
<p className="text-base tracking-wide font-bold antise text-white leading-[1]">
{`${firstname} ${lastname}`}
</p>
<p className="text-sm tracking-wide text-white leading-[1]">
@{userEmail}
</p>
</div>
</div>
{/* countdown */}
{nextDueTask?.next_due &&
Object.keys(nextDueTask.next_due)?.length != 0 && (
<div className="w-full h-32 flex justify-evenly items-center sm:p-6 p-1 rounded-2xl border back-dark1 border-white-opacity">
<div className="flex flex-col justify-between">
<p className="text-base text-white tracking-wide">
Current Task
</p>
<p className="lg:text-2xl text-lg font-bold tracking-wide text-white">
{nextDueTask.next_due.item_code.substr(0, 4) + "..."}
</p>
<p className="text-base text-white tracking-wide">
{nextDueTask.next_due.price * 0.01} Naira
</p>
</div>
<div className="w-[1px] h-full bg-white-opacity"></div>
<div className="flex flex-col justify-between">
<p className="text-base text-white tracking-wide">
Next due in
</p>
<p className="lg:text-2xl text-lg font-bold tracking-wide text-white">
{/* <CountDown lastDate="2023-04-26 4:00:00" /> */}
<CountDown lastDate={nextDueTask.next_due.due_date} />
</p>
<div className="text-base text-white tracking-wide flex gap-[23px]">
<span>Hrs</span>
<span>Min</span>
<span>Sec</span>
</div>
</div>
</div>
)}
<span className="text-base font-thin tracking-wide text-white flex items-end">
Last Login : {loginDate}
</span>
</div>
</div>
);
}
+13
View File
@@ -0,0 +1,13 @@
import FamilyParentDashboard from "./FamilyParentDashboard";
import HomeDashboard from "./HomeDashboard";
import JobOwnerDashboard from "./JobOwnerDashboard";
import WorkerDashboard from "./WorkerDashboard";
import AccountDashboard from "./AccountDashboard";
export {
FamilyParentDashboard,
HomeDashboard,
JobOwnerDashboard,
WorkerDashboard,
AccountDashboard
};
@@ -0,0 +1,10 @@
import React from 'react'
import Layout from '../Partials/Layout'
export default function FamilyPastDue() {
return (
<Layout>
<div>Family PastDue Page Here</div>
</Layout>
)
}
@@ -0,0 +1,44 @@
import React, { useEffect, useState } from 'react'
import Layout from '../Partials/Layout'
import MyOffersFamilyTable from '../MyTasks/MyOffersFamilyTable'
import LoadingSpinner from '../Spinners/LoadingSpinner';
import usersService from '../../services/UsersService';
export default function FamilyPendingOffer() {
const userApi = new usersService();
const [myOffersList, setMyOffersList] = useState({loading: true, data: []});
const getMyOffersList = async () => {
try {
const res = await userApi.getOffersList();
setMyOffersList({loading:false, data:res.data});
console.log('SAME', res.data)
} catch (error) {
setMyOffersList({loading:false, data:[]});
console.log("Error getting offers", error);
}
};
useEffect(()=>{
getMyOffersList()
},[])
return (
<Layout>
{myOffersList.loading ?
<LoadingSpinner size='10' color='sky-blue' height='h-[20rem]' />
:
myOffersList?.data?.result_list && myOffersList?.data?.result_list.length > 0 ?
<MyOffersFamilyTable
familyOffers={myOffersList?.data?.result_list}
image_server={myOffersList?.data?.session_image_server}
className="mb-10"
/>
:
<div className='w-full h-[30rem] bg-white dark:bg-dark-white flex justify-center items-center rounded-2xl'>
<p className='text-black dark:text-white'>No Record Found!</p>
</div>
}
</Layout>
)
}
@@ -0,0 +1,12 @@
import React from 'react'
import Layout from '../Partials/Layout'
import ParentWaiting from '../MyOffers/ParentWaiting'
export default function ParentWaitingLayout() {
return (
<Layout>
<ParentWaiting />
</Layout>
)
}
@@ -27,6 +27,7 @@ export default function InputCom({
direction,
tabIndex,
error,
autoComplete="on"
}) {
const inputRef = useRef(null);
// Entry Validation
@@ -52,7 +53,7 @@ export default function InputCom({
<div className={`flex items-center justify-between mb-2.5 ${labelClass}`}>
{label && (
<label
className="input-label text-[#181c32] dark:text-white text-[13.975px] leading-[20.9625px] font-semibold flex items-center gap-1"
className="input-label text-[#181c32] text-[13.975px] leading-[20.9625px] font-semibold flex items-center gap-1"
htmlFor={name}
>
{label}
@@ -85,7 +86,7 @@ export default function InputCom({
className={`input-wrapper w-full rounded-full h-[42px] overflow-hidden relative font-medium leading-6 bg-clip-padding text-base ${
inputClass
? inputClass
: "text-[#5e6278] dark:text-gray-100 bg-[#f5f8fa] dark:bg-[#5e6278] border"
: "text-[#5e6278] dark:text-gray-100 bg-[#f5f8fa] border"
}`}
>
<input
@@ -107,6 +108,7 @@ export default function InputCom({
readOnly={disable}
onBlur={blurHandler}
dir={direction}
autoComplete={autoComplete}
/>
{iconName && (
<div className="absolute right-6 bottom-3 z-10 flex gap-2">
+155 -9
View File
@@ -1,33 +1,179 @@
import React from "react";
import ParentWaiting from "../MyOffers/ParentWaiting";
import React, { useEffect, useState } from "react";
import { Link } from "react-router-dom";
import usersService from "../../services/UsersService";
import MyOffersFamilyTable from "../MyTasks/MyOffersFamilyTable";
import FamilyActiveLSlde from "./FamilyActiveLSlde";
import { useDispatch, useSelector } from "react-redux";
import { tableReload } from "../../store/TableReloads";
import LoadingSpinner from "../Spinners/LoadingSpinner";
export default function FamilyDash({ familyOffers, MyActiveJobList }) {
export default function FamilyDash({ MyActiveJobList, serverImg }) {
// console.log("PROPS IN FAMILY DASH->", familyOffers?.result_list);
const dispatch = useDispatch();
const userApi = new usersService();
const trending = MyActiveJobList;
const { familyBannersList } = useSelector((state) => state.familyBannersList);
const { familyResources:{ tab_categories } } = useSelector((state) => state.familyResources);
const { userDetails } = useSelector((state) => state?.userDetails);
let [reloadBanner, setReloadBanner] = useState(0)
// DO NOT UNCOMMENT THE CODE BELOW
// let [familyBannersList, setFamilyBannersList] = useState({loading:false, result:{}})
// const getFamilyBanners = async () => { // FUNCTION TO GET FAMILY BANNERS
// setFamilyBannersList({loading:true, result:[]});
// try {
// const res = await userApi.getFamilyBannersList();
// setFamilyBannersList({loading:false, result:res.data});
// console.log('TEST RESPONSE', res.data)
// } catch (error) {
// setFamilyBannersList({loading:false, result:[]});
// console.log("Error getting tasks");
// }
// };
// useEffect(()=>{
// getFamilyBanners()
// },[])
useEffect(()=>{
if(reloadBanner >= 2){
dispatch(tableReload({ type: "FAMILYBANNERSLIST" })); // RELOAD FAMILY BANNERS LIST EVERY 10 MINS
setReloadBanner(0)
}
const timer = setInterval(()=>{
setReloadBanner(prev => prev+1)
},300000)
return ()=>{
clearInterval(timer)
}
},[reloadBanner])
return (
<div>
<div className="home-page-wrapper">
{/* <CommonHead commonHeadData={props.commonHeadData} /> */}
{familyOffers?.result_list && familyOffers?.result_list.length > 0 && (
{/* Header */}
<div className="text-white mb-4 p-2 w-full rounded-xl bg-sky-blue place-content-center">
<div className="w-full flex flex-wrap gap-x-4">
<p className="text-lg font-normal leading-5">Welcome</p>
<div className="">
<h1 className="text-lg font-normal leading-5">{`${userDetails?.firstname} ${userDetails?.lastname}`}</h1>
</div>
</div>
<div className="w-full text-sm flex justify-end items-end">
<p className="leading-4">Last Login: {`${userDetails?.last_login.split(' ')[0]}`}</p>
</div>
</div>
{process.env.REACT_APP_SHOW_NEW_FAMILY_DASH == '1' &&
<>
{familyBannersList?.loading ?
<div className="w-full bg-white rounded-2xl">
<LoadingSpinner size='10' color='sky-blue' height='h-[20rem]' />
</div>
:
familyBannersList?.result_list && Object.keys(familyBannersList?.result_list).length > 0 ?
// Loop for Family Banners
<div className="w-full mb-4 grid grid-cols-2 md:grid-cols-3 gap-2 md:gap-4">
{Object.keys(familyBannersList?.result_list).map((item, index) => {
let content = familyBannersList?.result_list[item]
// let action = item == 'recommend' ? 'familymarket' : 'mytask'
return (
<Link key={item} to={`/${content.banner.action}`} className={`rounded-xl 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-[10rem] object-cover rounded-t-xl" src={content.banner.image} alt='banner image' />
<div className="flex flex-col justify-between">
<div className="px-2 py-2 border-b border-transparent min-h-[4rem] flex flex-col gap-1">
<h1 className="text-lg text-[#083e21] dark:text-white font-bold tracking-wide">{content.banner.text}</h1>
<p className="text-sm text-black dark:text-white">{content.banner.description}</p>
</div>
</div>
</div>
</Link>
)
})}
</div>
:
null
}
{tab_categories?.data &&
<div className="mb-4">
<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-4 gap-2 md:gap-4">
{tab_categories.data.map((item) => {
// onClick={()=>navigate('/resources', {state:{tab:'created'}})}
let resourceState = ''
switch(item?.action){
case 'fam-blog':
resourceState = 'blog'
break
case 'ai-question':
resourceState = 'onsale'
break
case 'myfiles':
resourceState = 'created'
break
case 'ai-lab':
resourceState = 'onsale'
break
default:
resourceState = 'blog'
break
}
// console.log('EX', item.enabled, item?.action, resourceState)
if(item.enabled){
return (
<Link key={item.uid} to={'/resources'} state={{tab:resourceState}} className={`group rounded-xl 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">
<div className="w-full h-[8rem] rounded-t-xl overflow-hidden">
<img className="w-full h-full group-hover:scale-110 object-cover transition-all duration-300" src={item?.banner} alt='banner image' />
</div>
<div className="flex flex-col justify-between">
<div className="px-2 py-1 border-b border-transparent min-h-[2rem] flex justify-between items-center gap-1">
<h1 className="text-lg text-[#083e21] dark:text-white font-bold tracking-wide">{item?.content}</h1>
<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>
</div>
</Link>
)}
})}
</div>
</div>
}
</>
}
{/* {familyOffers?.result_list && familyOffers?.result_list.length > 0 && (
<MyOffersFamilyTable
familyOffers={familyOffers?.result_list}
image_server={familyOffers?.session_image_server}
className="mb-10"
/>
)}
)} */}
{trending && trending.length > 0 && (
<FamilyActiveLSlde
trending={trending}
className="mb-10"
image_server={familyOffers?.session_image_server}
image_server={serverImg}
/>
)}
{/*<TopSellerTopBuyerSliderSection className="mb-10" />*/}
<ParentWaiting className="mb-10" />
</div>
</div>
);
+67 -27
View File
@@ -1,25 +1,72 @@
import { useSelector } from "react-redux";
import {
AccountDashboard,
FamilyParentDashboard,
HomeDashboard,
JobOwnerDashboard,
WorkerDashboard,
} from "../Dashboards";
import MyJobTable from "../MyTasks/MyJobTable";
import MyOffersTable from "../MyTasks/MyOffersTable";
import LoadingSpinner from "../Spinners/LoadingSpinner";
import Hero from "./Hero";
import HomeActivities from "./HomeActivities";
export default function FullAccountDash(props) {
// console.log("PROPS IN HOME->", props);
const { userDetails } = useSelector((state) => state?.userDetails);
const renderDashboard = () => {
switch (props.dashTypes) {
case "DEFAULT_HOME_DASH":
return (
<HomeDashboard
className="mb-4"
data={userDetails}
bannerList={props.bannerList}
nextDueTask={props.nextDueTask}
/>
);
case "FAMILY_PARENT_DASH":
return (
<FamilyParentDashboard
className="mb-4"
data={userDetails}
bannerList={props.bannerList}
nextDueTask={props.nextDueTask}
/>
);
case "WORKER_HOME_DASH":
return (
<WorkerDashboard
className="mb-4"
data={userDetails}
bannerList={props.bannerList}
nextDueTask={props.nextDueTask}
/>
);
case "JOBOWNER_HOME_DASH":
return (
<JobOwnerDashboard
className="mb-4"
data={userDetails}
bannerList={props.bannerList}
nextDueTask={props.nextDueTask}
/>
);
default:
return null;
}
};
return (
<>
<div className="home-page-wrapper">
<Hero
className="mb-10"
data={userDetails}
bannerList={props.bannerList}
nextDueTask={props.nextDueTask}
/>
{props.offersList?.data?.result_list?.length ? (
{renderDashboard()}
{process.env.REACT_APP_SHOW_ACCOUNT_DASH == "1" && (
<AccountDashboard className="mb-4" bannerList={props.bannerList} />
)}
{props?.dashTypes !== "undefined" &&
props.offersList?.data?.result_list?.length ? (
<MyOffersTable
MyActiveOffersList={props.offersList?.data}
className="mb-10"
@@ -37,24 +84,17 @@ export default function FullAccountDash(props) {
imageServer={props.offersList?.data?.session_image_server}
/>
</>
) : !props.offersList?.loading && !props.MyActiveJobList?.loading ? (
<HomeActivities className="mb-10" />
) : (
<div className="w-full h-[220px] flex items-center justify-center">
<LoadingSpinner size="16" color="sky-blue" />
</div>
)}
{/*<UpdateTable className="mb-10"/>*/}
{/*<SellHistoryMarketVisitorAnalytic className="mb-10"/>*/}
{/*<TopSellerTopBuyerSliderSection className="mb-10" />*/}
{/*<HomeTaskDisplay*/}
{/* jobData={jobData}*/}
{/* className="mb-10"*/}
{/* bannerList={props.bannerList}*/}
{/*/>*/}
) : null}
</div>
</>
);
}
// : !props.offersList?.loading && !props.MyActiveJobList?.loading ? (
// <HomeActivities className="mb-10" />
// )
// : (
// <div className="w-full h-[220px] flex items-center justify-center">
// <LoadingSpinner size="16" color="sky-blue" />
// </div>
// )
+1 -1
View File
@@ -53,7 +53,7 @@ export default function HomeActivities({ className }) {
return (
<div
className={`update-table w-full p-8 bg-white dark:bg-dark-white overflow-hidden rounded-2xl section-shadow relative min-h-[520px] ${
className={`update-table w-full p-8 bg-white dark:bg-dark-white overflow-hidden rounded-2xl relative min-h-[520px] ${
className || ""
}`}
>
+6 -3
View File
@@ -60,8 +60,9 @@ export default function Home(props) {
const fetchData = async () => {
await Promise.all([getHomeDate(), getMyOffersList()]);
};
fetchData();
if(userDetails?.account_type == 'FULL'){
fetchData();
}
}, []);
useEffect(() => {
@@ -75,13 +76,15 @@ export default function Home(props) {
<FamilyDash
account={userDetails}
commonHeadData={props.bannerList}
familyOffers={MyOffersList?.data}
// familyOffers={MyOffersList?.data}
serverImg = {userDetails?.session_image_server}
MyActiveJobList={MyActiveJobList?.data}
/>
) : userDetails && userDetails?.account_type == "FULL" ? (
<FullAccountDash
nextDueTask={nextDueTask}
bannerList={props.bannerList}
dashTypes={props.dashTypes}
offersList={MyOffersList}
MyActiveJobList={MyActiveJobList}
/>
+7 -6
View File
@@ -109,12 +109,13 @@ export default function MainSection({
endLength={products?.length}
>
{({ datas }) => (
<AvailableJobsCard
contentDisplay={contentDisplay}
image_server={image_server}
key={datas.id}
datas={datas}
/>
<div key={datas.job_uid}>
<AvailableJobsCard
contentDisplay={contentDisplay}
image_server={image_server}
datas={datas}
/>
</div>
)}
</DataIteration>
</div>
+5 -28
View File
@@ -31,40 +31,17 @@ export default function ParentWaiting({ className }) {
</div>
{/* <div className="overview-section-wrapper py-2 min-h-[450px] lg:flex lg:space-x-2 flex-1 lg:gap-8"> */}
<div className="overview-section-wrapper py-2 min-h-[400px] lg:grid grid-cols-2 gap-4">
<div className="mb-10 lg:mb-0 h-full w-full bg-white dark:bg-dark-white rounded-2xl overflow-hidden">
<div className="overview-countdown mb-10 lg:mb-0 h-full w-full flex flex-col justify-between p-4 rounded-2xl bg-white dark:bg-dark-white">
{<ParentWaitingTable />}
</div>
<div className="h-full w-full bg-white dark:bg-dark-white rounded-2xl overflow-hidden">
<img
src={activeAidsBanner}
alt="banner"
className="w-full h-full"
/>
</div>
<div className="overview-countdown h-full w-full flex flex-col justify-between p-4 rounded-2xl bg-white dark:bg-dark-white">
{<ParentWaitingTable />}
{/* <div className="lg:mb-0 mb-3">*/}
{/* <h1 className="text-2xl font-bold text-dark-gray dark:text-white tracking-wide">*/}
{/* Lock and Lob x Fiesta Spurs*/}
{/* </h1>*/}
{/* <span className="text-[18px] font-thin tracking-wide text-dark-gray dark:text-white">*/}
{/* ID : 2320382*/}
{/*</span>*/}
{/* </div>*/}
{/* /!* user *!/*/}
{/* <div className="flex items-center space-x-3 lg:mb-0 mb-3">*/}
{/* <div className="w-14 h-14 flex justify-center items-center rounded-full overflow-hidden">*/}
{/* <img src={HeroUser} alt="" />*/}
{/* </div>*/}
{/* <div>*/}
{/* <p className="text-xl tracking-wide font-bold antise text-dark-gray dark:text-white">*/}
{/* Brokln Simons*/}
{/* </p>*/}
{/* <p className="text-sm tracking-wide text-dark-gray dark:text-white">*/}
{/* @broklinslam_75*/}
{/* </p>*/}
{/* </div>*/}
{/* </div>*/}
</div>
</div>
</div>
</>
+21 -7
View File
@@ -6,6 +6,7 @@ import CommonHead from "../UserHeader/CommonHead";
import MyOffersTable from "./MyOffersTable";
import { useSelector } from "react-redux";
import { useNavigate } from "react-router-dom";
import CustomBreadcrumb from "../Breadcrumb/CustomBreadcrumb";
export default function MyTasks({
MyActiveOffersList,
@@ -74,13 +75,25 @@ export default function MyTasks({
/>
)}
<div className="w-full mb-5 flex justify-between items-center gap-1">
<h1 className="text-26 font-bold text-dark-gray dark:text-white">
<span
className={`${selectTab === "today" ? "block" : "hidden"}`}
>
My Tasks
</span>
</h1>
{userDetails.account_type == 'FULL'?
<h1 className="text-26 font-bold text-dark-gray dark:text-white">
<span
className={`${selectTab === "today" ? "block" : "hidden"}`}
>
My Tasks
</span>
</h1>
:
<CustomBreadcrumb
title = 'My Tasks'
breadcrumb={
[
{ link: "/", title: "Home" },
{ link: "/mytask", title: "My Tasks", active: true},
]
}
/>
}
{ActiveJobList?.data?.length > 0 && userDetails.account_type == 'FAMILY' &&
<button
@@ -94,6 +107,7 @@ export default function MyTasks({
</button>
}
</div>
<MyJobTable ActiveJobList={ActiveJobList} Account={userDetails} imageServer={MyActiveOffersList.session_image_server} />
</div>
</div>
@@ -66,6 +66,8 @@ const initialValues = {
function AddFundDollars(props) {
let MaxNoOfCards = process.env.REACT_APP_MAX_CREDIT_CARDS; // HOLDS THE VALUE OF THE MAX NUMBER OF CARDS USER CAN ADD
let [loadingState, setLoadingState] = useState(false)
const apiCall = new usersService();
let countryWallet = props.walletItem.country;
const [selectedOption, setSelectedOption] = useState("previous");
@@ -162,10 +164,11 @@ function AddFundDollars(props) {
}
}
props.setConfirmCredit((prev) => ({
...prev,
show: { awaitConfirm: { loader: true } },
}));
// props.setConfirmCredit((prev) => ({
// ...prev,
// show: { awaitConfirm: { loader: true } },
// }));
setLoadingState(true)
// Extracting card_uid from the previous card details
const paymentCardValue = prevCardDetails["payment-card"];
@@ -193,6 +196,18 @@ function AddFundDollars(props) {
if (res.data.internal_return < 0) {
props.setInputError("An Error Occurred");
throw new Error("An Error Occurred");
// use commented code when you when to display pop for failed start credit API
// props.setConfirmCredit((prev) => ({
// ...prev,
// show: {
// awaitConfirm: { loader: false, state: false },
// acceptConfirm: { loader: false, state: true },
// },
// data: {internal_return: -1}
// }));
setLoadingState(false)
return
}
const _response = res.data;
@@ -204,6 +219,7 @@ function AddFundDollars(props) {
stateData = { ...stateData, ..._response };
setTimeout(() => {
setLoadingState(false)
props.setConfirmCredit({
show: {
awaitConfirm: { loader: false, state: true },
@@ -213,6 +229,7 @@ function AddFundDollars(props) {
});
}, 1500);
} catch (error) {
setLoadingState(false)
props.setInputError(error.message);
setTimeout(() => props.setInputError(""), 5000);
props.setConfirmCredit((prev) => ({
@@ -582,7 +599,7 @@ function AddFundDollars(props) {
type="submit"
className="px-4 py-1 h-11 max-w-[115px] w-full flex justify-center items-center btn-gradient text-base rounded-full text-white"
>
{props.confirmCredit?.show?.awaitConfirm?.loader ? (
{loadingState ? (
<LoadingSpinner size="6" color="sky-blue" />
) : (
<>
@@ -616,7 +633,7 @@ function AddFundDollars(props) {
type="button"
className="px-4 py-1 h-11 max-w-[115px] w-full flex justify-center items-center btn-gradient text-base rounded-full text-white"
>
{props.confirmCredit?.show?.awaitConfirm?.loader ? (
{loadingState ? (
<LoadingSpinner size="6" color="sky-blue" />
) : (
<span className="text-white">Continue</span>
@@ -86,6 +86,16 @@ function AddFundPop({
}));
setInputError("An Error Occurred");
setTimeout(() => setInputError(""), 5000);
// use commented code when you when to display pop for failed start credit API
// setConfirmCredit((prev) => ({
// ...prev,
// show: {
// awaitConfirm: { loader: false, state: false },
// acceptConfirm: { loader: false, state: true },
// },
// data: {internal_return: -1}
// }));
return;
}
@@ -70,7 +70,8 @@ function CompleteConfirmCredit({ onClose, confirmCredit }) {
}`}
</span>
</div>
{data?.curr_balance &&
<div className="flex items-center gap-8">
<h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
Wallet Balance
@@ -79,6 +80,7 @@ function CompleteConfirmCredit({ onClose, confirmCredit }) {
{data?.curr_balance * 0.01}
</span>
</div>
}
{isSuccess && (
<div className="flex items-center gap-8">
@@ -239,7 +239,8 @@ function ConfirmAddFund({
setConfirmCredit((prev) => ({
...prev,
show: {
acceptConfirm: { loader: false },
awaitConfirm: { loader: false, state: false },
acceptConfirm: { loader: false, state: true },
},
}));
return;
@@ -261,7 +262,8 @@ function ConfirmAddFund({
setConfirmCredit((prev) => ({
...prev,
show: {
acceptConfirm: { loader: false },
awaitConfirm: { loader: false, state: false },
acceptConfirm: { loader: false, state: true },
},
}));
console.log(error);
@@ -333,7 +335,8 @@ function ConfirmAddFund({
setConfirmCredit((prev) => ({
...prev,
show: {
acceptConfirm: { loader: false },
awaitConfirm: { loader: false, state: false },
acceptConfirm: { loader: false, state: true },
},
}));
setTimeout(() => onClose, 10000);
+1 -1
View File
@@ -47,7 +47,7 @@ const WalletRoutes = () => {
}
setAllCountries((prev) => ({
loading: false,
data: res.data.result_list,
data: res?.data?.result_list,
}));
})
.catch((error) => {
+62 -46
View File
@@ -1,18 +1,17 @@
import React, { useContext, useMemo, useState } from "react";
import { Link, useLocation, useNavigate } from "react-router-dom";
import React, { useContext } from "react";
import { Link, useLocation } from "react-router-dom";
import bank1 from "../../assets/images/bank-1.png";
import bank2 from "../../assets/images/bank-2.png";
import bank3 from "../../assets/images/bank-3.png";
import bank4 from "../../assets/images/bank-4.png";
import profileImg from "../../assets/images/profile.jpg";
import useToggle from "../../hooks/useToggle";
import usersService from "../../services/UsersService";
import DarkModeContext from "../Contexts/DarkModeContext";
import Icons from "../Helpers/Icons";
import ModalCom from "../Helpers/ModalCom";
import WalletHeader from "../MyWallet/WalletHeader";
import { useDispatch, useSelector } from "react-redux";
import { useSelector } from "react-redux";
import Flag from "../../assets/images/united-states.svg";
import siteLogo from "../../assets/images/wrenchboard-logo-text.png";
// import { updateWalletDetails } from "../../store/walletDetails";
@@ -27,11 +26,6 @@ export default function Header({ logoutModalHandler, sidebarHandler }) {
const [moneyPopup, setPopup] = useToggle(false);
const darkMode = useContext(DarkModeContext);
const { userDetails } = useSelector((state) => state?.userDetails);
const { walletTable } = useSelector((state) => state.tableReload); // DETERMINES WHEN WALLET RELOADS
const [myWalletList, setMyWalletList] = useState([]);
const api = useMemo(() => new usersService(), []);
const dispatch = useDispatch();
const navigate = useNavigate();
const { notifications } = useSelector((state) => state?.notifications); // NOTIFICATION STORE
const { walletDetails } = useSelector((state) => state?.walletDetails); // WALLET STORE
@@ -157,15 +151,16 @@ export default function Header({ logoutModalHandler, sidebarHandler }) {
</defs>
</svg>
</button>
{/* search bar */}
<div className="search-bar lg:block hidden w-[376px]">
{/*<SearchCom />*/}
<div className="search-bar xl:hidden justify-center items-center w-[376px]">
{/* Home */}
<HomeButton />
</div>
{/* user info */}
<div className="user-info flex items-center justify-end w-full xl:space-x-7 space-x-2 z-10 ">
{/* dark mode */}
<button
{/* <button
onClick={darkMode.handleThemeSwitch}
type="button"
className="xl:w-[176px] w-[52px] h-[52px] dark:bg-white bg-dark-gray border border-pink rounded-full flex justify-center items-center"
@@ -236,11 +231,11 @@ export default function Header({ logoutModalHandler, sidebarHandler }) {
{darkMode.theme === "light" ? "Dark" : "Light"} Mode
</span>
</div>
</button>
</button> */}
{/* balance */}
{/* My Page Button */}
<PageButton />
{userDetails.account_type === "FULL" ? <PageButton /> : null}
{/*<div className="lg:hidden block"></div>*/}
<WalletHeader
@@ -505,15 +500,6 @@ export default function Header({ logoutModalHandler, sidebarHandler }) {
</div>
</div>
</div>
{/* <div className="for-mobile-profile lg:hidden block">
<div
// to="/profile"
onClick={() => handlerProfile()}
className="lg:w-[62px] lg:h-[62px] w-[50px] h-[50px] rounded-full overflow-hidden block"
>
<img src={profileImg} alt="profile" className="w-full h-full" />
</div>
</div> */}
</div>
</div>
</div>
@@ -671,28 +657,58 @@ export default function Header({ logoutModalHandler, sidebarHandler }) {
);
}
const PageButton = () => {
return (
<Link to="/yourpage" className="lg:flex hidden user-balance cursor-pointer lg:w-[152px] w-[150px] h-[48px] items-center rounded-full relative bg-sky-blue pr-1.5 pl-4">
<div
className="flex items-center lg:justify-between justify-center w-full h-full"
>
<span className="lg:block hidden w-[25px]">
<Link
to="/yourpage"
className="lg:flex hidden user-balance cursor-pointer lg:w-[152px] w-[150px] h-[48px] items-center rounded-full relative bg-sky-blue pr-1.5 pl-4"
>
<div className="flex items-center lg:justify-between justify-center w-full h-full">
<span className="lg:block hidden w-[25px]">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 50" id="Page">
<path
fillRule="evenodd"
d="M0 13V2a2 2 0 0 1 2-2h64a2 2 0 0 1 2 2v11H0Zm0 4v31a2 2 0 0 0 2 2h20V17H0Zm26 33h40a2 2 0 0 0 2-2V17H26v33Z"
fill="#ffffff"
className="color000000 svgShape"
></path>
</svg>
</span>
<p className="lg:text-xl text-lg font-bold text-white">My Page</p>
<span className="lg:block hidden">
{/* <Icons name="deep-plus" /> */}
</span>
</div>
<path
fillRule="evenodd"
d="M0 13V2a2 2 0 0 1 2-2h64a2 2 0 0 1 2 2v11H0Zm0 4v31a2 2 0 0 0 2 2h20V17H0Zm26 33h40a2 2 0 0 0 2-2V17H26v33Z"
fill="#ffffff"
className="color000000 svgShape"
></path>
</svg>
</span>
<p className="lg:text-xl text-lg font-bold text-white">My Page</p>
<span className="lg:block hidden">
{/* <Icons name="deep-plus" /> */}
</span>
</div>
</Link>
)
}
);
};
const HomeButton = () => {
return (
<Link
to="/"
className="flex user-balance cursor-pointer w-[110px] h-[48px] items-center rounded-full relative bg-sky-blue pr-1.5 pl-4"
>
<div className="flex items-center lg:justify-between justify-center w-full h-full">
<span className="">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
className="w-7 h-7 stroke-white fill-white"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"
/>
</svg>
</span>
<p className="lg:text-xl text-lg font-bold text-white">Home</p>
<span className=""></span>
</div>
</Link>
);
};
+1 -1
View File
@@ -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"
+170 -66
View File
@@ -1,10 +1,11 @@
import React, { useState } from "react";
import React, { useContext, useState } from "react";
import { useSelector } from "react-redux";
import { NavLink } from "react-router-dom";
//import SideStatistics from "./SideStatistics";
import { localImgLoad } from "../../lib";
import DarkModeContext from "../Contexts/DarkModeContext";
export default function RightSideBar({myJobList}) {
export default function RightSideBar({ myJobList }) {
const filterDatas = ["Last 15 days", "Last Month", "Last 6 month"];
const [filterDataSet, setFilterDataSet] = useState([10, 30, 20, 40]);
const dataSetHandler = (value) => {
@@ -16,6 +17,7 @@ export default function RightSideBar({myJobList}) {
setFilterDataSet([8, 15, 40, 30]);
}
};
const darkMode = useContext(DarkModeContext);
const [selectedRate, setSelectedRate] = useState("ETH");
const [rateStaticsDropdown, setRateStaticsDropdown] = useState(false);
@@ -153,79 +155,181 @@ export default function RightSideBar({myJobList}) {
</p>
</div>
</div>
{/* dark mode */}
<div
onClick={darkMode.handleThemeSwitch}
className="item flex space-x-5 items-center mb-4 cursor-pointer"
>
<span className="dark:text-dark-gray text-white">
{darkMode.theme === "light" ? (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
className="w-6 h-6 fill-black"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"
/>
</svg>
) : (
<svg
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="fill-current w-6 h-6"
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M18.3065 16.3771C18.1572 16.6304 17.986 16.8743 17.7937 17.1062C17.7118 17.2044 17.7247 17.3515 17.8228 17.4339C17.9208 17.5163 18.0665 17.5028 18.1484 17.4046C18.3569 17.1532 18.5419 16.8897 18.7043 16.6155C18.7695 16.5051 18.7334 16.3622 18.6238 16.2966C18.5142 16.2304 18.3722 16.2668 18.3065 16.3771ZM18.9591 14.722C18.8948 15.0116 18.8078 15.2975 18.6982 15.5759C18.6511 15.6955 18.7093 15.831 18.8282 15.878C18.9466 15.9255 19.0812 15.8668 19.1283 15.7477C19.2472 15.446 19.3411 15.1368 19.4104 14.8231C19.4382 14.6978 19.3596 14.5735 19.2347 14.5456C19.1103 14.5176 18.9864 14.5968 18.9591 14.722ZM19.0673 12.944C19.0955 13.2411 19.1006 13.5395 19.0825 13.8375C19.0747 13.9655 19.1718 14.0763 19.2994 14.0837C19.4266 14.0917 19.5362 13.9939 19.5441 13.8659C19.564 13.5437 19.5584 13.2206 19.5274 12.8994C19.5154 12.7713 19.4021 12.6777 19.2754 12.6899C19.1482 12.702 19.0548 12.816 19.0673 12.944ZM18.6229 11.2201C18.7422 11.4948 18.8388 11.7769 18.9128 12.0641C18.9447 12.1884 19.071 12.2629 19.1949 12.2308C19.3184 12.1987 19.3924 12.0716 19.3605 11.9473C19.2805 11.6363 19.1755 11.3304 19.0465 11.0334C18.9951 10.9156 18.8587 10.8616 18.7417 10.9133C18.6247 10.9649 18.5715 11.1023 18.6229 11.2201ZM17.6651 9.72283C17.8653 9.94816 18.0448 10.1856 18.2034 10.4333C18.2723 10.5413 18.4157 10.5725 18.523 10.5026C18.6303 10.4333 18.6612 10.2889 18.5919 10.1809C18.4208 9.91324 18.2265 9.65578 18.0092 9.4123C17.9241 9.31639 17.7779 9.30848 17.6827 9.39414C17.5879 9.4798 17.58 9.62738 17.6651 9.72283Z"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M13.4409 5.61267C9.08757 5.61267 5.55359 9.14665 5.55359 13.5C5.55359 17.8533 9.08757 21.3873 13.4409 21.3873C17.7942 21.3873 21.3282 17.8533 21.3282 13.5C21.3282 9.14665 17.7942 5.61267 13.4409 5.61267ZM13.9049 6.5559C17.5298 6.79484 20.4003 9.81475 20.4003 13.5C20.4003 17.1852 17.5298 20.2051 13.9049 20.4441V6.5559Z"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M12.1116 1.32213V3.46343C12.1116 4.19318 12.7072 4.78556 13.4409 4.78556C14.1746 4.78556 14.7702 4.19318 14.7702 3.46343V1.32213C14.7702 0.592374 14.1746 0 13.4409 0C12.7072 0 12.1116 0.592374 12.1116 1.32213Z"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M21.0877 4.01472L19.5511 5.5513C19.0274 6.07499 19.0274 6.92528 19.5511 7.44898C20.0748 7.97267 20.9251 7.97267 21.4488 7.44898L22.9854 5.9124C23.509 5.38871 23.509 4.53841 22.9854 4.01472C22.4617 3.49102 21.6114 3.49102 21.0877 4.01472Z"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M25.6581 12.3649H23.4849C22.7443 12.3649 22.1431 12.9661 22.1431 13.7068C22.1431 14.4474 22.7443 15.0486 23.4849 15.0486H25.6581C26.3988 15.0486 27 14.4474 27 13.7068C27 12.9661 26.3988 12.3649 25.6581 12.3649Z"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M22.9854 21.5012L21.4488 19.9646C20.9251 19.4409 20.0748 19.4409 19.5511 19.9646C19.0274 20.4883 19.0274 21.3386 19.5511 21.8623L21.0877 23.3989C21.6114 23.9226 22.4617 23.9226 22.9854 23.3989C23.509 22.8752 23.509 22.0249 22.9854 21.5012Z"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M14.7702 25.6778V23.5365C14.7702 22.8068 14.1746 22.2144 13.4409 22.2144C12.7072 22.2144 12.1116 22.8068 12.1116 23.5365V25.6778C12.1116 26.4076 12.7072 27 13.4409 27C14.1746 27 14.7702 26.4076 14.7702 25.6778Z"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M5.78958 23.0647L7.29553 21.5372C7.80878 21.0166 7.80878 20.1714 7.29553 19.6508C6.78228 19.1302 5.94893 19.1302 5.43568 19.6508L3.92974 21.1783C3.41649 21.6989 3.41649 22.5441 3.92974 23.0647C4.44299 23.5853 5.27633 23.5853 5.78958 23.0647Z"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M1.32213 14.8293H3.46343C4.19318 14.8293 4.78556 14.2337 4.78556 13.5C4.78556 12.7663 4.19318 12.1707 3.46343 12.1707H1.32213C0.592374 12.1707 0 12.7663 0 13.5C0 14.2337 0.592374 14.8293 1.32213 14.8293Z"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M3.92974 5.82165L5.43568 7.34911C5.94893 7.86969 6.78228 7.86969 7.29553 7.34911C7.80878 6.82853 7.80878 5.98328 7.29553 5.46269L5.78958 3.93524C5.27633 3.41465 4.44299 3.41465 3.92974 3.93524C3.41649 4.45582 3.41649 5.30107 3.92974 5.82165Z"
/>
</svg>
)}
</span>
<p className="text-thin-light-gray text-base font-medium">
{darkMode.theme === "light" ? "Dark" : "Light"} Mode
</p>
</div>
</div>
</div>
{/*JOB LINKS*/}
{myJobList?.data?.result_list?.length > 0 &&
<div className="top-platform mt-6 bg-white dark:bg-dark-white rounded-2xl py-8 2xl:w-[268px] w-full 2xl:mb-10 2xl:border-none border ">
{/* heading */}
<div className="px-8 heading flex justify-between items-center mb-3.5">
<h3 className="text-xl font-bold text-dark-gray dark:text-white">
Job Links
</h3>
<div></div>
</div>
<div className="platform-list">
<div className="px-8 item flex space-x-3 items-center mb-4">
{/* image */}
<div className="w-8 h-8 p-[4px] rounded-full">
<img src={localImgLoad('images/icons/job_active.svg')} className="w-full h-full" alt='Active Task' />
</div>
{/* name */}
<div>
<p className="text-thin-light-gray text-base font-medium">
<NavLink to="/my-active-jobs">Active Task</NavLink>
</p>
</div>
{/* action */}
{userDetails?.account_type !== "FAMILY" &&
myJobList?.data?.result_list?.length > 0 && (
<div className="top-platform mt-6 bg-white dark:bg-dark-white rounded-2xl py-8 2xl:w-[268px] w-full 2xl:mb-10 2xl:border-none border ">
{/* heading */}
<div className="px-8 heading flex justify-between items-center mb-3.5">
<h3 className="text-xl font-bold text-dark-gray dark:text-white">
Job Links
</h3>
<div></div>
</div>
<div className="px-8 item flex space-x-3 items-center mb-4">
{/* image */}
<div className="w-8 h-8 p-[4px] rounded-full">
<img src={localImgLoad('images/icons/job_pending.svg')} className="w-full h-full" alt='Review Task' />
<div className="platform-list">
<div className="px-8 item flex space-x-3 items-center mb-4">
{/* image */}
<div className="w-8 h-8 p-[4px] rounded-full">
<img
src={localImgLoad("images/icons/job_active.svg")}
className="w-full h-full"
alt="Active Task"
/>
</div>
{/* name */}
<div>
<p className="text-thin-light-gray text-base font-medium">
<NavLink to="/my-active-jobs">Active Task</NavLink>
</p>
</div>
{/* action */}
</div>
{/* name */}
<div>
<p className="text-thin-light-gray text-base font-medium">
<NavLink to="/my-review-jobs">Review</NavLink>
</p>
<div className="px-8 item flex space-x-3 items-center mb-4">
{/* image */}
<div className="w-8 h-8 p-[4px] rounded-full">
<img
src={localImgLoad("images/icons/job_pending.svg")}
className="w-full h-full"
alt="Review Task"
/>
</div>
{/* name */}
<div>
<p className="text-thin-light-gray text-base font-medium">
<NavLink to="/my-review-jobs">Review</NavLink>
</p>
</div>
</div>
<div className="px-8 item flex space-x-3 items-center mb-4">
{/* image */}
<div className="w-8 h-8 p-[4px] rounded-full">
<img
src={localImgLoad("images/icons/job_past_due.svg")}
className="w-full h-full"
alt="Past Due Task"
/>
</div>
{/* name */}
<div>
<p className="text-thin-light-gray text-base font-medium">
<NavLink to="/my-pastdue-jobs">Past Due</NavLink>
</p>
</div>
</div>
{/* Line */}
<div className="my-4 mx-auto w-10/12 h-[2px] bg-slate-500 dark:bg-white rounded-full"></div>
<div className="px-8 item flex space-x-3 items-center mb-4">
{/* image */}
<div className="w-8 h-8 p-[4px] rounded-full">
<img
src={localImgLoad("images/icons/job_group.svg")}
className="w-full h-full"
alt="Job Groups"
/>
</div>
{/* name */}
<div>
<p className="text-thin-light-gray text-base font-medium">
<NavLink to="/job-groups">Job Groups</NavLink>
</p>
</div>
</div>
</div>
<div className="px-8 item flex space-x-3 items-center mb-4">
{/* image */}
<div className="w-8 h-8 p-[4px] rounded-full">
<img src={localImgLoad('images/icons/job_past_due.svg')} className="w-full h-full" alt='Past Due Task' />
</div>
{/* name */}
<div>
<p className="text-thin-light-gray text-base font-medium">
<NavLink to="/my-pastdue-jobs">Past Due</NavLink>
</p>
</div>
</div>
{/* Line */}
<div className="my-4 mx-auto w-10/12 h-[2px] bg-slate-500 dark:bg-white rounded-full"></div>
<div className="px-8 item flex space-x-3 items-center mb-4">
{/* image */}
<div className="w-8 h-8 p-[4px] rounded-full">
<img src={localImgLoad('images/icons/job_group.svg')} className="w-full h-full" alt='Job Groups' />
</div>
{/* name */}
<div>
<p className="text-thin-light-gray text-base font-medium">
<NavLink to="/job-groups">Job Groups</NavLink>
</p>
</div>
</div>
</div>
</div>
}
</div>
)}
</div>
</>
);
+1 -1
View File
@@ -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"
+20 -8
View File
@@ -33,6 +33,9 @@ export default function Resources(props) {
const CreatedBits = __resources?.productdata?.datas;
const blogItems = __resources?.blogdata?.payload;
console.log(__resources);
console.log("Blog data >> ", blogItems);
// My Items Data
const [uploadedFiles, setUploadedFiles] = useState({
loading: false,
@@ -63,7 +66,7 @@ export default function Resources(props) {
loading: false,
msg: "success",
data: res?.result_list,
image:res?.session_image_server
image: res?.session_image_server,
}));
} catch (error) {
setUploadedFiles((prev) => ({
@@ -79,7 +82,13 @@ export default function Resources(props) {
}, [uploadsTable]);
// const [tab, setTab] = useState(tab_categories ? tab_categories[0]?.name : "");
const [tab, setTab] = useState(props.activeTab? props.activeTab : tab_categories ? tab_categories[0]?.name : "");
const [tab, setTab] = useState(
props.activeTab
? props.activeTab
: tab_categories
? tab_categories[0]?.name
: ""
);
const tabHandler = (value) => {
setTab(value);
@@ -105,8 +114,12 @@ export default function Resources(props) {
// const selectedTabComponent = tabComponents[tab] || defaultTabComponent;
const defaultTabComponent = props.activeTab ? tabComponents[props.activeTab] : <BlogTab blogdata={blogItems} />;
const selectedTabComponent = tabComponents[tab] || defaultTabComponent;
const defaultTabComponent = props.activeTab ? (
tabComponents[props.activeTab]
) : (
<BlogTab blogdata={blogItems} />
);
const selectedTabComponent = tabComponents[tab] || defaultTabComponent;
// Tab Item Component
const TabItem = ({ tabValue, isActive }) => {
@@ -160,17 +173,16 @@ export default function Resources(props) {
<ul className="lg:flex lg:space-x-14 space-x-8">
{tabCategories?.length > 0 &&
tabCategories?.map((tabValue, idx) => {
if(tabValue.enabled){
if (tabValue.enabled) {
return (
<TabItem
key={tabValue.id}
tabValue={tabValue}
isActive={tab === tabValue.name || (idx === 0 && tab === "")}
/>
)
);
}
}
)}
})}
</ul>
);
};
@@ -134,7 +134,7 @@ export default function MyUploadedFiles({ uploadedFiles }) {
prev={currentPage == 0 ? true : false}
next={
currentPage + Number(process.env.REACT_APP_ITEM_PER_PAGE) >=
uploadedFiles?.data.length
uploadedFiles?.data?.length
? true
: false
}
@@ -0,0 +1,12 @@
import React from "react";
import HomeActivities from "../../Home/HomeActivities";
const RecentActivitiesTab = () => {
return (
<div className="recent-activity-tab w-full">
<HomeActivities />
</div>
);
};
export default RecentActivitiesTab;
+2
View File
@@ -5,6 +5,7 @@ import NotificationSettingTab from "./NotificationSettingTab";
import PaymentMathodsTab from "./PaymentMathodsTab";
import PersonalInfoTab from "./PersonalInfoTab";
import PrivacyPolicyTab from "./PrivacyPolicyTab";
import RecentActivitiesTab from "./RecentActivitiesTab";
import TermsConditionTab from "./TermsConditionTab";
export {
@@ -15,5 +16,6 @@ export {
PaymentMathodsTab,
PersonalInfoTab,
PrivacyPolicyTab,
RecentActivitiesTab,
TermsConditionTab,
};
+12 -10
View File
@@ -1,10 +1,4 @@
import React, {
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from "react";
import React, { useCallback, useEffect, useState } from "react";
import { useSelector } from "react-redux";
import usersService from "../../services/UsersService";
import Icons from "../Helpers/Icons";
@@ -17,6 +11,7 @@ import {
PaymentMathodsTab,
PersonalInfoTab,
PrivacyPolicyTab,
RecentActivitiesTab,
TermsConditionTab,
} from "./Tabs";
import RecipientAccountTab from "./Tabs/RecipientAccountTab";
@@ -102,24 +97,30 @@ export default function Settings({ faq }) {
},
{
id: 6,
name: "recent_activities",
title: "Recent Activities",
iconName: "login-activity",
},
{
id: 7,
name: "password",
title: "Change Password",
iconName: "password-hover",
},
{
id: 7,
id: 8,
name: "faq",
title: "FAQ",
iconName: "block-question",
},
{
id: 8,
id: 9,
name: "privacy",
title: "Privacy Policy",
iconName: "page-right",
},
{
id: 9,
id: 10,
name: "terms",
title: "Terms and Conditions",
iconName: "page-right",
@@ -166,6 +167,7 @@ export default function Settings({ faq }) {
</div>
),
login_activity: <LoginActivityTab />,
recent_activities: <RecentActivitiesTab />,
password: <ChangePasswordTab />,
faq: <FaqTab datas={faq} />,
privacy: <PrivacyPolicyTab />,
+7 -9
View File
@@ -195,14 +195,14 @@ function JobListPopout({
const res = await apiCall.assignJobTask(reqData);
let { status, data } = await res;
if (status != 200 || data.internal_return < 0) {
setRequestStatus({ message: "Unable to complete", status: false });
setRequestStatus({ message: data?.status ? data?.status : "Unable to assign offer", status: false });
return setTimeout(() => {
setLoader({ jobFields: false });
setRequestStatus({ message: "", status: false });
}, 3000);
}
dispatch(tableReload({ type: "JOBTABLE" }));
setRequestStatus({ message: "Successful", status: true });
setRequestStatus({ message: data?.status_msg ? data?.status_msg : "Offer Assigned Successful", status: true });
setTimeout(() => {
setLoader({ jobFields: false });
onClose();
@@ -330,7 +330,6 @@ function JobListPopout({
<div className="md:grid grid-cols-2 bg-white dark:bg-dark-white rounded-lg shadow-lg">
<DetailsComponent />
<>
{/* ACTION SECTION */}
{+taskWalletSelector.amount > +details.price ? (
@@ -576,11 +575,6 @@ const JobFieldInput = ({
{item?.name}
</option>
)}
{/* {inputName === "group" && (
<option value={item?.group_id} key={idx}>
{item?.group_name}
</option>
)} */}
</React.Fragment>
))}
</>
@@ -594,7 +588,11 @@ const JobFieldInput = ({
<option value="">{optionText}</option>
{data?.groups?.map((item, index) => (
<option value={item?.group_id} key={index}>
{item?.group_name}
{`${item?.group_name} (${
item?.member_count == null
? "0"
: ' ' + item.member_count + ' '
})`}
</option>
))}
</>
+2
View File
@@ -132,6 +132,8 @@ export const apiConst = {
WRENCHBOARD_ACCOUNT_HOMEBANNERS: 11200,
WRENCHBOARD_ACCOUNT_PLAYGROUND: 11201,
WRENCHBOARD_ACCOUNT_FAMILY_BANNERS: 22005,
WRENCHBOARD_ACCOUNT_FAMILY_RESOURCES: 22017,
WRENCHBOARD_ACCOUNT_RECENTS: 11202,
WRENCHBOARD_ACCOUNT_NOTIFICATIONS: 11205,
+65 -19
View File
@@ -2,6 +2,7 @@ import { useCallback, useEffect, useMemo, useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import { Navigate, Outlet, useNavigate } from "react-router-dom";
import LoadingSpinner from "../components/Spinners/LoadingSpinner";
import { formattedDate } from "../lib";
import usersService from "../services/UsersService";
import { commonHeadBanner } from "../store/CommonHeadBanner";
import { recentActivitiesData } from "../store/RecentActivitiesData";
@@ -10,8 +11,8 @@ import { updateJobs } from "../store/jobLists";
import { updateNotifications } from "../store/notifications";
import { updateUserJobList } from "../store/userJobList";
import { updateWalletDetails } from "../store/walletDetails";
import { formattedDate } from "../lib";
import { tableReload } from "../store/TableReloads";
import { familyBannersList } from "../store/FamilyBannerList";
import { familyResources } from "../store/FamilyResources";
const AuthRoute = ({ redirectPath = "/login", children }) => {
const apiCall = useMemo(() => new usersService(), []);
@@ -21,12 +22,12 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
const [loadProfileDetails, setLoadProfileDetails] = useState([]);
const navigate = useNavigate();
const { jobListTable, walletTable } = useSelector(
const { jobListTable, walletTable, familyBannersListTable } = useSelector(
(state) => state.tableReload
);
const {
userDetails: { username, uid, session},
userDetails: { username, uid, session, account_type },
} = useSelector((state) => state?.userDetails); // CHECKS IF USER Details are avaliable, to determine if user is active
let loggedIn = username && session && uid ? true : false; // variable to determine if user is logged in
@@ -167,6 +168,9 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
}, []);
useEffect(() => {
if((!loggedIn && !isLogin.status) || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
return
}
const getMyJobList = async () => {
dispatch(updateUserJobList({ loading: true, data: [] }));
try {
@@ -181,7 +185,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
}
};
getMyJobList();
}, [jobListTable]);
}, [jobListTable, isLogin.status]);
useEffect(() => {
const getMyWalletList = async () => {
@@ -201,6 +205,9 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
}, [walletTable]);
useEffect(() => {
if((!loggedIn && !isLogin.status) || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
return
}
// Getting market data
const getMarketActiveJobList = async () => {
try {
@@ -211,23 +218,26 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
}
};
getMarketActiveJobList();
}, [apiCall, dispatch, jobListTable]);
}, [apiCall, dispatch, jobListTable, isLogin.status]);
//FUNCTION TO GET COMMON HEAD DATA
useEffect(() => {
apiCall
.getHeroJBanners()
.then((res) => {
if (res.data.internal_return < 0) {
return;
}
dispatch(commonHeadBanner(res.data));
})
.catch((error) => {
console.log("ERROR ", error);
});
}, []);
//
if((!loggedIn && !isLogin.status) || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
return
}
apiCall
.getHeroJBanners()
.then((res) => {
if (res.data.internal_return < 0) {
return;
}
dispatch(commonHeadBanner(res.data));
})
.catch((error) => {
console.log("ERROR ", error);
});
}, [isLogin.status]);
//FUNCTION TO GET COMMON HEAD DATA
useEffect(() => {
apiCall
@@ -244,6 +254,42 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
});
}, []);
//FUNCTION TO GET FAMILY BANNERS
useEffect(() => {
if((!loggedIn && !isLogin.status) || account_type == 'FULL'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FULL
return
}
const getFamilyBanners = async () => { // FUNCTION TO GET FAMILY BANNERS
// setFamilyBannersList({loading:true, result:[]});
try {
const res = await apiCall.getFamilyBannersList();
dispatch(familyBannersList({...res.data, loading:false}))
} catch (error) {
dispatch(familyBannersList({loading:false}))
console.log("Error getting tasks");
}
};
getFamilyBanners()
}, [isLogin.status, familyBannersListTable]);
//FUNCTION TO GET FAMILY RESOURCES
useEffect(() => {
if((!loggedIn && !isLogin.status) || account_type == 'FULL'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FULL
return
}
const getFamilyResourcesList = async () => { // FUNCTION TO GET FAMILY BANNERS
try {
const res = await apiCall.getFamilyResources();
dispatch(familyResources(res?.data?.result_list))
// console.log('RESPONSE', res?.data?.result_list)
} catch (error) {
console.log("Error getting tasks");
}
};
getFamilyResourcesList()
}, [isLogin.status, familyBannersListTable]);
// useEffect(() => {
// apiCall
// .getHeroJBanners()
+31 -1
View File
@@ -31,6 +31,10 @@ class usersService {
return this.postAuxEnd("/createuser", reqData);
}
blogData() {
return this.getAuxEnd("/blogdata", null);
}
CompleteOauthLogin(reqData) {
localStorage.setItem("session_token", ``);
return this.postAuxEnd("/authlogin", reqData);
@@ -1245,10 +1249,36 @@ class usersService {
member_id: localStorage.getItem("member_id"),
sessionid: localStorage.getItem("session_token"),
action: apiConst.WRENCHBOARD_RELATIVE_INVITE,
...reqData
...reqData,
};
return this.postAuxEnd("/familyrelinvite", postData);
}
// API FUNCTION TO FAMILY BANNERS
getFamilyBannersList() {
var postData = {
uid: localStorage.getItem("uid"),
member_id: localStorage.getItem("member_id"),
sessionid: localStorage.getItem("session_token"),
action: apiConst.WRENCHBOARD_ACCOUNT_FAMILY_BANNERS,
limit: 20,
offset: 1,
};
return this.postAuxEnd("/familybanners", postData);
}
// API FUNCTION TO FAMILY RESOURCES
getFamilyResources() {
var postData = {
uid: localStorage.getItem("uid"),
member_id: localStorage.getItem("member_id"),
sessionid: localStorage.getItem("session_token"),
action: apiConst.WRENCHBOARD_ACCOUNT_FAMILY_RESOURCES,
limit: 20,
offset: 1,
};
return this.postAuxEnd("/familyresources", postData);
}
/*
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(username)
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(password)
+20
View File
@@ -0,0 +1,20 @@
import { createSlice } from "@reduxjs/toolkit";
const initialState = {
familyBannersList: {loading:true}
};
export const familyBannersListSlice = createSlice({
name: "familyBannersList",
initialState,
reducers: {
familyBannersList: (state,action) => {
state.familyBannersList = {...action.payload}
},
},
});
// Action creators are generated for each case reducer function
export const { familyBannersList } = familyBannersListSlice.actions;
export default familyBannersListSlice.reducer;
+20
View File
@@ -0,0 +1,20 @@
import { createSlice } from "@reduxjs/toolkit";
const initialState = {
familyResources: {}
};
export const familyResourcesSlice = createSlice({
name: "familyResources",
initialState,
reducers: {
familyResources: (state,action) => {
state.familyResources = {...action.payload}
},
},
});
// Action creators are generated for each case reducer function
export const { familyResources } = familyResourcesSlice.actions;
export default familyResourcesSlice.reducer;
+4
View File
@@ -8,6 +8,7 @@ const initialState = {
couponTable: false,
walletTable: false,
uploadsTable: false,
familyBannersListTable: false,
};
export const tableReloadSlice = createSlice({
@@ -37,6 +38,9 @@ export const tableReloadSlice = createSlice({
case "UPLOADSTABLE":
state.uploadsTable = !state.uploadsTable;
return;
case "FAMILYBANNERSLIST":
state.familyBannersListTable = !state.familyBannersListTable;
return;
default:
return state;
}
+5 -1
View File
@@ -8,6 +8,8 @@ import jobReducer from "./jobLists";
import notificationsReducer from "./notifications";
import userJobListReducer from "./userJobList";
import walletDetails from "./walletDetails";
import familyBannerListReducer from "./FamilyBannerList"
import familyResourcesReducer from './FamilyResources'
export default configureStore({
reducer: {
@@ -18,6 +20,8 @@ export default configureStore({
userJobList: userJobListReducer,
commonHeadBanner: commonHeadBannerReducer,
notifications: notificationsReducer,
walletDetails: walletDetails
walletDetails: walletDetails,
familyBannersList: familyBannerListReducer,
familyResources: familyResourcesReducer
},
});
+10
View File
@@ -0,0 +1,10 @@
import React from 'react'
import FamilyPastDue from '../components/FamilyAcc/FamilyPastDue'
export default function FamilyPastDuePage() {
return (
<>
<FamilyPastDue />
</>
)
}
+10
View File
@@ -0,0 +1,10 @@
import React from 'react'
import FamilyPending from '../components/FamilyAcc/FamilyPendingOffer'
export default function FamilyPendingOfferPage() {
return (
<>
<FamilyPending />
</>
)
}
+7 -8
View File
@@ -1,18 +1,17 @@
import React, {useState, useEffect} from 'react'
import { useSelector } from "react-redux";
import Home from "../components/Home";
import usersService from "../services/UsersService";
import { useSelector } from 'react-redux';
export default function HomePages() {
const { commonHeadBanner } = useSelector((state) => state.commonHeadBanner);
const {commonHeadBanner} = useSelector(state => state.commonHeadBanner)
const bannerOptions = {
bannerList: commonHeadBanner?.result_list,
dashTypes: commonHeadBanner?.home_dash_type,
};
return (
<>
<Home
bannerList={commonHeadBanner?.result_list}
/>
<Home {...bannerOptions} />
</>
);
}
+10
View File
@@ -0,0 +1,10 @@
import React from 'react'
import ParentWaitingLayout from '../components/FamilyAcc/ParentWaiting'
export default function ParentWaitingPage() {
return (
<>
<ParentWaitingLayout />
</>
)
}
-1
View File
@@ -6,7 +6,6 @@ export default function ResourcePage() {
const {state, pathname} = useLocation() // CHECKS IF THERE IS AN ACTIVE TAB WITH LINK BACK TO RESOURCES
const [MyResourceData, setMyResourceData] = useState([]);
const api = new usersService();
const getMyResourceData = async () => {
try {
const res = await api.getResourceList();