Browse Source

code scanner for forms - WIP

pull/5114/head
Daniel Spaude 2 years ago
parent
commit
34134da10a
No known key found for this signature in database
GPG Key ID: 654A3D1FA4F35FFE
  1. 9
      packages/nc-gui/pages/[projectType]/form/[viewId]/index/index.vue

9
packages/nc-gui/pages/[projectType]/form/[viewId]/index/index.vue

@ -20,12 +20,12 @@ function isRequired(_columnObj: Record<string, any>, required = false) {
return !!(required || (columnObj && columnObj.rqd && !columnObj.cdf))
}
const showCodeScannerOverlay = ref(false)
const fieldTitleForCurrentScan = ref('')
const scannerIsReady = ref(false)
const showCodeScannerOverlay = ref(false)
const onLoaded = async () => {
scannerIsReady.value = true
}
@ -39,10 +39,11 @@ const onDecode = async (codeValue: string) => {
if (!showCodeScannerOverlay.value) {
return
}
// TODO: remove try catch
try {
showCodeScannerOverlay.value = false
// formColumns.value[1].
formState.value[fieldTitleForCurrentScan.value] = codeValue
fieldTitleForCurrentScan.value = ''
showCodeScannerOverlay.value = false
} catch (error) {
console.error(error)
}

Loading…
Cancel
Save