Browse Source

fix(gui-v2): add missing isUIAllowed('xcDatatableEditable') & i18n

pull/3234/head
Wing-Kam Wong 2 years ago
parent
commit
4139e2da81
  1. 19
      packages/nc-gui-v2/components/smartsheet/Grid.vue

19
packages/nc-gui-v2/components/smartsheet/Grid.vue

@ -479,17 +479,28 @@ const expandForm = (row: Row, state: Record<string, any>) => {
</tr>
</tbody>
</table>
<template v-if="!isLocked" #overlay>
<template v-if="!isLocked && isUIAllowed('xcDatatableEditable')" #overlay>
<a-menu class="bg-white shadow" @click="contextMenu = false">
<a-menu-item v-if="contextMenuTarget" @click="deleteRow(contextMenuTarget.row)"
><span class="text-xs">Delete row</span></a-menu-item
><span class="text-xs">
<!-- Delete Row -->
{{ $t('activity.deleteRow') }}
</span></a-menu-item
>
<a-menu-item @click="deleteSelectedRows"
><span class="text-xs">
<!-- Delete Selected Rows -->
{{ $t('activity.deleteSelectedRow') }}
</span></a-menu-item
>
<a-menu-item @click="deleteSelectedRows"><span class="text-xs">Delete all selected rows</span></a-menu-item>
<a-menu-item v-if="contextMenuTarget" @click="clearCell(contextMenuTarget)"
><span class="text-xs">Clear cell</span>
</a-menu-item>
<a-menu-item v-if="contextMenuTarget" @click="addEmptyRow(contextMenuTarget.row + 1)">
<span class="text-xs">Insert new row</span>
<span class="text-xs">
<!-- Insert New Row -->
{{ $t('activity.insertRow') }}
</span>
</a-menu-item>
</a-menu>
</template>

Loading…
Cancel
Save