Skip to content

Commit

Permalink
Merge pull request #34 from mohaltheeb/develop
Browse files Browse the repository at this point in the history
feat(core): Add a Doctypes for Academic Program
  • Loading branch information
alshalabi-su authored Apr 23, 2024
2 parents 5398837 + f619e6f commit 722d170
Show file tree
Hide file tree
Showing 36 changed files with 750 additions and 152 deletions.
125 changes: 55 additions & 70 deletions academia/academia/doctype/academic_program/academic_program.json
Original file line number Diff line number Diff line change
@@ -1,123 +1,108 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2024-01-22 20:49:49.880733",
"autoname": "field:program_name",
"creation": "2024-04-23 20:31:36.544621",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"section_break_8b0b",
"program_name",
"faculty",
"faculty_department",
"column_break_xbfe",
"column_break_fnia",
"program_abbreviation",
"program_degree",
"section_break_koic",
"total_hours_required_to_award_degree",
"study_language",
"column_break_zw7h",
"starrting_year_of_the_program",
"delivery_mode",
"section_break_46rv",
"study_methods",
"column_break_sksq",
"date_of_programe_development"
"starrting_year_of_program",
"section_break_ljrb",
"courses",
"column_break_cash",
"research_or_thesis"
],
"fields": [
{
"fieldname": "section_break_8b0b",
"fieldtype": "Section Break"
},
{
"fieldname": "program_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Program Name",
"reqd": 1
"reqd": 1,
"translatable": 1,
"unique": 1
},
{
"fieldname": "faculty_department",
"fieldname": "faculty",
"fieldtype": "Link",
"label": "Faculty Department",
"options": "Faculty Department"
},
{
"fieldname": "column_break_xbfe",
"fieldtype": "Column Break"
"in_list_view": 1,
"label": "Faculty",
"options": "Faculty",
"reqd": 1,
"unique": 1
},
{
"fieldname": "program_degree",
"fieldname": "faculty_department",
"fieldtype": "Link",
"label": "Program Degree",
"options": "Program Degree"
},
{
"fieldname": "section_break_koic",
"fieldtype": "Section Break"
"in_list_view": 1,
"label": "Faculty Department",
"options": "Faculty Department",
"reqd": 1,
"unique": 1
},
{
"fieldname": "total_hours_required_to_award_degree",
"fieldtype": "Int",
"label": "Total Hours Required to Award Degree"
"fieldname": "column_break_fnia",
"fieldtype": "Column Break"
},
{
"fieldname": "study_language",
"fieldtype": "Table MultiSelect",
"label": "Study Language",
"options": "Course Language"
"fieldname": "program_abbreviation",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Program Abbreviation",
"reqd": 1,
"unique": 1
},
{
"fieldname": "column_break_zw7h",
"fieldtype": "Column Break"
"fieldname": "program_degree",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Program Degree",
"options": "\nPost-Secondary Diploma\nBachelor's Degree\nPostgraduate Diploma\nMaster Degree\nPHD Degree",
"reqd": 1
},
{
"fieldname": "starrting_year_of_the_program",
"fieldname": "starrting_year_of_program",
"fieldtype": "Date",
"label": "Starrting Year of the Program"
},
{
"fieldname": "delivery_mode",
"fieldtype": "Select",
"label": "Delivery Mode",
"options": "\nOnline\nOffline"
"label": "Starrting Year of Program"
},
{
"fieldname": "section_break_46rv",
"fieldname": "section_break_ljrb",
"fieldtype": "Section Break"
},
{
"fieldname": "study_methods",
"fieldtype": "Link",
"label": "Study Methods",
"options": "Study Method"
"default": "0",
"depends_on": "eval:doc.program_degree == \"Master Degree\";\neval:doc.program_degree == \"PHD Degree\";",
"fieldname": "courses",
"fieldtype": "Check",
"label": "Courses",
"mandatory_depends_on": "eval:doc.program_degree == \"Master Degree\";\neval:doc.program_degree == \"PHD Degree\";"
},
{
"fieldname": "column_break_sksq",
"fieldname": "column_break_cash",
"fieldtype": "Column Break"
},
{
"fieldname": "date_of_programe_development",
"fieldtype": "Date",
"label": "Date of Programe Development"
},
{
"fieldname": "faculty",
"fieldtype": "Link",
"label": "Faculty",
"options": "Faculty"
},
{
"fieldname": "program_abbreviation",
"fieldtype": "Data",
"label": "Program Abbreviation"
"default": "0",
"depends_on": "eval:doc.program_degree == \"Master Degree\";\neval:doc.program_degree == \"PHD Degree\";",
"fieldname": "research_or_thesis",
"fieldtype": "Check",
"label": "Research or Thesis",
"mandatory_depends_on": "eval:doc.program_degree == \"Master Degree\";\neval:doc.program_degree == \"PHD Degree\";"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-01-28 23:36:52.811416",
"modified": "2024-04-23 22:03:51.061637",
"modified_by": "Administrator",
"module": "Academia",
"name": "Academic Program",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
Expand Down
Empty file.
8 changes: 8 additions & 0 deletions academia/academia/doctype/academic_term/academic_term.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (c) 2024, SanU and contributors
// For license information, please see license.txt

// frappe.ui.form.on("Academic Term", {
// refresh(frm) {

// },
// });
77 changes: 77 additions & 0 deletions academia/academia/doctype/academic_term/academic_term.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "field:term_name",
"creation": "2024-04-23 21:32:12.966215",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"term_name",
"faculty",
"disabled",
"academic_year",
"auto_created"
],
"fields": [
{
"fieldname": "term_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Term Name",
"reqd": 1,
"unique": 1
},
{
"fieldname": "faculty",
"fieldtype": "Link",
"label": "Faculty",
"options": "Faculty",
"reqd": 1
},
{
"default": "0",
"fieldname": "disabled",
"fieldtype": "Check",
"label": "Disabled"
},
{
"fieldname": "academic_year",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Academic Year",
"options": "Academic Year",
"reqd": 1
},
{
"default": "0",
"fieldname": "auto_created",
"fieldtype": "Check",
"label": "Auto Created"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-04-23 22:07:08.260080",
"modified_by": "Administrator",
"module": "Academia",
"name": "Academic Term",
"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
}
],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
9 changes: 9 additions & 0 deletions academia/academia/doctype/academic_term/academic_term.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2024, SanU and contributors
# For license information, please see license.txt

# import frappe
from frappe.model.document import Document


class AcademicTerm(Document):
pass
9 changes: 9 additions & 0 deletions academia/academia/doctype/academic_term/test_academic_term.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2024, SanU and Contributors
# See license.txt

# import frappe
from frappe.tests.utils import FrappeTestCase


class TestAcademicTerm(FrappeTestCase):
pass
24 changes: 18 additions & 6 deletions academia/academia/doctype/course/course.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@
"co_requisites",
"course_image",
"column_break_uvaw",
"description"
"description",
"course_details_tab",
"table_rgxb"
],
"fields": [
{
"fieldname":"course_name",
"fieldname": "course_name",
"fieldtype": "Data",
"label": "Course Name",
"reqd": 1,
"unique": 1,
"label": "Course Name"
"unique": 1
},
{
"fieldname": "course_code",
Expand Down Expand Up @@ -65,12 +67,22 @@
"fieldtype": "Table MultiSelect",
"label": "Co Requisites",
"options": "Co Requisites"
},
{
"fieldname": "course_details_tab",
"fieldtype": "Tab Break",
"label": "Course Details"
},
{
"fieldname": "table_rgxb",
"fieldtype": "Table",
"options": "Course Hours"
}
],
"image_field": "course_image",
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-01-23 00:33:52.592851",
"modified": "2024-04-23 21:59:11.579385",
"modified_by": "Administrator",
"module": "Academia",
"name": "Course",
Expand All @@ -93,4 +105,4 @@
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
}
Empty file.
54 changes: 54 additions & 0 deletions academia/academia/doctype/course_hours/course_hours.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "field:hour_type",
"creation": "2024-04-23 21:43:23.728299",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"hour_type",
"course_needed",
"lab_type"
],
"fields": [
{
"fieldname": "hour_type",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Hour Type",
"options": "Hour Type",
"reqd": 1,
"unique": 1
},
{
"fieldname": "course_needed",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Course Needed",
"options": "\nClass\nLab"
},
{
"depends_on": "eval:doc.course_needed == \"Lab\";",
"fieldname": "lab_type",
"fieldtype": "Link",
"label": "Lab Type",
"mandatory_depends_on": "eval:doc.course_needed == \"Lab\";",
"options": "lab",
"read_only_depends_on": "eval:doc.course_needed == \"Class\";"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2024-04-23 22:04:41.518934",
"modified_by": "Administrator",
"module": "Academia",
"name": "Course Hours",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
Loading

0 comments on commit 722d170

Please sign in to comment.