mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 07:15:44 +00:00
refactor(FE-357): Reference summary.total in footers
This commit is contained in:
@@ -29,7 +29,6 @@ import Menu from '@/components/menu/Menu';
|
|||||||
import { generateHppPerKandangPDF } from '../export/HppPerkandangExport';
|
import { generateHppPerKandangPDF } from '../export/HppPerkandangExport';
|
||||||
import toast from 'react-hot-toast';
|
import toast from 'react-hot-toast';
|
||||||
import * as XLSX from 'xlsx';
|
import * as XLSX from 'xlsx';
|
||||||
import { Supplier } from '@/types/api/master-data/supplier';
|
|
||||||
|
|
||||||
interface Totals {
|
interface Totals {
|
||||||
total_hpp_rp: number;
|
total_hpp_rp: number;
|
||||||
@@ -565,7 +564,7 @@ const HppPerKandangTab = () => {
|
|||||||
},
|
},
|
||||||
footer: () => (
|
footer: () => (
|
||||||
<div className='text-right font-semibold text-gray-900'>
|
<div className='text-right font-semibold text-gray-900'>
|
||||||
{formatNumber(summary?.average_weight_kg || 0)}
|
{formatNumber(summary?.total?.average_weight_kg || 0)}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -579,7 +578,7 @@ const HppPerKandangTab = () => {
|
|||||||
},
|
},
|
||||||
footer: () => (
|
footer: () => (
|
||||||
<div className='text-right font-semibold text-gray-900'>
|
<div className='text-right font-semibold text-gray-900'>
|
||||||
{formatNumber(summary?.total_remaining_chicken_birds || 0)}
|
{formatNumber(summary?.total?.total_remaining_chicken_birds || 0)}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -593,7 +592,9 @@ const HppPerKandangTab = () => {
|
|||||||
},
|
},
|
||||||
footer: () => (
|
footer: () => (
|
||||||
<div className='text-right font-semibold text-gray-900'>
|
<div className='text-right font-semibold text-gray-900'>
|
||||||
{formatNumber(summary?.total_remaining_chicken_weight_kg || 0)}
|
{formatNumber(
|
||||||
|
summary?.total?.total_remaining_chicken_weight_kg || 0
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -607,7 +608,7 @@ const HppPerKandangTab = () => {
|
|||||||
},
|
},
|
||||||
footer: () => (
|
footer: () => (
|
||||||
<div className='text-right font-semibold text-gray-900'>
|
<div className='text-right font-semibold text-gray-900'>
|
||||||
{formatNumber(summary?.total_egg_production_pieces || 0)}
|
{formatNumber(summary?.total?.total_egg_production_pieces || 0)}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -621,7 +622,9 @@ const HppPerKandangTab = () => {
|
|||||||
},
|
},
|
||||||
footer: () => (
|
footer: () => (
|
||||||
<div className='text-right font-semibold text-gray-900'>
|
<div className='text-right font-semibold text-gray-900'>
|
||||||
{formatNumber(summary?.total_remaining_chicken_weight_kg || 0)}
|
{formatNumber(
|
||||||
|
summary?.total?.total_remaining_chicken_weight_kg || 0
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -685,7 +688,7 @@ const HppPerKandangTab = () => {
|
|||||||
},
|
},
|
||||||
footer: () => (
|
footer: () => (
|
||||||
<div className='text-right font-semibold text-gray-900'>
|
<div className='text-right font-semibold text-gray-900'>
|
||||||
{formatCurrency(summary?.total_egg_value_rp || 0)}
|
{formatCurrency(summary?.total?.total_egg_value_rp || 0)}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -713,7 +716,7 @@ const HppPerKandangTab = () => {
|
|||||||
},
|
},
|
||||||
footer: () => (
|
footer: () => (
|
||||||
<div className='text-right font-semibold text-gray-900'>
|
<div className='text-right font-semibold text-gray-900'>
|
||||||
{formatCurrency(summary?.average_egg_hpp_rp_per_kg || 0)}
|
{formatCurrency(summary?.total?.average_egg_hpp_rp_per_kg || 0)}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -727,7 +730,7 @@ const HppPerKandangTab = () => {
|
|||||||
},
|
},
|
||||||
footer: () => (
|
footer: () => (
|
||||||
<div className='text-right font-semibold text-gray-900'>
|
<div className='text-right font-semibold text-gray-900'>
|
||||||
{formatCurrency(summary?.total_remaining_value_rp || 0)}
|
{formatCurrency(summary?.total?.total_remaining_value_rp || 0)}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user