Skip to content

Commit

Permalink
fix: consider only submited shift assignments while validating distance
Browse files Browse the repository at this point in the history
  • Loading branch information
krantheman committed Oct 10, 2024
1 parent 57d0394 commit 61add67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions hrms/hr/doctype/employee_checkin/employee_checkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def validate_distance_from_shift_location(self):
"shift_type": self.shift,
"start_date": ["<=", self.time],
"shift_location": ["is", "set"],
"docstatus": 1,
},
or_filters=[["end_date", ">=", self.time], ["end_date", "is", "not set"]],
pluck="shift_location",
Expand Down
4 changes: 1 addition & 3 deletions hrms/hr/doctype/shift_location/shift_location.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ frappe.ui.form.on("Shift Location", {
"allow_geolocation_tracking",
);

if (!allow_geolocation_tracking) {
if (!allow_geolocation_tracking)
hide_field([
"checkin_radius",
"fetch_geolocation",
"latitude",
"longitude",
"geolocation",
]);
return;
}
},

fetch_geolocation: (frm) => {
Expand Down

0 comments on commit 61add67

Please sign in to comment.