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