Refactor folder structure
This commit is contained in:
parent
091b5b4d39
commit
f4fb15e428
|
|
@ -40,7 +40,7 @@
|
||||||
import VideoBlock from '@/components/content-blocks/VideoBlock';
|
import VideoBlock from '@/components/content-blocks/VideoBlock';
|
||||||
import LinkBlock from '@/components/content-blocks/LinkBlock';
|
import LinkBlock from '@/components/content-blocks/LinkBlock';
|
||||||
import DocumentBlock from '@/components/content-blocks/DocumentBlock';
|
import DocumentBlock from '@/components/content-blocks/DocumentBlock';
|
||||||
import Assignment from '@/components/content-blocks/Assignment';
|
import Assignment from '@/components/content-blocks/assignment/Assignment';
|
||||||
import AddContentBlockButton from '@/components/AddContentBlockButton';
|
import AddContentBlockButton from '@/components/AddContentBlockButton';
|
||||||
import VisibilityPopover from '@/components/VisibilityPopover';
|
import VisibilityPopover from '@/components/VisibilityPopover';
|
||||||
import EyeIcon from '@/components/icons/EyeIcon';
|
import EyeIcon from '@/components/icons/EyeIcon';
|
||||||
|
|
|
||||||
|
|
@ -5,25 +5,27 @@
|
||||||
{{assignment.assignment}}
|
{{assignment.assignment}}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="assignment__toggle-input-container">
|
<final-submission :submission="assignment.submission" v-if="assignment.submission.final"></final-submission>
|
||||||
<button
|
|
||||||
class="assignment__toggle-input"
|
|
||||||
@click="inputType = 'text'"
|
|
||||||
:class="{'assignment__toggle-input--active': inputType === 'text'}"
|
|
||||||
>Text
|
|
||||||
erfassen
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="assignment__toggle-input"
|
|
||||||
@click="inputType = 'file'"
|
|
||||||
:class="{'assignment__toggle-input--active': inputType === 'file'}"
|
|
||||||
>Dokument hochladen
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="assignment__answer">
|
<div class="assignment__submission" v-if="!assignment.submission.final">
|
||||||
|
<div class="assignment__toggle-input-container">
|
||||||
|
<button
|
||||||
|
class="assignment__toggle-input"
|
||||||
|
@click="inputType = 'text'"
|
||||||
|
:class="{'assignment__toggle-input--active': inputType === 'text'}"
|
||||||
|
>Text
|
||||||
|
erfassen
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="assignment__toggle-input"
|
||||||
|
@click="inputType = 'file'"
|
||||||
|
:class="{'assignment__toggle-input--active': inputType === 'file'}"
|
||||||
|
>Dokument hochladen
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="assignment__text-answer"
|
<div class="assignment__inputs">
|
||||||
|
<div class="assignment__text-answer"
|
||||||
v-if="inputType === 'text'">
|
v-if="inputType === 'text'">
|
||||||
<textarea
|
<textarea
|
||||||
class="assignment__textarea"
|
class="assignment__textarea"
|
||||||
|
|
@ -41,10 +43,14 @@
|
||||||
v-if="inputType === 'file'">
|
v-if="inputType === 'file'">
|
||||||
File Input goes here
|
File Input goes here
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
class="assignment__submit button button--primary button--white-bg"
|
||||||
|
@click="turnIn"
|
||||||
|
>Ergebnis mit Lehrperson teilen
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<button class="assignment__submit button button--primary button--white-bg">Ergebnis mit Lehrperson teilen</button>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -54,12 +60,14 @@
|
||||||
import debounce from 'debounce';
|
import debounce from 'debounce';
|
||||||
|
|
||||||
import TickCircleIcon from '@/components/icons/TickCircleIcon';
|
import TickCircleIcon from '@/components/icons/TickCircleIcon';
|
||||||
|
import FinalSubmission from '@/components/content-blocks/assignment/FinalSubmission';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: ['value'],
|
props: ['value'],
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
TickCircleIcon
|
TickCircleIcon,
|
||||||
|
FinalSubmission
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {},
|
computed: {},
|
||||||
|
|
@ -77,7 +85,21 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 500)
|
}, 500),
|
||||||
|
turnIn() {
|
||||||
|
this.$apollo.mutate({
|
||||||
|
mutation: UPDATE_ASSIGNMENT_MUTATION,
|
||||||
|
variables: {
|
||||||
|
input: {
|
||||||
|
assignment: {
|
||||||
|
id: this.assignment.id,
|
||||||
|
answer: this.assignment.submission.text,
|
||||||
|
final: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
apollo: {
|
apollo: {
|
||||||
|
|
@ -107,6 +129,7 @@
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import '@/styles/_variables.scss';
|
@import '@/styles/_variables.scss';
|
||||||
@import '@/styles/_functions.scss';
|
@import '@/styles/_functions.scss';
|
||||||
|
@import '@/styles/_mixins.scss';
|
||||||
|
|
||||||
.assignment {
|
.assignment {
|
||||||
margin-bottom: 2em;
|
margin-bottom: 2em;
|
||||||
|
|
@ -140,17 +163,20 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__answer {
|
&__submission {
|
||||||
|
/*margin-bottom: 12px;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
&__inputs {
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__textarea {
|
&__textarea {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 3px;
|
border-radius: $input-border-radius;
|
||||||
border: 1px solid #DBDBDB;
|
|
||||||
padding: 13px;
|
padding: 13px;
|
||||||
box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.15);
|
@include input-box-shadow;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
border-bottom-right-radius: 0;
|
border-bottom-right-radius: 0;
|
||||||
|
|
@ -163,7 +189,7 @@
|
||||||
background-color: $color-white;
|
background-color: $color-white;
|
||||||
font-family: $sans-serif-font-family;
|
font-family: $sans-serif-font-family;
|
||||||
padding: 13px;
|
padding: 13px;
|
||||||
border-radius: 3px;
|
border-radius: $input-border-radius;
|
||||||
border-top-left-radius: 0;
|
border-top-left-radius: 0;
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
border: 1px solid #DBDBDB;
|
border: 1px solid #DBDBDB;
|
||||||
Loading…
Reference in New Issue