|
|
|
@ -21,6 +21,13 @@ import {
|
|
|
|
|
} from '#imports' |
|
|
|
|
import type { Row } from '~/lib' |
|
|
|
|
|
|
|
|
|
const formatData = (list: Row[]) => |
|
|
|
|
list.map((row) => ({ |
|
|
|
|
row: { ...row }, |
|
|
|
|
oldRow: { ...row }, |
|
|
|
|
rowMeta: {}, |
|
|
|
|
})) |
|
|
|
|
|
|
|
|
|
export function useViewData( |
|
|
|
|
meta: Ref<TableType | undefined> | ComputedRef<TableType | undefined>, |
|
|
|
|
viewMeta: Ref<ViewType | undefined> | ComputedRef<(ViewType & { id: string }) | undefined>, |
|
|
|
@ -59,13 +66,6 @@ export function useViewData(
|
|
|
|
|
|
|
|
|
|
const { isUIAllowed } = useUIPermission() |
|
|
|
|
|
|
|
|
|
const formatData = (list: Record<string, any>[]) => |
|
|
|
|
list.map((row) => ({ |
|
|
|
|
row: { ...row }, |
|
|
|
|
oldRow: { ...row }, |
|
|
|
|
rowMeta: {}, |
|
|
|
|
})) |
|
|
|
|
|
|
|
|
|
const paginationData = computed({ |
|
|
|
|
get: () => (isPublic.value ? sharedPaginationData.value : _paginationData.value), |
|
|
|
|
set: (value) => { |
|
|
|
|