Skip to content

Dashboard widget: Quick draft #235

Description

@tayebmokni

Summary

Implement the "Quick draft" dashboard widget per doc 05 §2.2. Small form: title + content textarea + "Save draft" button. Submit POSTs /api/v1/posts with status=draft. On success, clear the form and show a confirmation toast linking to the editor.

Design reference

  • docs/05-admin-api.md §2.2 (Dashboard home / Default widgets)

Acceptance criteria

  • Widget renders inside the dashboard grid (size md)
  • Title (single-line) and content (textarea, ~4 rows) inputs
  • "Save draft" button submits POST /api/v1/posts with {title, content, status: "draft"}
  • Success toast with a link "Continue editing →" pointing to /admin/posts/<new_id>
  • Form disables while in flight; error inline if API rejects
  • Capability gate: edit_posts — widget not rendered without it

Dependencies

Depends on REST API skeleton.

Complexity

XS

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions