Map Fanavaran people and licences by party role; allow unlisted base-info lookups.

Resolve driver, owner, and policyholder from participants when they differ, prefer real licence / driverLicenseDate over dummies, and fall back unknown /lookups/fanavaran/{name} to car/base-info/{name} (including vehicle-groups).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-26 16:42:21 +03:30
parent 4f8fe04380
commit fc1c117b93
9 changed files with 590 additions and 44 deletions

View File

@@ -10,6 +10,7 @@ import {
} from "src/core/config/fanavaran-client.config";
import {
FANAVARAN_REMOTE_LOOKUPS,
resolveFanavaranRemoteLookup,
type FanavaranRemoteLookupDefinition,
TEJARAT_STATIC_ACCIDENT_FILES,
} from "src/fanavaran/fanavaran-lookup.config";
@@ -66,7 +67,7 @@ export class LookupsService {
}
private findRemoteLookup(name: string) {
const lookup = FANAVARAN_REMOTE_LOOKUPS.find((item) => item.name === name);
const lookup = resolveFanavaranRemoteLookup(name);
if (!lookup) {
throw new NotFoundException(`Unknown Fanavaran remote lookup: ${name}`);
}