add page dashboard
This commit is contained in:
parent
4407fa0de8
commit
5542c12c82
|
@ -33,6 +33,8 @@ import { PageRibbonComponent } from './layouts/profiles/page-ribbon.component';
|
||||||
import { ErrorComponent } from './layouts/error/error.component';
|
import { ErrorComponent } from './layouts/error/error.component';
|
||||||
import { SidebarComponent } from './layouts/sidebar/sidebar.component';
|
import { SidebarComponent } from './layouts/sidebar/sidebar.component';
|
||||||
import { PaginaPrincipalComponent } from './pagina-principal/pagina-principal.component';
|
import { PaginaPrincipalComponent } from './pagina-principal/pagina-principal.component';
|
||||||
|
import { DashboardUserComponent } from './entities/dashboard/dashboard-user/dashboard-user.component';
|
||||||
|
import { DashboardAdminComponent } from './entities/dashboard/dashboard-admin/dashboard-admin.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -79,7 +81,16 @@ import { PaginaPrincipalComponent } from './pagina-principal/pagina-principal.co
|
||||||
} as SocialAuthServiceConfig,
|
} as SocialAuthServiceConfig,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
declarations: [MainComponent, NavbarComponent, ErrorComponent, PageRibbonComponent, FooterComponent, SidebarComponent],
|
declarations: [
|
||||||
|
MainComponent,
|
||||||
|
NavbarComponent,
|
||||||
|
ErrorComponent,
|
||||||
|
PageRibbonComponent,
|
||||||
|
FooterComponent,
|
||||||
|
SidebarComponent,
|
||||||
|
DashboardUserComponent,
|
||||||
|
DashboardAdminComponent,
|
||||||
|
],
|
||||||
bootstrap: [MainComponent],
|
bootstrap: [MainComponent],
|
||||||
})
|
})
|
||||||
export class AppModule {
|
export class AppModule {
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<p>dashboard-admin works!</p>
|
|
@ -0,0 +1,24 @@
|
||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { DashboardAdminComponent } from './dashboard-admin.component';
|
||||||
|
|
||||||
|
describe('DashboardAdminComponent', () => {
|
||||||
|
let component: DashboardAdminComponent;
|
||||||
|
let fixture: ComponentFixture<DashboardAdminComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
declarations: [DashboardAdminComponent],
|
||||||
|
}).compileComponents();
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(DashboardAdminComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'jhi-dashboard-admin',
|
||||||
|
templateUrl: './dashboard-admin.component.html',
|
||||||
|
styleUrls: ['./dashboard-admin.component.scss'],
|
||||||
|
})
|
||||||
|
export class DashboardAdminComponent implements OnInit {
|
||||||
|
constructor() {}
|
||||||
|
|
||||||
|
ngOnInit(): void {}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
<p>dashboard-user works!</p>
|
|
@ -0,0 +1,24 @@
|
||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { DashboardUserComponent } from './dashboard-user.component';
|
||||||
|
|
||||||
|
describe('DashboardUserComponent', () => {
|
||||||
|
let component: DashboardUserComponent;
|
||||||
|
let fixture: ComponentFixture<DashboardUserComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
declarations: [DashboardUserComponent],
|
||||||
|
}).compileComponents();
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(DashboardUserComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'jhi-dashboard-user',
|
||||||
|
templateUrl: './dashboard-user.component.html',
|
||||||
|
styleUrls: ['./dashboard-user.component.scss'],
|
||||||
|
})
|
||||||
|
export class DashboardUserComponent implements OnInit {
|
||||||
|
constructor() {}
|
||||||
|
|
||||||
|
ngOnInit(): void {}
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
|
import { DashboardUserComponent } from './dashboard-user/dashboard-user.component';
|
||||||
|
import { DashboardAdminComponent } from './dashboard-admin/dashboard-admin.component';
|
||||||
|
import { SharedModule } from '../../shared/shared.module';
|
||||||
|
import { PlantillaRoutingModule } from '../plantilla/route/plantilla-routing.module';
|
||||||
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
declarations: [DashboardUserComponent, DashboardAdminComponent],
|
||||||
|
imports: [CommonModule, SharedModule, PlantillaRoutingModule, FontAwesomeModule],
|
||||||
|
})
|
||||||
|
export class DashboardModule {}
|
|
@ -0,0 +1,25 @@
|
||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
|
|
||||||
|
import { DashboardUserComponent } from '../dashboard-user/dashboard-user.component';
|
||||||
|
import { DashboardAdminComponent } from '../dashboard-admin/dashboard-admin.component';
|
||||||
|
import { UserRouteAccessService } from '../../../core/auth/user-route-access.service';
|
||||||
|
|
||||||
|
const dashboardRoute: Routes = [
|
||||||
|
{
|
||||||
|
path: 'admin',
|
||||||
|
component: DashboardAdminComponent,
|
||||||
|
canActivate: [UserRouteAccessService],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'user',
|
||||||
|
component: DashboardUserComponent,
|
||||||
|
canActivate: [UserRouteAccessService],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [RouterModule.forChild(dashboardRoute)],
|
||||||
|
exports: [RouterModule],
|
||||||
|
})
|
||||||
|
export class DashboardRoutingModule {}
|
|
@ -82,6 +82,16 @@ import { RouterModule } from '@angular/router';
|
||||||
data: { pageTitle: 'dataSurveyApp.usuarioExtra.plantillas.title' },
|
data: { pageTitle: 'dataSurveyApp.usuarioExtra.plantillas.title' },
|
||||||
loadChildren: () => import('./usuario-plantillas/usuario-plantillas.module').then(m => m.UsuarioPlantillasModule),
|
loadChildren: () => import('./usuario-plantillas/usuario-plantillas.module').then(m => m.UsuarioPlantillasModule),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'dashboard/admin',
|
||||||
|
data: { pageTitle: 'dataSurveyApp.Dashboard.title' },
|
||||||
|
loadChildren: () => import('./dashboard/dashboard.module').then(m => m.DashboardModule),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'dashboard/user',
|
||||||
|
data: { pageTitle: 'dataSurveyApp.Dashboard.title' },
|
||||||
|
loadChildren: () => import('./dashboard/dashboard.module').then(m => m.DashboardModule),
|
||||||
|
},
|
||||||
/* jhipster-needle-add-entity-route - JHipster will add entity modules routes here */
|
/* jhipster-needle-add-entity-route - JHipster will add entity modules routes here */
|
||||||
]),
|
]),
|
||||||
],
|
],
|
||||||
|
|
|
@ -24,6 +24,12 @@ export const ADMIN_ROUTES: RouteInfo[] = [
|
||||||
// },
|
// },
|
||||||
|
|
||||||
{ path: '/pagina-principal', title: 'Inicio', type: 'link', icontype: 'nc-icon nc-world-2' },
|
{ path: '/pagina-principal', title: 'Inicio', type: 'link', icontype: 'nc-icon nc-world-2' },
|
||||||
|
{
|
||||||
|
path: '/dashboard/admin',
|
||||||
|
title: 'Dashboard',
|
||||||
|
type: 'link',
|
||||||
|
icontype: 'nc-icon nc-chart-bar-32',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/encuesta',
|
path: '/encuesta',
|
||||||
title: 'Encuestas',
|
title: 'Encuestas',
|
||||||
|
@ -58,6 +64,12 @@ export const ADMIN_ROUTES: RouteInfo[] = [
|
||||||
|
|
||||||
export const USER_ROUTES: RouteInfo[] = [
|
export const USER_ROUTES: RouteInfo[] = [
|
||||||
{ path: '/pagina-principal', title: 'Inicio', type: 'link', icontype: 'nc-icon nc-world-2' },
|
{ path: '/pagina-principal', title: 'Inicio', type: 'link', icontype: 'nc-icon nc-world-2' },
|
||||||
|
{
|
||||||
|
path: '/dashboard/user',
|
||||||
|
title: 'Dashboard',
|
||||||
|
type: 'link',
|
||||||
|
icontype: 'nc-icon nc-chart-bar-32',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/encuesta',
|
path: '/encuesta',
|
||||||
title: 'Encuestas',
|
title: 'Encuestas',
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"dataSurveyApp": {
|
||||||
|
"Dashboard": {
|
||||||
|
"title": "Dashboard"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue