fix: bypass Corgi WMI in VIN decode chain + misc integrations

- vehicles.service.ts: remove Corgi from resolveVin chain; go straight
  to PartsCatalogs → PL24 → EMEX without offline WMI lookup
- End condition simplified: return null only when EMEX also fails (no
  corgiKnown fallback)
- Add scripts/test-emex-http.mjs: proxy timing test for EMEX HTTP decode

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Sase Dev
2026-03-06 19:51:40 +00:00
parent ce8784014e
commit 19ccaa7b68
16 changed files with 726 additions and 288 deletions

View File

@@ -18,6 +18,8 @@ export function PartsPanel({ parts, vehicleId, categoryId }: PartsPanelProps) {
const rowRefs = useRef<Map<number, HTMLTableRowElement>>(new Map());
const [copiedId, setCopiedId] = useState<string | null>(null);
const hasPrices = parts.some((p) => p.price != null);
// Map group → IDs of available (non-unavailable) parts
const availableByGroup = useMemo(() => {
const map = new Map<number, string[]>();
@@ -81,6 +83,7 @@ export function PartsPanel({ parts, vehicleId, categoryId }: PartsPanelProps) {
<th className="px-3 py-2">OEM Kodu</th>
<th className="px-3 py-2 w-14 text-center">Adet</th>
<th className="px-3 py-2">Pozisyon</th>
{hasPrices && <th className="px-3 py-2 text-right">Fiyat</th>}
</tr>
</thead>
<tbody>
@@ -155,6 +158,16 @@ export function PartsPanel({ parts, vehicleId, categoryId }: PartsPanelProps) {
<td className="px-3 py-2 text-muted-foreground">
{part.position}
</td>
{hasPrices && (
<td className="px-3 py-2 text-right text-xs">
{part.price != null
? new Intl.NumberFormat("de-DE", {
style: "currency",
currency: part.currency ?? "EUR",
}).format(part.price)
: "—"}
</td>
)}
</tr>
);
})}

View File

@@ -12,7 +12,8 @@ export interface Part {
remark?: string;
modelCodes?: string;
presel?: boolean;
price?: number;
price?: number | null;
currency?: string | null;
note?: string;
}