Fix Assignment bug

This commit is contained in:
Lorenz Padberg 2024-03-20 14:25:30 +01:00
parent ad5a7824ba
commit b7a009972f
3 changed files with 6 additions and 8 deletions

View File

@ -315,8 +315,6 @@ const createHighlight = createHighlightCurry({
const isNested = computed(() => props.contentBlock.root); // if it's nested, a the parent has the root propert const isNested = computed(() => props.contentBlock.root); // if it's nested, a the parent has the root propert
onMounted(() => { onMounted(() => {
log.debug('onMounted ContentBlock called');
const element = contentBlockDiv.value; const element = contentBlockDiv.value;
if (element !== null) { if (element !== null) {

View File

@ -58,7 +58,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { defineAsyncComponent, nextTick, onMounted, ref, watch } from 'vue'; import { defineAsyncComponent, nextTick, onMounted, reactive, ref, watch } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { useMutation, useQuery } from '@vue/apollo-composable'; import { useMutation, useQuery } from '@vue/apollo-composable';
import { graphql } from '@/__generated__'; import { graphql } from '@/__generated__';
@ -91,7 +91,7 @@ const initialSubmission = {
document: '', document: '',
final: false, final: false,
}; };
const assignment = ref({ submission: initialSubmission }); const assignment = reactive({ submission: initialSubmission });
const corrections = ref(''); const corrections = ref('');
const unsaved = ref(false); const unsaved = ref(false);
const saving = ref(0); const saving = ref(0);

View File

@ -12,7 +12,7 @@ const languageVar = makeVar('de');
const idToRefFactory = const idToRefFactory =
(__typename: string) => (__typename: string) =>
(_, { args, toReference }) => { (_, { args, toReference }) => {
log.debug(`Referencing ${__typename} with ${args.id}`); //log.debug(`Referencing ${__typename} with ${args.id}`);
return toReference({ return toReference({
__typename, __typename,
id: args.id, id: args.id,