{
        "layout": "tabs",
        "dataSources": {
            "inventory": {
                "endpoint": "/api/sync/inventory",
                "refresh": 30000,
                "fields": ["inventory_id", "product_batch_number_id", "branch_id", "current_qty", "unit_type"]
            },
            "inventory_txn": {
                "endpoint": "/api/sync/inventory_txn",
                "refresh": 60000
            },
            "inventory_receive": {
                "endpoint": "/api/sync/inventory_receive",
                "refresh": 60000
            },
            "dispatch_notes": {
                "endpoint": "/api/sync/dispatch_notes",
                "refresh": 60000
            },
            "products": {
                "endpoint": "/api/sync/products"
            },
            "branches": {
                "endpoint": "/api/sync/branches"
            },
            "vendors": {
                "endpoint": "/api/sync/vendors"
            }
        },
        "tabs": [
            {
                "id": "receive",
                "label": "Receive",
                "icon": "fa-truck-loading",
                "body": [
                    {
                        "type": "button",
                        "label": "Receive Inventory",
                        "icon": "fa-plus",
                        "class": "btn btn-primary mb-4",
                        "action": "inventory:receive"
                    },
                    {
                        "type": "table",
                        "options": {
                            "tableName": "inventory_receive",
                            "title": "Receiving History",
                            "columns": [
                                {"key": "date", "label": "Date", "sortable": true, "format": "date"},
                                {"key": "truck", "label": "Vehicle", "sortable": true},
                                {"key": "vendor_id", "label": "Vendor", "sortable": true},
                                {"key": "delivery_note_number", "label": "Delivery Note", "sortable": true},
                                {"key": "lpo_number", "label": "LPO", "sortable": true},
                                {"key": "invoice_number", "label": "Invoice", "sortable": true}
                            ],
                            "pagination": true,
                            "pageSize": 25,
                            "searchable": true,
                            "addButton": false,
                            "rowActions": [
                                {
                                    "label": "View Details",
                                    "icon": "fa-eye",
                                    "action": "inventory:viewReceipt"
                                }
                            ]
                        }
                    }
                ]
            },
            {
                "id": "stocks",
                "label": "Stocks",
                "icon": "fa-boxes",
                "lazy": true,
                "body": [
                    {
                        "type": "html",
                        "html": "<div class=\"flex gap-2 mb-4\"></div>",
                        "id": "stock-actions-toolbar"
                    },
                    {
                        "type": "button",
                        "label": "Transfer/Dispatch",
                        "icon": "fa-truck",
                        "class": "btn btn-primary",
                        "action": "inventory:dispatch",
                        "target": "#stock-actions-toolbar"
                    },
                    {
                        "type": "button",
                        "label": "Break Bulk",
                        "icon": "fa-box-open",
                        "class": "btn btn-secondary",
                        "action": "inventory:break",
                        "target": "#stock-actions-toolbar"
                    },
                    {
                        "type": "button",
                        "label": "Process Transactions",
                        "icon": "fa-sync",
                        "class": "btn btn-accent",
                        "action": "inventory:process",
                        "target": "#stock-actions-toolbar"
                    },
                    {
                        "type": "button",
                        "label": "Movement History",
                        "icon": "fa-history",
                        "class": "btn btn-info",
                        "action": "inventory:history",
                        "target": "#stock-actions-toolbar"
                    },
                    {
                        "type": "table",
                        "options": {
                            "tableName": "inventory",
                            "title": "Current Stock Levels",
                            "columns": [
                                {"key": "product_name", "label": "Product", "sortable": true},
                                {"key": "batch_number", "label": "Batch #", "sortable": true},
                                {"key": "warehouse", "label": "Location", "sortable": true},
                                {"key": "current_qty", "label": "Quantity", "sortable": true, "format": "number"},
                                {"key": "unit_type", "label": "Unit", "sortable": true},
                                {"key": "expiry_date", "label": "Expiry", "sortable": true, "format": "date"}
                            ],
                            "pagination": true,
                            "pageSize": 25,
                            "searchable": true,
                            "addButton": false,
                            "rowActions": [
                                {
                                    "label": "Adjust",
                                    "icon": "fa-edit",
                                    "action": "inventory:adjust",
                                    "confirm": false
                                },
                                {
                                    "label": "History",
                                    "icon": "fa-history",
                                    "action": "inventory:viewHistory",
                                    "confirm": false
                                }
                            ]
                        }
                    }
                ]
            },
            {
                "id": "warehouse",
                "label": "Warehouse",
                "icon": "fa-warehouse",
                "lazy": true,
                "body": [
                    {
                        "type": "button",
                        "label": "Add Warehouse",
                        "icon": "fa-plus",
                        "class": "btn btn-primary mb-4",
                        "action": "inventory:addWarehouse"
                    },
                    {
                        "type": "table",
                        "options": {
                            "tableName": "branches",
                            "title": "Warehouses & Branches",
                            "columns": [
                                {"key": "name", "label": "Name", "sortable": true},
                                {"key": "location", "label": "Location", "sortable": true},
                                {"key": "branch_type", "label": "Type", "sortable": true},
                                {"key": "is_active", "label": "Status", "format": "boolean"}
                            ],
                            "pagination": true,
                            "pageSize": 25,
                            "searchable": true,
                            "addButton": false,
                            "rowActions": [
                                {
                                    "label": "Edit",
                                    "icon": "fa-edit",
                                    "action": "inventory:editWarehouse"
                                }
                            ]
                        }
                    }
                ]
            }
        ]
    }