1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-11-08 21:21:06 +00:00

Done AssistantView

This commit is contained in:
Mo 2021-07-29 00:58:50 +02:00
parent 6ac4ab32e0
commit 5059725dee

View file

@ -154,6 +154,7 @@ class SemesterView(SecureModelView):
class PartView(SecureModelView): class PartView(SecureModelView):
can_view_details = True can_view_details = True
column_details_list = ["program", "number", "semester", "part_students"] column_details_list = ["program", "number", "semester", "part_students"]
form_columns = ["program", "number", "semester"] form_columns = ["program", "number", "semester"]
@ -291,6 +292,7 @@ class GroupView(SecureModelView):
class ExperimentView(SecureModelView): class ExperimentView(SecureModelView):
can_view_details = True can_view_details = True
column_filters = ["active"] column_filters = ["active"]
column_list = ["number", "program", "title", "active"] column_list = ["number", "program", "title", "active"]
column_details_list = column_list + [ column_details_list = column_list + [
@ -337,6 +339,7 @@ class SemesterExperimentView(SecureModelView):
column_list = ["experiment", "assistants", "semester"] column_list = ["experiment", "assistants", "semester"]
column_details_list = column_list + ["group_experiments"] column_details_list = column_list + ["group_experiments"]
column_filters = ["experiment"]
def queryFilter(self): def queryFilter(self):
return SemesterExperiment.semester == userActiveSemester() return SemesterExperiment.semester == userActiveSemester()
@ -362,6 +365,7 @@ class SemesterExperimentView(SecureModelView):
class AssistantView(SecureModelView): class AssistantView(SecureModelView):
can_view_details = True can_view_details = True
column_list = ["first_name", "last_name", "user", "semester_experiments"] column_list = ["first_name", "last_name", "user", "semester_experiments"]
column_details_list = column_list + [ column_details_list = column_list + [
"phone_number", "phone_number",
@ -371,8 +375,9 @@ class AssistantView(SecureModelView):
"appointments", "appointments",
"experiment_marks", "experiment_marks",
] ]
column_searchable_list = ["first_name", "last_name", "user.email"]
column_filters = ["user.active"] 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" assistantBlankText = "Auto assign if experiment has only one assistant"