extend inspection_plan by wearable and enable optional interval

This commit is contained in:
Julian Krauser 2025-07-25 12:21:56 +02:00
parent 91ad11e20c
commit 583233b95e
6 changed files with 74 additions and 35 deletions

View file

@ -52,6 +52,11 @@ export default defineComponent({
showQRCode: false as boolean,
};
},
watch: {
linkToScan() {
this.renderQRCode();
},
},
computed: {
...mapState(useScannerStore, ["inUse", "roomId", "results"]),
linkToScan() {
@ -59,25 +64,30 @@ export default defineComponent({
},
},
mounted() {
QRCode.toDataURL(this.linkToScan, {
width: 300,
margin: 2,
color: {
dark: "#000000",
light: "#FFFFFF",
},
errorCorrectionLevel: "M",
})
.then((res) => {
(this.$refs.qr as HTMLImageElement).src = res;
})
.catch(() => {});
this.renderQRCode();
},
methods: {
...mapActions(useScannerStore, ["startSession", "endSession", "removeElementFromResults"]),
commit(c: string) {
this.$emit("code", c);
},
renderQRCode() {
QRCode.toDataURL(this.linkToScan, {
width: 300,
margin: 2,
color: {
dark: "#000000",
light: "#FFFFFF",
},
errorCorrectionLevel: "M",
})
.then((res) => {
(this.$refs.qr as HTMLImageElement).src = res;
})
.catch((err) => {
console.log(err);
});
},
},
});
</script>