This commit is contained in:
SepehrYahyaee
2026-04-28 14:41:47 +03:30
parent bbd83da2d5
commit 98f1d2caf5
2 changed files with 135 additions and 2 deletions

View File

@@ -91,7 +91,7 @@ export class ExpertInsurerController {
@ApiQuery({ name: "page", type: Number })
@ApiQuery({ name: "response_count", type: Number })
@Get("list")
@Get("experts/list")
async getAllExperts(
@Query("page") page: number,
@Query("response_count") count: number,
@@ -104,7 +104,7 @@ export class ExpertInsurerController {
);
}
@Get("top-experts")
@Get("experts/top")
async getTopExperts(@CurrentUser() actor) {
return await this.expertInsurerService.getTopExpertsForClient(actor);
}
@@ -128,6 +128,29 @@ export class ExpertInsurerController {
return await this.expertInsurerService.getExpertStatisticsReport(actor);
}
@Get("report/status-counts")
@ApiQuery({
name: "from",
required: false,
description: "Optional start datetime (ISO string)",
})
@ApiQuery({
name: "to",
required: false,
description: "Optional end datetime (ISO string)",
})
async getInsurerStatusReport(
@CurrentUser() actor,
@Query("from") from?: string,
@Query("to") to?: string,
) {
return await this.expertInsurerService.getInsurerFileStatusCounts(
actor,
from,
to,
);
}
@ApiParam({ name: "expertId" })
@ApiQuery({ name: "role", enum: ["claim", "blame"] })
@Get("/:expertId")