feat: add classification icons sync from Autotask

- Created company_classifications table to store Autotask classification icons
- Added getClassificationIcons() method to AutotaskClient
- Created /api/sync/classifications endpoint (GET/POST)
- Updated kiosk settings UI to dynamically load classifications
- Added 'Sync from Autotask' button to pull latest classifications
- Removed hardcoded classification list
- Display classification name and description in checkboxes
- Allow excluding any classification synced from Autotask
This commit is contained in:
lorentz 2026-02-03 20:48:08 -05:00
parent 9940c20379
commit b222d97225
4 changed files with 253 additions and 78 deletions

View file

@ -0,0 +1,22 @@
-- Create company_classifications table to store Autotask classification icons
CREATE TABLE IF NOT EXISTS company_classifications (
id SERIAL PRIMARY KEY,
classification_id INTEGER UNIQUE NOT NULL,
name VARCHAR(255) NOT NULL,
description TEXT,
is_active BOOLEAN DEFAULT true,
is_system BOOLEAN DEFAULT false,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
synced_at TIMESTAMP
);
-- Create index for faster lookups
CREATE INDEX IF NOT EXISTS idx_company_classifications_name ON company_classifications(name);
CREATE INDEX IF NOT EXISTS idx_company_classifications_active ON company_classifications(is_active);
-- Add comment
COMMENT ON TABLE company_classifications IS 'Company classification icons synced from Autotask';
COMMENT ON COLUMN company_classifications.classification_id IS 'Autotask classification icon ID';
COMMENT ON COLUMN company_classifications.name IS 'Classification name (e.g., Tools Only, Co-Managed)';
COMMENT ON COLUMN company_classifications.is_system IS 'Whether this is a system classification';