|
|
@ -18,7 +18,7 @@ const { fields, metaColumnById } = useViewColumns(activeView, meta, () => reload |
|
|
|
|
|
|
|
|
|
|
|
const vModel = useVModel(props, 'value', emit) |
|
|
|
const vModel = useVModel(props, 'value', emit) |
|
|
|
|
|
|
|
|
|
|
|
const { column } = useColumnCreateStoreOrThrow() |
|
|
|
const { setAdditionalValidations, validateInfos, column } = useColumnCreateStoreOrThrow() |
|
|
|
|
|
|
|
|
|
|
|
const allowedColumnTypesForQrValue = [UITypes.Formula, UITypes.SingleLineText, UITypes.LongText] as string[] |
|
|
|
const allowedColumnTypesForQrValue = [UITypes.Formula, UITypes.SingleLineText, UITypes.LongText] as string[] |
|
|
|
|
|
|
|
|
|
|
@ -35,24 +35,30 @@ const columnsAllowedAsQrValue = computed<SelectProps['options']>(() => { |
|
|
|
|
|
|
|
|
|
|
|
// set default value |
|
|
|
// set default value |
|
|
|
vModel.value.fk_qr_value_column_id = (column?.value?.colOptions as Record<string, any>)?.fk_qr_value_column_id || '' |
|
|
|
vModel.value.fk_qr_value_column_id = (column?.value?.colOptions as Record<string, any>)?.fk_qr_value_column_id || '' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setAdditionalValidations({ |
|
|
|
|
|
|
|
fk_qr_value_column_id: [{ required: true, message: 'Required' }], |
|
|
|
|
|
|
|
}) |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<a-row> |
|
|
|
<a-row> |
|
|
|
<a-col :span="24"> |
|
|
|
<a-col :span="24"> |
|
|
|
<div> |
|
|
|
|
|
|
|
<span class="font-bold"> {{ $t('labels.chooseQrValueColumn') }}</span> |
|
|
|
|
|
|
|
<a-divider class="!my-2" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="nc-fields-list py-1"> |
|
|
|
<div class="nc-fields-list py-1"> |
|
|
|
<div class="grouping-field"> |
|
|
|
<div class="grouping-field"> |
|
|
|
<a-select |
|
|
|
<a-form-item |
|
|
|
v-model:value="vModel.fk_qr_value_column_id" |
|
|
|
class="flex w-1/2 pb-2" |
|
|
|
class="w-full nc-kanban-grouping-field-select" |
|
|
|
:label="$t('labels.qrCodeValueColumn')" |
|
|
|
:options="columnsAllowedAsQrValue" |
|
|
|
v-bind="validateInfos.fk_qr_value_column_id" |
|
|
|
placeholder="Select a Grouping Field" |
|
|
|
> |
|
|
|
@click.stop |
|
|
|
<a-select |
|
|
|
/> |
|
|
|
v-model:value="vModel.fk_qr_value_column_id" |
|
|
|
|
|
|
|
class="w-full nc-kanban-grouping-field-select" |
|
|
|
|
|
|
|
:options="columnsAllowedAsQrValue" |
|
|
|
|
|
|
|
placeholder="Select a Grouping Field" |
|
|
|
|
|
|
|
@click.stop |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
|