users: tabla + sync detalle + lookups para roles/companies
- db.ts v6: tablas users + lookups con schema
- users-db.ts: CRUD users + lookups
- user-sync.ts: fetch /api/users/{id}/ con concurrencia 5
- kappa-api.ts: +getUserDetail(id)
- users store: +syncDetails() con progreso + mapeo roleId→name
- UsersView: boton 'Sincronizar roles' con progreso
- UserRecord: username, isStaff, phone, position, lastActive, createdAt
This commit is contained in:
@@ -99,6 +99,10 @@ class KappaAPI {
|
||||
return this.request<unknown[]>('GET', '/users/all/')
|
||||
}
|
||||
|
||||
async getUserDetail(id: number): Promise<Record<string, unknown>> {
|
||||
return this.request<Record<string, unknown>>('GET', `/users/${id}/`)
|
||||
}
|
||||
|
||||
async getEmployees(page = 1): Promise<PaginatedResponse<KappaEmployee>> {
|
||||
return this.request<PaginatedResponse<KappaEmployee>>('GET', `/employees/?page=${page}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user