|
|
|
@ -157,7 +157,6 @@ const handleUpdateRefTable = () => {
|
|
|
|
|
updateFieldName() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
const oneToOneEnabled = ref(false) |
|
|
|
|
|
|
|
|
|
const isAdvancedOptionsShownEasterEgg = ref(false) |
|
|
|
|
|
|
|
|
@ -196,9 +195,7 @@ const handleShowAdvanceOptions = () => {
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
|
<div class="w-full flex flex-col mb-2 mt-1"> |
|
|
|
|
<div class="mb-2">Relation Type <span class="text-red-500">*</span></div> |
|
|
|
|
<div class="border-2 p-6"> |
|
|
|
|
<div class="w-full flex flex-col gap-4"> |
|
|
|
|
<div class="flex flex-col gap-4"> |
|
|
|
|
<a-form-item :label="$t('labels.relationType')" v-bind="validateInfos.type" class="nc-ltar-relation-type"> |
|
|
|
|
<a-radio-group v-model:value="linkType" name="type" v-bind="validateInfos.type" :disabled="isEdit"> |
|
|
|
@ -214,7 +211,7 @@ const handleShowAdvanceOptions = () => {
|
|
|
|
|
</span> |
|
|
|
|
{{ $t('title.hasMany') }} |
|
|
|
|
</a-radio> |
|
|
|
|
<a-radio value="oo" data-testid="One to One"> |
|
|
|
|
<a-radio value="oo" data-testid="One to One" @dblclick="handleShowAdvanceOptions"> |
|
|
|
|
<span class="nc-ltar-icon nc-oo-icon"> |
|
|
|
|
<GeneralIcon icon="oneToOneSolid" /> |
|
|
|
|
</span> |
|
|
|
@ -223,17 +220,13 @@ const handleShowAdvanceOptions = () => {
|
|
|
|
|
</a-radio-group> |
|
|
|
|
</a-form-item> |
|
|
|
|
</div> |
|
|
|
|
<div v-if="isAdvancedOptionsShownEasterEgg && isEeUI" class="mt-4"> |
|
|
|
|
<div v-if="isAdvancedOptionsShownEasterEgg && isEeUI"> |
|
|
|
|
<a-switch v-model:checked="vModel.is_custom_link" size="small" name="Custom" @change="onCustomSwitchToggle" /> |
|
|
|
|
<span class="ml-3">Advanced Link</span> |
|
|
|
|
</div> |
|
|
|
|
<div |
|
|
|
|
:class="{ |
|
|
|
|
'mt-3': isAdvancedOptionsShownEasterEgg, |
|
|
|
|
'mt-4': !isAdvancedOptionsShownEasterEgg, |
|
|
|
|
}" |
|
|
|
|
> |
|
|
|
|
<LazySmartsheetColumnLinkAdvancedOptions v-if="isEeUI && vModel.is_custom_link" v-model:value="vModel" /> |
|
|
|
|
<div v-if="isEeUI && vModel.is_custom_link" :class="{}"> |
|
|
|
|
<LazySmartsheetColumnLinkAdvancedOptions v-model:value="vModel" :meta="meta" /> |
|
|
|
|
</div> |
|
|
|
|
<template v-else> |
|
|
|
|
<a-form-item class="flex w-full pb-2 nc-ltar-child-table" v-bind="validateInfos.childId"> |
|
|
|
|
<a-select |
|
|
|
@ -259,14 +252,11 @@ const handleShowAdvanceOptions = () => {
|
|
|
|
|
</NcTooltip> |
|
|
|
|
</div> |
|
|
|
|
</a-select-option> |
|
|
|
|
<template #suffixIcon> |
|
|
|
|
<GeneralIcon class="" icon="chevronDown" /> |
|
|
|
|
</template> |
|
|
|
|
</a-select> |
|
|
|
|
</a-form-item> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<div v-if="isEeUI" class="w-full flex-col"> |
|
|
|
|
<template v-if="isEeUI"> |
|
|
|
|
<div class="flex gap-2 items-center" :class="{ 'mb-2': limitRecToView }"> |
|
|
|
|
<a-switch |
|
|
|
|
v-model:checked="limitRecToView" |
|
|
|
@ -305,7 +295,7 @@ const handleShowAdvanceOptions = () => {
|
|
|
|
|
</NcSelect> |
|
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
|
<div class="mt-4 flex gap-2 items-center" :class="{ 'mb-2': limitRecToCond }"> |
|
|
|
|
<div class="flex gap-2 items-center" :class="{ 'mb-2': limitRecToCond }"> |
|
|
|
|
<a-switch |
|
|
|
|
v-model:checked="limitRecToCond" |
|
|
|
|
v-e="['c:link:limit-record-by-filter', { status: limitRecToCond }]" |
|
|
|
@ -332,8 +322,7 @@ const handleShowAdvanceOptions = () => {
|
|
|
|
|
:link-col-id="vModel.id" |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<template v-if="(!isXcdbBase && !isEdit) || isLinks"> |
|
|
|
|
<div> |
|
|
|
|
<NcButton |
|
|
|
@ -349,7 +338,6 @@ const handleShowAdvanceOptions = () => {
|
|
|
|
|
|
|
|
|
|
<GeneralIcon :icon="advancedOptions ? 'arrowUp' : 'arrowDown'" class="h-4 w-4" /> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</NcButton> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|