Skip to content

Commit

Permalink
fix: fetch shift even if previous shift is not the same as current shift
Browse files Browse the repository at this point in the history
  • Loading branch information
asmitahase committed Jan 27, 2025
1 parent 93dda89 commit 3871947
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions hrms/hr/doctype/employee_checkin/employee_checkin.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@ frappe.ui.form.on("Employee Checkin", {
add_fetch_shift_button(frm) {
if (frm.doc.attendace) return;
frm.add_custom_button(__("Fetch Shift"), function () {
const previous_shift = frm.doc.shift;
frappe.call({
method: "fetch_shift",
doc: frm.doc,
freeze: true,
freeze_message: __("Fetching Shift"),
callback: function () {
if (previous_shift === frm.doc.shift) return;
frm.dirty();
frm.save();
frappe.show_alert({
Expand Down

0 comments on commit 3871947

Please sign in to comment.