Merge pull request #118 from Quantum-P3/feature/dashboard
add page dashboard
This commit is contained in:
commit
3c58e9f4c9
|
@ -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 { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||||
|
import { DashboardRoutingModule } from './route/dashboard-routing.module';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
declarations: [DashboardUserComponent, DashboardAdminComponent],
|
||||||
|
imports: [CommonModule, SharedModule, DashboardRoutingModule, 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',
|
||||||
|
data: { pageTitle: 'dataSurveyApp.Dashboard.title' },
|
||||||
|
loadChildren: () => import('./dashboard/dashboard.module').then(m => m.DashboardModule),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'dashboard',
|
||||||
|
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