Merge branch 'development' of https://gitlab.com/empatnusabangsa/ppob/ppob-backend into development

This commit is contained in:
2022-01-24 15:34:29 +07:00
2 changed files with 12 additions and 4 deletions

View File

@@ -309,7 +309,7 @@ export class UsersService {
const baseQuery = this.usersRepository
.createQueryBuilder('user')
.where(
'user.id != :id and user.superior_id = :superior and status_approval = :status and is_rejected is false',
'user.id != :id and status_approval = :status and is_rejected is false',
{
id: superrior.userId,
status: superrior.userId,
@@ -569,7 +569,7 @@ export class UsersService {
async confirmationUser(id: string, user: string, status: string) {
try {
const dataUser = await this.usersRepository.findOneOrFail(id);
const supervisorUser = await this.usersRepository.findOneOrFail(id);
const supervisorUser = await this.findExist(user);
if (status == 'approved') {
dataUser.status_approval = supervisorUser.superior.id;