From 5059725dee8680db17bf79c8fdfbae49998b7c6e Mon Sep 17 00:00:00 2001 From: Mo8it Date: Thu, 29 Jul 2021 00:58:50 +0200 Subject: [PATCH] Done AssistantView --- advlabdb/modelViews.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/advlabdb/modelViews.py b/advlabdb/modelViews.py index 243ce6b..9596df8 100644 --- a/advlabdb/modelViews.py +++ b/advlabdb/modelViews.py @@ -154,6 +154,7 @@ class SemesterView(SecureModelView): class PartView(SecureModelView): can_view_details = True + column_details_list = ["program", "number", "semester", "part_students"] form_columns = ["program", "number", "semester"] @@ -291,6 +292,7 @@ class GroupView(SecureModelView): class ExperimentView(SecureModelView): can_view_details = True + column_filters = ["active"] column_list = ["number", "program", "title", "active"] column_details_list = column_list + [ @@ -337,6 +339,7 @@ class SemesterExperimentView(SecureModelView): column_list = ["experiment", "assistants", "semester"] column_details_list = column_list + ["group_experiments"] + column_filters = ["experiment"] def queryFilter(self): return SemesterExperiment.semester == userActiveSemester() @@ -362,6 +365,7 @@ class SemesterExperimentView(SecureModelView): class AssistantView(SecureModelView): can_view_details = True + column_list = ["first_name", "last_name", "user", "semester_experiments"] column_details_list = column_list + [ "phone_number", @@ -371,8 +375,9 @@ class AssistantView(SecureModelView): "appointments", "experiment_marks", ] + column_searchable_list = ["first_name", "last_name", "user.email"] column_filters = ["user.active"] - form_excluded_columns = ["experiment_marks"] + form_excluded_columns = ["experiment_marks", "appointments", "semester_experiments"] assistantBlankText = "Auto assign if experiment has only one assistant"