diff --git a/src/main/webapp/app/app.module.ts b/src/main/webapp/app/app.module.ts index 7c6db5a..06dcee2 100644 --- a/src/main/webapp/app/app.module.ts +++ b/src/main/webapp/app/app.module.ts @@ -33,6 +33,8 @@ import { PageRibbonComponent } from './layouts/profiles/page-ribbon.component'; import { ErrorComponent } from './layouts/error/error.component'; import { SidebarComponent } from './layouts/sidebar/sidebar.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({ imports: [ @@ -79,7 +81,16 @@ import { PaginaPrincipalComponent } from './pagina-principal/pagina-principal.co } as SocialAuthServiceConfig, }, ], - declarations: [MainComponent, NavbarComponent, ErrorComponent, PageRibbonComponent, FooterComponent, SidebarComponent], + declarations: [ + MainComponent, + NavbarComponent, + ErrorComponent, + PageRibbonComponent, + FooterComponent, + SidebarComponent, + DashboardUserComponent, + DashboardAdminComponent, + ], bootstrap: [MainComponent], }) export class AppModule { diff --git a/src/main/webapp/app/entities/dashboard/dashboard-admin/dashboard-admin.component.html b/src/main/webapp/app/entities/dashboard/dashboard-admin/dashboard-admin.component.html new file mode 100644 index 0000000..c452af6 --- /dev/null +++ b/src/main/webapp/app/entities/dashboard/dashboard-admin/dashboard-admin.component.html @@ -0,0 +1 @@ +

dashboard-admin works!

diff --git a/src/main/webapp/app/entities/dashboard/dashboard-admin/dashboard-admin.component.scss b/src/main/webapp/app/entities/dashboard/dashboard-admin/dashboard-admin.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/main/webapp/app/entities/dashboard/dashboard-admin/dashboard-admin.component.spec.ts b/src/main/webapp/app/entities/dashboard/dashboard-admin/dashboard-admin.component.spec.ts new file mode 100644 index 0000000..f199b58 --- /dev/null +++ b/src/main/webapp/app/entities/dashboard/dashboard-admin/dashboard-admin.component.spec.ts @@ -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; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [DashboardAdminComponent], + }).compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(DashboardAdminComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/main/webapp/app/entities/dashboard/dashboard-admin/dashboard-admin.component.ts b/src/main/webapp/app/entities/dashboard/dashboard-admin/dashboard-admin.component.ts new file mode 100644 index 0000000..74c742e --- /dev/null +++ b/src/main/webapp/app/entities/dashboard/dashboard-admin/dashboard-admin.component.ts @@ -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 {} +} diff --git a/src/main/webapp/app/entities/dashboard/dashboard-user/dashboard-user.component.html b/src/main/webapp/app/entities/dashboard/dashboard-user/dashboard-user.component.html new file mode 100644 index 0000000..3c30945 --- /dev/null +++ b/src/main/webapp/app/entities/dashboard/dashboard-user/dashboard-user.component.html @@ -0,0 +1 @@ +

dashboard-user works!

diff --git a/src/main/webapp/app/entities/dashboard/dashboard-user/dashboard-user.component.scss b/src/main/webapp/app/entities/dashboard/dashboard-user/dashboard-user.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/main/webapp/app/entities/dashboard/dashboard-user/dashboard-user.component.spec.ts b/src/main/webapp/app/entities/dashboard/dashboard-user/dashboard-user.component.spec.ts new file mode 100644 index 0000000..d1665ea --- /dev/null +++ b/src/main/webapp/app/entities/dashboard/dashboard-user/dashboard-user.component.spec.ts @@ -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; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [DashboardUserComponent], + }).compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(DashboardUserComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/main/webapp/app/entities/dashboard/dashboard-user/dashboard-user.component.ts b/src/main/webapp/app/entities/dashboard/dashboard-user/dashboard-user.component.ts new file mode 100644 index 0000000..4a4a261 --- /dev/null +++ b/src/main/webapp/app/entities/dashboard/dashboard-user/dashboard-user.component.ts @@ -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 {} +} diff --git a/src/main/webapp/app/entities/dashboard/dashboard.module.ts b/src/main/webapp/app/entities/dashboard/dashboard.module.ts new file mode 100644 index 0000000..11b9687 --- /dev/null +++ b/src/main/webapp/app/entities/dashboard/dashboard.module.ts @@ -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 {} diff --git a/src/main/webapp/app/entities/dashboard/route/dashboard-routing.module.ts b/src/main/webapp/app/entities/dashboard/route/dashboard-routing.module.ts new file mode 100644 index 0000000..6e23128 --- /dev/null +++ b/src/main/webapp/app/entities/dashboard/route/dashboard-routing.module.ts @@ -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 {} diff --git a/src/main/webapp/app/entities/entity-routing.module.ts b/src/main/webapp/app/entities/entity-routing.module.ts index 1e6285a..dbe3bd0 100644 --- a/src/main/webapp/app/entities/entity-routing.module.ts +++ b/src/main/webapp/app/entities/entity-routing.module.ts @@ -82,6 +82,16 @@ import { RouterModule } from '@angular/router'; data: { pageTitle: 'dataSurveyApp.usuarioExtra.plantillas.title' }, 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 */ ]), ], diff --git a/src/main/webapp/app/layouts/sidebar/sidebar.constants.ts b/src/main/webapp/app/layouts/sidebar/sidebar.constants.ts index 715b298..91754ce 100644 --- a/src/main/webapp/app/layouts/sidebar/sidebar.constants.ts +++ b/src/main/webapp/app/layouts/sidebar/sidebar.constants.ts @@ -24,6 +24,12 @@ export const ADMIN_ROUTES: RouteInfo[] = [ // }, { 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', title: 'Encuestas', @@ -58,6 +64,12 @@ export const ADMIN_ROUTES: RouteInfo[] = [ export const USER_ROUTES: RouteInfo[] = [ { 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', title: 'Encuestas', diff --git a/src/main/webapp/i18n/es/dashboard.json b/src/main/webapp/i18n/es/dashboard.json new file mode 100644 index 0000000..27d4016 --- /dev/null +++ b/src/main/webapp/i18n/es/dashboard.json @@ -0,0 +1,7 @@ +{ + "dataSurveyApp": { + "Dashboard": { + "title": "Dashboard" + } + } +}