F4: add dashboard contract without finding response states
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
import { apiRequest } from './api';
|
||||
|
||||
export interface DashboardSummaryF4 {
|
||||
counts: {
|
||||
totalAssets: number;
|
||||
assetsNeedValidation: number;
|
||||
assetsWithoutGeometry: number;
|
||||
plannedInspections: number;
|
||||
activeUsers: number;
|
||||
inactiveUsers: number;
|
||||
activeSessions: number;
|
||||
openFindings: number;
|
||||
findingsWithoutControlDate: number;
|
||||
overdueControls: number;
|
||||
controlsNext30Days: number;
|
||||
reportsWorking: number;
|
||||
reportsOfficialized: number;
|
||||
sealedActsWithoutReport: number;
|
||||
};
|
||||
recentAudit: Array<{
|
||||
id: string;
|
||||
occurredAt: string;
|
||||
actorUsername: string | null;
|
||||
action: string;
|
||||
entityType: string | null;
|
||||
entityId: string | null;
|
||||
}>;
|
||||
upcomingControls: Array<{
|
||||
id: string;
|
||||
code: string;
|
||||
title: string;
|
||||
nextControlOn: string;
|
||||
actId: string;
|
||||
actCode: string;
|
||||
visitId: string;
|
||||
visitCode: string;
|
||||
assetId: string;
|
||||
assetCode: string;
|
||||
assetName: string;
|
||||
}>;
|
||||
generatedAt: string;
|
||||
}
|
||||
|
||||
export function getDashboardSummaryF4() {
|
||||
return apiRequest<DashboardSummaryF4>('/dashboard/summary');
|
||||
}
|
||||
Reference in New Issue
Block a user