diff --git a/hrms/hr/doctype/shift_assignment/shift_assignment.json b/hrms/hr/doctype/shift_assignment/shift_assignment.json index 12f8e83bd5..62f98943b1 100644 --- a/hrms/hr/doctype/shift_assignment/shift_assignment.json +++ b/hrms/hr/doctype/shift_assignment/shift_assignment.json @@ -7,17 +7,21 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ + "employee_details_section", "employee", "employee_name", - "shift_type", - "status", - "schedule", "column_break_3", "company", + "department", + "shift_details_section", + "shift_type", + "shift_location", + "status", + "column_break_brkq", "start_date", "end_date", "shift_request", - "department", + "schedule", "amended_from" ], "fields": [ @@ -60,6 +64,7 @@ "fieldtype": "Column Break" }, { + "fetch_from": "employee.company", "fieldname": "company", "fieldtype": "Link", "label": "Company", @@ -103,6 +108,26 @@ "label": "Status", "options": "Active\nInactive" }, + { + "fieldname": "employee_details_section", + "fieldtype": "Section Break", + "label": "Employee Details" + }, + { + "fieldname": "shift_details_section", + "fieldtype": "Section Break", + "label": "Shift Details" + }, + { + "fieldname": "shift_location", + "fieldtype": "Link", + "label": "Shift Location", + "options": "Shift Location" + }, + { + "fieldname": "column_break_brkq", + "fieldtype": "Column Break" + }, { "fieldname": "schedule", "fieldtype": "Link", @@ -113,7 +138,7 @@ ], "is_submittable": 1, "links": [], - "modified": "2024-05-31 16:41:32.869130", + "modified": "2024-07-04 14:30:40.840689", "modified_by": "Administrator", "module": "HR", "name": "Shift Assignment", @@ -162,4 +187,4 @@ "states": [], "title_field": "employee_name", "track_changes": 1 -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/shift_location/__init__.py b/hrms/hr/doctype/shift_location/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/hrms/hr/doctype/shift_location/shift_location.js b/hrms/hr/doctype/shift_location/shift_location.js new file mode 100644 index 0000000000..877c81c0a4 --- /dev/null +++ b/hrms/hr/doctype/shift_location/shift_location.js @@ -0,0 +1,8 @@ +// Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +// frappe.ui.form.on("Shift Location", { +// refresh(frm) { + +// }, +// }); diff --git a/hrms/hr/doctype/shift_location/shift_location.json b/hrms/hr/doctype/shift_location/shift_location.json new file mode 100644 index 0000000000..6df8f26ed9 --- /dev/null +++ b/hrms/hr/doctype/shift_location/shift_location.json @@ -0,0 +1,114 @@ +{ + "actions": [], + "allow_rename": 1, + "autoname": "field:location_name", + "creation": "2024-07-04 12:12:26.894513", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "location_name", + "checkin_radius", + "column_break_dlgd", + "latitude", + "longitude", + "section_break_xxli", + "geolocation" + ], + "fields": [ + { + "fieldname": "location_name", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Location Name", + "reqd": 1, + "unique": 1 + }, + { + "description": "Radius within which check-in is allowed (in meters)", + "fieldname": "checkin_radius", + "fieldtype": "Int", + "label": "Checkin Radius" + }, + { + "fieldname": "column_break_dlgd", + "fieldtype": "Column Break" + }, + { + "fieldname": "longitude", + "fieldtype": "Float", + "label": "Longitude" + }, + { + "fieldname": "section_break_xxli", + "fieldtype": "Section Break" + }, + { + "fieldname": "geolocation", + "fieldtype": "Geolocation", + "label": "Geolocation" + }, + { + "fieldname": "latitude", + "fieldtype": "Float", + "label": "Latitude" + } + ], + "links": [], + "modified": "2024-07-04 12:31:00.609940", + "modified_by": "Administrator", + "module": "HR", + "name": "Shift Location", + "naming_rule": "By fieldname", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + }, + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "HR Manager", + "share": 1, + "write": 1 + }, + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "HR User", + "share": 1, + "write": 1 + }, + { + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Employee", + "share": 1 + } + ], + "quick_entry": 1, + "sort_field": "creation", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/hrms/hr/doctype/shift_location/shift_location.py b/hrms/hr/doctype/shift_location/shift_location.py new file mode 100644 index 0000000000..db41c83498 --- /dev/null +++ b/hrms/hr/doctype/shift_location/shift_location.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class ShiftLocation(Document): + pass diff --git a/hrms/hr/doctype/shift_location/test_shift_location.py b/hrms/hr/doctype/shift_location/test_shift_location.py new file mode 100644 index 0000000000..fb102fc198 --- /dev/null +++ b/hrms/hr/doctype/shift_location/test_shift_location.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt + +# import frappe +from frappe.tests.utils import FrappeTestCase + + +class TestShiftLocation(FrappeTestCase): + pass