Compare commits

..

13 Commits

13 changed files with 114 additions and 50 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

+7 -7
View File
@@ -217,22 +217,22 @@ export default function History() {
{/* <TopHxBox className="mb-11" /> */}
<div className='w-full p-4 md:p-8 bg-white dark:bg-dark-white rounded-2xl shadow bottomMargin'>
{/* switch button */}
<div className="my-1 flex items-center border-b border-slate-300">
<div className="pl-7 my-2 flex items-center border-b border-slate-300 gap-3">
<button
name="purchases"
onClick={(e) => setTab(e.target.name)}
className={`p-2 text-lg font-bold text-slate-600 dark:text-white border ${
tab == "purchases" ? "border-sky-blue" : "border-slate-300"
} tracking-wide transition duration-200`}
className={`px-4 py-1 rounded-t-2xl ${
tab == "purchases" ? "bg-[#4687ba] border-[2px] border-[#4687ba] text-white" : "bg-white text-[#000] border-t-[2px]"
}`}
>
Purchases
</button>
<button
name="recent"
onClick={(e) => setTab(e.target.name)}
className={`p-2 text-lg font-bold text-slate-600 dark:text-white border ${
tab == "recent" ? "border-sky-blue" : "border-slate-300"
} tracking-wide transition duration-200`}
className={`px-4 py-1 rounded-t-2xl ${
tab == "recent" ? "bg-[#4687ba] border-[2px] border-[#4687ba] text-white" : "bg-white text-[#000] border-t-[2px]"
}`}
>
Recent Activity
</button>
@@ -9,14 +9,14 @@ import PaginatedList from "../Pagination/PaginatedList";
import { handlePagingFunc } from "../Pagination/HandlePagination";
export default function ActiveJobMessage({ activeJobMesList }) {
const [currentPage, setCurrentPage] = useState(0);
const indexOfFirstItem = Number(currentPage);
const indexOfLastItem = Number(indexOfFirstItem)+Number(process.env.REACT_APP_ITEM_PER_PAGE);
const currentActiveJobMesList = activeJobMesList?.data?.slice(indexOfFirstItem, indexOfLastItem);
// const [currentPage, setCurrentPage] = useState(0);
// const indexOfFirstItem = Number(currentPage);
// const indexOfLastItem = Number(indexOfFirstItem)+Number(process.env.REACT_APP_ITEM_PER_PAGE);
// const currentActiveJobMesList = activeJobMesList?.data?.slice(indexOfFirstItem, indexOfLastItem);
const handlePagination = (e) => {
handlePagingFunc(e,setCurrentPage)
}
// const handlePagination = (e) => {
// handlePagingFunc(e,setCurrentPage)
// }
return (
<div className='flex flex-col justify-between'>
@@ -27,10 +27,10 @@ export default function ActiveJobMessage({ activeJobMesList }) {
<th className="p-2"></th>
</tr>
</thead>
{activeJobMesList.data.length ?
{activeJobMesList?.data?.length ?
(
<tbody>
{currentActiveJobMesList.map((item, index) => (
{activeJobMesList.data.map((item, index) => (
<tr key={index} className='text-slate-500'>
<td>
<div className={`msg_box ${item.who}`}>
@@ -63,7 +63,7 @@ export default function ActiveJobMessage({ activeJobMesList }) {
</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} />
{/* <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>
)
+8 -8
View File
@@ -353,7 +353,7 @@ function ActiveJobs(props) {
</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">
<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="">
<h1 className="text-lg font-bold text-dark-gray dark:text-white tracking-wide">
Actions
@@ -404,7 +404,7 @@ function ActiveJobs(props) {
<div className="files">
<label
htmlFor="file"
className="h-20 btn-gradient text-base tracking-wide px-4 py-2 rounded-full text-white cursor-pointer"
className="btn-gradient text-base tracking-wide px-4 py-2 rounded-full text-white cursor-pointer"
>
Select Files to Upload
</label>
@@ -459,11 +459,11 @@ function ActiveJobs(props) {
{/* Buttons Sections */}
<div className="py-2 sm:flex sm:justify-end sm:items-center">
<div className="w-full sm:w-2/4 flex justify-between items-center space-x-2">
<div className="w-full sm:w-3/4 flex justify-between items-center space-x-2">
<button
type="button"
onClick={handleClearAll}
className="border-gradient text-base tracking-wide px-4 py-3 rounded-full"
className="border-gradient text-base tracking-wide px-4 py-2 rounded-full"
>
<span className="text-gradient">Clear</span>
</button>
@@ -471,7 +471,7 @@ function ActiveJobs(props) {
<button
onClick={sendFile}
type="button"
className="btn-gradient text-base tracking-wide px-4 py-3 rounded-full flex justify-center items-center"
className='btn-gradient text-base tracking-wide px-4 py-2 rounded-full text-white cursor-pointer flex justify-center items-center'
>
{requestStatus.loading ? (
<LoadingSpinner size="6" color="sky-blue" />
@@ -495,7 +495,7 @@ function ActiveJobs(props) {
<button
onClick={sendTaskMessage}
type="button"
className="btn-gradient text-base text-white tracking-wide px-4 py-3 rounded-full"
className='btn-gradient text-base tracking-wide px-4 py-2 rounded-full text-white cursor-pointer'
>
{requestStatus.loading ? (
<LoadingSpinner size="6" color="sky-blue" />
@@ -520,9 +520,9 @@ function ActiveJobs(props) {
<button
type="button"
onClick={popUpHandler}
className="px-2 py-1 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
className="btn-gradient text-base tracking-wide px-4 py-2 rounded-full text-white cursor-pointer flex justify-center items-center"
>
view all
View all
</button>
</div>
{props.activeJobMesList.loading ? (
@@ -25,13 +25,6 @@ function ConfirmAddFund({
status: false,
}); // STATE FOR API REQUEST
// const [ConfirmCredit, setConfirmCredit] = useState({
// show: false,
// loader: false,
// msg: "",
// data: {},
// });
const apiURL = new usersService();
const navigate = useNavigate();
@@ -131,14 +124,18 @@ function ConfirmAddFund({
return;
}
setConfirmCredit((prev) => ({
...prev,
show: {
awaitConfirm: { loader: false, state: false },
acceptConfirm: { loader: false, state: true },
},
data: _response,
}));
return setTimeout(
() =>
setConfirmCredit((prev) => ({
...prev,
show: {
awaitConfirm: { loader: false, state: false },
acceptConfirm: { loader: false, state: true },
},
data: _response,
})),
1500
);
} catch (error) {
setConfirmCredit((prev) => ({
...prev,
@@ -170,7 +167,8 @@ function ConfirmAddFund({
<div className="px-4 md:p-8 py-4 add-fund-info">
<div className="field w-full mb-3 min-h-[45px]">
{confirmCredit?.show?.awaitConfirm?.state ? (
<div className="flex flex-col gap-4">
<div className="flex flex-col gap-2">
{/* Amount */}
<div
className={`flex items-center ${
__confirmCountry == "US" ? "gap-14" : "gap-4"
@@ -185,6 +183,40 @@ function ConfirmAddFund({
}`}
</span>
</div>
{/* Transaction Fee */}
<div
className={`flex items-center border-b border-gray-600 ${
__confirmCountry == "US" ? "gap-[2.7rem]" : "gap-4"
}`}
>
<h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
Transaction Fee
</h1>
<span className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
{`${walletItem?.symbol} ${
Number(__confirmData?.fee).toLocaleString() || ""
}`}
</span>
</div>
{/* Total */}
<div
className={`flex items-center ${
__confirmCountry == "US" ? "gap-[8rem]" : "gap-4"
}`}
>
<h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
Total
</h1>
<span className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
{`${walletItem?.symbol} ${
(
Number(__confirmData?.amount) +
Number(__confirmData?.fee)
).toLocaleString() || ""
}`}
</span>
</div>
{__confirmCountry == "US" && (
<div className="flex items-center gap-8">
<label
@@ -220,9 +252,10 @@ function ConfirmAddFund({
<div
className={
__confirmCountry == "US" ? "min-h-[163px]" : "min-h-[200px]"
__confirmCountry == "US" ? "min-h-[96px]" : "min-h-[200px]"
}
></div>
<hr />
<div className="md:p-8 p-4 add-fund-btn flex justify-end items-center py-4 gap-4">
<button
className="px-4 h-11 flex justify-center items-center border-gradient text-base rounded-full"
@@ -60,7 +60,7 @@ const CreditPopup = ({ details, onClose, situation, walletItem }) => {
</div>
<div className="logout-modal-body w-full flex flex-col items-center">
{confirmCredit?.show?.acceptConfirm?.loader ? (
<div className="h-[33rem] flex items-center justify-center">
<div className="h-[32rem] flex items-center justify-center">
<LoadingSpinner size="12" color="sky-blue" />
</div>
) : (
@@ -18,7 +18,7 @@ function RecentActivityTable({ payment }) {
};
return (
<div className="flex flex-col justify-between overflow-y-auto">
<div className="flex flex-col justify-between min-h-[500px]">
<table className="wallet-activity w-full table-auto border-collapse text-left">
<thead className="border-b-2">
<tr className="text-slate-600">
+2 -1
View File
@@ -9,6 +9,7 @@ import products from "../../data/product_data.json";
import Layout from "../Partials/Layout";
import {
ActivitiesTab, BlogTab,
QuestionsTab,
CollectionTab,
CreatedTab,
HiddenProductsTab,
@@ -39,7 +40,7 @@ export default function Resources(props) {
// Category Components
const tabComponents = {
blog: <BlogTab blogdata={blogItems} />,
onsale: <OnSaleTab products={onSaleProducts} />,
onsale: <QuestionsTab products={onSaleProducts} />,
owned: <OwnTab products={ownProducts} />,
created: (
<CreatedTab marketProducts={CreatedSell} mainProducts={CreatedBits} />
@@ -0,0 +1,28 @@
import ProductCardStyleTwo from "../../Cards/ProductCardStyleTwo";
import DataIteration from "../../Helpers/DataIteration";
import SearchCom from "../../Helpers/SearchCom";
export default function QuestionsTab({ className, products }) {
return (
<>
<div className={`onsale-tab-wrapper w-full ${className || ""}`}>
<div className="main-container w-full">
<div className="filter-section w-full items-center sm:flex justify-between mb-6">
{/* filter-search */}
<div className="sm:w-1/2 w-full sm:pr-20 pr-0 mb-5 sm:mb-0">
<SearchCom />
</div>
</div>
<div className="content-section w-full-width">
<div className="grid lg:grid-cols-3 sm:grid-cols-2 grid-cols-1 gap-[30px]">
</div>
</div>
</div>
</div>
</>
);
}
+2
View File
@@ -5,9 +5,11 @@ import HiddenProductsTab from "./HiddenProductsTab";
import OnSaleTab from "./OnSaleTab";
import OwnTab from "./OwnTab";
import BlogTab from "./BlogTab";
import QuestionsTab from "./QuestionsTab";
export {
BlogTab,
QuestionsTab,
ActivitiesTab,
CollectionTab,
CreatedTab,
@@ -26,7 +26,7 @@ export default function NotificationSettingTab() {
setAccSettings(prev => {
let newAccSettings = prev.data.map(data => {
if(data.uid == item.uid){
let newPrefValue = data.pref_value == null || data.pref_value == false ? true : false
let newPrefValue = data.pref_value == null || data.pref_value == '0' ? '100' : '0'
return {...data, pref_value: newPrefValue}
}else{
return data
@@ -40,7 +40,7 @@ export default function NotificationSettingTab() {
setNotificationChange({loading: true, uid: item.uid})
let reqData = { // API PAYLOADS
pref_id: item.pref_id,
status: '100'
status: item.pref_value == null || item.pref_value == 0 ? 100 : 0
}
api.setAccSettings(reqData).then(res => {
if(res.status != 200 || res.data.internal_return < 0){
@@ -94,7 +94,7 @@ export default function NotificationSettingTab() {
<LoadingSpinner size='8' color='sky-blue' />
:
<SwitchCom
value={item.pref_value}
value={item.pref_value == null || item.pref_value == '0' ? 0 : 100}
handler={ notificationChange.loading ? ()=>{} : () => handleNotificationChange(item)}
// value={updateNotification}
// handler={() => setUpdateNotification(!updateNotification)}
+1 -1
View File
@@ -253,7 +253,7 @@ function JobListPopout({ details, onClose, situation }) {
>
{(props) => {
return (
<Form className="mb-4">
<Form className="mb-4 hidden">
{/* Assign to Family */}
<JobFieldInput
label="Assign to family"
+1 -1
View File
@@ -17,7 +17,7 @@
}
.RECIPIENT{
margin-right: 60px !important;
background-color: lightblue;
background-color: #add8e6 !important;
}
.wallet-box{
background-color: aliceblue;