feat: add Maison Work source type, rename ExternalMarket to Direktinserat, hide own portfolio from demand search by default

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Sutter
2026-05-19 23:02:05 +02:00
parent a521155bb2
commit 3756675b6f
29 changed files with 115 additions and 42 deletions
+2 -2
View File
@@ -191,8 +191,8 @@ export function rankMatches(matches: Match[]): Match[] {
return [...matches].sort((a, b) => {
// Primary: matchScore descending
if (b.matchScore !== a.matchScore) return b.matchScore - a.matchScore
// Secondary: VERIFIED > EXTERNAL > FUTURE
const typeOrder = { VERIFIED_PORTFOLIO: 0, EXTERNAL_MARKET: 1, FUTURE_AVAILABILITY: 2 }
// Secondary: VERIFIED > EXTERNAL / MAISON_WORK > FUTURE
const typeOrder: Record<string, number> = { VERIFIED_PORTFOLIO: 0, EXTERNAL_MARKET: 1, MAISON_WORK: 1, FUTURE_AVAILABILITY: 2 }
const aOrder = typeOrder[a.resultType ?? 'EXTERNAL_MARKET'] ?? 1
const bOrder = typeOrder[b.resultType ?? 'EXTERNAL_MARKET'] ?? 1
if (aOrder !== bOrder) return aOrder - bOrder
+2
View File
@@ -303,6 +303,8 @@ export function calcConfidenceModifier(property: Property): number {
mod += CONFIDENCE_MODIFIER.FUTURE_AVAILABILITY
} else if (property.resultType === ResultType.EXTERNAL_MARKET) {
mod += CONFIDENCE_MODIFIER.EXTERNAL_MARKET
} else if (property.resultType === ResultType.MAISON_WORK) {
mod += CONFIDENCE_MODIFIER.MAISON_WORK
} else {
// VERIFIED_PORTFOLIO
mod += property.confidenceScore >= 0.80