diff --git a/src/components/demand/AnfragenInquiryItem.tsx b/src/components/demand/AnfragenInquiryItem.tsx
index 28e897b..13b7603 100644
--- a/src/components/demand/AnfragenInquiryItem.tsx
+++ b/src/components/demand/AnfragenInquiryItem.tsx
@@ -7,15 +7,34 @@ interface AnfragenInquiryItemProps {
inq: Inquiry
isSelected: boolean
hasPipeline: boolean
+ perspective?: 'demand' | 'supply'
onSelect: (id: string) => void
}
-export function AnfragenInquiryItem({ inq, isSelected, hasPipeline, onSelect }: AnfragenInquiryItemProps) {
+export function AnfragenInquiryItem({ inq, isSelected, hasPipeline, perspective = 'supply', onSelect }: AnfragenInquiryItemProps) {
const cfg = INQUIRY_STATUS_META[inq.status ?? 'new']
const displayDate = new Date(inq.updatedAt).toLocaleDateString('de-CH', { day: '2-digit', month: '2-digit' })
const lastMsg = inq.thread[inq.thread.length - 1]
const unreadColor = cfg?.fg ?? DS_TEXT.danger
+ const primaryTitle = perspective === 'demand'
+ ? (inq.propertyAddress ?? inq.subject)
+ : inq.tenantName
+
+ const secondaryLine = perspective === 'demand'
+ ? (inq.propertyManagerCompany ?? inq.propertyManagerName ?? '')
+ : (inq.tenantCompany ?? '')
+
+ const lastMsgPrefix = (() => {
+ if (!lastMsg) return ''
+ if (perspective === 'demand') {
+ return lastMsg.senderType === 'tenant'
+ ? 'Sie: '
+ : `${inq.propertyManagerName ?? 'Verwalter'}: `
+ }
+ return lastMsg.senderType === 'tenant' ? 'Sie: ' : `${lastMsg.senderName}: `
+ })()
+
return (
onSelect(inq.id)} sx={{
px: 2, py: 1.5,
@@ -31,7 +50,7 @@ export function AnfragenInquiryItem({ inq, isSelected, hasPipeline, onSelect }:
{!inq.isRead && }
- {inq.tenantName}
+ {primaryTitle}
@@ -43,9 +62,9 @@ export function AnfragenInquiryItem({ inq, isSelected, hasPipeline, onSelect }:
{displayDate}
- {inq.tenantCompany && (
+ {secondaryLine && (
- {inq.tenantCompany}
+ {secondaryLine}
)}
@@ -53,7 +72,7 @@ export function AnfragenInquiryItem({ inq, isSelected, hasPipeline, onSelect }:
{lastMsg && (
- {lastMsg.senderType === 'tenant' ? 'Sie: ' : `${lastMsg.senderName}: `}
+ {lastMsgPrefix}
{lastMsg.body.split('\n')[0]}
)}
diff --git a/src/domain/inquiry.ts b/src/domain/inquiry.ts
index 88d712a..dcfe4dd 100644
--- a/src/domain/inquiry.ts
+++ b/src/domain/inquiry.ts
@@ -28,6 +28,9 @@ export interface Inquiry {
tenantName: string
tenantCompany?: string
tenantEmail?: string
+ propertyManagerName?: string
+ propertyManagerCompany?: string
+ propertyAddress?: string
subject: string
message: string
status?: InquiryStatus
diff --git a/src/mock-data/demandInquiries.ts b/src/mock-data/demandInquiries.ts
new file mode 100644
index 0000000..92f669a
--- /dev/null
+++ b/src/mock-data/demandInquiries.ts
@@ -0,0 +1,241 @@
+import type { Inquiry } from '../domain/inquiry'
+
+export const mockDemandInquiries: Inquiry[] = [
+ // 1 — NEW (unanswered, unread from manager)
+ {
+ id: 'dinq-001',
+ organizationId: 'org-wincasa',
+ propertyId: 'prop-technopark',
+ tenantName: 'Admin User',
+ tenantCompany: 'Mobimo Management AG',
+ tenantEmail: 'admin@ideal-sharing.ch',
+ propertyManagerName: 'Martin Wegmann',
+ propertyManagerCompany: 'Technopark Zürich AG',
+ propertyAddress: 'Bürofläche Technoparkstrasse 1',
+ subject: 'Anfrage: Bürofläche Technoparkstrasse 1',
+ message:
+ 'Guten Tag Herr Wegmann\n\nWir interessieren uns für die Bürofläche an der Technoparkstrasse 1 in Zürich. Können Sie uns bitte Unterlagen sowie einen Besichtigungstermin für die kommende Woche anbieten?\n\nFreundliche Grüsse\nAdmin User',
+ status: 'new',
+ unreadCount: 0,
+ isRead: true,
+ matchScore: 94,
+ createdAt: '2026-05-22T09:15:00Z',
+ updatedAt: '2026-05-22T09:15:00Z',
+ thread: [
+ {
+ id: 'dmsg-001-1',
+ inquiryId: 'dinq-001',
+ senderType: 'tenant',
+ senderName: 'Admin User',
+ body:
+ 'Guten Tag Herr Wegmann\n\nWir interessieren uns für die Bürofläche an der Technoparkstrasse 1 in Zürich. Können Sie uns bitte Unterlagen sowie einen Besichtigungstermin für die kommende Woche anbieten?\n\nFreundliche Grüsse\nAdmin User',
+ attachments: [],
+ createdAt: '2026-05-22T09:15:00Z',
+ },
+ ],
+ },
+
+ // 2 — NEW (unanswered, unread badge)
+ {
+ id: 'dinq-002',
+ organizationId: 'org-wincasa',
+ propertyId: 'prop-hardturmpark',
+ tenantName: 'Admin User',
+ tenantCompany: 'Mobimo Management AG',
+ tenantEmail: 'admin@ideal-sharing.ch',
+ propertyManagerName: 'Claudia Stöckli',
+ propertyManagerCompany: 'PSP Swiss Property AG',
+ propertyAddress: 'Bürofläche Hardturmstrasse 161',
+ subject: 'Anfrage: Bürofläche Hardturmstrasse 161',
+ message:
+ "Sehr geehrte Frau Stöckli\n\nWir prüfen Büroflächen in Zürich-West und sind auf Ihre Liegenschaft an der Hardturmstrasse 161 aufmerksam geworden. Verfügen Sie über eine Fläche zwischen 400 und 600 m²? Bitte senden Sie uns das aktuelle Exposé.\n\nBeste Grüsse\nAdmin User",
+ status: 'new',
+ unreadCount: 1,
+ isRead: false,
+ matchScore: 88,
+ createdAt: '2026-05-23T14:30:00Z',
+ updatedAt: '2026-05-23T14:30:00Z',
+ thread: [
+ {
+ id: 'dmsg-002-1',
+ inquiryId: 'dinq-002',
+ senderType: 'tenant',
+ senderName: 'Admin User',
+ body:
+ "Sehr geehrte Frau Stöckli\n\nWir prüfen Büroflächen in Zürich-West und sind auf Ihre Liegenschaft an der Hardturmstrasse 161 aufmerksam geworden. Verfügen Sie über eine Fläche zwischen 400 und 600 m²? Bitte senden Sie uns das aktuelle Exposé.\n\nBeste Grüsse\nAdmin User",
+ attachments: [],
+ createdAt: '2026-05-23T14:30:00Z',
+ },
+ ],
+ },
+
+ // 3 — IN_PROGRESS (ongoing conversation)
+ {
+ id: 'dinq-003',
+ organizationId: 'org-wincasa',
+ propertyId: 'prop-sihlcity',
+ tenantName: 'Admin User',
+ tenantCompany: 'Mobimo Management AG',
+ tenantEmail: 'admin@ideal-sharing.ch',
+ propertyManagerName: 'Thomas Brunner',
+ propertyManagerCompany: 'Wincasa AG',
+ propertyAddress: 'Bürofläche Kalanderplatz 1, Sihlcity',
+ subject: 'Anfrage: Bürofläche Kalanderplatz 1, Sihlcity',
+ message:
+ 'Guten Tag Herr Brunner\n\nDie Bürofläche im Sihlcity entspricht unseren Anforderungen sehr gut. Könnten Sie uns die Mietkonditionen sowie einen Grundriss zukommen lassen?\n\nFreundliche Grüsse\nAdmin User',
+ status: 'in_progress',
+ unreadCount: 0,
+ isRead: true,
+ lastReadAt: '2026-05-21T17:00:00Z',
+ matchScore: 91,
+ createdAt: '2026-05-19T10:00:00Z',
+ updatedAt: '2026-05-21T16:45:00Z',
+ thread: [
+ {
+ id: 'dmsg-003-1',
+ inquiryId: 'dinq-003',
+ senderType: 'tenant',
+ senderName: 'Admin User',
+ body:
+ 'Guten Tag Herr Brunner\n\nDie Bürofläche im Sihlcity entspricht unseren Anforderungen sehr gut. Könnten Sie uns die Mietkonditionen sowie einen Grundriss zukommen lassen?\n\nFreundliche Grüsse\nAdmin User',
+ attachments: [],
+ createdAt: '2026-05-19T10:00:00Z',
+ },
+ {
+ id: 'dmsg-003-2',
+ inquiryId: 'dinq-003',
+ senderType: 'supply_user',
+ senderName: 'Thomas Brunner',
+ body:
+ 'Guten Tag\n\nVielen Dank für Ihr Interesse. Anbei das Exposé mit Grundriss und Konditionsübersicht. Die Fläche steht ab 1. August zur Verfügung. Haben Sie Interesse an einer Besichtigung diese Woche?\n\nFreundliche Grüsse\nThomas Brunner\nWincasa AG',
+ attachments: [
+ { id: 'datt-003-1', fileName: 'Expose_Sihlcity_Kalanderplatz.pdf', fileType: 'application/pdf', fileSize: 1540000 },
+ ],
+ createdAt: '2026-05-20T09:30:00Z',
+ },
+ {
+ id: 'dmsg-003-3',
+ inquiryId: 'dinq-003',
+ senderType: 'tenant',
+ senderName: 'Admin User',
+ body:
+ 'Herzlichen Dank für die schnelle Antwort. Ja, eine Besichtigung würde uns gut passen. Wie sieht es am Donnerstag um 10:00 Uhr aus?\n\nFreundliche Grüsse\nAdmin User',
+ attachments: [],
+ createdAt: '2026-05-21T16:45:00Z',
+ },
+ ],
+ },
+
+ // 4 — IN_PROGRESS (ongoing, verwalter replied)
+ {
+ id: 'dinq-004',
+ organizationId: 'org-wincasa',
+ propertyId: 'prop-bahnhofzug',
+ tenantName: 'Admin User',
+ tenantCompany: 'Mobimo Management AG',
+ tenantEmail: 'admin@ideal-sharing.ch',
+ propertyManagerName: 'Sandra Huber',
+ propertyManagerCompany: 'Swiss Prime Site AG',
+ propertyAddress: 'Bürofläche Bahnhofstrasse 28, Zug',
+ subject: 'Anfrage: Bürofläche Bahnhofstrasse 28, Zug',
+ message:
+ 'Sehr geehrte Frau Huber\n\nWir suchen repräsentative Büroflächen im Kanton Zug. Ihre Liegenschaft an der Bahnhofstrasse entspricht unserem Profil. Können Sie uns Details zu Verfügbarkeit und Nebenkosten mitteilen?\n\nFreundliche Grüsse\nAdmin User',
+ status: 'in_progress',
+ unreadCount: 2,
+ isRead: false,
+ matchScore: 86,
+ createdAt: '2026-05-16T08:45:00Z',
+ updatedAt: '2026-05-20T11:00:00Z',
+ thread: [
+ {
+ id: 'dmsg-004-1',
+ inquiryId: 'dinq-004',
+ senderType: 'tenant',
+ senderName: 'Admin User',
+ body:
+ 'Sehr geehrte Frau Huber\n\nWir suchen repräsentative Büroflächen im Kanton Zug. Ihre Liegenschaft an der Bahnhofstrasse entspricht unserem Profil. Können Sie uns Details zu Verfügbarkeit und Nebenkosten mitteilen?\n\nFreundliche Grüsse\nAdmin User',
+ attachments: [],
+ createdAt: '2026-05-16T08:45:00Z',
+ },
+ {
+ id: 'dmsg-004-2',
+ inquiryId: 'dinq-004',
+ senderType: 'supply_user',
+ senderName: 'Sandra Huber',
+ body:
+ 'Guten Tag\n\nVielen Dank für Ihre Nachricht. Die Fläche von ca. 520 m² ist ab Oktober verfügbar. Der Nettomietzins beträgt CHF 290/m² p.a. Nebenkosten werden nach Aufwand abgerechnet. Darf ich Ihnen ein Besichtigungsfenster vorschlagen?\n\nFreundliche Grüsse\nSandra Huber\nSwiss Prime Site AG',
+ attachments: [
+ { id: 'datt-004-1', fileName: 'Konditionsblatt_Bahnhofstr28.pdf', fileType: 'application/pdf', fileSize: 820000 },
+ ],
+ createdAt: '2026-05-18T14:20:00Z',
+ },
+ {
+ id: 'dmsg-004-3',
+ inquiryId: 'dinq-004',
+ senderType: 'supply_user',
+ senderName: 'Sandra Huber',
+ body:
+ 'Guten Tag\n\nNur eine kurze Nachfrage — haben Sie die Unterlagen erhalten? Gerne würden wir einen Termin festlegen.\n\nFreundliche Grüsse\nSandra Huber',
+ attachments: [],
+ createdAt: '2026-05-20T11:00:00Z',
+ },
+ ],
+ },
+
+ // 5 — ANSWERED (completed exchange)
+ {
+ id: 'dinq-005',
+ organizationId: 'org-wincasa',
+ propertyId: 'prop-dreispitz',
+ tenantName: 'Admin User',
+ tenantCompany: 'Mobimo Management AG',
+ tenantEmail: 'admin@ideal-sharing.ch',
+ propertyManagerName: 'Reto Mäder',
+ propertyManagerCompany: 'Allreal AG',
+ propertyAddress: 'Logistikfläche Dreispitz Basel',
+ subject: 'Anfrage: Logistikfläche Dreispitz Basel',
+ message:
+ "Guten Tag Herr Mäder\n\nWir suchen ab Herbst 2026 eine Logistikfläche im Raum Basel. Ihre Liegenschaft im Dreispitz würde unseren Anforderungen entsprechen. Ist die Fläche noch verfügbar?\n\nFreundliche Grüsse\nAdmin User",
+ status: 'answered',
+ unreadCount: 0,
+ isRead: true,
+ lastReadAt: '2026-05-14T10:00:00Z',
+ matchScore: 79,
+ createdAt: '2026-05-10T11:00:00Z',
+ updatedAt: '2026-05-14T09:45:00Z',
+ thread: [
+ {
+ id: 'dmsg-005-1',
+ inquiryId: 'dinq-005',
+ senderType: 'tenant',
+ senderName: 'Admin User',
+ body:
+ "Guten Tag Herr Mäder\n\nWir suchen ab Herbst 2026 eine Logistikfläche im Raum Basel. Ihre Liegenschaft im Dreispitz würde unseren Anforderungen entsprechen. Ist die Fläche noch verfügbar?\n\nFreundliche Grüsse\nAdmin User",
+ attachments: [],
+ createdAt: '2026-05-10T11:00:00Z',
+ },
+ {
+ id: 'dmsg-005-2',
+ inquiryId: 'dinq-005',
+ senderType: 'supply_user',
+ senderName: 'Reto Mäder',
+ body:
+ 'Guten Tag\n\nJa, die Fläche ist noch verfügbar. Wir haben ca. 1\'800 m² mit 5.5 m Hallenhöhe und zwei Rampen. Besichtigung möglich ab nächster Woche. Anbei das Datenblatt.\n\nFreundliche Grüsse\nReto Mäder\nAllreal AG',
+ attachments: [
+ { id: 'datt-005-1', fileName: 'Datenblatt_Dreispitz_Logistik.pdf', fileType: 'application/pdf', fileSize: 1100000 },
+ ],
+ createdAt: '2026-05-12T08:30:00Z',
+ },
+ {
+ id: 'dmsg-005-3',
+ inquiryId: 'dinq-005',
+ senderType: 'tenant',
+ senderName: 'Admin User',
+ body:
+ 'Herzlichen Dank. Die Unterlagen sehen vielversprechend aus. Wir melden uns bis Ende Woche mit einem Besichtigungstermin.\n\nFreundliche Grüsse\nAdmin User',
+ attachments: [],
+ createdAt: '2026-05-14T09:45:00Z',
+ },
+ ],
+ },
+]
diff --git a/src/pages/demand/Anfragen.tsx b/src/pages/demand/Anfragen.tsx
index 485476a..87aafed 100644
--- a/src/pages/demand/Anfragen.tsx
+++ b/src/pages/demand/Anfragen.tsx
@@ -5,7 +5,7 @@ import {
InputAdornment, Alert,
} from '@mui/material'
import { Search, Send, Paperclip, ArrowLeft, Bot, Building2, Kanban } from 'lucide-react'
-import { mockInquiries } from '../../mock-data/inquiries'
+import { mockDemandInquiries } from '../../mock-data/demandInquiries'
import { useInquiryStore } from '../../stores/inquiryStore'
import { usePipelineItems, useMoveStage } from '../../hooks/usePipeline'
import { useToastStore } from '../../stores/toastStore'
@@ -36,11 +36,11 @@ export default function Anfragen() {
const preselectedId = searchParams.get('inquiry')
const storeInquiries = useInquiryStore(s => s.sentInquiries)
- const [inquiries, setInquiries] = useState(mockInquiries)
+ const [inquiries, setInquiries] = useState(mockDemandInquiries)
const allInquiries = [...storeInquiries, ...inquiries]
const [selectedId, setSelectedId] = useState(
- preselectedId ?? mockInquiries[0]?.id ?? null
+ preselectedId ?? mockDemandInquiries[0]?.id ?? null
)
const [search, setSearch] = useState('')
const [statusFilter, setStatusFilter] = useState('all')
@@ -54,7 +54,10 @@ export default function Anfragen() {
const matchesSearch = !q ||
inq.tenantName.toLowerCase().includes(q) ||
inq.subject.toLowerCase().includes(q) ||
- (inq.tenantCompany?.toLowerCase().includes(q) ?? false)
+ (inq.tenantCompany?.toLowerCase().includes(q) ?? false) ||
+ (inq.propertyAddress?.toLowerCase().includes(q) ?? false) ||
+ (inq.propertyManagerName?.toLowerCase().includes(q) ?? false) ||
+ (inq.propertyManagerCompany?.toLowerCase().includes(q) ?? false)
const matchesStatus = statusFilter === 'all' || inq.status === statusFilter
return matchesSearch && matchesStatus
})
@@ -180,6 +183,7 @@ export default function Anfragen() {
inq={inq}
isSelected={inq.id === selectedId}
hasPipeline={!!(inq.propertyId ? pipelineItems.find(i => i.propertyId === inq.propertyId) : pipelineItems.find(i => i.inquiryId === inq.id))}
+ perspective="demand"
onSelect={handleSelect}
/>
))}
@@ -209,12 +213,16 @@ export default function Anfragen() {
- {selected.tenantName.split(' ').map(n => n[0]).join('').toUpperCase().slice(0, 2)}
+ {(selected.propertyAddress ?? selected.subject).split(' ').map((n: string) => n[0]).join('').toUpperCase().slice(0, 2)}
- {selected.tenantName}
- {selected.tenantCompany && {selected.tenantCompany}}
+ {selected.propertyAddress ?? selected.subject}
+ {(selected.propertyManagerCompany ?? selected.propertyManagerName) && (
+
+ {selected.propertyManagerCompany ?? selected.propertyManagerName ?? ''}
+
+ )}
{selected.subject}
diff --git a/src/stores/inquiryStore.ts b/src/stores/inquiryStore.ts
index d271b9d..f904d14 100644
--- a/src/stores/inquiryStore.ts
+++ b/src/stores/inquiryStore.ts
@@ -50,7 +50,11 @@ export const useInquiryStore = create((set) => ({
organizationId: 'org-wincasa',
propertyId: item.propertyId ?? 'unknown',
tenantName: 'Admin User',
- tenantCompany: 'Wincasa AG',
+ tenantCompany: 'Mobimo Management AG',
+ tenantEmail: 'admin@ideal-sharing.ch',
+ propertyAddress: item.propertyTitle,
+ propertyManagerName: 'Verwalter',
+ propertyManagerCompany: '',
subject: 'Anfrage: ' + item.propertyTitle,
message,
status: 'new',