Files
Tom Moor fe50488c97 feat: Allow selecting a destination when importing (#14486)
* feat: allow selecting import destination

* fix: address import destination review findings

* feat: multi-step import dialog with workspace root location

- Import dialog is now upload then location, the same height as the move dialog
- Document explorer lists the workspace as the root and marks the selected row
- A document export with a sibling folder merges into one document, or becomes
  the collection overview when creating new collections
- Destination document checks now rely on the createChildDocument policy

* fix: delete archived imported documents and read legacy task inputs

- Deleting an import now removes the children of archived imported documents
- Tasks queued before the rename to rootExternalId are still assigned correctly
2026-11-06 08:05:31 -05:00

23 lines
679 B
TypeScript

import type { Import } from "@server/models";
import presentUser from "./user";
export default function presentImport(
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
importModel: Import<any>
) {
return {
id: importModel.id,
name: importModel.name,
service: importModel.service,
state: importModel.state,
documentCount: importModel.documentCount,
collectionId: importModel.collectionId,
documentId: importModel.documentId,
error: importModel.error,
createdBy: presentUser(importModel.createdBy),
createdById: importModel.createdById,
createdAt: importModel.createdAt,
updatedAt: importModel.updatedAt,
};
}