This commit is contained in:
AdisakKanthawilang 2025-03-31 18:13:03 +07:00
parent 4732c835b4
commit 669e7010a1
2 changed files with 3 additions and 3 deletions

View file

@ -190,7 +190,7 @@ export class SalaryController extends Controller {
item.lastUpdateFullName = request.user.name; item.lastUpdateFullName = request.user.name;
item.lastUpdatedAt = new Date(); item.lastUpdatedAt = new Date();
await this.salaryRepository.save(chk_fields, { data: request }); await this.salaryRepository.save(chk_fields, { data: request });
setLogDataDiff(request, { before, after: request }); setLogDataDiff(request, { before, after: chk_fields });
}); });
} }

View file

@ -20,8 +20,8 @@ export type LogSequence = {
export function setLogDataDiff(req: RequestWithUser, data: DataDiff) { export function setLogDataDiff(req: RequestWithUser, data: DataDiff) {
req.app.locals.logData.dataDiff = { req.app.locals.logData.dataDiff = {
before: data.before ? JSON.stringify(data.before) : "", before: JSON.stringify(data.before),
after: data.after ? JSON.stringify(data.after) : "", after: JSON.stringify(data.after),
}; };
} }