From b313bad0318c9dc2f2ba56e3dc6c3d880544ae74 Mon Sep 17 00:00:00 2001 From: Daniel Egger Date: Fri, 12 May 2023 13:34:23 +0200 Subject: [PATCH] Rename field `type` to `content_type` in REST response In Wagtail Grapple/GraphQL the field is already called `content_type` --- .../circlePage/LearningSequence.vue | 2 +- .../LearningContentParent.vue | 2 +- .../assignment/AssignmentView.vue | 2 +- .../blocks/AttendanceDayBlock.vue | 2 +- .../blocks/IframeBlock.vue | 2 +- .../blocks/MediaLibraryBlock.vue | 2 +- .../blocks/PlaceholderBlock.vue | 2 +- .../learningContentPage/blocks/VideoBlock.vue | 2 +- .../__tests__/learning_path_json.json | 252 +++++++++--------- client/src/services/assignmentService.ts | 2 +- client/src/services/circle.ts | 26 +- client/src/services/learningPath.ts | 6 +- client/src/types.ts | 48 ++-- .../vbv_lernwelt/core/serializer_helpers.py | 4 +- server/vbv_lernwelt/course/models.py | 2 +- server/vbv_lernwelt/course/views.py | 2 +- 16 files changed, 179 insertions(+), 179 deletions(-) diff --git a/client/src/pages/learningPath/circlePage/LearningSequence.vue b/client/src/pages/learningPath/circlePage/LearningSequence.vue index 6dc9ad0d..f05fb3a8 100644 --- a/client/src/pages/learningPath/circlePage/LearningSequence.vue +++ b/client/src/pages/learningPath/circlePage/LearningSequence.vue @@ -173,7 +173,7 @@ const learningSequenceBorderClass = computed(() => {
diff --git a/client/src/pages/learningPath/learningContentPage/LearningContentParent.vue b/client/src/pages/learningPath/learningContentPage/LearningContentParent.vue index ad4e91ba..db815cb4 100644 --- a/client/src/pages/learningPath/learningContentPage/LearningContentParent.vue +++ b/client/src/pages/learningPath/learningContentPage/LearningContentParent.vue @@ -38,7 +38,7 @@ const COMPONENTS: Record = { const DEFAULT_BLOCK = DescriptionBlock; const component = computed(() => { - return COMPONENTS[props.learningContent.type] || DEFAULT_BLOCK; + return COMPONENTS[props.learningContent.content_type] || DEFAULT_BLOCK; }); function handleFinishedLearningContent() { diff --git a/client/src/pages/learningPath/learningContentPage/assignment/AssignmentView.vue b/client/src/pages/learningPath/learningContentPage/assignment/AssignmentView.vue index 543e2d31..59e40327 100644 --- a/client/src/pages/learningPath/learningContentPage/assignment/AssignmentView.vue +++ b/client/src/pages/learningPath/learningContentPage/assignment/AssignmentView.vue @@ -145,7 +145,7 @@ const assignmentUser = computed(() => { :current-step="stepIndex" :subtitle="state.assignment?.title ?? ''" :title="getTitle()" - :learning-content-type="props.learningContent.type" + :learning-content-type="props.learningContent.content_type" :steps-count="numPages" :show-next-button="showNextButton && stepIndex !== 0" :show-exit-button="showExitButton" diff --git a/client/src/pages/learningPath/learningContentPage/blocks/AttendanceDayBlock.vue b/client/src/pages/learningPath/learningContentPage/blocks/AttendanceDayBlock.vue index e96d82fc..00d18e95 100644 --- a/client/src/pages/learningPath/learningContentPage/blocks/AttendanceDayBlock.vue +++ b/client/src/pages/learningPath/learningContentPage/blocks/AttendanceDayBlock.vue @@ -19,7 +19,7 @@ const courseSessionAttendanceDay = computed(() => {