|
|
|
@ -101,17 +101,6 @@ const onConfirmDeleteRowClick = async () => {
|
|
|
|
|
</h5> |
|
|
|
|
|
|
|
|
|
<div class="flex-1" /> |
|
|
|
|
|
|
|
|
|
<a-tooltip placement="bottom"> |
|
|
|
|
<template #title> |
|
|
|
|
<div class="text-center w-full">{{ $t('general.reload') }}</div> |
|
|
|
|
</template> |
|
|
|
|
<mdi-reload |
|
|
|
|
v-if="!isNew" |
|
|
|
|
class="nc-icon-transition cursor-pointer select-none text-gray-500 mx-1 min-w-4" |
|
|
|
|
@click="loadRow" |
|
|
|
|
/> |
|
|
|
|
</a-tooltip> |
|
|
|
|
<a-tooltip placement="bottom"> |
|
|
|
|
<template #title> |
|
|
|
|
<!-- todo: i18n --> |
|
|
|
@ -137,32 +126,6 @@ const onConfirmDeleteRowClick = async () => {
|
|
|
|
|
/> |
|
|
|
|
</a-tooltip> |
|
|
|
|
|
|
|
|
|
<a-tooltip v-if="!isSqlView" placement="bottom"> |
|
|
|
|
<!-- Duplicate row --> |
|
|
|
|
<template #title> |
|
|
|
|
<div class="text-center w-full">{{ $t('activity.duplicateRow') }}</div> |
|
|
|
|
</template> |
|
|
|
|
<MdiContentCopy |
|
|
|
|
v-if="isUIAllowed('xcDatatableEditable') && !isNew" |
|
|
|
|
v-e="['c:row-expand:duplicate']" |
|
|
|
|
class="nc-icon-transition cursor-pointer select-none nc-duplicate-row text-gray-500 mx-1 min-w-4" |
|
|
|
|
@click="!isNew && emit('duplicateRow')" |
|
|
|
|
/> |
|
|
|
|
</a-tooltip> |
|
|
|
|
|
|
|
|
|
<a-tooltip v-if="!isSqlView" placement="bottom"> |
|
|
|
|
<!-- Delete row --> |
|
|
|
|
<template #title> |
|
|
|
|
<div class="text-center w-full">{{ $t('activity.deleteRow') }}</div> |
|
|
|
|
</template> |
|
|
|
|
<MdiDeleteOutline |
|
|
|
|
v-if="isUIAllowed('xcDatatableEditable') && !isNew" |
|
|
|
|
v-e="['c:row-expand:delete']" |
|
|
|
|
class="nc-icon-transition cursor-pointer select-none nc-delete-row text-gray-500 mx-1 min-w-4" |
|
|
|
|
@click="!isNew && onDeleteRowClick()" |
|
|
|
|
/> |
|
|
|
|
</a-tooltip> |
|
|
|
|
|
|
|
|
|
<a-dropdown-button class="nc-expand-form-save-btn" type="primary" :disabled="!isUIAllowed('tableRowUpdate')" @click="save"> |
|
|
|
|
<template #icon><MdiMenuDown /></template> |
|
|
|
|
|
|
|
|
@ -192,17 +155,39 @@ const onConfirmDeleteRowClick = async () => {
|
|
|
|
|
</div> |
|
|
|
|
</a-dropdown-button> |
|
|
|
|
|
|
|
|
|
<a-tooltip placement="bottom"> |
|
|
|
|
<!-- Close --> |
|
|
|
|
<template #title> |
|
|
|
|
<div class="text-center w-full">{{ $t('general.close') }}</div> |
|
|
|
|
<a-dropdown> |
|
|
|
|
<MdiDotsVertical class="nc-icon-transition" /> |
|
|
|
|
<template #overlay> |
|
|
|
|
<a-menu> |
|
|
|
|
<a-menu-item v-if="!isNew" @click="loadRow"> |
|
|
|
|
<div v-e="['c:row-expand:reload']" class="py-2 flex gap-2 items-center"> |
|
|
|
|
<mdi-reload class="nc-icon-transition cursor-pointer select-none text-gray-500 mx-1 min-w-4" /> |
|
|
|
|
{{ $t('general.reload') }} |
|
|
|
|
</div> |
|
|
|
|
</a-menu-item> |
|
|
|
|
<a-menu-item v-if="isUIAllowed('xcDatatableEditable') && !isNew" @click="!isNew && emit('duplicateRow')"> |
|
|
|
|
<div v-e="['c:row-expand:duplicate']" class="py-2 flex gap-2 a"> |
|
|
|
|
<MdiContentCopy class="nc-icon-transition cursor-pointer select-none nc-duplicate-row text-gray-500 mx-1 min-w-4" /> |
|
|
|
|
{{ $t('activity.duplicateRow') }} |
|
|
|
|
</div> |
|
|
|
|
</a-menu-item> |
|
|
|
|
<a-menu-item v-if="isUIAllowed('xcDatatableEditable') && !isNew" @click="!isNew && onDeleteRowClick()"> |
|
|
|
|
<div v-e="['c:row-expand:delete']" class="py-2 flex gap-2 items-center"> |
|
|
|
|
<MdiDeleteOutline class="nc-icon-transition cursor-pointer select-none nc-delete-row text-gray-500 mx-1 min-w-4" /> |
|
|
|
|
{{ $t('activity.deleteRow') }} |
|
|
|
|
</div> |
|
|
|
|
</a-menu-item> |
|
|
|
|
<a-menu-item @click="emit('cancel')"> |
|
|
|
|
<div v-e="['c:row-expand:delete']" class="py-2 flex gap-2 items-center"> |
|
|
|
|
<MdiCloseCircleOutline |
|
|
|
|
class="nc-icon-transition cursor-pointer select-none nc-delete-row text-gray-500 mx-1 min-w-4" |
|
|
|
|
/> |
|
|
|
|
{{ $t('general.close') }} |
|
|
|
|
</div> |
|
|
|
|
</a-menu-item> |
|
|
|
|
</a-menu> |
|
|
|
|
</template> |
|
|
|
|
<MdiCloseCircleOutline |
|
|
|
|
class="nc-icon-transition cursor-pointer select-none nc-close-form text-gray-500 mx-1 min-w-4" |
|
|
|
|
@click="emit('cancel')" |
|
|
|
|
/> |
|
|
|
|
</a-tooltip> |
|
|
|
|
|
|
|
|
|
</a-dropdown> |
|
|
|
|
<a-modal v-model:visible="showDeleteRowModal" title="Delete row?" @ok="onConfirmDeleteRowClick"> |
|
|
|
|
<p>Are you sure you want to delete this row?</p> |
|
|
|
|
</a-modal> |
|
|
|
|