wulf-pulse/lib/services
root 31c2d94a1b fix: skip soft deletes for ALL entities with filters applied
More robust fix based on user feedback: instead of hardcoding specific
entity types, now dynamically checks if ANY filters were applied during
the sync and skips soft deletes accordingly.

Previous approach (hardcoded):
- Maintained list of specific entities to skip
- Easy to miss new entities (like billing_items bug)
- Required manual updates when adding new filters

New approach (dynamic):
- Tracks whether params.filter has any values
- Applies to ALL entities with ANY filter type:
  * Date filters (tickets, tasks, time_entries, billing_items)
  * Status filters (contracts, projects)
  * Active filters (companies, resources, contacts, etc.)
- Future-proof: automatically handles new filtered entities

Logic:
- hasAppliedFilters = params.filter && params.filter.length > 0
- if (!isIncremental && !hasAppliedFilters) → perform soft deletes
- if (!isIncremental && hasAppliedFilters) → skip soft deletes

This prevents deleting records that exist outside any filter criteria,
not just date ranges.
2026-01-24 09:57:01 -05:00
..
addigy-client.ts Restructure: rename to Pulse and move app to root 2025-10-28 23:08:54 -04:00
addigy-factory.ts Restructure: rename to Pulse and move app to root 2025-10-28 23:08:54 -04:00
analytics-engine.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
analytics-integration.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
autotask-client.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
autotask-factory.ts Restructure: rename to Pulse and move app to root 2025-10-28 23:08:54 -04:00
auvik-client.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
auvik-factory.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
background-processor.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
cache.ts Restructure: rename to Pulse and move app to root 2025-10-28 23:08:54 -04:00
datto-rmm-client-simple.ts Restructure: rename to Pulse and move app to root 2025-10-28 23:08:54 -04:00
datto-rmm-client.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
datto-rmm-factory.ts Restructure: rename to Pulse and move app to root 2025-10-28 23:08:54 -04:00
entity-sync.ts fix: skip soft deletes for ALL entities with filters applied 2026-01-24 09:57:01 -05:00
issue-type-assignment.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
llm-analyzer.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
performance-optimizer.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
postgres-client.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
rate-limiter.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
redis-client.ts Restructure: rename to Pulse and move app to root 2025-10-28 23:08:54 -04:00
sync-progress-tracker.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
sync-service.ts feat: add tabs to sync page and fix pagination 2026-01-24 07:57:09 -05:00