|
|
@ -454,6 +454,7 @@ export class DataTableService { |
|
|
|
data: { |
|
|
|
data: { |
|
|
|
operation: 'copy' | 'paste'; |
|
|
|
operation: 'copy' | 'paste'; |
|
|
|
rowId: string; |
|
|
|
rowId: string; |
|
|
|
|
|
|
|
columnId: string; |
|
|
|
fk_related_model_id: string; |
|
|
|
fk_related_model_id: string; |
|
|
|
}[]; |
|
|
|
}[]; |
|
|
|
}) { |
|
|
|
}) { |
|
|
@ -480,6 +481,7 @@ export class DataTableService { |
|
|
|
{ |
|
|
|
{ |
|
|
|
operation: 'copy' | 'paste'; |
|
|
|
operation: 'copy' | 'paste'; |
|
|
|
rowId: string; |
|
|
|
rowId: string; |
|
|
|
|
|
|
|
columnId: string; |
|
|
|
fk_related_model_id: string; |
|
|
|
fk_related_model_id: string; |
|
|
|
} |
|
|
|
} |
|
|
|
>, |
|
|
|
>, |
|
|
@ -538,7 +540,7 @@ export class DataTableService { |
|
|
|
const [copiedCellNestedList, pasteCellNestedList] = await Promise.all([ |
|
|
|
const [copiedCellNestedList, pasteCellNestedList] = await Promise.all([ |
|
|
|
baseModel.mmList( |
|
|
|
baseModel.mmList( |
|
|
|
{ |
|
|
|
{ |
|
|
|
colId: column.id, |
|
|
|
colId: operationMap.copy.columnId, |
|
|
|
parentId: operationMap.copy.rowId, |
|
|
|
parentId: operationMap.copy.rowId, |
|
|
|
}, |
|
|
|
}, |
|
|
|
listArgs as any, |
|
|
|
listArgs as any, |
|
|
@ -567,18 +569,20 @@ export class DataTableService { |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
await Promise.all([ |
|
|
|
await Promise.all([ |
|
|
|
baseModel.addLinks({ |
|
|
|
filteredRowsToLink.length && |
|
|
|
colId: column.id, |
|
|
|
baseModel.addLinks({ |
|
|
|
childIds: filteredRowsToLink, |
|
|
|
colId: column.id, |
|
|
|
rowId: operationMap.paste.rowId, |
|
|
|
childIds: filteredRowsToLink, |
|
|
|
cookie: param.cookie, |
|
|
|
rowId: operationMap.paste.rowId, |
|
|
|
}), |
|
|
|
cookie: param.cookie, |
|
|
|
baseModel.removeLinks({ |
|
|
|
}), |
|
|
|
colId: column.id, |
|
|
|
filteredRowsToUnlink.length && |
|
|
|
childIds: filteredRowsToUnlink, |
|
|
|
baseModel.removeLinks({ |
|
|
|
rowId: operationMap.paste.rowId, |
|
|
|
colId: column.id, |
|
|
|
cookie: param.cookie, |
|
|
|
childIds: filteredRowsToUnlink, |
|
|
|
}), |
|
|
|
rowId: operationMap.paste.rowId, |
|
|
|
|
|
|
|
cookie: param.cookie, |
|
|
|
|
|
|
|
}), |
|
|
|
]); |
|
|
|
]); |
|
|
|
|
|
|
|
|
|
|
|
return { link: filteredRowsToLink, unlink: filteredRowsToUnlink }; |
|
|
|
return { link: filteredRowsToLink, unlink: filteredRowsToUnlink }; |
|
|
|