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 da389c937e preference component added 2024-10-09 15:21:03 +01:00
14 changed files with 144 additions and 55 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ export default function HomeActivities({ className }) {
return ( return (
<div <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 || "" className || ""
}`} }`}
> >
@@ -19,8 +19,7 @@ export default function ActiveJobMessage({ activeJobMesList }) {
// } // }
return ( return (
<div className='flex flex-col justify-between'> <div className="w-full h-full max-h-[343px] overflow-y-auto">
<div className="w-full h-full min-h-[250px] max-h-[300px] overflow-y-auto">
<table className="wallet-activity w-full table-auto border-collapse text-left"> <table className="wallet-activity w-full table-auto border-collapse text-left">
<thead className='border-b-2'> <thead className='border-b-2'>
<tr className='text-slate-600'> <tr className='text-slate-600'>
@@ -71,9 +70,10 @@ export default function ActiveJobMessage({ activeJobMesList }) {
</table> </table>
</div> </div>
{/* PAGINATION BUTTON */} // <div className='flex flex-col justify-between'>
{/* <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} /> */} // PAGINATION BUTTON
{/* END OF 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} />
</div> // END OF PAGINATION BUTTON
// </div>
) )
} }
+33 -22
View File
@@ -12,7 +12,7 @@ import IndexJobActions from "./JobActions/IndexJobActions";
import usersService from "../../services/UsersService"; import usersService from "../../services/UsersService";
import { PriceFormatter } from "../Helpers/PriceFormatter"; import { PriceFormatter } from "../Helpers/PriceFormatter";
import { SocketValues } from "../Contexts/SocketIOContext"; import { SocketValues } from "../Contexts/SocketIOContext";
import TabButton from "../customTabs/TabButton"; import ManageJobTab from "../customTabs/ManageJobTab";
import AttachFile from "../attachmentCom/AttachFile"; import AttachFile from "../attachmentCom/AttachFile";
import JobDetailPopout from "./JobDetailPopout"; import JobDetailPopout from "./JobDetailPopout";
@@ -390,8 +390,8 @@ function ActiveJobs(props) {
{/* end of job details */} {/* end of job details */}
</div> </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="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 lg:w-1/2 mb-4 border-b pb-4 lg:pb-0 lg:mb-0 lg:border-b-0"> <div className="w-full mb-4 border-b pb-4 lg:pb-0 lg:mb-0 lg:border-b-0">
<div className=""> <div className="">
<h1 className="text-lg font-bold text-dark-gray dark:text-white tracking-wide"> <h1 className="text-lg font-bold text-dark-gray dark:text-white tracking-wide">
Actions Actions
@@ -408,7 +408,7 @@ function ActiveJobs(props) {
{/* switch button */} {/* switch button */}
<div className="grid grid-cols-2"> <div className="grid grid-cols-2">
{tabs.map((item) => ( {tabs.map((item) => (
<TabButton <ManageJobTab
key={item} key={item}
item={item} item={item}
selectedTab={selectedTab} selectedTab={selectedTab}
@@ -545,14 +545,16 @@ function ActiveJobs(props) {
</div> </div>
{/* MESSAGE SECTION */} {/* MESSAGE SECTION */}
<div className="w-full lg:w-1/2"> <div className="w-full flex flex-col">
<div className="mb-4"> {props.details &&
<AttachFile <div className="mb-4">
data={props.details} <AttachFile
showOnData={true} data={props.details}
fontSize={'text-lg'} showOnData={true}
/> fontSize={'text-lg'}
</div> />
</div>
}
<div className="flex justify-between items-center gap-5"> <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"> <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> <span>Message</span>
@@ -671,37 +673,46 @@ const PopModal = ({
</svg> </svg>
</button> </button>
</div> </div>
<div className="job-action-modal-body w-full px-10 py-8 gap-4"> <div className="job-action-modal-body w-full px-10 py-2 gap-4">
<div className="w-full flex flex-col items-center"> <div className="w-full">
{activeJobMesList.loading ? ( {activeJobMesList.loading ? (
<LoadingSpinner size="16" color="sky-blue" /> <LoadingSpinner size="16" color="sky-blue" />
) : ( ) : (
<div className="message-table h-[500px] overflow-y-auto"> <div className="message-table h-[500px] overflow-y-auto">
<table className="wallet-activity w-full table-auto border-collapse text-left"> <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"> <tr className="text-slate-600">
<th className="p-2"></th> <th className="p-0"></th>
</tr> </tr>
</thead> </thead> */}
{activeJobMesList?.data?.length ? ( {activeJobMesList?.data?.length ? (
<tbody> <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"> <tr key={index} className="text-slate-500">
<td> <td>
<div className="msg_box"> <div className={`msg_box ${item.who}`}>
<div className="msg_header"> <div className="msg_header">
{item.msg_date} {item.msg_firstname} {item.msg_date} {item.msg_firstname}
</div> </div>
<span {/* <span
className="p-2" className="p-2"
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: item.message, __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> </div>
</td> </td>
</tr> </tr>
))} )
})}
</tbody> </tbody>
) : activeJobMesList.error ? ( ) : activeJobMesList.error ? (
<tbody> <tbody>
@@ -33,8 +33,8 @@ function PurchasesTable({purchase}) {
<td className="p-4">{item.added_date}<br /> <td className="p-4">{item.added_date}<br />
<b>{item.confirmation} </b> <b>{item.confirmation} </b>
</td> </td>
<td className="p-4 text-right">{currencySymbol('', item.amount)}</td> <td className="p-4 text-right">{currencySymbol(item.currency, item.amount)}</td>
<td className="p-4 text-right">{currencySymbol('', item.fee)}</td> <td className="p-4 text-right">{currencySymbol(item.currency, item.fee)}</td>
</tr> </tr>
))} ))}
</tbody> </tbody>
@@ -40,9 +40,9 @@ function RecentActivityTable({ payment }) {
dangerouslySetInnerHTML={{ __html: item.recipient }} dangerouslySetInnerHTML={{ __html: item.recipient }}
></td> ></td>
<td className="p-4 text-right"> <td className="p-4 text-right">
{currencySymbol('', item.amount)} {currencySymbol(item.currency, item.amount)}
<br /> <br />
{currencySymbol('', item.fee)} {currencySymbol(item.currency, item.fee)}
</td> </td>
<td className="p-4">{item.status}</td> <td className="p-4">{item.status}</td>
</tr> </tr>
+16 -12
View File
@@ -73,18 +73,22 @@ export default function WalletItemCard({ walletItem, payment, countries }) {
</div> </div>
</div> </div>
</div> </div>
<p className="text-lg text-white tracking-wide flex justify-center items-center gap-8"> {walletItem.escrow > 0 ?
HOLDINGS :{" "} <p className="text-lg text-white tracking-wide flex justify-center items-center gap-8">
<span className="xxs:scale-100 lg:scale-100 xl:scale-125"> HOLDINGS :{" "}
{PriceFormatter( <span className="xxs:scale-100 lg:scale-100 xl:scale-125">
walletItem.escrow * 0.01, {PriceFormatter(
walletItem.code, walletItem.escrow * 0.01,
undefined, walletItem.code,
"text-[1.5rem]" undefined,
)} "text-[1.5rem]"
</span> )}
</p> </span>
</p>
:
null
}
<div className="w-full h-[1px] bg-white"></div> <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 */} {/* Using mini component reduces the bulk amount of html */}
<ListItem <ListItem
title={ title={
userDetails?.account_type == "FULL" ? "Dashboard" : "Home" userDetails?.account_type == "FULL" ? "Home" : "Home"
} }
route="/" route="/"
sidebar={sidebar} sidebar={sidebar}
+1 -1
View File
@@ -112,7 +112,7 @@ export default function Sidebar({
<ul className="flex flex-col space-y-6"> <ul className="flex flex-col space-y-6">
{/* Using mini component reduces the bulk amount of html */} {/* Using mini component reduces the bulk amount of html */}
<ListItem <ListItem
title={userDetails?.account_type == "FULL" ? "Dashboard" : "Home"} title={userDetails?.account_type == "FULL" ? "Home" : "Home"}
route="/" route="/"
sidebar={sidebar} sidebar={sidebar}
iconName="new-dashboard" iconName="new-dashboard"
@@ -2,7 +2,7 @@
import React, { useState } from "react"; import React, { useState } from "react";
import Icons from "../../Helpers/Icons"; import Icons from "../../Helpers/Icons";
import PasswordSvg from "../PasswordSvg"; // import PasswordSvg from "../PasswordSvg";
import LoadingSpinner from "../../Spinners/LoadingSpinner"; import LoadingSpinner from "../../Spinners/LoadingSpinner";
import usersService from "../../../services/UsersService"; import usersService from "../../../services/UsersService";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
@@ -113,8 +113,13 @@ export default function ChangePasswordTab() {
} }
return ( return (
<div className="changePasswordTab w-full"> <div className="changePasswordTab w-full">
<div className="w-full flex xxl:flex-row flex-col-reverse space-x-5 xxl:items-start"> <div className="w-full">
<div className="flex-1 mb-10"> <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"> <div className="input-field mb-6">
<label <label
className="input-label text-dark-gray dark:text-white text-xl font-bold block mb-2.5" 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>
</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 <button
type="button" type="button"
className="text-light-red text-18 tracking-wide border-b dark:border-[#5356fb29] border-light-red" 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 */} {/* End of error or success display */}
</div> </div>
<div className="w-[440px] sm:flex hidden justify-end"> {/* <div className="w-[440px] sm:flex hidden justify-end">
<PasswordSvg /> <PasswordSvg />
</div> </div> */}
</div> </div>
</div> </div>
); );
@@ -0,0 +1,43 @@
import React from "react";
import Icons from "../../Helpers/Icons";
export default function Preferences() {
return (
<div className="login-activity-tab w-full">
<div className="relative w-full overflow-x-auto sm:rounded-lg">
<table className="w-full text-sm text-left text-gray-500 dark:text-gray-400">
{/* <thead>
<tr className="text-base text-thin-light-gray border-b dark:border-[#5356fb29] default-border-b ">
<td className="py-4 text-center">Channel</td>
<td className="py-4 text-center">Date</td>
<td className="py-4 text-center">Location</td>
</tr>
</thead>
<tbody>
<tr className="bg-white dark:bg-dark-white border-b dark:border-[#5356fb29] hover:bg-gray-50">
<td className="text-center py-4">
<div className="flex items-center justify-center">
<span className="text-base text-dark-gray dark:text-white font-medium whitespace-nowrap px-2">
Desktop
</span>
</div>
</td>
<td className="text-center py-4">
<div className="flex space-x-1 items-center justify-center">
<span className="text-base text-dark-gray dark:text-white font-medium whitespace-nowrap px-2">
10-10-2035
</span>
</div>
</td>
<td className="text-center py-4">
<span className="text-base text-dark-gray dark:text-white whitespace-nowrap px-2">
10.0.0.1000
</span>
</td>
</tr>
</tbody> */}
</table>
</div>
</div>
);
}
+2
View File
@@ -7,6 +7,7 @@ import PersonalInfoTab from "./PersonalInfoTab";
import PrivacyPolicyTab from "./PrivacyPolicyTab"; import PrivacyPolicyTab from "./PrivacyPolicyTab";
import RecentActivitiesTab from "./RecentActivitiesTab"; import RecentActivitiesTab from "./RecentActivitiesTab";
import TermsConditionTab from "./TermsConditionTab"; import TermsConditionTab from "./TermsConditionTab";
import Preferences from './Preferences'
export { export {
ChangePasswordTab, ChangePasswordTab,
@@ -18,4 +19,5 @@ export {
PrivacyPolicyTab, PrivacyPolicyTab,
RecentActivitiesTab, RecentActivitiesTab,
TermsConditionTab, TermsConditionTab,
Preferences
}; };
+2 -1
View File
@@ -13,6 +13,7 @@ import {
PrivacyPolicyTab, PrivacyPolicyTab,
RecentActivitiesTab, RecentActivitiesTab,
TermsConditionTab, TermsConditionTab,
Preferences,
} from "./Tabs"; } from "./Tabs";
import RecipientAccountTab from "./Tabs/RecipientAccountTab"; import RecipientAccountTab from "./Tabs/RecipientAccountTab";
@@ -166,7 +167,7 @@ export default function Settings({ faq }) {
<NotificationSettingTab /> <NotificationSettingTab />
</div> </div>
), ),
preferences: <LoginActivityTab />, preferences: <Preferences />,
recent_activities: <RecentActivitiesTab />, recent_activities: <RecentActivitiesTab />,
password: <ChangePasswordTab />, password: <ChangePasswordTab />,
faq: <FaqTab datas={faq} />, faq: <FaqTab datas={faq} />,
@@ -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"), member_id: localStorage.getItem("member_id"),
sessionid: localStorage.getItem("session_token"), sessionid: localStorage.getItem("session_token"),
}; };
return this.postAuxEnd("/getwallets", postData); return this.postAuxEnd("/wallets", postData);
} }
getApiGate() { getApiGate() {
// localStorage.setItem("session_token", ``); // localStorage.setItem("session_token", ``);