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: {
|
||||
inputId: "input ID",
|
||||
maxFileSize: 5140 * 1028,
|
||||
},
|
||||
mixins: [mockMixin],
|
||||
});
|
||||
|
|
@ -404,6 +405,7 @@ describe("textboxQuestion.vue", () => {
|
|||
},
|
||||
propsData: {
|
||||
inputId: "input ID",
|
||||
maxFileSize: 5140 * 1028,
|
||||
},
|
||||
mixins: [mockMixin],
|
||||
});
|
||||
|
|
@ -427,6 +429,7 @@ describe("textboxQuestion.vue", () => {
|
|||
},
|
||||
propsData: {
|
||||
inputId: "input ID",
|
||||
maxFileSize: 5140 * 1028,
|
||||
},
|
||||
mixins: [mockMixin],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ export default {
|
|||
includeSearchIcon: Boolean,
|
||||
includeImageQuestion: Boolean,
|
||||
imageQuestionSubmitHandler: Function,
|
||||
maxFileSize: Number,
|
||||
},
|
||||
setup(props) {
|
||||
const propsClone = Object.assign({}, props);
|
||||
|
|
@ -198,12 +199,6 @@ export default {
|
|||
return questionText;
|
||||
},
|
||||
},
|
||||
|
||||
maxFileSize() {
|
||||
let kiloBytes = 5140;
|
||||
|
||||
return kiloBytes * 1028;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
async value(newValue) {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
:mask="vinMask"
|
||||
includeImageQuestion
|
||||
:imageQuestionSubmitHandler="getVinFromImage"
|
||||
:maxFileSize="imageUploadMaxFileSize"
|
||||
@image-lookup-error="displayVinScanAlert"
|
||||
@image-validity-error="displayVinScanAlert"
|
||||
data-test="vin-lookup-field"
|
||||
|
|
@ -479,6 +480,11 @@ export default {
|
|||
return "XXXXXXXXXXXXXXXXX";
|
||||
}
|
||||
},
|
||||
imageUploadMaxFileSize() {
|
||||
let kiloBytes = 5140;
|
||||
|
||||
return kiloBytes * 1028;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
vin() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue