feat: Moving documents via drag and drop in sidebar (#1717)
* wip: added some basic drag and drop UI for combining items * refactor: pathToDocument to accept only id * fix: Multiple drop backends error fix: Incorrect styling dragging over active collection fix: Stay in disabled state until save is complete * Improving display while moving doc * fix: update by user should be changed when moving a doc * add move guard to drag Co-authored-by: Tom Moor <tom.moor@gmail.com>
This commit is contained in:
@ -28,6 +28,8 @@ export default async function documentMover({
|
||||
|
||||
document.collectionId = collectionId;
|
||||
document.parentDocumentId = null;
|
||||
document.lastModifiedById = user.id;
|
||||
document.updatedBy = user;
|
||||
|
||||
await document.save();
|
||||
result.documents.push(document);
|
||||
@ -54,6 +56,8 @@ export default async function documentMover({
|
||||
// add to new collection (may be the same)
|
||||
document.collectionId = collectionId;
|
||||
document.parentDocumentId = parentDocumentId;
|
||||
document.lastModifiedById = user.id;
|
||||
document.updatedBy = user;
|
||||
|
||||
const newCollection: Collection = collectionChanged
|
||||
? await Collection.findByPk(collectionId, { transaction })
|
||||
|
Reference in New Issue
Block a user