Fix some merge issues

This commit is contained in:
Ramon Wenger 2023-02-07 17:50:02 +01:00
parent 973fef379d
commit 6ecf33d12b
11 changed files with 310 additions and 315 deletions

View File

@ -28,7 +28,6 @@ export default {
emits: ['click'],
emits: ['click'],
components: {
Avatar,
},

View File

@ -20,13 +20,12 @@
import ALL_TOPICS_QUERY from '@/graphql/gql/queries/allTopicsQuery.gql';
import sidebarMixin from '@/mixins/sidebar';
export default {
export default {
props: {
mobile: {
default: false,
},
},
},
mixins: [sidebarMixin],
@ -41,7 +40,6 @@ import sidebarMixin from '@/mixins/sidebar';
return atob(id);
},
},
},
apollo: {
topics: {

View File

@ -10,14 +10,14 @@
<script>
import ContentsForm from '@/components/content-block-form/ContentsForm';
import {store} from '@/store';
import { store } from '@/store';
import EDIT_CONTENT_BLOCK_MUTATION from 'gql/mutations/editContentBlock.gql';
import MODULE_DETAILS_QUERY from '@/graphql/gql/queries/modules/moduleDetailsQuery.gql';
import CONTENT_BLOCK_QUERY from '@/graphql/gql/queries/contentBlockQuery.gql';
import {setUserBlockType} from '@/helpers/content-block';
import EDIT_CONTENT_BLOCK_MUTATION from 'gql/mutations/editContentBlock.gql';
import MODULE_DETAILS_QUERY from '@/graphql/gql/queries/modules/moduleDetailsQuery.gql';
import CONTENT_BLOCK_QUERY from '@/graphql/gql/queries/contentBlockQuery.gql';
import { setUserBlockType } from '@/helpers/content-block';
export default {
export default {
components: {
ContentsForm,
},
@ -45,24 +45,26 @@ import ContentsForm from '@/components/content-block-form/ContentsForm';
input: {
contentBlock: {
title: contentBlock.title,
contents: contentBlock.contents.filter(value => Object.keys(value).length > 0),
contents: contentBlock.contents.filter((value) => Object.keys(value).length > 0),
type: setUserBlockType(contentBlock.isAssignment),
},
id: contentBlock.id,
},
},
refetchQueries: [{
refetchQueries: [
{
query: MODULE_DETAILS_QUERY,
variables: {
slug: this.$route.params.slug,
},
}],
}).then(() => {
},
],
})
.then(() => {
this.hideModal();
});
},
},
},
apollo: {
contentBlock() {
@ -74,6 +76,5 @@ import ContentsForm from '@/components/content-block-form/ContentsForm';
};
},
},
};
};
</script>

View File

@ -80,7 +80,8 @@ export default defineComponent({
},
});
},
});
},
});
</script>
<style scoped lang="scss">

View File

@ -31,13 +31,12 @@ export default {
return {
name: 'module',
params: {
slug: this.slug
}
slug: this.slug,
},
};
} else {
return {};
}
}
},
},
};

View File

@ -16,8 +16,8 @@
class="project__owner"
/>
<entry-count-widgetclass
="project__entry-count"
<entry-count-widget
class="project__entry-count"
:verbose="false"
:entry-count="project.entriesCount"
/>

View File

@ -56,12 +56,14 @@
import WidgetPopover from '@/components/ui/WidgetPopover';
import CurrentClass from '@/components/school-class/CurrentClass';
import updateSelectedClassMixin from '@/mixins/update-selected-class';
import sidebarMixin from '@/mixins/sidebar';
import meMixin from '@/mixins/me';
import {defineAsyncComponent} from 'vue';
const ChevronDown = defineAsyncComponent(() => import(/* webpackChunkName: "icons" */'@/components/icons/ChevronDown'));
const AddIcon = defineAsyncComponent(() => import(/* webpackChunkName: "icons" */'@/components/icons/AddIcon'));
import updateSelectedClassMixin from '@/mixins/update-selected-class';
import sidebarMixin from '@/mixins/sidebar';
import meMixin from '@/mixins/me';
import { defineAsyncComponent } from 'vue';
const ChevronDown = defineAsyncComponent(() =>
import(/* webpackChunkName: "icons" */ '@/components/icons/ChevronDown')
);
const AddIcon = defineAsyncComponent(() => import(/* webpackChunkName: "icons" */ '@/components/icons/AddIcon'));
export default {
props: {
@ -102,7 +104,6 @@ export default {
this.updateSelectedClass(selectedClass);
this.showPopover = false;
this.closeSidebar('profile');
}
},
},
};

View File

