fix ส่งชื่อไปพักราชการแต่ถูกปลดกิ่ง
This commit is contained in:
parent
f01ed53d47
commit
bfe3f7c84c
1 changed files with 9 additions and 3 deletions
|
|
@ -3485,7 +3485,6 @@ export class CommandController extends Controller {
|
|||
_profile.lastUpdateFullName = req.user.name;
|
||||
_profile.lastUpdatedAt = new Date();
|
||||
if (item.isLeave == true) {
|
||||
await removeProfileInOrganize(_profile.id, "OFFICER");
|
||||
const exceptClear = await checkExceptCommandType(String(item.commandId));
|
||||
if (exceptClear.status) {
|
||||
_profile.leaveReason = item.leaveReason ?? _null;
|
||||
|
|
@ -3495,6 +3494,9 @@ export class CommandController extends Controller {
|
|||
_profile.leaveDate = item.date ?? _null;
|
||||
_profile.leaveType = exceptClear.LeaveType ?? _null;
|
||||
}
|
||||
else {
|
||||
await removeProfileInOrganize(_profile.id, "OFFICER");
|
||||
}
|
||||
}
|
||||
const clearProfile = await checkCommandType(String(item.commandId));
|
||||
if (clearProfile.status) {
|
||||
|
|
@ -3676,7 +3678,6 @@ export class CommandController extends Controller {
|
|||
_profile.lastUpdateFullName = req.user.name;
|
||||
_profile.lastUpdatedAt = new Date();
|
||||
if (item.isLeave == true) {
|
||||
await removeProfileInOrganize(_profile.id, "EMPLOYEE");
|
||||
const exceptClear = await checkExceptCommandType(String(item.commandId));
|
||||
if (exceptClear.status) {
|
||||
_profile.leaveReason = item.leaveReason ?? _null;
|
||||
|
|
@ -3686,6 +3687,9 @@ export class CommandController extends Controller {
|
|||
_profile.leaveDate = item.date ?? _null;
|
||||
_profile.leaveType = exceptClear.LeaveType ?? _null;
|
||||
}
|
||||
else {
|
||||
await removeProfileInOrganize(_profile.id, "EMPLOYEE");
|
||||
}
|
||||
}
|
||||
const clearProfile = await checkCommandType(String(item.commandId));
|
||||
if (clearProfile.status) {
|
||||
|
|
@ -3903,7 +3907,6 @@ export class CommandController extends Controller {
|
|||
_profile.lastUpdateFullName = req.user.name;
|
||||
_profile.lastUpdatedAt = new Date();
|
||||
if (item.isLeave == true) {
|
||||
await removeProfileInOrganize(_profile.id, "EMPLOYEE");
|
||||
const exceptClear = await checkExceptCommandType(String(item.commandId));
|
||||
if (exceptClear.status) {
|
||||
_profile.leaveReason = item.leaveReason ?? _null;
|
||||
|
|
@ -3913,6 +3916,9 @@ export class CommandController extends Controller {
|
|||
_profile.leaveDate = item.date ?? _null;
|
||||
_profile.leaveType = exceptClear.LeaveType ?? _null;
|
||||
}
|
||||
else {
|
||||
await removeProfileInOrganize(_profile.id, "EMPLOYEE");
|
||||
}
|
||||
}
|
||||
const clearProfile = await checkCommandType(String(item.commandId));
|
||||
if (clearProfile.status) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue