ソースを参照

applicant details page

pull/94/head
Dzenis Hadzifejzovic 3年前
コミット
bbeff3951b

+ 155
- 44
src/assets/styles/components/_candidatePage.scss ファイルの表示

margin-left: 18px; margin-left: 18px;
} }


.comment-send-btn-responsive {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
background: #ffffff;
border: 1px solid #226cb0;
border-radius: 9px;
border: 1px solid #226cb0;
margin-left: 18px;
width: 54px;
height: 54px;
}

.comment-send-btn:hover { .comment-send-btn:hover {
cursor: pointer; cursor: pointer;
} }


.comment-send-btn-responsive:hover {
cursor: pointer;
}

.comment-send-btn-responsive img {
margin: 0;
}

.comment-send-btn p { .comment-send-btn p {
width: 62px; width: 62px;
height: 15px; height: 15px;
height: 12px; height: 12px;
} }


.comment-send-btn-responsive img {
width: 12px;
height: 12px;
}

.candidate-users { .candidate-users {
background-color: #f4f4f4; background-color: #f4f4f4;
} }


.comment-input { .comment-input {
@extend .tagStyle; @extend .tagStyle;
width: 368px;
min-width: 368px;
max-width: 368px;
} }



.comment-input ::placeholder {
.comment-input::placeholder {
height: 20px; height: 20px;
font-family: "Source Sans Pro"; font-family: "Source Sans Pro";
font-style: italic; font-style: italic;
line-height: 20px; line-height: 20px;
color: #9d9d9d; color: #9d9d9d;
flex: none; flex: none;
order: 0;
flex-grow: 0;
} }


.comment-input-list{
.comment-input-list {
@extend .tagStyle; @extend .tagStyle;
} }


max-width: 400px; max-width: 400px;
} }


.comment-container-header {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 600;
font-size: 18px;
line-height: 32px;
letter-spacing: 0.02em;
color: #272727;
}

.proba {
display: flex;
align-items: center;
margin-top: 18px;
}

@media only screen and (max-width: 930px) { @media only screen and (max-width: 930px) {
.comment-container { .comment-container {
width:500px;
width: 500px;
} }
.comment-input{
.comment-input {
width: 250px; width: 250px;
} }


.comment-message-con{
.comment-message-con {
max-width: 300px; max-width: 300px;
} }
} }


@media only screen and (max-width: 820px) { @media only screen and (max-width: 820px) {
.comment-container { .comment-container {
width:400px;
};
width: 400px;
}


.comment-input{
.comment-input {
width: 170px; width: 170px;
} }
.comment-message-con{
.comment-message-con {
max-width: 200px; max-width: 200px;
} }
.comment-send-btn{
.comment-send-btn {
width: 90; width: 90;
padding: 10px 20px; padding: 10px 20px;
};
.send-comment-sub-container{
}
.send-comment-sub-container {
height: 45px; height: 45px;
margin-bottom: 20px
};
.comment-input ::placeholder{
margin-bottom: 20px;
}
.comment-input ::placeholder {
font-size: 14px; font-size: 14px;
line-height: 18px; line-height: 18px;
padding-top:2px;
padding-top: 2px;
} }
} }


@media only screen and (max-width: 700px) { @media only screen and (max-width: 700px) {
.comment-container { .comment-container {
width:380px;
width: 380px;
} }
.comment-message-con{
.comment-message-con {
max-width: 180px; max-width: 180px;
} }
.comment-send-btn{
.comment-send-btn {
width: 110; width: 110;
padding: 10px 20px; padding: 10px 20px;
};
}
} }


@media only screen and (max-width:680px) {
.content-candidate-container{
@media only screen and (max-width: 680px) {
.content-candidate-container {
flex-direction: column; flex-direction: column;
} }
.comment-container { .comment-container {
} }
} }


@media only screen and (max-width:540px) {
.candidate-header{
@media only screen and (max-width: 540px) {
.candidate-header {
height: 30px; height: 30px;
font-family: Source Sans Pro; font-family: Source Sans Pro;
font-size: 30px; font-size: 30px;
line-height: 30px; line-height: 30px;
} }


.candidate-lower-header{
.candidate-lower-header {
font-size: 18px; font-size: 18px;
line-height: 26px; line-height: 26px;
} }
} }
} }


