Assets as document: replace snapshot with publish workflow
Remove assets from the snapshot system and replace with a publish-based document workflow that generates versioned ProseMirror documents. - Remove snapshot_id/source_id from asset and asset_vendor models - Delete AssetFilter (no longer needed without snapshot filtering) - Add PublishAssetList service, GraphQL mutation, MCP tool, CLI command, and n8n operation - Add asset_list_document_id column to generated_documents table - Generate ProseMirror documents with asset inventory tables (name, type, amount, data types stored, owner, vendors) - Add AssetListDocument resolver on Organization type - Update frontend to remove snapshot routes/params and add publish dialog - Add e2e tests for asset publish (immediate, with approvers, reuse, RBAC) - Add migration script for converting legacy asset snapshots to documents - Exclude ASSETS from snapshot type lists and e2e snapshot tests - Move generated_documents SQL to coredata methods on Datum and Asset - Clear generated document and SOA references on soft delete and archive Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -33,21 +33,7 @@ export const assetRoutes = [
|
||||
Fallback: PageSkeleton,
|
||||
loader: loaderFromQueryLoader(({ organizationId }) =>
|
||||
loadQuery<AssetGraphListQuery>(coreEnvironment, assetsQuery, {
|
||||
organizationId: organizationId,
|
||||
snapshotId: null,
|
||||
}),
|
||||
),
|
||||
Component: withQueryRef(
|
||||
lazy(() => import("#/pages/organizations/assets/AssetsPage")),
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "snapshots/:snapshotId/assets",
|
||||
Fallback: PageSkeleton,
|
||||
loader: loaderFromQueryLoader(({ organizationId, snapshotId }) =>
|
||||
loadQuery<AssetGraphListQuery>(coreEnvironment, assetsQuery, {
|
||||
organizationId: organizationId,
|
||||
snapshotId: snapshotId,
|
||||
organizationId,
|
||||
}),
|
||||
),
|
||||
Component: withQueryRef(
|
||||
@@ -66,16 +52,4 @@ export const assetRoutes = [
|
||||
lazy(() => import("#/pages/organizations/assets/AssetDetailsPage")),
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "snapshots/:snapshotId/assets/:assetId",
|
||||
Fallback: PageSkeleton,
|
||||
loader: loaderFromQueryLoader(({ assetId }) =>
|
||||
loadQuery<AssetGraphNodeQuery>(coreEnvironment, assetNodeQuery, {
|
||||
assetId,
|
||||
}),
|
||||
),
|
||||
Component: withQueryRef(
|
||||
lazy(() => import("#/pages/organizations/assets/AssetDetailsPage")),
|
||||
),
|
||||
},
|
||||
] satisfies AppRoute[];
|
||||
|
||||
Reference in New Issue
Block a user