Merge branch 'hotfix/postgres-pipelines' into feature/multiple-classes-for-everyone

This commit is contained in:
Ramon Wenger 2020-02-24 16:11:25 +01:00
commit ca97a15398
4 changed files with 31 additions and 2 deletions

View File

@ -14,6 +14,8 @@ definitions:
services:
postgres:
image: postgres
variables:
POSTGRES_HOST_AUTH_METHOD: trust
aliases:
- &unittest-python

View File

@ -15,6 +15,7 @@
@changeDocumentUrl="changeDocumentUrl"
@spellcheck="spellcheck"
:user-input="submission"
:spellcheck-loading="spellcheckLoading"
placeholder="Ergebnis erfassen"
action="Ergebnis mit Lehrperson teilen"
shared-msg="Das Ergebnis wurde mit der Lehrperson geteilt."
@ -191,6 +192,7 @@
},
spellcheck() {
let self = this;
this.spellcheckLoading = true;
this.$apollo.mutate({
mutation: SPELL_CHECK_MUTATION,
variables: {
@ -202,6 +204,8 @@
update(store, {data: {spellCheck: {results}}}) {
self.corrections = results;
}
}).then(() => {
this.spellcheckLoading = false;
});
}
},
@ -239,7 +243,8 @@
inputType: 'text',
unsaved: false,
saving: 0,
corrections: ''
corrections: '',
spellcheckLoading: false
}
}
}

View File

@ -20,7 +20,7 @@
class="submission-form-container__submit submission-form-container__spellcheck button button--primary button--white-bg"
v-if="spellcheck"
@click="$emit('spellcheck')"
>Rechtschreibung prüfen
>{{spellcheckText}}
</button>
<div v-if="userInput.document">
<document-block
@ -65,6 +65,10 @@
type: Boolean,
default: false
},
spellcheckLoading: {
type: Boolean,
default: false
},
sharedMsg: String
},
@ -81,6 +85,14 @@
},
allowsDocuments() {
return 'document' in this.userInput;
},
spellcheckText() {
if (!this.spellcheckLoading) {
return 'Rechtschreibung prüfen'
} else {
return 'Wird geprüft...'
}
}
},
@ -129,6 +141,13 @@
cursor: pointer;
}
}
&__spellcheck {
/* so the button does not change size when changing the text */
width: 235px;
text-align: center;
display: inline-block;
}
}
</style>

View File

@ -39,3 +39,6 @@ class BasicKnowledgeQuery(object):
if slug is not None:
return BasicKnowledge.objects.get(slug=slug)
return None
def resolve_instruments(self, info, **kwargs):
return BasicKnowledge.objects.all().live()