mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-05-01 19:29:33 +00:00
Added Ability to add Due Dates to Cards
This commit is contained in:
parent
be1ddcb0ad
commit
8ef97bf854
8 changed files with 207 additions and 4 deletions
|
@ -2,8 +2,10 @@
|
|||
|
||||
import { Draggable } from '@hello-pangea/dnd';
|
||||
import { Card } from '@prisma/client';
|
||||
import { format } from 'date-fns';
|
||||
|
||||
import { useCardModal } from '@/hooks/use-card-modal';
|
||||
import { Calendar } from 'lucide-react';
|
||||
|
||||
interface CardItemProps {
|
||||
index: number;
|
||||
|
@ -25,6 +27,10 @@ export const CardItem = ({ index, data }: CardItemProps) => {
|
|||
className='truncate rounded-md border-2 border-transparent bg-white px-3 py-2 text-sm shadow-sm hover:border-black'
|
||||
>
|
||||
{data.title}
|
||||
<div className='flex w-fit rounded-md border-2 border-transparent bg-slate-100 px-0.5 pb-0.5 pt-0.5 text-sm'>
|
||||
<Calendar className='ml-0.5 mr-0.5 h-4 w-4' />
|
||||
{data?.dueDate ? 'Due: ' + format(data.dueDate, 'PP') : 'No Due Date'}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Draggable>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue