Skip to content

Commit 15ca9bc

Browse files
committed
Refactor kanba card
1 parent 0bfb76b commit 15ca9bc

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

src/features/recruiters/pages/DashBoarPage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { ChatContext } from "../../../layout/chat/context/ChatContext";
1111
export const DashBoarPage = () => {
1212
const { offerId } = useParams();
1313
const [viewList, setViewList] = useState(false);
14-
const [ setNameOffer] = useState('');
14+
const [nameOffer, setNameOffer] = useState('');
1515
const [skillsOffer, setSkillsOffer] = useState([]);
1616
const [offer, setOffer] = useState(null);
1717
const [isLoading, setIsLoading] = useState(true);

src/features/recruiters/pages/RecDashBoar.jsx

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { updateCandidateStatus } from '../../../services/offersServices';
33
import { AvatarImage } from '../../../components/AvatarImage';
44
import { NameUsers } from '../../../components/NameUsers';
55
import { getDaysSince } from '../../../utils/utils';
6+
import { PiInfo } from 'react-icons/pi';
67
export const RecDashBoar = ({ offerId, lists, setLists }) => {
78
//guarda temporalmente de dónde (qué columna) y qué candidato estamos arrastrando.
89
const [dragInfo, setDragInfo] = useState({ fromList: null, candidate: null });
@@ -53,36 +54,47 @@ export const RecDashBoar = ({ offerId, lists, setLists }) => {
5354

5455
// 5. Render
5556
return (
56-
<div className="hidden lg:flex flex-col md:flex-row gap-4 py-4 min-h-screen w-auto overflow-x-auto">
57+
<div className="hidden lg:flex flex-col md:flex-row gap-4 py-4 min-h-screen w-full overflow-x-auto">
5758
{Object.entries(lists).map(([key, items]) => (
5859
<div
5960
key={key}
60-
className={`w-72 bg-neutral-80 rounded-box flex flex-col border-t-4 ${colors[key]}`}
61+
className={` bg-neutral-80 rounded-box flex flex-col border-t-4 ${colors[key]}`}
6162
onDragOver={handleDragOver}
6263
onDrop={e => handleDrop(e, key)}
6364
>
6465
<div className="p-4 border-b border-neutral-60">
6566
<h2 className="font-semibold capitalize">{key}</h2>
6667
</div>
67-
<div className="flex-1 p-4 space-y-2 text-sm text-left">
68+
<div className="p-4 space-y-2 text-sm text-left">
6869
{items.length > 0 ? (
6970
items.map(c => (
71+
7072
<div
7173
key={c._id}
72-
className="candidate-card bg-neutral-60 p-4 rounded-md flex items-start gap-2 mb-4 cursor-grab active:cursor-grabbing"
74+
className="bg-neutral-60 p-4 rounded-md flex items-start gap-2 mb-4 cursor-grab active:cursor-grabbing justify-between "
7375
draggable
7476
onDragStart={e => handleDragStart(e, c, key)}
7577
>
78+
79+
80+
7681
<AvatarImage user={c.user} />
7782
<div className="flex flex-col">
78-
<NameUsers user={c.user} align='items-start' classProps={'line-clamp-1'} />
83+
<NameUsers user={c.user} align='items-start' classProps={' line-clamp-1'} />
84+
85+
7986
{/* <p className="font-semibold text-base leading-tight">{c.user.name} {c.user.surname}</p> */}
8087
<p className="text-xs line-clamp-1 w-full">{c.user.email}</p>
8188
<p className="text-[10px] text-neutral-30 mt-1">
8289
Last {getDaysSince(c.appliedDate)} days ago
8390
</p>
8491
</div>
92+
<div>
93+
<PiInfo className='text-secondary-30 text-3xl z-48 size-6' />
94+
</div>
95+
8596
</div>
97+
8698
))
8799
) : (
88100
<p>No hay candidatos</p>

0 commit comments

Comments
 (0)