Skip to content

Commit b6ab558

Browse files
authored
Merge pull request #50 from FSDSTR0225/feature/aplicants-mail
Feature/aplicants mail
2 parents 56fea57 + 0665abc commit b6ab558

File tree

4 files changed

+23
-20
lines changed

4 files changed

+23
-20
lines changed

src/features/recruiters/pages/DashBoarPage.jsx

Lines changed: 6 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}
@@ -109,6 +112,9 @@ const handleDownloadCoverLetter = async (offerId, userId) => {
109112
lists={lists}
110113
setLists={setLists}
111114
getCandidates={getCandidates} /> : <RecDashBoar offerId={offerId}
115+
openChat={openChat}
116+
handleDownloadCoverLetter={handleDownloadCoverLetter}
117+
handleDownloadCV={handleDownloadCV}
112118
lists={lists}
113119
setLists={setLists} />}
114120
</div>

src/features/recruiters/pages/OfferInfoPage.jsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const OfferInfoPage = () => {
8383
const hasApplied =
8484
Array.isArray(offer?.applicants) &&
8585
profile?._id &&
86-
offer?.applicants?.some((applicant) => applicant?.user === profile._id);
86+
offer?.applicants?.some((applicant) => applicant?.user === profile._id || applicant?.user?._id === profile?._id || applicant?.user?.toString() === profile?._id);
8787

8888
const getCandidates = async () => {
8989
const data = await getCandidatesByOfferId(id, localStorage.getItem("token"));
@@ -111,6 +111,8 @@ export const OfferInfoPage = () => {
111111
fetchOffer();
112112
}, [id]);
113113

114+
115+
114116
const handleApplyModal = (e) => {
115117
e.stopPropagation();
116118
if (!token) {
@@ -121,6 +123,11 @@ export const OfferInfoPage = () => {
121123
setIsOpenApplyModal(true);
122124
};
123125

126+
const handleApplySuccess = (updatedOffer) => {
127+
console.log("Offer applied successfully:", updatedOffer);
128+
setOffer(updatedOffer);
129+
};
130+
124131
const colors = {
125132
pending: "bg-blue-500",
126133
reviewed: "bg-purple-500",
@@ -315,6 +322,7 @@ export const OfferInfoPage = () => {
315322
setIsOpen={setIsOpenApplyModal}
316323
token={token}
317324
handleApply={handleApplyModal}
325+
onApplySuccess={handleApplySuccess}
318326
/>
319327
)}
320328
</SectionContainer>

src/layout/chat/components/ChatScreen.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ export const ChatScreen = ({ onClose, messages, messageEndRef, userSelected, onl
3535
key={message._id}
3636
className={`chat ${message.senderId === profile._id ? "chat-end" : "chat-start"} `}
3737
ref={messageEndRef}>
38-
<div className="chat-image avatar border rounded-full border-neutral-50">
38+
<div className="chat-image ">
3939
{
4040
message.senderId === profile._id
41-
? <AvatarImage user={profile} width={8} /> || "/avatar.png"
41+
? <AvatarImage classProps={""} user={profile} width={8} /> || "/avatar.png"
4242
: <AvatarImage user={userSelected} width={8} /> || "/avatar.png"
4343
}
4444
</div>

src/layout/components/Navbar.jsx

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Link } from "react-router"
22
import logo from '../../assets/CodepplyLogo.svg'
3-
import { PiBriefcase, PiStack, PiUsers } from "react-icons/pi"
3+
import { PiBriefcase, PiList, PiStack, PiUsers } from "react-icons/pi"
44
import favicon from '../../assets/CodepplyFly.svg'
55

66

@@ -13,34 +13,23 @@ export const Navbar = () => {
1313
aria-label='open sidebar'
1414
className='btn btn-square btn-ghost'
1515
>
16-
<svg
17-
xmlns='http://www.w3.org/2000/svg'
18-
fill='none'
19-
viewBox='0 0 24 24'
20-
className='inline-block h-6 w-6 stroke-current'
21-
>
22-
<path
23-
strokeLinecap='round'
24-
strokeLinejoin='round'
25-
strokeWidth='2'
26-
d='M4 6h16M4 12h16M4 18h16'
27-
></path>
28-
</svg>
16+
<PiList className="text-3xl"/>
17+
2918
</label>
3019
</div>
3120
<Link
3221
to={"/"}
33-
className='mr-4 pr-4 flex items-center'
22+
className='mr-4 flex items-center'
3423
>
3524
<img
3625
src={logo}
3726
alt='Codepply Logo'
38-
className='h-6 ml-3 sm:hidden md:block '
27+
className='h-6 hidden md:block '
3928
/>
4029
<img
4130
src={favicon}
4231
alt='Codepply Logo'
43-
className='h-6 ml-3 hidden sm:block md:hidden'
32+
className='h-6 mx-4 sm:block md:hidden'
4433
/>
4534
</Link>
4635
<div className='hidden flex-none sm:flex'>

0 commit comments

Comments
 (0)