|
|
@ -80,6 +80,8 @@ const isPublic = inject(IsPublicInj, ref(false)) |
|
|
|
// to check if a expanded form which is not yet saved exist or not |
|
|
|
// to check if a expanded form which is not yet saved exist or not |
|
|
|
const isUnsavedFormExist = ref(false) |
|
|
|
const isUnsavedFormExist = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const isRecordLinkCopied = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
const { isUIAllowed } = useRoles() |
|
|
|
const { isUIAllowed } = useRoles() |
|
|
|
|
|
|
|
|
|
|
|
const reloadTrigger = inject(ReloadRowDataHookInj, createEventHook()) |
|
|
|
const reloadTrigger = inject(ReloadRowDataHookInj, createEventHook()) |
|
|
@ -216,15 +218,16 @@ const onNext = async () => { |
|
|
|
emits('next') |
|
|
|
emits('next') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const copyRecordUrl = () => { |
|
|
|
const copyRecordUrl = async () => { |
|
|
|
copy( |
|
|
|
await copy( |
|
|
|
encodeURI( |
|
|
|
encodeURI( |
|
|
|
`${dashboardUrl?.value}#/${route.params.typeOrId}/${route.params.projectId}/${meta.value?.id}${ |
|
|
|
`${dashboardUrl?.value}#/${route.params.typeOrId}/${route.params.baseId}/${meta.value?.id}${ |
|
|
|
props.view ? `/${props.view.title}` : '' |
|
|
|
props.view ? `/${props.view.title}` : '' |
|
|
|
}?rowId=${primaryKey.value}`, |
|
|
|
}?rowId=${primaryKey.value}`, |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
) |
|
|
|
message.success('Copied to clipboard') |
|
|
|
|
|
|
|
|
|
|
|
isRecordLinkCopied.value = true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const saveChanges = async () => { |
|
|
|
const saveChanges = async () => { |
|
|
@ -265,6 +268,7 @@ provide(IsExpandedFormOpenInj, isExpanded) |
|
|
|
const cellWrapperEl = ref() |
|
|
|
const cellWrapperEl = ref() |
|
|
|
|
|
|
|
|
|
|
|
onMounted(async () => { |
|
|
|
onMounted(async () => { |
|
|
|
|
|
|
|
isRecordLinkCopied.value = false |
|
|
|
isLoading.value = true |
|
|
|
isLoading.value = true |
|
|
|
if (props.loadRow) { |
|
|
|
if (props.loadRow) { |
|
|
|
await _loadRow() |
|
|
|
await _loadRow() |
|
|
@ -462,8 +466,9 @@ export default { |
|
|
|
@click="!isNew ? copyRecordUrl() : () => {}" |
|
|
|
@click="!isNew ? copyRecordUrl() : () => {}" |
|
|
|
> |
|
|
|
> |
|
|
|
<div v-e="['c:row-expand:copy-url']" data-testid="nc-expanded-form-copy-url" class="flex gap-2 items-center"> |
|
|
|
<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" /> |
|
|
|
<component :is="iconMap.check" v-if="isRecordLinkCopied" class="cursor-pointer nc-duplicate-row" /> |
|
|
|
{{ $t('labels.copyRecordURL') }} |
|
|
|
<component :is="iconMap.link" v-else class="cursor-pointer nc-duplicate-row" /> |
|
|
|
|
|
|
|
{{ isRecordLinkCopied ? $t('labels.copiedRecordURL') : $t('labels.copyRecordURL') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
<NcDropdown v-if="!isNew"> |
|
|
|
<NcDropdown v-if="!isNew"> |
|
|
|