KI-AGENT: Mobile Kundenerfassung und Logbücher erweitern

This commit is contained in:
2026-09-08 21:50:31 +02:00
parent 1c39b69513
commit 5e1631e2d3
7 changed files with 621 additions and 27 deletions

View File

@@ -17,6 +17,7 @@ import * as DocumentPicker from 'expo-document-picker';
import * as WebBrowser from 'expo-web-browser';
import { BarcodeScanningResult, BarcodeType, CameraView, useCameraPermissions } from 'expo-camera';
import { HistorySection } from '@/components/history-section';
import {
createCustomerInventoryItem,
CreatedDocument,
@@ -117,10 +118,18 @@ export default function CustomerDetailScreen() {
return [
{ label: 'Name', value: String(customer.name || '-') },
{ label: 'Kundennummer', value: String(customer.customerNumber || '-') },
{ label: 'Typ', value: String(customer.type || '-') },
{ label: 'Kundentyp', value: customer.isCompany ? 'Firma' : 'Privat' },
{ label: 'Namenszusatz', value: String(customer.nameAddition || '-') },
{ label: 'E-Mail', value: String(infoData.email || customer.email || '-') },
{ label: 'Rechnungs-E-Mail', value: String(infoData.invoiceEmail || '-') },
{ label: 'Telefon', value: String(infoData.tel || customer.phone || '-') },
{ label: 'Mobilnummer', value: String(infoData.mobileTel || '-') },
{ label: 'Straße', value: String(infoData.street || '-') },
{ label: 'Adresszusatz', value: String(infoData.special || '-') },
{ label: 'PLZ / Stadt', value: [infoData.zip, infoData.city].filter(Boolean).join(' ') || '-' },
{ label: 'Land', value: String(infoData.country || '-') },
{ label: 'Webseite', value: String(infoData.web || '-') },
{ label: 'USt-Id', value: String(infoData.ustid || '-') },
{ label: 'Erstellt', value: formatDateTime(customer.createdAt || customer.created_at) },
{ label: 'Aktualisiert', value: formatDateTime(customer.updatedAt || customer.updated_at) },
];
@@ -373,6 +382,8 @@ export default function CustomerDetailScreen() {
) : null}
</View>
<HistorySection resource="customers" resourceId={customerId} />
<View style={styles.card}>
<View style={styles.sectionHeader}>
<Text style={styles.sectionTitle}>Kundeninventar ({inventoryItems.length})</Text>