|
|
|
@ -51,6 +51,10 @@ const key = ref(0)
|
|
|
|
|
|
|
|
|
|
const wrapper = ref() |
|
|
|
|
|
|
|
|
|
const { dashboardUrl } = useDashboard() |
|
|
|
|
|
|
|
|
|
const { copy } = useClipboard() |
|
|
|
|
|
|
|
|
|
const { isMobileMode } = useGlobal() |
|
|
|
|
|
|
|
|
|
const { t } = useI18n() |
|
|
|
@ -63,6 +67,8 @@ const state = toRef(props, 'state')
|
|
|
|
|
|
|
|
|
|
const meta = toRef(props, 'meta') |
|
|
|
|
|
|
|
|
|
const route = useRoute() |
|
|
|
|
|
|
|
|
|
const router = useRouter() |
|
|
|
|
|
|
|
|
|
const isPublic = inject(IsPublicInj, ref(false)) |
|
|
|
@ -188,6 +194,17 @@ const onNext = async () => {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const copyRecordUrl = () => { |
|
|
|
|
copy( |
|
|
|
|
encodeURI( |
|
|
|
|
`${dashboardUrl?.value}#/${route.params.typeOrId}/${route.params.projectId}/${meta.value?.id}${ |
|
|
|
|
props.view ? `/${props.view.title}` : '' |
|
|
|
|
}?rowId=${primaryKey.value}`, |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
message.success('Copied to clipboard') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const saveChanges = async () => { |
|
|
|
|
isUnsavedFormExist.value = false |
|
|
|
|
await save() |
|
|
|
@ -418,6 +435,12 @@ export default {
|
|
|
|
|
{{ $t('general.reload') }} |
|
|
|
|
</div> |
|
|
|
|
</NcMenuItem> |
|
|
|
|
<NcMenuItem v-if="!isNew" class="text-gray-700" @click="!isNew ? copyRecordUrl() : () => {}"> |
|
|
|
|
<div v-e="['c:row-expand:copy-url']" data-testid="nc-expanded-form-copy-url" class="flex gap-2 items-center"> |
|
|
|
|
<component :is="iconMap.link" class="cursor-pointer nc-duplicate-row" /> |
|
|
|
|
Copy record URL |
|
|
|
|
</div> |
|
|
|
|
</NcMenuItem> |
|
|
|
|
<NcMenuItem |
|
|
|
|
v-if="isUIAllowed('dataEdit') && !isNew" |
|
|
|
|
class="text-gray-700" |
|
|
|
@ -683,9 +706,9 @@ export default {
|
|
|
|
|
<template #entity-preview> |
|
|
|
|
<span> |
|
|
|
|
<div class="flex flex-row items-center py-2.25 px-2.5 bg-gray-50 rounded-lg text-gray-700 mb-4"> |
|
|
|
|
<component :is="iconMap.table" class="nc-view-icon" /> |
|
|
|
|
<component :is="iconMap.record" class="nc-view-icon" /> |
|
|
|
|
<div class="capitalize text-ellipsis overflow-hidden select-none w-full pl-1.75 break-keep whitespace-nowrap"> |
|
|
|
|
{{ meta.title }} |
|
|
|
|
{{ displayValue }} |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</span> |
|
|
|
|