Files
Alberto-Audrix 32a36cceff
CI / lint-and-test (push) Canceled after 0s
first commit
2026-07-28 08:55:05 +07:00

66 lines
2.3 KiB
TypeScript

import {
WeightStatistics,
WeightDataPoint,
WeightDistributionPoint,
WeightAlert,
WeightAlertType,
AlertSeverity,
} from '../types';
import { getTargetWeightForDay } from '../utils/weightUtils.ts';
export const initialWeightStats: WeightStatistics = {
averageWeight: { value: 2303, unit: 'g', status: 'ok' },
avgDailyGain: { value: 67, unit: 'g/hari', status: 'warning' },
uniformity: { value: 95, unit: '%', status: 'ok' },
};
export const initialWeightHistory: WeightDataPoint[] = [
{ day: 28, actual: 1302, target: getTargetWeightForDay(28) },
{ day: 29, actual: 1436, target: getTargetWeightForDay(29) },
{ day: 30, actual: 1569, target: getTargetWeightForDay(30) },
{ day: 31, actual: 1662, target: getTargetWeightForDay(31) },
{ day: 32, actual: 1755, target: getTargetWeightForDay(32) },
{ day: 33, actual: 1834, target: getTargetWeightForDay(33) },
{ day: 34, actual: 1911, target: getTargetWeightForDay(34) },
{ day: 35, actual: 1972, target: getTargetWeightForDay(35) },
// Data after day 35 is not available in the provided standard
{ day: 36, actual: 2087, target: null },
{ day: 37, actual: 2161, target: null },
{ day: 38, actual: 2236, target: null },
{ day: 39, actual: 2303, target: null },
];
export const initialWeightDistribution: WeightDistributionPoint[] = [
{ range: '<2.1kg', count: 800 },
{ range: '2.1-2.2', count: 2500 },
{ range: '2.2-2.25', count: 4200 },
{ range: '2.25-2.3', count: 6800 },
{ range: '2.3-2.35', count: 5100 },
{ range: '2.35-2.4', count: 3200 },
{ range: '>2.4kg', count: 1200 },
];
export const initialWeightAlerts: WeightAlert[] = [
{
id: 'wa1',
type: WeightAlertType.POOR_UNIFORMITY,
severity: AlertSeverity.CRITICAL,
timestamp: new Date(Date.now() - 1 * 60 * 60 * 1000),
details: 'Keseragaman di Kandang C / Lt 1 (82%) di bawah ambang kritis.',
},
{
id: 'wa2',
type: WeightAlertType.SLOW_GROWTH,
severity: AlertSeverity.WARNING,
timestamp: new Date(Date.now() - 3 * 60 * 60 * 1000),
details: 'ADG (85g) di Kandang B / Lt 1 lebih rendah dari target (95g).',
},
{
id: 'wa3',
type: WeightAlertType.POOR_UNIFORMITY,
severity: AlertSeverity.WARNING,
timestamp: new Date(Date.now() - 8 * 60 * 60 * 1000),
details: 'Keseragaman di Kandang A / Lt 2 (86%) mendekati batas bawah.',
},
];