This commit is contained in:
@@ -129,12 +129,26 @@ export class TaskRepository extends Repository<TMTask> {
|
||||
const detailRows = await this.createQueryBuilder("task")
|
||||
.leftJoinAndSelect("task.remarks", "remark")
|
||||
.leftJoinAndSelect("task.ticket", "ticket")
|
||||
.leftJoinAndSelect("task.users", "user")
|
||||
.loadRelationCountAndMap("task.attachmentCount", "task.attachments")
|
||||
.loadRelationCountAndMap("task.checkListItemCount", "task.checkListItems")
|
||||
.loadRelationCountAndMap("task.completedCheckListItemCount", "task.checkListItems", "completedCheckListItems", (qb) =>
|
||||
qb.where("completedCheckListItems.isDone = :isDone", { isDone: true }),
|
||||
)
|
||||
.select(["task", "remark.id", "remark.title", "remark.color", "ticket.id", "ticket.subject", "ticket.numericId", "ticket.status"])
|
||||
.select([
|
||||
"task",
|
||||
"remark.id",
|
||||
"remark.title",
|
||||
"remark.color",
|
||||
"user.id",
|
||||
"user.firstName",
|
||||
"user.lastName",
|
||||
"user.profilePic",
|
||||
"ticket.id",
|
||||
"ticket.subject",
|
||||
"ticket.numericId",
|
||||
"ticket.status",
|
||||
])
|
||||
.where("task.id IN (:...ids)", { ids })
|
||||
.getMany();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user