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

This commit is contained in:
ValdiANS
2026-01-12 17:37:20 +07:00
77 changed files with 4736 additions and 3913 deletions
+1 -1
View File
@@ -63,6 +63,7 @@ export type BaseClosing = {
location_id: number;
location_name: string;
project_category: 'GROWING' | 'LAYING';
project_type?: 'GROWING' | 'LAYING'; // berubah dari BE?
period: number;
closing_date?: string;
shed_label: string;
@@ -185,7 +186,6 @@ export type ClosingSapronakCalculation = {
doc: ClosingSapronakCalculationItem;
ovk: ClosingSapronakCalculationItem;
pakan: ClosingSapronakCalculationItem;
pullet: ClosingSapronakCalculationItem;
};
// ====== OVERHEAD ======
-52
View File
@@ -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;
}
+61
View File
@@ -0,0 +1,61 @@
import { SuccessApiResponse } from '@/types/api/api-general';
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[];
comparison_type?: string | undefined;
flock_ids: number[];
kandang_ids: number[];
}
export interface DashboardMeta {
page: number;
limit: number;
total_pages: number;
total_results: number;
filters: DashboardFilter;
}
+1
View File
@@ -5,6 +5,7 @@ import { Kandang } from '@/types/api/master-data/kandang';
import { Location } from '@/types/api/master-data/location';
import { BaseApproval, BaseMetadata } from '@/types/api/api-general';
import { Nonstock } from '@/types/api/master-data/nonstock';
import { ProductionStandard } from '@/types/api/master-data/production-standard';
export type BaseProjectFlock = {
id: number;
+7 -7
View File
@@ -8,15 +8,15 @@ export type ProductionMetrics = {
fcr_value: number;
fcr_std?: number;
total_chick_qty: number;
hand_day?: number;
hand_house?: number;
hen_day?: number;
hen_house?: number;
feed_intake?: number;
egg_mesh?: number;
egg_weight?: number;
hand_day_std?: number;
hand_house_std?: number;
feed_intake_std?: number;
egg_mesh_std?: number;
egg_mass?: number;
egg_weight?: number;
hen_day_std?: number;
hen_house_std?: number;
egg_mass_std?: number;
egg_weight_std?: number;
daily_gain?: number;
avg_daily_gain?: number;
+47
View File
@@ -0,0 +1,47 @@
import { BaseMetadata } from '@/types/api/api-general';
import { BaseCustomer } from '@/types/api/master-data/customer';
import { BaseProduct } from '@/types/api/master-data/product';
export type CustomerPaymentRow = {
no: number;
do_date: string;
payment_date: string;
realization_date: string;
aging: number;
reference: string;
vehicle_plate: string;
qty: number;
weight: number;
average_weight: number;
price: number;
credit_note: number;
final_price: number;
ppn: number;
total: number;
payment: number;
accounts_receivable: number;
notes: string;
pickup_info: string;
sales_marketing: string;
product?: BaseProduct;
};
export type CustomerPaymentSummary = {
total_qty: number;
total_weight: number;
total_initial_amount: number;
total_credit_note: number;
total_final_amount: number;
total_ppn: number;
total_grand_amount: number;
total_payment: number;
total_accounts_receivable: number;
};
export type CustomerPaymentReport = BaseMetadata & {
customer: BaseCustomer;
customer_npwp: string;
customer_address: string;
rows: CustomerPaymentRow[];
summary: CustomerPaymentSummary;
};
+34
View File
@@ -0,0 +1,34 @@
import { BaseMetadata } from '@/types/api/api-general';
import { Area } from '@/types/api/master-data/area';
import { Supplier } from '@/types/api/master-data/supplier';
import { Warehouse } from '@/types/api/master-data/warehouse';
export type DebtSupplier = BaseMetadata & {
supplier: Supplier;
rows: DebtRow[];
total: DebtTotal;
};
export type DebtRow = {
pr_number: string;
po_number: string;
pr_date: string;
po_date: string;
aging: number;
area: Area;
warehouse: Warehouse;
due_date: string;
due_status: string;
total_price: number;
payment_price: number;
debt_price: number;
status: string;
travel_number: string;
};
export type DebtTotal = {
aging: number;
total_price: number;
payment_price: number;
debt_price: number;
};