mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-26 00:05:45 +00:00
refactor(FE): Rename components for clarity
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
'use client';
|
||||
|
||||
import { useState } from 'react';
|
||||
import Tabs from '@/components/Tabs';
|
||||
import DailyMarketingReportContent from '@/components/pages/report/marketing/tab/DailyMarketingTab';
|
||||
import HppPerKandangTab from '@/components/pages/report/marketing/tab/HppPerKandangTab';
|
||||
import { useMarketingTabStore } from '@/stores/marketing-tab/marketing-tab.store';
|
||||
|
||||
const MarketingReportContent = () => {
|
||||
const [activeTabId, setActiveTabId] = useState<string>('1');
|
||||
const tabActions = useMarketingTabStore((state) => state.tabActions);
|
||||
|
||||
const tabs = [
|
||||
{
|
||||
id: '1',
|
||||
label: 'Penjualan Harian',
|
||||
content: <DailyMarketingReportContent />,
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
label: 'HPP Harian Kandang',
|
||||
content: <HppPerKandangTab tabId={'2'} />,
|
||||
},
|
||||
];
|
||||
|
||||
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 MarketingReportContent;
|
||||
Reference in New Issue
Block a user