refactor(FE): Refactor production result components and improve UI

This commit is contained in:
rstubryan
2026-02-13 09:24:42 +07:00
parent 211622c7b0
commit 5c00893ea3
6 changed files with 682 additions and 473 deletions
@@ -0,0 +1,39 @@
'use client';
import { useState } from 'react';
import Tabs from '@/components/Tabs';
import ProductionResultTab from '@/components/pages/report/production-result/tab/ProductionResultTab';
import { useReportTabStore } from '@/stores/report/report-tab.store';
const ProductionResultTabs = () => {
const [activeTabId, setActiveTabId] = useState<string>('1');
const tabActions = useReportTabStore((state) => state.tabActions);
const tabs = [
{
id: '1',
label: 'Hasil Produksi',
content: <ProductionResultTab tabId={'1'} />,
},
];
return (
<section className='w-full'>
<Tabs
tabs={tabs}
variant='boxed'
activeTabId={activeTabId}
onTabChange={setActiveTabId}
className={{
tabHeaderWrapper:
'justify-between items-center p-3 border-b border-base-content/10',
tab: 'w-fit',
content: 'p-0 m-0',
}}
sideContent={tabActions[activeTabId] || null}
/>
</section>
);
};
export default ProductionResultTabs;