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

@ -486,6 +486,30 @@ export class AutotaskClient {
async deleteTimeEntry(id: number): Promise<void> {
return this.deleteEntity('TimeEntries', id);
}
// Classification Icons methods
async getClassificationIcons(): Promise<any[]> {
// Autotask API endpoint for classification icons
const url = `${this.config.apiUrl}/CompanyClassificationIcons`;
const response = await this.makeApiCall<any>(url, {
method: 'GET',
headers: this.getAuthHeaders(),
});
return response.items || [];
}
async getFieldInfo(entityName: string): Promise<EntityField[]> {
const url = `${this.config.apiUrl}/${entityName}/entityInformation/fields`;
const response = await this.makeApiCall<any>(url, {
method: 'GET',
headers: this.getAuthHeaders(),
});
return response.fields || [];
}
}
// Rate Limiter class