Commit Graph

134 Commits

Author SHA1 Message Date
6c6b5d259d feat: add admin orders management
- Add admin API endpoints for order management
- Add orders page with vendor selector and filtering
- Add order schemas for admin operations
- Support order status tracking and management

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 21:05:27 +01:00
8d8d41808b feat: add admin inventory management (Phase 1)
- Add admin API endpoints for inventory management
- Add inventory page with vendor selector and filtering
- Add admin schemas for cross-vendor inventory operations
- Support digital products with unlimited inventory
- Add integration tests for admin inventory API
- Add inventory management guide documentation

Mirrors vendor inventory functionality with admin-level access.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 21:05:12 +01:00
0ab10128ae feat: enhance Letzshop order import with EAN matching and stats
- Add historical order import with pagination support
- Add customer_locale, shipping_country_iso, billing_country_iso columns
- Add gtin/gtin_type columns to Product table for EAN matching
- Fix order stats to count all orders server-side (not just visible page)
- Add GraphQL introspection script with tracking workaround tests
- Enrich inventory units with EAN, MPN, SKU, product name
- Add LetzshopOrderStats schema for proper status counts

Migrations:
- a9a86cef6cca: Add locale and country fields to letzshop_orders
- cb88bc9b5f86: Add gtin columns to products table

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 21:04:33 +01:00
6d6c8b44d3 feat: add Notifications tab to Platform Settings
- Add Notifications tab to Settings > General page
- Include email, in-app, and critical-only notification toggles
- Add link to full Notifications page in Platform Monitoring
- Add notificationSettings state and saveNotificationSettings method

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 22:02:46 +01:00
c5ed09ac4f refactor: reorganize admin sidebar sections
- Move Background Tasks from Platform Health to Platform Monitoring
- Move Notifications from Settings to Platform Monitoring
- Rename Settings section to Platform Settings
- Update init-alpine.js page-to-section mappings

Platform Monitoring now contains: Import Jobs, Background Tasks,
Application Logs, and Notifications for centralized operational monitoring.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 21:56:37 +01:00
dc9aa0f769 docs: add Vendor Operations expansion migration plan
- Create comprehensive migration plan for Vendor Operations expansion
- Document planned phases: Inventory, Orders, Shipping management
- Include database schema designs and API endpoint specifications
- Move Customers from Platform Administration to Vendor Operations
- Update mkdocs navigation with new migration document

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 21:51:05 +01:00
2287204bfd refactor: rename Product Catalog to Vendor Operations
- Rename sidebar section from "Product Catalog" to "Vendor Operations"
- Change section key from 'productCatalog' to 'vendorOps'
- Add placeholder comments for future items (Inventory, Orders, Shipping)
- Update pageSectionMap in init-alpine.js

This prepares the sidebar for expanded vendor management capabilities
including inventory, orders, and shipping management.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 20:56:26 +01:00
45b09d6d90 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>
2025-12-14 18:27:04 +01:00
619c650598 feat: add local fallback for flag-icons CSS
- Download flag-icons CSS and SVG sprites for supported languages (gb, fr, de, lu)
- Add onerror fallback to all base templates (admin, vendor, shop)
- CDN loads first, falls back to local copy if unavailable

This ensures the language selector flags work even when CDN is blocked
or unavailable.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 23:13:43 +01:00
94d268f330 fix: add languageSelector function and translate icon for admin context
- Add languageSelector() function to admin init-alpine.js for use
  in language selector macros on admin components page
- Add 'translate' icon to icons.js for language selector display

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 22:46:29 +01:00
60f7de56ac fix: set default activeSection to 'ecommerce' in components page
The page starts with E-commerce section at the top, so the default
active section should match.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 22:44:04 +01:00
d2b05441fc feat: add multi-language (i18n) support for vendor dashboard and storefront
- Add database fields for language preferences:
  - Vendor: dashboard_language, storefront_language, storefront_languages
  - User: preferred_language
  - Customer: preferred_language

