add 4 new fields for expert approval

This commit is contained in:
SepehrYahyaee
2026-09-29 15:34:11 +03:30
parent b7a64596dd
commit 05e3e6a4d3
15 changed files with 1271 additions and 74 deletions
+20
View File
@@ -314,6 +314,16 @@ export class LookupsController {
description: "Max rows (1–100, default 50)",
example: 50,
})
@ApiQuery({
name: "vehicleGroupId",
required: false,
description: "Only return kinds belonging to this Fanavaran vehicle group",
})
@ApiQuery({
name: "vehicleSystemId",
required: false,
description: "Only return kinds belonging to this Fanavaran vehicle system",
})
@ApiOkResponse({
description: "Matched active vehicle kinds with echoed query",
schema: {
@@ -338,10 +348,20 @@ export class LookupsController {
async getVehicleList(
@Query("q") q?: string,
@Query("limit") limit?: string,
@Query("vehicleGroupId") vehicleGroupId?: string,
@Query("vehicleSystemId") vehicleSystemId?: string,
) {
return await this.lookupsService.searchVehicleKindsList({
q,
limit: limit != null && limit !== "" ? Number(limit) : undefined,
vehicleGroupId:
vehicleGroupId != null && vehicleGroupId !== ""
? Number(vehicleGroupId)
: undefined,
vehicleSystemId:
vehicleSystemId != null && vehicleSystemId !== ""
? Number(vehicleSystemId)
: undefined,
});
}