Geolocation based Employee Attendance check-in system

can i get your mail id sir
or mail me at aniketkatoch@gmail.com

Hi all,
is there a way to mark attendance as “WFH” (Work from Home), if attendance is marked from any location other than a specified office location?

Add location_html field as well


i have this issue

Hi,
If i make the longitude and latitude fields mandatory, i get this error.
Permission level is 1 so that employees can only read it and not edit/write.

@sameer55chauhan this code is work but only (http://127.0.0.1:8007)
but when i run this code in http://0.0.0.0:8007
positionError show can plz help on that

Hello @sameer55chauhan
I tried your solution of a Geolocation based employee attendance check-in system. But I want the Location Of the current device in which the employee checked in but I have a bug in that all employees’ check-in or check-out log gets the same location.
Thank you

I was able to implement this using IP Address and Geo-Location combination. Using either as a failover. It is part of a larger custom app so I can’t share the app itself but if you’re interested I can share the code with you.

may you share to me also?

Good day

Is there a way to implement / activate the Geolocation Code via Server Script (Python)?

I have tried it in the Client Script (JavaScript) and it’s working well, however, I need the Geolocation of the Employees on an hourly basis. I tried the Scheduler Event but it didn’t activate the Client Script (JavaScript) code for the Geolocation.

Can someone please help me with issue?

1 Like

Yes, We have the Attendance based on Geo location.

Attendance would be marked if the employee is available within 200meter so check-in would be worked.

I’m not quite sure we are on the same page here.

The GPS Coordinates and the Google Maps are working just well, if created manually by the User only.
However, what I need is to create a new Employee Checkin every hour automatically without the User’s interference, therefore, I made the Scheduler Event and as I said before it doesn’t work…

1 Like

Yes you can the scheduling to make the Checkin every hour and also check the lati and lang while checkin

This is the code that I used for the Scheduler Event:

check = frappe.get_doc({
'doctype': 'Employee Checkin',
'employee': 'EMP/00091',
'log_type': 'IN'
})
# check.run_method('onload')
# check.queue_action('onload')
check. Save()

I tried many versions and different codes and nothing worked.
P.S: I am a novice at programming. Also, this code is test out if the GPS will work or not, after it works I will include the rest of the Employees in the code.

Can you help me with the right code that will activate the GPS based on the Scheduler Event?

The scheduler is fine. you need to add the validation in GPS Script.

@dineshpanchal432
I put the GPS Script code in the validation as well as the onload, and still the GPS Coordinates are not fetched.

@Mohd_RTC21 did you change the API Key? in the script

No I haven’t.

Can you show me how and what to change it to?

in that script only you have to take the Gooogle maps API key from the Google console ( GCP ) and enter into the script

1 Like