|
|
|
@ -21,21 +21,23 @@ const { tables } = storeToRefs(projectStore)
|
|
|
|
|
|
|
|
|
|
const { metas } = useMetas() |
|
|
|
|
|
|
|
|
|
const { t } = useI18n() |
|
|
|
|
|
|
|
|
|
setAdditionalValidations({ |
|
|
|
|
fk_relation_column_id: [{ required: true, message: 'Required' }], |
|
|
|
|
fk_rollup_column_id: [{ required: true, message: 'Required' }], |
|
|
|
|
rollup_function: [{ required: true, message: 'Required' }], |
|
|
|
|
fk_relation_column_id: [{ required: true, message: t('general.required') }], |
|
|
|
|
fk_rollup_column_id: [{ required: true, message: t('general.required') }], |
|
|
|
|
rollup_function: [{ required: true, message: t('general.required') }], |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const aggrFunctionsList = [ |
|
|
|
|
{ text: 'count', value: 'count' }, |
|
|
|
|
{ text: 'min', value: 'min' }, |
|
|
|
|
{ text: 'max', value: 'max' }, |
|
|
|
|
{ text: 'avg', value: 'avg' }, |
|
|
|
|
{ text: 'sum', value: 'sum' }, |
|
|
|
|
{ text: 'countDistinct', value: 'countDistinct' }, |
|
|
|
|
{ text: 'sumDistinct', value: 'sumDistinct' }, |
|
|
|
|
{ text: 'avgDistinct', value: 'avgDistinct' }, |
|
|
|
|
{ text: t('datatype.Count'), value: 'count' }, |
|
|
|
|
{ text: t('general.min'), value: 'min' }, |
|
|
|
|
{ text: t('general.max'), value: 'max' }, |
|
|
|
|
{ text: t('general.avg'), value: 'avg' }, |
|
|
|
|
{ text: t('general.sum'), value: 'sum' }, |
|
|
|
|
{ text: t('general.countDistinct'), value: 'countDistinct' }, |
|
|
|
|
{ text: t('general.sumDistinct'), value: 'sumDistinct' }, |
|
|
|
|
{ text: t('general.avgDistinct'), value: 'avgDistinct' }, |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
if (!vModel.value.fk_relation_column_id) vModel.value.fk_relation_column_id = null |
|
|
|
@ -133,7 +135,7 @@ const cellIcon = (column: ColumnType) =>
|
|
|
|
|
</a-form-item> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<a-form-item label="Aggregate function" v-bind="validateInfos.rollup_function"> |
|
|
|
|
<a-form-item :label="$t('labels.aggregateFunction')" v-bind="validateInfos.rollup_function"> |
|
|
|
|
<a-select |
|
|
|
|
v-model:value="vModel.rollup_function" |
|
|
|
|
dropdown-class-name="nc-dropdown-rollup-function" |
|
|
|
|