Merge branch 'history-page-tab' of WrenchBoard/Users-Wrench into master
This commit is contained in:
@@ -217,22 +217,22 @@ export default function History() {
|
|||||||
{/* <TopHxBox className="mb-11" /> */}
|
{/* <TopHxBox className="mb-11" /> */}
|
||||||
<div className='w-full p-4 md:p-8 bg-white dark:bg-dark-white rounded-2xl shadow bottomMargin'>
|
<div className='w-full p-4 md:p-8 bg-white dark:bg-dark-white rounded-2xl shadow bottomMargin'>
|
||||||
{/* switch button */}
|
{/* 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
|
<button
|
||||||
name="purchases"
|
name="purchases"
|
||||||
onClick={(e) => setTab(e.target.name)}
|
onClick={(e) => setTab(e.target.name)}
|
||||||
className={`p-2 text-lg font-bold text-slate-600 dark:text-white border ${
|
className={`px-4 py-1 rounded-t-2xl ${
|
||||||
tab == "purchases" ? "border-sky-blue" : "border-slate-300"
|
tab == "purchases" ? "bg-[#4687ba] border-[2px] border-[#4687ba] text-white" : "bg-white text-[#000] border-t-[2px]"
|
||||||
} tracking-wide transition duration-200`}
|
}`}
|
||||||
>
|
>
|
||||||
Purchases
|
Purchases
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
name="recent"
|
name="recent"
|
||||||
onClick={(e) => setTab(e.target.name)}
|
onClick={(e) => setTab(e.target.name)}
|
||||||
className={`p-2 text-lg font-bold text-slate-600 dark:text-white border ${
|
className={`px-4 py-1 rounded-t-2xl ${
|
||||||
tab == "recent" ? "border-sky-blue" : "border-slate-300"
|
tab == "recent" ? "bg-[#4687ba] border-[2px] border-[#4687ba] text-white" : "bg-white text-[#000] border-t-[2px]"
|
||||||
} tracking-wide transition duration-200`}
|
}`}
|
||||||
>
|
>
|
||||||
Recent Activity
|
Recent Activity
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ import PaginatedList from "../Pagination/PaginatedList";
|
|||||||
import { handlePagingFunc } from "../Pagination/HandlePagination";
|
import { handlePagingFunc } from "../Pagination/HandlePagination";
|
||||||
|
|
||||||
export default function ActiveJobMessage({ activeJobMesList }) {
|
export default function ActiveJobMessage({ activeJobMesList }) {
|
||||||
const [currentPage, setCurrentPage] = useState(0);
|
// const [currentPage, setCurrentPage] = useState(0);
|
||||||
const indexOfFirstItem = Number(currentPage);
|
// const indexOfFirstItem = Number(currentPage);
|
||||||
const indexOfLastItem = Number(indexOfFirstItem)+Number(process.env.REACT_APP_ITEM_PER_PAGE);
|
// const indexOfLastItem = Number(indexOfFirstItem)+Number(process.env.REACT_APP_ITEM_PER_PAGE);
|
||||||
const currentActiveJobMesList = activeJobMesList?.data?.slice(indexOfFirstItem, indexOfLastItem);
|
// const currentActiveJobMesList = activeJobMesList?.data?.slice(indexOfFirstItem, indexOfLastItem);
|
||||||
|
|
||||||
const handlePagination = (e) => {
|
// const handlePagination = (e) => {
|
||||||
handlePagingFunc(e,setCurrentPage)
|
// handlePagingFunc(e,setCurrentPage)
|
||||||
}
|
// }
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex flex-col justify-between'>
|
<div className='flex flex-col justify-between'>
|
||||||
@@ -27,10 +27,10 @@ export default function ActiveJobMessage({ activeJobMesList }) {
|
|||||||
<th className="p-2"></th>
|
<th className="p-2"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{activeJobMesList.data.length ?
|
{activeJobMesList?.data?.length ?
|
||||||
(
|
(
|
||||||
<tbody>
|
<tbody>
|
||||||
{currentActiveJobMesList.map((item, index) => (
|
{activeJobMesList.data.map((item, index) => (
|
||||||
<tr key={index} className='text-slate-500'>
|
<tr key={index} className='text-slate-500'>
|
||||||
<td>
|
<td>
|
||||||
<div className={`msg_box ${item.who}`}>
|
<div className={`msg_box ${item.who}`}>
|
||||||
@@ -63,7 +63,7 @@ export default function ActiveJobMessage({ activeJobMesList }) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* PAGINATION BUTTON */}
|
{/* 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 */}
|
{/* END OF PAGINATION BUTTON */}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -353,7 +353,7 @@ function ActiveJobs(props) {
|
|||||||
</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 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="">
|
<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
|
||||||
@@ -459,7 +459,7 @@ function ActiveJobs(props) {
|
|||||||
|
|
||||||
{/* Buttons Sections */}
|
{/* Buttons Sections */}
|
||||||
<div className="py-2 sm:flex sm:justify-end sm:items-center">
|
<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
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={handleClearAll}
|
onClick={handleClearAll}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ function RecentActivityTable({ payment }) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
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">
|
<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">
|
||||||
|
|||||||
Reference in New Issue
Block a user