|
|
@ -1017,71 +1017,77 @@ const getPluralName = (name: string) => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-select-option> |
|
|
|
</a-select-option> |
|
|
|
</NcSelect> |
|
|
|
</NcSelect> |
|
|
|
<!-- <div |
|
|
|
<div |
|
|
|
v-if="range.fk_to_column_id === null && isEeUI" |
|
|
|
v-if="range.fk_to_column_id === null && isEeUI" |
|
|
|
class="cursor-pointer flex items-center text-gray-800 gap-1" |
|
|
|
class="cursor-pointer flex items-center text-gray-800 gap-1" |
|
|
|
@click="range.fk_to_column_id = undefined" |
|
|
|
@click="range.fk_to_column_id = undefined" |
|
|
|
> |
|
|
|
> |
|
|
|
<component :is="iconMap.plus" class="h-4 w-4" /> |
|
|
|
<component :is="iconMap.plus" class="h-4 w-4" /> |
|
|
|
{{ $t('activity.addEndDate') }} |
|
|
|
{{ $t('activity.addEndDate') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<template v-else-if="isEeUI"> |
|
|
|
<template v-else-if="isEeUI"> |
|
|
|
<span> |
|
|
|
<span> |
|
|
|
{{ $t('activity.withEndDate') }} |
|
|
|
{{ $t('activity.withEndDate') }} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
<div class="flex"> |
|
|
|
<div class="flex"> |
|
|
|
<NcSelect |
|
|
|
<NcSelect |
|
|
|
v-model:value="range.fk_to_column_id" |
|
|
|
v-model:value="range.fk_to_column_id" |
|
|
|
:disabled="isMetaLoading" |
|
|
|
:disabled="isMetaLoading" |
|
|
|
:loading="isMetaLoading" |
|
|
|
:loading="isMetaLoading" |
|
|
|
:placeholder="$t('placenc-to-seleholder.notSelected')" |
|
|
|
:placeholder="$t('placeholder.notSelected')" |
|
|
|
class="!rounded-r-none ct" |
|
|
|
class="!rounded-r-none ct" |
|
|
|
> |
|
|
|
|
|
|
|
<a-select-option |
|
|
|
|
|
|
|
v-for="(option, id) in [...viewSelectFieldOptions].filter((f) => { |
|
|
|
|
|
|
|
// If the fk_from_column_id of first range is Date, then all the other ranges should be Date |
|
|
|
|
|
|
|
// If the fk_from_column_id of first range is DateTime, then all the other ranges should be DateTime |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const firstRange = viewSelectFieldOptions.find((f) => f.value === form.calendar_range[0].fk_from_column_id) |
|
|
|
|
|
|
|
return firstRange?.uidt === f.uidt |
|
|
|
|
|
|
|
})" |
|
|
|
|
|
|
|
:key="id" |
|
|
|
|
|
|
|
:value="option.value" |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
<div class="flex items-center"> |
|
|
|
<a-select-option |
|
|
|
<SmartsheetHeaderIcon :column="option" /> |
|
|
|
v-for="(option, id) in [...viewSelectFieldOptions].filter((f) => { |
|
|
|
<NcTooltip class="truncate flex-1 max-w-18" placement="top" show-on-truncate-only> |
|
|
|
// If the fk_from_column_id of first range is Date, then all the other ranges should be Date |
|
|
|
<template #title>{{ option.label }}</template> |
|
|
|
// If the fk_from_column_id of first range is DateTime, then all the other ranges should be DateTime |
|
|
|
{{ option.label }} |
|
|
|
|
|
|
|
</NcTooltip> |
|
|
|
const firstRange = viewSelectFieldOptions.find( |
|
|
|
</div> |
|
|
|
(f) => f.value === form.calendar_range[0].fk_from_column_id, |
|
|
|
</a-select-option> |
|
|
|
) |
|
|
|
</NcSelect> |
|
|
|
return firstRange?.uidt === f.uidt |
|
|
|
<NcButton class="!rounded-l-none !border-l-0" size="small" type="secondary" @click="range.fk_to_column_id = null"> |
|
|
|
})" |
|
|
|
<component :is="iconMap.delete" class="h-4 w-4" /> |
|
|
|
:key="id" |
|
|
|
|
|
|
|
:value="option.value" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div class="flex items-center"> |
|
|
|
|
|
|
|
<SmartsheetHeaderIcon :column="option" /> |
|
|
|
|
|
|
|
<NcTooltip class="truncate flex-1 max-w-18" placement="top" show-on-truncate-only> |
|
|
|
|
|
|
|
<template #title>{{ option.label }}</template> |
|
|
|
|
|
|
|
{{ option.label }} |
|
|
|
|
|
|
|
</NcTooltip> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</a-select-option> |
|
|
|
|
|
|
|
</NcSelect> |
|
|
|
|
|
|
|
<NcButton |
|
|
|
|
|
|
|
class="!rounded-l-none !border-l-0" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
type="secondary" |
|
|
|
|
|
|
|
@click="range.fk_to_column_id = null" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<component :is="iconMap.delete" class="h-4 w-4" /> |
|
|
|
|
|
|
|
</NcButton> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<NcButton |
|
|
|
|
|
|
|
v-if="index !== 0" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
type="secondary" |
|
|
|
|
|
|
|
@click=" |
|
|
|
|
|
|
|
() => { |
|
|
|
|
|
|
|
form.calendar_range = form.calendar_range.filter((_, i) => i !== index) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<component :is="iconMap.close" /> |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<NcButton |
|
|
|
</div> |
|
|
|
v-if="index !== 0" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
type="secondary" |
|
|
|
|
|
|
|
@click=" |
|
|
|
|
|
|
|
() => { |
|
|
|
|
|
|
|
form.calendar_range = form.calendar_range.filter((_, i) => i !== index) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<component :is="iconMap.close" /> |
|
|
|
|
|
|
|
</NcButton> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</div> --> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <NcButton class="mt-2" size="small" type="secondary" @click="addCalendarRange"> |
|
|
|
<!-- <NcButton class="mt-2" size="small" type="secondary" @click="addCalendarRange"> |
|
|
|
<component :is="iconMap.plus" /> |
|
|
|
<component :is="iconMap.plus" /> |
|
|
|
Add another date field |
|
|
|
Add another date field |
|
|
|
</NcButton> --> |
|
|
|
</NcButton> --> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div |
|
|
|
<div |
|
|
|
v-if="isCalendarReadonly(form.calendar_range)" |
|
|
|
v-if="isCalendarReadonly(form.calendar_range)" |
|
|
|