Browse Source

geodata: debug barcode options

pull/4641/head
flisowna 2 years ago
parent
commit
9c26bad728
  1. 1
      packages/nc-gui/components.d.ts
  2. 6
      packages/nc-gui/components/smartsheet/column/BarcodeOptions.vue
  3. 13
      packages/nc-gui/components/virtual-cell/barcode/Barcode.vue
  4. 47
      packages/nocodb/package-lock.json

1
packages/nc-gui/components.d.ts vendored

@ -201,6 +201,7 @@ declare module '@vue/runtime-core' {
MdiLogin: typeof import('~icons/mdi/login')['default']
MdiLogout: typeof import('~icons/mdi/logout')['default']
MdiMagnify: typeof import('~icons/mdi/magnify')['default']
MdiMapMarker: typeof import('~icons/mdi/map-marker')['default']
MdiMenu: typeof import('~icons/mdi/menu')['default']
MdiMenuDown: typeof import('~icons/mdi/menu-down')['default']
MdiMenuIcon: typeof import('~icons/mdi/menu-icon')['default']

6
packages/nc-gui/components/smartsheet/column/BarcodeOptions.vue

@ -62,7 +62,7 @@ onMounted(() => {
watch(columnsAllowedAsBarcodeValue, (newColumnsAllowedAsBarcodeValue) => {
if (vModel.value.fk_barcode_value_column_id == null) {
vModel.value.fk_barcode_value_column_id = newColumnsAllowedAsBarcodeValue?.[0].value
vModel.value.fk_barcode_value_column_id = newColumnsAllowedAsBarcodeValue?.[0]?.value
}
})
@ -71,6 +71,8 @@ setAdditionalValidations({
barcode_format: [{ required: true, message: 'Required' }],
})
const showBarcodeValueColumnInfoIcon = computed(() => !columnsAllowedAsBarcodeValue.value?.length)
// set default meta value
</script>
@ -90,7 +92,7 @@ setAdditionalValidations({
not-found-content="No valid Column Type can be found."
@click.stop
/>
<div v-if="!columnsAllowedAsBarcodeValue" class="pl-2">
<div v-if="showBarcodeValueColumnInfoIcon" class="pl-2">
<a-tooltip placement="bottom">
<template #title>
<span>

13
packages/nc-gui/components/virtual-cell/barcode/Barcode.vue

@ -26,6 +26,11 @@ const barcodeMeta = $computed(() => {
const handleModalOkClick = () => (modalVisible.value = false)
// const showBarcode = computed(() => barcodeValue?.value?.length > 0 && !tooManyCharsForBarcode.value)
const showBarcode = computed(() => {
return cellValue?.value?.length > 0 && !tooManyCharsForBarcode.value
})
const { showEditNonEditableFieldWarning, showClearNonEditableFieldWarning } = useShowNotEditableWarning()
</script>
@ -38,15 +43,11 @@ const { showEditNonEditableFieldWarning, showClearNonEditableFieldWarning } = us
:footer="null"
@ok="handleModalOkClick"
>
<JsBarcodeWrapper
v-if="barcodeValue && !tooManyCharsForBarcode"
:barcode-value="barcodeValue"
:barcode-format="barcodeMeta.barcodeFormat"
>
<JsBarcodeWrapper v-if="showBarcode" :barcode-value="barcodeValue" :barcode-format="barcodeMeta.barcodeFormat">
</JsBarcodeWrapper>
</a-modal>
<JsBarcodeWrapper
v-if="barcodeValue && !tooManyCharsForBarcode"
v-if="showBarcode"
:barcode-value="barcodeValue"
:barcode-format="barcodeMeta.barcodeFormat"
class="nc-barcode-svg"

47
packages/nocodb/package-lock.json generated

@ -151,6 +151,28 @@
"vuedraggable": "^2.24.3"
}
},
"../nocodb-sdk": {
"version": "0.100.2",
"license": "AGPL-3.0-or-later",
"dependencies": {
"axios": "^0.21.1",
"jsep": "^1.3.6"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.0.1",
"@typescript-eslint/parser": "^4.0.1",
"cspell": "^4.1.0",
"eslint": "^7.8.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-functional": "^3.0.2",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-prettier": "^4.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.1.1",
"typescript": "^4.0.2"
}
},
"node_modules/@azure/abort-controller": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.1.0.tgz",
@ -10634,13 +10656,8 @@
"dev": true
},
"node_modules/nocodb-sdk": {
"version": "0.100.2",
"resolved": "file:../nocodb-sdk",
"license": "AGPL-3.0-or-later",
"dependencies": {
"axios": "^0.21.1",
"jsep": "^1.3.6"
}
"resolved": "../nocodb-sdk",
"link": true
},
"node_modules/node-abort-controller": {
"version": "3.0.1",
@ -26042,10 +26059,22 @@
"dev": true
},
"nocodb-sdk": {
"version": "0.100.2",
"version": "file:../nocodb-sdk",
"requires": {
"@typescript-eslint/eslint-plugin": "^4.0.1",
"@typescript-eslint/parser": "^4.0.1",
"axios": "^0.21.1",
"jsep": "^1.3.6"
"cspell": "^4.1.0",
"eslint": "^7.8.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-functional": "^3.0.2",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-prettier": "^4.0.0",
"jsep": "^1.3.6",
"npm-run-all": "^4.1.5",
"prettier": "^2.1.1",
"typescript": "^4.0.2"
}
},
"node-abort-controller": {

Loading…
Cancel
Save