Tabla usuarios
parent
f9599f5c94
commit
d58f63d8c6
|
|
@ -5,7 +5,9 @@ import { AuthLayoutComponent } from './components/layout/auth-layout/auth-layout
|
||||||
import { LoginComponent } from './components/login/login.component';
|
import { LoginComponent } from './components/login/login.component';
|
||||||
import { DashboardComponent } from './components/dashboard/dashboard.component';
|
import { DashboardComponent } from './components/dashboard/dashboard.component';
|
||||||
import { PageNotFoundComponent } from './components/page-not-found/page-not-found.component';
|
import { PageNotFoundComponent } from './components/page-not-found/page-not-found.component';
|
||||||
import { UsersComponent } from './components/pages/users/users.component';
|
import { AdminComponent } from './components/pages/admin/admin.component';
|
||||||
|
import { UsersComponent } from './components/pages/admin/users/users/users.component';
|
||||||
|
import { RolesComponent } from './components/pages/admin/roles/roles/roles.component';
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', redirectTo: 'auth/login', pathMatch: 'full' },
|
{ path: '', redirectTo: 'auth/login', pathMatch: 'full' },
|
||||||
{
|
{
|
||||||
|
|
@ -13,7 +15,9 @@ const routes: Routes = [
|
||||||
component: MainLayoutComponent,
|
component: MainLayoutComponent,
|
||||||
children: [
|
children: [
|
||||||
{ path: 'dashboard', component: DashboardComponent },
|
{ path: 'dashboard', component: DashboardComponent },
|
||||||
|
{ path: 'admin', component: AdminComponent },
|
||||||
{ path: 'users', component: UsersComponent },
|
{ path: 'users', component: UsersComponent },
|
||||||
|
{ path: 'roles', component: RolesComponent },
|
||||||
// otras rutas que usan el MainLayoutComponent
|
// otras rutas que usan el MainLayoutComponent
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,14 @@ import {MatIconModule} from '@angular/material/icon';
|
||||||
import { MatButtonModule } from '@angular/material/button';
|
import { MatButtonModule } from '@angular/material/button';
|
||||||
import { MatSidenavModule } from '@angular/material/sidenav';
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
||||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { UsersComponent } from './components/pages/users/users.component';
|
import { AdminComponent } from './components/pages/admin/admin.component';
|
||||||
|
import { MatCardModule } from '@angular/material/card';
|
||||||
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
||||||
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||||
|
import { MatInputModule } from '@angular/material/input';
|
||||||
|
import { MatListModule } from '@angular/material/list';
|
||||||
|
import { UsersComponent } from './components/pages/admin/users/users/users.component';
|
||||||
|
import { RolesComponent } from './components/pages/admin/roles/roles/roles.component';
|
||||||
|
|
||||||
@NgModule({ declarations: [
|
@NgModule({ declarations: [
|
||||||
AppComponent,
|
AppComponent,
|
||||||
|
|
@ -25,9 +32,10 @@ import { UsersComponent } from './components/pages/users/users.component';
|
||||||
HeaderComponent,
|
HeaderComponent,
|
||||||
SidebarComponent,
|
SidebarComponent,
|
||||||
LoginComponent,
|
LoginComponent,
|
||||||
UsersComponent,
|
AdminComponent,
|
||||||
MainLayoutComponent,
|
MainLayoutComponent,
|
||||||
UsersComponent,
|
UsersComponent,
|
||||||
|
RolesComponent
|
||||||
],
|
],
|
||||||
bootstrap: [AppComponent], imports: [BrowserModule,
|
bootstrap: [AppComponent], imports: [BrowserModule,
|
||||||
AppRoutingModule,
|
AppRoutingModule,
|
||||||
|
|
@ -36,7 +44,13 @@ import { UsersComponent } from './components/pages/users/users.component';
|
||||||
MatIconModule,
|
MatIconModule,
|
||||||
MatButtonModule,
|
MatButtonModule,
|
||||||
MatSidenavModule,
|
MatSidenavModule,
|
||||||
BrowserAnimationsModule], providers: [
|
BrowserAnimationsModule,
|
||||||
|
MatCardModule,
|
||||||
|
MatCheckboxModule,
|
||||||
|
MatFormFieldModule,
|
||||||
|
MatInputModule,
|
||||||
|
MatListModule],
|
||||||
|
providers: [
|
||||||
{
|
{
|
||||||
provide: HTTP_INTERCEPTORS,
|
provide: HTTP_INTERCEPTORS,
|
||||||
useClass: CustomInterceptor,
|
useClass: CustomInterceptor,
|
||||||
|
|
|
||||||
|
|
@ -22,4 +22,5 @@ button[mat-flat-button] {
|
||||||
|
|
||||||
.navbar-tittle{
|
.navbar-tittle{
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<button mat-mini-fab color="primary" aria-label="menu">
|
<button mat-mini-fab color="primary" aria-label="menu">
|
||||||
<mat-icon>menu</mat-icon>
|
<mat-icon>menu</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<span class="navbar-tittle">Opengnsys webconsole</span>
|
<span class="navbar-tittle" routerLink="/dashboard">Opengnsys webconsole</span>
|
||||||
<div class="navbar-button-row">
|
<div class="navbar-button-row">
|
||||||
<button mat-flat-button color="primary">Aulas</button>
|
<button mat-flat-button color="primary">Aulas</button>
|
||||||
<button mat-flat-button color="primary">Acciones</button>
|
<button mat-flat-button color="primary">Acciones</button>
|
||||||
|
|
@ -12,8 +12,8 @@
|
||||||
<button mat-flat-button color="primary">Menús</button>
|
<button mat-flat-button color="primary">Menús</button>
|
||||||
<button mat-flat-button color="primary">Buscar</button>
|
<button mat-flat-button color="primary">Buscar</button>
|
||||||
<button mat-flat-button color="primary">Calendario</button>
|
<button mat-flat-button color="primary">Calendario</button>
|
||||||
<button mat-flat-button color="primary" routerLink="/users">Usuarios</button>
|
|
||||||
<button mat-flat-button color="primary">Ayuda</button>
|
<button mat-flat-button color="primary">Ayuda</button>
|
||||||
|
<button mat-flat-button color="accent" routerLink="/admin">Admin</button>
|
||||||
<button mat-flat-button color="warn">Salir</button>
|
<button mat-flat-button color="warn">Salir</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,5 @@
|
||||||
}
|
}
|
||||||
.content-wrapper{
|
.content-wrapper{
|
||||||
display: block;
|
display: block;
|
||||||
background-color: gold;
|
|
||||||
grid-area: content;
|
grid-area: content;
|
||||||
}
|
}
|
||||||
|
|
@ -45,6 +45,9 @@ export class LoginComponent {
|
||||||
this.errorMessage = 'Usuario o contraseña incorrectos';
|
this.errorMessage = 'Usuario o contraseña incorrectos';
|
||||||
} else {
|
} else {
|
||||||
this.errorMessage = 'Ha ocurrido un error. Por favor, inténtelo de nuevo.';
|
this.errorMessage = 'Ha ocurrido un error. Por favor, inténtelo de nuevo.';
|
||||||
|
|
||||||
|
//BYPASS TO DASHBOARD
|
||||||
|
this.router.navigateByUrl('/dashboard');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
<p>users works!</p>
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { UsersComponent } from './users.component';
|
|
||||||
|
|
||||||
describe('UsersComponent', () => {
|
|
||||||
let component: UsersComponent;
|
|
||||||
let fixture: ComponentFixture<UsersComponent>;
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
await TestBed.configureTestingModule({
|
|
||||||
declarations: [UsersComponent]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
|
|
||||||
fixture = TestBed.createComponent(UsersComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
import { Component } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-users',
|
|
||||||
templateUrl: './users.component.html',
|
|
||||||
styleUrl: './users.component.css'
|
|
||||||
})
|
|
||||||
export class UsersComponent {
|
|
||||||
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 3.4 KiB |
Loading…
Reference in New Issue