fixing data report
This commit is contained in:
parent
7e83cd8d87
commit
8bb7a9c526
1 changed files with 10 additions and 6 deletions
|
|
@ -220,7 +220,7 @@ export class EvaluateResultController extends Controller {
|
|||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลแบบมอบหมายงาน");
|
||||
}
|
||||
|
||||
const experimenteeData = await this.personalRepository.find({
|
||||
const experimenteeData = await this.personalRepository.findOne({
|
||||
select: [
|
||||
"personal_id",
|
||||
"prefixName",
|
||||
|
|
@ -233,11 +233,15 @@ export class EvaluateResultController extends Controller {
|
|||
where: { personal_id: assign.personal_id },
|
||||
});
|
||||
|
||||
const experimentee = await experimenteeData.map((element) => ({
|
||||
...element,
|
||||
name: element.prefixName + element.firstName + " " + element.lastName,
|
||||
Oc: element.organization,
|
||||
}));
|
||||
if (!experimenteeData) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลบุคคล");
|
||||
}
|
||||
const experimentee = await {
|
||||
...experimenteeData,
|
||||
name:
|
||||
experimenteeData.prefixName + experimenteeData.firstName + " " + experimenteeData.lastName,
|
||||
Oc: experimenteeData.organization,
|
||||
};
|
||||
|
||||
const directorData = await this.assignDirectorRepository.find({
|
||||
where: { assign_id },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue