From cb924a8d520da39dc79f5e0a06f85cf374297a53 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Wed, 5 Oct 2022 16:35:35 +0200 Subject: [PATCH] Prevent editing of existing assignment blocks --- client/src/components/content-block-form/ContentElement.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/components/content-block-form/ContentElement.vue b/client/src/components/content-block-form/ContentElement.vue index 86868bff..4d5f049d 100644 --- a/client/src/components/content-block-form/ContentElement.vue +++ b/client/src/components/content-block-form/ContentElement.vue @@ -57,6 +57,7 @@ const TextForm = () => import(/* webpackChunkName: "content-forms" */'@/components/content-forms/TipTap.vue'); const SubtitleForm = () => import(/* webpackChunkName: "content-forms" */'@/components/content-forms/SubtitleForm'); // readonly blocks + const Assignment = () => import(/* webpackChunkName: "content-forms" */'@/components/content-blocks/assignment/Assignment'); const SurveyBlock = () => import(/* webpackChunkName: "content-forms" */'@/components/content-blocks/SurveyBlock'); const Solution = () => import(/* webpackChunkName: "content-forms" */'@/components/content-blocks/Solution'); const ImageBlock = () => import(/* webpackChunkName: "content-forms" */'@/components/content-blocks/ImageBlock'); @@ -108,7 +109,8 @@ ModuleRoomSlug, CmsDocumentBlock, InfogramBlock, - ThinglinkBlock + ThinglinkBlock, + Assignment }, computed: { @@ -171,7 +173,7 @@ }; case 'assignment': return { - component: 'assignment-form', + component: element.id ? 'assignment' : 'assignment-form', // prevent editing of existing assignments title: 'Aufgabe & Ergebnis', icon: 'speech-bubble-icon', };