fix: Employee field should be filtered based on department on doctype Instructor  (#20705)

* Fix: Filtered Employee based on Department on Instructor doctype (#20598)

* Fix: Syntax error (#20598)

* Fix: Syntax error (#20598)

* Fix: Syntax error (#20598)

* Fix: Syntax error (#20598)

* fix :  Filtered Employee based on Department on Instructor doctype (#20704)
diff --git a/erpnext/education/doctype/instructor/instructor.js b/erpnext/education/doctype/instructor/instructor.js
index 71e044b..69bd2cf 100644
--- a/erpnext/education/doctype/instructor/instructor.js
+++ b/erpnext/education/doctype/instructor/instructor.js
@@ -12,7 +12,6 @@
 					}
 				};
 			});
-
 			frm.set_query("department", "instructor_log", function() {
 				return {
 					"filters": {
@@ -49,5 +48,12 @@
 				frappe.set_route("List", "Assessment Plan");
 			}, __("Assessment Plan"));
 		}
+		frm.set_query("employee", function(doc) {
+			return {
+				"filters": {
+					"department": doc.department,
+				}
+			};
+		});
 	}
-});
+});
\ No newline at end of file