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>
This commit is contained in:
2026-01-31 17:05:56 +01:00
parent 7d79273743
commit af5066dd26
16 changed files with 5806 additions and 107 deletions

View File

@@ -1319,7 +1319,7 @@ trait EntitySelector
],
'suppliers' => [
'label' => $this->transEntitySelector('Suppliers'),
'icon' => 'icon-truck',
'icon' => 'icon-archive',
'entity_label' => $this->transEntitySelector('supplier'),
'entity_label_plural' => $this->transEntitySelector('suppliers'),
'selection_methods' => $this->getSupplierSelectionMethods(),
@@ -1341,21 +1341,21 @@ trait EntitySelector
// Transactional / System entities
'employees' => [
'label' => $this->transEntitySelector('Employees'),
'icon' => 'icon-user-secret',
'icon' => 'icon-briefcase',
'entity_label' => $this->transEntitySelector('employee'),
'entity_label_plural' => $this->transEntitySelector('employees'),
'selection_methods' => $this->getEmployeeSelectionMethods(),
],
'customers' => [
'label' => $this->transEntitySelector('Customers'),
'icon' => 'icon-users',
'icon' => 'icon-user',
'entity_label' => $this->transEntitySelector('customer'),
'entity_label_plural' => $this->transEntitySelector('customers'),
'selection_methods' => $this->getCustomerSelectionMethods(),
],
'customer_groups' => [
'label' => $this->transEntitySelector('Customer Groups'),
'icon' => 'icon-group',
'icon' => 'icon-users',
'entity_label' => $this->transEntitySelector('customer group'),
'entity_label_plural' => $this->transEntitySelector('customer groups'),
'selection_methods' => $this->getCustomerGroupSelectionMethods(),
@@ -1418,7 +1418,7 @@ trait EntitySelector
],
'taxes' => [
'label' => $this->transEntitySelector('Taxes'),
'icon' => 'icon-money',
'icon' => 'icon-calculator',
'entity_label' => $this->transEntitySelector('tax'),
'entity_label_plural' => $this->transEntitySelector('taxes'),
'selection_methods' => $this->getTaxSelectionMethods(),