feat(supply): Anfragencenter — embedded property cards in public need detail
Add EmbeddedPropertyCard and surface matching properties inside the public need detail view. Add needToParsedCriteria() mapper to convert a stored Need back into parsed criteria for re-running search/matching. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,39 @@
|
||||
import { AssetType } from '../../domain/enums'
|
||||
import type { ParsedNeedCriteria, WeightingKey } from '../../domain/needBuilder'
|
||||
import type { CreateNeedInput } from '../../domain/need'
|
||||
import type { CreateNeedInput, Need } from '../../domain/need'
|
||||
|
||||
const ASSET_LABELS_TEXT: Record<string, string> = {
|
||||
OFFICE: 'Bürofläche', RETAIL: 'Retail-Fläche', LOGISTICS: 'Logistikfläche',
|
||||
PRODUCTION: 'Produktionsfläche', LIGHT_INDUSTRIAL: 'Gewerbefläche', MIXED: 'gemischte Fläche',
|
||||
}
|
||||
|
||||
export function needToParsedCriteria(need: Need): ParsedNeedCriteria {
|
||||
return {
|
||||
assetType: need.assetType,
|
||||
areaRange: need.requiredArea,
|
||||
preferredLocations: need.preferredLocations,
|
||||
budgetRange: need.budgetRange,
|
||||
timing: need.timing,
|
||||
mustHaveCriteria: need.mustCriteriaText,
|
||||
softFactors: need.softFactors,
|
||||
requireGroundFloor: need.requireGroundFloor,
|
||||
requiredFitOut: need.requiredFitOut,
|
||||
requiredParkingMin: need.requiredParkingMin,
|
||||
requireAirConditioning: need.requireAirConditioning,
|
||||
requireLoadingDock: need.requireLoadingDock,
|
||||
requireBarrierFree: need.requireBarrierFree,
|
||||
minCeilingHeightM: need.minCeilingHeightM,
|
||||
minContractDurationMonths: need.minContractDurationMonths,
|
||||
searchRadius: need.searchRadius,
|
||||
isAnonymous: need.isAnonymous,
|
||||
requiresDivisibility: need.requiresDivisibility,
|
||||
minDivisibleUnit: need.minDivisibleUnit,
|
||||
fitOutBudgetMaxPerSqm: need.fitOutBudgetMaxPerSqm,
|
||||
notes: need.notes,
|
||||
companyName: need.companyName,
|
||||
}
|
||||
}
|
||||
|
||||
export function generateSummary(c: ParsedNeedCriteria): string {
|
||||
const parts: string[] = []
|
||||
if (c.assetType) parts.push(`Suche ${ASSET_LABELS_TEXT[c.assetType] ?? c.assetType}`)
|
||||
|
||||
Reference in New Issue
Block a user