Commit Graph

9 Commits

Author SHA1 Message Date
451a47cdcd Add schedule preview dropdown styles and various improvements
- Add .schedule-preview-dropdown and .schedule-preview-item CSS classes
- Add .btn-schedule-preview badge styling
- Add preview functionality for entity list views
- Improve modal and dropdown styling
- Various JS and SCSS enhancements

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 11:49:01 +00:00
5ee4617cb1 Fix: pendingSelections sync and chips toolbar display
1. Fix Select All not persisting in list view:
   - Updated Select All handler to populate pendingSelections array
   - Updated Clear selection handler to clear pendingSelections for list view
   - Updated dropdown item click to add/remove from pendingSelections
   - Updated chip remove handler to filter pendingSelections

2. Fix chips toolbar (search/delete all) not showing:
   - PHP renderer was pre-creating chips-wrapper without toolbar
   - JS ensureChipsWrapper was skipping because wrapper existed
   - Removed wrapper from PHP so JS creates complete wrapper with toolbar

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 18:41:22 +00:00
743e9c8020 Fix tree view selection and add entity-specific sort options
- Fix validation mixin not being merged in _core.js which broke tree item selection
- Add data-entities attribute to sort options for entity-specific filtering
- Improve event handlers and filter panel updates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 18:10:18 +00:00
af5066dd26 Add selection validation and improve tooltip component
- Add validation system to prevent contradicting conditions:
  - Same entity in include/exclude detection
  - Parent-child conflict detection for tree entities
  - Redundant selection prevention
  - Toast notifications for validation errors

- Fix entity icons (employees: briefcase, taxes: calculator)

- Improve tooltip component:
  - Use Material Icons instead of broken FA4 icons
  - Fix positioning using getBoundingClientRect for viewport coords
  - Add click-to-pin functionality with close button
  - Pinned tooltips show X icon and close button in corner

- Add lightweight test suite (31 tests) for validation logic

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 17:05:56 +01:00
7d79273743 Add hierarchical tree view for category selection
Features:
- Tree view mode for categories with expand/collapse
- Product count badges with clickable preview popover
- Select parent with all children button
- Client-side tree filtering (refine search)
- Keyboard shortcuts: Ctrl+A (select all), Ctrl+D (clear)
- View mode switching between tree/list/columns
- Tree view as default for categories, respects user preference

Backend:
- Add previewCategoryProducts and previewCategoryPages AJAX handlers
- Support pagination and filtering in category previews

Styling:
- Consistent count-badge styling across tree and other views
- Loading and popover-open states for count badges

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 15:03:51 +01:00
b79a89bbb4 Add AJAX filtering for preview popover with width lock
- Convert preview filter from client-side JS to server-side AJAX
- Add debounce utility function for 300ms delayed AJAX calls
- Add filter handlers for all 4 preview types (tab, condition, group, filter-group)
- Add filterProductIdsByQuery() method to EntityPreviewHandler
- Update all AJAX handlers to support filter parameter
- Lock popover width when filtering to prevent resize
- Add loading overlay CSS for filter state

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:07:56 +01:00
eb15170e1c Add previewFilterGroupProducts AJAX handler
- Add case in handleEntitySelectorAjax switch for previewFilterGroupProducts
- Implement ajaxPreviewFilterGroupProducts() to get products by attribute/feature group
- Returns items with name, reference, manufacturer, image for popover preview

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 10:46:55 +00:00
aa9f28bb7e Refactor from Tailwind CSS to SCSS/Bootstrap
Major changes:
- Replace Tailwind with SCSS using Bootstrap-compatible variables
- Add Gulp build system for SCSS and JS compilation
- Split JS into modular partials (_events, _filters, _preview, etc.)

CSS fixes:
- Fix preview popover visibility (remove conflicting modal.scss rule)
- Fix search input max-width override for parent form styles
- Add filter panel styling (toggle buttons, chips, values row)
- Add group-body padding with negative margins on modifiers
- Style filter-group-toggle with eye icon for preview

JS additions:
- Add showGroupPreviewPopover for group count badge clicks
- Add showItemsPopover for rendering preview popover
- Add renderPreviewItems for product list rendering
- Add eye icon to filter toggle button generation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:11:22 +01:00
a285018e0d Initial commit: prestashop-entity-selector
Forked from prestashop-target-conditions
Renamed all references from target-conditions to entity-selector
2026-01-26 14:02:54 +00:00