fix bug
This commit is contained in:
parent
09bd6bc356
commit
2a117223f7
2 changed files with 8 additions and 10 deletions
|
|
@ -329,7 +329,7 @@ export class SalaryPeriodController extends Controller {
|
|||
salaryOrg.quantityUsed = amountFullType;
|
||||
const calRemainQuota = salaryOrg.fifteenPercent - amountFullType;
|
||||
salaryOrg.remainQuota = calRemainQuota;
|
||||
await this.salaryOrgRepository.save(salaryOrg,{data:req});
|
||||
await this.salaryOrgRepository.save(salaryOrg, { data: req });
|
||||
}
|
||||
}
|
||||
} else if (_salaryProfile.salaryOrg.salaryPeriod.period == "OCT") {
|
||||
|
|
@ -383,7 +383,7 @@ export class SalaryPeriodController extends Controller {
|
|||
? 0
|
||||
: sumAmountUse.totalAmount;
|
||||
salaryOrg.remainingAmount = calRemainAmount;
|
||||
await this.salaryOrgRepository.save(salaryOrg,{data:req});
|
||||
await this.salaryOrgRepository.save(salaryOrg, { data: req });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -579,7 +579,7 @@ export class SalaryPeriodController extends Controller {
|
|||
} else {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ประเภทการเลื่อนขึ้นเงินเดือนไม่ถูกต้อง");
|
||||
}
|
||||
const before = null;
|
||||
const before = structuredClone(salaryProfile);
|
||||
await this.salaryProfileRepository.save(salaryProfile, { data: request });
|
||||
setLogDataDiff(request, { before, after: salaryProfile });
|
||||
|
||||
|
|
@ -1026,7 +1026,7 @@ export class SalaryPeriodController extends Controller {
|
|||
} else {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ประเภทการเลื่อนขึ้นเงินเดือนไม่ถูกต้อง");
|
||||
}
|
||||
const before = null;
|
||||
const before = structuredClone(salaryProfile);
|
||||
await this.salaryProfileRepository.save(salaryProfile, { data: req });
|
||||
setLogDataDiff(req, { before, after: salaryProfile });
|
||||
|
||||
|
|
@ -3098,9 +3098,8 @@ export class SalaryPeriodController extends Controller {
|
|||
const before = structuredClone(x);
|
||||
x.status = "WAITHEAD2";
|
||||
x.ownerRecommend = body.titleRecommend;
|
||||
await this.salaryOrgRepository.save(x,{data:request});
|
||||
await this.salaryOrgRepository.save(x, { data: request });
|
||||
setLogDataDiff(request, { before, after: x });
|
||||
|
||||
}),
|
||||
);
|
||||
return new HttpSuccess();
|
||||
|
|
@ -3138,9 +3137,8 @@ export class SalaryPeriodController extends Controller {
|
|||
const before = structuredClone(x);
|
||||
x.status = "REPORT";
|
||||
x.ownerRecommend = body.titleRecommend;
|
||||
await this.salaryOrgRepository.save(x,{data:request});
|
||||
await this.salaryOrgRepository.save(x, { data: request });
|
||||
setLogDataDiff(request, { before, after: x });
|
||||
|
||||
}),
|
||||
);
|
||||
return new HttpSuccess();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue