Skip to content

Commit 565e8ec

Browse files
committed
2 parents e9acdd7 + a3c78f0 commit 565e8ec

File tree

20 files changed

+180
-81
lines changed

20 files changed

+180
-81
lines changed

src/context/authContext.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export const AuthProvider = ({ children }) => {
7373
}, [token]);
7474

7575
const logout = () => {
76+
setNotifications([]);
7677
setProfile(null);
7778
setToken(null);
7879
localStorage.removeItem("token");

src/features/developer/pages/ProjectDetailsPage.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ export const ProjectDetailsPage = () => {
112112
createdAt: Date.now()
113113
};
114114
socket.emit("sendNotification", notif);
115-
setNotifications(prev => [notif, ...prev]);
116115
}
117116
} catch (error) {
118117
console.error(error);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
export const DashBoardCard = () => {
1+
export const DashBoardUserModal = () => {
22
return (
3-
<div>DashBoardCard</div>
3+
<div>DashBoardUserModal</div>
44
)
55
}

src/features/recruiters/components/ListDashBoardCard.jsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ import { CandidateSkills } from "./candidateSkills"
55

66
import { GoChevronDown } from "react-icons/go"
77
import { capitalize } from "../../../utils/utils"
8+
import { useNavigate } from "react-router"
89

910

1011

1112
export const ListDashBoardCard = ({lists, activeTab, skillsOffer, colors, fadedColors, textColors, changeStatusCandidate, offerId, openChat, handleDownloadCV, handleDownloadCoverLetter }) => {
1213

14+
const navigate = useNavigate();
1315

1416

1517

@@ -31,8 +33,8 @@ export const ListDashBoardCard = ({lists, activeTab, skillsOffer, colors, fadedC
3133
>
3234
{/* Izquierda: avatar + info */}
3335
<div className='flex flex-col items-center gap-2 '>
34-
<div className='flex flex-col items-center gap-2 '>
35-
<div className='flex gap-2 self-start '>
36+
<div className='flex flex-col items-center gap-2 '>
37+
<div className='flex gap-2 self-start cursor-pointer' onClick={() => navigate(`/profile/${candidato?.user?._id}`)}>
3638
<div>
3739
<AvatarImage user={candidato?.user} width={10} />
3840
</div>
@@ -57,10 +59,7 @@ export const ListDashBoardCard = ({lists, activeTab, skillsOffer, colors, fadedC
5759
</NameUsers>
5860
</div>
5961
</div>
60-
{/* <p className=' self-start flex items-center gap-1 text-xs'>
61-
<PiEnvelope />
62-
{candidato?.user?.email}
63-
</p> */}
62+
6463
</div>
6564
{/* Tecnologías */}
6665
</div>

src/features/recruiters/components/TagsInputRecruiter.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useEffect } from "react";
22
import { useState } from "react";
33
import { getSkillsByQuery } from "../../../services/offersServices";
4-
import { set } from "react-hook-form";
4+
55

66
export const TagsInputRecruiter = ({ value = [], onChange }) => {
77
const [inputValue, setInputValue] = useState("");

src/features/recruiters/pages/OfferInfoPage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export const OfferInfoPage = () => {
190190
{/* Izquierda: avatar + info */}
191191
<div className='flex flex-col items-center gap-2 '>
192192
<div className='flex flex-col items-center gap-2 '>
193-
<div className='flex gap-2 self-start '>
193+
<div className='flex gap-2 self-start cursor-pointer' onClick={() => navigate(`/profile/${candidato?.user?._id}`)}>
194194
<div>
195195
<AvatarImage user={candidato?.user} width={10} />
196196
</div>

src/features/recruiters/pages/RecDashBoar.jsx

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ export const RecDashBoar = ({ offerId, lists, setLists }) => {
5454

5555
// 5. Render
5656
return (
57-
<div className="hidden lg:flex flex-col md:flex-row gap-4 py-4 min-h-screen w-full overflow-x-auto">
57+
<div className="hidden lg:grid grid-cols-5 gap-4 py-4 min-h-screen w-full overflow-x-auto">
5858
{Object.entries(lists).map(([key, items]) => (
5959
<div
6060
key={key}
61-
className={` bg-neutral-80 rounded-box flex flex-col border-t-4 ${colors[key]}`}
61+
className={` bg-neutral-80 rounded-box grid grid-cols-1 grid-rows-[auto_1fr] items-start border-t-4 ${colors[key]}`}
6262
onDragOver={handleDragOver}
6363
onDrop={e => handleDrop(e, key)}
6464
>
@@ -71,28 +71,32 @@ export const RecDashBoar = ({ offerId, lists, setLists }) => {
7171

7272
<div
7373
key={c._id}
74-
className="bg-neutral-60 p-4 rounded-md flex items-start gap-2 mb-4 cursor-grab active:cursor-grabbing justify-between "
74+
className="bg-neutral-60 p-4 rounded flex flex-col gap-2 mb-4 cursor-grab active:cursor-grabbing "
7575
draggable
7676
onDragStart={e => handleDragStart(e, c, key)}
7777
>
7878

7979

8080

81-
<AvatarImage user={c.user} />
81+
<div className='flex justify-between'>
82+
<AvatarImage user={c.user} width={6}/>
83+
<div>
84+
<PiInfo className='text-secondary-30 text-3xl z-48 size-6' />
85+
</div>
86+
87+
</div>
8288
<div className="flex flex-col">
83-
<NameUsers user={c.user} align='items-start' classProps={' line-clamp-1'} />
89+
<NameUsers user={c.user} align='items-start' classProps={' line-clamp-1'} >
90+
{c.user.role.developer.professionalPosition}
91+
</NameUsers>
8492

8593

8694
{/* <p className="font-semibold text-base leading-tight">{c.user.name} {c.user.surname}</p> */}
87-
<p className="text-xs line-clamp-1 w-full">{c.user.email}</p>
95+
8896
<p className="text-[10px] text-neutral-30 mt-1">
8997
Last {getDaysSince(c.appliedDate)} days ago
9098
</p>
91-
</div>
92-
<div>
93-
<PiInfo className='text-secondary-30 text-3xl z-48 size-6' />
94-
</div>
95-
99+
</div>
96100
</div>
97101

98102
))

src/layout/Footer.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const Footer = () => {
3030
<Link to="/about" className="link link-hover">
3131
About us
3232
</Link>
33-
<Link to="/contact" className="link link-hover">
33+
<Link to="/contact" className="link link-hover disabled:cursor-not-allowed " >
3434
Contact
3535
</Link>
3636
<Link to="/onboarding" className="link link-hover">

src/layout/Header.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const Header = () => {
1616
};
1717

1818
return (
19-
<header className='bg-neutral-80 py-2 pl-2 drawer border-b-1 border-neutral-70'>
19+
<header className='bg-neutral-80 py-2 px-4 drawer border-b-1 border-neutral-70'>
2020
<input
2121
id='my-drawer-3'
2222
type='checkbox'

src/layout/chat/ChatPanel.jsx

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,21 @@ export default function ChatPanel({ onClose, user }) {
113113
const resp = await sendMessage(token, message, imagePreview, selectedUser._id);
114114
setMessages((prevMessages) => [...prevMessages, resp]);
115115
//Emitir evento de socket para enviar la notificación
116-
socket.emit("sendNotification", {
117-
senderId: profile._id, // <--- agrega esto
118-
senderName: SENDER_NAME,
119-
receiverId: selectedUser._id,
120-
receiverName: selectedUser.name,
121-
type: 1
122-
});
116+
// socket.emit("sendNotification", {
117+
// senderId: profile._id, // <--- agrega esto
118+
// senderName: SENDER_NAME,
119+
// receiverId: selectedUser._id,
120+
// receiverName: selectedUser.name,
121+
// type: 1,
122+
// user: {
123+
// _id: profile._id,
124+
// name: profile.name,
125+
// role: profile.role,
126+
// roles: profile.roles,
127+
// avatar: profile.avatar,
128+
// // cualquier otra propiedad útil
129+
// }
130+
// });
123131

124132
setUsuariosConectados((prev) => {
125133
if (!prev.some(user => user._id === selectedUser._id)) {
@@ -146,7 +154,7 @@ export default function ChatPanel({ onClose, user }) {
146154
if (data.type === 1) {
147155
setUsuariosConectados((prev) => {
148156
if (!prev.some(user => user._id === data.senderId)) {
149-
return [...prev, data];
157+
return [...prev, data.user];
150158
}
151159
return prev;
152160
});

0 commit comments

Comments
 (0)