Merge pull request #1041 from Safelite/feature/CSR-1214-techreview

Move file-size definition to be a prop of textbox-question.
This commit is contained in:
chloeherdsafelite 2023-03-31 14:22:57 -04:00 committed by GitHub
commit c32546beef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 6 deletions

View file

@ -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],
});

View file

@ -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) {

View file

@ -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() {