Commit Graph

1 Commits

Author SHA1 Message Date
c0mrade
f398d9e95c refactor(bulk-actions): extract FloatingActionBar + actionTargets
Second step in the AdminBulkActions decomp. Two new files:

- actionTargets.ts (27 lines): SUBSCRIPTION_LEVEL_ACTIONS set +
  isSubscriptionLevelAction(). The classification is the source of
  truth shared between FloatingActionBar (renders two grouped menus
  when multi-tariff is on) and the parent page (gates selection-count
  semantics + the active-paid count in delete-subscription).

- FloatingActionBar.tsx (304 lines): the bottom-dock selection
  toolbar. Pure presentational — parent owns selection state and
  supplies onAction (opens the modal with the picked action type)
  + onToggleAllSubscriptions. The full 11-item action config (icons
  + label keys + colour classes) lives inside the file as a private
  ActionConfig array.

Parent now imports FloatingActionBar + isSubscriptionLevelAction
from the new modules; the inline ActionConfig interface is gone.

AdminBulkActions.tsx: 1819 → 1517 lines (-302).
Cumulative across the 2-step admin decomp: 2539 → 1517 (-1022, -40%).
2026-05-27 09:31:10 +03:00