Warne vor bereits eingefügten Quelldokumenten und biete Nicht einfügen, erneut einfügen oder zusätzliches Einbinden an.
Deploy Development / deploy (push) Successful in 44s
Deploy Development / deploy (push) Successful in 44s
Prüfstufen hier, darin, Umfeld stehen als Kontoeinstellung bereit. Der Server antwortet bei einem sicheren Treffer mit 409 und bindet auf Wunsch das vorhandene Element zusätzlich ein. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a6dc24d8fe
commit
f925661937
19 files changed
+748
-133
No files matched your search
@@ -15,6 +15,7 @@ import { Workspace, rememberScroll, restoreScroll, useWorkspaceLayout } from "./
|
||||
import { useLibraryFocus } from "../library/LibraryLayout.jsx";
|
||||
import { outlineSignature } from "../library/library-core.js";
|
||||
import { NavIcon } from "./icons.jsx";
|
||||
import { useExternalPlacement } from "../sources/duplicates.jsx";
|
||||
|
||||
function matterOrigin(group) {
|
||||
const kind = group.kind_label === "Teilvorgang" ? "Teilvorgang" : "Vorgang";
|
||||
@@ -905,6 +906,15 @@ function ExternalForm({ context, placement, chapters = [], initialChapter = "",
|
||||
const [sentOn, setSentOn] = useState("");
|
||||
const [receivedOn, setReceivedOn] = useState("");
|
||||
const [error, setError] = useState("");
|
||||
const { place, panel } = useExternalPlacement({
|
||||
context,
|
||||
placement,
|
||||
onPlaced: () => {
|
||||
setTitle("");
|
||||
setExternalId("");
|
||||
onChange();
|
||||
},
|
||||
});
|
||||
|
||||
useEffect(() => { setChapterId(initialChapter || ""); }, [initialChapter]);
|
||||
|
||||
@@ -912,25 +922,19 @@ function ExternalForm({ context, placement, chapters = [], initialChapter = "",
|
||||
event.preventDefault();
|
||||
setError("");
|
||||
try {
|
||||
await api("/api/v1/external-refs", {
|
||||
method: "POST",
|
||||
body: {
|
||||
title,
|
||||
source,
|
||||
external_id: externalId,
|
||||
context,
|
||||
...(placement ? { placement } : {}),
|
||||
...(chapterId ? { chapter_id: chapterId } : {}),
|
||||
dates: {
|
||||
document_on: documentOn || null,
|
||||
sent_on: sentOn || null,
|
||||
received_on: receivedOn || null,
|
||||
},
|
||||
await place({
|
||||
title,
|
||||
source,
|
||||
external_id: externalId,
|
||||
context,
|
||||
...(placement ? { placement } : {}),
|
||||
...(chapterId ? { chapter_id: chapterId } : {}),
|
||||
dates: {
|
||||
document_on: documentOn || null,
|
||||
sent_on: sentOn || null,
|
||||
received_on: receivedOn || null,
|
||||
},
|
||||
});
|
||||
setTitle("");
|
||||
setExternalId("");
|
||||
onChange();
|
||||
} catch (err) {
|
||||
setError(err.message);
|
||||
}
|
||||
@@ -951,6 +955,7 @@ function ExternalForm({ context, placement, chapters = [], initialChapter = "",
|
||||
{chapterSelect(chapters, chapterId, setChapterId)}
|
||||
<button type="submit">Referenz erfassen</button>
|
||||
<ErrorNote error={error} />
|
||||
{panel}
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user