Move file-size definition to be a prop of textbox-question.
This commit is contained in:
parent
6519745d9d
commit
dc14cf7776
3 changed files with 10 additions and 6 deletions
|
|
@ -379,6 +379,7 @@ describe("textboxQuestion.vue", () => {
|
||||||
},
|
},
|
||||||
propsData: {
|
propsData: {
|
||||||
inputId: "input ID",
|
inputId: "input ID",
|
||||||
|
maxFileSize: 5140 * 1028,
|
||||||
},
|
},
|
||||||
mixins: [mockMixin],
|
mixins: [mockMixin],
|
||||||
});
|
});
|
||||||
|
|
@ -404,6 +405,7 @@ describe("textboxQuestion.vue", () => {
|
||||||
},
|
},
|
||||||
propsData: {
|
propsData: {
|
||||||
inputId: "input ID",
|
inputId: "input ID",
|
||||||
|
maxFileSize: 5140 * 1028,
|
||||||
},
|
},
|
||||||
mixins: [mockMixin],
|
mixins: [mockMixin],
|
||||||
});
|
});
|
||||||
|
|
@ -427,6 +429,7 @@ describe("textboxQuestion.vue", () => {
|
||||||
},
|
},
|
||||||
propsData: {
|
propsData: {
|
||||||
inputId: "input ID",
|
inputId: "input ID",
|
||||||
|
maxFileSize: 5140 * 1028,
|
||||||
},
|
},
|
||||||
mixins: [mockMixin],
|
mixins: [mockMixin],
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ export default {
|
||||||
includeSearchIcon: Boolean,
|
includeSearchIcon: Boolean,
|
||||||
includeImageQuestion: Boolean,
|
includeImageQuestion: Boolean,
|
||||||
imageQuestionSubmitHandler: Function,
|
imageQuestionSubmitHandler: Function,
|
||||||
|
maxFileSize: Number,
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const propsClone = Object.assign({}, props);
|
const propsClone = Object.assign({}, props);
|
||||||
|
|
@ -198,12 +199,6 @@ export default {
|
||||||
return questionText;
|
return questionText;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
maxFileSize() {
|
|
||||||
let kiloBytes = 5140;
|
|
||||||
|
|
||||||
return kiloBytes * 1028;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
async value(newValue) {
|
async value(newValue) {
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
:mask="vinMask"
|
:mask="vinMask"
|
||||||
includeImageQuestion
|
includeImageQuestion
|
||||||
:imageQuestionSubmitHandler="getVinFromImage"
|
:imageQuestionSubmitHandler="getVinFromImage"
|
||||||
|
:maxFileSize="imageUploadMaxFileSize"
|
||||||
@image-lookup-error="displayVinScanAlert"
|
@image-lookup-error="displayVinScanAlert"
|
||||||
@image-validity-error="displayVinScanAlert"
|
@image-validity-error="displayVinScanAlert"
|
||||||
data-test="vin-lookup-field"
|
data-test="vin-lookup-field"
|
||||||
|
|
@ -479,6 +480,11 @@ export default {
|
||||||
return "XXXXXXXXXXXXXXXXX";
|
return "XXXXXXXXXXXXXXXXX";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
imageUploadMaxFileSize() {
|
||||||
|
let kiloBytes = 5140;
|
||||||
|
|
||||||
|
return kiloBytes * 1028;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
vin() {
|
vin() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue