forked from Yara724/api
fix(licence): validate driving licence IDs and preserve verified captions
This commit is contained in:
@@ -45,6 +45,7 @@ import {
|
||||
VEHICLE_KINDS_REFRESH_MS,
|
||||
} from "./vehicle-kind-search";
|
||||
import { gregorianDateInIran } from "src/helpers/iran-datetime";
|
||||
import { normalizeDrivingLicenceTypes, type DrivingLicenceType } from "./driving-licence-types";
|
||||
|
||||
type TejaratAccidentReasonRow = {
|
||||
id: number;
|
||||
@@ -188,8 +189,10 @@ export class LookupsService implements OnModuleInit, OnModuleDestroy {
|
||||
return await this.getClientRemoteLookup("dmg-pay-method");
|
||||
}
|
||||
|
||||
async getDrivingLicenceTypes(): Promise<any> {
|
||||
return await this.getClientRemoteLookup("driving-licence-types");
|
||||
async getDrivingLicenceTypes(): Promise<DrivingLicenceType[]> {
|
||||
return normalizeDrivingLicenceTypes(
|
||||
await this.getClientRemoteLookup("driving-licence-types"),
|
||||
);
|
||||
}
|
||||
|
||||
async getAccidentCulpritType(): Promise<any> {
|
||||
|
||||
Reference in New Issue
Block a user