- Login: company-code hint after an invalid-credentials failure with an empty company. - Password forms show the active rules (label-first, count-safe) and tie hint and refusal to the input. - Interests and roles: soft delete with confirm dialogs; deactivate now confirms too. - Dashboard figure explanations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
15 lines
631 B
TypeScript
15 lines
631 B
TypeScript
import { apiGet, apiPost, apiPut, apiDelete } from "@/app/lib/clientApi";
|
|
import type { AdminInterestEntity } from "@/app/lib/types";
|
|
|
|
export async function listAdminInterests(): Promise<AdminInterestEntity[]> {
|
|
return apiGet<AdminInterestEntity[]>("/api/interests");
|
|
}
|
|
|
|
export async function saveAdminInterest(payload: AdminInterestEntity): Promise<AdminInterestEntity> {
|
|
return payload.id
|
|
? apiPut<AdminInterestEntity>(`/api/interests/${payload.id}`, payload)
|
|
: apiPost<AdminInterestEntity>("/api/interests", payload);
|
|
}
|
|
|
|
export const deleteAdminInterest = (id: number) => apiDelete<unknown>(`/api/interests/${id}`);
|