mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 22:49:19 +00:00
feat: Add logic to auto fetch skill from designation doc
- Set today as default evaluation date
This commit is contained in:
@@ -87,6 +87,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"default": "Today",
|
||||||
"fetch_if_empty": 0,
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "evaluation_date",
|
"fieldname": "evaluation_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
@@ -155,7 +156,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2019-04-16 10:12:40.106070",
|
"modified": "2019-04-16 11:33:05.055948",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "HR",
|
"module": "HR",
|
||||||
"name": "Employee Skill",
|
"name": "Employee Skill",
|
||||||
|
|||||||
@@ -5,4 +5,17 @@ frappe.ui.form.on('Employee Skill Map', {
|
|||||||
// refresh: function(frm) {
|
// refresh: function(frm) {
|
||||||
|
|
||||||
// }
|
// }
|
||||||
|
designation: (frm) => {
|
||||||
|
frm.set_value('employee_skills', null);
|
||||||
|
if (frm.doc.designation) {
|
||||||
|
frappe.db.get_doc('Designation', frm.doc.designation).then((designation) => {
|
||||||
|
designation.skills.forEach(designation_skill => {
|
||||||
|
let row = frappe.model.add_child(frm.doc, 'Employee Skill', 'employee_skills');
|
||||||
|
row.skill = designation_skill.skill;
|
||||||
|
row.proficiency = 1;
|
||||||
|
});
|
||||||
|
refresh_field('employee_skills');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -157,7 +157,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"fetch_if_empty": 0,
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "employee_skill",
|
"fieldname": "employee_skills",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
@@ -166,7 +166,7 @@
|
|||||||
"in_global_search": 0,
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Employee Skill",
|
"label": "Employee Skills",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Employee Skill",
|
"options": "Employee Skill",
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2019-04-16 10:15:18.634977",
|
"modified": "2019-04-16 11:19:49.189166",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "HR",
|
"module": "HR",
|
||||||
"name": "Employee Skill Map",
|
"name": "Employee Skill Map",
|
||||||
|
|||||||
Reference in New Issue
Block a user