unit to string

This commit is contained in:
Kittapath 2024-05-09 15:57:43 +07:00
parent 9a85609e93
commit 6e07eaacba
8 changed files with 33 additions and 13 deletions

View file

@ -102,7 +102,7 @@ export class kpiSpecialController extends Controller {
}
kpiSpecial.lastUpdateUserId = request.user.sub;
kpiSpecial.lastUpdateFullName = request.user.name;
this.kpiSpecialRepository.merge(kpiSpecial, requestBody);
Object.assign(kpiSpecial, requestBody);
await this.kpiSpecialRepository.save(kpiSpecial);
return new HttpSuccess(id);
}

View file

@ -148,7 +148,7 @@ export class KpiUserPlannedController extends Controller {
// kpiUserPlanned.achievement4 = request.user.achievement4;
// kpiUserPlanned.achievement5 = request.user.achievement5;
this.kpiUserPlannedRepository.merge(kpiUserPlanned, requestBody);
Object.assign(kpiUserPlanned, requestBody);
kpiUserPlanned.startDate = requestBody.startDate == undefined ? null : requestBody.startDate;
kpiUserPlanned.endDate = requestBody.endDate == undefined ? null : requestBody.endDate;
await this.kpiUserPlannedRepository.save(kpiUserPlanned);

View file

@ -150,7 +150,7 @@ export class KpiUserRoleController extends Controller {
kpiUserRole.lastUpdateUserId = request.user.sub;
kpiUserRole.lastUpdateFullName = request.user.name;
this.kpiUserRoleRepository.merge(kpiUserRole, requestBody);
Object.assign(kpiUserRole, requestBody);
kpiUserRole.startDate = requestBody.startDate == undefined ? null : requestBody.startDate;
kpiUserRole.endDate = requestBody.endDate == undefined ? null : requestBody.endDate;
await this.kpiUserRoleRepository.save(kpiUserRole);