fixing
This commit is contained in:
parent
4bbcb6d9d9
commit
7b853002c5
1 changed files with 20 additions and 13 deletions
|
|
@ -139,6 +139,7 @@ export class EvaluateResultController extends Controller {
|
|||
"develop_self_learning_score",
|
||||
"develop_training_seminar_score",
|
||||
"evaluate_result",
|
||||
"no",
|
||||
],
|
||||
where: {
|
||||
assign_id,
|
||||
|
|
@ -149,7 +150,10 @@ export class EvaluateResultController extends Controller {
|
|||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลการประเมินผล");
|
||||
}
|
||||
|
||||
const result = resultData.map((e) => {
|
||||
const result = await Promise.all(
|
||||
resultData.map(async (e) => {
|
||||
const check = await this.evaluateResultRepository.count({ where: { assign_id, no: e.no } });
|
||||
|
||||
const develop_complete =
|
||||
e.develop_orientation_score > 0 &&
|
||||
e.develop_self_learning_score > 0 &&
|
||||
|
|
@ -162,8 +166,11 @@ export class EvaluateResultController extends Controller {
|
|||
return {
|
||||
develop_complete,
|
||||
evaluate_result,
|
||||
evaluate_no: Number(e.no),
|
||||
isResult: check > 0 ? true : false,
|
||||
};
|
||||
});
|
||||
}),
|
||||
);
|
||||
|
||||
// const develop_complete = await (resultData.develop_orientation_score > 0 &&
|
||||
// resultData.develop_self_learning_score > 0 &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue