add dpis controller

This commit is contained in:
Suphonchai Phoonsawat 2024-10-07 14:53:27 +07:00
parent 497decefe4
commit 4852131651
74 changed files with 606 additions and 336 deletions

View file

@ -162,7 +162,7 @@ export class ProfileLeaveController extends Controller {
}
@Get("history/{leaveId}")
public async leaveHistory(@Path() leaveId: string,) {
public async leaveHistory(@Path() leaveId: string) {
const record = await this.leaveHistoryRepo.find({
relations: { leaveType: true },
where: { profileLeaveId: leaveId },
@ -206,7 +206,7 @@ export class ProfileLeaveController extends Controller {
Object.assign(history, { ...data, id: undefined });
await this.leaveRepo.save(data, { data: req });
setLogDataDiff( req, { before, after: data });
setLogDataDiff(req, { before, after: data });
history.profileLeaveId = data.id;
await this.leaveHistoryRepo.save(history, { data: req });
@ -248,7 +248,7 @@ export class ProfileLeaveController extends Controller {
await Promise.all([
this.leaveRepo.save(record, { data: req }),
setLogDataDiff( req, { before, after: record }),
setLogDataDiff(req, { before, after: record }),
this.leaveHistoryRepo.save(history, { data: req }),
]);