Merge branch 'develop' into adiDev
This commit is contained in:
commit
7e31c22f79
5 changed files with 42 additions and 31 deletions
|
|
@ -141,10 +141,11 @@ export class EmployeePosTypeController extends Controller {
|
||||||
async deleteType(@Path() id: string, @Request() request: RequestWithUser) {
|
async deleteType(@Path() id: string, @Request() request: RequestWithUser) {
|
||||||
let result: any;
|
let result: any;
|
||||||
try {
|
try {
|
||||||
result = await this.employeePosTypeRepository.findOne({
|
// result = await this.employeePosTypeRepository.findOne({
|
||||||
where: { id: id },
|
// where: { id: id },
|
||||||
});
|
// });
|
||||||
await this.employeePosTypeRepository.remove(result, { data: request });
|
// await this.employeePosTypeRepository.remove(result, { data: request });
|
||||||
|
result = await this.employeePosTypeRepository.delete({ id: id });
|
||||||
} catch {
|
} catch {
|
||||||
throw new HttpError(
|
throw new HttpError(
|
||||||
HttpStatusCode.NOT_FOUND,
|
HttpStatusCode.NOT_FOUND,
|
||||||
|
|
|
||||||
|
|
@ -2113,12 +2113,12 @@ export class OrganizationDotnetController extends Controller {
|
||||||
id: profile.id,
|
id: profile.id,
|
||||||
avatar: profile.avatar,
|
avatar: profile.avatar,
|
||||||
avatarName: profile.avatarName,
|
avatarName: profile.avatarName,
|
||||||
rank: profile.rank,
|
rank: profile.rank ?? "",
|
||||||
prefix: profile.prefix,
|
prefix: profile.prefix ?? "",
|
||||||
firstName: profile.firstName,
|
firstName: profile.firstName ?? "",
|
||||||
lastName: profile.lastName,
|
lastName: profile.lastName ?? "",
|
||||||
citizenId: profile.citizenId,
|
citizenId: profile.citizenId ?? "",
|
||||||
position: profile.position,
|
position: profile.position ?? "",
|
||||||
posLevelId: profile.posLevelId,
|
posLevelId: profile.posLevelId,
|
||||||
posTypeId: profile.posTypeId,
|
posTypeId: profile.posTypeId,
|
||||||
email: profile.email,
|
email: profile.email,
|
||||||
|
|
@ -2137,10 +2137,10 @@ export class OrganizationDotnetController extends Controller {
|
||||||
reasonSameDate: profile.reasonSameDate,
|
reasonSameDate: profile.reasonSameDate,
|
||||||
telephoneNumber: profile.telephoneNumber,
|
telephoneNumber: profile.telephoneNumber,
|
||||||
nationality: profile.nationality,
|
nationality: profile.nationality,
|
||||||
gender: profile.gender,
|
gender: profile.gender ?? "",
|
||||||
relationship: profile.relationship,
|
relationship: profile.relationship ?? "",
|
||||||
religion: profile.religion,
|
religion: profile.religion ?? "",
|
||||||
bloodGroup: profile.bloodGroup,
|
bloodGroup: profile.bloodGroup ?? "",
|
||||||
registrationAddress: profile.registrationAddress,
|
registrationAddress: profile.registrationAddress,
|
||||||
registrationProvinceId: profile.registrationProvinceId,
|
registrationProvinceId: profile.registrationProvinceId,
|
||||||
registrationDistrictId: profile.registrationDistrictId,
|
registrationDistrictId: profile.registrationDistrictId,
|
||||||
|
|
@ -2152,8 +2152,8 @@ export class OrganizationDotnetController extends Controller {
|
||||||
currentZipCode: profile.currentZipCode,
|
currentZipCode: profile.currentZipCode,
|
||||||
dutyTimeId: profile.dutyTimeId,
|
dutyTimeId: profile.dutyTimeId,
|
||||||
dutyTimeEffectiveDate: profile.dutyTimeEffectiveDate,
|
dutyTimeEffectiveDate: profile.dutyTimeEffectiveDate,
|
||||||
posLevel: profile.posLevel?.posLevelName ?? null,
|
posLevel: profile.posLevel?.posLevelName ?? "",
|
||||||
posType: profile.posType?.posTypeName ?? null,
|
posType: profile.posType?.posTypeName ?? "",
|
||||||
profileSalary: profile.profileSalary,
|
profileSalary: profile.profileSalary,
|
||||||
profileInsignia: profile.profileInsignias.map((x) => {
|
profileInsignia: profile.profileInsignias.map((x) => {
|
||||||
return { ...x, insignia: x.insignia.name };
|
return { ...x, insignia: x.insignia.name };
|
||||||
|
|
@ -2174,7 +2174,7 @@ export class OrganizationDotnetController extends Controller {
|
||||||
x.orgRevision?.orgRevisionIsDraft == false &&
|
x.orgRevision?.orgRevisionIsDraft == false &&
|
||||||
x.orgRevision?.orgRevisionIsCurrent == true,
|
x.orgRevision?.orgRevisionIsCurrent == true,
|
||||||
)?.orgRootId ?? null,
|
)?.orgRootId ?? null,
|
||||||
posNo: shortName,
|
posNo: shortName ?? "",
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -2251,12 +2251,12 @@ export class OrganizationDotnetController extends Controller {
|
||||||
id: profile.id,
|
id: profile.id,
|
||||||
avatar: profile.avatar,
|
avatar: profile.avatar,
|
||||||
avatarName: profile.avatarName,
|
avatarName: profile.avatarName,
|
||||||
rank: profile.rank,
|
rank: profile.rank ?? "",
|
||||||
prefix: profile.prefix,
|
prefix: profile.prefix ?? "",
|
||||||
firstName: profile.firstName,
|
firstName: profile.firstName ?? "",
|
||||||
lastName: profile.lastName,
|
lastName: profile.lastName ?? "",
|
||||||
citizenId: profile.citizenId,
|
citizenId: profile.citizenId ?? "",
|
||||||
position: profile.position,
|
position: profile.position ?? "",
|
||||||
posLevelId: profile.posLevelId,
|
posLevelId: profile.posLevelId,
|
||||||
email: profile.email,
|
email: profile.email,
|
||||||
phone: profile.phone,
|
phone: profile.phone,
|
||||||
|
|
@ -2274,10 +2274,10 @@ export class OrganizationDotnetController extends Controller {
|
||||||
reasonSameDate: profile.reasonSameDate,
|
reasonSameDate: profile.reasonSameDate,
|
||||||
telephoneNumber: profile.telephoneNumber,
|
telephoneNumber: profile.telephoneNumber,
|
||||||
nationality: profile.nationality,
|
nationality: profile.nationality,
|
||||||
gender: profile.gender,
|
gender: profile.gender ?? "",
|
||||||
relationship: profile.relationship,
|
relationship: profile.relationship ?? "",
|
||||||
religion: profile.religion,
|
religion: profile.religion ?? "",
|
||||||
bloodGroup: profile.bloodGroup,
|
bloodGroup: profile.bloodGroup ?? "",
|
||||||
registrationAddress: profile.registrationAddress,
|
registrationAddress: profile.registrationAddress,
|
||||||
registrationProvinceId: profile.registrationProvinceId,
|
registrationProvinceId: profile.registrationProvinceId,
|
||||||
registrationDistrictId: profile.registrationDistrictId,
|
registrationDistrictId: profile.registrationDistrictId,
|
||||||
|
|
@ -2289,8 +2289,8 @@ export class OrganizationDotnetController extends Controller {
|
||||||
currentZipCode: profile.currentZipCode,
|
currentZipCode: profile.currentZipCode,
|
||||||
// dutyTimeId: profile.dutyTimeId,
|
// dutyTimeId: profile.dutyTimeId,
|
||||||
// dutyTimeEffectiveDate: profile.dutyTimeEffectiveDate,
|
// dutyTimeEffectiveDate: profile.dutyTimeEffectiveDate,
|
||||||
posLevel: profile.posLevel?.posLevelName ?? null,
|
posLevel: profile.posLevel?.posLevelName ?? "",
|
||||||
posType: profile.posType?.posTypeName ?? null,
|
posType: profile.posType?.posTypeName ?? "",
|
||||||
profileSalary: profile.profileSalary,
|
profileSalary: profile.profileSalary,
|
||||||
profileInsignia: profile.profileInsignias.map((x) => {
|
profileInsignia: profile.profileInsignias.map((x) => {
|
||||||
return { ...x, insignia: x.insignia.name };
|
return { ...x, insignia: x.insignia.name };
|
||||||
|
|
@ -2298,7 +2298,7 @@ export class OrganizationDotnetController extends Controller {
|
||||||
amount: profile.amount,
|
amount: profile.amount,
|
||||||
positionSalaryAmount: profile.positionSalaryAmount,
|
positionSalaryAmount: profile.positionSalaryAmount,
|
||||||
mouthSalaryAmount: profile.mouthSalaryAmount,
|
mouthSalaryAmount: profile.mouthSalaryAmount,
|
||||||
profileType: "OFFICER",
|
profileType: "EMPLOYEE",
|
||||||
root:
|
root:
|
||||||
profile?.current_holders?.find(
|
profile?.current_holders?.find(
|
||||||
(x) =>
|
(x) =>
|
||||||
|
|
@ -2311,7 +2311,7 @@ export class OrganizationDotnetController extends Controller {
|
||||||
x.orgRevision?.orgRevisionIsDraft == false &&
|
x.orgRevision?.orgRevisionIsDraft == false &&
|
||||||
x.orgRevision?.orgRevisionIsCurrent == true,
|
x.orgRevision?.orgRevisionIsCurrent == true,
|
||||||
)?.orgRootId ?? null,
|
)?.orgRootId ?? null,
|
||||||
posNo: shortName,
|
posNo: shortName ?? "",
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -947,6 +947,7 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
if (val >= 70 && val <= 79) return "ดี";
|
if (val >= 70 && val <= 79) return "ดี";
|
||||||
if (val >= 80 && val <= 89) return "ดีมาก";
|
if (val >= 80 && val <= 89) return "ดีมาก";
|
||||||
if (val >= 90 && val <= 100) return "ดีเด่น";
|
if (val >= 90 && val <= 100) return "ดีเด่น";
|
||||||
|
if (val > 101 ) return "ดีเด่น";
|
||||||
else return "-";
|
else return "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4857,6 +4857,9 @@ export class ProfileController extends Controller {
|
||||||
nodeId: null,
|
nodeId: null,
|
||||||
type: profile.employeeClass,
|
type: profile.employeeClass,
|
||||||
salary: profile.amount,
|
salary: profile.amount,
|
||||||
|
posNo : root?.orgRootShortName && posMaster?.posMasterNo
|
||||||
|
? `${root?.orgRootShortName}${posMaster?.posMasterNo}`
|
||||||
|
: ""
|
||||||
};
|
};
|
||||||
if (_profile.child4Id != null) {
|
if (_profile.child4Id != null) {
|
||||||
_profile.node = 4;
|
_profile.node = 4;
|
||||||
|
|
@ -4998,6 +5001,9 @@ export class ProfileController extends Controller {
|
||||||
nodeId: null,
|
nodeId: null,
|
||||||
salary: profile ? profile.amount : null,
|
salary: profile ? profile.amount : null,
|
||||||
amountSpecial: profile ? profile.amountSpecial : null,
|
amountSpecial: profile ? profile.amountSpecial : null,
|
||||||
|
posNo : root?.orgRootShortName && posMaster?.posMasterNo
|
||||||
|
? `${root?.orgRootShortName}${posMaster?.posMasterNo}`
|
||||||
|
: ""
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_profile.child4Id != null) {
|
if (_profile.child4Id != null) {
|
||||||
|
|
|
||||||
|
|
@ -2153,6 +2153,9 @@ export class ProfileEmployeeController extends Controller {
|
||||||
nodeId: null,
|
nodeId: null,
|
||||||
salary: profile ? profile.amount : null,
|
salary: profile ? profile.amount : null,
|
||||||
amountSpecial: profile ? profile.amountSpecial : null,
|
amountSpecial: profile ? profile.amountSpecial : null,
|
||||||
|
posNo : root?.orgRootShortName && posMaster?.posMasterNo
|
||||||
|
? `${root?.orgRootShortName}${posMaster?.posMasterNo}`
|
||||||
|
: ""
|
||||||
};
|
};
|
||||||
return new HttpSuccess(_profile);
|
return new HttpSuccess(_profile);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue