fix approval user
This commit is contained in:
		| @@ -66,8 +66,14 @@ export class UsersService { | ||||
|     userData.salt = salt; | ||||
|  | ||||
|     if (createUserDto.superior) { | ||||
|       let approvalRole = ''; | ||||
|       if(superior.roles.name == 'Sales'){ | ||||
|         approvalRole = 'Supervisor'; | ||||
|       } else { | ||||
|         approvalRole = 'Admin'; | ||||
|       } | ||||
|       userData.superior = superior; | ||||
|       userData.status_approval = superior.roles.name; | ||||
|       userData.status_approval = approvalRole; | ||||
|     } else { | ||||
|       userData.superior = null; | ||||
|       userData.partner = createUserDto.partner; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user