Add pdf column and uploader

This commit is contained in:
Montana
2019-02-05 09:06:23 -05:00
parent d4fd3fb262
commit ce2b4b6ea1
9 changed files with 124 additions and 82 deletions

42
js/components/upload.js Normal file
View File

@@ -0,0 +1,42 @@
import createNumberMask from 'text-mask-addons/dist/createNumberMask'
import { conformToMask } from 'vue-text-mask'
import FormMixin from '../mixins/form'
import textinput from './text_input'
import optionsinput from './options_input'
export default {
name: 'upload',
mixins: [FormMixin],
components: {
textinput,
optionsinput,
},
props: {
initialData: {
type: Object,
default: () => ({}),
},
uploadErrors: {
type: Array,
default: () => [],
},
},
data: function() {
const { pdf } = this.initialData
return {
showUpload: !pdf || this.uploadErrors.length > 0,
}
},
methods: {
showUploadInput: function() {
this.showUpload = true
},
},
}