{
    "title": "Inventory Management",
    "header": [],
    "body": [
        {
            "type": "tabs",
            "tabs": [
                {
                    "label": "Receive",
                    "icon": "fa-arrow-down",
                    "body": [
                        {
                            "type": "button",
                            "label": "Receive Inventory",
                            "icon": "fa-plus",
                            "class": "btn btn-primary mb-4",
                            "formName": "inventory_receive_form"
                        },
                        {
                            "type": "table",
                            "options": {
                                "tableName": "inventory_receive",
                                "showGlobalSearch": true,
                                "addButton": false,
                                "columnsToShow": ["delivery_note_number", "vendor", "branch", "lpo_number", "invoice_number", "truck", "date"],
                                "rowActions": [
                                    {
                                        "label": "View",
                                        "icon": "fa-eye",
                                        "onClick": "viewInventoryReceive"
                                    },
                                    {
                                        "label": "Edit",
                                        "icon": "fa-edit",
                                        "onClick": "editInventoryReceive"
                                    }
                                ]
                            }
                        }
                    ]
                },
                {
                    "label": "Stocks",
                    "icon": "fa-warehouse",
                    "body": [
                        {
                            "type": "button",
                            "label": "Quick Quantity Entry",
                            "icon": "fa-bolt",
                            "class": "btn btn-primary",
                            "action": "inventory:quick-quantity"
                        },
                        {
                            "type": "button",
                            "label": "Adjust Stock",
                            "icon": "fa-edit",
                            "class": "btn btn-warning",
                            "formName": "inventory_adjustment_form"
                        },
                        {
                            "type": "button",
                            "label": "Transfer",
                            "icon": "fa-exchange-alt",
                            "class": "btn btn-secondary",
                            "formName": "inventory_transfer_form"
                        },
                        {
                            "type": "button",
                            "label": "Break Bulk",
                            "icon": "fa-cut",
                            "class": "btn btn-secondary",
                            "action": "inventory:break"
                        },
                        {
                            "type": "button",
                            "label": "Export",
                            "icon": "fa-download",
                            "class": "btn btn-secondary",
                            "onClick": "exportInventory"
                        },
                        {
                            "type": "table",
                            "options": {
                                "tableName": "product_quantity_view",
                                "showGlobalSearch": true,
                                "addButton": false,
                                "editFormName": "inventory_adjustment_form"
                            }
                        }
                    ]
                },
                {
                    "label": "Transfers",
                    "icon": "fa-exchange-alt",
                    "body": [
                        {
                            "type": "button",
                            "label": "New Transfer",
                            "icon": "fa-plus",
                            "class": "btn btn-primary mb-4",
                            "formName": "inventory_transfer_form"
                        },
                        {
                            "type": "table",
                            "options": {
                                "tableName": "inventory_transfers",
                                "showGlobalSearch": true,
                                "addButton": false,
                                "columnsToShow": ["reference_number", "transfer_date", "status"],
                                "rowActions": [
                                    {
                                        "label": "Complete Transfer",
                                        "icon": "fa-check",
                                        "confirm": "Complete this transfer? This will automatically move stock between branches.",
                                        "update": {
                                            "status": "completed"
                                        },
                                        "condition": "row.status === 'pending'"
                                    }
                                ]
                            }
                        }
                    ]
                },
                {
                    "label": "Warehouses",
                    "icon": "fa-building",
                    "body": [
                        {
                            "type": "button",
                            "label": "Add Warehouse",
                            "icon": "fa-plus",
                            "class": "btn btn-primary mb-4",
                            "formName": "warehouse_form"
                        },
                        {
                            "type": "table",
                            "options": {
                                "tableName": "branches",
                                "showGlobalSearch": true,
                                "addButton": false,
                                "editFormName": "warehouse_form",
                                "columnsToShow": ["name", "code", "type", "address"],
                                "rowActions": [
                                    {
                                        "label": "View Stock",
                                        "icon": "fa-boxes",
                                        "onClick": "viewWarehouseStock"
                                    },
                                    {
                                        "label": "Deactivate",
                                        "icon": "fa-ban",
                                        "onClick": "deactivateWarehouse"
                                    }
                                ]
                            }
                        }
                    ]
                }
            ]
        }
    ],
    "footer": [
        {
            "type": "button",
            "label": "Close",
            "onClick": "closeModal"
        }
    ]
}