Browse Source

WIP barcode select barcode format commented

pull/4641/head
flisowna 2 years ago
parent
commit
19d001ef5e
  1. 6
      packages/nc-gui/components/smartsheet/column/BarcodeOptions.vue
  2. 17
      packages/nc-gui/components/virtual-cell/barcode/Barcode.vue

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

@ -62,7 +62,7 @@ onMounted(() => {
setAdditionalValidations({
fk_barcode_value_column_id: [{ required: true, message: 'Required' }],
barcode_format: [{ required: true, message: 'Required' }],
// barcode_format: [{ required: true, message: 'Required' }],
})
</script>
@ -81,7 +81,7 @@ setAdditionalValidations({
@click.stop
/>
</a-form-item>
<a-form-item
<!-- <a-form-item
class="flex w-1/2 pb-2 nc-qr-code-value-column-select"
:label="$t('labels.barcodeFormat')"
v-bind="validateInfos.barcode_format"
@ -92,7 +92,7 @@ setAdditionalValidations({
placeholder="Select a Barcode format"
@click.stop
/>
</a-form-item>
</a-form-item> -->
</a-col>
</a-row>
</template>

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

@ -25,14 +25,21 @@ const { showEditNonEditableFieldWarning, showClearNonEditableFieldWarning } = us
<a-modal
v-model:visible="modalVisible"
:class="{ active: modalVisible }"
wrap-class-name="nc-qr-code-large"
wrap-class-name="nc-qr-code-large amodal-wrapper"
:body-style="{ padding: '0px' }"
:footer="null"
@ok="handleModalOkClick"
>
<JsBarcodeWrapper v-if="barcodeValue && !tooManyCharsForQrCode" tag="svg" :value="barcodeValue" width="3" />
</a-modal>
<div @click="showQrModal">
<JsBarcodeWrapper v-if="barcodeValue && !tooManyCharsForQrCode" :value="barcodeValue" width="1"></JsBarcodeWrapper>
<JsBarcodeWrapper
v-if="barcodeValue && !tooManyCharsForQrCode"
tag="svg"
class="w-full"
:value="barcodeValue"
width="3"
></JsBarcodeWrapper>
</div>
<div v-if="tooManyCharsForQrCode" class="text-left text-wrap mt-2 text-[#e65100] text-xs">
@ -45,3 +52,9 @@ const { showEditNonEditableFieldWarning, showClearNonEditableFieldWarning } = us
{{ $t('msg.warning.nonEditableFields.qrFieldsCannotBeDirectlyChanged') }}
</div>
</template>
<style lang="scss">
.amodal-wrapper {
width: 100px;
}
</style>

Loading…
Cancel
Save