|
|
@ -35,6 +35,8 @@ const { |
|
|
|
|
|
|
|
|
|
|
|
const columnToValidate = [UITypes.Email, UITypes.URL, UITypes.PhoneNumber] |
|
|
|
const columnToValidate = [UITypes.Email, UITypes.URL, UITypes.PhoneNumber] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const onlyNameUpdateOnEditColumns = [UITypes.LinkToAnotherRecord, UITypes.Lookup, UITypes.Rollup] |
|
|
|
|
|
|
|
|
|
|
|
const uiTypesOptions = computed<typeof uiTypes>(() => { |
|
|
|
const uiTypesOptions = computed<typeof uiTypes>(() => { |
|
|
|
return [ |
|
|
|
return [ |
|
|
|
...uiTypes.filter((t) => !isEdit.value || !t.virtual), |
|
|
|
...uiTypes.filter((t) => !isEdit.value || !t.virtual), |
|
|
@ -80,6 +82,8 @@ watchEffect(() => { |
|
|
|
antInput.value.focus() |
|
|
|
antInput.value.focus() |
|
|
|
antInput.value.select() |
|
|
|
antInput.value.select() |
|
|
|
}, 300) |
|
|
|
}, 300) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
advancedOptions.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
@ -96,7 +100,7 @@ watch( |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="max-w-[450px] min-w-[350px] w-max max-h-[95vh] bg-white shadow p-4 overflow-auto" @click.stop> |
|
|
|
<div class="max-w-[550px] min-w-[450px] w-max max-h-[95vh] bg-white shadow p-4 overflow-auto" @click.stop> |
|
|
|
<a-form v-model="formState" name="column-create-or-edit" layout="vertical"> |
|
|
|
<a-form v-model="formState" name="column-create-or-edit" layout="vertical"> |
|
|
|
<a-form-item :label="$t('labels.columnName')" v-bind="validateInfos.column_name"> |
|
|
|
<a-form-item :label="$t('labels.columnName')" v-bind="validateInfos.column_name"> |
|
|
|
<a-input |
|
|
|
<a-input |
|
|
@ -107,7 +111,10 @@ watch( |
|
|
|
@input="onAlter(8)" |
|
|
|
@input="onAlter(8)" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
<a-form-item :label="$t('labels.columnType')"> |
|
|
|
<a-form-item |
|
|
|
|
|
|
|
v-if="!editColumnDropdown && onlyNameUpdateOnEditColumns.find((col) => col === formState.uidt)" |
|
|
|
|
|
|
|
:label="$t('labels.columnType')" |
|
|
|
|
|
|
|
> |
|
|
|
<a-select |
|
|
|
<a-select |
|
|
|
v-model:value="formState.uidt" |
|
|
|
v-model:value="formState.uidt" |
|
|
|
show-search |
|
|
|
show-search |
|
|
@ -129,9 +136,9 @@ watch( |
|
|
|
<SmartsheetColumnDurationOptions v-if="formState.uidt === UITypes.Duration" /> |
|
|
|
<SmartsheetColumnDurationOptions v-if="formState.uidt === UITypes.Duration" /> |
|
|
|
<SmartsheetColumnRatingOptions v-if="formState.uidt === UITypes.Rating" /> |
|
|
|
<SmartsheetColumnRatingOptions v-if="formState.uidt === UITypes.Rating" /> |
|
|
|
<SmartsheetColumnCheckboxOptions v-if="formState.uidt === UITypes.Checkbox" /> |
|
|
|
<SmartsheetColumnCheckboxOptions v-if="formState.uidt === UITypes.Checkbox" /> |
|
|
|
<SmartsheetColumnLookupOptions v-if="formState.uidt === UITypes.Lookup" /> |
|
|
|
<SmartsheetColumnLookupOptions v-if="!editColumnDropdown && formState.uidt === UITypes.Lookup" /> |
|
|
|
<SmartsheetColumnDateOptions v-if="formState.uidt === UITypes.Date" /> |
|
|
|
<SmartsheetColumnDateOptions v-if="formState.uidt === UITypes.Date" /> |
|
|
|
<SmartsheetColumnRollupOptions v-if="formState.uidt === UITypes.Rollup" /> |
|
|
|
<SmartsheetColumnRollupOptions v-if="!editColumnDropdown && formState.uidt === UITypes.Rollup" /> |
|
|
|
<SmartsheetColumnLinkedToAnotherRecordOptions v-if="formState.uidt === UITypes.LinkToAnotherRecord" /> |
|
|
|
<SmartsheetColumnLinkedToAnotherRecordOptions v-if="formState.uidt === UITypes.LinkToAnotherRecord" /> |
|
|
|
<SmartsheetColumnSpecificDBTypeOptions v-if="formState.uidt === UITypes.SpecificDBType" /> |
|
|
|
<SmartsheetColumnSpecificDBTypeOptions v-if="formState.uidt === UITypes.SpecificDBType" /> |
|
|
|
<SmartsheetColumnPercentOptions v-if="formState.uidt === UITypes.Percent" /> |
|
|
|
<SmartsheetColumnPercentOptions v-if="formState.uidt === UITypes.Percent" /> |
|
|
|