-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* developing freelancer dashboard * add new dashboard * update the dashboard * briefs search working * swith profile on navbar * 1. add applications page 2. add message page 3.add ongoing page * fix hovering issue * functional applications count * add myprojects page * added filters for briefs container * functional freelancer dashboard * new bug fixes * fixed tests with new changes on brief/apply * approved brief fixes * fixed redirect to freelancers/new * fixed test * 1.fix long descriptions 2. redirect to owner profile 3. redirect to brief 4. limit skill show to 4 5. handle chat click 6. remove search and filter button add redirect to brief * 1. make chat click as popup * fix client side error * new comit * 1. fix client side rendering issue * 1. implemented the new client dashboard * minor update * fix client side error * another fix * 1. fix grant section in client dashboard 2. fix total earning in freelancer dashboard * 1. fix typo 2. add user images 3. add backbutton to wallet page 4. add view all button to client dashboard * 1. add item number to my projects 2. remove commented code 3 . add total spent --------- Co-authored-by: ssani7 <[email protected]>
- Loading branch information
1 parent
f1c13d8
commit 6218156
Showing
38 changed files
with
3,076 additions
and
441 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import dynamic from 'next/dynamic'; | ||
|
||
const Chart = dynamic(() => import('react-apexcharts'), { | ||
ssr: false, | ||
}); | ||
|
||
export default function AreaGrah() { | ||
const options = { | ||
fill: { | ||
colors: ['#3B27C1'], | ||
}, | ||
stroke: { | ||
height: '1px', | ||
colors: ['#3B27C1'], | ||
}, | ||
dataLabels: { | ||
enabled: false, | ||
}, | ||
toolbar: { | ||
enabled: false, | ||
show: false, | ||
}, | ||
xaxis: { | ||
categories: ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'], | ||
}, | ||
}; | ||
|
||
const series = [ | ||
{ | ||
name: 'profile views', | ||
data: [0, 0, 3, 5, 2, 6, 0], | ||
}, | ||
]; | ||
|
||
return <Chart series={series} options={options} type='area' height={320} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
import StarIcon from '@mui/icons-material/Star'; | ||
import { Rating } from '@mui/material'; | ||
import TimeAgo from 'javascript-time-ago'; | ||
import en from 'javascript-time-ago/locale/en.json'; | ||
import Image from 'next/image'; | ||
import { useRouter } from 'next/router'; | ||
import { | ||
AiOutlineCalendar, | ||
AiOutlineClockCircle, | ||
AiOutlinePlus, | ||
} from 'react-icons/ai'; | ||
import { HiOutlineCurrencyDollar } from 'react-icons/hi'; | ||
import { TbNorthStar } from 'react-icons/tb'; | ||
import { TbUsers } from 'react-icons/tb'; | ||
import { TfiEmail } from 'react-icons/tfi'; | ||
import { VscVerified } from 'react-icons/vsc'; | ||
|
||
import { Brief } from '@/model'; | ||
|
||
TimeAgo.addLocale(en); | ||
const timeAgo = new TimeAgo('en-US'); | ||
|
||
export default function BriefComponent({ brief }: { brief: Brief }) { | ||
const router = useRouter(); | ||
return ( | ||
<div className='flex border-b hover:bg-imbue-light-purple-three cursor-pointer last:border-b-0'> | ||
<div | ||
onClick={() => router.push(`/briefs/${brief.id}`)} | ||
className='py-9 px-7 max-w-[70%] w-full' | ||
> | ||
<p className='text-2xl text-imbue-purple-dark'>{brief.headline}</p> | ||
<div className='flex text-sm text-imbue-dark-coral gap-5 mt-5'> | ||
<p className='px-3 flex items-center gap-1 rounded-xl py-1 bg-imbue-light-coral '> | ||
<TbNorthStar size={18} /> | ||
{brief.experience_level} | ||
</p> | ||
<p className='px-3 rounded-xl flex gap-1 items-center py-1 bg-imbue-light-coral '> | ||
<AiOutlineCalendar size={18} /> | ||
Posted {timeAgo.format(new Date(brief.created))} | ||
</p> | ||
<p className='px-3 flex items-center gap-1 rounded-xl py-1 bg-imbue-light-coral '> | ||
<AiOutlineClockCircle size={18} /> | ||
{brief.duration} | ||
</p> | ||
<p className='px-3 flex items-center gap-1 rounded-xl py-1 bg-imbue-light-coral '> | ||
<HiOutlineCurrencyDollar size={20} /> | ||
Fixed price | ||
</p> | ||
</div> | ||
<div className='mt-7'> | ||
<p className='text-black text-sm'> | ||
{brief.description.length > 500 | ||
? brief.description.substring(0, 500) | ||
: brief.description} | ||
{brief.description.length > 500 && ( | ||
<span className='text-imbue-purple ml-1 cursor-pointer underline'> | ||
more | ||
</span> | ||
)} | ||
</p> | ||
</div> | ||
<div className='flex gap-2 mt-5'> | ||
{[0, 1, 2, 3].map( | ||
(item) => | ||
brief.skills.at(item) && ( | ||
<p | ||
key={'skills' + item} | ||
className='text-imbue-purple flex items-center gap-1 bg-imbue-light-purple-three px-4 rounded-full py-1' | ||
> | ||
{brief.skills.at(item)?.name} | ||
<AiOutlinePlus color='black' size={18} /> | ||
</p> | ||
) | ||
)} | ||
{brief.skills.length - 4 > 0 && ( | ||
<p className='text-imbue-purple flex items-center gap-1 bg-imbue-light-purple-three px-4 rounded-full py-1'> | ||
{brief.skills.length - 4} more | ||
</p> | ||
)} | ||
</div> | ||
</div> | ||
<div className='max-w-[30%] w-full py-7 border-l'> | ||
<div className='px-7 flex gap-2 pb-4 border-b'> | ||
<Image | ||
className='w-9 h-9 rounded-full' | ||
src={ | ||
brief.owner_photo || require('@/assets/images/profile-image.png') | ||
} | ||
width={40} | ||
height={40} | ||
alt='profile' | ||
/> | ||
<div> | ||
<p | ||
onClick={() => { | ||
router.push(`/profile/${brief.owner_name}`); | ||
}} | ||
className='text-black' | ||
> | ||
{brief.created_by} | ||
</p> | ||
<p className='text-sm'>Company Hire</p> | ||
</div> | ||
</div> | ||
<div className='text-black border-b text-sm py-3 space-y-2 px-9'> | ||
<p className='flex items-center'> | ||
<span className='text-imbue-purple mr-2'> | ||
<VscVerified size={20} /> | ||
</span> | ||
Payment method verified | ||
</p> | ||
<p className='flex items-center'> | ||
<span className='text-imbue-purple mr-2 ml-0.5'> | ||
<TfiEmail size={16} /> | ||
</span> | ||
{brief.number_of_briefs_submitted} | ||
</p> | ||
<p className='flex items-center'> | ||
<span className='text-imbue-purple mr-1.5'> | ||
<HiOutlineCurrencyDollar size={20} /> | ||
</span> | ||
$19k total spent | ||
</p> | ||
<p className='flex items-center'> | ||
<span className='text-imbue-purple mr-2'> | ||
<TbUsers size={18} /> | ||
</span> | ||
59 hires,6 active | ||
</p> | ||
</div> | ||
<div className='text-xs pt-3 px-7 text-black'> | ||
<Rating | ||
className='text-base' | ||
name='text-feedback' | ||
value={4.68} | ||
readOnly | ||
precision={0.5} | ||
emptyIcon={ | ||
<StarIcon style={{ opacity: 0.55 }} fontSize='inherit' /> | ||
} | ||
/> | ||
<div className='flex mt-1 justify-between'> | ||
<p>4.68 of 40 reviews</p> | ||
<p>Member since: Aug 17,2023</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.