เพิ่มแสดงเหตุผลการพ้นจากราชการในทะเบียนประวัติ #1240
This commit is contained in:
parent
03a7b45aa3
commit
b2c8bdecf3
4 changed files with 90 additions and 10 deletions
|
|
@ -2561,7 +2561,7 @@ export class CommandController extends Controller {
|
|||
await removeProfileInOrganize(profile.id, "OFFICER");
|
||||
}
|
||||
const clearProfile = await checkCommandType(String(item.commandId));
|
||||
if (clearProfile) {
|
||||
if (clearProfile.status) {
|
||||
if (profile.keycloak != null) {
|
||||
const delUserKeycloak = await deleteUser(profile.keycloak);
|
||||
if (delUserKeycloak) {
|
||||
|
|
@ -2570,6 +2570,11 @@ export class CommandController extends Controller {
|
|||
profile.isActive = false;
|
||||
}
|
||||
}
|
||||
profile.leaveCommandId = item.commandId ?? _null;
|
||||
profile.leaveCommandNo = item.refCommandNo ?? _null;
|
||||
profile.leaveRemark = clearProfile.leaveRemark ?? _null;
|
||||
profile.leaveDate = item.date ?? _null;
|
||||
profile.leaveType = clearProfile.LeaveType ?? _null;
|
||||
profile.position = _null;
|
||||
profile.posTypeId = _null;
|
||||
profile.posLevelId = _null;
|
||||
|
|
@ -2715,7 +2720,7 @@ export class CommandController extends Controller {
|
|||
await removeProfileInOrganize(profile.id, "EMPLOYEE");
|
||||
}
|
||||
const clearProfile = await checkCommandType(String(item.commandId));
|
||||
if (clearProfile) {
|
||||
if (clearProfile.status) {
|
||||
if (profile.keycloak != null) {
|
||||
const delUserKeycloak = await deleteUser(profile.keycloak);
|
||||
if (delUserKeycloak) {
|
||||
|
|
@ -2724,6 +2729,11 @@ export class CommandController extends Controller {
|
|||
profile.isActive = false;
|
||||
}
|
||||
}
|
||||
profile.leaveCommandId = item.commandId ?? _null;
|
||||
profile.leaveCommandNo = item.refCommandNo ?? _null;
|
||||
profile.leaveRemark = clearProfile.leaveRemark ?? _null;
|
||||
profile.leaveDate = item.date ?? _null;
|
||||
profile.leaveType = clearProfile.LeaveType ?? _null;
|
||||
profile.position = _null;
|
||||
profile.posTypeId = _null;
|
||||
profile.posLevelId = _null;
|
||||
|
|
@ -2803,7 +2813,7 @@ export class CommandController extends Controller {
|
|||
}
|
||||
const clearProfile = await checkCommandType(String(item.commandId));
|
||||
const _null: any = null;
|
||||
if (clearProfile) {
|
||||
if (clearProfile.status) {
|
||||
if (profile.keycloak != null) {
|
||||
const delUserKeycloak = await deleteUser(profile.keycloak);
|
||||
if (delUserKeycloak) {
|
||||
|
|
@ -2812,6 +2822,11 @@ export class CommandController extends Controller {
|
|||
profile.isActive = false;
|
||||
}
|
||||
}
|
||||
profile.leaveCommandId = item.commandId ?? _null;
|
||||
profile.leaveCommandNo = item.refCommandNo ?? _null;
|
||||
profile.leaveRemark = clearProfile.leaveRemark ?? _null;
|
||||
profile.leaveDate = item.date ?? _null;
|
||||
profile.leaveType = clearProfile.LeaveType ?? _null;
|
||||
profile.position = _null;
|
||||
profile.posTypeId = _null;
|
||||
profile.posLevelId = _null;
|
||||
|
|
@ -3110,7 +3125,7 @@ export class CommandController extends Controller {
|
|||
}
|
||||
}
|
||||
const clearProfile = await checkCommandType(String(item.commandId));
|
||||
if (clearProfile) {
|
||||
if (clearProfile.status) {
|
||||
if (_profile.keycloak != null) {
|
||||
const delUserKeycloak = await deleteUser(_profile.keycloak);
|
||||
if (delUserKeycloak) {
|
||||
|
|
@ -3119,6 +3134,11 @@ export class CommandController extends Controller {
|
|||
_profile.isActive = false;
|
||||
}
|
||||
}
|
||||
_profile.leaveCommandId = item.commandId ?? _null;
|
||||
_profile.leaveCommandNo = item.refCommandNo ?? _null;
|
||||
_profile.leaveRemark = clearProfile.leaveRemark ?? _null;
|
||||
_profile.leaveDate = item.date ?? _null;
|
||||
_profile.leaveType = clearProfile.LeaveType ?? _null;
|
||||
_profile.position = _null;
|
||||
_profile.posTypeId = _null;
|
||||
_profile.posLevelId = _null;
|
||||
|
|
@ -3299,7 +3319,7 @@ export class CommandController extends Controller {
|
|||
}
|
||||
}
|
||||
const clearProfile = await checkCommandType(String(item.commandId));
|
||||
if (clearProfile) {
|
||||
if (clearProfile.status) {
|
||||
if (_profile.keycloak != null) {
|
||||
const delUserKeycloak = await deleteUser(_profile.keycloak);
|
||||
if (delUserKeycloak) {
|
||||
|
|
@ -3308,6 +3328,11 @@ export class CommandController extends Controller {
|
|||
_profile.isActive = false;
|
||||
}
|
||||
}
|
||||
_profile.leaveCommandId = item.commandId ?? _null;
|
||||
_profile.leaveCommandNo = item.refCommandNo ?? _null;
|
||||
_profile.leaveRemark = clearProfile.leaveRemark ?? _null;
|
||||
_profile.leaveDate = item.date ?? _null;
|
||||
_profile.leaveType = clearProfile.LeaveType ?? _null;
|
||||
_profile.position = _null;
|
||||
_profile.posTypeId = _null;
|
||||
_profile.posLevelId = _null;
|
||||
|
|
@ -3524,7 +3549,7 @@ export class CommandController extends Controller {
|
|||
}
|
||||
}
|
||||
const clearProfile = await checkCommandType(String(item.commandId));
|
||||
if (clearProfile) {
|
||||
if (clearProfile.status) {
|
||||
if (_profile.keycloak != null) {
|
||||
const delUserKeycloak = await deleteUser(_profile.keycloak);
|
||||
if (delUserKeycloak) {
|
||||
|
|
@ -3533,6 +3558,11 @@ export class CommandController extends Controller {
|
|||
_profile.isActive = false;
|
||||
}
|
||||
}
|
||||
_profile.leaveCommandId = item.commandId ?? _null;
|
||||
_profile.leaveCommandNo = item.refCommandNo ?? _null;
|
||||
_profile.leaveRemark = clearProfile.leaveRemark ?? _null;
|
||||
_profile.leaveDate = item.date ?? _null;
|
||||
_profile.leaveType = clearProfile.LeaveType ?? _null;
|
||||
_profile.position = _null;
|
||||
_profile.posTypeId = _null;
|
||||
_profile.posLevelId = _null;
|
||||
|
|
@ -3851,7 +3881,7 @@ export class CommandController extends Controller {
|
|||
await removeProfileInOrganize(profile.id, "OFFICER");
|
||||
const clearProfile = await checkCommandType(String(item.commandId));
|
||||
const _null: any = null;
|
||||
if (clearProfile) {
|
||||
if (clearProfile.status) {
|
||||
if (_profile.keycloak != null) {
|
||||
const delUserKeycloak = await deleteUser(_profile.keycloak);
|
||||
if (delUserKeycloak) {
|
||||
|
|
@ -3860,6 +3890,11 @@ export class CommandController extends Controller {
|
|||
_profile.isActive = false;
|
||||
}
|
||||
}
|
||||
_profile.leaveCommandId = item.commandId ?? _null;
|
||||
_profile.leaveCommandNo = item.refCommandNo ?? _null;
|
||||
_profile.leaveRemark = clearProfile.leaveRemark ?? _null;
|
||||
_profile.leaveDate = item.date ?? _null;
|
||||
_profile.leaveType = clearProfile.LeaveType ?? _null;
|
||||
_profile.position = _null;
|
||||
_profile.posTypeId = _null;
|
||||
_profile.posLevelId = _null;
|
||||
|
|
|
|||
|
|
@ -8263,6 +8263,7 @@ export class ProfileController extends Controller {
|
|||
if (requestBody.isLeave == true) {
|
||||
await removeProfileInOrganize(profile.id, "OFFICER");
|
||||
}
|
||||
profile.leaveType = "RETIRE_DECEASED";
|
||||
await this.profileRepo.save(profile, { data: request });
|
||||
setLogDataDiff(request, { before, after: profile });
|
||||
|
||||
|
|
|
|||
|
|
@ -3871,6 +3871,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
if (requestBody.isLeave == true) {
|
||||
await removeProfileInOrganize(profile.id, "EMPLOYEE");
|
||||
}
|
||||
profile.leaveType = "RETIRE_DECEASED";
|
||||
await this.profileRepo.save(profile);
|
||||
|
||||
return new HttpSuccess();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue