Merge branch 'history-page-update' of WrenchBoard/Users-Wrench into master
This commit is contained in:
@@ -7,7 +7,8 @@ import PaginatedList from '../../components/Pagination/PaginatedList';
|
|||||||
|
|
||||||
import LoadingSpinner from '../Spinners/LoadingSpinner';
|
import LoadingSpinner from '../Spinners/LoadingSpinner';
|
||||||
|
|
||||||
import { AmountTo2DP } from '../Helpers/PriceFormatter';
|
import { AmountTo2DP, PriceFormatter } from '../Helpers/PriceFormatter';
|
||||||
|
import {NewDateTimeFormatter} from '../../lib/NewDateTimeFormatter'
|
||||||
|
|
||||||
function JobsCompleted() {
|
function JobsCompleted() {
|
||||||
|
|
||||||
@@ -47,7 +48,7 @@ function JobsCompleted() {
|
|||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='p-4 flex flex-col justify-between min-h-[500px]'>
|
<div className='py-4 flex flex-col justify-between min-h-[500px]'>
|
||||||
{jobHistory?.loading ?
|
{jobHistory?.loading ?
|
||||||
<LoadingSpinner size='16' color='sky-blue' height='h-[500px]' />
|
<LoadingSpinner size='16' color='sky-blue' height='h-[500px]' />
|
||||||
: jobHistory?.data?.length ?
|
: jobHistory?.data?.length ?
|
||||||
@@ -71,10 +72,12 @@ function JobsCompleted() {
|
|||||||
<div className='flex flex-col'>
|
<div className='flex flex-col'>
|
||||||
<h1 className='text-lg font-bold line-clamp-1'>{item?.title}</h1>
|
<h1 className='text-lg font-bold line-clamp-1'>{item?.title}</h1>
|
||||||
<p className='text-sm line-clamp-2'>{item?.description}</p>
|
<p className='text-sm line-clamp-2'>{item?.description}</p>
|
||||||
|
<p className='text-sm line-clamp-2'>{NewDateTimeFormatter(item?.delivery_date)}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="p-4 text-right">{AmountTo2DP(item?.price*0.01)} {item?.currency}</td>
|
<td className="p-4 flex text-right justify-end items-center">{AmountTo2DP(item?.price*0.01)} {item?.currency_code}</td>
|
||||||
|
{/* <td className="p-4 text-right">{PriceFormatter(item?.price*0.01, item?.currency_code)}</td> */}
|
||||||
{/* <td className="p-4">{date}</td>
|
{/* <td className="p-4">{date}</td>
|
||||||
<td className="p-4">{item?.contract}</td> */}
|
<td className="p-4">{item?.contract}</td> */}
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export const RewardsTable = memo(() => {
|
|||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='p-4 flex flex-col justify-between min-h-[500px]'>
|
<div className='py-4 flex flex-col justify-between min-h-[500px]'>
|
||||||
{familyRewardHistory.loading ?
|
{familyRewardHistory.loading ?
|
||||||
<LoadingSpinner size='16' color='sky-blue' height='h-[500px]' />
|
<LoadingSpinner size='16' color='sky-blue' height='h-[500px]' />
|
||||||
: familyRewardHistory.data.length ?
|
: familyRewardHistory.data.length ?
|
||||||
@@ -65,10 +65,10 @@ export const RewardsTable = memo(() => {
|
|||||||
let date = new Date(item.added).toLocaleDateString()
|
let date = new Date(item.added).toLocaleDateString()
|
||||||
return (
|
return (
|
||||||
<tr key={index} className='dark:text-white dark:bg-dark-white border-y dark:border-[#5356fb29] hover:bg-gray-50 dark:hover:bg-gray-50 dark:hover:text-black transition-all duration-300'>
|
<tr key={index} className='dark:text-white dark:bg-dark-white border-y dark:border-[#5356fb29] hover:bg-gray-50 dark:hover:bg-gray-50 dark:hover:text-black transition-all duration-300'>
|
||||||
<td className="p-4">
|
<td className="p-4 min-w-[350px] max-w-[400px]">
|
||||||
<div className='flex items-center gap-2'>
|
<div className='flex w-full items-center gap-2'>
|
||||||
<img src={item.icon} className='min-w-[60px] max-w-[60px] min-h-[60px] max-h-[60px] rounded-full bg-slate-500' alt='Reward Logo' />
|
<img src={item.icon} className='min-w-[60px] max-w-[60px] min-h-[60px] max-h-[60px] rounded-full bg-slate-500' alt='Reward Logo' />
|
||||||
<div className='flex flex-col'>
|
<div className='flex flex-col w-full'>
|
||||||
<h1 className='text-lg font-bold'>Reward to {item.rec_firstname} {item.rec_lastname}</h1>
|
<h1 className='text-lg font-bold'>Reward to {item.rec_firstname} {item.rec_lastname}</h1>
|
||||||
<p className='text-sm'>{item.description}</p>
|
<p className='text-sm'>{item.description}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ function CurrentTaskAction({jobDetails}) {
|
|||||||
|
|
||||||
const currTime = new Date().getTime() / (1000*60*60)
|
const currTime = new Date().getTime() / (1000*60*60)
|
||||||
const minDueTime = new Date(jobDetails?.minimum_due).getTime() / (1000*60*60)
|
const minDueTime = new Date(jobDetails?.minimum_due).getTime() / (1000*60*60)
|
||||||
const canSendForReview = jobDetails.strict_timeline ? currTime >= minDueTime : true // calculation to determine when send for review button will be active
|
const canSendForReview = Number(jobDetails.strict_timeline) ? currTime >= minDueTime : true // calculation to determine when send for review button will be active
|
||||||
|
|
||||||
const apiCall = new usersService()
|
const apiCall = new usersService()
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ function PurchasesTable({purchase}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='p-4 flex flex-col justify-between min-h-[500px]'>
|
<div className='py-4 flex flex-col justify-between min-h-[500px]'>
|
||||||
{purchase.data.length ?
|
{purchase.data.length ?
|
||||||
<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='w-full'>
|
<thead className='w-full'>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ function RecentActivityTable({ payment }) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="p-4 flex flex-col justify-between min-h-[500px]">
|
<div className="py-4 flex flex-col justify-between min-h-[500px]">
|
||||||
{payment?.data?.length > 0 ?
|
{payment?.data?.length > 0 ?
|
||||||
<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="w-full">
|
<thead className="w-full">
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import usersService from "../../services/UsersService";
|
|||||||
import ModalCom from "../Helpers/ModalCom";
|
import ModalCom from "../Helpers/ModalCom";
|
||||||
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
||||||
import Detail from "./popoutcomponent/Detail";
|
import Detail from "./popoutcomponent/Detail";
|
||||||
|
import {PriceFormatter} from '../Helpers/PriceFormatter'
|
||||||
|
|
||||||
import { useDispatch } from "react-redux";
|
import { useDispatch } from "react-redux";
|
||||||
import { NewDateTimeFormatter } from "../../lib/NewDateTimeFormatter";
|
import { NewDateTimeFormatter } from "../../lib/NewDateTimeFormatter";
|
||||||
|
|||||||
Reference in New Issue
Block a user