From e2a346caedaaa82d31e539bad85cce05c8613f30 Mon Sep 17 00:00:00 2001 From: Reto Aebersold Date: Mon, 30 Oct 2023 11:50:46 +0100 Subject: [PATCH] feat: add feedback list --- .../dashboard/StatisticFilterList.vue | 13 +-- client/src/composables.ts | 24 ++++++ client/src/gql/graphql.ts | 4 +- client/src/gql/schema.graphql | 2 +- ...nceDayPresences.vue => AttendanceList.vue} | 13 +-- .../dashboard/statistic/FeedbackList.vue | 86 +++++++++++++++++++ client/src/router/index.ts | 12 +-- .../dashboard/graphql/types/feedback.py | 4 +- 8 files changed, 130 insertions(+), 28 deletions(-) rename client/src/pages/dashboard/statistic/{AttendanceDayPresences.vue => AttendanceList.vue} (88%) create mode 100644 client/src/pages/dashboard/statistic/FeedbackList.vue diff --git a/client/src/components/dashboard/StatisticFilterList.vue b/client/src/components/dashboard/StatisticFilterList.vue index 99ec9df1..7ec9b451 100644 --- a/client/src/components/dashboard/StatisticFilterList.vue +++ b/client/src/components/dashboard/StatisticFilterList.vue @@ -1,8 +1,11 @@ + + diff --git a/client/src/router/index.ts b/client/src/router/index.ts index c5ff1f4e..7c03165e 100644 --- a/client/src/router/index.ts +++ b/client/src/router/index.ts @@ -181,26 +181,22 @@ const router = createRouter({ { path: "attendance", props: true, - component: () => - import("@/pages/dashboard/statistic/AttendanceDayPresences.vue"), + component: () => import("@/pages/dashboard/statistic/AttendanceList.vue"), }, { path: "assignment", props: true, - component: () => - import("@/pages/dashboard/statistic/AttendanceDayPresences.vue"), + component: () => import("@/pages/dashboard/statistic/AttendanceList.vue"), }, { path: "competence", props: true, - component: () => - import("@/pages/dashboard/statistic/AttendanceDayPresences.vue"), + component: () => import("@/pages/dashboard/statistic/AttendanceList.vue"), }, { path: "feedback", props: true, - component: () => - import("@/pages/dashboard/statistic/AttendanceDayPresences.vue"), + component: () => import("@/pages/dashboard/statistic/FeedbackList.vue"), }, ], }, diff --git a/server/vbv_lernwelt/dashboard/graphql/types/feedback.py b/server/vbv_lernwelt/dashboard/graphql/types/feedback.py index 1eb1bfe7..427b91ef 100644 --- a/server/vbv_lernwelt/dashboard/graphql/types/feedback.py +++ b/server/vbv_lernwelt/dashboard/graphql/types/feedback.py @@ -26,7 +26,9 @@ class FeedbackStatisticsRecordType(graphene.ObjectType): class FeedbackStatisticsResponsesType(graphene.ObjectType): _id = graphene.ID(required=True) - records = graphene.List(FeedbackStatisticsRecordType, required=True) + records = graphene.List( + graphene.NonNull(FeedbackStatisticsRecordType), required=True + ) summary = graphene.Field(FeedbackStatisticsSummaryType, required=True)