import React, { useState, useEffect } from 'react'; import Toast from '../Components/Toast'; import MasterTable from './MasterTable'; import { Tag, Briefcase, Box, Plus, CreditCard } from 'lucide-react'; export default function MasterManagement() { const [activeTab, setActiveTab] = useState('collection'); const [toast, setToast] = useState(null); const tabs = [ { id: 'collection', label: 'Collection Types', icon: Tag, desc: 'Manage categories for payment collection.', btnLabel: 'Type' }, { id: 'expense', label: 'Expense Categories', icon: Briefcase, desc: 'Organize various types of business expenses.', btnLabel: 'Category' }, { id: 'product', label: 'Product Categories', icon: Box, desc: 'Group products into searchable categories.', btnLabel: 'Category' }, { id: 'payment_method', label: 'Payment Methods', icon: CreditCard, desc: 'Manage available payment methods.', btnLabel: 'Method' } ]; const currentTab = tabs.find(t => t.id === activeTab); return ( <> {toast && setToast(null)} />}

Master Management

Configure system-wide master data and dropdown values.

{/* Tabs */}
{tabs.map((tab) => ( ))}
{/* Content */}

{currentTab.label}

{currentTab.desc}

setToast({ message: msg, type })} />
); }