Halte die Vorgangsleiste sichtbar und nimm die ueberfluessigen Kapitelworte weg, damit Datum, Bezuege, Titel und mehrere Belege direkt gesetzt werden koennen.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
cbd45a8997
commit
deb5d662fe
13 files changed
+423
-101
No files matched your search
@@ -78,6 +78,7 @@ from app.api.schemas import (
|
||||
TaskDependencyIn,
|
||||
TaskElementsIn,
|
||||
SummaryPatch,
|
||||
TitlePatch,
|
||||
TaskIn,
|
||||
TaskPatch,
|
||||
)
|
||||
@@ -142,6 +143,7 @@ from app.ops import (
|
||||
update_dates,
|
||||
update_note,
|
||||
update_summary,
|
||||
update_title,
|
||||
)
|
||||
from app.present import (
|
||||
LABELS,
|
||||
@@ -1593,6 +1595,24 @@ def patch_element_summary(
|
||||
return {"id": str(element["id"]), "version": element["version"], "summary": element["summary"]}
|
||||
|
||||
|
||||
@router.patch("/api/v1/elements/{element_id}/title")
|
||||
def patch_element_title(
|
||||
element_id: UUID,
|
||||
body: TitlePatch,
|
||||
principal: Principal = Depends(get_principal),
|
||||
conn: Connection = Depends(get_conn),
|
||||
):
|
||||
element = update_title(
|
||||
conn,
|
||||
principal.account_id,
|
||||
element_id,
|
||||
body.expected_version,
|
||||
body.title,
|
||||
_ctx_model(body.context),
|
||||
)
|
||||
return {"id": str(element["id"]), "version": element["version"], "title": element["title"]}
|
||||
|
||||
|
||||
@router.patch("/api/v1/bindings/{binding_id}/chapter")
|
||||
def patch_binding_chapter(
|
||||
binding_id: UUID,
|
||||
|
||||
@@ -220,6 +220,12 @@ class SummaryPatch(APIModel):
|
||||
context: ContextIn | None = None
|
||||
|
||||
|
||||
class TitlePatch(APIModel):
|
||||
expected_version: int = Field(ge=1)
|
||||
title: str = Field(min_length=1, max_length=200)
|
||||
context: ContextIn | None = None
|
||||
|
||||
|
||||
class ChapterMoveIn(APIModel):
|
||||
expected_version: int = Field(ge=1)
|
||||
chapter_id: UUID | None = None
|
||||
|
||||
Reference in new issue
Block a user