refactor(FE): Refactor ProductionDataClosingTab to use Card component

This commit is contained in:
rstubryan
2026-02-19 12:02:04 +07:00
parent a0af934002
commit a231140bc0
2 changed files with 231 additions and 221 deletions
@@ -6,6 +6,7 @@ import { ClosingApi } from '@/services/api/closing';
import { isResponseSuccess } from '@/lib/api-helper'; import { isResponseSuccess } from '@/lib/api-helper';
import { formatNumber } from '@/lib/helper'; import { formatNumber } from '@/lib/helper';
import ProductionDataClosingSkeleton from '@/components/pages/closing/skeleton/ProductionDataClosingSkeleton'; import ProductionDataClosingSkeleton from '@/components/pages/closing/skeleton/ProductionDataClosingSkeleton';
import Card from '@/components/Card';
interface ProductionDataClosingTabProps { interface ProductionDataClosingTabProps {
projectFlockId: number; projectFlockId: number;
@@ -62,9 +63,20 @@ const ProductionDataClosingTab = ({
); );
return ( return (
<div className='w-full rounded-xl p-8 shadow-sm'> <div className='w-full pt-3'>
<h2 className='text-lg font-bold mb-8 text-gray-800'>Data Produksi</h2> <Card
className={{
wrapper: 'w-full rounded-lg',
body: 'p-0',
title: 'px-2 py-1.5 font-normal text-sm bg-primary text-white',
collapsible: 'rounded-lg',
}}
variant='bordered'
title='Data Produksi'
collapsible
defaultCollapsed={false}
>
<div className='p-6'>
<div className='grid grid-cols-1 lg:grid-cols-2 gap-x-24 gap-y-12 relative'> <div className='grid grid-cols-1 lg:grid-cols-2 gap-x-24 gap-y-12 relative'>
{/* Left Column */} {/* Left Column */}
<div className='space-y-10'> <div className='space-y-10'>
@@ -301,6 +313,8 @@ const ProductionDataClosingTab = ({
</div> </div>
</div> </div>
</div> </div>
</Card>
</div>
); );
}; };
@@ -6,11 +6,7 @@ import Table from '@/components/Table';
import Card from '@/components/Card'; import Card from '@/components/Card';
import { formatCurrency, formatNumber, formatDate } from '@/lib/helper'; import { formatCurrency, formatNumber, formatDate } from '@/lib/helper';
import { isResponseSuccess } from '@/lib/api-helper'; import { isResponseSuccess } from '@/lib/api-helper';
import { import { BaseSales, ClosingSalesSummary } from '@/types/api/closing';
BaseClosingSales,
BaseSales,
ClosingSalesSummary,
} from '@/types/api/closing';
import { Product } from '@/types/api/master-data/product'; import { Product } from '@/types/api/master-data/product';
import { Customer } from '@/types/api/master-data/customer'; import { Customer } from '@/types/api/master-data/customer';
import { Kandang } from '@/types/api/master-data/kandang'; import { Kandang } from '@/types/api/master-data/kandang';