Re-enable documents in assignment submission form
This commit is contained in:
parent
bac4d30261
commit
9fada87a56
|
|
@ -68,13 +68,13 @@ import { sanitize } from '@/helpers/text';
|
||||||
import { defineAsyncComponent } from 'vue';
|
import { defineAsyncComponent } from 'vue';
|
||||||
|
|
||||||
const SubmissionForm = defineAsyncComponent(() =>
|
const SubmissionForm = defineAsyncComponent(() =>
|
||||||
import(/* webpackChunkName: "content-components" */ '@/components/content-blocks/assignment/SubmissionForm')
|
import(/* webpackChunkName: "content-components" */ '@/components/content-blocks/assignment/SubmissionForm.vue')
|
||||||
);
|
);
|
||||||
const Solution = defineAsyncComponent(() =>
|
const Solution = defineAsyncComponent(() =>
|
||||||
import(/* webpackChunkName: "content-components" */ '@/components/content-blocks/Solution')
|
import(/* webpackChunkName: "content-components" */ '@/components/content-blocks/Solution.vue')
|
||||||
);
|
);
|
||||||
const SpellCheck = defineAsyncComponent(() =>
|
const SpellCheck = defineAsyncComponent(() =>
|
||||||
import(/* webpackChunkName: "content-components" */ '@/components/content-blocks/assignment/SpellCheck')
|
import(/* webpackChunkName: "content-components" */ '@/components/content-blocks/assignment/SpellCheck.vue')
|
||||||
);
|
);
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
||||||
|
|
@ -52,14 +52,12 @@ import { defineAsyncComponent, computed } from 'vue';
|
||||||
export interface Props {
|
export interface Props {
|
||||||
userInput: {
|
userInput: {
|
||||||
final: boolean;
|
final: boolean;
|
||||||
document: string;
|
document?: string;
|
||||||
text: string;
|
text: string;
|
||||||
};
|
};
|
||||||
saved: boolean;
|
saved: boolean;
|
||||||
placeholder: string;
|
placeholder: string;
|
||||||
action: string;
|
action: string;
|
||||||
reopen: Function;
|
|
||||||
document: string;
|
|
||||||
readOnly: boolean;
|
readOnly: boolean;
|
||||||
spellcheck: boolean;
|
spellcheck: boolean;
|
||||||
spellcheckLoading: boolean;
|
spellcheckLoading: boolean;
|
||||||
|
|
@ -87,8 +85,7 @@ const isFinalOrReadOnly = computed(() => {
|
||||||
return final.value || props.readOnly;
|
return final.value || props.readOnly;
|
||||||
});
|
});
|
||||||
const allowsDocuments = computed(() => {
|
const allowsDocuments = computed(() => {
|
||||||
return false;
|
return 'document' in props.userInput;
|
||||||
//return 'document' in props.userInput;
|
|
||||||
});
|
});
|
||||||
const showSpellcheckButton = computed(() => {
|
const showSpellcheckButton = computed(() => {
|
||||||
return props.spellcheck && process.env.VUE_APP_ENABLE_SPELLCHECK;
|
return props.spellcheck && process.env.VUE_APP_ENABLE_SPELLCHECK;
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,19 @@
|
||||||
<template>
|
<template>
|
||||||
<a class="simple-file-upload-icon">
|
<a
|
||||||
|
class="simple-file-upload-icon"
|
||||||
|
@click="$emit('click')"
|
||||||
|
>
|
||||||
<document-icon class="simple-file-upload-icon__icon" />
|
<document-icon class="simple-file-upload-icon__icon" />
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup lang="ts">
|
||||||
import { defineAsyncComponent } from 'vue';
|
import { defineAsyncComponent } from 'vue';
|
||||||
const DocumentIcon = defineAsyncComponent(() =>
|
const DocumentIcon = defineAsyncComponent(
|
||||||
import(/* webpackChunkName: "icons" */ '@/components/icons/DocumentIcon')
|
() => import(/* webpackChunkName: "icons" */ '@/components/icons/DocumentIcon.vue')
|
||||||
);
|
);
|
||||||
|
|
||||||
export default {
|
defineEmits(['click']);
|
||||||
components: { DocumentIcon },
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue