mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
feat(FE-355,357): Add egg columns to HPP table and disable sale tabs
This commit is contained in:
@@ -5,21 +5,21 @@ import HppPerKandangTab from '@/components/pages/report/sale/tab/HppPerKandangTa
|
||||
|
||||
const SaleReportTabs = () => {
|
||||
const tabs = [
|
||||
{
|
||||
id: '1',
|
||||
label: 'Penjualan Harian',
|
||||
content: 'Penjualan Harian Tab',
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
label: 'Transaksi Penjualan DO',
|
||||
content: 'Transaksi Penjualan DO Tab',
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
label: 'Perbandingan HPP Per Rentang BW',
|
||||
content: 'Perbandingan HPP Per Rentang BW Tab',
|
||||
},
|
||||
// {
|
||||
// id: '1',
|
||||
// label: 'Penjualan Harian',
|
||||
// content: 'Penjualan Harian Tab',
|
||||
// },
|
||||
// {
|
||||
// id: '2',
|
||||
// label: 'Transaksi Penjualan DO',
|
||||
// content: 'Transaksi Penjualan DO Tab',
|
||||
// },
|
||||
// {
|
||||
// id: '3',
|
||||
// label: 'Perbandingan HPP Per Rentang BW',
|
||||
// content: 'Perbandingan HPP Per Rentang BW Tab',
|
||||
// },
|
||||
{
|
||||
id: '4',
|
||||
label: 'HPP Harian Kandang',
|
||||
|
||||
@@ -536,6 +536,20 @@ const HppPerKandangTab = () => {
|
||||
},
|
||||
footer: () => <div className='font-semibold text-gray-900'>-</div>,
|
||||
},
|
||||
{
|
||||
id: 'avg_weight_kg',
|
||||
header: 'Rata-Rata Bobot (KG)',
|
||||
accessorKey: 'avg_weight_kg',
|
||||
cell: (props) => {
|
||||
const value = props.row.original.avg_weight_kg;
|
||||
return <div className='text-right'>{formatNumber(value)}</div>;
|
||||
},
|
||||
footer: () => (
|
||||
<div className='text-right font-semibold text-gray-900'>
|
||||
{formatNumber(summary?.average_weight_kg || 0)}
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
id: 'remaining_chicken_birds',
|
||||
header: 'Sisa Ayam (Ekor)',
|
||||
@@ -565,17 +579,39 @@ const HppPerKandangTab = () => {
|
||||
),
|
||||
},
|
||||
{
|
||||
id: 'avg_weight_kg',
|
||||
header: 'Rata-Rata Bobot (KG)',
|
||||
accessorKey: 'avg_weight_kg',
|
||||
id: 'egg_production_pieces',
|
||||
header: 'Produksi Telur (Butir)',
|
||||
accessorKey: 'egg_production_pieces',
|
||||
cell: (props) => {
|
||||
const value = props.row.original.avg_weight_kg;
|
||||
const value = props.row.original.egg_production_pieces;
|
||||
return <div className='text-right'>{formatNumber(value)}</div>;
|
||||
},
|
||||
footer: () => (
|
||||
<div className='text-right font-semibold text-gray-900'>
|
||||
{formatNumber(summary?.average_weight_kg || 0)}
|
||||
</div>
|
||||
<div className='text-right font-semibold text-gray-900'>-</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
id: 'egg_production_kg',
|
||||
header: 'Produksi Telur (KG)',
|
||||
accessorKey: 'egg_production_kg',
|
||||
cell: (props) => {
|
||||
const value = props.row.original.egg_production_kg;
|
||||
return <div className='text-right'>{formatNumber(value)}</div>;
|
||||
},
|
||||
footer: () => (
|
||||
<div className='text-right font-semibold text-gray-900'>-</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
id: 'egg_value_rp',
|
||||
header: 'Nilai Nominal Telur (RP)',
|
||||
accessorKey: 'egg_value_rp',
|
||||
cell: (props) => {
|
||||
const value = props.row.original.egg_value_rp;
|
||||
return <div className='text-right'>{formatCurrency(value)}</div>;
|
||||
},
|
||||
footer: () => (
|
||||
<div className='text-right font-semibold text-gray-900'>-</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
@@ -615,23 +651,31 @@ const HppPerKandangTab = () => {
|
||||
return <div className='text-right'>{formatCurrency(value)}</div>;
|
||||
},
|
||||
footer: () => (
|
||||
<div className='text-right font-semibold text-gray-900'>
|
||||
{formatCurrency(summary?.average_egg_hpp_rp_per_kg || 0)}
|
||||
</div>
|
||||
<div className='text-right font-semibold text-gray-900'>-</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
id: 'hpp_rp',
|
||||
header: 'HPP (RP)',
|
||||
header: 'HPP Ayam (RP)',
|
||||
accessorKey: 'hpp_rp',
|
||||
cell: (props) => {
|
||||
const value = props.row.original.hpp_rp;
|
||||
return <div className='text-right'>{formatCurrency(value)}</div>;
|
||||
},
|
||||
footer: () => (
|
||||
<div className='text-right font-semibold text-gray-900'>
|
||||
{formatCurrency(summary?.total_egg_value_rp || 0)}
|
||||
</div>
|
||||
<div className='text-right font-semibold text-gray-900'>-</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
id: 'egg_hpp_rp_per_kg',
|
||||
header: 'HPP Telur (RP/KG)',
|
||||
accessorKey: 'egg_hpp_rp_per_kg',
|
||||
cell: (props) => {
|
||||
const value = props.row.original.egg_hpp_rp_per_kg;
|
||||
return <div className='text-right'>{formatCurrency(value)}</div>;
|
||||
},
|
||||
footer: () => (
|
||||
<div className='text-right font-semibold text-gray-900'>-</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user