Merge branch 'develop' into adiDev

# Conflicts:
#	src/controllers/SalaryPeriodController.ts
This commit is contained in:
AdisakKanthawilang 2025-04-28 10:51:48 +07:00
commit 3e84da2c50
2 changed files with 70 additions and 35 deletions

View file

@ -69,56 +69,64 @@ export class SalaryPeriodEmployeeController extends Controller {
}
const data = {
group1id:
salaryPeriod.salaryOrgEmployees && salaryPeriod.salaryOrgEmployees.find(
salaryPeriod.salaryOrgEmployees &&
salaryPeriod.salaryOrgEmployees.find(
(x) =>
x.group == "GROUP1" &&
x.rootId == body.rootId &&
x.snapshot == body.snapshot.toLocaleUpperCase(),
) == null
? null
: salaryPeriod.salaryOrgEmployees && salaryPeriod.salaryOrgEmployees.find(
: salaryPeriod.salaryOrgEmployees &&
salaryPeriod.salaryOrgEmployees.find(
(x) =>
x.group == "GROUP1" &&
x.rootId == body.rootId &&
x.snapshot == body.snapshot.toLocaleUpperCase(),
)?.id,
group1IsClose:
salaryPeriod.salaryOrgs && salaryPeriod.salaryOrgs.find(
salaryPeriod.salaryOrgEmployees &&
salaryPeriod.salaryOrgEmployees.find(
(x) =>
x.group == "GROUP1" &&
x.rootId == body.rootId &&
x.snapshot == body.snapshot.toLocaleUpperCase(),
) == null
? null
: salaryPeriod.salaryOrgs && salaryPeriod.salaryOrgs.find(
: salaryPeriod.salaryOrgEmployees &&
salaryPeriod.salaryOrgEmployees.find(
(x) =>
x.group == "GROUP1" &&
x.rootId == body.rootId &&
x.snapshot == body.snapshot.toLocaleUpperCase(),
)?.isClose,
group2id:
salaryPeriod.salaryOrgEmployees && salaryPeriod.salaryOrgEmployees.find(
salaryPeriod.salaryOrgEmployees &&
salaryPeriod.salaryOrgEmployees.find(
(x) =>
x.group == "GROUP2" &&
x.rootId == body.rootId &&
x.snapshot == body.snapshot.toLocaleUpperCase(),
) == null
? null
: salaryPeriod.salaryOrgEmployees && salaryPeriod.salaryOrgEmployees.find(
: salaryPeriod.salaryOrgEmployees &&
salaryPeriod.salaryOrgEmployees.find(
(x) =>
x.group == "GROUP2" &&
x.rootId == body.rootId &&
x.snapshot == body.snapshot.toLocaleUpperCase(),
)?.id,
group2IsClose:
salaryPeriod.salaryOrgs &&salaryPeriod.salaryOrgs.find(
salaryPeriod.salaryOrgEmployees &&
salaryPeriod.salaryOrgEmployees.find(
(x) =>
x.group == "GROUP2" &&
x.rootId == body.rootId &&
x.snapshot == body.snapshot.toLocaleUpperCase(),
) == null
? null
: salaryPeriod.salaryOrgs && salaryPeriod.salaryOrgs.find(
: salaryPeriod.salaryOrgEmployees &&
salaryPeriod.salaryOrgEmployees.find(
(x) =>
x.group == "GROUP2" &&
x.rootId == body.rootId &&
@ -128,7 +136,6 @@ export class SalaryPeriodEmployeeController extends Controller {
period: salaryPeriod.period,
};
return new HttpSuccess(data);
}