import { useCallback, useState } from 'react'; import IErpPageProps from './IErpPageProps'; import { Card, CardHeader, CardTitle, CardDescription, CardContent, Text, Badge, Stack, Separator, Box, Button, } from '@jtl-software/platform-ui-react'; import { Globe, Link as LinkIcon } from 'lucide-react'; const manifestMappings = [{ icon: LinkIcon, field: 'capabilities.erp.menuItems[].url', description: 'Sidebar menu entry' }]; const ErpPage: React.FC = ({ appBridge }) => { const [isRequesting, setIsRequesting] = useState(false); const [time, setTime] = useState(null); const handleRequestTimestamp = useCallback(async (): Promise => { try { setIsRequesting(true); appBridge.method.expose('getCurrentTime', () => new Date()); const result = await appBridge.method.call('getCurrentTime'); setTime(result.toUTCString()); } finally { setIsRequesting(false); } }, [appBridge]); return ( ERP Integration This is the main app view. It loads when the user clicks your app's menu entry in the ERP sidebar. MANIFEST MAPPING {manifestMappings.map(mapping => ( {mapping.field} → {mapping.description} ))} DEMO: AppBridge Methods The AppBridge lets you expose and call methods between your app and the platform.