feat: add vendor content pages management UI
- Add routes for vendor content pages list, create, and edit - Create content-pages.html with tabs for Platform Defaults and My Pages - Create content-page-edit.html for creating/editing pages - Add JavaScript for both list and edit views - Add "Content Pages" link to vendor sidebar under new "Shop" section - Add show_in_legal field to vendor content pages API schemas - Platform Defaults tab shows pages that can be overridden - My Pages tab shows vendor's custom pages and overrides Vendors can now: - View platform default pages and override them with custom content - Create entirely new custom pages for their shop - Manage navigation placement (header, footer, legal) - Publish/unpublish pages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
7
app/api/v1/vendor/content_pages.py
vendored
7
app/api/v1/vendor/content_pages.py
vendored
@@ -48,6 +48,9 @@ class VendorContentPageCreate(BaseModel):
|
||||
is_published: bool = Field(default=False, description="Publish immediately")
|
||||
show_in_footer: bool = Field(default=True, description="Show in footer navigation")
|
||||
show_in_header: bool = Field(default=False, description="Show in header navigation")
|
||||
show_in_legal: bool = Field(
|
||||
default=False, description="Show in legal/bottom bar (next to copyright)"
|
||||
)
|
||||
display_order: int = Field(default=0, description="Display order (lower = first)")
|
||||
|
||||
|
||||
@@ -62,6 +65,7 @@ class VendorContentPageUpdate(BaseModel):
|
||||
is_published: bool | None = None
|
||||
show_in_footer: bool | None = None
|
||||
show_in_header: bool | None = None
|
||||
show_in_legal: bool | None = None
|
||||
display_order: int | None = None
|
||||
|
||||
|
||||
@@ -82,6 +86,7 @@ class ContentPageResponse(BaseModel):
|
||||
display_order: int
|
||||
show_in_footer: bool
|
||||
show_in_header: bool
|
||||
show_in_legal: bool
|
||||
is_platform_default: bool
|
||||
is_vendor_override: bool
|
||||
created_at: str
|
||||
@@ -188,6 +193,7 @@ def create_vendor_page(
|
||||
is_published=page_data.is_published,
|
||||
show_in_footer=page_data.show_in_footer,
|
||||
show_in_header=page_data.show_in_header,
|
||||
show_in_legal=page_data.show_in_legal,
|
||||
display_order=page_data.display_order,
|
||||
created_by=current_user.id,
|
||||
)
|
||||
@@ -224,6 +230,7 @@ def update_vendor_page(
|
||||
is_published=page_data.is_published,
|
||||
show_in_footer=page_data.show_in_footer,
|
||||
show_in_header=page_data.show_in_header,
|
||||
show_in_legal=page_data.show_in_legal,
|
||||
display_order=page_data.display_order,
|
||||
updated_by=current_user.id,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user