|
|
@ -4,6 +4,7 @@ import tinycolor from 'tinycolor2' |
|
|
|
import { CheckboxGroup, Checkbox, RadioGroup, Radio } from 'ant-design-vue' |
|
|
|
import { CheckboxGroup, Checkbox, RadioGroup, Radio } from 'ant-design-vue' |
|
|
|
import type { Select as AntSelect } from 'ant-design-vue' |
|
|
|
import type { Select as AntSelect } from 'ant-design-vue' |
|
|
|
import type { UserFieldRecordType } from 'nocodb-sdk' |
|
|
|
import type { UserFieldRecordType } from 'nocodb-sdk' |
|
|
|
|
|
|
|
import type { FormFieldsLimitOptionsType } from '~/lib' |
|
|
|
import { |
|
|
|
import { |
|
|
|
ActiveCellInj, |
|
|
|
ActiveCellInj, |
|
|
|
CellClickHookInj, |
|
|
|
CellClickHookInj, |
|
|
@ -26,12 +27,6 @@ import { |
|
|
|
} from '#imports' |
|
|
|
} from '#imports' |
|
|
|
import MdiCloseCircle from '~icons/mdi/close-circle' |
|
|
|
import MdiCloseCircle from '~icons/mdi/close-circle' |
|
|
|
|
|
|
|
|
|
|
|
interface LimitOptionsType { |
|
|
|
|
|
|
|
id: string |
|
|
|
|
|
|
|
order: number |
|
|
|
|
|
|
|
show: boolean |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
interface Props { |
|
|
|
interface Props { |
|
|
|
modelValue?: UserFieldRecordType[] | UserFieldRecordType | string | null |
|
|
|
modelValue?: UserFieldRecordType[] | UserFieldRecordType | string | null |
|
|
|
rowIndex?: number |
|
|
|
rowIndex?: number |
|
|
@ -86,7 +81,8 @@ const { isUIAllowed } = useRoles() |
|
|
|
const options = computed<UserFieldRecordType[]>(() => { |
|
|
|
const options = computed<UserFieldRecordType[]>(() => { |
|
|
|
let order = 1 |
|
|
|
let order = 1 |
|
|
|
const limitOptionsById = |
|
|
|
const limitOptionsById = |
|
|
|
((parseProp(column.value.meta)?.limitOptions || []).reduce((o: Record<string, LimitOptionsType>, f: LimitOptionsType) => { |
|
|
|
((parseProp(column.value.meta)?.limitOptions || []).reduce( |
|
|
|
|
|
|
|
(o: Record<string, FormFieldsLimitOptionsType>, f: FormFieldsLimitOptionsType) => { |
|
|
|
if (f?.order !== undefined && order < f.order) { |
|
|
|
if (f?.order !== undefined && order < f.order) { |
|
|
|
order = f.order |
|
|
|
order = f.order |
|
|
|
} |
|
|
|
} |
|
|
@ -94,7 +90,9 @@ const options = computed<UserFieldRecordType[]>(() => { |
|
|
|
...o, |
|
|
|
...o, |
|
|
|
[f.id]: f, |
|
|
|
[f.id]: f, |
|
|
|
} |
|
|
|
} |
|
|
|
}, {}) as Record<string, LimitOptionsType>) ?? {} |
|
|
|
}, |
|
|
|
|
|
|
|
{}, |
|
|
|
|
|
|
|
) as Record<string, FormFieldsLimitOptionsType>) ?? {} |
|
|
|
|
|
|
|
|
|
|
|
const collaborators: UserFieldRecordType[] = [] |
|
|
|
const collaborators: UserFieldRecordType[] = [] |
|
|
|
|
|
|
|
|
|
|
|