Commit 2a5d9f63 authored by RenanMontenegro3's avatar RenanMontenegro3

fix: "alteração do nome da área usuários para usuários admin"

parent c919cdf0
Copyright (c) 2025 Ewaldo Eder Carvalho Santana.
MIT License
Este software é propriedade intelectual do autor. Nenhuma parte deste código fonte, documentação ou quaisquer arquivos relacionados podem ser copiados, modificados, distribuídos, publicados, sublicenciados ou utilizados, total ou parcialmente, sem autorização prévia por escrito do autor.
Copyright (c) 2025 Ewaldo Eder Carvalho Santana
O uso não autorizado é estritamente proibido e sujeito às sanções legais cabíveis.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
......@@ -38,15 +38,15 @@ export class CustomSidenavComponent implements OnInit{
if (this.authTokenPresent) {
const token = sessionStorage.getItem('accessToken')!;
this.user = jwtDecode(token);
const isExpired =
const isExpired =
this.user && this.user.exp? this.user.exp < Date.now()/1000:false
if(isExpired){
sessionStorage.removeItem('accessToken');
}
this.user = this.jwtDecoderService.decodeToken(token);
console.log(this.user);
this.user = this.jwtDecoderService.decodeToken(token);
console.log(this.user);
}
this.cdr.detectChanges();
this.cdr.detectChanges();
});
}
sideNavCollapsed = signal(false);
......@@ -86,7 +86,7 @@ export class CustomSidenavComponent implements OnInit{
},
{
icon: 'groups',
label: 'Usuários',
label: 'Usuários Admin',
route: 'users',
role: 'COMPANY'
}
......
......@@ -422,10 +422,13 @@ bercosDisponiveis: any[] = [];
},
error: (err: any) => {
console.error(err);
const errorMessage = err?.error?.title || 'Erro ao cadastrar navio';
this.toastService.error(errorMessage, 'Erro ao Cadastrar Navio');
},
});
} else {
console.error('Nenhum arquivo selecionado');
this.toastService.error('Selecione um arquivo (PDF) para continuar', 'Arquivo não selecionado');
}
}
}
......
<app-add-search [title]="'Usuários'"></app-add-search>
<app-add-search [title]="'Usuários Administrativos'"></app-add-search>
<div class="main-body">
<div class="table-container" style="overflow-x: auto">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment