Uses generic forms everywhere, gets rid of most doc-specific stuff

This commit is contained in:
2025-10-09 16:48:50 -07:00
parent 8afe0a5345
commit c0638e34a8
28 changed files with 37 additions and 951 deletions

View File

@@ -3,12 +3,12 @@ import { displayName, relationshipsForDocument } from "@/lib/relationships";
import { RelationshipType, type DocumentId } from "@/lib/types";
import { Link } from "@tanstack/react-router";
import _ from "lodash";
import { Loader } from "../Loader";
import { DocumentTitle } from "./DocumentTitle";
import { Tab, TabbedLayout } from "../layout/TabbedLayout";
import { DocumentEditForm } from "./DocumentEditForm";
import { RelatedDocumentList } from "./RelatedDocumentList";
import { Loader } from "../Loader";
import { DocumentPreview } from "./DocumentPreview";
import { DocumentTitle } from "./DocumentTitle";
import { GenericEditForm } from "./GenericEditForm";
import { RelatedDocumentList } from "./RelatedDocumentList";
export function DocumentView({
documentId,
@@ -83,7 +83,7 @@ export function DocumentView({
]}
content={
relationshipType === null ? (
<DocumentEditForm document={doc} />
<GenericEditForm doc={doc} />
) : (
<RelatedDocumentList
documentId={doc.id}