|
|
@ -101,17 +101,6 @@ const onConfirmDeleteRowClick = async () => { |
|
|
|
</h5> |
|
|
|
</h5> |
|
|
|
|
|
|
|
|
|
|
|
<div class="flex-1" /> |
|
|
|
<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"> |
|
|
|
<a-tooltip placement="bottom"> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
<!-- todo: i18n --> |
|
|
|
<!-- todo: i18n --> |
|
|
@ -137,32 +126,6 @@ const onConfirmDeleteRowClick = async () => { |
|
|
|
/> |
|
|
|
/> |
|
|
|
</a-tooltip> |
|
|
|
</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"> |
|
|
|
<a-dropdown-button class="nc-expand-form-save-btn" type="primary" :disabled="!isUIAllowed('tableRowUpdate')" @click="save"> |
|
|
|
<template #icon><MdiMenuDown /></template> |
|
|
|
<template #icon><MdiMenuDown /></template> |
|
|
|
|
|
|
|
|
|
|
@ -192,17 +155,39 @@ const onConfirmDeleteRowClick = async () => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-dropdown-button> |
|
|
|
</a-dropdown-button> |
|
|
|
|
|
|
|
|
|
|
|
<a-tooltip placement="bottom"> |
|
|
|
<a-dropdown> |
|
|
|
<!-- Close --> |
|
|
|
<MdiDotsVertical class="nc-icon-transition" /> |
|
|
|
<template #title> |
|
|
|
<template #overlay> |
|
|
|
<div class="text-center w-full">{{ $t('general.close') }}</div> |
|
|
|
<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> |
|
|
|
</template> |
|
|
|
<MdiCloseCircleOutline |
|
|
|
</a-dropdown> |
|
|
|
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-modal v-model:visible="showDeleteRowModal" title="Delete row?" @ok="onConfirmDeleteRowClick"> |
|
|
|
<a-modal v-model:visible="showDeleteRowModal" title="Delete row?" @ok="onConfirmDeleteRowClick"> |
|
|
|
<p>Are you sure you want to delete this row?</p> |
|
|
|
<p>Are you sure you want to delete this row?</p> |
|
|
|
</a-modal> |
|
|
|
</a-modal> |
|
|
|