Merges ac-helper (PHP Activation Calendar) and brief-extractor (Python AI) into a single Docker app with React/TypeScript frontend. Features: - Brief upload → AI extraction → review → Activation Calendar import - Handsontable v17 spreadsheet with dependent dropdowns (148 categories) - AI natural language commands via Gemini (YOLO mode, voice input) - Azure AD MSAL SPA PKCE authentication, user roles (user/admin) - CSV Activation Calendar export - Real-time WebSocket job progress - Admin: user management, dropdown Excel upload - Multi-stage Dockerfile, docker-compose, nginx proxy instructions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
826 B
TypeScript
20 lines
826 B
TypeScript
import api from './client'
|
|
import type { User, CategoryData } from '../types'
|
|
|
|
export const listUsers = () =>
|
|
api.get<{ users: User[] }>('/admin/users').then(r => r.data.users)
|
|
|
|
export const updateUser = (id: string, patch: { role?: User['role']; active?: boolean }) =>
|
|
api.patch<{ success: boolean; user: User }>(`/admin/users/${id}`, patch).then(r => r.data.user)
|
|
|
|
export const uploadDropdowns = (file: File) => {
|
|
const form = new FormData()
|
|
form.append('file', file)
|
|
return api.post<{ success: boolean; total: number; active: number }>('/admin/dropdowns/upload', form).then(r => r.data)
|
|
}
|
|
|
|
export const previewDropdowns = (file: File) => {
|
|
const form = new FormData()
|
|
form.append('file', file)
|
|
return api.post<{ categories: CategoryData[] }>('/admin/dropdowns/preview', form).then(r => r.data.categories)
|
|
}
|