chore: use vite plugins from frappe-ui
This commit is contained in:
@@ -4,7 +4,6 @@ from lms.lms.api import give_dicussions_permission
|
||||
|
||||
|
||||
def after_install():
|
||||
add_pages_to_nav()
|
||||
create_batch_source()
|
||||
give_dicussions_permission()
|
||||
|
||||
@@ -15,37 +14,6 @@ def after_sync():
|
||||
add_all_roles_to("Administrator")
|
||||
|
||||
|
||||
def add_pages_to_nav():
|
||||
pages = [
|
||||
{"label": "Explore", "idx": 1},
|
||||
{"label": "Courses", "url": "/lms/courses", "parent": "Explore", "idx": 2},
|
||||
{"label": "Batches", "url": "/lms/batches", "parent": "Explore", "idx": 3},
|
||||
{"label": "Statistics", "url": "/lms/statistics", "parent": "Explore", "idx": 4},
|
||||
{"label": "Jobs", "url": "/lms/job-openings", "parent": "Explore", "idx": 5},
|
||||
]
|
||||
|
||||
for page in pages:
|
||||
filters = frappe._dict()
|
||||
if page.get("url"):
|
||||
filters["url"] = ["like", "%" + page.get("url") + "%"]
|
||||
else:
|
||||
filters["label"] = page.get("label")
|
||||
|
||||
if not frappe.db.exists("Top Bar Item", filters):
|
||||
frappe.get_doc(
|
||||
{
|
||||
"doctype": "Top Bar Item",
|
||||
"label": page.get("label"),
|
||||
"url": page.get("url"),
|
||||
"parent_label": page.get("parent"),
|
||||
"idx": page.get("idx"),
|
||||
"parent": "Website Settings",
|
||||
"parenttype": "Website Settings",
|
||||
"parentfield": "top_bar_items",
|
||||
}
|
||||
).save()
|
||||
|
||||
|
||||
def before_uninstall():
|
||||
delete_custom_fields()
|
||||
delete_lms_roles()
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2024-09-23 19:33:49.593950",
|
||||
"modified": "2025-03-19 12:12:23.723432",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "LMS Category",
|
||||
@@ -51,6 +51,26 @@
|
||||
"role": "Moderator",
|
||||
"share": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Course Creator",
|
||||
"select": 1,
|
||||
"share": 1
|
||||
},
|
||||
{
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Batch Evaluator",
|
||||
"select": 1,
|
||||
"share": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
|
||||
Reference in New Issue
Block a user