add require scanner checkbox

This commit is contained in:
Fateme
2020-12-22 20:19:23 +03:30
parent 8cc01d76dd
commit 696de91ab4
3 changed files with 41 additions and 7 deletions
+30 -4
View File
@@ -88,6 +88,18 @@
prepend-icon="fa fa-sort-numeric-asc"
></v-select>
</v-flex>
<v-flex xs12 md3 sm3 v-if="info.type == 'Text'">
<v-layout row wrap>
<v-flex xs12 class="WM-FlexWrap ml-3">
<v-checkbox
label="require barcode scanner"
v-model="info.require_scanner"
></v-checkbox>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
<!-- SelectBox Section -->
<v-layout
@@ -244,6 +256,16 @@
prepend-icon="fa fa-sort-numeric-asc"
></v-select>
</v-flex>
<v-flex xs12 md3 sm3 v-if="children.type == 'Text'">
<v-layout row wrap>
<v-flex xs12 class="WM-FlexWrap ml-3">
<v-checkbox
label="require barcode scanner"
v-model="children.require_scanner"
></v-checkbox>
</v-flex>
</v-layout>
</v-flex>
<!-- Inner Form Selectbox Section -->
<v-layout
row
@@ -389,7 +411,8 @@ export default {
id: 0,
name: "",
type: "",
size: ""
size: "",
require_scanner: false
}
]
},
@@ -441,6 +464,9 @@ export default {
},
methods: {
changeType(infoIndex, selectedboxType) {
// if (selectedboxType == "Text"){
// //--add checkbox
// }
if (selectedboxType == "Select" || selectedboxType == "Checkbox" || selectedboxType == "Radiobutton") {
this.form.info[infoIndex]["options"] = [{ id: 0, title: "" }];
} else if(selectedboxType == "Range") {
@@ -547,9 +573,9 @@ export default {
this.form
);
}
if (result && result.status == 200) {
this.$router.push({ name: `ListTestType` });
}
// if (result && result.status == 200) {
// this.$router.push({ name: `ListTestType` });
// }
}
},
async load(id) {