Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update hiring status in mongodb db and change button behaviour #194

Merged
merged 4 commits into from
May 27, 2024

Conversation

rasikaghadge
Copy link
Owner

No description provided.

@rasikaghadge rasikaghadge requested a review from Suraj1089 May 24, 2024 04:46
@@ -14,6 +14,7 @@ router.patch("/update/:id", auth, updateMeeting);

// TODO: add super admin middleware
router.patch("/update", updateAllInterviews);
router.patch("/hiring/:id", updateHiringStatus);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only hr can update the hiring status

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated accordingly

const updatedMeetingResponse = await Interview.findByIdAndUpdate(
meetingId,
updatedMeeting,
{ new: true }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why new - true?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new: This is a boolean-type option. If true, return the modified document rather than the original.

@@ -15,7 +17,11 @@ const parseEvaluationText = (text) => {
};

const EvaluationPopup = ({ evaluationData, onClose, interviewDetails }) => {
console.log("interviewDetails", interviewDetails)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove log

let parsedEvaluationData = {};
const dispatch = useDispatch();
const [currentHiringStatus, setCurrentHiringStatus] =
useState("Decision Pending");

const sendHiringStatusEmail = (hiringDecision) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please update this function. get url from .env instead of hardcode.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getting from env is not working in my machine, i am hardcoding in client/src/api/index.js

@@ -54,6 +54,7 @@ export const getMeeting = (id) => API.get(`/interviews/${id}`);
// export const scheduleMeeting = (meetingData) => API.post('/schedule', meetingData);
export const scheduleMeeting = (formData) => API.post(`/interviews/schedule`, formData);
export const changeMeetingStatus = (id, status) => API.patch(`/interviews/update/${id}`, status);
export const changeInterviewHiringStatus = (id, status) => API.patch(`/interviews/hiring/${id}`, status);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we will need another route. can try with /update/{id} route and check if it is working or not?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will work, but require changes in the update controller. So i don think we should do it now

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. You can merge it.

@rasikaghadge rasikaghadge merged commit 57b894c into main May 27, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants