|
|
@ -1,5 +1,5 @@ |
|
|
|
<script lang="ts" setup> |
|
|
|
<script lang="ts" setup> |
|
|
|
import type { ViewType, ViewTypes } from 'nocodb-sdk' |
|
|
|
import type { KanbanType, ViewType, ViewTypes } from 'nocodb-sdk' |
|
|
|
import type { WritableComputedRef } from '@vue/reactivity' |
|
|
|
import type { WritableComputedRef } from '@vue/reactivity' |
|
|
|
import { |
|
|
|
import { |
|
|
|
IsLockedInj, |
|
|
|
IsLockedInj, |
|
|
@ -23,7 +23,7 @@ interface Emits { |
|
|
|
(event: 'changeView', view: Record<string, any>): void |
|
|
|
(event: 'changeView', view: Record<string, any>): void |
|
|
|
(event: 'rename', view: ViewType): void |
|
|
|
(event: 'rename', view: ViewType): void |
|
|
|
(event: 'delete', view: ViewType): void |
|
|
|
(event: 'delete', view: ViewType): void |
|
|
|
(event: 'openModal', data: { type: ViewTypes; title?: string; copyViewId?: string }): void |
|
|
|
(event: 'openModal', data: { type: ViewTypes; title?: string; copyViewId?: string; groupingFieldColumnId?: string }): void |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps<Props>() |
|
|
|
const props = defineProps<Props>() |
|
|
@ -101,7 +101,12 @@ function focusInput(el: HTMLInputElement) { |
|
|
|
/** Duplicate a view */ |
|
|
|
/** Duplicate a view */ |
|
|
|
// todo: This is not really a duplication, maybe we need to implement a true duplication? |
|
|
|
// todo: This is not really a duplication, maybe we need to implement a true duplication? |
|
|
|
function onDuplicate() { |
|
|
|
function onDuplicate() { |
|
|
|
emits('openModal', { type: vModel.value.type!, title: vModel.value.title, copyViewId: vModel.value.id }) |
|
|
|
emits('openModal', { |
|
|
|
|
|
|
|
type: vModel.value.type!, |
|
|
|
|
|
|
|
title: vModel.value.title, |
|
|
|
|
|
|
|
copyViewId: vModel.value.id, |
|
|
|
|
|
|
|
groupingFieldColumnId: (vModel.value.view as KanbanType).grp_column_id!, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
$e('c:view:copy', { view: vModel.value.type }) |
|
|
|
$e('c:view:copy', { view: vModel.value.type }) |
|
|
|
} |
|
|
|
} |
|
|
|