feat: Display Settings UI + Company Category/Type sync

- Add /admin/display-settings page with Kiosk and Mobile sections
- Company category checkbox filter + excluded companies searchable multi-select
- New DB tables: company_categories, company_types (migration 064)
- Sync COMPANY_CATEGORIES via CompanyCategories entity (id/name/isActive)
- Sync COMPANY_TYPES via Companies.companyType picklist
- Add to EntityType, ENTITY_DEPENDENCIES, sync-helpers, entity-mapper, entity-sync
- New API routes: /api/admin/display-settings (GET/POST), /api/data/company-categories, /api/data/companies-list
- Update all 4 routes (kiosk/stats, kiosk/activity, mobile/tickets, mobile/dashboard)
  to filter by kiosk_settings company_category_ids + excluded_company_ids
- Add Display Settings nav link (SlidersHorizontal icon) to Admin menu
- Seed kiosk_settings: kiosk_company_category_ids=1, mobile_company_category_ids=1
This commit is contained in:
lorentz 2026-04-06 09:03:19 -04:00
parent 89dbe6155b
commit 07067bef19
16 changed files with 847 additions and 85 deletions

View file

@ -28,6 +28,8 @@ export enum EntityType {
TAG_GROUPS = 'autotask_tag_groups',
TAGS = 'autotask_tags',
PROJECT_PHASES = 'project_phases',
COMPANY_CATEGORIES = 'company_categories',
COMPANY_TYPES = 'company_types',
}
// Sync operation types
@ -177,6 +179,8 @@ export const ENTITY_DEPENDENCIES: Record<EntityType, EntityType[]> = {
[EntityType.TAG_GROUPS]: [], // No dependencies — standalone lookup
[EntityType.TAGS]: [EntityType.TAG_GROUPS], // Depends on tag groups (FK)
[EntityType.PROJECT_PHASES]: [EntityType.PROJECTS], // Depends on projects
[EntityType.COMPANY_CATEGORIES]: [], // No dependencies — standalone lookup
[EntityType.COMPANY_TYPES]: [], // No dependencies — standalone lookup
};
// Autotask API field names (for incremental sync)