From d5524a8d677e0d33dddbe91ed792e086bb71f7b3 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Sat, 19 Aug 2023 12:24:13 +0530 Subject: [PATCH] feat: registration information in class student --- .../doctype/class_student/class_student.json | 51 +++++++++++++++---- lms/lms/doctype/lms_class/lms_class.js | 4 +- 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/lms/lms/doctype/class_student/class_student.json b/lms/lms/doctype/class_student/class_student.json index 302f602f..390ad523 100644 --- a/lms/lms/doctype/class_student/class_student.json +++ b/lms/lms/doctype/class_student/class_student.json @@ -7,30 +7,63 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ - "class_student", - "student" + "student", + "student_name", + "username", + "column_break_zvlp", + "address", + "amount", + "currency" ], "fields": [ { "fieldname": "student", "fieldtype": "Link", - "hidden": 1, + "reqd": 1, "label": "Student", "options": "User" }, { - "fieldname": "class_student", - "fieldtype": "Link", + "fetch_from": "student.full_name", + "fieldname": "student_name", + "fieldtype": "Data", "in_list_view": 1, - "label": "Class Student", - "options": "Class Student Registration", - "reqd": 1 + "label": "Student Name", + "read_only": 1 + }, + { + "fetch_from": "student.username", + "fieldname": "username", + "fieldtype": "Data", + "label": "Username", + "read_only": 1 + }, + { + "fieldname": "column_break_zvlp", + "fieldtype": "Column Break" + }, + { + "fieldname": "address", + "fieldtype": "Link", + "label": "Address", + "options": "Address" + }, + { + "fieldname": "amount", + "fieldtype": "Currency", + "label": "Amount" + }, + { + "fieldname": "currency", + "fieldtype": "Link", + "label": "Currency", + "options": "Currency" } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2023-08-18 16:56:34.435008", + "modified": "2023-08-18 19:19:34.701473", "modified_by": "Administrator", "module": "LMS", "name": "Class Student", diff --git a/lms/lms/doctype/lms_class/lms_class.js b/lms/lms/doctype/lms_class/lms_class.js index 342b6ae2..7f3c4299 100644 --- a/lms/lms/doctype/lms_class/lms_class.js +++ b/lms/lms/doctype/lms_class/lms_class.js @@ -3,10 +3,10 @@ frappe.ui.form.on("LMS Class", { onload: function (frm) { - frm.set_query("class_student", "students", function (doc) { + frm.set_query("student", "students", function (doc) { return { filters: { - class_name: doc.name, + ignore_user_type: 1, }, }; });