Browse Source

code scanner for forms - WIP (improve button look)

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

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

@ -4,6 +4,7 @@ import { RelationTypes, UITypes, isVirtualCol } from 'nocodb-sdk'
import { ref } from 'vue' import { ref } from 'vue'
import { StreamBarcodeReader } from 'vue-barcode-reader' import { StreamBarcodeReader } from 'vue-barcode-reader'
import { useSharedFormStoreOrThrow } from '#imports' import { useSharedFormStoreOrThrow } from '#imports'
import QrCodeScan from '~icons/mdi/qrcode-scan'
const { sharedFormView, submitForm, v$, formState, notFound, formColumns, submitted, secondsRemain, isLoading } = const { sharedFormView, submitForm, v$, formState, notFound, formColumns, submitted, secondsRemain, isLoading } =
useSharedFormStoreOrThrow() useSharedFormStoreOrThrow()
@ -173,14 +174,17 @@ const onDecode = async (scannedCodeValue: string) => {
{{ field.description }} {{ field.description }}
</div> </div>
<div v-if="field.enable_scanner"> <a-button
<a-button class="nc-btn-find-row-by-scan nc-toolbar-btn" @click="showCodeScannerForFieldTitle(field.title)"> v-if="field.enable_scanner"
class="nc-btn-fill-form-column-by-scan nc-toolbar-btn"
@click="showCodeScannerForFieldTitle(field.title)"
>
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<QrCodeScan /> <QrCodeScan />
<span class="!text-xs font-weight-normal"> {{ $t('activity.fillByCodeScan') }}</span> <span class="!text-xs font-weight-normal"> {{ $t('activity.fillByCodeScan') }}</span>
</div> </div>
</a-button> </a-button>
</div>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save