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

fix: Submit Feedback button in interview #2412

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions hrms/hr/doctype/interview/interview.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,22 @@ frappe.ui.form.on("Interview", {
);

if (allow_feedback_submission) {
frm.page.set_primary_action(__("Submit Feedback"), () => {
frm.trigger("submit_feedback");
});
frappe.db
Copy link
Member

@ruchamahabal ruchamahabal Dec 4, 2024

Choose a reason for hiding this comment

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

Interview Feedback can be submitted by multiple interviewers. This just checks for a single feedback. So even if 1 interviewer has submitted the feedback, the next one won't see a button at all. Should also check if submitted feedback's interviewer is the session user.

.get_value(
"Interview Feedback",
{
interview: frm.doc.name,
docstatus: 1,
},
"name",
)
.then((feedback) => {
if (!feedback.message || Object.keys(feedback.message).length === 0) {
frm.page.set_primary_action(__("Submit Feedback"), () => {
frm.trigger("submit_feedback");
});
}
});
} else {
const button = frm.add_custom_button(__("Submit Feedback"), () => {
frm.trigger("submit_feedback");
Expand Down
Loading