Merge branch 'development' into feat/FE/daily-checklist

This commit is contained in:
ValdiANS
2026-01-09 15:32:27 +07:00
23 changed files with 1439 additions and 795 deletions
+65
View File
@@ -1,6 +1,70 @@
import { BaseMetadata } from '@/types/api/api-general';
import { BaseApproval } from '@/types/api/approval/approval';
// ==================== CHART DATA TYPES ====================
export type WeightDistributionRange = {
range: string;
min_weight: number;
max_weight: number;
bird_count: number;
is_ideal_range: boolean;
ideal_range?: string;
outside_range?: string;
};
export type IdealRange = {
min_weight: number;
max_weight: number;
total_ideal_birds: number;
};
export type StatisticsData = {
min_weight: number;
max_weight: number;
average_weight: number;
total_birds_measured: number;
};
export type WeekBarChartData = {
has_data: boolean;
weight_distribution: WeightDistributionRange[];
ideal_range: IdealRange;
statistics: StatisticsData;
};
export type BarChart = {
current_week: number;
all_weeks: Record<string, WeekBarChartData>;
};
export type AvailableWeek = {
week: number;
uniformity_percentage: number;
ideal_count: number;
outside_ideal_count: number;
total_count: number;
has_data: boolean;
};
export type WeekInfo = {
total_weeks: number;
weeks_with_data: number;
current_week_index: number;
has_prev_week: boolean;
has_next_week: boolean;
};
export type GaugeChart = {
current_week: number;
available_weeks: AvailableWeek[];
week_info: WeekInfo;
};
export type ChartData = {
bar_chart: BarChart;
gauge_chart: GaugeChart;
};
// ==================== GET ALL RESPONSE ====================
export type Uniformity = BaseMetadata & {
id: number;
@@ -21,6 +85,7 @@ export type Uniformity = BaseMetadata & {
standard_mean_weight: number | null;
standard_uniformity: number | null;
created_at: string;
chart_data?: ChartData;
created_by: number;
latest_approval?: BaseApproval;
};
-1
View File
@@ -120,7 +120,6 @@ export type CreateAcceptApprovalRequestPayload = {
purchase_item_id: number;
received_date: string;
travel_number: string;
travel_document_path: string;
vehicle_number: string;
expedition_vendor_id: number;
received_qty: number;