Merge branch 'master' of https://gitlab.chiefsoft.net/WrenchBoard/Users-Wrench into my_wallet_layout
This commit was merged in pull request #333.
This commit is contained in:
@@ -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"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ 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);
|
||||||
@@ -44,7 +43,7 @@ console.log('TESTING', wallet)
|
|||||||
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 = () => {
|
||||||
@@ -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}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -65,7 +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
|
||||||
}else if(name == 'owned'){
|
}else if(name == 'owned'){
|
||||||
return ownProducts?.length
|
return ownProducts?.length
|
||||||
}else if(name == 'created'){
|
}else if(name == 'created'){
|
||||||
@@ -95,7 +96,6 @@ export default function Resources(props) {
|
|||||||
: "text-thin-light-gray bg-[#F2B8FD]"
|
: "text-thin-light-gray bg-[#F2B8FD]"
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
{/* 16 blog, onsale, owned,created */}
|
|
||||||
{countNumber(tabValue.name)}
|
{countNumber(tabValue.name)}
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -1,26 +1,44 @@
|
|||||||
import ProductCardStyleTwo from "../../Cards/ProductCardStyleTwo";
|
import ProductCardStyleTwo from "../../Cards/ProductCardStyleTwo";
|
||||||
import DataIteration from "../../Helpers/DataIteration";
|
import DataIteration from "../../Helpers/DataIteration";
|
||||||
import SearchCom from "../../Helpers/SearchCom";
|
import SearchCom from "../../Helpers/SearchCom";
|
||||||
|
import localImgLoad from "../../../lib/localImgLoad";
|
||||||
|
|
||||||
export default function QuestionsTab({ className, products }) {
|
export default function QuestionsTab({ className, products }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className={`onsale-tab-wrapper w-full ${className || ""}`}>
|
<div className={`onsale-tab-wrapper w-full ${className || ""}`}>
|
||||||
<div className="main-container w-full">
|
<div className="main-container w-full">
|
||||||
<div className="filter-section w-full items-center sm:flex justify-between mb-6">
|
<div className="filter-section w-fullmb-6">
|
||||||
{/* filter-search */}
|
<h1 className="text-xl lg:text-2xl font-bold text-dark-gray dark:text-white tracking-wide">Ask our A.I</h1>
|
||||||
<div className="sm:w-1/2 w-full sm:pr-20 pr-0 mb-5 sm:mb-0">
|
<div className="mt-2 lg:grid grid-cols-2 gap-2 h-full lg:h-[500px]">
|
||||||
<SearchCom />
|
<div className="h-full mb-5 lg:mb-0">
|
||||||
|
<img className="w-full h-full" src={localImgLoad(`images/resources-ask.jpg`)} alt='AI' />
|
||||||
|
</div>
|
||||||
|
<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">
|
||||||
|
<select className="input-field px-2 placeholder:text-base text-dark-gray w-full h-full tracking-wide dark:bg-[#11131F] bg-[#fafafa] focus:ring-0 focus:outline-none">
|
||||||
|
<option className="rounded-full">Find answer on:</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{/* filter-search */}
|
||||||
|
<div className="w-full my-5 border-2 rounded-full">
|
||||||
|
<SearchCom />
|
||||||
|
</div>
|
||||||
|
<div className="w-full flex justify-end items-center border-b-2 pb-4">
|
||||||
|
<button
|
||||||
|
className="btn-gradient text-base tracking-wide px-4 py-2 rounded-full text-white cursor-pointer"
|
||||||
|
>
|
||||||
|
Search
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className="content-section w-full-width">
|
{/* <div className="content-section w-full-width">
|
||||||
<div className="grid lg:grid-cols-3 sm:grid-cols-2 grid-cols-1 gap-[30px]">
|
<div className="grid lg:grid-cols-3 sm:grid-cols-2 grid-cols-1 gap-[30px]">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> */}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user