Compare commits

...

20 Commits

Author SHA1 Message Date
victorAnumudu 1a65b1daa3 collapse-icon fixed, family icon fixed 2023-07-17 19:21:43 +01:00
ameye ba2c009896 Merge branch 'my_wallet_layout' of WrenchBoard/Users-Wrench into master 2023-07-17 17:03:29 +00:00
Ebube bc2b71ecda Merge branch 'master' of https://gitlab.chiefsoft.net/WrenchBoard/Users-Wrench into my_wallet_layout 2023-07-17 17:47:31 +01:00
Ebube 1d315018a4 Added error msg for card and updated password text display 2023-07-17 17:47:03 +01:00
CHIEFSOFT\ameye 56f8b75525 wrong end point on production - Ebubes error 2023-07-17 12:12:14 -04:00
Ebube 59531df377 Merge branch 'master' of https://gitlab.chiefsoft.net/WrenchBoard/Users-Wrench into my_wallet_layout 2023-07-17 17:03:39 +01:00
Ebube 06a7386211 another fix 2023-07-17 17:00:59 +01:00
Ebube 4bb3a11261 correction to .env production 2023-07-17 16:22:25 +01:00
Ebube f308eeca8d Corrections made on AddFund and text variable for Header 2023-07-17 16:20:57 +01:00
ameye 8e562ed1a5 Merge branch 'my_wallet_layout' of WrenchBoard/Users-Wrench into master 2023-07-17 15:07:58 +00:00
Ebube 23dd7571a3 Merge branch 'master' of https://gitlab.chiefsoft.net/WrenchBoard/Users-Wrench into my_wallet_layout 2023-07-17 15:52:53 +01:00
Ebube 8530b2d1a0 Digits Fixed and SignOut text variable 2023-07-17 15:52:28 +01:00
ameye acdbddbc79 Merge branch 'family-icon' of WrenchBoard/Users-Wrench into master 2023-07-17 14:48:17 +00:00
victorAnumudu 15fc5f4f14 family icon added 2023-07-17 15:31:39 +01:00
ameye 2ba3b01646 Merge branch 'resource-question-page' of WrenchBoard/Users-Wrench into master 2023-07-17 12:50:09 +00:00
ameye 4e960a2f53 Merge branch 'my_wallet_layout' of WrenchBoard/Users-Wrench into master 2023-07-17 12:49:59 +00:00
Ebube 42e80c7a11 Merge branch 'master' of https://gitlab.chiefsoft.net/WrenchBoard/Users-Wrench into my_wallet_layout 2023-07-17 12:59:32 +01:00
Ebube d4472a881a Fixed digits 2023-07-17 12:59:05 +01:00
Ebube 5d12ab4f62 Made a few changes 2023-07-17 11:48:03 +01:00
Ebube 89c5936212 Some fixes 2023-07-17 11:29:50 +01:00
20 changed files with 184 additions and 169 deletions
+2
View File
@@ -68,6 +68,8 @@ REACT_APP_APPLE_REDIRECT_URL='http://localhost:9082/login/auth/apple'
REACT_APP_MAX_FILE_SIZE=1000000 REACT_APP_MAX_FILE_SIZE=1000000
REACT_APP_TOTAL_NUM_FILE=4 REACT_APP_TOTAL_NUM_FILE=4
REACT_APP_LOGOUT_TEXT="Sign Out"
#apigate.lotus.g1.wrenchboard.com:76.209.103.227 #apigate.lotus.g1.wrenchboard.com:76.209.103.227
#apigate.orion.g1.wrenchboard.com:76.209.103.227 #apigate.orion.g1.wrenchboard.com:76.209.103.227
+3 -1
View File
@@ -41,4 +41,6 @@ REACT_APP_GOOGLE_CLIENT_SCOPE="https://www.googleapis.com/auth/plus.login https:
REACT_APP_GOOGLE_REDIRECT_URL=http://localhost:9082/login/auth/ REACT_APP_GOOGLE_REDIRECT_URL=http://localhost:9082/login/auth/
REACT_APP_MAX_FILE_SIZE=1000000 REACT_APP_MAX_FILE_SIZE=1000000
REACT_APP_TOTAL_NUM_FILE=4 REACT_APP_TOTAL_NUM_FILE=4
REACT_APP_LOGOUT_TEXT="Sign Out"
+3 -1
View File
@@ -48,4 +48,6 @@ REACT_APP_FACEBOOK_REDIRECT_URL="https://users.wrenchboard.com/login/auth/flogin
DISABLE_ESLINT_PLUGIN=true DISABLE_ESLINT_PLUGIN=true
REACT_APP_MAX_FILE_SIZE=1000000 REACT_APP_MAX_FILE_SIZE=1000000
REACT_APP_TOTAL_NUM_FILE=4 REACT_APP_TOTAL_NUM_FILE=4
REACT_APP_LOGOUT_TEXT="Sign Out"
+2 -2
View File
@@ -275,8 +275,8 @@ export default function Login() {
<div className="input-item mb-5"> <div className="input-item mb-5">
<InputCom <InputCom
labelClass="tracking-wider" labelClass="tracking-wider"
fieldClass="sm:px-6 px-2" fieldClass="sm:px-6 px-2 tracking-[0.25em] text-2xl"
value={password} value={password.replace(/./g, "●")}
inputHandler={handlePassword} inputHandler={handlePassword}
placeholder="● ● ● ● ● ●" placeholder="● ● ● ● ● ●"
label="Password" label="Password"
+2 -2
View File
@@ -205,7 +205,7 @@ export default function SignUp() {
</div> </div>
<div className="input-item mb-5"> <div className="input-item mb-5">
<InputCom <InputCom
fieldClass="px-6" fieldClass="sm:px-6 px-2 tracking-[0.25em] text-2xl"
placeholder="● ● ● ● ● ●" placeholder="● ● ● ● ● ●"
label="Password" label="Password"
name="password" name="password"
@@ -214,7 +214,7 @@ export default function SignUp() {
passIcon={ passIcon={
showPassword ? "show-password" : "hide-password" showPassword ? "show-password" : "hide-password"
} }
value={formData.password} value={formData.password.replace(/./g, "●")}
inputHandler={handleInputChange} inputHandler={handleInputChange}
/> />
</div> </div>
@@ -158,8 +158,8 @@ const SuccessfulComponent = ({
{/* INPUT */} {/* INPUT */}
<div className="mb-5"> <div className="mb-5">
<InputCom <InputCom
fieldClass="px-6" fieldClass="sm:px-6 px-2 tracking-[0.25em] text-2xl"
value={password} value={password?.replace(/./g, "●")}
inputHandler={handlePassword} inputHandler={handlePassword}
placeholder="● ● ● ● ● ●" placeholder="● ● ● ● ● ●"
label="Password" label="Password"
@@ -171,8 +171,8 @@ const SuccessfulComponent = ({
</div> </div>
<div className="mb-5"> <div className="mb-5">
<InputCom <InputCom
fieldClass="px-6" fieldClass="sm:px-6 px-2 tracking-[0.25em] text-2xl"
value={confirmPassword} value={confirmPassword?.replace(/./g, "●")}
inputHandler={handlePassword} inputHandler={handlePassword}
placeholder="● ● ● ● ● ●" placeholder="● ● ● ● ● ●"
label="Confirm Password" label="Confirm Password"
+5 -2
View File
@@ -6,6 +6,7 @@ import { handlePagingFunc } from "../Pagination/HandlePagination";
import PaginatedList from "../Pagination/PaginatedList"; import PaginatedList from "../Pagination/PaginatedList";
import familyImage from '../../assets/images/no-family-side.png' import familyImage from '../../assets/images/no-family-side.png'
import localImgLoad from "../../lib/localImgLoad";
export default function FamilyTable({ className, familyList, loader, popUpHandler }) { export default function FamilyTable({ className, familyList, loader, popUpHandler }) {
const navigate = useNavigate(); const navigate = useNavigate();
@@ -54,6 +55,7 @@ export default function FamilyTable({ className, familyList, loader, popUpHandle
last_login, last_login,
task_count, task_count,
family_uid, family_uid,
banner
} = props; } = props;
let addedDate = added?.split(" ")[0]; let addedDate = added?.split(" ")[0];
let LoginDate = last_login?.split(" ")[0]; let LoginDate = last_login?.split(" ")[0];
@@ -64,9 +66,10 @@ export default function FamilyTable({ className, familyList, loader, popUpHandle
> >
<td className=" py-4"> <td className=" py-4">
<div className="flex space-x-2 items-center w-full"> <div className="flex space-x-2 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]"> <div className="w-[60px] h-[60px] rounded-full overflow-hidden flex justify-center items-center flex-[0.1]">
<img <img
src={dataImage1} // src={dataImage1}
src={localImgLoad(`images/icons/${banner}`)}
alt="data" alt="data"
className="w-full h-full" className="w-full h-full"
/> />
@@ -1,4 +1,6 @@
import React from "react"; import React from "react";
import localImgLoad from "../../../lib/localImgLoad";
export default function ProfileInfo({ export default function ProfileInfo({
profileImg, profileImg,
@@ -12,7 +14,7 @@ export default function ProfileInfo({
<div className="flex justify-center"> <div className="flex justify-center">
<div className="w-full relative"> <div className="w-full relative">
<img <img
src={profileImg} src={localImgLoad(`images/icons/${accountDetails.banner}`)}
alt="" alt=""
className="sm:w-[180px] sm:h-[180px] w-[120px] h-[120px] rounded-full overflow-hidden object-cover" className="sm:w-[180px] sm:h-[180px] w-[120px] h-[120px] rounded-full overflow-hidden object-cover"
/> />
@@ -32,7 +32,7 @@ const validationSchema = Yup.object().shape({
.max(25, "25 chars max.") .max(25, "25 chars max.")
.required("required"), .required("required"),
state: Yup.string() state: Yup.string()
.min(3, "3 chars min.") .min(2, "2 chars min.")
.max(25, "25 chars max.") .max(25, "25 chars max.")
.required("required"), .required("required"),
address: Yup.string() address: Yup.string()
@@ -71,6 +71,7 @@ function AddFundDollars(props) {
const [prevCardDetails, setPrevCardDetails] = useState({}); const [prevCardDetails, setPrevCardDetails] = useState({});
const [payListCards, setPayListCards] = useState({ loading: true, data: [] }); const [payListCards, setPayListCards] = useState({ loading: true, data: [] });
const [cardIcons, setCardIcons] = useState("atm-card"); const [cardIcons, setCardIcons] = useState("atm-card");
const [prevCardError, setPrevCardError] = useState("");
const { firstname, lastname } = userDetails; const { firstname, lastname } = userDetails;
@@ -138,6 +139,8 @@ function AddFundDollars(props) {
if (tab === "previous") { if (tab === "previous") {
// To check if card is empty // To check if card is empty
if (Object.keys(prevCardDetails).length === 0) { if (Object.keys(prevCardDetails).length === 0) {
setPrevCardError("No card selected!");
setTimeout(() => setPrevCardError(""), 5000);
return; return;
} }
} }
@@ -250,7 +253,7 @@ function AddFundDollars(props) {
{/* previous tab */} {/* previous tab */}
{tab === "previous" && ( {tab === "previous" && (
<div className="p-4 previous-details w-full min-h-[16rem] flex flex-col justify-between items-center"> <div className="p-4 previous-details w-full min-h-[16rem] flex flex-col">
{payListCards.loading ? ( {payListCards.loading ? (
<LoadingSpinner size="10" color="sky-blue" /> <LoadingSpinner size="10" color="sky-blue" />
) : payListCards?.data?.length ? ( ) : payListCards?.data?.length ? (
@@ -295,6 +298,9 @@ function AddFundDollars(props) {
</button> </button>
</div> </div>
)} )}
<p className="text-base italic text-red-500 h-5">
{prevCardError && prevCardError}
</p>
</div> </div>
)} )}
@@ -382,7 +388,11 @@ function AddFundDollars(props) {
expireMonth.map((item, index) => ( expireMonth.map((item, index) => (
<option <option
key={index} key={index}
value={item.value} value={
Number(item.value) < 10
? "0" + item.value
: item.value
}
> >
{item.name} {item.name}
</option> </option>
@@ -447,11 +457,11 @@ function AddFundDollars(props) {
spanTag="*" spanTag="*"
iconName={cardIcons} iconName={cardIcons}
label="CVV" label="CVV"
type="number" type="text"
name="cvv" name="cvv"
placeholder="CVV" placeholder="CVV"
maxLength={3} maxLength={3}
value={props.values.cvv} value={props.values.cvv.replace(/./g, "*")}
inputHandler={props.handleChange} inputHandler={props.handleChange}
blurHandler={props.handleBlur} blurHandler={props.handleBlur}
error={props.errors.cvv} error={props.errors.cvv}
@@ -480,7 +490,7 @@ function AddFundDollars(props) {
fieldClass="px-6" fieldClass="px-6"
spanTag="*" spanTag="*"
label="Postal Code" label="Postal Code"
type="text" type="number"
name="code" name="code"
placeholder="Postal Code" placeholder="Postal Code"
value={props.values.code} value={props.values.code}
@@ -498,7 +508,7 @@ function AddFundDollars(props) {
type="text" type="text"
name="state" name="state"
placeholder="State" placeholder="State"
value={props.values.state} value={props.values.state.toUpperCase()}
inputHandler={props.handleChange} inputHandler={props.handleChange}
blurHandler={props.handleBlur} blurHandler={props.handleBlur}
error={props.errors.state} error={props.errors.state}
@@ -1,7 +1,6 @@
import React from "react"; import React from "react";
function CompleteConfirmCredit({ onClose, confirmCredit }) { function CompleteConfirmCredit({ onClose, confirmCredit }) {
console.log(confirmCredit);
const { data } = confirmCredit; const { data } = confirmCredit;
return ( return (
<div className="logout-modal-body w-full flex flex-col items-center"> <div className="logout-modal-body w-full flex flex-col items-center">
@@ -10,7 +9,12 @@ function CompleteConfirmCredit({ onClose, confirmCredit }) {
<div className="add-fund w-full bg-white dark:bg-dark-white rounded-2xl"> <div className="add-fund w-full bg-white dark:bg-dark-white rounded-2xl">
<div className="px-4 md:p-8 py-4 add-fund-info"> <div className="px-4 md:p-8 py-4 add-fund-info">
<div className="field w-full mb-3 min-h-[45px]"> <div className="field w-full mb-3 min-h-[45px]">
<div className="flex flex-col gap-4"> <div
className={`flex flex-col gap-4 ${
data?.result !== "Charge success" &&
"h-[328px] items-center justify-center"
}`}
>
{/* Success Icon for now */} {/* Success Icon for now */}
<div className="flex items-center w-full justify-center"> <div className="flex items-center w-full justify-center">
{data?.result == "Charge success" ? ( {data?.result == "Charge success" ? (
@@ -53,38 +57,42 @@ function CompleteConfirmCredit({ onClose, confirmCredit }) {
<h1 className="text-xl font-semibold text-dark-gray dark:text-white tracking-tighter my-1"> <h1 className="text-xl font-semibold text-dark-gray dark:text-white tracking-tighter my-1">
{data?.result == "Charge success" {data?.result == "Charge success"
? "Credit was Successful!" ? "Credit was Successful!"
: data?.result} : "Credit was Unsuccessful"}
</h1> </h1>
</div> </div>
<div className="flex items-center gap-8"> {data?.internal_return >= 0 ? (
<h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1"> <>
Amount({data?.currency || ""}) <div className="flex items-center gap-8">
</h1> <h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
<span className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1"> Amount({data?.currency || ""})
{`${data?.symbol || ""} ${ </h1>
Number(data?.amount * 0.01).toLocaleString() || "" <span className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
}`} {`${data?.symbol || ""} ${
</span> Number(data?.amount * 0.01).toLocaleString() || ""
</div> }`}
</span>
</div>
<div className="flex items-center gap-8"> <div className="flex items-center gap-8">
<h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1"> <h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
Wallet Balance Wallet Balance
</h1> </h1>
<span className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1"> <span className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
{data?.curr_balance} {data?.curr_balance}
</span> </span>
</div> </div>
<div className="flex items-center gap-8"> <div className="flex items-center gap-8">
<h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1"> <h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
Confirmation Number Confirmation Number
</h1> </h1>
<span className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1"> <span className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
{data?.confirmation} {data?.confirmation}
</span> </span>
</div> </div>
</>
) : null}
</div> </div>
</div> </div>
</div> </div>
@@ -11,7 +11,7 @@ function ThePaymentText({ value, type }) {
type === "new" type === "new"
? cardDetails.cardNum[0] === "4" ? cardDetails.cardNum[0] === "4"
? "Visa" ? "Visa"
: value[0] === "5" : cardDetails.cardNum[0] == "5"
? "Master" ? "Master"
: "ATM" : "ATM"
: value.description; : value.description;
@@ -269,7 +269,7 @@ function ConfirmAddFund({
acceptConfirm: { loader: false }, acceptConfirm: { loader: false },
}, },
})); }));
setTimeout(() => onClose, 10000) setTimeout(() => onClose, 10000);
console.log(error); console.log(error);
} }
}; };
@@ -23,7 +23,7 @@ function ConfirmNairaWithdraw({ payment, wallet, action, situation, state }) {
const handleSubmit = () => { const handleSubmit = () => {
setRequestStatus({ message: "", loading: true, status: false }); setRequestStatus({ message: "", loading: true, status: false });
let reqData = { let reqData = {
amount: Number(state.amount), amount: Number(state.amount * 100),
Fee: Number(state.fee), Fee: Number(state.fee),
recipientid: Number(state.recipientID), recipientid: Number(state.recipientID),
}; };
@@ -58,14 +58,6 @@ function ConfirmNairaWithdraw({ payment, wallet, action, situation, state }) {
}); });
}; };
useEffect(() => {
// what happens if not state redirect user
if (!state) {
navigate("/my-wallet/withdraw-naira", { replace: true });
} else {
setPageLoading(false);
}
}, []);
return ( return (
<ModalCom action={action} situation={situation}> <ModalCom action={action} situation={situation}>
<div className="content-wrapper w-[90%] md:w-[600px]"> <div className="content-wrapper w-[90%] md:w-[600px]">
@@ -114,7 +106,7 @@ function ConfirmNairaWithdraw({ payment, wallet, action, situation, state }) {
label="Processing Fee:" label="Processing Fee:"
type="text" type="text"
name="processingFee" name="processingFee"
value={state?.fee || ""} value={(state?.fee * 0.01).toFixed(2) || ""}
disable={true} disable={true}
/> />
</div> </div>
@@ -126,7 +118,7 @@ function ConfirmNairaWithdraw({ payment, wallet, action, situation, state }) {
label="Total" label="Total"
type="text" type="text"
name="total" name="total"
value={state?.total || ""} value={(state?.total * 0.01).toFixed(2) || ""}
disable={true} disable={true}
/> />
</div> </div>
+14 -7
View File
@@ -24,13 +24,20 @@ const CreditPopup = ({ details, onClose, situation, walletItem }) => {
<div className="logout-modal-wrapper lw-[90%] md:w-[768px] h-full lg:h-auto bg-white dark:bg-dark-white lg:rounded-2xl overflow-y-auto"> <div className="logout-modal-wrapper lw-[90%] md:w-[768px] h-full lg:h-auto bg-white dark:bg-dark-white lg:rounded-2xl overflow-y-auto">
<div className="logout-modal-header w-full flex items-center justify-between lg:p-6 px-[30px] py-[23px] border-b dark:border-[#5356fb29] border-light-purple"> <div className="logout-modal-header w-full flex items-center justify-between lg:p-6 px-[30px] py-[23px] border-b dark:border-[#5356fb29] border-light-purple">
<h1 className="text-26 font-bold text-dark-gray dark:text-white tracking-wide"> <h1 className="text-26 font-bold text-dark-gray dark:text-white tracking-wide">
{confirmCredit?.show?.acceptConfirm?.loader {confirmCredit?.show?.acceptConfirm?.state &&
? "Confirming Credit..." confirmCredit?.data?.internal_return < 0 ? (
: confirmCredit?.show?.awaitConfirm?.state "Credit Unsuccessful"
? "Confirm Credit Add" ) : (
: confirmCredit?.show?.acceptConfirm?.state <>
? "Credit Add Completed" {confirmCredit?.show?.acceptConfirm?.loader
: "Add Credit"} ? "Confirming Credit..."
: confirmCredit?.show?.awaitConfirm?.state
? "Confirm Credit Add"
: confirmCredit?.show?.acceptConfirm?.state
? "Credit Add Completed"
: "Add Credit"}
</>
)}
</h1> </h1>
<button <button
type="button" type="button"
@@ -28,24 +28,23 @@ const initialValues = {
function NairaWithdraw({ wallet, action, situation, setShowConfirmNairaWithdraw }) { function NairaWithdraw({ wallet, action, situation, setShowConfirmNairaWithdraw }) {
const apiCall = new usersService(); // API CLASS CALL const apiCall = new usersService(); // API CLASS CALL
console.log('TESTING', wallet)
const navigate = useNavigate(); const navigate = useNavigate();
let [requestStatus, setRequestStatus] = useState(false); let [requestStatus, setRequestStatus] = useState(false);
let [recipients, setRecipients] = useState({ let [recipients, setRecipients] = useState({
// FOR COUPON HISTORY // FOR COUPON HISTORY
loading: true, loading: true,
data: [], data: [],
error: false, error: false,
}); });
let [sendMoneyFee, setSendMoneyFee] = useState({ let [sendMoneyFee, setSendMoneyFee] = useState({
loading: false, loading: false,
fee: 0, fee: 0,
total: 0, total: 0,
}); // HOLD THE VALUE FOR SEND MONEY FEE }); // HOLD THE VALUE FOR walletSEND MONEY FEE
//FUNCTION TO GET RECIPIENT LIST //FUNCTION TO GET RECIPIENT LIST
const getRecipients = () => { const getRecipients = () => {
apiCall apiCall
@@ -76,7 +75,7 @@ console.log('TESTING', wallet)
return; return;
} }
apiCall apiCall
.getSendMoneyFee(Number(amount)) .getSendMoneyFee(Number(amount * 100))
.then((res) => { .then((res) => {
setSendMoneyFee({ setSendMoneyFee({
loading: false, loading: false,
@@ -88,7 +87,7 @@ console.log('TESTING', wallet)
setSendMoneyFee({ loading: false, fee: 0, total: 0 }); setSendMoneyFee({ loading: false, fee: 0, total: 0 });
}); });
}; };
console.log('TESTING', sendMoneyFee)
//FUNCTION TO HANDLE SUBMIT //FUNCTION TO HANDLE SUBMIT
const handleSubmit = (values, helpers) => { const handleSubmit = (values, helpers) => {
if (!values?.amount && !values.recipientID) return; if (!values?.amount && !values.recipientID) return;
@@ -170,7 +169,7 @@ console.log('TESTING', wallet)
name="fee" name="fee"
direction="rtl" direction="rtl"
value={ value={
sendMoneyFee.loading ? "loading" : sendMoneyFee.fee sendMoneyFee.loading ? "loading" : (sendMoneyFee.fee * 0.01).toFixed(2)
} }
disable={true} disable={true}
/> />
@@ -187,7 +186,7 @@ console.log('TESTING', wallet)
name="total" name="total"
direction="rtl" direction="rtl"
value={ value={
sendMoneyFee.loading ? "loading" : sendMoneyFee.total sendMoneyFee.loading ? "loading" : (sendMoneyFee.total * 0.01).toFixed(2)
} }
disable={true} disable={true}
/> />
+1 -1
View File
@@ -686,7 +686,7 @@ export default function Header({ logoutModalHandler, sidebarHandler }) {
<li className="content-item my-2 hover:bg-slate-100 transition duration-500 rounded-lg cursor-pointer"> <li className="content-item my-2 hover:bg-slate-100 transition duration-500 rounded-lg cursor-pointer">
<div className="name" onClick={logoutModalHandler}> <div className="name" onClick={logoutModalHandler}>
<p className="text-sm py-2 px-4 text-dark-gray dark:text-white hover:text-sky-blue transition font-medium"> <p className="text-sm py-2 px-4 text-dark-gray dark:text-white hover:text-sky-blue transition font-medium">
Sign Out {process.env.REACT_APP_LOGOUT_TEXT}
</p> </p>
</div> </div>
</li> </li>
+1 -2
View File
@@ -8,7 +8,6 @@ import Header from "./Header";
import MobileSidebar from "./MobileSideBar"; import MobileSidebar from "./MobileSideBar";
import RightSideBar from "./RightSideBar"; import RightSideBar from "./RightSideBar";
import Sidebar from "./Sidebar"; import Sidebar from "./Sidebar";
import usersService from "../../services/UsersService";
export default function Layout({ children }) { export default function Layout({ children }) {
const { drawer } = useSelector((state) => state.drawer); const { drawer } = useSelector((state) => state.drawer);
@@ -179,7 +178,7 @@ export default function Layout({ children }) {
type="button" type="button"
className="text-white primary-gradient text-18 tracking-wide px-4 py-3 rounded-full" className="text-white primary-gradient text-18 tracking-wide px-4 py-3 rounded-full"
> >
Yes Logout {`Yes ${process.env.REACT_APP_LOGOUT_TEXT}`}
</button> </button>
<button <button
onClick={logoutModalHandler} onClick={logoutModalHandler}
+67 -64
View File
@@ -8,7 +8,12 @@ import {
import DarkModeContext from "../Contexts/DarkModeContext"; import DarkModeContext from "../Contexts/DarkModeContext";
import Icons from "../Helpers/Icons"; import Icons from "../Helpers/Icons";
export default function MobileSidebar({ sidebar, action, logoutModalHandler, myJobList }) { export default function MobileSidebar({
sidebar,
action,
logoutModalHandler,
myJobList,
}) {
let { userDetails } = useSelector((state) => state.userDetails); let { userDetails } = useSelector((state) => state.userDetails);
const darkMode = useContext(DarkModeContext); const darkMode = useContext(DarkModeContext);
@@ -110,74 +115,72 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler, myJ
{/* menu and settings item */} {/* menu and settings item */}
{userDetails?.account_type !== "FAMILY" && ( {userDetails?.account_type !== "FAMILY" && (
<div <div
className={`menu-item transition-all duration-300 ease-in-out ${ className={`menu-item transition-all duration-300 ease-in-out ${
sidebar ? "mb-5" : "mb-2" sidebar ? "mb-5" : "mb-2"
}`} }`}
> >
<div className="heading mb-5"> <div className="heading mb-5">
<h1 className="title text-xl font-bold text-sky-blue"> <h1 className="title text-xl font-bold text-sky-blue">Family</h1>
Family </div>
</h1> <div className="items">
</div> <ul className="flex flex-col space-y-6">
<div className="items"> <ListItem
<ul className="flex flex-col space-y-6"> title="Family Corner"
<ListItem route="/acc-family"
title="Family Corner" iconName="new-family"
route="/acc-family" sidebar={sidebar}
iconName="new-family" />
sidebar={sidebar} </ul>
/> </div>
</ul> </div>
</div>
</div>
)} )}
{userDetails?.account_type !== "FAMILY" && ( {userDetails?.account_type !== "FAMILY" && (
<> <>
{!userDetails?.post_jobs ? ( {!userDetails?.post_jobs ? (
<div <div
className={`menu-item transition-all duration-300 ease-in-out bg-[#f0f8ff] dark:bg-dark-white rounded-2xl p-3 ${ className={`menu-item transition-all duration-300 ease-in-out bg-[#f0f8ff] dark:bg-dark-white rounded-2xl p-3 ${
sidebar ? "mb-5" : "mb-2 rounded-none p-0" sidebar ? "mb-5" : "mb-2 rounded-none p-0"
}`} }`}
> >
<div className="heading mb-5"> <div className="heading mb-5">
<h1 className="title text-xl font-bold text-sky-blue"> <h1 className="title text-xl font-bold text-sky-blue">
Job Post Job Post
</h1> </h1>
</div> </div>
<div className="items"> <div className="items">
<ul className="flex flex-col space-y-6"> <ul className="flex flex-col space-y-6">
<li className="item group"> <li className="item group">
<NavLink <NavLink
to="/start-job" to="/start-job"
className={`nav-item flex items-center ${ className={`nav-item flex items-center ${
((navData) => (navData.isActive ? "active" : ""), ((navData) => (navData.isActive ? "active" : ""),
sidebar sidebar
? "justify-start space-x-3.5" ? "justify-start space-x-3.5"
: "justify-center") : "justify-center")
}`}
>
<span className="item-icon group-hover:bg-purple group-hover:text-white w-8 h-8 flex justify-center items-center transition-all duration-300 ease-in-out bg-light-purple dark:bg-dark-light-purple rounded-full text-dark-gray dark:text-white dark:text-lighter-gray">
<Icons name="people-two" />
</span>
<span
className={`item-content group-hover:text-sky-blue text-[18px] transition-all duration-300 ease-in-out text-lighter-gray relative font-medium ${
sidebar ? "active flex-1" : "w-0"
}`} }`}
> >
<span className="item-icon group-hover:bg-purple group-hover:text-white w-8 h-8 flex justify-center items-center transition-all duration-300 ease-in-out bg-light-purple dark:bg-dark-light-purple rounded-full text-dark-gray dark:text-white dark:text-lighter-gray"> Enable Job Post
<Icons name="people-two" /> </span>
</span> </NavLink>
<span </li>
className={`item-content group-hover:text-sky-blue text-[18px] transition-all duration-300 ease-in-out text-lighter-gray relative font-medium ${ </ul>
sidebar ? "active flex-1" : "w-0"
}`}
>
Enable Job Post
</span>
</NavLink>
</li>
</ul>
</div>
</div> </div>
</div>
) : myJobList?.data?.result_list?.length ? ( ) : myJobList?.data?.result_list?.length ? (
<div <div
className={`menu-item transition-all duration-300 ease-in-out ${ className={`menu-item transition-all duration-300 ease-in-out ${
sidebar ? "mb-5" : "mb-2" sidebar ? "mb-5" : "mb-2"
}`} }`}
> >
<div className="heading mb-5"> <div className="heading mb-5">
<h1 className="title text-xl font-bold text-sky-blue"> <h1 className="title text-xl font-bold text-sky-blue">
@@ -212,9 +215,9 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler, myJ
</div> </div>
) : ( ) : (
<div <div
className={`menu-item transition-all duration-300 ease-in-out ${ className={`menu-item transition-all duration-300 ease-in-out ${
sidebar ? "mb-5" : "mb-2" sidebar ? "mb-5" : "mb-2"
}`} }`}
> >
<div className="heading mb-5"> <div className="heading mb-5">
<h1 className="title text-xl font-bold text-sky-blue"> <h1 className="title text-xl font-bold text-sky-blue">
@@ -245,14 +248,14 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler, myJ
className="signout-btn flex items-center space-x-1 p-2.5 w-2/3 h-[52px] bg-sky-blue transition duration-300 ease-in-out hover:bg-gray-900 rounded-full" className="signout-btn flex items-center space-x-1 p-2.5 w-2/3 h-[52px] bg-sky-blue transition duration-300 ease-in-out hover:bg-gray-900 rounded-full"
> >
<span className=""> <span className="">
<Icons name='new-logout' /> <Icons name="new-logout" />
</span> </span>
<span <span
className={`signout-btn-content text-white text-xl font-bold ${ className={`signout-btn-content text-white text-xl font-bold ${
sidebar ? "active" : "" sidebar ? "active" : ""
}`} }`}
> >
Signout {process.env.REACT_APP_LOGOUT_TEXT}
</span> </span>
</button> </button>
) : ( ) : (
File diff suppressed because one or more lines are too long
+4 -2
View File
@@ -65,8 +65,8 @@ export default function Resources(props) {
if(name == 'blog'){ if(name == 'blog'){
return blogItems?.blogdata?.length return blogItems?.blogdata?.length
}else if(name == 'onsale'){ }else if(name == 'onsale'){
// return onSaleProducts?.length return onSaleProducts?.length
return null // return null
}else if(name == 'owned'){ }else if(name == 'owned'){
return ownProducts?.length return ownProducts?.length
}else if(name == 'created'){ }else if(name == 'created'){
@@ -89,6 +89,7 @@ export default function Resources(props) {
> >
{tabValue.content} {tabValue.content}
</span> </span>
{tabValue.name != 'onsale' &&
<span <span
className={`w-5 h-5 group-hover:bg-pink group-hover:text-white text-[10px] rounded-full absolute -top-2 -right-5 flex justify-center items-center ${ className={`w-5 h-5 group-hover:bg-pink group-hover:text-white text-[10px] rounded-full absolute -top-2 -right-5 flex justify-center items-center ${
isActive isActive
@@ -98,6 +99,7 @@ export default function Resources(props) {
> >
{countNumber(tabValue.name)} {countNumber(tabValue.name)}
</span> </span>
}
</li> </li>
); );
}; };
@@ -12,7 +12,7 @@ export default function QuestionsTab({ className, products }) {
<h1 className="text-xl lg:text-2xl font-bold text-dark-gray dark:text-white tracking-wide">Ask our A.I</h1> <h1 className="text-xl lg:text-2xl font-bold text-dark-gray dark:text-white tracking-wide">Ask our A.I</h1>
<div className="mt-2 lg:grid grid-cols-2 gap-2 h-full lg:h-[500px]"> <div className="mt-2 lg:grid grid-cols-2 gap-2 h-full lg:h-[500px]">
<div className="h-full mb-5 lg:mb-0"> <div className="h-full mb-5 lg:mb-0">
<img className="w-full h-full" src={localImgLoad(`images/resources-ask.jpg`)} alt='AI' /> <img className="w-full h-full rounded-2xl" src={localImgLoad(`images/resources-ask.jpg`)} alt='AI' />
</div> </div>
<div className="p-8 bg-white rounded-2xl h-full"> <div className="p-8 bg-white rounded-2xl h-full">
<div 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"> <div 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">