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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user