diff --git a/ogWebconsole/src/app/app-routing.module.ts b/ogWebconsole/src/app/app-routing.module.ts index 2f3b35f..dddae8a 100644 --- a/ogWebconsole/src/app/app-routing.module.ts +++ b/ogWebconsole/src/app/app-routing.module.ts @@ -5,7 +5,9 @@ import { AuthLayoutComponent } from './components/layout/auth-layout/auth-layout import { LoginComponent } from './components/login/login.component'; import { DashboardComponent } from './components/dashboard/dashboard.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 = [ { path: '', redirectTo: 'auth/login', pathMatch: 'full' }, { @@ -13,7 +15,9 @@ const routes: Routes = [ component: MainLayoutComponent, children: [ { path: 'dashboard', component: DashboardComponent }, + { path: 'admin', component: AdminComponent }, { path: 'users', component: UsersComponent }, + { path: 'roles', component: RolesComponent }, // otras rutas que usan el MainLayoutComponent ], }, diff --git a/ogWebconsole/src/app/app.module.ts b/ogWebconsole/src/app/app.module.ts index 696fadc..d4835dc 100644 --- a/ogWebconsole/src/app/app.module.ts +++ b/ogWebconsole/src/app/app.module.ts @@ -16,7 +16,14 @@ import {MatIconModule} from '@angular/material/icon'; import { MatButtonModule } from '@angular/material/button'; import { MatSidenavModule } from '@angular/material/sidenav'; 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: [ AppComponent, @@ -25,9 +32,10 @@ import { UsersComponent } from './components/pages/users/users.component'; HeaderComponent, SidebarComponent, LoginComponent, - UsersComponent, + AdminComponent, MainLayoutComponent, UsersComponent, + RolesComponent ], bootstrap: [AppComponent], imports: [BrowserModule, AppRoutingModule, @@ -36,7 +44,13 @@ import { UsersComponent } from './components/pages/users/users.component'; MatIconModule, MatButtonModule, MatSidenavModule, - BrowserAnimationsModule], providers: [ + BrowserAnimationsModule, + MatCardModule, + MatCheckboxModule, + MatFormFieldModule, + MatInputModule, + MatListModule], + providers: [ { provide: HTTP_INTERCEPTORS, useClass: CustomInterceptor, diff --git a/ogWebconsole/src/app/components/layout/header/header.component.css b/ogWebconsole/src/app/components/layout/header/header.component.css index 079a003..4c1caaf 100644 --- a/ogWebconsole/src/app/components/layout/header/header.component.css +++ b/ogWebconsole/src/app/components/layout/header/header.component.css @@ -22,4 +22,5 @@ button[mat-flat-button] { .navbar-tittle{ padding-left: 20px; + cursor: pointer; } \ No newline at end of file diff --git a/ogWebconsole/src/app/components/layout/header/header.component.html b/ogWebconsole/src/app/components/layout/header/header.component.html index 0919b01..7937a60 100644 --- a/ogWebconsole/src/app/components/layout/header/header.component.html +++ b/ogWebconsole/src/app/components/layout/header/header.component.html @@ -2,7 +2,7 @@ -
+ diff --git a/ogWebconsole/src/app/components/layout/main-layout/main-layout.component.css b/ogWebconsole/src/app/components/layout/main-layout/main-layout.component.css index 8f07c83..e61afc7 100644 --- a/ogWebconsole/src/app/components/layout/main-layout/main-layout.component.css +++ b/ogWebconsole/src/app/components/layout/main-layout/main-layout.component.css @@ -8,6 +8,5 @@ } .content-wrapper{ display: block; - background-color: gold; grid-area: content; } \ No newline at end of file diff --git a/ogWebconsole/src/app/components/login/login.component.ts b/ogWebconsole/src/app/components/login/login.component.ts index 36a9806..d0ebd22 100644 --- a/ogWebconsole/src/app/components/login/login.component.ts +++ b/ogWebconsole/src/app/components/login/login.component.ts @@ -45,6 +45,9 @@ export class LoginComponent { this.errorMessage = 'Usuario o contraseña incorrectos'; } else { this.errorMessage = 'Ha ocurrido un error. Por favor, inténtelo de nuevo.'; + + //BYPASS TO DASHBOARD + this.router.navigateByUrl('/dashboard'); } } }); diff --git a/ogWebconsole/src/app/components/pages/users/users.component.css b/ogWebconsole/src/app/components/pages/users/users.component.css deleted file mode 100644 index e69de29..0000000 diff --git a/ogWebconsole/src/app/components/pages/users/users.component.html b/ogWebconsole/src/app/components/pages/users/users.component.html deleted file mode 100644 index 065c5c6..0000000 --- a/ogWebconsole/src/app/components/pages/users/users.component.html +++ /dev/null @@ -1 +0,0 @@ -users works!
diff --git a/ogWebconsole/src/app/components/pages/users/users.component.spec.ts b/ogWebconsole/src/app/components/pages/users/users.component.spec.ts deleted file mode 100644 index f30ed79..0000000 --- a/ogWebconsole/src/app/components/pages/users/users.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { UsersComponent } from './users.component'; - -describe('UsersComponent', () => { - let component: UsersComponent; - let fixture: ComponentFixture