Browse Source

refactor: add tooltip for disabled ui datatype

pull/8708/head
Pranav C 4 months ago
parent
commit
e125832a1b
  1. 10
      packages/nc-gui/components/smartsheet/column/UITypesOptionsWithSearch.vue
  2. 1
      packages/nc-gui/lang/en.json

10
packages/nc-gui/components/smartsheet/column/UITypesOptionsWithSearch.vue

@ -101,9 +101,16 @@ const isDisabledUIType = (type: UITypes) => {
{{ options.length ? $t('title.noResultsMatchedYourSearch') : 'The list is empty' }}
</div>
<div
<NcTooltip
v-for="(option, index) in filteredOptions"
:key="index"
:disabled="!isDisabledUIType(option.name)"
placement="left"
>
<template #title>
{{ $t('tooltip.typeNotAllowed') }}
</template>
<div
class="flex w-full py-2 items-center justify-between px-2 rounded-md"
:class="[
`nc-column-list-option-${index}`,
@ -126,6 +133,7 @@ const isDisabledUIType = (type: UITypes) => {
<span v-if="option.deprecated" class="!text-xs !text-gray-300">({{ $t('general.deprecated') }})</span>
</div>
</div>
</NcTooltip>
</div>
</div>
</template>

1
packages/nc-gui/lang/en.json

@ -1040,6 +1040,7 @@
"group": "Group"
},
"tooltip": {
"typeNotAllowed": "This datatype is not allowed due to restricted schema alterations for this source.",
"dataWriteOptionDisabled": "Data editing can only be disabled when 'Schema editing' is also disabled.",
"allowMetaWrite": "Enable this option to allow modifications to the database schema, including adding, altering, or deleting tables and columns. Use with caution, as changes may affect application functionality.",
"allowDataWrite": "Enable this option to allow updating, deleting, or inserting data within the database tables. Ideal for administrative users who need to manage data directly.",

Loading…
Cancel
Save