style checkbox, refactor task assignment
This commit is contained in:
parent
3547a30228
commit
0db89c116d
|
|
@ -9,6 +9,7 @@
|
||||||
:item="localContentBlock"
|
:item="localContentBlock"
|
||||||
:label="'Aufgabe'"
|
:label="'Aufgabe'"
|
||||||
@input="setContentBlockType"
|
@input="setContentBlockType"
|
||||||
|
class="contents-form__task"
|
||||||
></checkbox>
|
></checkbox>
|
||||||
<modal-input v-if="blockType === 'RoomEntry'"
|
<modal-input v-if="blockType === 'RoomEntry'"
|
||||||
placeholder="Untertitel für Raumeintrag erfassen"
|
placeholder="Untertitel für Raumeintrag erfassen"
|
||||||
|
|
@ -99,7 +100,6 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
console.log(this.contentBlock)
|
|
||||||
return {
|
return {
|
||||||
error: false,
|
error: false,
|
||||||
localContentBlock: Object.assign({}, {
|
localContentBlock: Object.assign({}, {
|
||||||
|
|
@ -285,5 +285,9 @@
|
||||||
&__add {
|
&__add {
|
||||||
grid-column: 1 / span 2;
|
grid-column: 1 / span 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__task {
|
||||||
|
margin: 15px 0 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
import EDIT_CONTENT_BLOCK_MUTATION from '@/graphql/gql/mutations/mutateContentBlock.gql';
|
import EDIT_CONTENT_BLOCK_MUTATION from '@/graphql/gql/mutations/mutateContentBlock.gql';
|
||||||
import MODULE_DETAILS_QUERY from '@/graphql/gql/moduleDetailsQuery.gql';
|
import MODULE_DETAILS_QUERY from '@/graphql/gql/moduleDetailsQuery.gql';
|
||||||
import CONTENT_BLOCK_QUERY from '@/graphql/gql/contentBlockQuery.gql';
|
import CONTENT_BLOCK_QUERY from '@/graphql/gql/contentBlockQuery.gql';
|
||||||
|
import { setUserBlockType } from '@/helpers/content-block'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -33,7 +34,7 @@
|
||||||
contentBlock: {
|
contentBlock: {
|
||||||
title: contentBlock.title,
|
title: contentBlock.title,
|
||||||
contents: contentBlock.contents.filter(value => Object.keys(value).length > 0),
|
contents: contentBlock.contents.filter(value => Object.keys(value).length > 0),
|
||||||
type: contentBlock.isAssignment ? 'TASK' : 'NORMAL'
|
type: setUserBlockType(contentBlock.isAssignment)
|
||||||
},
|
},
|
||||||
id: contentBlock.id
|
id: contentBlock.id
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,11 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ContentsForm from '@/components/content-block-form/ContentsForm';
|
import ContentsForm from '@/components/content-block-form/ContentsForm';
|
||||||
|
|
||||||
import store from '@/store/index';
|
import store from '@/store/index';
|
||||||
|
|
||||||
import NEW_CONTENT_BLOCK_MUTATION from '@/graphql/gql/mutations/addContentBlock.gql';
|
import NEW_CONTENT_BLOCK_MUTATION from '@/graphql/gql/mutations/addContentBlock.gql';
|
||||||
import MODULE_DETAILS_QUERY from '@/graphql/gql/moduleDetailsQuery.gql';
|
import MODULE_DETAILS_QUERY from '@/graphql/gql/moduleDetailsQuery.gql';
|
||||||
|
import { setUserBlockType } from '@/helpers/content-block'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
contentBlock: {
|
contentBlock: {
|
||||||
title: contentBlock.title,
|
title: contentBlock.title,
|
||||||
contents: contentBlock.contents.filter(value => Object.keys(value).length > 0),
|
contents: contentBlock.contents.filter(value => Object.keys(value).length > 0),
|
||||||
type: contentBlock.isAssignment ? 'TASK' : 'NORMAL'
|
type: setUserBlockType(contentBlock.isAssignment)
|
||||||
},
|
},
|
||||||
after: this.$store.state.contentBlockPosition.after,
|
after: this.$store.state.contentBlockPosition.after,
|
||||||
parent: this.$store.state.contentBlockPosition.parent
|
parent: this.$store.state.contentBlockPosition.parent
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
|
#import "../fragments/contentBlockParts.gql"
|
||||||
|
|
||||||
mutation AddContentBlock($input: AddContentBlockInput!) {
|
mutation AddContentBlock($input: AddContentBlockInput!) {
|
||||||
addContentBlock(input: $input) {
|
addContentBlock(input: $input) {
|
||||||
newContentBlock {
|
newContentBlock {
|
||||||
id
|
...ContentBlockParts
|
||||||
title
|
|
||||||
slug
|
|
||||||
contents
|
|
||||||
type
|
|
||||||
}
|
}
|
||||||
errors
|
errors
|
||||||
clientMutationId
|
clientMutationId
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#import "../fragments/contentBlockParts.gql"
|
#import "../fragments/contentBlockParts.gql"
|
||||||
|
|
||||||
mutation MutateContentBlock($input: MutateContentBlockInput!) {
|
mutation MutateContentBlock($input: MutateContentBlockInput!) {
|
||||||
mutateContentBlock(input: $input) {
|
mutateContentBlock(input: $input) {
|
||||||
contentBlock {
|
contentBlock {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
export function setUserBlockType(isAssignment) {
|
||||||
|
return isAssignment ? 'TASK' : 'NORMAL';
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue