Skip to content

Commit dc5a84e

Browse files
committed
correct changes and correct dowloading
1 parent e3359f7 commit dc5a84e

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

src/features/recruiters/components/ListDashBoard.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { TabsDashboard } from './TabsDashboard';
44
import { ListDashBoardCard } from './ListDashBoardCard';
55

66

7-
export const ListDashBoard = ({ classProps, offerId, lists, setLists, getCandidates,skillsOffer, openChat, handlerDownloadCV, handlerDownloadCoverLetter }) => {
7+
export const ListDashBoard = ({ classProps, offerId, lists, setLists, getCandidates,skillsOffer, openChat, handleDownloadCV, handleDownloadCoverLetter }) => {
88
const [activeTab, setActiveTab] = useState(Object.keys(lists)[0]);
99

1010
const changeStatusCandidate = async (status, idCandidato) => {
@@ -39,12 +39,12 @@ export const ListDashBoard = ({ classProps, offerId, lists, setLists, getCandida
3939

4040
<div className="w-full">
4141
{/* Tabs */}
42-
<TabsDashboard lists={lists} ActiveTab={activeTab} colors={colors} setActiveTab={setActiveTab}/>
42+
<TabsDashboard lists={lists} activeTab={activeTab} colors={colors} setActiveTab={setActiveTab}/>
4343

4444

4545
{/* Contenido de la pestaña activa */}
4646
<ListDashBoardCard lists={lists} activeTab={activeTab}
47-
handlerDownloadCV={handlerDownloadCV} handlerDownloadCoverLetter={handlerDownloadCoverLetter} openChat={openChat}
47+
handleDownloadCV={handleDownloadCV} handleDownloadCoverLetter={handleDownloadCoverLetter} openChat={openChat}
4848
setActiveTab={setActiveTab} skillsOffer={skillsOffer} colors={colors} fadedColors={fadedColors} textColors={textColors} changeStatusCandidate={changeStatusCandidate} offerId={offerId} />
4949

5050
</div>

src/features/recruiters/components/ListDashBoardCard.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { capitalize } from "../../../utils/utils"
88

99

1010

11-
export const ListDashBoardCard = ({lists, activeTab, skillsOffer, colors, fadedColors, textColors, changeStatusCandidate, offerId, openChat, handlerDownloadCV, handlerDownloadCoverLetter }) => {
11+
export const ListDashBoardCard = ({lists, activeTab, skillsOffer, colors, fadedColors, textColors, changeStatusCandidate, offerId, openChat, handleDownloadCV, handleDownloadCoverLetter }) => {
1212

1313

1414

@@ -22,7 +22,7 @@ export const ListDashBoardCard = ({lists, activeTab, skillsOffer, colors, fadedC
2222
const surname = capitalize(candidato?.user?.surname || '');
2323
const completeName = `${name} ${surname}`.trim() || 'Unknown Profile';
2424
const isResume = candidato?.user?.role?.developer?.resume;
25-
const isCoverLetter = (candidato?.user?.role?.developer?.coverLetter?.length ?? 0) >= 5;
25+
const isCoverLetter = (candidato?.coverLetter?.length ?? 0) >= 5;
2626
return (
2727
<div key={candidato._id} className="bg-neutral-80 p-4 gap-2 rounded-lg shadow-sm border border-neutral-60 flex flex-col">
2828
<div
@@ -95,7 +95,7 @@ export const ListDashBoardCard = ({lists, activeTab, skillsOffer, colors, fadedC
9595

9696
<button
9797
onClick={() =>
98-
handlerDownloadCV(
98+
handleDownloadCV(
9999
candidato.user.role.developer.resume,
100100
`${completeName}_CV.pdf`
101101
)
@@ -105,7 +105,7 @@ export const ListDashBoardCard = ({lists, activeTab, skillsOffer, colors, fadedC
105105
<PiReadCvLogo size={20} />
106106
</button>
107107
<button
108-
onClick={() => handlerDownloadCoverLetter(offerId, candidato._id)}
108+
onClick={() => handleDownloadCoverLetter(offerId, candidato._id)}
109109
className={`btn btn-md bg-neutral-90 hover:bg-neutral-60 ${!isCoverLetter && 'btn-disabled'} `}
110110
>
111111
<PiFileArrowDown size={20} />

src/features/recruiters/components/RecProfileCard.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ export const RecProfileCard = ({ recruiter, profile, id, token, setProfile }) =>
3535
}
3636
<div className="flex flex-col items-center">
3737
<div className="flex items-center justify-center rounded-full w-32 h-32 text-8xl">
38-
<AvatarImage user={profile} width={32} />
38+
<AvatarImage user={recruiter} width={32} />
3939
</div>
4040
<h1 className="text-xl font-bold mt-4 text-center">
41-
<NameUsers user={profile} classProps="text-lg font-semibold">
41+
<NameUsers user={recruiter} classProps="text-lg font-semibold">
4242
{profile?.role.type}
4343
</NameUsers>
4444
</h1>

src/features/recruiters/pages/DashBoarPage.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ const handleDownloadCoverLetter = async (offerId, userId) => {
9494
{/* En pantallas menores a lg: siempre muestra ListDashBoard */}
9595
<div className="lg:hidden">
9696
<ListDashBoard offerId={offerId}
97+
openChat={openChat}
98+
handleDownloadCoverLetter={handleDownloadCoverLetter}
99+
handleDownloadCV={handleDownloadCV}
97100
skillsOffer={skillsOffer}
98101
lists={lists}
99102
setLists={setLists}

0 commit comments

Comments
 (0)