penambahan logic untuk supervisorUser
This commit is contained in:
parent
7df999b455
commit
74a98d5e7d
|
@ -571,8 +571,14 @@ export class UsersService {
|
||||||
const dataUser = await this.usersRepository.findOneOrFail(id);
|
const dataUser = await this.usersRepository.findOneOrFail(id);
|
||||||
const supervisorUser = await this.findExist(user);
|
const supervisorUser = await this.findExist(user);
|
||||||
|
|
||||||
|
|
||||||
if (status == 'approved') {
|
if (status == 'approved') {
|
||||||
dataUser.status_approval = supervisorUser.superior.id;
|
dataUser.status_approval = supervisorUser.superior.id;
|
||||||
|
if (supervisorUser.roles.name == 'Admin') {
|
||||||
|
supervisorUser.superior.id;
|
||||||
|
}else {
|
||||||
|
dataUser.status_approval = supervisorUser.superior.id;
|
||||||
|
}
|
||||||
} else if (status == 'resend') {
|
} else if (status == 'resend') {
|
||||||
dataUser.is_rejected = false;
|
dataUser.is_rejected = false;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user