-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from navariltd/develop2
Develop2
- Loading branch information
Showing
10 changed files
with
444 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
56 changes: 56 additions & 0 deletions
56
..._cams_biometric/cams_biometric/doctype/cams_biometric_settings/cams_biometric_settings.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// Copyright (c) 2024, Navari Limited and contributors | ||
// For license information, please see license.txt | ||
|
||
frappe.ui.form.on("Cams Biometric Settings", { | ||
refresh(frm) { | ||
|
||
frm.add_custom_button(__('Load Punchlog'), function() { | ||
let d = new frappe.ui.Dialog({ | ||
title: 'Load Punchlog', | ||
fields: [ | ||
{ | ||
label: 'Biometric ID', | ||
fieldname: 'user_id', | ||
fieldtype: 'Data', | ||
reqd: 1 | ||
}, | ||
{ | ||
label: 'Start Date', | ||
fieldname: 'start_date', | ||
fieldtype: 'Date', | ||
reqd: 1 | ||
}, | ||
{ | ||
label: 'End Date', | ||
fieldname: 'end_date', | ||
fieldtype: 'Date', | ||
reqd: 1 | ||
} | ||
], | ||
primary_action_label: 'Load Punchlogs', | ||
primary_action: function(data) { | ||
d.hide(); | ||
loader.style.display = "block"; | ||
frappe.call({ | ||
method: 'navari_frappehr_biostar.controllers.cams_call.load_punch_logs', | ||
args: { | ||
user_id: data.user_id, | ||
start_date: data.start_date, | ||
end_date: data.end_date | ||
}, | ||
callback: function(r) { | ||
loader.style.display = "none"; | ||
if (r.message) { | ||
frappe.msgprint(r.message); | ||
} | ||
} | ||
}); | ||
} | ||
}); | ||
d.show(); | ||
}).addClass("btn-primary"); | ||
}, | ||
|
||
|
||
}); | ||
|
63 changes: 63 additions & 0 deletions
63
...ams_biometric/cams_biometric/doctype/cams_biometric_settings/cams_biometric_settings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"actions": [], | ||
"allow_rename": 1, | ||
"creation": "2024-07-24 13:06:10.572066", | ||
"doctype": "DocType", | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"auth_token", | ||
"bulk_punchlog_section", | ||
"start_date", | ||
"column_break_jipe", | ||
"end_date" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "auth_token", | ||
"fieldtype": "Data", | ||
"label": "Auth Token" | ||
}, | ||
{ | ||
"fieldname": "bulk_punchlog_section", | ||
"fieldtype": "Section Break", | ||
"label": "Bulk Punchlog" | ||
}, | ||
{ | ||
"fieldname": "start_date", | ||
"fieldtype": "Date", | ||
"label": "Start Date" | ||
}, | ||
{ | ||
"fieldname": "column_break_jipe", | ||
"fieldtype": "Column Break" | ||
}, | ||
{ | ||
"fieldname": "end_date", | ||
"fieldtype": "Date", | ||
"label": "End Date" | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"issingle": 1, | ||
"links": [], | ||
"modified": "2024-07-24 13:08:05.909310", | ||
"modified_by": "Administrator", | ||
"module": "Cams Biometric", | ||
"name": "Cams Biometric Settings", | ||
"owner": "Administrator", | ||
"permissions": [ | ||
{ | ||
"create": 1, | ||
"delete": 1, | ||
"email": 1, | ||
"print": 1, | ||
"read": 1, | ||
"role": "System Manager", | ||
"share": 1, | ||
"write": 1 | ||
} | ||
], | ||
"sort_field": "modified", | ||
"sort_order": "DESC", | ||
"states": [] | ||
} |
9 changes: 9 additions & 0 deletions
9
..._cams_biometric/cams_biometric/doctype/cams_biometric_settings/cams_biometric_settings.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2024, Navari Limited and contributors | ||
# For license information, please see license.txt | ||
|
||
# import frappe | ||
from frappe.model.document import Document | ||
|
||
|
||
class CamsBiometricSettings(Document): | ||
pass |
9 changes: 9 additions & 0 deletions
9
..._biometric/cams_biometric/doctype/cams_biometric_settings/test_cams_biometric_settings.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2024, Navari Limited and Contributors | ||
# See license.txt | ||
|
||
# import frappe | ||
from frappe.tests.utils import FrappeTestCase | ||
|
||
|
||
class TestCamsBiometricSettings(FrappeTestCase): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
[ | ||
{ | ||
"allow_in_quick_entry": 0, | ||
"allow_on_submit": 0, | ||
"bold": 0, | ||
"collapsible": 0, | ||
"collapsible_depends_on": null, | ||
"columns": 0, | ||
"default": "Fingerprint", | ||
"depends_on": null, | ||
"description": null, | ||
"docstatus": 0, | ||
"doctype": "Custom Field", | ||
"dt": "Employee Checkin", | ||
"fetch_from": null, | ||
"fetch_if_empty": 0, | ||
"fieldname": "custom_input_type", | ||
"fieldtype": "Select", | ||
"hidden": 0, | ||
"hide_border": 0, | ||
"hide_days": 0, | ||
"hide_seconds": 0, | ||
"ignore_user_permissions": 0, | ||
"ignore_xss_filter": 0, | ||
"in_global_search": 0, | ||
"in_list_view": 0, | ||
"in_preview": 0, | ||
"in_standard_filter": 0, | ||
"insert_after": "shift", | ||
"is_system_generated": 0, | ||
"is_virtual": 0, | ||
"label": "Input Type", | ||
"length": 0, | ||
"link_filters": null, | ||
"mandatory_depends_on": null, | ||
"modified": "2024-07-23 17:33:52.761315", | ||
"module": null, | ||
"name": "Employee Checkin-custom_input_type", | ||
"no_copy": 0, | ||
"non_negative": 0, | ||
"options": "\nFingerprint\nFace\nPassword\nCard\nPalm\nFingerVein\nIris\nRetina\nPalm", | ||
"permlevel": 0, | ||
"precision": "", | ||
"print_hide": 0, | ||
"print_hide_if_no_value": 0, | ||
"print_width": null, | ||
"read_only": 0, | ||
"read_only_depends_on": null, | ||
"report_hide": 0, | ||
"reqd": 0, | ||
"search_index": 0, | ||
"show_dashboard": 0, | ||
"sort_options": 0, | ||
"translatable": 1, | ||
"unique": 0, | ||
"width": null | ||
}, | ||
{ | ||
"allow_in_quick_entry": 0, | ||
"allow_on_submit": 0, | ||
"bold": 0, | ||
"collapsible": 0, | ||
"collapsible_depends_on": null, | ||
"columns": 0, | ||
"default": null, | ||
"depends_on": null, | ||
"description": null, | ||
"docstatus": 0, | ||
"doctype": "Custom Field", | ||
"dt": "Employee", | ||
"fetch_from": null, | ||
"fetch_if_empty": 0, | ||
"fieldname": "custom_biometric_registered", | ||
"fieldtype": "Check", | ||
"hidden": 0, | ||
"hide_border": 0, | ||
"hide_days": 0, | ||
"hide_seconds": 0, | ||
"ignore_user_permissions": 0, | ||
"ignore_xss_filter": 0, | ||
"in_global_search": 0, | ||
"in_list_view": 0, | ||
"in_preview": 0, | ||
"in_standard_filter": 0, | ||
"insert_after": "attendance_device_id", | ||
"is_system_generated": 0, | ||
"is_virtual": 0, | ||
"label": "Biometric Registered", | ||
"length": 0, | ||
"link_filters": null, | ||
"mandatory_depends_on": null, | ||
"modified": "2024-07-24 12:00:04.414127", | ||
"module": null, | ||
"name": "Employee-custom_biometric_registered", | ||
"no_copy": 0, | ||
"non_negative": 0, | ||
"options": null, | ||
"permlevel": 0, | ||
"precision": "", | ||
"print_hide": 0, | ||
"print_hide_if_no_value": 0, | ||
"print_width": null, | ||
"read_only": 0, | ||
"read_only_depends_on": null, | ||
"report_hide": 0, | ||
"reqd": 0, | ||
"search_index": 0, | ||
"show_dashboard": 0, | ||
"sort_options": 0, | ||
"translatable": 0, | ||
"unique": 0, | ||
"width": null | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.