HRMS Geo_Fencing

Hello
I want to edit and add a geo fencing to hrms module , I made some steps as
1- Edit in checkpanel.vue to get employee location and store the data in check-in doc type
2-Edit in branch doc type and add the branch coordinates

Now I want to edit in checkpanel.vue to get the employee’s branch then get the branch coordinates but I can’t do this correctly

Can any one help me at this ?

Is there any help please ?

Help plz

Hello
I need help writing code to retrieve the latitude, longitude and radius of the branch in the checkinpanel.vu file
any help in this please
I tried this code but not working with me , it gave me in console Branch Latitude : null & Branch Longitude : null

let branchLatitude = null;
let branchLongitude = null;
let branchRadius = null;
const BRANCH_DOCTYPE = "Branch";

const branch_det = createListResource({
  doctype: BRANCH_DOCTYPE,
  fields: [
    "latitude",
    "longitude",
    "radius", // Include radius field
  ],
  filters: {
    name: employee.data.branch, // Filter by branch name instead of employee
  },
});
branch_det.reload();

// Watch for changes in branch details
watch(branch_det, (value) => {
  if (value && value[0]) {
    branchLatitude = value[0].latitude;
    branchLongitude = value[0].longitude;
    branchRadius = value[0].radius; // Assign branch radius
    console.log("Branch Details:", value[0]);
    console.log("Branch Latitude:", branchLatitude);
    console.log("Branch Longitude:", branchLongitude);
  }
});