@ -8,7 +8,7 @@
</template>
<script>
import {defineComponent} from 'vue';
import { defineComponent } from 'vue';
import ContentBlockForm from '@/components/content-block-form/ContentBlockForm';
import { setUserBlockType } from '@/helpers/content-block';
@ -16,16 +16,15 @@ import NEW_CONTENT_BLOCK_MUTATION from '@/graphql/gql/mutations/addContentBlock.
import MODULE_DETAILS_QUERY from '@/graphql/gql/queries/modules/moduleDetailsQuery.gql';
import { cleanUpContents } from '@/components/content-block-form/helpers';
export default defineComponent({
export default defineComponent({
props: {
parent: {
type: String,
default: ''
default: '',
},
after: {
type: String,
default: ''
}
default: '',
},
},

View File

@ -1,29 +1,24 @@
<template>
<module
:module="module"
@editNote="editNote"
@addNote="addNote"
@bookmark="bookmark"
/>
<module :module="module" @editNote="editNote" @addNote="addNote" @bookmark="bookmark" />
</template>
<script>
import Module from '@/components/modules/Module';
import log from 'loglevel';
import Module from '@/components/modules/Module';
import log from 'loglevel';
import UPDATE_LAST_MODULE_MUTATION from '@/graphql/gql/mutations/updateLastModule.gql';
import UPDATE_MODULE_BOOKMARK_MUTATION from '@/graphql/gql/mutations/updateModuleBookmark.gql';
// import ME_QUERY from '@/graphql/gql/meQuery.gql';
import MODULE_FRAGMENT from '@/graphql/gql/fragments/moduleParts.gql';
import SCROLL_POSITION from '@/graphql/gql/local/scrollPosition.gql';
import SCROLL_TO_MUTATION from '@/graphql/gql/local/mutations/scrollTo.gql';
import UPDATE_LAST_MODULE_MUTATION from '@/graphql/gql/mutations/updateLastModule.gql';
import UPDATE_MODULE_BOOKMARK_MUTATION from '@/graphql/gql/mutations/updateModuleBookmark.gql';
// import ME_QUERY from '@/graphql/gql/meQuery.gql';
import MODULE_FRAGMENT from '@/graphql/gql/fragments/moduleParts.gql';
import SCROLL_POSITION from '@/graphql/gql/local/scrollPosition.gql';
import SCROLL_TO_MUTATION from '@/graphql/gql/local/mutations/scrollTo.gql';
import meMixin from '@/mixins/me';
import MODULE_DETAILS_QUERY from '@/graphql/gql/queries/modules/moduleDetailsQuery.gql';
import ME_QUERY from '@/graphql/gql/queries/meQuery.gql';
import { setModuleEditMode } from '@/graphql/cache-operations';
import meMixin from '@/mixins/me';
import MODULE_DETAILS_QUERY from '@/graphql/gql/queries/modules/moduleDetailsQuery.gql';
import ME_QUERY from '@/graphql/gql/queries/meQuery.gql';
import {setModuleEditMode} from '@/graphql/cache-operations';
export default {
export default {
mixins: [meMixin],
components: {
@ -54,7 +49,7 @@ export default {
},
result({
data: {
module: { id },
module: {id},
},
}) {
if (!this.updateSent) {
@ -95,14 +90,14 @@ export default {
store,
{
data: {
updateLastModule: { lastModule },
updateLastModule: {lastModule},
},
}
) => {
const { id, slug } = lastModule;
const {id, slug} = lastModule;
log.debug('updating last module', id, slug);
const query = ME_QUERY;
let { me } = store.readQuery({
let {me} = store.readQuery({
query,
});
// me.lastModule = {
@ -229,5 +224,5 @@ export default {
}
},
},
};
};
</script>

View File

@ -9,7 +9,7 @@
</template>
<script>
import {defineComponent} from 'vue';
import { defineComponent } from 'vue';
import ROOM_ENTRY_QUERY from 'gql/queries/roomEntryQuery.gql';
import ROOM_ENTRY_FRAGMENT from 'gql/fragments/roomEntryParts.gql';
@ -19,16 +19,15 @@ import ContentBlockForm from '@/components/content-block-form/ContentBlockForm';
import { ROOMS_FEATURE_SET } from '@/consts/features.consts';
import { ROOM_PAGE } from '@/router/room.names';
export default defineComponent( {
export default defineComponent({
props: {
slug: {
type: String,
required: true
required: true,
},
entrySlug: {
type: String,
required: true
}
required: true,
},
},

View File

@ -21,9 +21,10 @@
<script>
import '@/styles/survey.modern.css';
import '@/styles/survey.reset.css';import { css } from '@/survey.config';
import '@/styles/survey.reset.css';
import { css } from '@/survey.config';
import gql from 'graphql-tag';
import { Model , StylesManager } from 'survey-knockout';
import { Model, StylesManager } from 'survey-knockout';
// we are switching to the knockout version because the Vue version only works with Vue 2 (as of July 2022)
import SURVEY_QUERY from '@/graphql/gql/queries/surveyQuery.gql';
@ -41,8 +42,8 @@ const Solution = defineAsyncComponent(() =>
*/ '@/components/content-blocks/Solution'
)
);
StylesManager.applyTheme('modern')
);
StylesManager.applyTheme('modern');
const MODULE_QUERY = gql`
query ModuleSolutions($slug: String) {
@ -63,7 +64,8 @@ export default {
return {
survey: this.initSurvey(),
currentPage: null,
surveyData: null,title: '',
surveyData: null,
title: '',
module: {},
completed: false,
me: {
@ -121,7 +123,8 @@ export default {
}
},
destroyed() {},methods: {
destroyed() {},
methods: {
initSurvey(data, answers) {
let survey = new Model(data);
const flatAnswers = {};