mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-22 06:15:47 +00:00
feat(FE): slicing UI dashboard and define data types
This commit is contained in:
@@ -1,52 +0,0 @@
|
||||
export interface DashboardProduction {
|
||||
statistics_data: DashboardProductionStatisticsData[];
|
||||
production_charts: DashboardProductionProductionCharts[];
|
||||
standard_productions: DashboardProductionStandardProductions[];
|
||||
egg_weights: DashboardProductionEggWeights[];
|
||||
fcr_data: DashboardProductionFcrData[];
|
||||
}
|
||||
|
||||
export interface DashboardProductionFcrData {
|
||||
flock: DashboardProductionFcrDataFlock;
|
||||
fcr: number;
|
||||
}
|
||||
|
||||
export interface DashboardProductionEggWeights {
|
||||
flock: DashboardProductionFcrDataFlock;
|
||||
weight: number;
|
||||
}
|
||||
|
||||
export interface DashboardProductionStandardProductions {
|
||||
week: number;
|
||||
standards: DashboardProductionStandardProductionsStandards[];
|
||||
flocks: DashboardProductionProductionChartsFlocks[];
|
||||
}
|
||||
|
||||
export interface DashboardProductionProductionCharts {
|
||||
date: string;
|
||||
flocks: DashboardProductionProductionChartsFlocks[];
|
||||
}
|
||||
|
||||
export interface DashboardProductionStatisticsData {
|
||||
title: string;
|
||||
value: number;
|
||||
change: number;
|
||||
period: string;
|
||||
changeType: string;
|
||||
}
|
||||
|
||||
export interface DashboardProductionFcrDataFlock {
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface DashboardProductionStandardProductionsStandards {
|
||||
name: string;
|
||||
value: number;
|
||||
}
|
||||
|
||||
export interface DashboardProductionProductionChartsFlocks {
|
||||
id: number;
|
||||
name: string;
|
||||
data: number;
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
export interface Dashboard {
|
||||
statistics_data: DashboardStatisticsData[];
|
||||
charts: DashboardComparisonCharts | DashboardOverviewCharts;
|
||||
}
|
||||
|
||||
export interface DashboardComparisonCharts {
|
||||
location: DashboardCharts;
|
||||
flock: DashboardCharts;
|
||||
kandang: DashboardCharts;
|
||||
}
|
||||
|
||||
export interface DashboardOverviewCharts {
|
||||
body_weight: DashboardCharts;
|
||||
performance: DashboardCharts;
|
||||
fcr: DashboardCharts;
|
||||
quality_control: DashboardCharts;
|
||||
deplesi: DashboardCharts;
|
||||
}
|
||||
|
||||
export interface DashboardCharts {
|
||||
series: DashboardChartsSeries[];
|
||||
dataset: DashboardChartsDataset[];
|
||||
}
|
||||
|
||||
export interface DashboardStatisticsData {
|
||||
label: string;
|
||||
value: number;
|
||||
percent_last_month: number;
|
||||
}
|
||||
|
||||
export interface DashboardChartsDataset {
|
||||
week: number;
|
||||
// Index signature to support dynamic keys (series IDs) in comparison mode
|
||||
[key: string | number]: number | undefined;
|
||||
}
|
||||
|
||||
export interface DashboardChartsSeries {
|
||||
id: string | number;
|
||||
label: string;
|
||||
unit: string;
|
||||
}
|
||||
|
||||
export interface DashboardFilter {
|
||||
start_date: string;
|
||||
end_date: string;
|
||||
analysis_mode: 'OVERVIEW' | 'COMPARISON';
|
||||
location_ids: number[];
|
||||
flock_ids: number[];
|
||||
kandang_ids: number[];
|
||||
}
|
||||
Reference in New Issue
Block a user