|
|
|
@ -108,7 +108,11 @@ const onConfirmDeleteRowClick = async () => {
|
|
|
|
|
<template #title> |
|
|
|
|
<div class="text-center w-full">{{ $t('general.reload') }}</div> |
|
|
|
|
</template> |
|
|
|
|
<mdi-reload v-if="!isNew" class="cursor-pointer select-none text-gray-500 mx-1 min-w-4" @click="loadRow" /> |
|
|
|
|
<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> |
|
|
|
@ -117,7 +121,7 @@ const onConfirmDeleteRowClick = async () => {
|
|
|
|
|
</template> |
|
|
|
|
<mdi-link |
|
|
|
|
v-if="!isNew" |
|
|
|
|
class="cursor-pointer select-none text-gray-500 mx-1 nc-copy-row-url min-w-4" |
|
|
|
|
class="nc-icon-transition cursor-pointer select-none text-gray-500 mx-1 nc-copy-row-url min-w-4" |
|
|
|
|
@click="copyRecordUrl" |
|
|
|
|
/> |
|
|
|
|
</a-tooltip> |
|
|
|
@ -130,61 +134,40 @@ const onConfirmDeleteRowClick = async () => {
|
|
|
|
|
<MdiCommentTextOutline |
|
|
|
|
v-if="isUIAllowed('rowComments') && !isNew" |
|
|
|
|
v-e="['c:row-expand:comment-toggle']" |
|
|
|
|
class="cursor-pointer select-none nc-toggle-comments text-gray-500 mx-1 min-w-4" |
|
|
|
|
class="nc-icon-transition cursor-pointer select-none nc-toggle-comments text-gray-500 mx-1 min-w-4" |
|
|
|
|
@click="commentsDrawer = !commentsDrawer" |
|
|
|
|
/> |
|
|
|
|
</a-tooltip> |
|
|
|
|
|
|
|
|
|
<a-button class="!text mx-1 nc-expand-form-close-btn" @click="emit('cancel')"> |
|
|
|
|
<div class="flex items-center"> |
|
|
|
|
<MdiCloseCircleOutline class="mr-1" /> |
|
|
|
|
<!-- Close --> |
|
|
|
|
{{ $t('general.close') }} |
|
|
|
|
</div> |
|
|
|
|
</a-button> |
|
|
|
|
|
|
|
|
|
<a-dropdown> |
|
|
|
|
<a-button v-e="['c:actions']" class="nc-actions-menu-btn nc-toolbar-btn"> |
|
|
|
|
<div class="flex gap-1 items-center"> |
|
|
|
|
<!-- More --> |
|
|
|
|
<span class="!text-sm font-weight-medium">{{ $t('general.more') }}</span> |
|
|
|
|
|
|
|
|
|
<MdiMenuDown class="text-grey" /> |
|
|
|
|
</div> |
|
|
|
|
</a-button> |
|
|
|
|
|
|
|
|
|
<template #overlay> |
|
|
|
|
<div class="bg-gray-50 py-2 shadow-lg !border"> |
|
|
|
|
<div> |
|
|
|
|
<div |
|
|
|
|
v-e="['a:actions:duplicate-row']" |
|
|
|
|
class="nc-menu-item" |
|
|
|
|
:class="{ disabled: isNew }" |
|
|
|
|
<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')" |
|
|
|
|
> |
|
|
|
|
<MdiContentCopy class="text-gray-500" /> |
|
|
|
|
{{ $t('activity.duplicateRow') }} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<a-modal v-model:visible="showDeleteRowModal" title="Delete row?" @ok="onConfirmDeleteRowClick"> |
|
|
|
|
<p>Are you sure you want to delete this row?</p> |
|
|
|
|
</a-modal> |
|
|
|
|
/> |
|
|
|
|
</a-tooltip> |
|
|
|
|
|
|
|
|
|
<div |
|
|
|
|
v-e="['a:actions:delete-row']" |
|
|
|
|
class="nc-menu-item" |
|
|
|
|
:class="{ disabled: isNew }" |
|
|
|
|
@click="!isNew && onDeleteRowClick()" |
|
|
|
|
> |
|
|
|
|
<MdiDelete class="text-gray-500" /> |
|
|
|
|
{{ $t('activity.deleteRow') }} |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<a-tooltip v-if="!isSqlView" placement="bottom"> |
|
|
|
|
<!-- Delete row --> |
|
|
|
|
<template #title> |
|
|
|
|
<div class="text-center w-full">{{ $t('activity.deleteRow') }}</div> |
|
|
|
|
</template> |
|
|
|
|
</a-dropdown> |
|
|
|
|
<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> |
|
|
|
|
|
|
|
|
|
<template #overlay> |
|
|
|
|
<a-menu class="nc-expand-form-save-dropdown-menu"> |
|
|
|
|
<a-menu-item key="0" class="!py-2 flex gap-2" @click="saveRowAndStay = 0"> |
|
|
|
@ -210,5 +193,26 @@ const onConfirmDeleteRowClick = async () => {
|
|
|
|
|
{{ $t('activity.saveAndStay') }} |
|
|
|
|
</div> |
|
|
|
|
</a-dropdown-button> |
|
|
|
|
|
|
|
|
|
<a-tooltip placement="bottom"> |
|
|
|
|
<!-- Close --> |
|
|
|
|
<template #title> |
|
|
|
|
<div class="text-center w-full">{{ $t('general.close') }}</div> |
|
|
|
|
</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-modal v-model:visible="showDeleteRowModal" title="Delete row?" @ok="onConfirmDeleteRowClick"> |
|
|
|
|
<p>Are you sure you want to delete this row?</p> |
|
|
|
|
</a-modal> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<style scoped> |
|
|
|
|
:deep(svg) { |
|
|
|
|
@apply outline-none; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|