Browse Source

fix(nc-gui): add missing v-else condition

pull/9958/head
Ramesh Mane 5 days ago
parent
commit
788df21b24
  1. 114
      packages/nc-gui/components/smartsheet/column/EditOrAdd.vue

114
packages/nc-gui/components/smartsheet/column/EditOrAdd.vue

@ -1254,7 +1254,12 @@ watch(activeAiTab, (newValue) => {
</Transition> </Transition>
</template> </template>
<a-form-item v-if="enableDescription && !aiAutoSuggestMode"> <a-form-item
v-if="enableDescription && !aiAutoSuggestMode"
:class="{
'!pb-4': embedMode,
}"
>
<div class="flex gap-3 text-gray-800 h-7 mb-1 items-center justify-between"> <div class="flex gap-3 text-gray-800 h-7 mb-1 items-center justify-between">
<span class="text-[13px]"> <span class="text-[13px]">
{{ $t('labels.description') }} {{ $t('labels.description') }}
@ -1281,8 +1286,13 @@ watch(activeAiTab, (newValue) => {
</a-form-item> </a-form-item>
<template v-if="props.fromTableExplorer"> <template v-if="props.fromTableExplorer">
<a-form-item> <a-form-item
<NcButton v-if="!enableDescription" size="small" type="text" @click.stop="triggerDescriptionEnable"> v-if="!enableDescription"
:class="{
'!pb-4': embedMode,
}"
>
<NcButton size="small" type="text" @click.stop="triggerDescriptionEnable">
<div class="flex !text-gray-700 items-center gap-2"> <div class="flex !text-gray-700 items-center gap-2">
<GeneralIcon icon="plus" class="h-4 w-4" /> <GeneralIcon icon="plus" class="h-4 w-4" />
@ -1294,57 +1304,59 @@ watch(activeAiTab, (newValue) => {
</a-form-item> </a-form-item>
</template> </template>
<div <template v-else>
class="flex items-center justify-between gap-2 empty:hidden" <div
:class="{ class="flex items-center justify-between gap-2 empty:hidden"
'sticky bottom-0 z-10 bg-white px-5 pb-5 -mx-5': true, :class="{
'border-t-1 border-nc-border-gray-medium pt-3': isScrollEnabled, 'sticky bottom-0 z-10 bg-white px-5 pb-5 -mx-5': true,
}" 'border-t-1 border-nc-border-gray-medium pt-3': isScrollEnabled,
> }"
<NcButton v-if="!enableDescription" size="small" type="text" @click.stop="triggerDescriptionEnable"> >
<div class="flex !text-gray-700 items-center gap-2"> <NcButton v-if="!enableDescription" size="small" type="text" @click.stop="triggerDescriptionEnable">
<GeneralIcon icon="plus" class="h-4 w-4" /> <div class="flex !text-gray-700 items-center gap-2">
<GeneralIcon icon="plus" class="h-4 w-4" />
<span class="first-letter:capitalize">
{{ $t('labels.addDescription').toLowerCase() }}
</span>
</div>
</NcButton>
<div v-else-if="!aiAutoSuggestMode"></div>
<a-form-item v-if="!aiAutoSuggestMode"> <span class="first-letter:capitalize">
<div {{ $t('labels.addDescription').toLowerCase() }}
class="flex gap-x-2 justify-end" </span>
:class="{ </div>
'justify-end': !props.embedMode, </NcButton>
}" <div v-else-if="!aiAutoSuggestMode"></div>
>
<!-- Cancel -->
<NcButton size="small" html-type="button" type="secondary" :disabled="saving" @click="emit('cancel')">
{{ $t('general.cancel') }}
</NcButton>
<!-- Save --> <a-form-item v-if="!aiAutoSuggestMode">
<NcButton <div
html-type="submit" class="flex gap-x-2 justify-end"
type="primary" :class="{
:theme="isAiMode ? 'ai' : 'default'" 'justify-end': !props.embedMode,
:loading="saving" }"
:disabled="!formState.uidt || disableSubmitBtn || saving"
size="small"
:label="submitBtnLabel.label"
:loading-label="submitBtnLabel.loadingLabel"
data-testid="nc-field-modal-submit-btn"
@click.prevent="onSubmit"
> >
{{ submitBtnLabel.label }} <!-- Cancel -->
<template #loading> <NcButton size="small" html-type="button" type="secondary" :disabled="saving" @click="emit('cancel')">
{{ submitBtnLabel.loadingLabel }} {{ $t('general.cancel') }}
</template> </NcButton>
</NcButton>
</div> <!-- Save -->
</a-form-item> <NcButton
</div> html-type="submit"
type="primary"
:theme="isAiMode ? 'ai' : 'default'"
:loading="saving"
:disabled="!formState.uidt || disableSubmitBtn || saving"
size="small"
:label="submitBtnLabel.label"
:loading-label="submitBtnLabel.loadingLabel"
data-testid="nc-field-modal-submit-btn"
@click.prevent="onSubmit"
>
{{ submitBtnLabel.label }}
<template #loading>
{{ submitBtnLabel.loadingLabel }}
</template>
</NcButton>
</div>
</a-form-item>
</div>
</template>
</template> </template>
</a-form> </a-form>
</div> </div>

Loading…
Cancel
Save