@media only screen and (max-width:480px) {
@media only screen and (max-width: 480px) {
.comment-container { .comment-container {
width:297px;
width: 297px;
} }


.comment-input{
.comment-input {
width: 100px; width: 100px;
} }


.comment-input ::placeholder{
.comment-input::placeholder {
font-size: 12px; font-size: 12px;
line-height: 15px; line-height: 15px;
padding-top:-2px;
padding-top: -2px;
} }


.comment-message-con{
.comment-message-con {
max-width: 130px; max-width: 130px;
} }
.comment-send-btn{
.comment-send-btn {
padding: 5px 5px; padding: 5px 5px;
};
.comment-container{
}
.comment-container {
padding: 20px; padding: 20px;
} }


.candidate-header{
.candidate-header {
height: 20x; height: 20x;
font-size: 20px; font-size: 20px;
line-height: 20px; line-height: 20px;
} }


.candidate-lower-header{
.candidate-lower-header {
font-size: 17px; font-size: 17px;
line-height:17px;
line-height: 17px;
}
}

@media only screen and (max-width: 361px) {
.comment-input {
@extend .tagStyle;
min-width: 195px;
max-width: 195px;
height: 54px;
}

.comment-send-btn {
width: fit-content;
}

.comment-input::placeholder {
font-size: 10px;
line-height: 12px;
padding: 14px;
}

.comment-container {
width: 300px;
padding-left: 18px;
}

.content-candidate-container {
justify-content: initial;
}

.proba {
flex-direction: column-reverse;
align-items: flex-start;
}
.slick-list {
padding-left: 0 !important;
}

.applicant-ads-back-button {
font-size: 14px;
line-height: 16px;
letter-spacing: 0em;
}

.applicant-cv-button {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 18px 72px;
gap: 10px;
background: #226cb0;
border-radius: 9px;
width: 212px;
height: 51px;
font-family: "Source Sans Pro";
font-weight: 600;
font-size: 12px;
line-height: 15px;
letter-spacing: 0.04em;
text-transform: uppercase;
color: #ffffff;
} }
}

.applicant-cv-button {
padding: 18px 45px;
width: 158px;
height: 51px;
}

.active-ads-ads-arrows{
margin-left: -0.75rem;
}
}

+ 5
- 5
src/assets/styles/components/_candidatesPage.scss ファイルの表示

margin-top: 79px; margin-top: 79px;
} }


.left-move-candidateAd {
margin-left: 27px;
}

.filter-date-container { .filter-date-container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-top: 5px; margin-top: 5px;
} }


.left-move-candidateAd {
margin-left: -0.75rem !important;
}

@media only screen and (max-width: 600px) { @media only screen and (max-width: 600px) {
.ads-candidates-title { .ads-candidates-title {
font-size: 18px; font-size: 18px;
.ads-candidates-numberOfApplicants { .ads-candidates-numberOfApplicants {
font-size: 14px; font-size: 14px;
} }
}
}

+ 60
- 32
src/pages/CandidatesPage/CandidateDetailsPage.js ファイルの表示

let { id } = useParams(); let { id } = useParams();
const messageContainer = useRef(); const messageContainer = useRef();
const theme = useTheme(); const theme = useTheme();
const matches = useMediaQuery(theme.breakpoints.down("680"));
const matches = useMediaQuery(theme.breakpoints.down("361"));
const adsSliderRef = useRef(); const adsSliderRef = useRef();
const [showDelete, setDelete] = useState(false); const [showDelete, setDelete] = useState(false);
const [usersToNotify, setUsersToNotify] = useState([]); //emails of users whic we need to notify
const [usersToNotify, setUsersToNotify] = useState([]); //emails of users which are taged in comment


useEffect(() => { useEffect(() => {
dispatch(fetchCandidate({ id })); dispatch(fetchCandidate({ id }));
return newArray; return newArray;
}; };


const isThereUserAlready = (email) => {
let indicator = usersToNotify.filter((k) => k === email);
return indicator.length > 0;
};

const tranformDisplay = (id, display) => { const tranformDisplay = (id, display) => {
let user = users.filter((u) => u.id === id); let user = users.filter((u) => u.id === id);
if (user[0] !== undefined) { if (user[0] !== undefined) {
setUsersToNotify((current) => [...current, user[0].email]);
if (!isThereUserAlready(user[0].email)) {
setUsersToNotify((current) => [...current, user[0].email]);
}
} }
return display + " "; return display + " ";
}; };
}) })
); );


setUsersToNotify([]);
setInputValue(""); setInputValue("");
}; };


}; };


