mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 07:15:44 +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 SaleReportTabs = () => {
|
||||||
const tabs = [
|
const tabs = [
|
||||||
{
|
// {
|
||||||
id: '1',
|
// id: '1',
|
||||||
label: 'Penjualan Harian',
|
// label: 'Penjualan Harian',
|
||||||
content: 'Penjualan Harian Tab',
|
// content: 'Penjualan Harian Tab',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: '2',
|
// id: '2',
|
||||||
label: 'Transaksi Penjualan DO',
|
// label: 'Transaksi Penjualan DO',
|
||||||
content: 'Transaksi Penjualan DO Tab',
|
// content: 'Transaksi Penjualan DO Tab',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: '3',
|
// id: '3',
|
||||||
label: 'Perbandingan HPP Per Rentang BW',
|
// label: 'Perbandingan HPP Per Rentang BW',
|
||||||
content: 'Perbandingan HPP Per Rentang BW Tab',
|
// content: 'Perbandingan HPP Per Rentang BW Tab',
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
id: '4',
|
id: '4',
|
||||||
label: 'HPP Harian Kandang',
|
label: 'HPP Harian Kandang',
|
||||||
|
|||||||
@@ -536,6 +536,20 @@ const HppPerKandangTab = () => {
|
|||||||
},
|
},
|
||||||
footer: () => <div className='font-semibold text-gray-900'>-</div>,
|
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',
|
id: 'remaining_chicken_birds',
|
||||||
header: 'Sisa Ayam (Ekor)',
|
header: 'Sisa Ayam (Ekor)',
|
||||||
@@ -565,17 +579,39 @@ const HppPerKandangTab = () => {
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'avg_weight_kg',
|
id: 'egg_production_pieces',
|
||||||
header: 'Rata-Rata Bobot (KG)',
|
header: 'Produksi Telur (Butir)',
|
||||||
accessorKey: 'avg_weight_kg',
|
accessorKey: 'egg_production_pieces',
|
||||||
cell: (props) => {
|
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>;
|
return <div className='text-right'>{formatNumber(value)}</div>;
|
||||||
},
|
},
|
||||||
footer: () => (
|
footer: () => (
|
||||||
<div className='text-right font-semibold text-gray-900'>
|
<div className='text-right font-semibold text-gray-900'>-</div>
|
||||||
{formatNumber(summary?.average_weight_kg || 0)}
|
),
|
||||||
</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>;
|
return <div className='text-right'>{formatCurrency(value)}</div>;
|
||||||
},
|
},
|
||||||
footer: () => (
|
footer: () => (
|
||||||
<div className='text-right font-semibold text-gray-900'>
|
<div className='text-right font-semibold text-gray-900'>-</div>
|
||||||
{formatCurrency(summary?.average_egg_hpp_rp_per_kg || 0)}
|
|
||||||
</div>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'hpp_rp',
|
id: 'hpp_rp',
|
||||||
header: 'HPP (RP)',
|
header: 'HPP Ayam (RP)',
|
||||||
accessorKey: 'hpp_rp',
|
accessorKey: 'hpp_rp',
|
||||||
cell: (props) => {
|
cell: (props) => {
|
||||||
const value = props.row.original.hpp_rp;
|
const value = props.row.original.hpp_rp;
|
||||||
return <div className='text-right'>{formatCurrency(value)}</div>;
|
return <div className='text-right'>{formatCurrency(value)}</div>;
|
||||||
},
|
},
|
||||||
footer: () => (
|
footer: () => (
|
||||||
<div className='text-right font-semibold text-gray-900'>
|
<div className='text-right font-semibold text-gray-900'>-</div>
|
||||||
{formatCurrency(summary?.total_egg_value_rp || 0)}
|
),
|
||||||
</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