feat: add unified admin Marketplace Letzshop page
- Add new Marketplace section in admin sidebar with Letzshop sub-item
- Remove old Import and Letzshop Orders items from Product Catalog
- Create unified Letzshop management page with 3 tabs:
- Products tab: Import/Export functionality
- Orders tab: Order management with confirm/reject/tracking
- Settings tab: API credentials and CSV URLs
- Add unified jobs table showing imports, exports, and order syncs
- Implement vendor autocomplete using Tom Select library (CDN + fallback)
- Add /vendors/{vendor_id}/jobs API endpoint for unified job listing
- Move database queries to service layer (LetzshopOrderService)
- Add LetzshopJobItem and LetzshopJobsListResponse schemas
- Include Tom Select CSS/JS assets as local fallback
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -332,3 +332,29 @@ class LetzshopVendorListResponse(BaseModel):
|
||||
total: int
|
||||
skip: int
|
||||
limit: int
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# Jobs Schemas (Unified view of imports, exports, and syncs)
|
||||
# ============================================================================
|
||||
|
||||
|
||||
class LetzshopJobItem(BaseModel):
|
||||
"""Schema for a unified job item (import, export, or order sync)."""
|
||||
|
||||
id: int
|
||||
type: str = Field(..., description="Job type: import, export, or order_sync")
|
||||
status: str = Field(..., description="Job status")
|
||||
created_at: datetime
|
||||
started_at: datetime | None = None
|
||||
completed_at: datetime | None = None
|
||||
records_processed: int = 0
|
||||
records_succeeded: int = 0
|
||||
records_failed: int = 0
|
||||
|
||||
|
||||
class LetzshopJobsListResponse(BaseModel):
|
||||
"""Schema for paginated jobs list."""
|
||||
|
||||
jobs: list[LetzshopJobItem]
|
||||
total: int
|
||||
|
||||
Reference in New Issue
Block a user