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

@ -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);