const makeCommentForSending = (comment) => { const makeCommentForSending = (comment) => {
let k = comment.replaceAll("[", "<span style='color:blue'>");
let k = comment.replaceAll("[", "<span style='color:#226CB0'>");
let t = k.replaceAll("]", "</span> "); let t = k.replaceAll("]", "</span> ");
let n = "<p>" + t + "</p>"; let n = "<p>" + t + "</p>";
return n; return n;
onKeyUp={handleOnKeyUp} onKeyUp={handleOnKeyUp}
className="comment-input" className="comment-input"
placeholder={"ex. Odlican kandidat"} placeholder={"ex. Odlican kandidat"}
customSuggestionsContainer={(children) => (
<div
style={{
display: "flex",
flexDirection: "column",
gap: 5,
marginLeft: 3,
}}
>
{children}
</div>
)}
style={{ style={{
input: !matches
? { padding: 18, borderRadius: 7 }
: { padding: 9, borderRadius: 5 },
control: !matches
? {
padding: 18,
color: "#fff",
suggestions: { list: { backgroundColor: "#F4F4F4" } },
}
: {
padding: 9,
color: "#fff",
suggestions: { list: { backgroundColor: "#F4F4F4" } },
},
input: {
overflow: "auto",
height: "100%",
padding: 17,
},
highlighter: {
boxSizing: "border-box",
overflow: "hidden",
padding: 17,
height: 56,
},
}} }}
> >
<Mention <Mention
tranformDisplay(id, display) tranformDisplay(id, display)
} }
markup="[__display__]" markup="[__display__]"
style={{ highlighter: { padding: 15, borderRadius: 7 } }}
style={{ color: "#226CB0", overflow: "hidden" }}
/> />
</MentionsInput> </MentionsInput>
<div className="comment-send-btn" onClick={sendComment}>
<img
src={planeImage}
alt="plane"
className="candidates-image"
/>
<p>Komentar</p>
</div>
{!matches ? (
<div className="comment-send-btn" onClick={sendComment}>
<img
src={planeImage}
alt="plane"
className="candidates-image"
/>
<p>Komentar</p>
</div>
) : (
<div
className="comment-send-btn-responsive"
onClick={sendComment}
>
<img
src={planeImage}
alt="plane"
className="candidates-image"
/>
</div>
)}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div className="applicant-ads-container"> <div className="applicant-ads-container">
<p>Sve prijave</p> <p>Sve prijave</p>
<div
style={{ display: "flex", alignItems: "center", marginTop: "18px" }}
>
<div className="proba">
<div> <div>
{candidate.ads.length > 5 && (
{(matches ? candidate.ads.length > 1 : candidate.ads.length > 5) && (
<div className="active-ads-ads-arrows"> <div className="active-ads-ads-arrows">
<button onClick={activeAdsArrowLeftHandler}> <button onClick={activeAdsArrowLeftHandler}>
<img src={arrow_left} alt="arrow-left" /> <img src={arrow_left} alt="arrow-left" />
add={add} add={add}
key={index} key={index}
onclick={() => navigateToDetailsPage(add.id)} onclick={() => navigateToDetailsPage(add.id)}
className={index === 0 ? "" : "left-move-candidateAd"}
className={(matches === true || candidate.ads.length <= 5) && index === 0 ? "left-move-candidateAd" : "" }
/> />
))} ))}
{candidate.ads.length <= 5 && getDummyAds(candidate.ads.length)} {candidate.ads.length <= 5 && getDummyAds(candidate.ads.length)}

+ 15
- 14
src/pages/SchedulePage/SchedulePage.js ファイルの表示

import React, { useState,useEffect } from "react";
import React, { useState, useEffect } from "react";
import DayComponent from "../../components/Schedules/DayComponent"; import DayComponent from "../../components/Schedules/DayComponent";
import arrowRight from "../../assets/images/arrow_right.png"; import arrowRight from "../../assets/images/arrow_right.png";
import arrowLeft from "../../assets/images/arrow_left2.png"; import arrowLeft from "../../assets/images/arrow_left2.png";
}; };


const goBackOneMonth = () => { const goBackOneMonth = () => {
dispatch(
fetchSchedule({
month: currentMonth - 1 === -1 ? 12 : currentMonth,
year: currentMonth - 1 === -1 ? currentYear - 1 : currentYear,
})
);
setNumberOfDaysInMonth( setNumberOfDaysInMonth(
new Date( new Date(
currentMonth - 1 === -1 ? currentYear - 1 : currentYear, currentMonth - 1 === -1 ? currentYear - 1 : currentYear,
0 0
).getDate() ).getDate()
); );
dispatch(
fetchSchedule({
month: currentMonth - 1 === -1 ? 12 : currentMonth,
year: currentMonth - 1 === -1 ? currentYear - 1 : currentYear,
})
);
if (currentMonth - 1 === -1) { if (currentMonth - 1 === -1) {
setCurrentMonth(11); setCurrentMonth(11);
setCurrentYear(currentYear - 1); setCurrentYear(currentYear - 1);
}; };


const goForwardOneMonth = () => { const goForwardOneMonth = () => {
console.log(currentMonth)
dispatch(
fetchSchedule({
month: currentMonth - 1 === -1 ? 12 : currentMonth + 2,
year: currentMonth - 1 === -1 ? currentYear - 1 : currentYear,
})
);
setNumberOfDaysInMonth( setNumberOfDaysInMonth(
new Date( new Date(
currentMonth + 1 === 12 ? currentYear + 1 : currentYear, currentMonth + 1 === 12 ? currentYear + 1 : currentYear,
0 0
).getDate() ).getDate()
); );
dispatch(
fetchSchedule({
month: currentMonth - 1 === -1 ? 12 : currentMonth,
year: currentMonth - 1 === -1 ? currentYear - 1 : currentYear,
})
);
if (currentMonth + 1 === 12) { if (currentMonth + 1 === 12) {
setCurrentMonth(0); setCurrentMonth(0);
setCurrentYear(currentYear + 1); setCurrentYear(currentYear + 1);
setCurrentMonth(currentMonth + 1); setCurrentMonth(currentMonth + 1);
} }
}; };
return ( return (
<div className="schedule-page-container pl-144 pt-36px"> <div className="schedule-page-container pl-144 pt-36px">
<DayDetailsComponent <DayDetailsComponent

読み込み中…
キャンセル
保存