update chicken weight to have chicken_area data as well
This commit is contained in:
1 parent
a6d4ddac65
commit
6bad900cf0
13 files changed
+132
-21
No files matched your search
@@ -154,6 +154,7 @@ const WeightMonitoringPage: React.FC<{ onSettings: () => void }> = ({ onSettings
|
||||
age: fallback.age,
|
||||
uniformity: fallback.uniformity,
|
||||
average_daily_gain: fallback.average_daily_gain,
|
||||
chicken_area: fallback.chicken_area,
|
||||
cycle: fallback.cycle,
|
||||
kandang: fallback.kandang,
|
||||
};
|
||||
@@ -322,7 +323,15 @@ const WeightMonitoringPage: React.FC<{ onSettings: () => void }> = ({ onSettings
|
||||
<table className="min-w-full text-sm">
|
||||
<thead className="bg-gray-50 text-gray-600">
|
||||
<tr>
|
||||
{['Tanggal', 'Umur', 'DOC', 'AVG', 'Uniformity', 'ADG'].map((h) => (
|
||||
{[
|
||||
'Tanggal',
|
||||
'Umur',
|
||||
'DOC',
|
||||
'AVG',
|
||||
'Uniformity',
|
||||
'ADG',
|
||||
'Luas Ayam (IOT)',
|
||||
].map((h) => (
|
||||
<th key={h} className="px-4 py-3 text-left font-semibold">
|
||||
{h}
|
||||
</th>
|
||||
@@ -332,7 +341,7 @@ const WeightMonitoringPage: React.FC<{ onSettings: () => void }> = ({ onSettings
|
||||
<tbody>
|
||||
{rows.length === 0 ? (
|
||||
<tr>
|
||||
<td colSpan={6} className="px-4 py-6 text-center text-gray-400">
|
||||
<td colSpan={7} className="px-4 py-6 text-center text-gray-400">
|
||||
Belum ada data berat untuk siklus ini.
|
||||
</td>
|
||||
</tr>
|
||||
@@ -351,6 +360,11 @@ const WeightMonitoringPage: React.FC<{ onSettings: () => void }> = ({ onSettings
|
||||
<td className="px-4 py-2">
|
||||
{formatNumber(row.average_daily_gain, 2, 2, true)}
|
||||
</td>
|
||||
<td className="px-4 py-2">
|
||||
{row.chicken_area && row.chicken_area > 0
|
||||
? `${formatNumber(row.chicken_area, 2, 0, true)} cm²`
|
||||
: '-'}
|
||||
</td>
|
||||
</tr>
|
||||
))
|
||||
)}
|
||||
|
||||
@@ -86,6 +86,15 @@ const DailyDetailPanel: React.FC<DailyDetailPanelProps> = ({ row, docWeight }) =
|
||||
value={`${formatNumber(row.chicken_count, 0)} ekor`}
|
||||
icon={<i className="fa-solid fa-users"></i>}
|
||||
/>
|
||||
<DetailCard
|
||||
label="Luas Ayam (IOT)"
|
||||
value={
|
||||
row.chicken_area && row.chicken_area > 0
|
||||
? `${formatNumber(row.chicken_area, 2, 0, true)} cm²`
|
||||
: '-'
|
||||
}
|
||||
icon={<i className="fa-solid fa-vector-square"></i>}
|
||||
/>
|
||||
{deviation != null && (
|
||||
<DetailCard
|
||||
label="Deviasi vs Target"
|
||||
|
||||
Reference in new issue
Block a user