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: Show better alert on fetch shift if no shift is found (backport #2712) #2713

Merged
merged 1 commit into from
Jan 28, 2025
Merged
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
23 changes: 15 additions & 8 deletions hrms/hr/doctype/employee_checkin/employee_checkin.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,21 @@ frappe.ui.form.on("Employee Checkin", {
freeze: true,
freeze_message: __("Fetching Shift"),
callback: function () {
frm.dirty();
frm.save();
frappe.show_alert({
message: __("Shift has been successfully updated to {0}.", [
frm.doc.shift,
]),
indicator: "green",
});
if (frm.doc.shift) {
frappe.show_alert({
message: __("Shift has been successfully updated to {0}.", [
frm.doc.shift,
]),
indicator: "green",
});
frm.dirty();
frm.save();
} else {
frappe.show_alert({
message: __("No valid shift found for log time"),
indicator: "orange",
});
}
},
});
});
Expand Down
Loading