Compare commits

..

12 Commits

Author SHA1 Message Date
victorAnumudu 40b5e92047 wallet API changed 2024-10-14 20:24:52 +01:00
ameye bc867ee8aa Merge branch 'nav-link-rename' of WrenchBoard/Users-Wrench into master 2024-10-12 01:24:59 +00:00
victorAnumudu 7c430d03bd nav link updated and view all message popout fixed 2024-10-10 16:58:39 +01:00
ameye 9125990d70 Merge branch 'change-pwd-update' of WrenchBoard/Users-Wrench into master 2024-10-10 00:42:28 +00:00
victorAnumudu e64728e127 padding adjusted 2024-10-10 01:35:13 +01:00
victorAnumudu d82b454caf headed added 2024-10-09 22:11:08 +01:00
victorAnumudu db423a3f1e change pwd page updated 2024-10-09 21:09:00 +01:00
ameye 4376938217 Merge branch 'currency-fix' of WrenchBoard/Users-Wrench into master 2024-10-09 17:15:48 +00:00
victorAnumudu 0411ab82f0 currency fixed 2024-10-09 17:56:54 +01:00
ameye c7d5d5533c Merge branch 'preferences-tab' of WrenchBoard/Users-Wrench into master 2024-10-09 14:55:18 +00:00
ameye 3f7c673087 Merge branch 'resources-pagination' of WrenchBoard/Users-Wrench into master 2024-10-09 14:55:13 +00:00
victorAnumudu c71d901556 added pagination to resources page blog display 2024-10-09 09:44:11 +01:00
12 changed files with 135 additions and 80 deletions
+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 relative min-h-[520px] ${
className={`update-table w-full bg-white dark:bg-dark-white overflow-hidden rounded-2xl relative min-h-[520px] ${
className || ""
}`}
>
@@ -19,8 +19,7 @@ export default function ActiveJobMessage({ activeJobMesList }) {
// }
return (
<div className='flex flex-col justify-between'>
<div className="w-full h-full min-h-[250px] max-h-[300px] overflow-y-auto">
<div className="w-full h-full max-h-[343px] overflow-y-auto">
<table className="wallet-activity w-full table-auto border-collapse text-left">
<thead className='border-b-2'>
<tr className='text-slate-600'>
@@ -71,9 +70,10 @@ export default function ActiveJobMessage({ activeJobMesList }) {
</table>
</div>
{/* PAGINATION BUTTON */}
{/* <PaginatedList onClick={handlePagination} prev={currentPage == 0 ? true : false} next={currentPage+Number(process.env.REACT_APP_ITEM_PER_PAGE) >= activeJobMesList?.data?.length ? true : false} data={activeJobMesList?.data} start={indexOfFirstItem} stop={indexOfLastItem} /> */}
{/* END OF PAGINATION BUTTON */}
</div>
// <div className='flex flex-col justify-between'>
// PAGINATION BUTTON
// <PaginatedList onClick={handlePagination} prev={currentPage == 0 ? true : false} next={currentPage+Number(process.env.REACT_APP_ITEM_PER_PAGE) >= activeJobMesList?.data?.length ? true : false} data={activeJobMesList?.data} start={indexOfFirstItem} stop={indexOfLastItem} />
// END OF PAGINATION BUTTON
// </div>
)
}
+33 -22
View File
@@ -12,7 +12,7 @@ import IndexJobActions from "./JobActions/IndexJobActions";
import usersService from "../../services/UsersService";
import { PriceFormatter } from "../Helpers/PriceFormatter";
import { SocketValues } from "../Contexts/SocketIOContext";
import TabButton from "../customTabs/TabButton";
import ManageJobTab from "../customTabs/ManageJobTab";
import AttachFile from "../attachmentCom/AttachFile";
import JobDetailPopout from "./JobDetailPopout";
@@ -390,8 +390,8 @@ function ActiveJobs(props) {
{/* end of job details */}
</div>
<div className="my-4 py-[20px] bg-white dark:bg-black px-4 rounded-2xl shadow-md lg:flex justify-between items-start space-y-4 lg:space-x-4 lg:space-y-0">
<div className="w-full lg:w-1/2 mb-4 border-b pb-4 lg:pb-0 lg:mb-0 lg:border-b-0">
<div className="my-4 py-[20px] bg-white dark:bg-black px-4 rounded-2xl shadow-md grid grid-cols-1 lg:grid-cols-2 gap-3">
<div className="w-full mb-4 border-b pb-4 lg:pb-0 lg:mb-0 lg:border-b-0">
<div className="">
<h1 className="text-lg font-bold text-dark-gray dark:text-white tracking-wide">
Actions
@@ -408,7 +408,7 @@ function ActiveJobs(props) {
{/* switch button */}
<div className="grid grid-cols-2">
{tabs.map((item) => (
<TabButton
<ManageJobTab
key={item}
item={item}
selectedTab={selectedTab}
@@ -545,14 +545,16 @@ function ActiveJobs(props) {
</div>
{/* MESSAGE SECTION */}
<div className="w-full lg:w-1/2">
<div className="mb-4">
<AttachFile
data={props.details}
showOnData={true}
fontSize={'text-lg'}
/>
</div>
<div className="w-full flex flex-col">
{props.details &&
<div className="mb-4">
<AttachFile
data={props.details}
showOnData={true}
fontSize={'text-lg'}
/>
</div>
}
<div className="flex justify-between items-center gap-5">
<p className="w-full text-lg font-bold text-dark-gray dark:text-white tracking-wide flex items-center gap-2 justify-between">
<span>Message</span>
@@ -671,37 +673,46 @@ const PopModal = ({
</svg>
</button>
</div>
<div className="job-action-modal-body w-full px-10 py-8 gap-4">
<div className="w-full flex flex-col items-center">
<div className="job-action-modal-body w-full px-10 py-2 gap-4">
<div className="w-full">
{activeJobMesList.loading ? (
<LoadingSpinner size="16" color="sky-blue" />
) : (
<div className="message-table h-[500px] overflow-y-auto">
<table className="wallet-activity w-full table-auto border-collapse text-left">
<thead className="border-b-2">
{/* <thead className="border-b-0">
<tr className="text-slate-600">
<th className="p-2"></th>
<th className="p-0"></th>
</tr>
</thead>
</thead> */}
{activeJobMesList?.data?.length ? (
<tbody>
{activeJobMesList?.data?.map((item, index) => (
{activeJobMesList?.data?.map((item, index) => {
let imageLink = `${activeJobMesList?.image}${localStorage.getItem('session_token')}/contracts/${item.msg_uid}`
return (
<tr key={index} className="text-slate-500">
<td>
<div className="msg_box">
<div className={`msg_box ${item.who}`}>
<div className="msg_header">
{item.msg_date} {item.msg_firstname}
</div>
<span
{/* <span
className="p-2"
dangerouslySetInnerHTML={{
__html: item.message,
}}
></span>
></span> */}
{item.msg_type == 'FILE' ?
<a href={imageLink} target="_blank" className="p-2" dangerouslySetInnerHTML={{__html: item.message}}></a>
:
<span className="p-2" dangerouslySetInnerHTML={{__html: item.message}}></span>
}
</div>
</td>
</tr>
))}
)
})}
</tbody>
) : activeJobMesList.error ? (
<tbody>
@@ -33,8 +33,8 @@ function PurchasesTable({purchase}) {
<td className="p-4">{item.added_date}<br />
<b>{item.confirmation} </b>
</td>
<td className="p-4 text-right">{currencySymbol('', item.amount)}</td>
<td className="p-4 text-right">{currencySymbol('', item.fee)}</td>
<td className="p-4 text-right">{currencySymbol(item.currency, item.amount)}</td>
<td className="p-4 text-right">{currencySymbol(item.currency, item.fee)}</td>
</tr>
))}
</tbody>
@@ -40,9 +40,9 @@ function RecentActivityTable({ payment }) {
dangerouslySetInnerHTML={{ __html: item.recipient }}
></td>
<td className="p-4 text-right">
{currencySymbol('', item.amount)}
{currencySymbol(item.currency, item.amount)}
<br />
{currencySymbol('', item.fee)}
{currencySymbol(item.currency, item.fee)}
</td>
<td className="p-4">{item.status}</td>
</tr>
+16 -12
View File
@@ -73,18 +73,22 @@ export default function WalletItemCard({ walletItem, payment, countries }) {
</div>
</div>
</div>
<p className="text-lg text-white tracking-wide flex justify-center items-center gap-8">
HOLDINGS :{" "}
<span className="xxs:scale-100 lg:scale-100 xl:scale-125">
{PriceFormatter(
walletItem.escrow * 0.01,
walletItem.code,
undefined,
"text-[1.5rem]"
)}
</span>
</p>
{walletItem.escrow > 0 ?
<p className="text-lg text-white tracking-wide flex justify-center items-center gap-8">
HOLDINGS :{" "}
<span className="xxs:scale-100 lg:scale-100 xl:scale-125">
{PriceFormatter(
walletItem.escrow * 0.01,
walletItem.code,
undefined,
"text-[1.5rem]"
)}
</span>
</p>
:
null
}
<div className="w-full h-[1px] bg-white"></div>
+1 -1
View File
@@ -92,7 +92,7 @@ export default function MobileSidebar({
{/* Using mini component reduces the bulk amount of html */}
<ListItem
title={
userDetails?.account_type == "FULL" ? "Dashboard" : "Home"
userDetails?.account_type == "FULL" ? "Home" : "Home"
}
route="/"
sidebar={sidebar}
+1 -1
View File
@@ -112,7 +112,7 @@ export default function Sidebar({
<ul className="flex flex-col space-y-6">
{/* Using mini component reduces the bulk amount of html */}
<ListItem
title={userDetails?.account_type == "FULL" ? "Dashboard" : "Home"}
title={userDetails?.account_type == "FULL" ? "Home" : "Home"}
route="/"
sidebar={sidebar}
iconName="new-dashboard"
+38 -26
View File
@@ -2,9 +2,10 @@ import ProductCardStyleTwo from "../../Cards/ProductCardStyleTwo";
import DataIteration from "../../Helpers/DataIteration";
import SearchCom from "../../Helpers/SearchCom";
import ResourceBlogCard from "../../Cards/ResourceBlogCard";
import NewPaginatedList from '../../../components/Pagination/NewPaginatedList'
export default function BlogTab({ className, blogdata }) {
console.log("Blog data here>> ", blogdata);
// console.log("Blog data here>> ", blogdata);
// debugger;
return (
<>
@@ -15,33 +16,9 @@ export default function BlogTab({ className, blogdata }) {
<div className="sm:w-1/2 w-full sm:pr-20 pr-0 mb-5 sm:mb-0">
<SearchCom placeholder='Search Blog Items...' />
</div>
{/* filer-dropdown */}
<div className="flex-1 flex sm:justify-end">
{/* <div className="flex space-x-1 items-center">*/}
{/*<span className="text-18 text-thin-light-gray">*/}
{/* Recently Received*/}
{/*</span>*/}
{/* <span>*/}
{/* <svg*/}
{/* width="20"*/}
{/* height="10"*/}
{/* viewBox="0 0 13 6"*/}
{/* fill="none"*/}
{/* xmlns="http://www.w3.org/2000/svg"*/}
{/* >*/}
{/* <path*/}
{/* opacity="0.7"*/}
{/* d="M12.4124 0.247421C12.3327 0.169022 12.2379 0.106794 12.1335 0.0643287C12.0291 0.0218632 11.917 0 11.8039 0C11.6908 0 11.5787 0.0218632 11.4743 0.0643287C11.3699 0.106794 11.2751 0.169022 11.1954 0.247421L7.27012 4.07837C7.19045 4.15677 7.09566 4.219 6.99122 4.26146C6.88678 4.30393 6.77476 4.32579 6.66162 4.32579C6.54848 4.32579 6.43646 4.30393 6.33202 4.26146C6.22758 4.219 6.13279 4.15677 6.05312 4.07837L2.12785 0.247421C2.04818 0.169022 1.95338 0.106794 1.84895 0.0643287C1.74451 0.0218632 1.63249 0 1.51935 0C1.40621 0 1.29419 0.0218632 1.18975 0.0643287C1.08531 0.106794 0.990517 0.169022 0.910844 0.247421C0.751218 0.404141 0.661621 0.616141 0.661621 0.837119C0.661621 1.0581 0.751218 1.2701 0.910844 1.42682L4.84468 5.26613C5.32677 5.73605 5.98027 6 6.66162 6C7.34297 6 7.99647 5.73605 8.47856 5.26613L12.4124 1.42682C12.572 1.2701 12.6616 1.0581 12.6616 0.837119C12.6616 0.616141 12.572 0.404141 12.4124 0.247421Z"*/}
{/* fill="#374557"*/}
{/* fillOpacity="0.6"*/}
{/* />*/}
{/* </svg>*/}
{/*</span>*/}
{/* </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]">
<DataIteration
datas={blogdata?.blogdata}
@@ -57,7 +34,42 @@ export default function BlogTab({ className, blogdata }) {
)}
</DataIteration>
</div>
</div> */}
{blogdata?.blogdata?.length ?
<NewPaginatedList
data={blogdata?.blogdata}
itemsPerPage={9}
filterItem=''
tableTitle=''
>
{
({data})=>(
<div className="filter-navigate-content w-full min-h-[600px]">
<div
className={"grid lg:grid-cols-3 sm:grid-cols-2 gap-[30px]"}
>
{
data.map((datum, index) => (
<div key={index}>
<ResourceBlogCard
key={index}
datas={datum}
bg={blogdata.image_url}
/>
</div>
))
}
</div>
</div>
)
}
</NewPaginatedList>
:
<div className="w-full h-[40rem] bg-white dark:bg-dark-white flex justify-center items-center">
No Blog Found!
</div>
}
</div>
</div>
</>
@@ -2,7 +2,7 @@
import React, { useState } from "react";
import Icons from "../../Helpers/Icons";
import PasswordSvg from "../PasswordSvg";
// import PasswordSvg from "../PasswordSvg";
import LoadingSpinner from "../../Spinners/LoadingSpinner";
import usersService from "../../../services/UsersService";
import { useNavigate } from "react-router-dom";
@@ -113,8 +113,13 @@ export default function ChangePasswordTab() {
}
return (
<div className="changePasswordTab w-full">
<div className="w-full flex xxl:flex-row flex-col-reverse space-x-5 xxl:items-start">
<div className="flex-1 mb-10">
<div className="w-full">
<div className="content-heading w-full mb-8">
<h1 className="text-2xl font-extrabold text-black dark:text-white antialiased">
Reset Password
</h1>
</div>
<div className="w-full md:w-[calc(100%-100px)] md:ml-auto pb-10">
<div className="input-field mb-6">
<label
className="input-label text-dark-gray dark:text-white text-xl font-bold block mb-2.5"
@@ -202,7 +207,7 @@ export default function ChangePasswordTab() {
</div>
</div>
</div>
<div className="flex justify-center space-x-4 items-center">
<div className="flex w-full md:w-[calc(100%-128px)] md:ml-auto justify-between gap-4 items-center">
<button
type="button"
className="text-light-red text-18 tracking-wide border-b dark:border-[#5356fb29] border-light-red"
@@ -246,9 +251,9 @@ export default function ChangePasswordTab() {
))}
{/* End of error or success display */}
</div>
<div className="w-[440px] sm:flex hidden justify-end">
{/* <div className="w-[440px] sm:flex hidden justify-end">
<PasswordSvg />
</div>
</div> */}
</div>
</div>
);
@@ -0,0 +1,23 @@
import React from 'react'
import Icons from '../Helpers/Icons'
export default function ManageJobTab({ item='', iconName='', selectedTab='', setSelectedTab=()=>{} }) {
return (
<button
className={`flex lg:space-x-4 space-x-2 hover:text-purple transition-all duration-300 ease-in-out items-center cursor-pointer mb-2 mr-6 lg:mr-0 float-left lg:float-none overflow-hidden ${
selectedTab === item ? "text-purple" : " text-thin-light-gray"
}`}
value={item}
name={item}
onClick={() => setSelectedTab(item)}
>
<div>
<Icons name={iconName} />
</div>
<div>
<p className="text-18 tracking-wide">{item[0]?.toUpperCase() + item?.slice(1)}</p>
</div>
</button>
)
}
+1 -1
View File
@@ -126,7 +126,7 @@ class usersService {
member_id: localStorage.getItem("member_id"),
sessionid: localStorage.getItem("session_token"),
};
return this.postAuxEnd("/getwallets", postData);
return this.postAuxEnd("/wallets", postData);
}
getApiGate() {
// localStorage.setItem("session_token", ``);