- Add language middleware for request-level language detection:
  - Cookie-based persistence
  - Browser Accept-Language fallback
  - Vendor storefront language constraints

- Add language API endpoints (/api/v1/language/*):
  - POST /set - Set language preference
  - GET /current - Get current language info
  - GET /list - List available languages
  - DELETE /clear - Clear preference

- Add i18n utilities (app/utils/i18n.py):
  - JSON-based translation loading
  - Jinja2 template integration
  - Language resolution helpers

- Add reusable language selector macros for templates
- Add languageSelector() Alpine.js component
- Add translation files (en, fr, de, lb) in static/locales/
- Add architecture rules documentation for language implementation
- Update marketplace-product-detail.js to use native language names

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 22:36:09 +01:00
8e5da6fec3 fix: include language parameter in marketplace import
Bug: Language selector worked on UI but import always used 'en'

Root causes:
1. Frontend: startImport() was not including language in API payload
2. Backend: language was not stored in import job database record
3. Backend: language was not returned in API response models

Fixes:
- Add language to payload in marketplace.js startImport()
- Add language column to MarketplaceImportJob model
- Store language when creating import job in service
- Include language in both response model converters
- Add database migration for language column

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 13:36:56 +01:00
c2f42c2913 feat: add import error tracking and translation tabs
Import Error Tracking:
- Add MarketplaceImportError model to store detailed error information
- Store row number, identifier, error type, message, and row data for each error
- Add API endpoint GET /admin/marketplace-import-jobs/{job_id}/errors
- Add UI to view and browse import errors in job details modal
- Support pagination and error type filtering

Translation Tabs:
- Replace flat translation list with tabbed interface on product detail page
- Add language tabs with full language names
- Add copy-to-clipboard functionality for translation content
- Improved UX with better visual separation of translations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 13:33:03 +01:00
3316894c27 fix: resolve all architecture validation warnings
Service layer:
- Remove db.commit() calls from credentials_service.py (SVC-006)
- Move transaction control to API endpoint level
- Rename client.py -> client_service.py (NAM-002)
- Rename credentials.py -> credentials_service.py (NAM-002)

JavaScript:
- Use centralized logger in admin letzshop.js (JS-001)
- Replace console.log/error with LogConfig logger

Frontend templates:
- Use page_header_flex macro for page header (FE-007)
- Use error_state macro for error display (FE-003)
- Use table_wrapper macro for vendors table (FE-005)
- Use modal macro for configuration and orders modals (FE-004)

All 31 Letzshop tests pass. Architecture validation: 0 errors, 0 warnings.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 12:57:26 +01:00
5bcbd14391 feat: add Letzshop frontend for admin and vendor portals
Add complete frontend UI for Letzshop marketplace integration:

Admin portal (/admin/letzshop):
- Vendor overview with Letzshop status cards
- Vendor table with configuration state and sync info
- Configuration modal for API credentials
- Connection testing and manual sync triggers
- Orders modal for viewing vendor orders

Vendor portal (/vendor/{code}/letzshop):
- Orders tab with import, confirm, reject actions
- Settings tab for API credentials management
- Tracking modal for shipment updates
- Order details modal with line items
- Stats display for order status counts

Also includes:
- Routes for both admin and vendor Letzshop pages
- Sidebar navigation updates for both portals
- Alpine.js data functions for reactive UI state

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 12:40:29 +01:00
c60243ceff feat: fix test collection and add collection stats display
- Fix collect_tests to use JSON report parsing (was returning 0 tests)
- Add Test Collection panel to testing dashboard showing total tests,
  unit/integration/performance breakdown, and file count
- Reorganize sidebar: create Platform Health section with Testing Hub,
  Code Quality, and Background Tasks
- Keep Developer Tools for Components and Icons only
- Platform Monitoring now contains Import Jobs and Application Logs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 23:53:23 +01:00
280e719a7a feat: add background tasks monitoring dashboard
Adds a unified view of all background tasks (imports and test runs)
under Platform Monitoring. Includes real-time status polling,
statistics overview, and task history.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 23:28:16 +01:00
0e6c9e3eea feat: run tests in background with progress polling
Improve the testing dashboard to run pytest in the background:

- Add background task execution using FastAPI's BackgroundTasks
- Create test_runner_tasks.py following existing background task pattern
- API now returns immediately after starting the test run
- Frontend polls for status every 2 seconds until completion
- Show running indicator with elapsed time counter
- Resume polling if user navigates away and returns while tests running
- Tests continue running even if user closes the page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 23:20:26 +01:00
e3a10b4a53 feat: add pytest testing dashboard with run history and statistics
Add a new Testing Dashboard page that replaces the old Testing Hub with
pytest integration:

- Database models for test runs, results, and collections (TestRun,
  TestResult, TestCollection)
- Test runner service that executes pytest with JSON reporting and
  stores results in the database
- REST API endpoints for running tests, viewing history, and statistics
- Dashboard UI showing pass rates, trends, tests by category, and top
  failing tests
- Alembic migration for the new test_* tables

The dashboard allows admins to:
- Run pytest directly from the UI
- View test run history with pass/fail statistics
- See trend data across recent runs
- Identify frequently failing tests
- Collect test information without running

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 23:04:41 +01:00
4e8ea8151c fix: add missing icons and use Utils.showToast() for notifications
Icons:
- Add cloud-download, cloud-upload, and key icons

Notifications:
- Replace alert() with Utils.showToast() in companies.js
- Replace alert() with Utils.showToast() in content-pages.js
- Add noqa comment for intentional fallback in components.js

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 22:37:10 +01:00
9c60989f1d feat: add marketplace products admin UI with copy-to-vendor functionality
- Add admin marketplace products page to browse imported products
- Add admin vendor products page to manage vendor catalog
- Add product detail pages for both marketplace and vendor products
- Implement copy-to-vendor API to copy marketplace products to vendor catalogs
- Add vendor product service with CRUD operations
- Update sidebar navigation with new product management links
- Add integration and unit tests for new endpoints and services

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 22:36:04 +01:00
89c98cb645 fix: resolve Alpine.js warnings on components page
- Add missing icons: chat-alt, exclamation-circle, clipboard-copy
- Replace x-collapse with x-transition in category-nav and filter-sidebar
  (x-collapse requires the Collapse plugin which isn't loaded)
- Fix review_form macro call to include images_model parameter

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 18:05:15 +01:00
a40c88dcea docs: add details modal and log modal patterns to component library
- Add Details Modal (Table Layout) example to components page
  - Shows header with icon and status badge
  - Stats cards grid (imported, updated, errors, total)
  - Key-value table with icon-labeled rows
- Add Log Details Modal example with live demo
  - Level-based coloring (warning=yellow, error=red, critical=purple)
  - Message, exception, and stack trace sections
  - Copy-to-clipboard for stack traces
  - Both error and warning log demo buttons
- Update jinja-macros.md with Details Modal Pattern documentation
  - Document the pattern structure and key features
  - Link to components library for live examples
- Add Alpine.js state variables for new modal demos

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 18:01:21 +01:00
2239522d79 feat: redesign log details modal with improved UI
- Add header with log level icon and colored badge
- Replace grid layout with table for log metadata (timestamp, logger, module)
- Add icons to table rows for better visual hierarchy
- Improve message section with card styling and pre-wrap text
- Enhance exception section with icon and red styling
- Add stack trace section with dark theme, monospace font, and copy button
- Include proper footer with close button
- Support dark mode throughout all new elements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 17:47:57 +01:00
15bb9a6bda chore: rebuild Tailwind CSS and update gitignore
- Rebuild admin and shop Tailwind CSS with new component styles
- Add tailadmin template directory to gitignore

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 18:17:58 +01:00
8fe1315cac feat: add Priority 4 and 5 demos to components showcase page
Add interactive demos for all new e-commerce macros:

Priority 4 - Navigation & Discovery:
- Category navigation with mega menu
- Breadcrumb variants
- Search bar with autocomplete
- Filter sidebar with all filter types
- Sort dropdown

Priority 5 - Social Proof & Trust:
- Star ratings (static, dynamic, sizes)
- Compact ratings for lists
- Interactive rating input
- Rating summary with distribution
- Review cards with helpful voting
- Review form
- Trust badges grid
- Trust banner variants
- Payment method icons
- Guarantee badges
- Security seals
- Checkout trust section

Demo state includes sample data for categories, filters,
reviews, and ratings to showcase all component features.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 18:17:30 +01:00
43896a8644 feat: add icons for Priority 4 and 5 e-commerce components
Add new icons to support navigation and social proof components:

Priority 4 (Navigation):
- trending-up: For trending/popular search suggestions

Priority 5 (Social Proof & Trust):
- camera: For review image uploads
- pencil: For edit/write review actions
- cash: For money-back guarantee badges
- support: For 24/7 support trust badges
- emoji-happy: For satisfaction guarantee badges

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 18:17:19 +01:00
ecd12b8667 feat: add Priority 3 demos to components showcase page
Add live demos for:
- Product Gallery with image navigation and thumbnails
- Variant Selector with size buttons and color swatches
- Product Info with title, price, rating, stock status
- Product Tabs with description, specifications, reviews

Add demoProductDetail state with full product data including
images, sizes, colors, specifications, and sample reviews.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 17:14:43 +01:00
f6fc74acef feat: add navigation and feedback icons for e-commerce
Add icons: chevron-left, chevron-up, zoom-in, zoom-out, arrows-expand,
chat-alt-2, thumb-up, thumb-down

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 17:14:35 +01:00
353da1581a chore: rebuild Tailwind CSS with new component styles
Rebuild all frontend CSS files to include styles for:
- Number stepper component
- Tab components
- E-commerce shop components

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 17:04:56 +01:00
021ef3576c feat: add missing icons for macros and components
Add icons: template, view-boards, menu-alt-2, trash (alias for delete)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 17:04:49 +01:00
c903248846 feat: add e-commerce section to components showcase page
- Add E-commerce section with live demos for all shop macros
- Add demo products and cart state to components.js
- Add demo methods: demoAddToCart, demoToggleWishlist, demoRemoveFromCart
- Showcase product cards, mini cart, add-to-cart functionality
- Add Macros section navigation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 17:04:19 +01:00
74e8620fc7 refactor: standardize pagination across all admin pages
Migrated marketplace.js, imports.js, and logs.js to use the same
pagination pattern as companies.js, users.js, and vendors.js:

- pagination: { page, per_page, total, pages }
- Computed getters: totalPages, startIndex, endIndex, pageNumbers
- Methods: previousPage(), nextPage(), goToPage()

Updated templates to use the shared pagination macro:
- marketplace.html
- imports.html
- logs.html

All admin pages now use consistent pagination behavior and styling.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-06 20:15:41 +01:00
ffa15aee2b feat: add Chart.js and Flatpickr with CDN fallback strategy
Add optional libraries with local fallback for offline development:

Vendor files added:
- static/shared/js/vendor/chart.umd.min.js (Chart.js 4.4.1)
- static/shared/js/vendor/flatpickr.min.js (Flatpickr 4.6.13)
- static/shared/css/vendor/flatpickr.min.css

Template updates:
- admin/base.html: Add optional blocks for chartjs_script, flatpickr_script, flatpickr_css
- shared/includes/optional-libs.html: CDN fallback loaders for both libraries

Usage in page templates:
  {% block flatpickr_css %}
    {% from 'shared/includes/optional-libs.html' import flatpickr_css_loader %}
    {{ flatpickr_css_loader() }}
  {% endblock %}

  {% block chartjs_script %}
    {% from 'shared/includes/optional-libs.html' import chartjs_loader %}
    {{ chartjs_loader() }}
  {% endblock %}

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-06 19:09:06 +01:00
990ca322f3 docs: add macros and pagination sections to components page
Update admin components page with documentation for:

- New Macros section listing all available shared macros with imports
- Pagination section with live interactive examples
- Copy-to-clipboard functionality for code snippets
- Dark mode support for all new sections

This serves as a living style guide for developers implementing
new admin pages using the shared component library.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-06 18:35:52 +01:00
8766e63120 refactor: migrate code-quality-violations pagination to standard pattern
Update pagination in code-quality-violations to match companies/vendors:

- Add numbered page buttons with ellipsis for large page counts
- Add startIndex and endIndex computed properties
- Add goToPage(pageNum) method for direct page navigation
- Use consistent grid layout (col-span-3, col-span-9)

This standardizes pagination UI across all admin tables.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-06 18:35:34 +01:00
8a367077e1 refactor: migrate vendor APIs to token-based context and consolidate architecture
## Vendor-in-Token Architecture (Complete Migration)
- Migrate all vendor API endpoints from require_vendor_context() to token_vendor_id
- Update permission dependencies to extract vendor from JWT token
- Add vendor exceptions: VendorAccessDeniedException, VendorOwnerOnlyException,
  InsufficientVendorPermissionsException
- Shop endpoints retain require_vendor_context() for URL-based detection
- Add AUTH-004 architecture rule enforcing vendor context patterns
- Fix marketplace router missing /marketplace prefix

## Exception Pattern Fixes (API-003/API-004)
- Services raise domain exceptions, endpoints let them bubble up
- Add code_quality and content_page exception modules
- Move business logic from endpoints to services (admin, auth, content_page)
- Fix exception handling in admin, shop, and vendor endpoints

## Tailwind CSS Consolidation
- Consolidate CSS to per-area files (admin, vendor, shop, platform)
- Remove shared/cdn-fallback.html and shared/css/tailwind.min.css
- Update all templates to use area-specific Tailwind output files
- Remove Node.js config (package.json, postcss.config.js, tailwind.config.js)

## Documentation & Cleanup
- Update vendor-in-token-architecture.md with completed migration status
- Update architecture-rules.md with new rules
- Move migration docs to docs/development/migration/
- Remove duplicate/obsolete documentation files
- Merge pytest.ini settings into pyproject.toml

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 22:24:45 +01:00
76f8a59954 feat(sidebar): add collapsible sections with localStorage persistence
Sidebar sections can now be collapsed/expanded by clicking the header.
State is persisted to localStorage so sections remain open/closed
across page navigation and browser sessions.

Changes:
- init-alpine.js: Added openSections state, toggleSection(),
  expandSectionForCurrentPage(), and localStorage helpers
- sidebar.html: Refactored with Jinja2 macros for DRY code,
  added collapsible sections with CSS transitions and rotating
  chevron icons

Features:
- Click section header to toggle expand/collapse
- Chevron rotates 180 degrees when expanded
- Smooth CSS transitions (no extra Alpine plugins needed)
- State persists in localStorage (admin_sidebar_sections key)
- Default: Platform Administration open, others closed
- Dashboard and Settings always visible (not collapsible)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 23:13:59 +01:00
5753dd4dcd fix(vendor): correct contact field inheritance UI logic
Fixed the inheritance UI to be based on formData content rather than
stale server state (vendor._inherited flags):

- "(from company)" shows when formData field is empty
- "Reset" shows when formData field has a value
- Purple border shows when formData field is empty
- formData initialization: empty for inherited, actual value for overrides

This ensures each field's UI is independent and reactive to user input.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 22:45:55 +01:00
c2228bbded feat(vendor): add frontend for contact info inheritance
Add UI for vendor contact field inheritance from company:
- Show "(from company)" indicator for inherited fields
- Add "Reset" button per field to clear override
- Add "Reset All to Company" button for bulk reset
- Purple border styling for inherited fields
- Dynamic placeholder showing company values

JavaScript methods:
- resetFieldToCompany(fieldName): Reset individual field
- resetAllContactToCompany(): Reset all contact fields
- hasAnyContactOverride(): Check if any field is overridden

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 22:36:33 +01:00
0bd1c0d14b fix: minor fixes and template updates
- seed_demo.py: Change company owner role from "user" to "vendor"
- header.html: Update header partial styling/content
- marketplace.js: Minor JS updates
- marketplace.html: Template updates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 21:37:50 +01:00
5111684fde feat(ui): add new icons and loggers
Icons added to icons.js:
- user-plus, user-check, user-x: User action icons
- shield: Plain shield icon
- store: E-commerce store icon

Loggers added to log-config.js:
- companies: For company management logging
- marketplace: For marketplace operations logging

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 21:37:43 +01:00
cfa396dfc4 feat(admin): add server-side pagination and search to list pages
Companies and Vendors pages now use server-side pagination:
- Moved from client-side to server-side pagination
- Added search with debounced input
- Added status and verification filters
- Added pagination state object (page, per_page, total, pages)
- Added pageNumbers computed with ellipsis support
- Updated templates with search bar and filter dropdowns

Benefits:
- Better performance with large datasets
- Consistent UX across all admin list pages
- Reduced initial page load time

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 21:37:31 +01:00
be9c892739 feat(users): implement full user management CRUD
API endpoints (app/api/v1/admin/users.py):
- GET /users: Paginated list with search and filters
- POST /users: Create new user
- GET /users/{id}: Get user details with related counts
- PUT /users/{id}: Update user information
- PUT /users/{id}/status: Toggle active status
- DELETE /users/{id}: Delete user (with ownership check)

Pydantic schemas (models/schema/auth.py):
- UserCreate: For creating new users
- UserUpdate: For updating user information
- UserDetailResponse: Extended user details with counts
- UserListResponse: Paginated list response

Frontend:
- Updated users.html with server-side pagination and filters
- New user-create.html/js for user creation form
- New user-detail.html/js for viewing user details
- New user-edit.html/js for editing users

Routes added for user create, detail, and edit pages.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 21:37:23 +01:00
6d05b91e9f feat(vendor): implement vendor create page
Add vendor-create.html template:
- Company dropdown with dynamic loading
- Vendor code and subdomain fields with auto-generation
- Name, description, and optional marketplace CSV URL fields
- Extends admin/base.html with proper layout

Add vendor-create.js:
- Uses centralized logger (vendorCreateLog)
- Alpine.js component for form handling
- Company loading from API
- Subdomain auto-generation from vendor name
- Form submission with validation

Route was already defined in admin_pages.py.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 21:34:13 +01:00
dd0ba1ed5e fix(js): replace console.log with centralized logger (JS-002)
Convert direct console.log/error/warn calls to use centralized logger:
- imports.js: 13 violations fixed using adminImportsLog
- vendor-themes.js: 5 violations fixed using vendorThemesLog
- code-quality-dashboard.js: 2 violations fixed using codeQualityLog
- code-quality-violations.js: 1 violation fixed using codeQualityViolationsLog
- settings.js: 1 violation fixed using settingsLog

All files now use window.LogConfig.loggers.* for consistent logging.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 21:31:48 +01:00
da3d33a69c feat: add Tailwind CSS configuration and build setup
- Add package.json with Tailwind dependencies
- Add tailwind.config.js and postcss.config.js
- Add source tailwind.css file
- Generate tailwind.output.css for admin and vendor
- Add Tailwind CSS documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 19:40:21 +01:00
9879c5b4bb chore: add missing icons and update seed script
- Add office-building, lock-open, switch-horizontal, x icons
- Remove owner_user_id from vendor creation in seed script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 19:39:53 +01:00
e094e81649 feat: add View Parent Company link to vendor detail page
- Add "View Parent Company" button in More Actions section
- Show parent company name in info text
- Add deleteVendor function to vendor-edit.js

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 19:39:46 +01:00