diff --git a/src/app/app.html b/src/app/app.html
index f5b9d3f..5009a69 100644
--- a/src/app/app.html
+++ b/src/app/app.html
@@ -1,5 +1,8 @@
-
+
-
+
+
+
-
+
+
diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts
index e794487..06022b9 100644
--- a/src/app/app.routes.ts
+++ b/src/app/app.routes.ts
@@ -11,9 +11,7 @@ import { authGuard } from './guards/auth.guard';
import { DadosUsuarios } from './pages/dados-usuarios/dados-usuarios';
import { VigenciaComponent } from './pages/vigencia/vigencia';
import { TrocaNumero } from './pages/troca-numero/troca-numero';
-
-// ✅ NOVO: TROCA DE NÚMERO
-
+import { Relatorios } from './pages/relatorios/relatorios';
export const routes: Routes = [
{ path: '', component: Home },
@@ -25,9 +23,13 @@ export const routes: Routes = [
{ path: 'faturamento', component: Faturamento, canActivate: [authGuard] },
{ path: 'dadosusuarios', component: DadosUsuarios, canActivate: [authGuard] },
{ path: 'vigencia', component: VigenciaComponent, canActivate: [authGuard] },
-
- // ✅ NOVO: rota da página Troca de Número
{ path: 'trocanumero', component: TrocaNumero, canActivate: [authGuard] },
+ // ✅ rota correta
+ { path: 'relatorios', component: Relatorios, canActivate: [authGuard] },
+
+ // ✅ compatibilidade: se alguém acessar /portal/relatorios, manda pra /relatorios
+ { path: 'portal/relatorios', redirectTo: 'relatorios', pathMatch: 'full' },
+
{ path: '**', redirectTo: '' },
];
diff --git a/src/app/app.ts b/src/app/app.ts
index d45f4bd..f4b13c7 100644
--- a/src/app/app.ts
+++ b/src/app/app.ts
@@ -1,16 +1,65 @@
-import { Component, signal } from '@angular/core';
-import { RouterOutlet } from '@angular/router';
-import { Header } from './components/header/header';
-import { Footer } from './components/footer/footer';
+// src/app/app.ts
+import { Component, Inject, PLATFORM_ID } from '@angular/core';
+import { Router, NavigationEnd, RouterOutlet } from '@angular/router';
+import { CommonModule } from '@angular/common';
+import { Header } from './components/header/header';
+import { FooterComponent } from './components/footer/footer';
@Component({
selector: 'app-root',
standalone: true,
- imports: [RouterOutlet, Header, Footer],
+ imports: [
+ CommonModule,
+ RouterOutlet,
+ Header,
+ FooterComponent
+ ],
templateUrl: './app.html',
- styleUrl: './app.scss'
+ styleUrls: ['./app.scss'],
})
-export class App {
- protected readonly title = signal('line-gestao-frontend');
+export class AppComponent {
+ isFullScreenPage = false;
+ hideFooter = false;
+
+ // ✅ páginas que devem esconder header/footer (tela cheia)
+ private readonly fullScreenRoutes = ['/login', '/register'];
+
+ // ✅ rotas internas (LOGADO) que devem esconder footer
+ private readonly loggedPrefixes = [
+ '/geral',
+ '/mureg',
+ '/faturamento',
+ '/dadosusuarios',
+ '/vigencia',
+ '/trocanumero',
+ '/relatorios', // ✅ ADICIONADO: esconde footer na página de relatórios
+ ];
+
+ constructor(
+ private router: Router,
+ @Inject(PLATFORM_ID) private platformId: object
+ ) {
+ this.router.events.subscribe((event) => {
+ if (event instanceof NavigationEnd) {
+ const rawUrl = event.urlAfterRedirects || event.url;
+
+ // remove query/hash e barra final
+ let url = rawUrl.split('?')[0].split('#')[0];
+ url = url.replace(/\/+$/, '');
+
+ this.isFullScreenPage = this.fullScreenRoutes.includes(url);
+
+ const isLoggedRoute = this.loggedPrefixes.some(
+ (p) => url === p || url.startsWith(p + '/')
+ );
+
+ // ✅ footer some ao logar + também no login/register
+ this.hideFooter = isLoggedRoute || this.isFullScreenPage;
+ }
+ });
+ }
}
+
+// ✅ SSR espera importar { App } de './app/app'
+export { AppComponent as App };
diff --git a/src/app/components/footer/footer.html b/src/app/components/footer/footer.html
index 260839a..60253d0 100644
--- a/src/app/components/footer/footer.html
+++ b/src/app/components/footer/footer.html
@@ -1,42 +1,32 @@
-