Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Henrique Gomes Cardoso committed Sep 10, 2023
1 parent 76b943f commit 430a27d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DocManager.Application/Helpers/EmailBody.cs
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ public static string EmailStringBody(string email, string emailToken)
</td>
</tr>
</table>
<p>Se você não solicitou a alteração da sua senha iguinore essa mensagem ou entre em contrato conosco atráves do seguinte endereço de e-mail <a>[email protected]</a> </p>
<p>Se você não solicitou a alteração da sua senha ignore essa mensagem ou entre em contrato conosco atráves do seguinte endereço de e-mail <a>[email protected]</a> </p>
<p>Obrigado(a),
<br>Time DocManager</p>
<!-- Sub copy -->
Expand Down
10 changes: 8 additions & 2 deletions DocManager.Application/Services/UserService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,17 @@ public async Task<ResultData> PostLoginAsync(UserPostLoginRequest user)
var dataBytes = Utils.ToBase64Encode(openData);
var getuser = new UserEntity();


var exist = await _userRepository.GetUserByEmail(user.Email);

if (exist == null)
{
return Utils.SuccessData(new AccountResponse { Message = "Usuário inexistente ou ainda não foi ativado" });
}

getuser = await _userRepository.GetUserByCredentialsAsync(user.Email, user.Password);

if(getuser == null){
return Utils.SuccessData(new AccountResponse { Message = "Usuário inexistente ou ainda não foi ativado" });
return Utils.SuccessData(new AccountResponse { Message = "Usuário ou senha incorreta" });
}

if (getuser.Active == true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ export class DocumentMaintenanceComponent implements OnInit {
typesview.items.unshift(view);
this.listGroupAutorization = typesview.items;
this.listGroupAutorization.shift();
this.listGroupAutorization.shift();
}, error => {
this.utils.showErrorMessage(error, 'Tipo de produto');
this.spinner.hide();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ export class ReportComponent implements OnInit {

filterView(filter: DocumentFilter, page: number) {
this.spinner.show();
var userGroupAutorization = "Todos";
var userGroupAutorization = this.utils.getUserGroupAutorization((localStorage.getItem('currentUser') || "")).toString();
if(userGroupAutorization == '0e1250d0-328f-4c93-b9d9-ddf5484bd037'){
userGroupAutorization = "Todos";
}
if(!(userGroupAutorization == '')){
let eventFilter = new DocumentFilter('', '', filter.documentTypeId, filter.documentPartnersId, userGroupAutorization, filter.active, 1, 50);
this.DocumentService.getByFilter(eventFilter).subscribe(view => {
Expand Down

0 comments on commit 430a27d

Please sign in to comment.