import { Button, Input, Stack, Text, Separator, Box, Badge } from '@jtl-software/platform-ui-react'; import { useState, useEffect, useCallback } from 'react'; import IPanePageProps from './IPanePageProps'; import { PanelRight } from 'lucide-react'; const manifestFields = [ { label: 'url', value: 'capabilities.erp.pane[].url' }, { label: 'context', value: 'customers' }, { label: 'matchChildContext', value: 'true' }, ]; const PanePage: React.FC = ({ appBridge }) => { const [customer, setCustomer] = useState(undefined); useEffect(() => { const unsubscribe = appBridge.event.subscribe('CustomerChanged', (data: unknown) => { return new Promise(resolve => { setCustomer((data as { customerId: string }).customerId); resolve(); }); }); return () => { unsubscribe(); }; }, [appBridge]); const handleGetCurrentCustomer = useCallback(() => { appBridge.method.call('getCurrentCustomerId').then(customerId => { setCustomer(customerId as string); }); }, [appBridge]); return ( Customer Pane This sidebar panel loads when the user views customer data. It receives context events from the ERP. MANIFEST MAPPING {manifestFields.map(field => ( {field.value} ))} DEMO: Events The AppBridge sends a CustomerChanged event when the user selects a different customer.