|
|
@ -8,6 +8,7 @@ import getAst from '~/helpers/getAst'; |
|
|
|
import { PagedResponseImpl } from '~/helpers/PagedResponse'; |
|
|
|
import { PagedResponseImpl } from '~/helpers/PagedResponse'; |
|
|
|
import { Column, Model, Source, View } from '~/models'; |
|
|
|
import { Column, Model, Source, View } from '~/models'; |
|
|
|
import NcConnectionMgrv2 from '~/utils/common/NcConnectionMgrv2'; |
|
|
|
import NcConnectionMgrv2 from '~/utils/common/NcConnectionMgrv2'; |
|
|
|
|
|
|
|
import { validatePayload } from 'src/helpers'; |
|
|
|
|
|
|
|
|
|
|
|
@Injectable() |
|
|
|
@Injectable() |
|
|
|
export class DataTableService { |
|
|
|
export class DataTableService { |
|
|
@ -443,6 +444,25 @@ export class DataTableService { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async nestedLinkUnlink(param: { |
|
|
|
|
|
|
|
cookie: any; |
|
|
|
|
|
|
|
viewId: string; |
|
|
|
|
|
|
|
modelId: string; |
|
|
|
|
|
|
|
columnId: string; |
|
|
|
|
|
|
|
query: any; |
|
|
|
|
|
|
|
data: { |
|
|
|
|
|
|
|
operation: 'copy' | 'paste'; |
|
|
|
|
|
|
|
rowId: string; |
|
|
|
|
|
|
|
}[]; |
|
|
|
|
|
|
|
}) { |
|
|
|
|
|
|
|
validatePayload( |
|
|
|
|
|
|
|
'swagger.json#/components/schemas/NestedLinkUnlinkReq', |
|
|
|
|
|
|
|
param.data, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private validateIds(rowIds: any[] | any) { |
|
|
|
private validateIds(rowIds: any[] | any) { |
|
|
|
if (Array.isArray(rowIds)) { |
|
|
|
if (Array.isArray(rowIds)) { |
|
|
|
const map = new Map<string, boolean>(); |
|
|
|
const map = new Map<string, boolean>(); |
|
|
|